M2-Planet/test/common_armv7l/armv7l_defs.M1

78 lines
1.6 KiB
Plaintext
Raw Normal View History

2019-03-10 01:22:29 +00:00
## Copyright (C) 2016 Jeremiah Orians
## This file is part of stage0.
##
## stage0 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.
##
## stage0 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 stage0. If not, see <http://www.gnu.org/licenses/>.
2019-03-10 13:33:45 +00:00
# Registers
2019-03-10 01:22:29 +00:00
DEFINE R0 0
DEFINE R1 1
DEFINE R2 2
DEFINE R3 3
DEFINE R4 4
DEFINE R5 5
DEFINE R6 6
DEFINE R7 7
DEFINE R8 8
DEFINE R9 9
DEFINE R10 A
DEFINE R11 B
DEFINE R12 C
DEFINE R13 D
DEFINE SP D
DEFINE R14 E
DEFINE LR E
DEFINE R15 F
DEFINE PC F
2019-03-10 13:33:45 +00:00
# Register masks for push/pop16
DEFINE {R0} 0100
DEFINE {R1} 0200
DEFINE {R12} 0010
DEFINE {R14} 0040
2019-03-10 01:22:29 +00:00
# LOAD/STORE
DEFINE MEMORY E5
DEFINE STORE32 08
DEFINE STORE8 0C
DEFINE LOAD32 09
DEFINE LOAD8 0D
DEFINE LOADI8_ALWAYS 0A0E3
2019-03-10 15:24:13 +00:00
DEFINE LOADI8_G 0A0C3
DEFINE LOADI8_GE 0A0A3
DEFINE LOADI8_EQUAL 0A003
DEFINE LOADI8_NE 0A013
DEFINE LOADI8_LE 0A0D3
DEFINE LOADI8_l 0A0B3
2019-03-10 01:22:29 +00:00
# JUMP/BRANCH
DEFINE JUMP EA
2019-03-10 15:24:13 +00:00
DEFINE JUMP_EQUAL 0A
2019-03-10 13:33:45 +00:00
DEFINE CALL_ALWAYS EB
2019-03-10 01:22:29 +00:00
# Data movement
DEFINE MOVE_ALWAYS 0A0E1
2019-03-10 13:33:45 +00:00
DEFINE PUSH_ALWAYS 2DE9
DEFINE POP_ALWAYS bde8
# Arithmetic
2019-03-10 15:24:13 +00:00
DEFINE AUX_ALWAYS E1
DEFINE IMM_ALWAYS E3
2019-03-10 13:33:45 +00:00
DEFINE ARITH_ALWAYS E2
DEFINE ADD 08
2019-03-10 15:24:13 +00:00
DEFINE CMP 005
DEFINE CMPI8 005
2019-03-10 01:22:29 +00:00
# SYSCALL
DEFINE SYSCALL_ALWAYS 000000EF