Re: [RFA][2/5] New port: Cell BE SPU (valops.c fix)

Jim Blandy
2006-11-27T19:31:20Z

"Ulrich Weigand" <uweigand@de.ibm.com> writes:
> We might be able to fix this particular problem by having
> value_from_register somehow set the value_offset to 3 when
> retrieving a value of type "char" from a register. However,
> even though there is a comment saying "The assumption is that
> REGISTER_TO_VALUE populates the entire value including the
> location.", that isn't actually possible with the current
> interface since REGISTER_TO_VALUE doesn't actually *get*
> the value itself.

It seems to me this is the problem to fix. When value_from_register
retrieves a char from an SPU register, and that char is occupying byte
three of the register, then if that value doesn't have its
value_offset set, that seems wrong. You're using CONVERTIBLE_P and
VALUE_TO_REGISTER / REGISTER_TO_VALUE to make up for that loss of
information; why not actually provide it?

I'd prefer that to adding a new field to struct value.