Mercurial > hg > CbC > CbC_gcc
comparison gcc/config/ft32/predicates.md @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children | 1830386684a0 |
comparison
equal
deleted
inserted
replaced
111:04ced10e8804 | 131:84e7813d76e9 |
---|---|
1 ;; Predicate definitions for FT32 | 1 ;; Predicate definitions for FT32 |
2 ;; Copyright (C) 2015-2017 Free Software Foundation, Inc. | 2 ;; Copyright (C) 2015-2018 Free Software Foundation, Inc. |
3 ;; Contributed by FTDI <support@ftdi.com> | 3 ;; Contributed by FTDI <support@ftdi.com> |
4 | 4 |
5 ;; This file is part of GCC. | 5 ;; This file is part of GCC. |
6 | 6 |
7 ;; GCC is free software; you can redistribute it and/or modify it | 7 ;; GCC is free software; you can redistribute it and/or modify it |
21 ;; ------------------------------------------------------------------------- | 21 ;; ------------------------------------------------------------------------- |
22 ;; Predicates | 22 ;; Predicates |
23 ;; ------------------------------------------------------------------------- | 23 ;; ------------------------------------------------------------------------- |
24 | 24 |
25 ;; Nonzero if OP can be source of a simple move operation. | 25 ;; Nonzero if OP can be source of a simple move operation. |
26 ;; | |
27 ;; The CONST_INT could really be CONST if we were to fix | |
28 ;; ft32_print_operand_address to format the address correctly. | |
29 ;; It might require assembler/linker work as well to ensure | |
30 ;; the right relocation is emitted. | |
26 | 31 |
27 (define_predicate "ft32_general_movsrc_operand" | 32 (define_predicate "ft32_general_movsrc_operand" |
28 (match_code "mem,const_int,reg,subreg,symbol_ref,label_ref,const") | 33 (match_code "mem,const_int,reg,subreg,symbol_ref,label_ref,const") |
29 { | 34 { |
30 /* Any (MEM LABEL_REF) is OK. That is a pc-relative load. */ | 35 /* Any (MEM LABEL_REF) is OK. That is a pc-relative load. */ |
32 return 1; | 37 return 1; |
33 | 38 |
34 if (MEM_P (op) | 39 if (MEM_P (op) |
35 && GET_CODE (XEXP (op, 0)) == PLUS | 40 && GET_CODE (XEXP (op, 0)) == PLUS |
36 && GET_CODE (XEXP (XEXP (op, 0), 0)) == REG | 41 && GET_CODE (XEXP (XEXP (op, 0), 0)) == REG |
37 && GET_CODE (XEXP (XEXP (op, 0), 1)) == CONST) | 42 && GET_CODE (XEXP (XEXP (op, 0), 1)) == CONST_INT) |
38 return 1; | 43 return 1; |
39 | 44 |
40 return general_operand (op, mode); | 45 return general_operand (op, mode); |
41 }) | 46 }) |
42 | 47 |