28 lines
552 B
C
28 lines
552 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={
|
|
.acc_32="eax",
|
|
.acc_wordsize="rax",
|
|
.bp="rbp",
|
|
.lea_wordsize="leaq",
|
|
.mov_32="movl",
|
|
.mov_wordsize="movq",
|
|
.pop_wordsize="popq",
|
|
.push_wordsize="pushq",
|
|
.registers_abi_32={"edi","esi","edx","ecx","r8d","r9d"},
|
|
.registers_abi_wordsize={"rdi","rsi","rdx","rcx","r8","r9"},
|
|
.scratch1_32="r8d",
|
|
.scratch1_wordsize="r8",
|
|
.sp="rsp",
|
|
.sub_wordsize="subq",
|
|
};
|
|
return ld;
|
|
}
|