History

Makefile: Split arm64-asm from arm-asm

Danny Milosavljevic committed 5 years ago

Commit 9539f511 parent 8712b4c2 files · +95 −1Browse files

Unified · Split

2 files
  1. Makefile +1 −1
  2. arm64-asm.c +94 −0
Makefile+1−1
@@ -187,7 +187,7 @@ arm-fpa-ld_FILES = $(arm_FILES) · 186 unmodified lines
187arm-vfp_FILES = $(arm_FILES)187arm-vfp_FILES = $(arm_FILES)
188arm-eabi_FILES = $(arm_FILES)188arm-eabi_FILES = $(arm_FILES)
189arm-eabihf_FILES = $(arm_FILES)189arm-eabihf_FILES = $(arm_FILES)
190arm64_FILES = $(CORE_FILES) arm64-gen.c arm64-link.c arm-asm.c190arm64_FILES = $(CORE_FILES) arm64-gen.c arm64-link.c arm64-asm.c
191c67_FILES = $(CORE_FILES) c67-gen.c c67-link.c tcccoff.c191c67_FILES = $(CORE_FILES) c67-gen.c c67-link.c tcccoff.c
192riscv64_FILES = $(CORE_FILES) riscv64-gen.c riscv64-link.c riscv64-asm.c192riscv64_FILES = $(CORE_FILES) riscv64-gen.c riscv64-link.c riscv64-asm.c
193 193
arm64-asm.c+94−0
@@ -0,0 +1,94 @@
1/*************************************************************/
2/*
3 * ARM64 dummy assembler for TCC
4 *
5 */
6
7#ifdef TARGET_DEFS_ONLY
8
9#define CONFIG_TCC_ASM
10#define NB_ASM_REGS 16
11
12ST_FUNC void g(int c);
13ST_FUNC void gen_le16(int c);
14ST_FUNC void gen_le32(int c);
15
16/*************************************************************/
17#else
18/*************************************************************/
19#define USING_GLOBALS
20#include "tcc.h"
21
22static void asm_error(void)
23{
24 tcc_error("ARM asm not implemented.");
25}
26
27/* XXX: make it faster ? */
28ST_FUNC void g(int c)
29{
30 int ind1;
31 if (nocode_wanted)
32 return;
33 ind1 = ind + 1;
34 if (ind1 > cur_text_section->data_allocated)
35 section_realloc(cur_text_section, ind1);
36 cur_text_section->data[ind] = c;
37 ind = ind1;
38}
39
40ST_FUNC void gen_le16 (int i)
41{
42 g(i);
43 g(i>>8);
44}
45
46ST_FUNC void gen_le32 (int i)
47{
48 gen_le16(i);
49 gen_le16(i>>16);
50}
51
52ST_FUNC void gen_expr32(ExprValue *pe)
53{
54 gen_le32(pe->v);
55}
56
57ST_FUNC void asm_opcode(TCCState *s1, int opcode)
58{
59 asm_error();
60}
61
62ST_FUNC void subst_asm_operand(CString *add_str, SValue *sv, int modifier)
63{
64 asm_error();
65}
66
67/* generate prolog and epilog code for asm statement */
68ST_FUNC void asm_gen_code(ASMOperand *operands, int nb_operands,
69 int nb_outputs, int is_output,
70 uint8_t *clobber_regs,
71 int out_reg)
72{
73}
74
75ST_FUNC void asm_compute_constraints(ASMOperand *operands,
76 int nb_operands, int nb_outputs,
77 const uint8_t *clobber_regs,
78 int *pout_reg)
79{
80}
81
82ST_FUNC void asm_clobber(uint8_t *clobber_regs, const char *str)
83{
84 asm_error();
85}
86
87ST_FUNC int asm_parse_regvar (int t)
88{
89 asm_error();
90 return -1;
91}
92
93/*************************************************************/
94#endif /* ndef TARGET_DEFS_ONLY */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t