Am I missing something here? Consider the following C statement:
unsigned long long maxBit = 0x1 << (arraySize-3);
When arraySize is 66, maxBit is ending up as zero (instead of what I would
expect, X'8000000000000000'. Am I missing something?
Here is the LIST output. (No optimization.)
* unsigned long long maxBit = 0x1 << (arraySize-3);
EX r0,HOOK..STMT
L r1,arraySize(,r13,240)
AHI r1,H'-3'
LA r2,1
LR r0,r2
SLL r0,0(r1)
LR r1,r0
SRA r1,31
ST r1,maxBit(,r13,248)
ST r0,maxBit(,r13,252)
Won't SLL R0,0(R1) yield a zero for any shift values greater than 31?
Or am I confused?
Charles
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN