Actually, with the new ISA, you get both. There are a bunch of ALU instructions with 16-bit immediate, one immediate load with a 22-bit immediate, and one immediate load with a 31-bit immediate. Overkill? There is more evolution left to do. We freed up a bit in the instruction word and didn't know what to do with it, so someone suggested a 31-bit bit immediate.
On Tue, Mar 26, 2013 at 6:43 PM, Chris Matrakidis <[email protected]>wrote: > > 31 bit constants are not useful for a GPU, where the most common use > > would be masking or adding with a 32 bit RGBA value. Nor would it be > > any use for doing crypto work where you want to do logic ops on all > > 32 bits. > > You probably missed the discussion on floating point constants last week. > > > I suggest sticking with 16 bit immediates which handles most loop > > or pointer increments, most PC-relative jumps, most struct offsets, > > etc. For 32 bit, load from memory. > > However, loading from memory is slow, and using 16 bits constants you > need three instructions to load a 32 bit constant (load, shift and > or), where with 31 bit constants you can load any constant in one or > two instructions. > > > Best Regards, > > Chris Matrakidis > > PS. I was wrong earlier: you can make 80000000h in two instructions > with the current instruction set: load 40000000h and add it to itself > or load 7fffffffh and invert it. > _______________________________________________ > Open-graphics mailing list > [email protected] > http://lists.duskglow.com/mailman/listinfo/open-graphics > List service provided by Duskglow Consulting, LLC (www.duskglow.com) > -- Timothy Normand Miller, PhD Assistant Professor of Computer Science, Binghamton University http://www.cs.binghamton.edu/~millerti/ Open Graphics Project
_______________________________________________ Open-graphics mailing list [email protected] http://lists.duskglow.com/mailman/listinfo/open-graphics List service provided by Duskglow Consulting, LLC (www.duskglow.com)
