File: data-prefix-fail.s

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (30 lines) | stat: -rw-r--r-- 1,214 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// RUN: not llvm-mc -triple x86_64-unknown-unknown --show-encoding %s 2> %t.err | FileCheck --check-prefix=64 %s
// RUN: FileCheck --check-prefix=ERR64 < %t.err %s
// RUN: not llvm-mc -triple i386-unknown-unknown --show-encoding %s 2> %t.err | FileCheck --check-prefix=32 %s
// RUN: FileCheck --check-prefix=ERR32 < %t.err %s
// RUN: not llvm-mc -triple i386-unknown-unknown-code16 --show-encoding %s 2> %t.err | FileCheck --check-prefix=16 %s
// RUN: FileCheck --check-prefix=ERR16 < %t.err %s

// ERR64: error: 'data32' is not supported in 64-bit mode
// ERR32: error: redundant data32 prefix
// 16: lgdtl 0
// 16-SAME: encoding: [0x66,0x0f,0x01,0x16,0x00,0x00]
data32 lgdt 0

// 64: data16
// 64: encoding: [0x66]
// 64: lgdtq 0
// 64: encoding: [0x0f,0x01,0x14,0x25,0x00,0x00,0x00,0x00]
// 32: data16
// 32: encoding: [0x66]
// 32: lgdtl 0
// 32: encoding: [0x0f,0x01,0x15,0x00,0x00,0x00,0x00]
// ERR16: error: redundant data16 prefix
data16 lgdt 0

// 64:      data16    # encoding: [0x66]
// 64-NEXT: callq  0  # encoding: [0xe8,A,A,A,A]
// 32:      data16    # encoding: [0x66]
// 32-NEXT: calll  0  # encoding: [0xe8,A,A,A,A]
// ERR16: {{.*}}.s:[[#@LINE+1]]:1: error: redundant data16 prefix
data16 call 0