[#7649] cli() / sti() compile error

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

[#7649] cli() / sti() compile error

Submitted By: Mike Sinkovsky

Open Date

2013-02-27 07:35:53    

Priority:

Medium     Assignee:

Stuart Henderson

Board:

Custom     Silicon Revision:

Resolution:

N/A     Fixed In Release:

N/A

Processor:

BF531     

Host Operating System:

toolchain rev.:

trunk     kernel rev.:

State:

Open     Found In Release:

snaps

Is this bug repeatable?:

N/A     

Summary: cli() / sti() compile error

Details:

 

compilation error (test file attached):

=== cut ===

/tmp/ccFD5JtX.s: Assembler messages:

/tmp/ccFD5JtX.s:701: Error: Dreg expected for STI. Input text was P1.

=== cut ===

 

for workaround I redefned cli()/sti() as inline assembly operators:

=== cut ===

#define cli()         ({ unsigned int __rval; __asm__ __volatile__ \

                                ("cli %0;" : "=d"(__rval)); __rval; })

#define sti(x)        __asm__ __volatile__ ("sti %0;" : : "d"(x))

=== cut ===

 

Follow-ups

No Messages Were Found

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

cli_sti_bug.tgz    application/x-gzip    40618    Mike Sinkovsky

Attachments

Outcomes