Tests if r0 (the receiver) is nil, and if so, sets r1 selector to 0x0 and returns. I guess there's no nil handler on ARM. Simple function return values are in registers r0-r3, so I guess r1 is set to 0 in case the caller is expecting a long long.
This looks similar to the bit twiddling x86 cache lookup in the class; it's somewhat harder to read than the x86 due to ARM's bit packing shortcuts[1]:
God says...
C:\LoseThos\www.losethos.com\text\BIBLE.TXT
t
all clean.
13:12 So after he had washed their feet, and had taken his garments,
and was set down again, he said unto them, Know ye what I have done to
you? 13:13 Ye call me Master and Lord: and ye say well; for so I am.
13:14 If I then, your Lord and Master, have washed your feet; ye also
ought to wash one another's feet.
13:15 For I have given you an example, that ye should do as I have
done to you.
13:16 Verily, verily, I say unto you, The servant is not greater than
his lord; neithe
5 comments
[ 3.8 ms ] story [ 19.6 ms ] threadIf receiver is non-nil:
^ this loads the class pointer (isa) into r4This looks similar to the bit twiddling x86 cache lookup in the class; it's somewhat harder to read than the x86 due to ARM's bit packing shortcuts[1]:
Check if the method is NULL, and if so, jump to the cache miss at the end: This would appear to be the part checking if this is the cache entry we're looking for: If it isn't, loop: If it is, restore the registers and do an indirect jump into the method we found (I'm not sure what the teq r4,r4 is for): Tail call into the slow version with full lookup (after restoring the clobbered registers and the stack pointer): [1] A lazy excuse of course. I just haven't read or written anywhere near as much ARM assembly as x86.t all clean.
13:12 So after he had washed their feet, and had taken his garments, and was set down again, he said unto them, Know ye what I have done to you? 13:13 Ye call me Master and Lord: and ye say well; for so I am.
13:14 If I then, your Lord and Master, have washed your feet; ye also ought to wash one another's feet.
13:15 For I have given you an example, that ye should do as I have done to you.
13:16 Verily, verily, I say unto you, The servant is not greater than his lord; neithe