diff options
-rw-r--r-- | gas/config/tc-loongarch.c | 6 | ||||
-rw-r--r-- | gas/config/tc-loongarch.h | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/gas/config/tc-loongarch.c b/gas/config/tc-loongarch.c index 15fc4fa..08203d2 100644 --- a/gas/config/tc-loongarch.c +++ b/gas/config/tc-loongarch.c @@ -354,6 +354,12 @@ md_begin () assert (8 <= sizeof (offsetT)); } +unsigned long +loongarch_mach (void) +{ + return LARCH_opts.ase_lp64 ? bfd_mach_loongarch64 : bfd_mach_loongarch32; +} + static const expressionS const_0 = { .X_op = O_constant, .X_add_number = 0 }; static const char * diff --git a/gas/config/tc-loongarch.h b/gas/config/tc-loongarch.h index 705d45a..2664da5 100644 --- a/gas/config/tc-loongarch.h +++ b/gas/config/tc-loongarch.h @@ -24,6 +24,9 @@ #define TARGET_BYTES_BIG_ENDIAN 0 #define TARGET_ARCH bfd_arch_loongarch +#define TARGET_MACH (loongarch_mach ()) +extern unsigned long loongarch_mach (void); + #define WORKING_DOT_WORD 1 #define REPEAT_CONS_EXPRESSIONS |