| 1 |
// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s |
| 2 |
|
| 3 |
typedef unsigned long word_t; |
| 4 |
typedef unsigned long u64_t; |
| 5 |
typedef unsigned int u32_t; |
| 6 |
|
| 7 |
class ioapic_redir_t { |
| 8 |
public: |
| 9 |
union { |
| 10 |
struct { |
| 11 |
word_t vector : 8; |
| 12 |
|
| 13 |
word_t delivery_mode : 3; |
| 14 |
word_t dest_mode : 1; |
| 15 |
|
| 16 |
word_t delivery_status : 1; |
| 17 |
word_t polarity : 1; |
| 18 |
word_t irr : 1; |
| 19 |
word_t trigger_mode : 1; |
| 20 |
|
| 21 |
word_t mask : 1; |
| 22 |
word_t _pad0 : 15; |
| 23 |
|
| 24 |
word_t dest : 8; |
| 25 |
}; |
| 26 |
volatile u32_t raw[2]; |
| 27 |
volatile u64_t raw64; |
| 28 |
}; |
| 29 |
}; |
| 30 |
|
| 31 |
struct ioapic_shadow_struct |
| 32 |
{ |
| 33 |
ioapic_redir_t redirs[24]; |
| 34 |
} ioapic_shadow[16]; |
| 35 |
|
| 36 |
void init_ioapic(unsigned long ioapic_id) |
| 37 |
{ |
| 38 |
ioapic_redir_t entry; |
| 39 |
ioapic_shadow[ioapic_id].redirs[3] = entry; |
| 40 |
} |
| 41 |
|
| 42 |
// CHECK: call void @llvm.memcpy |