multiplies by powers of two

Matthew Fluet mfluet@intertrust.com
Fri, 13 Jul 2001 14:34:50 -0700 (PDT)


> > I did notice that there is a lot of funny arrangement of code which makes
> > the number of false positives not so surprising.
>
> Could y'all send a couple of examples of this?  I'd like to take a look.

After looking at a couple of the false positives, I guess it's a
reasonable case:

>From src/regression/int.sml:

machine IL:

RP(0) = Allocate[(0 <- RC(0), 4 <- SP(40))]
RI(3) = MLton_eq [SI(36), 0]
Switch (RI(3), [(1, L_524), (0, L_523)], None)

assembly:

	movl $0x80008001,(%esi)
	leal (4*1)(%esi),%esp
	movb %dh,(4*1)(%esi)
	movl (40*1)(%edi),%ebp
	movl %ebp,(8*1)(%esi)
	addl $12,%esi
	movl (36*1)(%edi),%ebp
	testl %ebp,%ebp
	jz L_1546

So, that's perfectly reasonable: the test is on some stack slot; it
happens to come after an allocation which ends with an add to frontier
(which would have set the zero flag).

Similar case in vector.sml.