comparison gcc/config/nds32/nds32-pipelines-auxiliary.c @ 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 /* Auxiliary functions for pipeline descriptions pattern of Andes 1 /* Auxiliary functions for pipeline descriptions pattern of Andes
2 NDS32 cpu for GNU compiler 2 NDS32 cpu for GNU compiler
3 Copyright (C) 2012-2018 Free Software Foundation, Inc. 3 Copyright (C) 2012-2020 Free Software Foundation, Inc.
4 Contributed by Andes Technology Corporation. 4 Contributed by Andes Technology Corporation.
5 5
6 This file is part of GCC. 6 This file is part of GCC.
7 7
8 GCC is free software; you can redistribute it and/or modify it 8 GCC is free software; you can redistribute it and/or modify it
361 361
362 if (GET_MODE (def_reg) == DImode) 362 if (GET_MODE (def_reg) == DImode)
363 return reg_overlap_p (def_reg, use_reg); 363 return reg_overlap_p (def_reg, use_reg);
364 364
365 gcc_assert (REG_P (def_reg) || GET_CODE (def_reg) == SUBREG); 365 gcc_assert (REG_P (def_reg) || GET_CODE (def_reg) == SUBREG);
366 gcc_assert (REG_P (use_reg)); 366 gcc_assert (REG_P (use_reg) || GET_CODE (use_reg) == SUBREG);
367 367
368 if (REG_P (def_reg)) 368 if (REG_P (def_reg))
369 { 369 {
370 if (!TARGET_BIG_ENDIAN) 370 if REG_P (use_reg)
371 return REGNO (def_reg) == REGNO (use_reg) + 1; 371 {
372 else 372 if (!TARGET_BIG_ENDIAN)
373 return REGNO (def_reg) == REGNO (use_reg); 373 return REGNO (def_reg) == REGNO (use_reg) + 1;
374 else
375 return REGNO (def_reg) == REGNO (use_reg);
376 }
377 else
378 return true;
374 } 379 }
375 380
376 if (GET_CODE (def_reg) == SUBREG) 381 if (GET_CODE (def_reg) == SUBREG)
377 { 382 {
378 if (!reg_overlap_p (def_reg, use_reg)) 383 if (!reg_overlap_p (def_reg, use_reg))
379 return false; 384 return false;
385
386 if (GET_CODE (use_reg) == SUBREG)
387 return true;
380 388
381 if (!TARGET_BIG_ENDIAN) 389 if (!TARGET_BIG_ENDIAN)
382 return SUBREG_BYTE (def_reg) == 4; 390 return SUBREG_BYTE (def_reg) == 4;
383 else 391 else
384 return SUBREG_BYTE (def_reg) == 0; 392 return SUBREG_BYTE (def_reg) == 0;