Lioncash
db4e99c186
dyncom: Remove duplicated typedef and extern
...
These are already present in arm_dyncom_dec.h.
2015-07-27 22:06:51 -04:00
Lioncash
816b1ca776
dyncom: Use std::array for register arrays
2015-07-26 13:21:04 -04:00
Lioncash
0ecc6e2f04
dyncom: Use ARMul_State as an object
...
Gets rid of C-like parameter passing.
2015-07-26 13:18:32 -04:00
Lioncash
03213f893e
dyncom: Remove unnecessary initialization code.
...
Targeting ARM version variants was only a thing on armemu.
The reset routine also does basically the same thing as NewState.
2015-07-25 22:10:54 -04:00
Lioncash
3257d797e1
dyncom: Remove unnecessary abort-related cruft
...
Both the MPCore and the ARM9 have the same data abort model (base restored), so differentiating isn't necessary.
2015-07-25 22:10:53 -04:00
Lioncash
dfb424b6d1
dyncom: Rename armdefs.h to armstate.h
2015-07-25 22:10:44 -04:00
Lioncash
4bb1a5ca47
dyncom: Get rid of skyeye typedefs
2015-07-25 20:52:10 -04:00
Lioncash
0191c26521
dyncom: Move helper functions to their own header
2015-07-25 20:35:18 -04:00
Lioncash
c2689b8c2c
dyncom: Pass SVC immediates directly.
...
Previously it would just re-read the already decoded instruction and extract the immediate value.
2015-07-21 03:56:29 -04:00
Lioncash
a2f0a3d019
dyncom: Properly retrieve the PC value in BX if used.
2015-07-19 22:20:14 -04:00
Yuri Kunde Schlesner
13286903e6
Dyncom: Support for a missing ARMv6 Thumb MOV encoding
2015-07-18 03:41:49 -03:00
Lioncash
23dbbb786a
arm_dyncom_interpreter: Simplify assignment in SMLAW
...
Also a side-benefit of not having implementation-defined behavior.
2015-07-16 22:08:12 -04:00
Emmanuel Gil Peyrot
aea15f5c73
Core: Cleanup core includes.
2015-06-28 00:36:54 +01:00
Lioncash
04f204ed00
arm_dyncom_thumb: Fix handling of writeback for thumb LDMIA
2015-06-04 08:42:14 -04:00
Lioncash
c00781a908
arm_dyncom_thumb: Fix encoding of BKPT's immediate
2015-05-31 21:51:46 -04:00
Lioncash
85b1dddda1
arm_dyncom_thumb: Implement CPS and SETEND
2015-05-31 21:51:25 -04:00
Lioncash
7caef19c89
arm_dyncom_thumb: Implement SXTH, SXTB, UXTH, and UXTB.
2015-05-31 21:50:57 -04:00
Lioncash
b64dea80ce
arm_dyncom_thumb: Implement REV, REV16, and REVSH.
2015-05-31 21:50:18 -04:00
Emmanuel Gil Peyrot
b1503b2020
Remove every trailing whitespace from the project (but externals).
2015-05-29 21:59:29 +01:00
Yuri Kunde Schlesner
ad883db7a9
Merge pull request #826 from lioncash/tables
...
arm_dyncom_thumb: Merge STR/LDR table subsets.
2015-05-26 22:05:13 -07:00
Lioncash
0265d950e6
arm_dyncom_thumb: Merge STR/LDR table subsets.
2015-05-26 21:15:29 -04:00
Lioncash
f62ab75c67
arm_dyncom_interpreter: Remove unused variable
...
Thum decoding directly checks if the thumb bit is set instead of using a temporary.
2015-05-26 17:43:08 -04:00
Lioncash
8c1ab1c2c4
arm_dyncom_interpreter: Remove unused macro
2015-05-24 19:21:05 -04:00
Lioncash
6278937a28
dyncom: Get rid of armemu.h
2015-05-23 20:51:02 -04:00
Lioncash
92fd2753c5
dyncom: Remove unused cpu parameter from decode_thumb_instr
2015-05-22 23:42:23 -04:00
Lioncash
097d8282a6
dyncom: remove load_r15 from arm_inst
...
It's entirely unused. Also allows getting rid of more clunky macros.
2015-05-22 23:38:00 -04:00
Lioncash
8617938441
dyncom: Remove unnecessary parameter for load/store operations
2015-05-22 23:14:22 -04:00
Lioncash
572c91a024
dyncom: Eliminate clang warnings
...
Gets rid of a whole load of missing brace initialization warnings.
2015-05-21 16:43:21 -04:00
Yuri Kunde Schlesner
12f6216741
Merge pull request #774 from lioncash/decodings
...
dyncom: Add ARMv6K NOP and hint instructions to the interpreter.
2015-05-15 11:36:20 -07:00
bunnei
6abed88092
Merge pull request #770 from lioncash/dyncom_clean
...
dyncom: Minor cleanup.
2015-05-15 09:44:39 -04:00
Yuri Kunde Schlesner
7ada357b2d
Memmap: Re-organize memory function in two files
...
memory.cpp/h contains definitions related to acessing memory and
configuring the address space
mem_map.cpp/h contains higher-level definitions related to configuring
the address space accoording to the kernel and allocating memory.
2015-05-15 00:04:38 -03:00
Lioncash
8cd72428c9
dyncom: Add ARMv6K NOP and hint instructions to the decoding table
2015-05-14 16:25:02 -04:00
Lioncash
699b67d7cf
dyncom: Handle some MSR variants individually
...
This is necessary, as hint instructions will be recognized as MSR, which is pretty bad.
2015-05-14 16:24:51 -04:00
Lioncash
be0119be08
dyncom: Move exclusive load/stores above bbl and swi in the decoding table
2015-05-14 16:24:39 -04:00
Lioncash
1e0255364c
dyncom: Remove duplicate enums/prototypes
...
These are already defined in arm_dyncom_interpreter_dec.cpp.
2015-05-14 14:32:17 -04:00
Lioncash
f4921d0f9d
dyncom: Remove unnecessary defines
...
These can simply be const vars.
2015-05-14 14:32:16 -04:00
Lioncash
0530fd2499
dyncom: Make translation-unit functions and variables static
2015-05-14 14:32:07 -04:00
Lioncash
f3c4de4ce4
dyncom: Remove unnecessary typedefs
2015-05-14 11:51:46 -04:00
Lioncash
a48b4ec583
dyncom: Remove unused structs
2015-05-14 11:33:50 -04:00
Lioncash
832c130ed1
dyncom: Fix decoding of BKPT's immediate
...
A shift here is intended since the representation is imm12:imm4
2015-05-13 14:11:03 -04:00
Lioncash
dc7ac751f2
dyncom: Stub MCRR and MRRC
...
There's no other coprocessor outside the VFP (which has its own VMOV variants) in which the MPCore can send/retrieve data from.
Stubbed so citra won't crash and burn on the odd chance someone actually tries to use these.
2015-05-11 18:31:45 -04:00
Lioncash
1622068198
Merge pull request #728 from lioncash/vars
...
dyncom: Remove an unnecessary variable in the interpreter
2015-05-07 21:09:03 -04:00
Lioncash
ae0c38a333
Remove unnecessary dyncom header files
2015-05-07 20:45:28 -04:00
Lioncash
31dc8b8890
dyncom: Remove an unnecessary variable in the interpreter
...
All this was doing was needlessly aliasing a variable.
2015-05-07 19:34:04 -04:00
Yuri Kunde Schlesner
e1fbac3ca1
Common: Remove common.h
2015-05-07 15:45:22 -03:00
Yuri Kunde Schlesner
ecff2351a1
HLE: Clean up SVC dispatch mechanism
2015-05-06 00:24:39 -03:00
bunnei
bab5abaf46
Dyncom: Move cream cache to ARMul_State.
2015-05-01 18:27:04 -04:00
Lioncash
8b2b620a5e
dyncom: Remove more unused/unnecessary code
...
Gets rid of a sizeable amount of stuff in armdefs.
2015-04-20 16:30:34 -04:00
Emmanuel Gil Peyrot
bdcf28e3bc
Headers: Add some forgotten overrides, thanks clang!
2015-04-14 21:18:25 +02:00
Lioncash
a6c9e453b2
dyncom: Remove unnecessary enum and typedef
...
Also fixes descriptions in the process.
2015-04-07 08:05:41 -04:00
bunnei
14dcd98653
Merge pull request #685 from lioncash/cpregs
...
dyncom: Set the MPCore CP15 register reset values on initialization.
2015-04-06 15:06:07 -04:00
Lioncash
c3ffe8f9c3
arm_interface: Support retrieval/storage to CP15 registers
2015-04-06 12:57:49 -04:00
Lioncash
b7b8b67620
Move CP15 enum definitions into their own enum.
...
Also gets rid of preprocessor mumbo-jumbo
2015-04-06 12:48:35 -04:00
Lioncash
bb7dac022e
dyncom: Suppress uninitialized variable warnings
...
The switch cases will always be hit, but this makes compilers stop complaining.
2015-04-05 23:49:06 -04:00
Lioncash
490df716f3
dyncom: Move CP15 register writing into its own function.
...
Also implements writing to the rest of the ARM11 MPCore CP15 register set.
2015-04-02 00:20:52 -04:00
Lioncash
5e5954c63b
dyncom: Move CP15 register reading into its own function.
...
Keeps everything contained. Added all supported readable registers in an ARM11 MPCore.
2015-04-02 00:19:11 -04:00
Lioncash
de6eba0288
dyncom: Migrate InAPrivilegedMode to armsupp
...
It's a generic helper function, so it should be here anyway.
2015-03-26 09:22:02 -04:00
bunnei
b3d4a10e29
Merge pull request #674 from lioncash/sys-instrs
...
dyncom: Implement RFE and SRS.
2015-03-24 23:21:44 -04:00
Lioncash
a80d93685a
dyncom: Implement SRS
2015-03-24 12:44:31 -04:00
Lioncash
cde671795c
dyncom: Implement RFE
2015-03-24 11:34:48 -04:00
Lioncash
2df10d2284
dyncom: Remove unused/unnecessary macros and macro constants
2015-03-24 09:55:56 -04:00
bunnei
1981aa3d7e
Merge pull request #659 from lioncash/setend
...
Implement SETEND.
2015-03-19 21:37:43 -04:00
Lioncash
9fdb311d6e
dyncom: Make Load/Store instructions support big endian
2015-03-17 15:13:32 -04:00
Lioncash
8cf81643a9
arm_interface: Get rid of GetTicks.
...
Removes a TODO.
2015-03-16 12:18:37 -04:00
Lioncash
f280806214
dyncom: Implement SETEND
2015-03-14 23:08:36 -04:00
Lioncash
e34ba68e1f
dyncom: Minor cleanup
...
Assemblers will exit with an error when trying to assemble instructions with disallowed registers.
2015-03-10 08:13:58 -04:00
Lioncash
386dbab5ea
dyncom: Fix an indexing bug in STM
...
Previously it would write the contents of register 13 for the case where the link register (r14) is supposed to be written.
2015-03-08 22:03:11 -04:00
Lioncash
36dab56c31
dyncom: General cleanup of STM
2015-03-08 22:03:06 -04:00
Lioncash
e37425b380
dyncom: Increment addr when accessing LR in LDM
2015-03-08 21:46:57 -04:00
Yuri Kunde Schlesner
cd1fbfcf1b
Add profiling infrastructure and widget
2015-03-01 21:47:13 -03:00
Lioncash
8812d2fbdb
arm: The CP15 Main ID register is not writeable
2015-02-26 09:28:31 -05:00
Kevin Hartman
05c098a9e7
Cleaned up unaligned access.
2015-02-21 17:25:31 -08:00
Lioncash
a7120662e6
dyncom: Support conditional BKPT instructions
2015-02-17 01:37:22 -05:00
Lioncash
012d1e32ad
dyncom: Actually set the destination register for USAD8/USADA8.
...
Idiotville: Population: 1 - Inhabitant name: Lioncash
2015-02-16 01:03:01 -05:00
Lioncash
0c6434c379
core: Apply static to local functions
2015-02-13 10:48:32 -05:00
Lioncash
a75e1ff6e6
arm: General cleanup
...
- Remove several typedefs for ARMul_State.
- Remove unused functions
- Remove unused/unnecessary headers
- Removed unused enums, etc.
2015-02-13 09:11:12 -05:00
Lioncash
b7fac494cd
dyncom: Switch the app and system cores into the correct mode at initialization
2015-02-12 21:54:28 -05:00
Lioncash
c3211c9c80
dyncom: Clean up the constructor
...
Some function calls aren't necessary and would be handled by regular initialization routines.
2015-02-12 21:50:51 -05:00
Lioncash
df9e0c0f81
dyncom: Remove warning for SXTAH
...
This is tested to work correctly.
2015-02-12 20:11:20 -05:00
Lioncash
e3f5c6366c
arm: Remove ARMul_EmulateInit
...
This was only used for armemu, which has since been removed. Removed components related to this as well.
2015-02-12 11:30:28 -05:00
bunnei
c51b23b052
Merge pull request #559 from lioncash/clean
...
arm: Some cleanup. Also fixed the initial ARM mode that is emulated.
2015-02-11 12:02:35 -05:00
Lioncash
c94c41f95a
arm: Get rid of some magic constants. Specify proper ARM mode.
...
Initially, we were starting the emulator in USER26MODE, which is incorrect, this should be USER32MODE.
2015-02-11 10:49:55 -05:00
archshift
ef24e72b26
Asserts: break/crash program, fit to style guide; log.h->assert.h
...
Involves making asserts use printf instead of the log functions (log functions are asynchronous and, as such, the log won't be printed in time)
As such, the log type argument was removed (printf obviously can't use it, and it's made obsolete by the file and line printing)
Also removed some GEKKO cruft.
2015-02-10 18:30:31 -08:00
Lioncash
8d2fb3bb2b
arm_dyncom_thumb: Make lookup tables static
...
These don't need to be recreated all the time.
2015-02-10 10:42:09 -05:00
Lioncash
3eccc66abf
dyncom: Add more regs to MCR/MRC
...
Adds the registers that were left out of some coprocessor ranges.
2015-02-10 09:34:42 -05:00
Kevin Hartman
5fcbfc06eb
Scheduler refactor Pt. 1
...
* Simplifies scheduling logic, specifically regarding thread status. It should be much clearer which statuses are valid
for a thread at any given point in the system.
* Removes dead code from thread.cpp.
* Moves the implementation of resetting a ThreadContext to the corresponding core's implementation.
Other changes:
* Fixed comments in arm interfaces.
* Updated comments in thread.cpp
* Removed confusing, useless, functions like MakeReady() and ChangeStatus() from thread.cpp.
* Removed stack_size from Thread. In the CTR kernel, the thread's stack would be allocated before thread creation.
2015-02-09 21:47:12 -08:00
Lioncash
3a5a39c6aa
dyncom: Remove more unnecessary code
2015-02-03 14:05:53 -05:00
Lioncash
676daef3c7
core: Fix some warnings on OSX
2015-02-03 08:14:42 -05:00
Lioncash
3f00dd9117
arm: Clean up ARMul_State
...
Remove unnecessary/unused struct variables.
2015-01-31 21:55:34 -05:00
Lioncash
f44781fd7b
arm: Adios armemu
2015-01-31 20:43:03 -05:00
Lioncash
b6cfc48a0b
dyncom: clean up arm_dyncom_dec.h
2015-01-30 16:28:52 -05:00
Lioncash
fc1a9e35fb
arm: Move headers over to pragma once
2015-01-30 16:17:02 -05:00
Lioncash
83bc1a3120
arm: Get rid of armcpu.h and skyeye_types.h
2015-01-30 16:16:58 -05:00
Lioncash
7a3e371141
dyncom: Minor cleanup
...
Narrow scopes for the instruction variables. Remove unnecessary parentheses.
2015-01-27 08:51:18 -05:00
Lioncash
8810dfe1de
dyncom: Minor cleanup
...
Removes some unused macros and cleans up indentation inconsistencies
2015-01-22 09:39:41 -05:00
Lioncash
8c6edc680c
dyncom: Clarify precedence for ternary statements
2015-01-19 20:35:55 -05:00
Lioncash
a873f157d0
dyncom: Implement missing shifts in ScaledRegisterPostIndexed, etc
2015-01-18 18:32:02 -05:00
Lioncash
8575010a68
dyncom: Handle the ARM A2 encoding of STRT/LDRT
...
These were also missing the shifted register case.
2015-01-17 13:53:35 -05:00
Lioncash
0a5d450e94
dyncom: Handle the ARM A2 encoding of LDRBT/STRBT.
2015-01-16 21:05:27 -05:00
Lioncash
f7770b83d4
dyncom: Fix 32-bit ASR shifts for immediates
2015-01-12 14:15:24 -05:00