Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inline ARMv7 assembler #13298

Closed
llvmbot opened this issue May 23, 2012 · 2 comments
Closed

Inline ARMv7 assembler #13298

llvmbot opened this issue May 23, 2012 · 2 comments
Labels
bugzilla Issues migrated from bugzilla clang Clang issues not falling into any other category

Comments

@llvmbot
Copy link
Collaborator

llvmbot commented May 23, 2012

Bugzilla Link 12926
Resolution FIXED
Resolved on Dec 09, 2015 11:01
Version trunk
OS MacOS X
Blocks llvm/llvm-bugzilla-archive#18926
Reporter LLVM Bugzilla Contributor
CC @asl,@rengolin

Extended Description

The armv7 architecture should be able to deal with the armv6t2 instruction set for moving 16 bit values.

// current clang inline assembler bug for: /usr/local/bin/clang -march=armv7 -ccc-host-triple arm-apple-darwin11 -c test.c
#ifdef arm
int test(void) {
int val;
asm (
//"mov %[r0], #​0xff \n\t" // old ARM way for 1023 constant (works)
//"orr %[r0], %[r0], #​0x300 \n\t"
"movw %[r0], #​1023 \n\t" // new ARMv6T2 way for 16 bit wide constants
"movt %[r0], #​0 \n\t"
: [r0] "=r" (val)
);
return val;
}
#endif

Currently this results in an error:
test.c:8:7: error: instruction requires: armv6t2
"movw %[r0], #​1023 \n\t" // new ARMv6T2 way for 16 bit wide constants
^
:1:2: note: instantiated into assembly here
movw r0, #​1023

@rengolin
Copy link
Member

rengolin commented Dec 9, 2015

Both modes working now.

@rengolin
Copy link
Member

mentioned in issue llvm/llvm-bugzilla-archive#18926

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 3, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla clang Clang issues not falling into any other category
Projects
None yet
Development

No branches or pull requests

2 participants