2015-02-05 Jeff Law <law@redhat.com>
+ PR target/17306
+ * config/h8300/constraints.md (U): Correctly dectect
+ "eightbit_data" memory addresses.
+ * config/h8300/h8300.c (eightbit_constant_address_p): Also
+ handle (const (plus (symbol_ref (x)))) where x is declared
+ as an 8-bit data memory address.
+ * config/h8300/h8300.md (call, call_value): Correctly detect
+ "funcvec" functions.
+
PR target/43264
* config/h8300/h8300.c (get_shift_alg): Fix ASHIFTRT by
24 to 28 bits for the H8/300.
(match_code "symbol_ref" "000")
(match_code "const_int" "001")
(ior (match_test "TARGET_H8300S")
- (match_test "SYMBOL_REF_FLAG (XEXP (XEXP (XEXP (op, 0), 0), 0))")))
+ (match_test "(SYMBOL_REF_FLAGS (XEXP (XEXP (XEXP (op, 0), 0), 0)) & SYMBOL_FLAG_EIGHTBIT_DATA) != 0")))
(and (match_code "mem")
(match_test "h8300_eightbit_constant_address_p (XEXP (op, 0))"))
(and (match_code "mem")
if (GET_CODE (x) == SYMBOL_REF)
return (SYMBOL_REF_FLAGS (x) & SYMBOL_FLAG_EIGHTBIT_DATA) != 0;
+ if (GET_CODE (x) == CONST
+ && GET_CODE (XEXP (x, 0)) == PLUS
+ && GET_CODE (XEXP (XEXP (x, 0), 0)) == SYMBOL_REF
+ && (SYMBOL_REF_FLAGS (XEXP (XEXP (x, 0), 0)) & SYMBOL_FLAG_EIGHTBIT_DATA) != 0)
+ return 1;
+
if (GET_CODE (x) != CONST_INT)
return 0;
""
{
if (GET_CODE (XEXP (operands[0], 0)) == SYMBOL_REF
- && SYMBOL_REF_FLAG (XEXP (operands[0], 0)))
+ && (SYMBOL_REF_FLAGS (XEXP (operands[0], 0)) & SYMBOL_FLAG_FUNCVEC_FUNCTION))
return "jsr\\t@%0:8";
else
return "jsr\\t%0";
""
{
if (GET_CODE (XEXP (operands[1], 0)) == SYMBOL_REF
- && SYMBOL_REF_FLAG (XEXP (operands[1], 0)))
+ && (SYMBOL_REF_FLAGS (XEXP (operands[1], 0)) & SYMBOL_FLAG_FUNCVEC_FUNCTION))
return "jsr\\t@%1:8";
else
return "jsr\\t%1";
+2015-02-05 Jeff Law <law@redhat.com>
+
+ PR target/17306
+ * gcc.target/h8300/pr17306-1.c: New test.
+ * gcc.target/h8300/pr17306-2.c: New test.
+
2015-02-05 Tobias Burnus <burnus@net-b.de>
PR fortran/64943
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-mh" } */
+/* { dg-final { scan-assembler-times "@@" 1 } } */
+
+
+void foo (void) __attribute__ ((function_vector));
+__attribute__((noinline)) void foo (void)
+{
+}
+
+void bar (void)
+{
+ foo();
+}
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-mh -O2 -w" } */
+/* { dg-final { scan-assembler-times ":8" 2 } } */
+
+
+struct x {
+ char x;
+ char y;
+};
+
+struct x __attribute__ ((eightbit_data)) foo;
+
+int bar ()
+{
+ if ((foo.y & 0x80) != 0)
+ oof ();
+}
+
+int com ()
+{
+ if ((foo.x & 0x80) != 0)
+ oof ();
+}