aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@embecosm.com>2023-11-10 21:52:18 +0000
committerMaciej W. Rozycki <macro@embecosm.com>2023-11-10 21:52:18 +0000
commitc8bff398cf6c67753843fa39b3393d4ff3b15bcf (patch)
treeecbc1f2d9e234b22cdb68f0dcb1a86f4f1193905
parentdcafd117dd442dd304ec1af0c2ca4d2ec59eafc3 (diff)
downloadgcc-c8bff398cf6c67753843fa39b3393d4ff3b15bcf.zip
gcc-c8bff398cf6c67753843fa39b3393d4ff3b15bcf.tar.gz
gcc-c8bff398cf6c67753843fa39b3393d4ff3b15bcf.tar.bz2
RISC-V: Fix indentation of "length" attribute for branches and jumps
The "length" attribute calculation expressions for branches and jumps are incorrectly and misleadingly indented, and they overrun the 80 column limit as well, all of this causing troubles in following them. Correct all these issues. gcc/ * config/riscv/riscv.md (length): Fix indentation for branch and jump length calculation expressions.
-rw-r--r--gcc/config/riscv/riscv.md28
1 files changed, 17 insertions, 11 deletions
diff --git a/gcc/config/riscv/riscv.md b/gcc/config/riscv/riscv.md
index ae2217d..8f28e8e 100644
--- a/gcc/config/riscv/riscv.md
+++ b/gcc/config/riscv/riscv.md
@@ -518,20 +518,26 @@
;; Branches further than +/- 1 MiB require three instructions.
;; Branches further than +/- 4 KiB require two instructions.
(eq_attr "type" "branch")
- (if_then_else (and (le (minus (match_dup 0) (pc)) (const_int 4088))
- (le (minus (pc) (match_dup 0)) (const_int 4092)))
- (const_int 4)
- (if_then_else (and (le (minus (match_dup 0) (pc)) (const_int 1048568))
- (le (minus (pc) (match_dup 0)) (const_int 1048572)))
- (const_int 8)
- (const_int 12)))
+ (if_then_else (and (le (minus (match_dup 0) (pc))
+ (const_int 4088))
+ (le (minus (pc) (match_dup 0))
+ (const_int 4092)))
+ (const_int 4)
+ (if_then_else (and (le (minus (match_dup 0) (pc))
+ (const_int 1048568))
+ (le (minus (pc) (match_dup 0))
+ (const_int 1048572)))
+ (const_int 8)
+ (const_int 12)))
;; Jumps further than +/- 1 MiB require two instructions.
(eq_attr "type" "jump")
- (if_then_else (and (le (minus (match_dup 0) (pc)) (const_int 1048568))
- (le (minus (pc) (match_dup 0)) (const_int 1048572)))
- (const_int 4)
- (const_int 8))
+ (if_then_else (and (le (minus (match_dup 0) (pc))
+ (const_int 1048568))
+ (le (minus (pc) (match_dup 0))
+ (const_int 1048572)))
+ (const_int 4)
+ (const_int 8))
;; Conservatively assume calls take two instructions (AUIPC + JALR).
;; The linker will opportunistically relax the sequence to JAL.