subreg question

2008-03-25 Thread Jan Hoogerbrugge
Hi, My target architecture has 32 bit registers and uses register pairs for 64 bit values. What makes it special is that whenever a register pair is written by a 64 bit operation, the individual registers should not be read by 32 bit operations. The reverse is also true: whenever a register pair i

Unaligned attribute

2008-03-20 Thread Jan Hoogerbrugge
Hi, I am looking for a way to specify that data is not aligned and that therefore word accesses should be expanded into byte accesses. For example: void f(__unaligned int *a) { *a = 0; } Expands into 4 byte stores. Any suggestions on how to implement this? Regards, Jan

Is vec_init allowed to FAIL?

2008-03-20 Thread Jan Hoogerbrugge
Hi, I am trying to define vec_init. I can only do splats on register values. So operands[1] of vec_init should be registers and those registers should be the same. Here is some code: (define_expand "vec_init" [(match_operand:VEC_MODE32 0 "register_operand" "") (match_operand 1 "

40 bit integer type

2006-03-17 Thread Jan Hoogerbrugge
Hi, I want to introduce a __int40 data type in my port for 40 bits integers. I do: type = make_signed_type(40); lang_hooks.types.register_builtin_type(type, "__int40"); The result is that __int40 variables are mapped on DImode with all kinds of shifts and ands to obtain a 40 bits data type.

Pragma callback to insert text in input buffer?

2005-11-18 Thread Jan Hoogerbrugge
Hi, I need to handle certain pragmas such that something special is generated in the assembly output roughly at the place that corresponds to the place of the pragma in the source code. Doing this in gcc in a clean way is not possible I guess, so I have to apply a hack. The hack that I want to