Toggle diff (714 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 60b1ce9248..3c080bcd6e 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -759,6 +759,7 @@ dist_patch_DATA = \
%D%/packages/patches/biber-fix-encoding-write.patch \
%D%/packages/patches/binutils-boot-2.20.1a.patch \
%D%/packages/patches/binutils-loongson-workaround.patch \
+ %D%/packages/patches/binutils-revert-xtensa-shift.patch \
%D%/packages/patches/blender-2.79-newer-ffmpeg.patch \
%D%/packages/patches/blender-2.79-python-3.7-fix.patch \
%D%/packages/patches/byobu-writable-status.patch \
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 13237fb8a8..1e03a42b2f 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -4,7 +4,7 @@
;;; Copyright © 2016, 2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2016 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
-;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2019 Carl Dong <contact@carldong.me>
;;;
;;; This file is part of GNU Guix.
@@ -70,11 +70,11 @@
`(cons ,(string-append "--target=" target)
,flags))))))
-(define (package-with-patch original patch)
- "Return package ORIGINAL with PATCH applied."
+(define (package-with-patches original patches)
+ "Return package ORIGINAL with PATCHES applied."
(package (inherit original)
(source (origin (inherit (package-source original))
- (patches (list patch))))))
+ (patches patches)))))
(define (cross-binutils target)
"Return a cross-Binutils for TARGET."
@@ -98,9 +98,10 @@
;; For Xtensa, apply Qualcomm's patch.
(cross (if (string-prefix? "xtensa-" target)
- (package-with-patch binutils
- (search-patch
- "ath9k-htc-firmware-binutils.patch"))
+ (package-with-patches binutils
+ (search-patches
+ "binutils-revert-xtensa-shift.patch"
+ "ath9k-htc-firmware-binutils.patch"))
binutils)
target)))
diff --git a/gnu/packages/patches/binutils-revert-xtensa-shift.patch b/gnu/packages/patches/binutils-revert-xtensa-shift.patch
new file mode 100644
index 0000000000..95e5784b9a
--- /dev/null
+++ b/gnu/packages/patches/binutils-revert-xtensa-shift.patch
@@ -0,0 +1,4091 @@
+This patch lazily reverts this upstream commit from Binutils 2.34:
+
+https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=567607c11fbf710513d0924192f3ed528c02d76f
+
+In order to avoid porting "ath9k-htc-firmware-binutils.patch" to the newer code.
+
+diff --git a/bfd/xtensa-modules.c b/bfd/xtensa-modules.c
+index 9af5653313..785dfe7aa0 100644
+--- a/bfd/xtensa-modules.c
++++ b/bfd/xtensa-modules.c
+@@ -302,1356 +302,1539 @@ static xtensa_state_internal states[] = {
+ static unsigned
+ Field_t_Slot_inst_get (const xtensa_insnbuf insn)
+ {
+- unsigned tie_t = (insn[0] >> 4) & 0xf;
++ unsigned tie_t = 0;
++ tie_t = (tie_t << 4) | ((insn[0] << 24) >> 28);
+ return tie_t;
+ }
+
+ static void
+ Field_t_Slot_inst_set (xtensa_insnbuf insn, uint32 val)
+ {
+- uint32 tie_t = val & 0xf;
++ uint32 tie_t;
++ tie_t = (val << 28) >> 28;
+ insn[0] = (insn[0] & ~0xf0) | (tie_t << 4);
+ }
+
+ static unsigned
+ Field_t_Slot_inst16a_get (const xtensa_insnbuf insn)
+ {
+- unsigned tie_t = ((insn[0] >> 4) & 0xf);
++ unsigned tie_t = 0;
++ tie_t = (tie_t << 4) | ((insn[0] << 24) >> 28);
+ return tie_t;
+ }
+
+ static void
+ Field_t_Slot_inst16a_set (xtensa_insnbuf insn, uint32 val)
+ {
+- uint32 tie_t = val & 0xf;
++ uint32 tie_t;
++ tie_t = (val << 28) >> 28;
+ insn[0] = (insn[0] & ~0xf0) | (tie_t << 4);
+ }
+
+ static unsigned
+ Field_t_Slot_inst16b_get (const xtensa_insnbuf insn)
+ {
+- unsigned tie_t = (insn[0] >> 4) & 0xf;
++ unsigned tie_t = 0;
++ tie_t = (tie_t << 4) | ((insn[0] << 24) >> 28);
+ return tie_t;
+ }
+
+ static void
+ Field_t_Slot_inst16b_set (xtensa_insnbuf insn, uint32 val)
+ {
+- uint32 tie_t = val & 0xf;
++ uint32 tie_t;
++ tie_t = (val << 28) >> 28;
+ insn[0] = (insn[0] & ~0xf0) | (tie_t << 4);
+ }
+
+ static unsigned
+ Field_t_Slot_xt_flix64_slot0_get (const xtensa_insnbuf insn)
+ {
+- unsigned tie_t = insn[0] & 0xf;
++ unsigned tie_t = 0;
++ tie_t = (tie_t << 4) | ((insn[0] << 28) >> 28);
+ return tie_t;
+ }
+
+ static void
+ Field_t_Slot_xt_flix64_slot0_set (xtensa_insnbuf insn, uint32 val)
+ {
+- uint32 tie_t = val & 0xf;
++ uint32 tie_t;
++ tie_t = (val << 28) >> 28;
+ insn[0] = (insn[0] & ~0xf) | (tie_t << 0);
+ }
+
+ static unsigned
+ Field_t_Slot_xt_flix64_slot1_get (const xtensa_insnbuf insn)
+ {
+- unsigned tie_t = insn[0] & 0xf;
++ unsigned tie_t = 0;
++ tie_t = (tie_t << 4) | ((insn[0] << 28) >> 28);
+ return tie_t;
+ }
+
+ static void
+ Field_t_Slot_xt_flix64_slot1_set (xtensa_insnbuf insn, uint32 val)
+ {
+- uint32 tie_t = val & 0xf;
++ uint32 tie_t;
++ tie_t = (val << 28) >> 28;
+ insn[0] = (insn[0] & ~0xf) | (tie_t << 0);
+ }
+
+ static unsigned
+ Field_t_Slot_xt_flix64_slot2_get (const xtensa_insnbuf insn)
+ {
+- unsigned tie_t = insn[0] & 0xf;
++ unsigned tie_t = 0;
++ tie_t = (tie_t << 4) | ((insn[0] << 28) >> 28);
+ return tie_t;
+ }
+
+ static void
+ Field_t_Slot_xt_flix64_slot2_set (xtensa_insnbuf insn, uint32 val)
+ {
+- uint32 tie_t = val & 0xf;
++ uint32 tie_t;
++ tie_t = (val << 28) >> 28;
+ insn[0] = (insn[0] & ~0xf) | (tie_t << 0);
+ }
+
+ static unsigned
+ Field_t_Slot_xt_flix64_slot3_get (const xtensa_insnbuf insn)
+ {
+- unsigned tie_t = insn[0] & 0xf;
++ unsigned tie_t = 0;
++ tie_t = (tie_t << 4) | ((insn[0] << 28) >> 28);
+ return tie_t;
+ }
+
+ static void
+ Field_t_Slot_xt_flix64_slot3_set (xtensa_insnbuf insn, uint32 val)
+ {
+- uint32 tie_t = val & 0xf;
++ uint32 tie_t;
++ tie_t = (val << 28) >> 28;
+ insn[0] = (insn[0] & ~0xf) | (tie_t << 0);
+ }
+
+ static unsigned
+ Field_bbi4_Slot_inst_get (const xtensa_insnbuf insn)
+ {
+- unsigned tie_t = (insn[0] >> 12) & 1;
++ unsigned tie_t = 0;
++ tie_t = (tie_t << 1) | ((insn[0] << 19) >> 31);
+ return tie_t;
+ }
+
+ static void
+ Field_bbi4_Slot_inst_set (xtensa_insnbuf insn, uint32 val)
+ {
+- uint32 tie_t = val & 1;
++ uint32 tie_t;
++ tie_t = (val << 31) >> 31;
+ insn[0] = (insn[0] & ~0x1000) | (tie_t << 12);
+ }
+
+ static unsigned
+ Field_bbi_Slot_inst_get (const xtensa_insnbuf insn)
+ {
+- unsigned tie_t = (insn[0] >> 12) & 1;
+- tie_t = (tie_t << 4) | ((insn[0] >> 4) & 0xf);
++ unsigned tie_t = 0;
++ tie_t = (tie_t << 1) | ((insn[0] << 19) >> 31);
++ tie_t = (tie_t << 4) | ((insn[0] << 24) >> 28);
+ return tie_t;
+ }
+
+ static void
+ Field_bbi_Slot_inst_set (xtensa_insnbuf insn, uint32 val)
+ {
+- uint32 tie_t = val & 0xf;
++ uint32 tie_t;
++ tie_t = (val << 28) >> 28;
+ insn[0] = (insn[0] & ~0xf0) | (tie_t << 4);
+- tie_t = (val >> 4) & 1;
++ tie_t = (val << 27) >> 31;
+ insn[0] = (insn[0] & ~0x1000) | (tie_t << 12);
+ }
+
+ static unsigned
+ Field_bbi_Slot_xt_flix64_slot3_get (const xtensa_insnbuf insn)
+ {
+- unsigned tie_t = (insn[0] >> 26) & 1;
+- tie_t = (tie_t << 4) | (insn[0] & 0xf);
++ unsigned tie_t = 0;
++ tie_t = (tie_t << 1) | ((insn[0] << 5) >> 31);
++ tie_t = (tie_t << 4) | ((insn[0] << 28) >> 28);
+ return tie_t;
+ }
+
+ static void
+ Field_bbi_Slot_xt_flix64_slot3_set (xtensa_insnbuf insn, uint32 val)
+ {
+- uint32 tie_t = val & 0xf;
++ uint32 tie_t;
++ tie_t = (val << 28) >> 28;
+ insn[0] = (insn[0] & ~0xf) | (tie_t << 0);
+- tie_t = (val >> 4) & 1;
++ tie_t = (val << 27) >> 31;
+ insn[0] = (insn[0] & ~0x4000000) | (tie_t << 26);
+ }
+
+ static unsigned
+ Field_imm12_Slot_inst_get (const xtensa_insnbuf insn)
+ {
+- unsigned tie_t = (insn[0] >> 12) & 0xfff;
++ unsigned tie_t = 0;
++ tie_t = (tie_t << 12) | ((insn[0] << 8) >> 20);
+ return tie_t;
+ }
+
+ static void
+ Field_imm12_Slot_inst_set (xtensa_insnbuf insn, uint32 val)
+ {
+- uint32 tie_t = val & 0xfff;
++ uint32 tie_t;
++ tie_t = (val << 20) >> 20;
+ insn[0] = (insn[0] & ~0xfff000) | (tie_t << 12);
+ }
+
+ static unsigned
+ Field_imm8_Slot_inst_get (const xtensa_insnbuf insn)
+ {
+- unsigned tie_t = (insn[0] >> 16) & 0xff;
++ unsigned tie_t = 0;
++ tie_t = (tie_t << 8) | ((insn[0] << 8) >> 24);
+ return tie_t;
+ }
+
+ static void
+ Field_imm8_Slot_inst_set (xtensa_insnbuf insn, uint32 val)
+ {
+- uint32 tie_t = val & 0xff;
++ uint32 tie_t;
++ tie_t = (val << 24) >> 24;
+ insn[0] = (insn[0] & ~0xff0000) | (tie_t << 16);
+ }
+
+ static unsigned
+ Field_imm8_Slot_xt_flix64_slot0_get (const xtensa_insnbuf insn)
+ {
+- unsigned tie_t = (insn[0] >> 12) & 0xff;
++ unsigned tie_t = 0;
++ tie_t = (tie_t << 8) | ((insn[0] << 12) >> 24);
+ return tie_t;
+ }
+
+ static void
+ Field_imm8_Slot_xt_flix64_slot0_set (xtensa_insnbuf insn, uint32 val)
+ {
+- uint32 tie_t = val & 0xff;
++ uint32 tie_t;
++ tie_t = (val << 24) >> 24;
+ insn[0] = (insn[0] & ~0xff000) | (tie_t << 12);
+ }
+
+ static unsigned
+ Field_imm8_Slot_xt_flix64_slot1_get (const xtensa_insnbuf insn)
+ {
+- unsigned tie_t = (insn[0] >> 12) & 0xf;
+- tie_t = (tie_t << 4) | ((insn[0] >> 4) & 0xf);
++ unsigned tie_t = 0;
++ tie_t = (tie_t << 4) | ((insn[0] << 16) >> 28);
++ tie_t = (tie_t << 4) | ((insn[0] << 24) >> 28);
+ return tie_t;
+ }
+
+ static void
+ Field_imm8_Slot_xt_flix64_slot1_set (xtensa_insnbuf insn, uint32 val)
+ {
+- uint32 tie_t = val & 0xf;
++ uint32 tie_t;
++ tie_t = (val << 28) >> 28;
+ insn[0] = (insn[0] & ~0xf0) | (tie_t << 4);
+- tie_t = (val >> 4) & 0xf;
++ tie_t = (val << 24) >> 28;
+ insn[0] = (insn[0] & ~0xf000) | (tie_t << 12);
+ }
+
+ static unsigned
+ Field_s_Slot_inst_get (const xtensa_insnbuf insn)
+ {
+- unsigned tie_t = (insn[0] >> 8) & 0xf;
++ unsigned tie_t = 0;
++ tie_t = (tie_t << 4) | ((insn[0] << 20) >> 28);
+ return tie_t;
+ }
+
+ static void
+ Field_s_Slot_inst_set (xtensa_insnbuf insn, uint32 val)
+ {
+- uint32 tie_t = val & 0xf;
++ uint32 tie_t;
++ tie_t = (val << 28) >> 28;
+ insn[0] = (insn[0] & ~0xf00) | (tie_t << 8);
+ }
+
+ static unsigned
+ Field_s_Slot_inst16a_get (const xtensa_insnbuf insn)
+ {
+- unsigned tie_t = (insn[0] >> 8) & 0xf;
++ unsigned tie_t = 0;
++ tie_t = (tie_t << 4) | ((insn[0] << 20) >> 28);
+ return tie_t;
+ }
+
+ static void
+ Field_s_Slot_inst16a_set (xtensa_insnbuf insn, uint32 val)
+ {
+- uint32 tie_t = val & 0xf;
++ uint32 tie_t;
++ tie_t = (val << 28) >> 28;
+ insn[0] = (insn[0] & ~0xf00) | (tie_t << 8);
+ }
+
+ static unsigned
+ Field_s_Slot_inst16b_get (const xtensa_insnbuf insn)
+ {
+- unsigned tie_t = (insn[0] >> 8) & 0xf;
++ unsigned tie_t = 0;
++ tie_t = (tie_t << 4) | ((insn[0] << 20) >> 28);
+ return tie_t;
+ }
+
+ static void
+ Field_s_Slot_inst16b_set (xtensa_insnbuf insn, uint32 val)
+ {
+- uint32 tie_t = val & 0xf;
++ uint32 tie_t;
++ tie_t = (val << 28) >> 28;
+ insn[0] = (insn[0] & ~0xf00) | (tie_t << 8);
+ }
+
+ static unsigned
+ Field_s_Slot_xt_flix64_slot0_get (const xtensa_insnbuf insn)
+ {
+- unsigned tie_t = (insn[0] >> 4) & 0xf;
++ unsigned tie_t = 0;
++ tie_t = (tie_t << 4) | ((insn[0] << 24) >> 28);
+ return tie_t;
+ }
+
+ static void
+ Field_s_Slot_xt_flix64_slot0_set (xtensa_insnbuf insn, uint32 val)
+ {
+- uint32 tie_t = val & 0xf;
++ uint32 tie_t;
++ tie_t = (val << 28) >> 28;
+ insn[0] = (insn[0] & ~0xf0) | (tie_t << 4);
+ }
+
+ static unsigned
+ Field_s_Slot_xt_flix64_slot1_get (const xtensa_insnbuf insn)
+ {
+- unsigned tie_t = (insn[0] >> 8) & 0xf;
++ unsigned tie_t = 0;
++ tie_t = (tie_t << 4) | ((insn[0] << 20) >> 28);
+ return tie_t;
+ }
+
+ static void
+ Field_s_Slot_xt_flix64_slot1_set (xtensa_insnbuf insn, uint32 val)
+ {
+- uint32 tie_t = val & 0xf;
++ uint32 tie_t;
++ tie_t = (val << 28) >> 28;
+ insn[0] = (insn[0] & ~0xf00) | (tie_t << 8);
+ }
+
+ static unsigned
+ Field_s_Slot_xt_flix64_slot2_get (const xtensa_insnbuf insn)
+ {
+- unsigned tie_t = (insn[0] >> 8) & 0xf;
++ unsigned tie_t = 0;
++ tie_t = (tie_t << 4) | ((insn[0] << 20) >> 28);
+ return tie_t;
+ }
+
+ static void
+ Field_s_Slot_xt_flix64_slot2_set (xtensa_insnbuf insn, uint32 val)
+ {
+- uint32 tie_t = val & 0xf;
++ uint32 tie_t;
++ tie_t = (val << 28) >> 28;
+ insn[0] = (insn[0] & ~0xf00) | (tie_t << 8);
+ }
+
+ static unsigned
+ Field_s_Slot_xt_flix64_slot3_get (const xtensa_insnbuf insn)
+ {
+- unsigned tie_t = (insn[0] >> 4) & 0xf;
++ unsigned tie_t = 0;
++ tie_t = (tie_t << 4) | ((insn[0] << 24) >> 28);
+ return tie_t;
+ }
+
+ static void
+ Field_s_Slot_xt_flix64_slot3_set (xtensa_insnbuf insn, uint32 val)
+ {
+- uint32 tie_t = val & 0xf;
++ uint32 tie_t;
++ tie_t = (val << 28) >> 28;
+ insn[0] = (insn[0] & ~0xf0) | (tie_t << 4);
+ }
+
+ static unsigned
+ Field_imm12b_Slot_inst_get (const xtensa_insnbuf insn)
+ {
+- unsigned tie_t = (insn[0] >> 8) & 0xf;
+- tie_t = (tie_t << 8) | ((insn[0] >> 16) & 0xff);
++ unsigned tie_t = 0;
++ tie_t = (tie_t << 4) | ((insn[0] << 20) >> 28);
++ tie_t = (tie_t << 8) | ((insn[0] << 8) >> 24);
+ return tie_t;
+ }
+
+ static void
+ Field_imm12b_Slot_inst_set (xtensa_insnbuf insn, uint32 val)
+ {
+- uint32 tie_t = val & 0xff;
++ uint32 tie_t;
++ tie_t = (val << 24) >> 24;
+ insn[0] = (insn[0] & ~0xff0000) | (tie_t << 16);
+- tie_t = (val >> 8) & 0xf;
++ tie_t = (val << 20) >> 28;
+ insn[0] = (insn[0] & ~0xf00) | (tie_t << 8);
+ }
+
+ static unsigned
+ Field_imm12b_Slot_xt_flix64_slot0_get (const xtensa_insnbuf insn)
+ {
+- unsigned tie_t = (insn[0] >> 4) & 0xf;
+- tie_t = (tie_t << 8) | ((insn[0] >> 12) & 0xff);
++ unsigned tie_t = 0;
++ tie_t = (tie_t << 4) | ((insn[0] << 24) >> 28);
++ tie_t = (tie_t << 8) | ((insn[0] << 12) >> 24);
+ return tie_t;
+ }
+
+ static void
+ Field_imm12b_Slot_xt_flix64_slot0_set (xtensa_insnbuf insn, uint32 val)
+ {
+- uint32 tie_t = val & 0xff;
++ uint32 tie_t;
++ tie_t = (val << 24) >> 24;
+ insn[0] = (insn[0] & ~0xff000) | (tie_t << 12);
+- tie_t = (val >> 8) & 0xf;
++ tie_t = (val << 20) >> 28;
+ insn[0] = (insn[0] & ~0xf0) | (tie_t << 4);
+ }
+
+ static unsigned
+ Field_imm12b_Slot_xt_flix64_slot1_get (const xtensa_insnbuf insn)
+ {
+- unsigned tie_t = (insn[0] >> 4) & 0xfff;
++ unsigned tie_t = 0;
++ tie_t = (tie_t << 12) | ((insn[0] << 16) >> 20);
+ return tie_t;
+ }
+
+ static void
+ Field_imm12b_Slot_xt_flix64_slot1_set (xtensa_insnbuf insn, uint32 val)
+ {
+- uint32 tie_t = val & 0xfff;
++ uint32 tie_t;
++ tie_t = (val << 20) >> 20;
+ insn[0] = (insn[0] & ~0xfff0) | (tie_t << 4);
+ }
+
+ static unsigned
+ Field_imm16_Slot_inst_get (const xtensa_insnbuf insn)
+ {
+- unsigned tie_t = (insn[0] >> 8) & 0xffff;
++ unsigned tie_t = 0;
++ tie_t = (tie_t << 16) | ((insn[0] << 8) >> 16);
+ return tie_t;
+ }
+
+ static void
+ Field_imm16_Slot_inst_set (xtensa_insnbuf insn, uint32 val)
+ {
+- uint32 tie_t = val & 0xffff;
++ uint32 tie_t;
++ tie_t = (val << 16) >> 16;
+ insn[0] = (insn[0] & ~0xffff00) | (tie_t << 8);
+ }
+
+ static unsigned
+ Field_imm16_Slot_xt_flix64_slot0_get (const xtensa_insnbuf insn)
+ {
+- unsigned tie_t = (insn[0] >> 4) & 0xffff;
++ unsigned tie_t = 0;
++ tie_t = (tie_t << 16) | ((insn[0] << 12) >> 16);
+ return tie_t;
+ }
+
+ static void
+ Field_imm16_Slot_xt_flix64_slot0_set (xtensa_insnbuf insn, uint32 val)
+ {
+- uint32 tie_t = val & 0xffff;
++ uint32 tie_t;
++ tie_t = (val << 16) >> 16;
+ insn[0] = (insn[0] & ~0xffff0) | (tie_t << 4);
+ }
+
+ static unsigned
+ Field_m_Slot_inst_get (const xtensa_insnbuf insn)
+ {
+- unsigned tie_t = (insn[0] >> 6) & 3;
++ unsigned tie_t = 0;
++ tie_t = (tie_t << 2) | ((insn[0] << 24) >> 30);
+ return tie_t;
+ }
+
+ static void
+ Field_m_Slot_inst_set (xtensa_insnbuf insn, uint32 val)
+ {
+- uint32 tie_t = val & 3;
++ uint32 tie_t;
++ tie_t = (val << 30) >> 30;
+ insn[0] = (insn[0] & ~0xc0) | (tie_t << 6);
+ }
+
+ static unsigned
+ Field_m_Slot_xt_flix64_slot0_get (const xtensa_insnbuf insn)
+ {
+- unsigned tie_t = (insn[0] >> 2) & 3;
++ unsigned tie_t = 0;
++ tie_t = (tie_t << 2) | ((insn[0] << 28) >> 30);
+ return tie_t;
+ }
+
+ static void
+ Field_m_Slot_xt_flix64_slot0_set (xtensa_insnbuf insn, uint32 val)
+ {
+- uint32 tie_t = val & 3;
++ uint32 tie_t;
++ tie_t = (val << 30) >> 30;
+ insn[0] = (insn[0] & ~0xc) | (tie_t << 2);
+ }
+
+ static unsigned
+ Field_n_Slot_inst_get (const xtensa_insnbuf insn)
+ {
+- unsigned tie_t = (insn[0] >> 4) & 3;
++ unsigned tie_t = 0;
++ tie_t = (tie_t << 2) | ((insn[0] << 26) >> 30);
+ return tie_t;
+ }
+
+ static void
+ Field_n_Slot_inst_set (xtensa_insnbuf insn, uint32 val)
+ {
+- uint32 tie_t = val & 3;
++ uint32 tie_t;
++ tie_t = (val << 30) >> 30;
+ insn[0] = (insn[0] & ~0x30) | (tie_t << 4);
+ }
+
+ static unsigned
+ Field_n_Slot_xt_flix64_slot0_get (const xtensa_insnbuf insn)
+ {
+- unsigned tie_t = insn[0] & 3;
++ unsigned tie_t = 0;
++ tie_t = (tie_t << 2) | ((insn[0] << 30) >> 30);
+ return tie_t;
+ }
+
+ static void
+ Field_n_Slot_xt_flix64_slot0_set (xtensa_insnbuf insn, uint32 val)
+ {
+- uint32 tie_t = val & 3;
++ uint32 tie_t;
++ tie_t = (val << 30) >> 30;
+ insn[0] = (insn[0] & ~0x3) | (tie_t << 0);
+ }
+
+ static unsigned
+ Field_offset_Slot_inst_get (const xtensa_insnbuf insn)
+ {
+- unsigned tie_t = (insn[0] >> 6) & 0x3ffff;
++ unsigned tie_t = 0;
++ tie_t = (tie_t << 18) | ((insn[0] << 8) >> 14);
+ return tie_t;
+ }
+
+ static void
+ Field_offset_Slot_inst_set (xtensa_insnbuf insn, uint32 val)
+ {
+- uint32 tie_t = val & 0x3ffff;
++ uint32 tie_t;
++ tie_t = (val << 14) >> 14;
+ insn[0] = (insn[0] & ~0xffffc0) | (tie_t << 6);
+ }
+
+ static unsigned
+ Field_offset_Slot_xt_flix64_slot1_get (const xtensa_insnbuf insn)
+ {
+- unsigned tie_t = insn[0] & 0x3ffff;
++ unsigned tie_t = 0;
++ tie_t = (tie_t << 18) | ((insn[0] << 14) >> 14);
+ return tie_t;
+ }
+
+ static void
+ Field_offset_Slot_xt_flix64_slot1_set (xtensa_insnbuf insn, uint32 val)
+ {
+- uint32 tie_t = val & 0x3ffff;
++ uint32 tie_t;
++ tie_t = (val << 14) >> 14;
+ insn[0] = (insn[0] & ~0x3ffff) | (tie_t << 0);
+ }
+
+ static unsigned
+ Field_op0_Slot_inst_get (const xtensa_insnbuf insn)
+ {
+- unsigned tie_t = insn[0] & 0xf;
++ unsigned tie_t = 0;
++ tie_t = (tie_t << 4) | ((insn[0] << 28) >> 28);
+ return tie_t;
+ }
+
+ static void
+ Field_op0_Slot_inst_set (xtensa_insnbuf insn, uint32 val)
+ {
+- uint32 tie_t = val & 0xf;
++ uint32 tie_t;
++ tie_t = (val << 28) >> 28;
+ insn[0] = (insn[0] & ~0xf) | (tie_t << 0);
+ }
+
+ static unsigned
+ Field_op0_Slot_inst16a_get (const xtensa_insnbuf insn)
+ {
+- unsigned tie_t = insn[0] & 0xf;
++ unsigned tie_t = 0;
++ tie_t = (tie_t << 4) | ((insn[0] << 28) >> 28);
+ return tie_t;
+ }
+
+ static void
+ Field_op0_Slot_inst16a_set (xtensa_insnbuf insn, uint32 val)
+ {
+- uint32 tie_t = val & 0xf;
++ uint32 tie_t;
++ tie_t = (val << 28) >> 28;
+ insn[0] = (insn[0] & ~0xf) | (tie_t << 0);
+ }
+
+ static unsigned
+ Field_op0_Slot_inst16b_get (const xtensa_insnbuf insn)
+ {
+- unsigned tie_t = insn[0] & 0xf;
++ unsigned tie_t = 0;
++ tie_t = (tie_t << 4