File: riscv32-ilp32d-abi.cpp

package info (click to toggle)
llvm-toolchain-11 1%3A11.0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 995,808 kB
  • sloc: cpp: 4,767,656; ansic: 760,916; asm: 477,436; python: 170,940; objc: 69,804; lisp: 29,914; sh: 23,855; f90: 18,173; pascal: 7,551; perl: 7,471; ml: 5,603; awk: 3,489; makefile: 2,573; xml: 915; cs: 573; fortran: 503; javascript: 452
file content (50 lines) | stat: -rw-r--r-- 1,651 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
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// RUN: %clang_cc1 -triple riscv32 -target-feature +d -target-abi ilp32d \
// RUN:     -Wno-missing-declarations -emit-llvm %s -o - | FileCheck %s

struct empty_float2 { struct {}; float f; float g; };

// CHECK: define float @_Z14f_empty_float212empty_float2(float %0, float %1)
// CHECK: { [4 x i8], float, float }
float f_empty_float2(empty_float2 a) {
    return a.g;
}

struct empty_double2 { struct {}; double f; double g; };

// CHECK: define double @_Z15f_empty_double213empty_double2(double %0, double %1)
// CHECK: { [8 x i8], double, double }
double f_empty_double2(empty_double2 a) {
    return a.g;
}

struct empty_float_double { struct {}; float f; double g; };

// CHECK: define double @_Z20f_empty_float_double18empty_float_double(float %0, double %1)
// CHECK: { [4 x i8], float, double }
double f_empty_float_double(empty_float_double a) {
    return a.g;
}

struct empty_double_float { struct {}; double f; float g; };

// CHECK: define double @_Z20f_empty_double_float18empty_double_float(double %0, float %1)
// CHECK: { [8 x i8], double, float }
double f_empty_double_float(empty_double_float a) {
    return a.g;
}

struct empty_complex_f { struct {}; float _Complex fc; };

// CHECK: define float @_Z17f_empty_complex_f15empty_complex_f(float %0, float %1)
// CHECK: { [4 x i8], float, float }
float f_empty_complex_f(empty_complex_f a) {
    return __imag__ a.fc;
}

struct empty_complex_d { struct {}; double _Complex fc; };

// CHECK: define double @_Z17f_empty_complex_d15empty_complex_d(double %0, double %1)
// CHECK: { [8 x i8], double, double }
double f_empty_complex_d(empty_complex_d a) {
    return __imag__ a.fc;
}