[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[f-cpu] Conditionnal Load and Store
- To: f-cpu@seul.org
- Subject: [f-cpu] Conditionnal Load and Store
- From: Cedric BAIL <cedric.bail@free.fr>
- Date: Fri, 26 Jul 2002 15:18:15 +0200 (MEST)
- Delivered-To: archiver@seul.org
- Delivered-To: f-cpu-outgoing@seul.org
- Delivered-To: f-cpu@seul.org
- Delivery-Date: Fri, 26 Jul 2002 09:18:17 -0400
- Reply-To: f-cpu@seul.org
- Sender: owner-f-cpu@seul.org
- User-Agent: IMP/PHP IMAP webmail program 2.2.6
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/