[llvm] MC: X86 intel syntax: Support data32 and data16 better (PR #156287)
Danny Milosavljevic via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 2 03:21:34 PDT 2025
================
@@ -0,0 +1,28 @@
+// RUN: llvm-mc -triple i386-unknown-unknown --x86-asm-syntax=intel --show-encoding %s | FileCheck %s
+
+// CHECK: encoding: [0x66,0x6a,0x08]
+ data16 push 8
----------------
daym wrote:
Does it?
```
$ cat boot.asm
.intel_syntax noprefix
.code32
data16 push 8
$ as boot.asm
$ objdump -S a.out
$ objdump -S a.out
a.out: file format elf64-x86-64
Disassembly of section .text:
0000000000000000 <test_section>:
0: 66 6a 08 pushw $0x8
$ as --version
GNU assembler (GNU Binutils) 2.44
Copyright (C) 2025 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or later.
This program has absolutely no warranty.
This assembler was configured for a target of `x86_64-unknown-linux-gnu'.
```
https://github.com/llvm/llvm-project/pull/156287
More information about the llvm-commits
mailing list