[#6447] assembler should reject "[--SP] = SP;"

Document created by Aaronwu Employee on Oct 17, 2013
Version 1Show Document
  • View in full screen mode

[#6447] assembler should reject "[--SP] = SP;"

Submitted By: Mike Frysinger

Open Date

2011-01-14 00:31:04     Close Date

2011-02-07 15:05:28

Priority:

Medium     Assignee:

Stuart Henderson

Board:

N/A     Silicon Revision:

Resolution:

Fixed     Fixed In Release:

N/A

Processor:

ALL     

Host Operating System:

toolchain rev.:

    kernel rev.:

State:

Closed     Found In Release:

2011R1

Is this bug repeatable?:

N/A     

Summary: assembler should reject "[--SP] = SP;"

Details:

 

you cant push the stack pointer onto the stack, but our assembler happily accepts it and outputs the correct encoding for it

 

we should reject this:

$ cat test.s

    [--SP] = SP;

$ bfin-elf-as test.s

<no error>

 

Follow-ups

 

--- David Gibson                                             2011-01-14 03:03:01

I don't understand why should we reject the code?

I believe that it's a legal instruction for Blackfin. As you say, the assembler

accepts and outputs the correct encoding. Is there another reason for rejecting

it?

 

--- Mike Frysinger                                           2011-01-14 10:47:14

because the hardware rejects it

 

--- Mike Frysinger                                           2011-01-14 14:00:50

sorry, i was remembering wrong.  when Robin & i were doing heavy sim

development, we came up with a bunch of opcodes that the hardware should reject

but doesnt actually.  this is one of those.  design agreed.

 

it is also my understanding that the VDSP assembler rejects this ?  our

disassembler certainly flags it as illegal ...

 

--- David Gibson                                             2011-01-14 16:56:14

You're right. The VDSP Assembler accepts it also, which is why I questioned it.

I'll open a TAR for the VDSP assembler - and check that the compiler doesn't

emit this instruction. We also need to check if the GNU compiler can emit this

instruction.

 

--- Stuart Henderson                                         2011-01-28 13:29:22

Fixed on trunk.

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

No Files Were Found

Attachments

    Outcomes