diff options
-rw-r--r-- | gas/config/tc-loongarch.c | 13 | ||||
-rw-r--r-- | gas/testsuite/gas/loongarch/align.l | 1 | ||||
-rw-r--r-- | gas/testsuite/gas/loongarch/align.s | 5 | ||||
-rw-r--r-- | gas/testsuite/gas/loongarch/loongarch.exp | 1 |
4 files changed, 7 insertions, 13 deletions
diff --git a/gas/config/tc-loongarch.c b/gas/config/tc-loongarch.c index 863ac9c..3c7d400 100644 --- a/gas/config/tc-loongarch.c +++ b/gas/config/tc-loongarch.c @@ -436,18 +436,6 @@ loongarch_mach (void) static const expressionS const_0 = { .X_op = O_constant, .X_add_number = 0 }; -static void -s_loongarch_align (int arg) -{ - const char *t = input_line_pointer; - while (!is_end_of_line[(unsigned char) *t] && *t != ',') - ++t; - if (*t == ',') - s_align_ptwo (arg); - else - s_align_ptwo (0); -} - /* Handle the .dtprelword and .dtpreldword pseudo-ops. They generate a 32-bit or 64-bit DTP-relative relocation (BYTES says which) for use in DWARF debug information. */ @@ -479,7 +467,6 @@ s_dtprel (int bytes) static const pseudo_typeS loongarch_pseudo_table[] = { - { "align", s_loongarch_align, -4 }, { "dword", cons, 8 }, { "word", cons, 4 }, { "half", cons, 2 }, diff --git a/gas/testsuite/gas/loongarch/align.l b/gas/testsuite/gas/loongarch/align.l new file mode 100644 index 0000000..8ea739b --- /dev/null +++ b/gas/testsuite/gas/loongarch/align.l @@ -0,0 +1 @@ +# No warning or error expected. diff --git a/gas/testsuite/gas/loongarch/align.s b/gas/testsuite/gas/loongarch/align.s new file mode 100644 index 0000000..93f2528 --- /dev/null +++ b/gas/testsuite/gas/loongarch/align.s @@ -0,0 +1,5 @@ +# Fix bug: alignment padding must a multiple of 4 if .align has second parameter +.data + .byte 1 + .align 3, 2 + .4byte 3 diff --git a/gas/testsuite/gas/loongarch/loongarch.exp b/gas/testsuite/gas/loongarch/loongarch.exp index baa4908..9ece4e8 100644 --- a/gas/testsuite/gas/loongarch/loongarch.exp +++ b/gas/testsuite/gas/loongarch/loongarch.exp @@ -30,4 +30,5 @@ if [istarget loongarch*-*-*] { } } + run_list_test "align" } |