#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 Mar 11, 2018 at 7:33:50 AM.
sample code with inline assembly
MakefileTest (2.1 KB) - added by Ben on Mar 11, 2018 at 7:34:19 AM.
consoleoutput (290 bytes) - added by Ben on Mar 11, 2018 at 7:34:59 AM.
console output for invoking make

Download all attachments as: .zip

Change History (6)

comment:1 Changed on Mar 10, 2018 at 3:56:44 PM by Joel Sherrill

What BSP and configuration did this happen for?

Any specific file?

Changed on Mar 11, 2018 at 7:33:50 AM by Ben

Attachment: inline.c added

sample code with inline assembly

Changed on Mar 11, 2018 at 7:34:19 AM by Ben

Attachment: MakefileTest added

Changed on Mar 11, 2018 at 7:34:59 AM by Ben

Attachment: consoleoutput added

console output for invoking make

comment:2 Changed on Mar 11, 2018 at 7:36:11 AM by Ben

files added

comment:3 Changed on Mar 12, 2018 at 6:37:50 AM by Sebastian Huber

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

Use

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