comparison gcc/regs.h @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 84e7813d76e9
children
comparison
equal deleted inserted replaced
131:84e7813d76e9 145:1830386684a0
1 /* Define per-register tables for data flow info and register allocation. 1 /* Define per-register tables for data flow info and register allocation.
2 Copyright (C) 1987-2018 Free Software Foundation, Inc. 2 Copyright (C) 1987-2020 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
190 extern int caller_save_needed; 190 extern int caller_save_needed;
191 191
192 /* Select a register mode required for caller save of hard regno REGNO. */ 192 /* Select a register mode required for caller save of hard regno REGNO. */
193 #ifndef HARD_REGNO_CALLER_SAVE_MODE 193 #ifndef HARD_REGNO_CALLER_SAVE_MODE
194 #define HARD_REGNO_CALLER_SAVE_MODE(REGNO, NREGS, MODE) \ 194 #define HARD_REGNO_CALLER_SAVE_MODE(REGNO, NREGS, MODE) \
195 choose_hard_reg_mode (REGNO, NREGS, false) 195 choose_hard_reg_mode (REGNO, NREGS, NULL)
196 #endif 196 #endif
197 197
198 /* Target-dependent globals. */ 198 /* Target-dependent globals. */
199 struct target_regs { 199 struct target_regs {
200 /* For each starting hard register, the number of consecutive hard 200 /* For each starting hard register, the number of consecutive hard
296 } 296 }
297 297
298 /* Return true if REGS contains the whole of (reg:MODE REGNO). */ 298 /* Return true if REGS contains the whole of (reg:MODE REGNO). */
299 299
300 static inline bool 300 static inline bool
301 in_hard_reg_set_p (const HARD_REG_SET regs, machine_mode mode, 301 in_hard_reg_set_p (const_hard_reg_set regs, machine_mode mode,
302 unsigned int regno) 302 unsigned int regno)
303 { 303 {
304 unsigned int end_regno; 304 unsigned int end_regno;
305 305
306 gcc_assert (HARD_REGISTER_NUM_P (regno)); 306 gcc_assert (HARD_REGISTER_NUM_P (regno));
321 } 321 }
322 322
323 /* Return true if (reg:MODE REGNO) includes an element of REGS. */ 323 /* Return true if (reg:MODE REGNO) includes an element of REGS. */
324 324
325 static inline bool 325 static inline bool
326 overlaps_hard_reg_set_p (const HARD_REG_SET regs, machine_mode mode, 326 overlaps_hard_reg_set_p (const_hard_reg_set regs, machine_mode mode,
327 unsigned int regno) 327 unsigned int regno)
328 { 328 {
329 unsigned int end_regno; 329 unsigned int end_regno;
330 330
331 if (TEST_HARD_REG_BIT (regs, regno)) 331 if (TEST_HARD_REG_BIT (regs, regno))
361 } 361 }
362 362
363 /* Like overlaps_hard_reg_set_p, but use a REGNO/NREGS range instead of 363 /* Like overlaps_hard_reg_set_p, but use a REGNO/NREGS range instead of
364 REGNO and MODE. */ 364 REGNO and MODE. */
365 static inline bool 365 static inline bool
366 range_overlaps_hard_reg_set_p (const HARD_REG_SET set, unsigned regno, 366 range_overlaps_hard_reg_set_p (const_hard_reg_set set, unsigned regno,
367 int nregs) 367 int nregs)
368 { 368 {
369 while (nregs-- > 0) 369 while (nregs-- > 0)
370 if (TEST_HARD_REG_BIT (set, regno + nregs)) 370 if (TEST_HARD_REG_BIT (set, regno + nregs))
371 return true; 371 return true;
373 } 373 }
374 374
375 /* Like in_hard_reg_set_p, but use a REGNO/NREGS range instead of 375 /* Like in_hard_reg_set_p, but use a REGNO/NREGS range instead of
376 REGNO and MODE. */ 376 REGNO and MODE. */
377 static inline bool 377 static inline bool
378 range_in_hard_reg_set_p (const HARD_REG_SET set, unsigned regno, int nregs) 378 range_in_hard_reg_set_p (const_hard_reg_set set, unsigned regno, int nregs)
379 { 379 {
380 while (nregs-- > 0) 380 while (nregs-- > 0)
381 if (!TEST_HARD_REG_BIT (set, regno + nregs)) 381 if (!TEST_HARD_REG_BIT (set, regno + nregs))
382 return false; 382 return false;
383 return true; 383 return true;
384 } 384 }
385 385
386 /* Get registers used by given function call instruction. */
387 extern bool get_call_reg_set_usage (rtx_insn *insn, HARD_REG_SET *reg_set,
388 HARD_REG_SET default_set);
389
390 #endif /* GCC_REGS_H */ 386 #endif /* GCC_REGS_H */