brintos

brintos / llvm-project-archived public Read only

0
0
Text · 735 B · d420bd1 Raw
43 lines · cpp
1// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s2 3typedef unsigned long word_t;4typedef unsigned long u64_t;5typedef unsigned int u32_t;6 7class ioapic_redir_t {8public: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 31struct ioapic_shadow_struct32{33 ioapic_redir_t redirs[24];34} ioapic_shadow[16];35 36void 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.memcpy43