#3330 closed defect (invalid)

gcc m68k inline asm does not recognize sr

Reported by: Ben Owned by:
Priority: normal Milestone: 4.11.4
Component: tool/binutils Version: 4.11
Severity: normal Keywords:
Cc: Blocked By:
Blocking:

Description

unknown register when using inline assembly for m68k
gcc gives: error: unknown register name 'sr' in 'asm'
from code below

    asm ("movew #0x2700,%%sr \n\t" );

for other registers it works,
using gcc for *.S works fine

Attachments (3)

inline.c (203 bytes) - added by Ben on 03/11/18 at 07:33:50.
sample code with inline assembly
MakefileTest (2.1 KB) - added by Ben on 03/11/18 at 07:34:19.
consoleoutput (290 bytes) - added by Ben on 03/11/18 at 07:34:59.
console output for invoking make

Download all attachments as: .zip

Change History (6)

comment:1 Changed on 03/10/18 at 15:56:44 by Joel Sherrill

What BSP and configuration did this happen for?

Any specific file?

Changed on 03/11/18 at 07:33:50 by Ben

Attachment: inline.c added

sample code with inline assembly

Changed on 03/11/18 at 07:34:19 by Ben

Attachment: MakefileTest added

Changed on 03/11/18 at 07:34:59 by Ben

Attachment: consoleoutput added

console output for invoking make

comment:2 Changed on 03/11/18 at 07:36:11 by Ben

files added

comment:3 Changed on 03/12/18 at 06:37:50 by Sebastian Huber

Component: tool/gcctool/binutils
Resolution: invalid
Status: newclosed

Use

asm ("movew #0x2700, sr");
Note: See TracTickets for help on using tickets.