bearch_amd64_t.h 1.14 KB
Newer Older
1
2
/*
 * This file is part of libFirm.
3
 * Copyright (C) 2012 University of Karlsruhe.
4
5
6
7
 */

/**
 * @file
8
 * @brief   declarations for AMD64 backend -- private header
9
 */
10
11
#ifndef FIRM_BE_AMD64_BEARCH_AMD64_T_H
#define FIRM_BE_AMD64_BEARCH_AMD64_T_H
12

13
#include "bearch.h"
14
#include "../ia32/x86_cconv.h"
15

16
typedef struct amd64_isa_t {
17
	arch_env_t  base;      /**< must be derived from arch_isa */
18
	pmap       *constants; /**< A map of entities that store const tarvals */
19
20
21
22
} amd64_isa_t;

extern ir_mode *amd64_mode_E;
extern ir_type *amd64_type_E;
23
extern ir_mode *amd64_mode_xmm;
24

25
26
27
#define AMD64_REGISTER_SIZE   8
/** power of two stack alignment on calls */
#define AMD64_PO2_STACK_ALIGNMENT 4
28

29
30
31
32
33
34
35
36
37
38
39
40
41
/**
 * Determine how function parameters and return values are passed.
 * Decides what goes to register or to stack and what stack offsets/
 * datatypes are used.
 *
 * @param function_type  the type of the caller/callee function
 * @param caller         true for convention for the caller, false for callee
 */
x86_cconv_t *amd64_decide_calling_convention(ir_type *function_type,
                                             ir_graph *irg);

void amd64_cconv_init(void);

42
#endif