[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gas/32501] New: [GAS] Imprecise assembly syntax check in MIPS
From: |
witbring at gmail dot com |
Subject: |
[Bug gas/32501] New: [GAS] Imprecise assembly syntax check in MIPS |
Date: |
Thu, 26 Dec 2024 05:55:04 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=32501
Bug ID: 32501
Summary: [GAS] Imprecise assembly syntax check in MIPS
Product: binutils
Version: 2.41
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: gas
Assignee: unassigned at sourceware dot org
Reporter: witbring at gmail dot com
Target Milestone: ---
I observed an issue in GAS related to inaccurate syntax checking and incorrect
encoding in MIPS.
Specifically, I found that syntactically incorrect assembly code was
successfully compiled. For instance, in the example below, parentheses in the
operand, which should indicate memory references, were misinterpreted in the
compiled output as the operand is an immediate value.
```
$ ./bin/mips-linux-gnu-as buggy.s -o buggy.o
$ cat buggy.s
syscall (1)
break (2)
c2 (3)
c3 (4)
$ objdump -d buggy.o
buggy.o: file format elf32-tradbigmips
Disassembly of section .text:
00000000 <.text>:
0: 0000004c syscall 0x1
4: 0002000d break 0x2
8: 4a000003 c2 0x3
c: 4e000004 c3 0x4
```
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug gas/32501] New: [GAS] Imprecise assembly syntax check in MIPS,
witbring at gmail dot com <=