mode dependent constants in gcc

Soubhik Bhattacharya
Sat Feb 10 05:28:00 GMT 2001

u can force this using addl constraints (CONST_OK_FOR_LETTER_P)......
see for example.


 I am working for gcc z80 port.
 In z80 the valid constants range depends on the
 instruction that involves the constants.
  If it is an 8 bit operation, the valid range is
       -128 to 127 and it differs in the
 16 bit operations.
  But in gcc I am not able to figure out how to
 handle this. The macro LEGITIMATE_CONSTANT
 checks for the valid constant range.
 But actually if I say
   some mode dependent check, it does n't work.
 May be because constants can pass any mode.
  Could you please tell me how to handle this.
 If I am assuming something wrong please let me know. thanks and regards

More information about the Gcc-help mailing list