Am 04.10.2011 14:44, schrieb Peter Maydell:
On 4 October 2011 13:23, Alexander Graf <ag...@suse.de> wrote:
The problem is that tcg.c defines the functions with int arguments
for TCG
register indexes, while s390/tcg-target.c takes TCGReg parameters.
I'm not
sure which way is better, but using TCGReg feels more type safe to me.
You're not consistent, though; for example the s390
tcg_target_reg_alloc_order
array is declared as int[], not TCGReg[].
-- PMM
I did not notice that s390 was different when I wrote my patch,
but I agree with Alex that TCGReg is more type safe. I also
think that using TCGReg documents the meaning of a parameter
better than using a simple int.
So there are two tasks to be done:
- Look for inconsistencies and fix them.
- Add and use TCGReg for all other targets, too.
Or are there any reasons why we should keep the int type parameters?
Regards,
Stefan Weil