Displaying 20 results from an estimated 410 matches for "ldr".
Did you mean:
hdr
2013 Nov 01
8
[LLVMdev] Implementing the ldr pseudo instruction in ARM integrated assembler
In an earlier email[1] I proposed adding support for the ldr
pseud-instruction to the ARM integrated assembler. After some discussion the
overall consensus seemed to be that it was worth adding. One concern was
that we needed to have adequate testing. I promised to provide more details
on what the behavior should be and provide some tests before starting the...
2011 Nov 12
2
[LLVMdev] Thumb-2 code generation error in Apple LLVM at all optimization levels
...ing factor is meant to be held in
floating point register d8. I thought at first it might not be
initialized at all, but upon closer examination I think it may
actually be initialized from a program counter-relative 32-bit .long
constant immediately following my method's code.
.loc 1 388 3
ldr r0, [r5]
ldr r1, [r4, r0]
adds r1, #1
str r1, [r4, r0]
.loc 1 390 64
mov r0, r4
ldr r1, [r6]
blx _objc_msgSend
vmov s0, r0
vmul.f32 d0, d0, d8
vcvt.u32.f32 d0, d0
vmov r0, s0
Ltmp272:
.loc 1 392 9
cmp.w r0, #4000
Ltmp273:
.loc 1 393 13
it hs
blxhs _usleep
cmp.w *looks* like a 16-bi...
2013 Nov 11
0
[LLVMdev] Implementing the ldr pseudo instruction in ARM integrated assembler
I have attached an initial patch that implements the ldr pseudo. It still
needs some clean up and more tests, but I would like some feedback on the
approach I used and if there are any objections to implementing it this way.
Here is my approach:
Add a finishParse() callback to the target asm parser
This callback is invoked when the parse has finished...
2012 Feb 13
0
[PATCH 05/14] arm: implement exception and hypercall entries.
..., #CTXT_FRAME_SIZE
+SPFIX( tst sp, #4 )
+SPFIX( bicne sp, sp, #4 )
+ stmib sp, {r1 - lr}^
+ ldmia r0, {r1 - r4}
+ add r5, sp, #CTXT_SSP
+ add r0, sp, #CTXT_FRAME_SIZE
+SPFIX( addne r0, r0, #4 )
+ str r1, [sp]
+ mov r1, lr
+ stmia r5, {r0 - r4}
+ msr spsr_cxsf, r3
+.endm
+
+.macro RESTORE_CONTEXT
+ ldr r0, [sp, #CTXT_SPSR]
+ msr spsr_cxsf, r0
+ ldmia sp, {r0 - lr}^
+ add sp, sp, #CTXT_SSP
+ ldmia sp, {sp, lr, pc}^
+.endm
+
+ .align 5
+ .global exception_vector_table
+exception_vector_table:
+ ldr pc, .rst
+ ldr pc, .und
+ ldr pc, .swi
+ ldr pc, .pabt
+ ldr pc, .dabt
+ ldr pc, .adx
+ ldr pc, .irq...
2013 Nov 01
0
[LLVMdev] Implementing the ldr pseudo instruction in ARM integrated assembler
Hi David,
In these examples, I don’t see the directive that indicates where the assembler should place the constant pool?
-Jim
On Nov 1, 2013, at 11:16 AM, David Peixotto <dpeixott at codeaurora.org> wrote:
> In an earlier email[1] I proposed adding support for the ldr
> pseud-instruction to the ARM integrated assembler. After some discussion the
> overall consensus seemed to be that it was worth adding. One concern was
> that we needed to have adequate testing. I promised to provide more details
> on what the behavior should be and provide some tests...
2007 Sep 07
1
[LLVMdev] Call instruction
...08: 0x9b07468, LLVM BB @0x9ae9010, ID#8:
Live Ins: %r4 %r5 %r7
Predecessors according to CFG: 0x9b08398 (#71)
STR %r4<kill>, %sp, %NOREG, 0, 14, %NOREG
%r4 = MOVi 0, 14, %NOREG, %NOREG
%r0 = MOVr %r7<kill>, 14, %NOREG, %NOREG
%r1 = MOVr %r5<kill>, 14, %NOREG, %NOREG
%r2 = LDR <fi#1>, %NOREG, 0, 14, %NOREG
%r3 = MOVr %r4, 14, %NOREG, %NOREG
BL <ga:gimplify_cond_expr>, %r0<kill>, %r1<kill>, %r2<kill>, %r3<kill>,
%r0<imp-def>, %r1<imp-def,dead>, %r2<imp-def,dead>, %r3<imp-def,dead>,
%r12<imp-def,dead>, %...
2013 Oct 25
0
[LLVMdev] Add support for ldr pseudo instruction in ARM integrated assembler
On Fri, Oct 25, 2013 at 1:33 PM, David Peixotto <dpeixott at codeaurora.org>wrote:
> Both armasm and gnu as support an ldr pseudo instruction for loading
> constants that lowers to either a mov, movn, or a pc-relative ldr from the
> constant pool. It would be great if the llvm integrated assembler could
> support this feature as well.
>
> For example, using gnu as to compile this code:
> .text
>...
2020 Jun 01
3
Aarch64: unaligned access despite -mstrict-align
...)
{
return memcmp(g, c, 16);
}
$ clang --target=aarch64-linux-gnu -Os -mstrict-align -S test.c
$ cat test.s
.text
.file "test.c"
.globl f // -- Begin function f
.p2align 2
.type f, at function
f: // @f
// %bb.0:
adrp x8, g
ldr x10, [x8, :lo12:g]
ldr x9, [x0]
ldr x8, [x10]
rev x9, x9
rev x8, x8
cmp x8, x9
b.ne .LBB0_3
// %bb.1:
ldr x8, [x10, #8]
ldr x9, [x0, #8]
rev x8, x8
rev x9, x9
cmp x8, x9
b.ne .LBB0_3
// %bb.2:
mov w0, wzr
ret
.LBB0_3:
cmp x8, x9
mov w8, #-1
cneg w0, w8, hs
ret
.Lfunc_end0:
.size...
2013 Oct 25
5
[LLVMdev] Add support for ldr pseudo instruction in ARM integrated assembler
Both armasm and gnu as support an ldr pseudo instruction for loading
constants that lowers to either a mov, movn, or a pc-relative ldr from the
constant pool. It would be great if the llvm integrated assembler could
support this feature as well.
For example, using gnu as to compile this code:
.text
foo:
ldr r0, =0x1...
2012 Mar 26
1
[LLVMdev] Disassembly broken for thumb LDR
Hi all.
I'm investigating an issue with incorrect lldb's disassembly output. I have two bytes in question: 4e5f
lldb (via the llvm's LLVMARMCodeGen) is providing the following mnemonics:
ldr r6, #380,
However the value for ldr is "an 8-bit value that is multiplied by 4 and added to the value of the PC to form the memory address" (via ARMARM), so that the correct mnemonics is:
ldr r6, [pc, #380]
(provided by Apple's otool).
I've traced the issue down to ARMI...
2010 Sep 07
3
[LLVMdev] MachineMemOperand and dependence information
I have two questions regarding MachineMemOperands and dependence
information.
Q1) I noticed that MachineMemOperands are lost when two LDRs are combined
and a LDRD is generated in ARMPreAllocLoadStoreOpt:::RescheduleOps.
(before optimization)
%reg1033<def> = LDR %reg1030, %reg0, 4100, pred:14, pred:%reg0;
mem:LD4[%uglygep10]
%reg1054<def> = LDR %reg1030, %reg0, 4104, pred:14, pred:%reg0;
mem:LD4[%uglygep2021]
(after opti...
2007 Sep 24
0
[LLVMdev] RM Build
.../tmp/ccYAgFFY.s:36: Error: junk at end of line, first unrecognized character
is `@'
/tmp/ccYAgFFY.s:37: Error: junk at end of line, first unrecognized character
is `@'
/tmp/ccYAgFFY.s:38: Error: no such instruction: `stmfd sp!,{r4,r5,lr}'
/tmp/ccYAgFFY.s:39: Error: no such instruction: `ldr r5,.L14'
/tmp/ccYAgFFY.s:40: Error: no such instruction: `ldrb r3,[r5,'
/tmp/ccYAgFFY.s:41: Error: expecting operand after ','; got nothing
/tmp/ccYAgFFY.s:42: Error: no such instruction: `ldmnefd sp!,{r4,r5,pc}'
/tmp/ccYAgFFY.s:43: Error: no such instruction: `ldr r4,.L14+4'...
2011 Feb 09
3
[LLVMdev] Lowering "memcpy" intrinsic function on ARM using LDMIA/STMIA
Hi,
llvm emits code for "memcpy" on ARM as consecutive ldr/str commands, and
further combines them into ldm/stm with special pass after register
allocation. But ldm/stm commands require registers to go in ascending
order, what is often not so after regalloc, therefore some str/ldr
commands. For example such code:
struct Foo {int a, b, c, d; }
void Cop...
2009 Feb 05
2
Unexpected mfrow, layout behavior (pdf still has multiple pages)
...idn't want multiple
pages). Just before I sent this post, I was able to generate the
desired output with split.screen. Is this the expected behavior of
mfrow and layout?
Paul
--------------------------------
My code is as follows (ToruosityPlot and DiameterPlot are essentially
identical to LDRPlot).
layout(matrix(1:3, ncol=1))
#par(mfrow=c(3,1))
pdf("results.pdf", width=4, height=3, pointsize=4, colormodel="cmyk",
onefile=TRUE)
TortuosityPlot(left, right)
DiameterPlot(left, right)
LDRPlot(left, right)
dev.off()
LDRPlot <- function(left, right)
{
plot(lef...
2013 Nov 12
0
[LLVMdev] Implementing the ldr pseudo instruction in ARM integrated assembler
Hi Amara,
Thanks for your suggestions. I have made the changes you suggested and added
a new test to check that we print an error when parsing a non-ldr mnemonic
with an operand containing `=`. The updated patch is attached.
-- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted
by The Linux Foundation
> -----Original Message-----
> From: Amara Emerson [mailto:amara.emerson at arm.com]
> Sent: Tuesday, November 12...
2013 Nov 12
2
[LLVMdev] Implementing the ldr pseudo instruction in ARM integrated assembler
...) {return Entries[Num];}
These can be const.
+ int64_t ConstantPoolCounter;
This can be unsigned.
+ case AsmToken::Equal: {
+ const MCSection *Section =
getParser().getStreamer().getCurrentSection().first;
+ assert(Section);
We should probably check here that the mnemonic is actually 'ldr', e.g. see
the AsmToken::Identifier case.
+@ RUN: clang -target arm -integrated-as -c %s -o %t1 2> %t2; echo "ok"
+@ RUN: cat %t2 | FileCheck %s
Clang tests shouldn't be in the LLVM regression suite. Use llvm-mc instead
for assembling.
I'm not very familiar with the code...
2019 Mar 28
3
Why does LLVM keep some loads in the loops even after applying the O3 optimization?
Hello all,
I am looking at the assembly code of a loop body which is created by
applying O3 optimization. Here it is:
.LBB4_19: @ %for.body.91
@ =>This Inner Loop Header: Depth=1
ldr r0, [r5]
mov r1, r8
add r0, r0, r7
vldr s0, [r0]
mov r0, r6
vcvt.f64.f32 d0, s0
vmov r2, r3, d0
bl fprintf
cmp r0, #0
blt .LBB4_25
@ BB#20: @ %for.cond.89
@...
2010 Sep 07
0
[LLVMdev] MachineMemOperand and dependence information
On Sep 7, 2010, at 10:48 AM, Akira Hatanaka wrote:
> I have two questions regarding MachineMemOperands and dependence information.
>
> Q1) I noticed that MachineMemOperands are lost when two LDRs are combined and a LDRD is generated in ARMPreAllocLoadStoreOpt:::RescheduleOps.
>
> (before optimization)
> %reg1033<def> = LDR %reg1030, %reg0, 4100, pred:14, pred:%reg0; mem:LD4[%uglygep10]
> %reg1054<def> = LDR %reg1030, %reg0, 4104, pred:14, pred:%reg0; mem:LD4[%uglyg...
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...
2019 Mar 28
2
Why does LLVM keep some loads in the loops even after applying the O3 optimization?
Ryan Taylor via llvm-dev <llvm-dev at lists.llvm.org> writes:
> r0 gets overwritten inside the loop (assuming dst, src, src), is ldr
> r0, [r5] needed to initialize r0 for the loop at each iteration?
Register allocation should handle that if the load is hoisted.
I'm with the others. The printf is the most likely culprit.
-0David
> On Thu, Mar 28, 2019 at 10:17 AM Fami H via llvm-dev <llvm-...