Function return value register

Waldek Hebisch hebisch at math.uni.wroc.pl
Tue Jun 10 00:03:53 CEST 2014


Rajat Singh wrote:
> 
> Is there a way to change the function return value coming in register d0 to
> come in reigster d7 ?
> 
> I tried adding d7 in call_used_registers and updating
> macro's FUNCTION_VALUE and FUNCTION_VALUE_REGNO_P but it didnt work.
> 
> I tried modifying hard_function_value function in explow.c but compilation
> failed at reload pass.
> 
> I am trying to update the backend code for m68k.Any help is appreciated.
> 

You should ask gcc folks about this.  gpc just builds
representation of Pascal program and passes it to gcc middle-end.
gpc does not deal directly with specific backends.  Note that
gpc calling convention is supposed to match C.  In other
words, you should first get your change working for a trivial
C program and only after it works for C start looking at
Pascal.  Normally, once it works for C is will automatically
start working for Pascal too.

-- 
                              Waldek Hebisch
hebisch at math.uni.wroc.pl 



More information about the Gpc mailing list