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