This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[PATCH] adr & adrl instructions for arm-wince-pe target
- From: Dmitry Semyonov <Dmitry dot Semyonov at oktet dot ru>
- To: <binutils at sources dot redhat dot com>
- Cc: Nick Clifton <nickc at redhat dot com>, <Richard dot Earnshaw at arm dot com>
- Date: Wed, 10 Dec 2003 14:50:09 +0300 (MSK)
- Subject: [PATCH] adr & adrl instructions for arm-wince-pe target
- Reply-to: <Dmitry dot Semyonov at oktet dot ru>
Hello.
Please, review the patch below. I've ecountered the problem with 'adr'
instruction while trying to compile the following function, but belive
'adrl' one should be fixed in similar way.
void foo(void)
{
unsigned long long n = 0x1122334455667788LL;
}
Note that grepping "X_add_number.*8" gives similar places in tc-arm.c
file not protected by TE_WINCE macro. Can somebody confirm the code is
correct, or these places need to be also fixed?
2003-12-10 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
* tc-arm.c (do_adr): Do not adjust pc by -8 if TE_WINCE is defined.
(do_adrl): likewise.
diff -rNc3pad binutils-031118/gas/config/tc-arm.c /home/sdv/cross/src/binutils-031118/gas/config/tc-arm.c
*** binutils-031118/gas/config/tc-arm.c Tue Nov 18 22:06:42 2003
--- /home/sdv/cross/src/binutils-031118/gas/config/tc-arm.c Wed Dec 10 14:37:39 2003
*************** do_adr (str)
*** 6168,6174 ****
--- 6168,6176 ----
/* Frag hacking will turn this into a sub instruction if the offset turns
out to be negative. */
inst.reloc.type = BFD_RELOC_ARM_IMMEDIATE;
+ #ifndef TE_WINCE
inst.reloc.exp.X_add_number -= 8; /* PC relative adjust. */
+ #endif
inst.reloc.pc_rel = 1;
end_of_line (str);
*************** do_adrl (str)
*** 6199,6205 ****
--- 6201,6209 ----
/* Frag hacking will turn this into a sub instruction if the offset turns
out to be negative. */
inst.reloc.type = BFD_RELOC_ARM_ADRL_IMMEDIATE;
+ #ifndef TE_WINCE
inst.reloc.exp.X_add_number -= 8; /* PC relative adjust */
+ #endif
inst.reloc.pc_rel = 1;
inst.size = INSN_SIZE * 2;
...Bye..Dmitry.