[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Networking defect for ARM’bsp in tcp_input().
- Date: Tue, 04 Jul 2006 11:16:42 +0200
- From: ralf.corsepius at rtems.org (Ralf Corsepius)
- Subject: Networking defect for ARM’bsp in tcp_input().
On Tue, 2006-07-04 at 00:13 +0800, ray wrote:
> Hi:
> Seems we get the unused data instead of th_off.
If what you say is true, it should be reproducible with the code samples
below. I don't "speak arm-asm", so I can't judge.
Compile the code snippets with:
arm-rtems4.7-gcc -o bla1.o --save-temps -c bla1.c
arm-rtems4.7-gcc -o bla2.o --save-temps -c bla2.c
and then diff the *.s:
# diff -u bla1.s bla2.s
@@ -12,8 +12,8 @@
sub sp, sp, #4
str r0, [fp, #-16]
ldr r3, [fp, #-16]
- ldrb r3, [r3, #0]
- and r3, r3, #15
+ ldrb r3, [r3, #0] @ zero_extendqisi2
+ mov r3, r3, lsr #4
and r3, r3, #255
mov r0, r3
ldmfd sp, {r3, fp, sp, pc}
Is this code correct? Are the bitfields accessed correctly?
Ralf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bla1.c
Type: text/x-csrc
Size: 110 bytes
Desc: not available
Url : http://rtems.rtems.org/pipermail/rtems-users/attachments/20060704/75a9550a/attachment.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bla2.c
Type: text/x-csrc
Size: 110 bytes
Desc: not available
Url : http://rtems.rtems.org/pipermail/rtems-users/attachments/20060704/75a9550a/attachment-0001.bin