2 * Copyright (C) 2024 Mikulas Patocka
4 * This file is part of Ajla.
6 * Ajla is free software: you can redistribute it and/or modify it under the
7 * terms of the GNU General Public License as published by the Free Software
8 * Foundation, either version 3 of the License, or (at your option) any later
11 * Ajla is distributed in the hope that it will be useful, but WITHOUT ANY
12 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
13 * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License along with
16 * Ajla. If not, see <https://www.gnu.org/licenses/>.
19 #define OPC(op) (OPCODE_INT_OP + cat(OPCODE_INT_OP_,op) * OPCODE_INT_OP_MULT + cat(OPCODE_INT_TYPE_,type) * OPCODE_INT_TYPE_MULT)
21 #define orig_op divide
22 #define op divide_alt1
23 #define OPF INT_DIVIDE_ALT1_
24 #define DEF(type) DEFINE_INT_BINARY_OPCODE(type, op)
25 #include "ipret-b1.inc"
27 #define orig_op modulo
28 #define op modulo_alt1
29 #define OPF INT_MODULO_ALT1_
30 #define DEF(type) DEFINE_INT_BINARY_OPCODE(type, op)
31 #include "ipret-b1.inc"
33 #define orig_op divide
34 #define op divide_alt1
35 #define OPF INT_DIVIDE_ALT1_
36 #define DEF(type) DEFINE_INT_BINARY_CONST_OPCODE(type, op)
37 #include "ipret-b1.inc"
39 #define orig_op modulo
40 #define op modulo_alt1
41 #define OPF INT_MODULO_ALT1_
42 #define DEF(type) DEFINE_INT_BINARY_CONST_OPCODE(type, op)
43 #include "ipret-b1.inc"
45 #define orig_op popcnt
46 #define op popcnt_alt1
47 #define OPF INT_POPCNT_ALT1_
48 #define DEF(type) DEFINE_INT_UNARY_OPCODE(type, op)
49 #include "ipret-b1.inc"