| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- /* tripl/arch/x86_64/do_keyword.c
- *
- * This file is part of tripl.
- *
- * tripl is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * tripl is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with tripl. If not, see <https://www.gnu.org/licenses/>
- */
- /* gas x86_64 assembly, to stdout */
- #include <stdio.h>
- #include <klist.h>
- #include <tripl/tripl.h>
- #include <tripl/limits.h>
- #include <tripl/arch.h>
- int x86_64_init(void);
- int x86_64_fin(void);
- int x86_64_new_var(char *name, long value, int attr);
- int x86_64_set_var(char *name, long value, int attr);
- int x86_64_math_expr(char *s, char *name);
- struct arch x86_64_arch_fn = {
- .arch_init = x86_64_init,
- .arch_fin = x86_64_fin,
- .arch_new_var = x86_64_new_var,
- .arch_dump = NULL,
- .arch_import_shared = NULL,
- .arch_funcall = NULL,
- .arch_set_var = x86_64_set_var,
- .arch_math_expr = x86_64_math_expr
- };
- extern int x86_64_init_asm(void);
- extern int x86_64_asm_fin(void);
- __arch int x86_64_init(void) {
- return x86_64_init_asm();
- }
- __arch int x86_64_fin(void) {
- x86_64_asm_fin();
- return 0;
- }
|