File: asm_gcc_no_fp.d

package info (click to toggle)
ldc 1%3A1.40.0-5
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 63,308 kB
  • sloc: cpp: 85,368; ansic: 21,877; makefile: 1,705; sh: 1,018; asm: 584; objc: 135; exp: 48; python: 12
file content (21 lines) | stat: -rw-r--r-- 558 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Makes sure the frame pointer isn't enforced for GCC-style asm.

// REQUIRES: target_X86

// RUN: %ldc -mtriple=x86_64-linux-gnu -mattr=avx -O -output-s -of=%t.s %s
// RUN: FileCheck %s < %t.s

alias byte32 = __vector(byte[32]);

// CHECK: _D13asm_gcc_no_fp3xorFNhG32gQgZQj:
byte32 xor(byte32 a, byte32 b)
{
    // CHECK-NEXT: .cfi_startproc
    byte32 r;
    // CHECK-NEXT: #APP
    // CHECK-NEXT: vxorps %ymm0, %ymm0, %ymm1
    // CHECK-NEXT: #NO_APP
    asm { "vxorps %0, %1, %2" : "=v" (r) : "v" (a), "v" (b); }
    // CHECK-NEXT: retq
    return r;
}