[PATCH] PR target/66232: -fPIC -fno-plt -mx32 fails to generate indirect branch via GOT

Richard Henderson rth@redhat.com
Thu May 21 19:13:00 GMT 2015


On 05/21/2015 05:59 AM, H.J. Lu wrote:
> +(define_predicate "x32_sibcall_memory_operand"
> +  (and (match_operand 0 "memory_operand")
> +       (match_test "CONSTANT_P (XEXP (op, 0))")
> +       (match_test "GET_CODE (XEXP (XEXP (op, 0), 0)) == UNSPEC")
> +       (match_test "XINT (XEXP (XEXP (op, 0), 0), 1) == UNSPEC_GOTPCREL")))

CONSTANT_P doesn't do what you think it does.  That accepts all constants, not
the CONST rtx code, which is the only thing you want to be looking into its XEXP.


r~



More information about the Gcc-patches mailing list