Displaying 2 results from an estimated 2 matches for "byreference".
2011 Feb 21
2
[LLVMdev] Passing structures as pointers, MSVC x64 style
...int Data1;
unsigned short Data2;
unsigned short Data3;
unsigned char Data4[8];
};
struct Guid g = { 0x8faf43c9, 0x85e9, 0x41f9, { 0xbe, 0x42, 0x99, 0x96, 0x4, 0xe0, 0x85, 0xb3 } };
void v(int, ...);
void byValue(void)
{
v(1, g);
}
void byReference(void)
{
v(1, &g);
}
And the disassembled output:
_byValue:
0000000000000000 pushq %rbp
0000000000000001 movq %rsp,%rbp
0000000000000004 subq $0x30,%rsp
0000000000000008 movq 0x00000008(%rip),%rax
000000000000000f movq %rax,0xf8(%rbp)
0000000000000013...
2011 Feb 22
0
[LLVMdev] Passing structures as pointers, MSVC x64 style
...signed short Data3;
> unsigned char Data4[8];
> };
>
> struct Guid g = { 0x8faf43c9, 0x85e9, 0x41f9, { 0xbe, 0x42, 0x99, 0x96, 0x4, 0xe0, 0x85, 0xb3 } };
>
> void v(int, ...);
>
> void byValue(void)
> {
> v(1, g);
> }
>
> void byReference(void)
> {
> v(1, &g);
> }
>
> And the disassembled output:
>
> _byValue:
> 0000000000000000 pushq %rbp
> 0000000000000001 movq %rsp,%rbp
> 0000000000000004 subq $0x30,%rsp
> 0000000000000008 movq 0x00000008(%rip),...