On Wed, Apr 30, 2014 at 11:21:14AM -0400, Lennart Sorensen wrote: > On Wed, Apr 30, 2014 at 07:53:30AM -0400, Lennart Sorensen wrote: > > On Tue, Apr 29, 2014 at 04:47:26PM -0400, Lennart Sorensen wrote: > > > It looks to me as if the problem might be here: > > > > > > sub rWORD1, r0101, rTMP2 > > > > No that's not it. Still haven't figured it out. > > Does this actually fail with input like this: > > strcmp("", "bb") > > As far as i can tell that would return 0. > > I am seeing this (with my C version of the assembly code since I have > no sparc to run it on): > > rWORD1: 0000000000000000 rWORD2: 6100000000000000 > aligned_loop_entry > aligned_loop > rTMP2: 00fefefefefefeff rSTRXOR: 6100000000000000 rTMP1: 8080808080808080 > common_endstring > rTMP2: 0000000000000000 o1: 8080808080808081 > rTMP2: 7f7f7f7f7f7f7f7f > rTMP1: 8080808080808080 > rTMP1: ff01010101010101 > Result: strcmptest("", "a") = 0 > > rWORD1: 6100000000000000 rWORD2: 0000000000000000 > aligned_loop_entry > aligned_loop > rTMP2: 61fefefefefefeff rSTRXOR: 6100000000000000 rTMP1: 8080808080808080 > common_endstring > rTMP2: 6100000000000000 o1: 8080808080808081 > rTMP2: e07f7f7f7f7f7f7f > rTMP1: 0080808080808080 > rTMP1: 0001010101010101 > Result: strcmptest("a", "") = 1 > > Clearly ending up with ff in the mask that was supposed to contain 00 > and 01 only is a problem.
OK, and I screwed up again. Must make sure to use unsigned long when doing bit shift operations. -- Len Sorensen -- To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20140430154203.gb17...@csclub.uwaterloo.ca