diff -Naurp gcc/config/avr/avr.h gcc/config/avr/avr.h --- gcc/config/avr/avr.h 2011-06-22 10:28:47.000000000 +0530 +++ gcc/config/avr/avr.h 2011-06-22 10:35:08.000000000 +0530 @@ -136,7 +136,7 @@ extern GTY(()) section *progmem_section; #define AVR_2_BYTE_PC (!AVR_HAVE_EIJMP_EICALL) #define AVR_3_BYTE_PC (AVR_HAVE_EIJMP_EICALL) -#define AVR_IO_OFFSET (AVR_XMEGA ? 0 : 0x20) +#define AVR_IO_OFFSET ((AVR_XMEGA || AVR_TINY) ? 0 : 0x20) #define AVR_RAMPD_ADDR (AVR_XMEGA ? 0x38 : 0) #define AVR_RAMPX_ADDR (AVR_XMEGA ? 0x39 : 0) #define AVR_RAMPY_ADDR (AVR_XMEGA ? 0x3A : 0) diff -Naurp gcc/config/avr/predicates.md gcc/config/avr/predicates.md --- gcc/config/avr/predicates.md 2011-06-22 10:25:29.000000000 +0530 +++ gcc/config/avr/predicates.md 2011-06-22 10:35:08.000000000 +0530 @@ -50,21 +50,24 @@ ;; Return true if OP is a valid address for lower half of I/O space. (define_predicate "low_io_address_operand" (and (match_code "const_int") - (if_then_else (match_test "AVR_XMEGA") + (if_then_else (ior (match_test "AVR_XMEGA") + (match_test "AVR_TINY")) (match_test "IN_RANGE((INTVAL (op)), 0x00, 0x1F)") (match_test "IN_RANGE((INTVAL (op)), 0x20, 0x3F)")))) ;; Return true if OP is a valid address for high half of I/O space. (define_predicate "high_io_address_operand" (and (match_code "const_int") - (if_then_else (match_test "AVR_XMEGA") + (if_then_else (ior (match_test "AVR_XMEGA") + (match_test "AVR_TINY")) (match_test "IN_RANGE((INTVAL (op)), 0x20, 0x3F)") (match_test "IN_RANGE((INTVAL (op)), 0x40, 0x5F)")))) ;; Return true if OP is a valid address of I/O space. (define_predicate "io_address_operand" (and (match_code "const_int") - (if_then_else (match_test "AVR_XMEGA") + (if_then_else (ior (match_test "AVR_XMEGA") + (match_test "AVR_TINY")) (match_test "IN_RANGE((INTVAL (op)), 0x0, (0x40 - GET_MODE_SIZE(mode)))") (match_test "IN_RANGE((INTVAL (op)), 0x20, (0x60 - GET_MODE_SIZE(mode)))"))))