mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-02 15:32:06 +00:00
extern-fn-explicit-align test: add MSVC compatible alignment attribute
This commit is contained in:
parent
84ff2e3d1c
commit
5f4472e451
@ -3,11 +3,20 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
__declspec(align(16))
|
||||||
struct TwoU64s
|
struct TwoU64s
|
||||||
{
|
{
|
||||||
uint64_t a;
|
uint64_t a;
|
||||||
uint64_t b;
|
uint64_t b;
|
||||||
} __attribute__((aligned(16)));
|
};
|
||||||
|
#else
|
||||||
|
struct __attribute__((aligned(16))) TwoU64s
|
||||||
|
{
|
||||||
|
uint64_t a;
|
||||||
|
uint64_t b;
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
struct BoolAndU32
|
struct BoolAndU32
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user