comparison gcc/rtlhooks.c @ 132:d34655255c78

update gcc-8.2
author mir3636
date Thu, 25 Oct 2018 10:21:07 +0900
parents 84e7813d76e9
children 1830386684a0
comparison
equal deleted inserted replaced
130:e108057fa461 132:d34655255c78
1 /* Generic hooks for the RTL middle-end. 1 /* Generic hooks for the RTL middle-end.
2 Copyright (C) 2004-2017 Free Software Foundation, Inc. 2 Copyright (C) 2004-2018 Free Software Foundation, Inc.
3 3
4 This file is part of GCC. 4 This file is part of GCC.
5 5
6 GCC is free software; you can redistribute it and/or modify it under 6 GCC is free software; you can redistribute it and/or modify it under
7 the terms of the GNU General Public License as published by the Free 7 the terms of the GNU General Public License as published by the Free
68 && GET_MODE_SIZE (xmode) <= UNITS_PER_WORD 68 && GET_MODE_SIZE (xmode) <= UNITS_PER_WORD
69 && TRULY_NOOP_TRUNCATION_MODES_P (mode, xmode) 69 && TRULY_NOOP_TRUNCATION_MODES_P (mode, xmode)
70 && !reload_completed) 70 && !reload_completed)
71 return gen_lowpart_general (mode, force_reg (xmode, x)); 71 return gen_lowpart_general (mode, force_reg (xmode, x));
72 72
73 HOST_WIDE_INT offset = byte_lowpart_offset (mode, GET_MODE (x)); 73 poly_int64 offset = byte_lowpart_offset (mode, GET_MODE (x));
74 return adjust_address (x, mode, offset); 74 return adjust_address (x, mode, offset);
75 } 75 }
76 } 76 }
77 77
78 rtx 78 rtx
113 if (result) 113 if (result)
114 return result; 114 return result;
115 else if (MEM_P (x)) 115 else if (MEM_P (x))
116 { 116 {
117 /* This is the only other case we handle. */ 117 /* This is the only other case we handle. */
118 HOST_WIDE_INT offset = byte_lowpart_offset (mode, GET_MODE (x)); 118 poly_int64 offset = byte_lowpart_offset (mode, GET_MODE (x));
119 rtx new_rtx = adjust_address_nv (x, mode, offset); 119 rtx new_rtx = adjust_address_nv (x, mode, offset);
120 if (! memory_address_addr_space_p (mode, XEXP (new_rtx, 0), 120 if (! memory_address_addr_space_p (mode, XEXP (new_rtx, 0),
121 MEM_ADDR_SPACE (x))) 121 MEM_ADDR_SPACE (x)))
122 return 0; 122 return 0;
123 123
124 return new_rtx; 124 return new_rtx;
125 } 125 }
126 else if (mode != GET_MODE (x) && GET_MODE (x) != VOIDmode 126 else if (mode != GET_MODE (x) && GET_MODE (x) != VOIDmode && !SUBREG_P (x)
127 && validate_subreg (mode, GET_MODE (x), x, 127 && validate_subreg (mode, GET_MODE (x), x,
128 subreg_lowpart_offset (mode, GET_MODE (x)))) 128 subreg_lowpart_offset (mode, GET_MODE (x))))
129 return gen_lowpart_SUBREG (mode, x); 129 return gen_lowpart_SUBREG (mode, x);
130 else 130 else
131 return 0; 131 return 0;
132 } 132 }
133 133