[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[f-cpu] Conditionnal Load and Store



Why didn't we have conditionnal load and store. I mean somtehing like storez,
storenz, loadz, loadnz, ... It can be really usefull and we can do with that
all what we can do with predicate I think.

For example if you have :
	if (r1 == 0)
		*r2 = r3

You currently must do a jump or a load and a conditionnal move after. Something
like that :
	load [r2], r4
	movez r1, r3, r5
	movenz r1, r4, r5
	store [r2], r5
will be :
	storez r1, [r2], r3

With conditionnal load you can really reduce the memory bandwith usage without
using jump. Sample :
	if (r1 == 0)
		r2 = *r3
	else
		r2 = *r4
You have somtehing like :
	load [r3], r5
	load [r4], r6
	movez r1, r5, r2
	movenz r1, r6, r2
Will be :
	loadz r1, [r3], r2
	loadnz r1, [r4], r2

It will really help the compiler I think to produce efficient code without
stupid jump, but it will cost 8 OP codes for load and 8 more OP codes for store. 

Cedric


*************************************************************
To unsubscribe, send an e-mail to majordomo@seul.org with
unsubscribe f-cpu       in the body. http://f-cpu.seul.org/