diff gcc/config/riscv/sync.md @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
line wrap: on
line diff
--- a/gcc/config/riscv/sync.md	Fri Oct 27 22:46:09 2017 +0900
+++ b/gcc/config/riscv/sync.md	Thu Oct 25 07:37:49 2018 +0900
@@ -1,5 +1,5 @@
 ;; Machine description for RISC-V atomic operations.
-;; Copyright (C) 2011-2017 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2018 Free Software Foundation, Inc.
 ;; Contributed by Andrew Waterman (andrew@sifive.com).
 ;; Based on MIPS target for GNU compiler.
 
@@ -182,13 +182,14 @@
   emit_move_insn (shmt, gen_rtx_ASHIFT (SImode, offset, GEN_INT (3)));
 
   rtx word = gen_reg_rtx (SImode);
-  emit_move_insn (word, gen_rtx_ASHIFT (SImode, tmp, shmt));
+  emit_move_insn (word, gen_rtx_ASHIFT (SImode, tmp,
+					gen_lowpart (QImode, shmt)));
 
   tmp = gen_reg_rtx (SImode);
   emit_insn (gen_atomic_fetch_orsi (tmp, aligned_mem, word, model));
 
   emit_move_insn (gen_lowpart (SImode, result),
 		  gen_rtx_LSHIFTRT (SImode, tmp,
-				    gen_lowpart (SImode, shmt)));
+				    gen_lowpart (QImode, shmt)));
   DONE;
 })