> On Thu, Jan 29, 2009 at 3:35 PM, Larry Valkama
> <remlali@...> wrote:
>> Static symbol-value offset is larger than can be handled by parisc
>> instruction addi (limit of 11bits signed immediate).
>> Following patch detects offset and takes proper route.
>> + (cond
>> + ; if offset is (signed-byte 11)
>> + ((<= (- (ash 1 11)) offset (1- (ash 1 11)))
>> + (inst addi offset null-tn ,reg))
>> + (t ; offset is beyond (signed-byte 11) ..
>> + (inst ldil offset ,reg)
>> + (inst ldo offset null-tn ,reg :unsigned t))))))
> Just saying (typep offset '(signed-byte 11)) is clearer, shorter,
> slightly more efficient, and avoids the need for the comments. :)
Thanks, it's much clearer. I've attached a new patch that does that on a
few other locations as well.
The patch has been compiled and tested under the hppa target.
* hppa: nicer checking of immediate operands
* hppa: check if too large static-symbol-offset operand
thanks & regards,