Displaying 20 results from an estimated 3000 matches similar to: "[LLVMdev] ARM assembler's syntax in clang"
2013 Feb 13
0
[LLVMdev] ARM assembler's syntax in clang
I don't think there is such a document...
There isn't a 1:1 compatibility assurance with any syntax, including the
UAL and GAS, but there is good compatibility with most of them, focusing
more on GAS than any other, though recent changes are making it more in
sync with the UAL (as is happening on GAS, too).
I think the recommendation is to try it on, throw code that works on other
(OSS)
2013 Feb 14
2
[LLVMdev] ARM assembler's syntax in clang
Thanks, Renato.
I'm actually porting a project which is based on GAS to iOS platform. I'll report my result.
Best regards!
ashi
On Feb 13, 2013, at 6:20 PM, Renato Golin <renato.golin at linaro.org> wrote:
> I don't think there is such a document...
>
> There isn't a 1:1 compatibility assurance with any syntax, including the UAL and GAS, but there is good
2013 Mar 06
3
[LLVMdev] ARM assembler's syntax in clang
Hi Ashi,
Your first LDR is a pseudoinstruction that is supported by some tools (gas and armasm, at least), but not by LLVM. Roughly speaking, it turns into a PC-relative load from a literal pool.
To do what you're trying to achieve you can write your own literal pool in your assembly. You can see some examples of this sort of thing at
2013 Mar 07
0
[LLVMdev] ARM assembler's syntax in clang
Hi, Bernie, Thanks for your reply!
However, I still have problem by following edk2's code, my test code is
attached, what I want to do is build it as a dynamic lib. But I get error
from ld:
ld: illegal text-relocation to _data_table in table.o from foo in
use_table.o for architecture armv7
Do you have any suggestion to solve this? Thanks!
//==begin table.c==
int data_table[] = {0xff, 0xff};
2013 Mar 04
2
[LLVMdev] ARM assembler's syntax in clang
Hi, all. Another problem in ARM assembly: I use LDR to load an external
symbol :
LDR R7,=DataTable
But clang gives error: unexpected token in operand to the '=',
Then I change the code to:
LDR R7,=DataTable
The error becomes: unsupported relocation on symbol. How can I get around
this in clang?
Thanks in advance!
On Mon, Feb 25, 2013 at 7:14 PM, Ashi <ashi08104 at
2013 Mar 05
0
[LLVMdev] ARM assembler's syntax in clang
Hi, all. The previous post have a typo:
problem in ARM assembly: I use LDR to load an external symbol :
LDR R7,=DataTable
But clang gives error: unexpected token in operand to the '=',
Then I change the code to:
LDR R7,DataTable
The error becomes: unsupported relocation on symbol. How can I get around
this in clang? My problem is actually how to load external symbol in
2013 Feb 19
0
[LLVMdev] ARM assembler's syntax in clang
Hi,all,
I find clang's integrated-as changes fast, My code which can't be compiled
by llvm3.1 tool-chain can be compiled by llvm3.2 tool-chain now. However,
there are still existing link-errors.
My develop environment is:
Apple LLVM version 4.2 (clang-425.0.24) (based on LLVM 3.2svn)
Target: x86_64-apple-darwin12.2.1
Thread model: posix
the code is attached, I get this error (there is no
2013 Feb 23
2
[LLVMdev] ARM assembler's syntax in clang
Hi, Jim,
Why "asm" name is a horrible hack? Do you have any suggestion for cross-platform support of my ARM assembly code?
Thanks!
ashi
On Feb 21, 2013, at 2:00 AM, Jim Grosbach <grosbach at apple.com> wrote:
> You were correct the first time. That post is talking about a Windows target. Ashi is working on iOS. Underscores are normal and expected. Using an "asm" name
2013 Feb 25
0
[LLVMdev] ARM assembler's syntax in clang
Hi,all,
I've some problem when using clang compile my ARM assembly code:
1 .qn directive
In GAS, .qn directive is used to create typed and/or indexed register
aliases for use in Advanced SIMD Extension (Neon) instructions.(
http://sourceware.org/binutils/docs/as/ARM-Directives.html#ARM-Directives)
But clang's integrated-as seems have different syntax, for example, my code:
input .qn
2013 Mar 08
0
[LLVMdev] ARM assembler's syntax in clang
> And be warned that the PC doesn't point at the next instruction when you
use it like this - I believe you don't need to modify it at all if you swap
the pop and the .long.
Bernie, is it related to ARM pipeline? I'm interesting in this, is there
any other additional information?
On Fri, Mar 8, 2013 at 4:59 AM, Tim Northover <t.p.northover at gmail.com>wrote:
> Hi Ashi,
2013 Mar 07
2
[LLVMdev] ARM assembler's syntax in clang
Hi Ashi,
> ld: illegal text-relocation to _data_table in table.o from foo in
> use_table.o for architecture armv7
It looks like you're using iOS. I'm not familiar with the exact
workings of that platform, but I think a similar message would occur
in ELF-land.
If iOS *is* comparable, your issue is that symbols in dynamically
loaded objects can't (usually) be referenced directly
2013 Feb 19
2
[LLVMdev] ARM assembler's syntax in clang
On Tue, Feb 19, 2013 at 06:53:19PM +0800, Ashi wrote:
> My develop environment is:
> Apple LLVM version 4.2 (clang-425.0.24) (based on LLVM 3.2svn)
>
> Undefined symbols for architecture armv7:
> "_add_gas", referenced from:
> _main in main_ios_clang.o
Apple requires a leading _ for all external symbols. So "works as
expected".
Joerg
2013 Feb 20
0
[LLVMdev] ARM assembler's syntax in clang
You were correct the first time. That post is talking about a Windows target. Ashi is working on iOS. Underscores are normal and expected. Using an "asm" name on the symbol is a horrible hack. Adding the underscore to the name in the .s file is the correct solution.
-Jim
On Feb 20, 2013, at 12:04 AM, Tyler Hardin <tghardin1 at catamount.wcu.edu> wrote:
> So it turns out that
2013 Jan 03
1
[LLVMdev] Does LLVM sign ARM ELFs?
Hi Tim, Renato,
Revisiting this one from about a month back, is anyone tracking what GAS
assembly compatibility issues remain? If we only need to compile C and
C++, things are looking very good, but when you throw handwritten assembly
into the mix, not so much. The goal is GAS compatibility, right? Not UAL?
Or is there a hope to make both work?
Thanks,
Greg
On Tue, Nov 20, 2012 at 11:49
2014 Feb 24
3
[LLVMdev] RFC: Adding __INTEGRATED_ASSEMLER__ macro
This seems to be a slightly contentious suggestion, so it seems fitting to
bring it up on cfe-dev.
Given that -fintegrated-as and -fno-integrated-as are available to the
user, and that the integrated assembler can be a bit stringent (as compared
to GAS at least, which, for example, supports deprecated syntax), it might
be nice to permit the user to detect that an integrated assembler is in use.
2010 Jun 28
2
[LLVMdev] build errors while cross compiling llvm-gcc for ARM
> But I wanted to say is using these binutils I have built a llvm compiler for
> our ARM target.
That's correct. Mostly because gcc is using pre-UAL ARM assembler syntax
and LLVM switched fully to UAL one. Also, UAL is needed for correct Thumb-2
support, etc. So, in short: gcc is generating some subset of ARM assembler
and thus gas is bug-free. LLVM generates somehow different subset and
2014 Feb 25
2
[LLVMdev] RFC: Adding __INTEGRATED_ASSEMLER__ macro
On Mon, Feb 24, 2014 at 7:29 PM, Saleem Abdulrasool
<compnerd at compnerd.org>wrote:
>
>
>> But I agree with others that "integrated assembler" isn't a feature which
>> should be observable in source code.
>>
>> On Sun, Feb 23, 2014 at 4:27 PM, Renato Golin <renato.golin at linaro.org>wrote:
>>
>>> On a higher level,
2013 Feb 20
3
[LLVMdev] ARM assembler's syntax in clang
So it turns out that I was wrong. It, in fact, is not standard. But
regardless, you can use asm to specify the exact name. Eg.
extern int func() asm("func");
You can read more here:
http://stackoverflow.com/questions/1034852/adding-leading-underscores-to-assembly-symbols-with-gcc-on-win32
Despite the title of the thread, the solution is compiler and system
independent.
--------------
2010 Jun 28
0
[LLVMdev] build errors while cross compiling llvm-gcc for ARM
Thanks, last doubt :)
But I wanted to say is using these binutils I have built a llvm compiler for
our ARM target.
Now our libraries which are either compiled with native ARM or with this
llvm compiler gives same performance numbers. However this only llvm
compiler if compared with x86 compiler gives huge performance gain.
Any idea why this might be happening ?
On Mon, Jun 28, 2010 at 1:57 PM,
2010 Jun 28
2
[LLVMdev] build errors while cross compiling llvm-gcc for ARM
> Sorry about that. As you can see, I'm using binutils (ld & as ) from arm
> toolchain we use to build things for our target.
>
> arm_a_b_c_ld -v gives 2.17.50.20070611
>
> arm_a_b_c_as -v gives 2.17.50.20070611
This is definitely not the latest binutils you've stated before. As
you might see - these are at least 3 years old and are known to be
heavily buggy on ARM.