24 lines
458 B
C
24 lines
458 B
C
#include<stdio.h>
|
|
#include<stdlib.h>
|
|
#include"gen.h"
|
|
#include"x86_64.h"
|
|
#include"i386.h"
|
|
#include"state.h"
|
|
|
|
LangDef gen_x86_64_langdef(void)
|
|
{
|
|
LangDef ld={
|
|
.registers_abi_wordsize={"rdi","rsi","rdx","rcx","r8","r9"},
|
|
.registers_abi_32={"edi","esi","edx","ecx","r8d","r9d"},
|
|
.mov_wordsize="movq",
|
|
.mov_32="movl",
|
|
.push_wordsize="pushq",
|
|
.sub_wordsize="subq",
|
|
.pop_wordsize="popq",
|
|
.sp="rsp",
|
|
.bp="rbp",
|
|
.scratch1="r8d",
|
|
};
|
|
return ld;
|
|
}
|