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

Re: [f-cpu] registers



> [You]
> Nowadays we too often think about 64 bits register length. so 64 ==
> the biggest int number. But in fact, the most interresting vector size is
> 256 bits.
 
> As you can see, using a register of 256 for storing an integer of 64
> bits is a big waste ! Look at our programmation api. We always have 3
> or 4 pointers in the register set, so 3/4 of the register will never be
> used 95% of the time, what a waist, don't you think ?

> {I}
> Okay, single integer can be only in 64-bit even if physically they are
> 256 bit. So you prefer to split and use a different register-bank instead.
> The trouble if we consider using vector integer registers are much more
> underused than single integer registers, well we still waste memory
> indeed for 95% of the time wherever the 3/4 of 256-bit for registers are
> physically
> located :).

And perhaps more, because you always need to save all your register, so
you have 256*63 + 64*63 = 20160 (2520 o => 2,5 Ko) instead of 
256*63 = 16128 (2016 o => 1,9 Ko). So you loose more place and you increase
needed move when you work with SIMD.

> Sparc V8 arch use 32 windows register (>100 registers but only 32 seeing
> in a given time). When you add the fpu you receive 32 registers
> dedicated to the fpu (the 32 fpu regiter are 32 bit but you could access
> it by to for 64 bit double).

> i have ask to our expert why adding new register set and not use the
> integer register bank. I had in mind the f-cpu approach.

> This answer was quite simple : "to use more register" !

I think it's not the real reason. Because when you have 64 registers for
int and float you can produce better code with less data in memory than with
32 registers for int and 32 registers for float. In a normal application
you don't use a lot of float (and SIMD), so you can't use them for int (or 
scalar). In fact by dividing the registers bank, you waste capacity from
my point of view.

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