Commit Graph

497 Commits

Author SHA1 Message Date
rob turner d29578d467 ARM_Disasm::DisassembleMemHalf: actually use width in determining opcode name 2016-01-19 18:42:16 +01:00
Lioncash 532dc797c9 arm_dyncom_dec: Fix decoding of VMLS
Previously, all VMLS variants would misdecode as CDP
(which isn't necessarily wrong in itself, however
VMLS has it's own label of execution)
2015-12-30 14:23:07 -05:00
Lioncash fddfe946c8 dyncom: Handle modifying the APSR via an MRC instruction 2015-12-28 07:52:04 -05:00
Lioncash d09b7a3c12 dyncom: Remove PC dispatch from several instructions
These instructions aren't capable of using the PC as a destination
2015-12-20 21:19:02 -05:00
Lioncash 5a531d7ec2 dyncom: Handle unprivileged load/store variants correctly
LDRT/LDRBT/STRBT/STRT should simulate the load or store
as if the host CPU is in user mode.

STRT is also allowed to use the PC as an operand
2015-12-19 19:05:50 -05:00
Lioncash 56e22e6aac dyncom: Remove static keyword from header functions 2015-12-06 15:14:51 -05:00
Lioncash 1ea0702eaa arm_interface: Make GetNumInstructions const 2015-12-06 15:07:59 -05:00
Lioncash de9a625c7e arm_interface: directly initialize class members 2015-12-06 15:07:00 -05:00
Lioncash d03e7f08ff dyncom: const correctness changes 2015-12-06 15:03:06 -05:00
Lioncash 5e2b66d2a4 armstate: Zero out the registers on creation
std::array isn't always guaranteed to explicitly zero out it's contents
without an initializer list.
2015-11-29 15:16:34 -05:00
bunnei 43bb29edc5 Merge pull request #1122 from polaris-/gdbstub
gdbstub implementation
2015-11-11 23:21:31 -05:00
polaris- 2b7316a379 Remove unnecessary new lines, changed Deinit to Shutdown 2015-10-11 20:07:58 -04:00
Emmanuel Gil Peyrot 14af5919ba CitraQt, SkyEye, Loader, VideoCore: Remove newlines in LOG_* calls.
The LOG_* function itself already appends one.
2015-10-09 22:14:56 +01:00
polaris- 42928659e8 Use BreakpointAddress struct instead of passing address directly 2015-10-04 11:22:31 -04:00
polaris- 31dee93e84 Implement gdbstub 2015-10-04 11:16:59 -04:00
Lioncash 751fbfdcc3 general: Silence some warnings when using clang 2015-09-16 08:51:53 -04:00
Lioncash 60b3fc01a2 General: Replace NULL and '0' usages with nullptr where applicable 2015-09-11 14:59:49 -04:00
archshift 9e8383e296 DynCom: Converted all 0xE condition code checks to ConditionCode::AL 2015-09-05 22:24:42 -07:00
Lioncash dc1b024b80 dyncom: Simplify some comparisons in CondPassed 2015-08-26 00:10:23 -04:00
Lioncash 01dd833ffa dyncom: Change return type of CondPassed to bool 2015-08-25 23:59:01 -04:00
Yuri Kunde Schlesner 0fcabd2b11 Integrate the MicroProfile profiling library
This brings goodies such as a configurable user interface and
multi-threaded timeline view.
2015-08-24 22:16:28 -03:00
Yuri Kunde Schlesner 3efb205a68 Merge pull request #1025 from yuriks/heap-management
Kernel: Correct(er) handling of Heap and Linear Heap allocations
2015-08-22 14:01:57 -07:00
Yuri Kunde Schlesner e2c7954be5 Memory: Move address type conversion routines to memory.cpp/h
These helpers aren't really part of the kernel, and mem_map.cpp/h is
going to be moved there next.
2015-08-16 01:03:46 -03:00
Lioncash 46b0277cbf vfp: use std::swap where applicable 2015-08-15 19:08:51 -04:00
bunnei cebf245504 Merge pull request #1027 from lioncash/debugger
debugger: Add the ability to view VFP register contents
2015-08-13 18:13:25 -04:00
Emmanuel Gil Peyrot 5115d0177e ARM Core, Video Core, CitraQt, Citrace: Use CommonTypes types instead of the standard u?int*_t types. 2015-08-11 22:38:44 +01:00
aroulin 38c87733d9 arm_disasm: ARMv6 mul/div and abs media instructions
SMLAD, SMUAD, SMLSD, SMUSD, SMLALD, SMLSLD,
SMMLA, SMMUL, SMMLS
USAD8, USADA8
2015-08-11 12:48:28 +02:00
aroulin 4a1db13072 arm_disasm: ARMv6 parallel add/sub media instructions
{S, U, Q, UQ, SH, UH}{ADD16, ASX, SAX, SUB16, ADD8, SUB8}
2015-08-11 12:48:23 +02:00
aroulin 0be8e1bfb6 arm_disasm: ARMv6 reversal media instructions
REV, REV16, REVSH
Only their ARM encoding, Thumb encoding is still missing.
2015-08-09 13:52:51 +02:00
aroulin e4ff244288 arm_disasm: ARMv6 saturation media instructions
SSAT, SSAT16, USAT, USAT16
2015-08-09 01:31:10 +02:00
aroulin 47657a1817 arm_disasm: ARMv6 packing and sign-extend media instructions
PKH, SEL
SXTAB, SXTAB16, SXTB, SXTB16, SXTH, SXTAH
UXTAB, UXTAB16, UXTB, UXTB16, UXTH, UXTAH
2015-08-09 01:31:03 +02:00
Lioncash f48a89af8b Merge pull request #1026 from lioncash/disasm
arm_disasm: Remove unnecessary code
2015-08-07 07:29:27 -04:00
Lioncash 3b457a5876 arm_interface: Implement interface for retrieving VFP registers 2015-08-06 21:24:25 -04:00
Lioncash 59d5358068 arm_disasm: Remove unnecessary code
This part of disassembly only determines the opcode, there's no need for offset calculation here.
2015-08-06 19:55:41 -04:00
aroulin 3425cfe54a Disassembler: ARMv6K REX instructions 2015-08-06 15:50:54 +02:00
aroulin 5d81a2fd48 Disassembler: ARMv6K hint instructions 2015-08-06 15:25:08 +02:00
bunnei ce65925bc3 Merge pull request #1008 from lioncash/pc
dyncom: Handle the case where PC is the source register for STR/VSTM/VLDM
2015-07-30 10:44:50 -04:00
Lioncash 46663d657f dyncom: Remove an unused variable
This was used prior to InterpreterTranslate existing.
2015-07-29 12:21:16 -04:00
Lioncash 2e420aba3c dyncom: Handle the case where PC is the source register for STR/VSTM/VLDM 2015-07-29 10:57:47 -04:00
Lioncash 2182adff9e dyncom: Handle left-operand PC correctly for data-processing ops
This is considered deprecated in the ARM manual (using PC as an operand),
however, this is still able to be executed on the MPCore (which I'm quite
sure would be rare to begin with).
2015-07-28 20:14:08 -04:00
Lioncash 9be4ef3879 dyncom: Remove an unnecessary typedef 2015-07-28 03:41:25 -04:00
Lioncash 89540ea761 dyncom: Use enum class for instruction decoding results 2015-07-28 02:27:57 -04:00
Lioncash 7e4fb4db19 dyncom: Remove code duplication regarding thumb instructions 2015-07-27 22:22:00 -04:00
Lioncash a507ea23c1 dyncom: Migrate exclusive memory access control into armstate 2015-07-27 22:06:59 -04:00
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 6b73e4566b dyncom: Move arminit.cpp and armsupp.cpp into skyeye_common 2015-07-25 20:01:44 -04:00
Lioncash f7ba683dc3 armdefs: Remove unnecessary extern keywords 2015-07-25 18:32:57 -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
Yuri Kunde Schlesner 867c28ae03 Merge pull request #876 from linkmauve/include-cleanups
Cleanup includes, mostly in common
2015-07-10 16:36:12 -07:00
Lioncash e3e8ad48c1 vfp: Change return type of VFPInit from unsigned int to void. 2015-06-29 14:51:38 -04:00
Lioncash 32a6379bc8 vfp: Handle accesses to FPINST/FPINST2 system registers
Also has a side-benefit of correcting access to the FPEXC register.
2015-06-29 03:27:26 -04:00
Emmanuel Gil Peyrot f48b28ad27 Core, VideoCore: Replace or fix exit() calls. 2015-06-28 00:36:55 +01:00
Emmanuel Gil Peyrot aea15f5c73 Core: Cleanup core includes. 2015-06-28 00:36:54 +01:00
Emmanuel Gil Peyrot 8cf9eb7f43 Common: Fix FileUtil includes, and everything relying on those. 2015-06-28 00:36:53 +01:00
Lioncash 71858fc7cc vfp: Handle accesses to the VFP media feature registers
These are able to be accessed in any privilege mode.
2015-06-12 20:21:51 -04:00
Lioncash e817224f89 vfp: Implement VMOVBCR/VMOVBRC 2015-06-12 02:47:10 -04: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
bunnei 3a348a90fd VFP: Log as trace to get rid of spamming. 2015-05-22 19:42:44 -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
bunnei f0365f28c2 Merge pull request #772 from lioncash/warn
core/video_core: Fix a few warnings when compiling on MSVC.
2015-05-18 08:08:49 -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 773b1ef6bf vfp: Get rid of warnings
- Unary minus operator applied to unsigned type.
- Unsafe use of bool.
2015-05-14 13:54:15 -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
bunnei e83bc5b7ee dyncom: Removed irrelevant log. 2015-05-14 00:24:38 -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
bunnei 6223496a49 Merge pull request #752 from lioncash/flush
vfp: Handle flush-to-zero mode.
2015-05-11 21:43:33 -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 ffc51161f3 vfp: Handle flush-to-zero mode. 2015-05-11 15:56:02 -04:00