Networking defect for ARM’bsp in tcp_input().

Ralf Corsepius ralf.corsepius at rtems.org
Tue Jul 4 09:16:42 UTC 2006


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://lists.rtems.org/pipermail/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://lists.rtems.org/pipermail/users/attachments/20060704/75a9550a/attachment-0001.bin>


More information about the users mailing list