From: Andreas Bürgel <ab@genologic.de>
To: ecos-discuss@sourceware.cygnus.com
Subject: [ECOS] ARM Assembler problem
Date: Tue, 28 Nov 2000 06:53:00 -0000 [thread overview]
Message-ID: <3A23C448.1EEC787D@genologic.de> (raw)
Hi,
I've got following problem with GNU arm-elf-as (Host: i686-linux,
Target: ARM7TDMI):
Consider the following piece of code (simple delay loop):
ldr r2, .WAIT
loop:
sub r2, r2, #1
cmp r2, #0
bne loop
...
.WAIT:
.word 0x1000000
After assembling with "arm-elf-as -marm7tdmi file.S"
I had a closer look to a.out with "arm-elf-objdump -d a.out" and found
...
2c: e59f2038 ldr r2, [pc, #38] ; 6c <.WAIT>
00000030 <loop>:
30: e2422001 sub r2, r2, #1 ; 0x1
34: e3520000 cmp r2, #0 ; 0x0
38: 1afffffe bne 38 <loop+0x8>
...
As you can see the assembler computed a wrong target address (opcode
1afffffe at address 38). The offset should be -2 resulting in an opcode
of 1afffffc. If I use a hex-editor to change the opcode in the binary
image, the program works as expected.
Is there a special option I forgot or is the assembler buggy (resp.
built wrong). Thanks in advance.
next reply other threads:[~2000-11-28 6:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-11-28 6:53 Andreas Bürgel [this message]
2000-11-28 8:36 ` Jonathan Larmour
2000-11-28 8:46 ` Jonathan Larmour
2000-11-28 8:42 ` Grant Edwards
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3A23C448.1EEC787D@genologic.de \
--to=ab@genologic.de \
--cc=ecos-discuss@sourceware.cygnus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).