summaryrefslogtreecommitdiff
path: root/sim/arm/armemu.h
Commit message (Collapse)AuthorAgeFilesLines
* Add support for ARM v6 instructions.Nick Clifton2015-06-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.in (SIM_EXTRA_CFLAGS): Add -lm. * armdefs.h (ARMdval, ARMfval): New types. (ARM_VFP_reg): New union. (struct ARMul_State): Add VFP_Reg and FPSCR fields. (VFP_fval, VFP_uword, VFP_sword, VFP_dval, VFP_dword): Accessor macros for the new VFP_Reg field. * armemu.c (handle_v6_insn): Add code to handle MOVW, MOVT, QADD16, QASX, QSAX, QSUB16, QADD8, QSUB8, UADD16, USUB16, UADD8, USUB8, SEL, REV, REV16, RBIT, BFC, BFI, SBFX and UBFX instructions. (handle_VFP_move): New function. (ARMul_Emulate16): Add checks for newly supported v6 instructions. Add support for VMRS, VMOV and MRC instructions. (Multiply64): Allow nRdHi == nRm and/or nRdLo == nRm when operating in v6 mode. * armemu.h (t_resolved): Define. * armsupp.c: Include math.h. (handle_VFP_xfer): New function. Handles VMOV, VSTM, VSTR, VPUSH, VSTM, VLDM and VPOP instructions. (ARMul_LDC): Test for co-processor 10 or 11 and pass call to the new handle_VFP_xfer function. (ARMul_STC): Likewise. (handle_VFP_op): New function. Handles VMLA, VMLS, VNMLA, VNMLS, VNMUL, VMUL, VADD, VSUB, VDIV, VMOV, VABS, VNEG, VSQRT, VCMP, VCMPE and VCVT instructions. (ARMul_CDP): Test for co-processor 10 or 11 and pass call to the new handle_VFP_op function. * thumbemu.c (tBIT, tBITS, ntBIT, ntBITS): New macros. (test_cond): New function. Tests a condition and returns non-zero if the condition has been met. (handle_IT_block): New function. (in_IT_block): New function. (IT_block_allow): New function. (ThumbExpandImm): New function. (handle_T2_insn): New function. Handles T2 thumb instructions. (handle_v6_thumb_insn): Add next_instr and pc parameters. (ARMul_ThumbDecode): Add support for IT blocks. Add support for v6 instructions. * wrapper.c (sim_create_inferior): Detect a thumb address and call SETT appropriately.
* sim: arm: clean up misc warningsMike Frysinger2015-03-301-25/+26
| | | | Also delete a few unused funcs.
* Add support for instruction level tracing to the ARM simulator.Nick Clifton2014-03-141-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * wrapper.c (op_print): New function. (sim_dis_read): New function. (print_insn): New function - disassembles the given instruction. (sim_trace): Note that tracing is now allowed. (sim_create_inferior): Default to emulating v6. Initialise the disassembler machinery. (sim_target_parse_command_line): Add support for -t -d and -z options. (sim_target_display_usage): Note existence of -d and -z options. (sim_open): Parse -t -d and -z options. * armemu.h: Add exports of trace, disas and trace_funcs. Add prototype for print_insn. * armemu.c (ARMul_Emulate26): Add tracing code. Delete unused variables. * thumbemu (handle_v6_thumb_insn): Delete unused variable Rd. Move Rm variable into switch cases. Add tracing code. * armcopro.c (XScale_cp15_init): Add a return value. (XScale_cp13_init): Likewise. (XScale_cp14_init): Likewise. (XScale_cp15_LDC): Delete unused function. (XScale_cp15_STC): Likewise. * maverick.c: Delete comment inside comment. (DSPInit): Delete unused function. (DSPMCR4): Fix compile time warning about missing parenthesis. (DSPMCR5): Likewise. (DSPCDP6): Delete unused variable opcode2.
* Prevent writes to R15 via LDR or LDM from changing the ARM/Thumb state in ↵David McQuillan2014-03-141-1/+1
| | | | | | | | | | pre-v5 architectures. PR sim/8388 * armemu.c (WriteR15Load): New function. Determines if the state can be changed upon a write to R15. (LoadMult): Use WriteR15Load. * armemu.h (WRITEDESTB): Use WriteR15Load.
* [sim] Update old contact info in GPL license noticesJoel Brobecker2012-12-191-2/+1
| | | | | | sim/ChangeLog: Update old contact info in GPL license notices.
* Update sim copyright headers from GPLv2-or-later to GPLv3-or-later.Joel Brobecker2012-12-191-1/+1
| | | | | | gdb/sim/ChangeLog: Update the non-FSF-copyrighted files in sim to GPLv3 or later.
* Update the address of the FSF organizationNick Clifton2005-05-121-1/+1
|
* Add Cirrus Maverick support to arm simulatorNick Clifton2003-03-201-0/+13
|
* Fix parameters passed to CPRead[13] and CPRead[14].Nick Clifton2002-01-101-28/+47
|
* Add support for XScale's coprocessor access check register.Nick Clifton2001-10-181-197/+214
| | | | Fix formatting.
* Add support for disabling alignment checks when performing GDB interfaceNick Clifton2001-02-281-1/+1
| | | | | calls or SWI emulaiton routines. (Alignment checking code has not yet been contributed).
* Fix definition of NEGBRANCHNick Clifton2001-02-121-1/+2
|
* Add support for ARM's v5TE architecture and Intel's XScale extenstionsNick Clifton2000-11-301-1/+22
|
* Replace StrongARM property with v4 and v5 properties.Nick Clifton2000-09-151-9/+23
|
* * armdefs.h (struct ARMul_State): Add is_StrongARM.Alexandre Oliva2000-07-041-4/+8
| | | | | | | | | | (ARM_Strong_Prop, STRONGARM): Define. * arminit.c (ARMul_NewState): Reset is_StrongARM. (ARMul_SelectProcessor): Set is_StrongARM. * wrapper.c (sim_create_inferior): Use bfd machine type to determine processor type to emulate. * armemu.h (BUSUSEDINCPCS, BUSUSEDINCPCN): Don't increment PC when emulating StrongARM.
* * armemu.h (INSN_SIZE): New macro.Alexandre Oliva2000-07-041-1/+10
| | | | | | | (SET_ABORT): Save CPSR in SPSR and set LR. * armemu.c (ARMul_Emulate, isize): Set to INSN_SIZE. (WriteR15, WriteSR15): Do not discard bit 1 in Thumb mode. * arminit.c (ARMul_Abort): Use new SETABORT and INSN_SIZE.
* * armemu.h (WRITEDESTB): New macro.Alexandre Oliva2000-07-041-0/+5
| | | | | | | | | * armemu.c (ARMul_Emulate26, bl): Use WriteR15Branch() to modify PC. Moved the existing logic... (WriteR15Branch): ... here. New function. (WriteR15, WriteSR15): Drop the two least significant bits. (LoadSMult): Use WriteR15Branch() to modify PC. (LoadMult): Use WRITEDESTB() instead of WRITEDEST().
* * armemu.h (GETSPSR): Call ARMul_GetSPSR().Alexandre Oliva2000-07-041-1/+1
| | | | | | | | * armsupp.c (ARMul_CPSRAltered): Zero out bits as they're extracted from state->Cpsr, but preserve the unused bits. (ARMul_GetCPSR): Get bits preserved in state->Cpsr. (ARMul_GetSPSR, ARMul_FixCPSR): Use ARMul_GetCPSR() to get the full CPSR word.
* * armemu.h (PSR_FBITS, PSR_SBITS, PSR_XBITS, PSR_CBITS): New.Alexandre Oliva2000-07-041-3/+9
| | | | | | | | | (SETPSR_F, SETPSR_S, SETPSR_X, SETPSR_C): New macros. (SETPSR, SET_INTMODE, SETCC): Removed. * armsupp.c (ARMul_FixCPSR, ARMul_FixSPSR): Do not test bit mask. Use SETPSR_* to modify PSR. (ARMul_SetCPSR): Load all bits from value. * armemu.c (ARMul_Emulate, msr): Do not test bit mask.
* * armemu.h (NEGBRANCH): Do not overwrite the two most significantAlexandre Oliva2000-06-201-1/+1
| | | | bits of the offset.
* Fix compile time warning messages.Nick Clifton2000-02-081-2/+2
|
* import gdb-2000-02-04 snapshotJason Molenda2000-02-051-40/+48
|
* import gdb-2000-01-26 snapshotJason Molenda2000-01-261-0/+3
|
* Initial creation of sourceware repositorygdb-4_18-branchpointStan Shebs1999-04-161-0/+425