summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/mips/r4000.cpp
Commit message (Collapse)AuthorAgeFilesLines
* misc cpu: no need to check debug enabled flag manually hap2025-04-111-1/+1
|
* igs/igs_m027.cpp, igs/igs_m027xa.cpp: Miscellaneous improvements: Vas Crabb2024-10-101-2/+5
| | | | | | | | | | | | * igs/igs_m027.cpp: Added memory clear switch to clear memory contents when power is removed (hard reset with the switch on to clear NVRAM). * igs/igs_m027xa.cpp: Got rid of hopper from Crazy Bugs (V103JP) since there appears to be no way to use it and exposed hopper switch as a user input so it can still be tested. * igs/igs_m027xa.cpp: Got rid of third bank of DIP switches from Crazy Bugs (V103JP) as comments indicate it isn't physically present (although it is displayed in the input test). * Use mnemonic short names for clones.
* r4000: intention is no longer a mask Patrick Mackinlay2023-08-081-6/+6
|
* sgi/ip20: enable memory configuration Patrick Mackinlay2023-07-251-1/+1
| | | | * add a minimal nvram dump to set eaddr and netaddr
* Cleaned up logging across the codebase (GitHub #10183). (#11250) [Ryan Holtz] MooglyGuy2023-05-231-3/+1
| | | | | * Converted various logging patterns to use logmacro.h consistently. * Removed redefinitions of LOG_GENERAL. * Use LOGMASKED in more places.
* dimemory: Add the target address space to translate, wrap the constants Olivier Galibert2023-03-181-28/+30
| | | | divtlb: Wrap the constants
* Interrupt callback rationalization AJR2023-03-111-1/+1
| | | | | | | | | | | - Make CPUs pass interrupt return PC as a second argument to standard_irq_callback - Add interrupt return PC to "Stopped at interrupt" message produced by debugger 'gint' command - Add messages to trace logs whenever interrupts are accepted - Attempt to step over interrupt routines for applicable debugger commands - Eliminate standard_irq_callback_member wrapper method - Update many CPU cores to invoke standard_irq_callback at the start of or during interrupt processing, rather than at the end or when the input line changes - Remove IRQ callbacks for some input lines that never cause interrupts - mb88xx, mcs48: Add IRQ callbacks for internal interrupts
* r4000.cpp: partially implement secondary cache tag manipulation (#9923) Brice Onken2022-06-131-69/+171
|
* - Removed device_timer, device_timer_id, et al in favor of direct callback ↵ MooglyGuy2022-06-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | members. (#9788) Primarily, this removes device_t::device_timer, device_t::timer_set, device_t::synchronize, device_t::timer_expired, and device_timer_id. Use of device_timer often resulted in unnecessary trampolining in addition to switch/case overhead on a driver/device level, and additional logic to manage delegated vs. ID-based timers on a core level. In the worst cases, devices were performing a switch/case with only one valid case. device_scheduler::timer_set is marked deprecated as the only remaining direct uses are via the Lua engine and a few drivers that need refactoring anyway. The remaining uses occur via device_scheduler::synchronize. As a middle ground between the extremely short timer_alloc() and the extremely long machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(widget_device::contoso_tick), this)), a helper function in device_t has been added which can be invoked with the following syntax: timer_alloc(FUNC(widget_device::contoso_tick), this) - Additional changes/cleanups performed along the way: - Converted to use logmacro: * src/devices/bus/ieee488/hp9895.cpp * src/devices/bus/ieee488/remote488.cpp * src/devices/bus/isa/hdc.cpp * src/devices/bus/isa/omti8621.cpp * src/devices/bus/isa/sc499.cpp * src/devices/bus/vip/vp550.cpp * src/devices/cpu/i86/i186.cpp * src/devices/cpu/lc8670/lc8670.cpp * src/devices/machine/68230pit.cpp * src/devices/machine/corvushd.cpp * src/devices/machine/ds1994.cpp * src/devices/machine/ticket.cpp * src/mame/audio/pinsnd88.cpp * src/mame/drivers/notetaker.cpp * src/mame/machine/asic65.cpp * src/mame/machine/rmnimbus.cpp * src/mame/machine/victor9k_fdc.cpp * src/mame/video/uv201.cpp - Made usage of m_member prefix consistent: * src/devices/bus/isa/hdc.cpp * src/devices/bus/isa/omti8621.cpp * src/devices/bus/vme/vme_fccpu20.cpp * src/devices/machine/ds1386.cpp * src/devices/machine/i7220.cpp - Spacing consistency pass: * src/devices/bus/isa/hdc.cpp * src/devices/bus/isa/omti8621.cpp * src/devices/bus/thomson/nanoresau.cpp * src/devices/bus/ti99/internal/992board.cpp * src/devices/bus/ti99/internal/genkbd.cpp * src/devices/bus/ti99/internal/joyport/handset.cpp * src/devices/bus/vme/vme_fccpu20.cpp * src/devices/cpu/i86/i186.cpp * src/devices/cpu/lc8670/lc8670.cpp * src/devices/machine/68230pit.cpp * src/devices/machine/cop452.cpp * src/devices/machine/corvushd.cpp * src/devices/machine/hp_dc100_tape.cpp * src/devices/machine/hp_taco.cpp * src/devices/machine/meters.cpp * src/devices/machine/microtch.cpp * src/devices/machine/phi.cpp * src/devices/video/ef9365.cpp * src/devices/video/v9938.cpp * src/mame/drivers/alphaskop41xx.cpp * src/mame/drivers/myb3k.cpp * src/mame/drivers/notetaker.cpp * src/mame/drivers/wpc_an.cpp * src/mame/machine/midikbd.cpp * src/mame/machine/rmnimbus.cpp * src/mame/machine/wpc_lamp.cpp * src/mame/machine/wpc_out.cpp - Removed string-based ioport lookups: * src/devices/bus/ti99/internal/joyport/handset.cpp * src/devices/bus/ti99/internal/joyport/mecmouse.cpp * src/devices/bus/vme/vme_hcpu30.cpp * src/mame/machine/k7659kb.cpp * src/mame/machine/ti85.cpp - Adjustments to grammar/wording in comments * src/devices/bus/sms_ctrl/lphaser.cpp * src/devices/bus/sms_ctrl/sports.cpp * src/devices/bus/snes/event.cpp * src/devices/bus/snes/sa1.cpp * src/devices/bus/thomson/nanoresau.cpp * src/devices/bus/z88/z88.cpp * src/devices/machine/ds1386.cpp * src/devices/machine/vic_pl192.cpp - Favored BIT() macro for single-bit checks * src/devices/bus/ti99/internal/992board.cpp * src/devices/bus/ti99/joyport/handset.cpp * src/mame/drivers/notetaker.cpp * src/mame/machine/wpc_lamp.cpp * src/mame/machine/wpc_out.cpp - Removed C89-style variable declarations when noticed * src/devices/bus/isa/hdc.cpp * src/devices/bus/sms_ctrl/lphaser.cpp * src/devices/bus/ti99/joyport/mecmouse.cpp * src/devices/machine/acorn_vidc.cpp * src/devices/sound/ymz280b.cpp * src/devices/video/vic4567.cpp - Removed FUNCNAME to avoid compiler-specific #define checks in devices * src/devices/bus/vme/vme_fccpu20.cpp * src/devices/bus/vme/vme_hcpu30.cpp * src/devices/machine/68230pit.cpp * src/devices/machine/mc14411.cpp * src/mame/drivers/myb3k.cpp - Removed unecessary member prefixes/suffixes * src/devices/video/ef9340_1.cpp * src/mame/drivers/fuukifg2.cpp * src/mame/drivers/fuukifg3.cpp * src/mame/drivers/intv.cpp * src/mame/drivers/simpsons.cpp * src/mame/drivers/socrates.cpp * src/mame/drivers/special_gambl.cpp * src/mame/drivers/sprint4.cpp * src/mame/drivers/ti990_10.cpp * src/mame/drivers/tubep.cpp * src/mame/drivers/vectrex.cpp * src/mame/drivers/wpc_an.cpp * src/mame/drivers/wpc_dot.cpp * src/mame/drivers/wpc_flip1.cpp * src/mame/drivers/wpc_flip2.cpp * src/mame/machine/z80ne.cpp * src/mame/video/rollerg.cpp - Switched to lower-case hex constants * src/devices/video/ef9365.cpp * src/mame/machine/rmnimbus.cpp - Re-ordered driver overrides and function members * src/mame/drivers/boxer.cpp * src/mame/drivers/eurocom2.cpp * src/mame/drivers/exidy.cpp * src/mame/drivers/gpworld.cpp * src/mame/drivers/h19.cpp * src/mame/drivers/ibmpcjr.cpp * src/mame/drivers/mekd5.cpp * src/mame/drivers/mgolf.cpp * src/mame/drivers/myb3k.cpp * src/mame/drivers/nightmare.cpp * src/mame/drivers/notetaker.cpp * src/mame/drivers/ptcsol.cpp * src/mame/drivers/pwrview.cpp * src/mame/drivers/rabbit.cpp * src/mame/drivers/sitcom.cpp * src/mame/drivers/socrates.cpp * src/mame/drivers/sprint4.cpp * src/mame/drivers/techno.cpp * src/mame/drivers/thayers.cpp * src/mame/drivers/ti990_10.cpp * src/mame/drivers/ti990_4.cpp * src/mame/drivers/tv912.cpp * src/mame/drivers/tv990.cpp * src/mame/drivers/uchroma68.cpp * src/mame/drivers/vk100.cpp * src/mame/drivers/votrhv.cpp * src/mame/drivers/wicat.cpp * src/mame/drivers/wpc_an.cpp * src/mame/includes/abc80.h * src/mame/includes/asterix.h * src/mame/includes/fuukifg2.h * src/mame/includes/fuukifg3.h * src/mame/includes/gunbustr.h * src/mame/includes/intv.h * src/mame/includes/namcona1.h * src/mame/includes/newbrain.h * src/mame/includes/poly.h * src/mame/includes/prof80.h * src/mame/includes/rollerg.h * src/mame/includes/s11.h * src/mame/includes/segahang.h * src/mame/includes/simpsons.h * src/mame/includes/spacefb.h * src/mame/includes/tandy2k.h * src/mame/includes/trucocl.h * src/mame/includes/tubebp.h * src/mame/includes/vidbrain.h * src/mame/includes/wolfpack.h * src/mame/includes/wpc_dot.h - Made capitalization consistent on class members * src/devices/machine/meters.cpp * src/mame/drivers/namcona1.cpp * src/mame/drivers/notetaker.cpp -src/devices/bus/isa/hdc.cpp: * Removed fixed-size std::vector in favor of std::unique_ptr -src/devices/bus/isa/s3virge.cpp: * Moved unusually large (for a header) functions into .cpp from header -src/devices/bus/vip/vp550.cpp * Switched to required_device_array to simplify code paths -src/devices/machine/arm_iomd.cpp * Added initializers to constructor * Favored std::size over fixed static sizes -src/devices/machine/ds1386.cpp * Moved register #defines into header enums -src/devices/machine/mc68901.cpp * Removed unnecessary parameters and emu_timer::enable calls -src/devices/machine/mccs1850.cpp * Removed inline overuse -src/devices/machine/meters.cpp * Removed unused members -src/devices/machine/mos6526.cpp * Removed inline overuse -src/devices/machine/nsc810.cpp * Converted to arrays rather than individually-numbered members -src/devices/machine/pxa255.cpp * Simplified DMA transfer code -src/devices/machine/saa1043.cpp * Removed extraneous members in favor of resolve_all_safe -src/devices/machine/vic_pl192.cpp * Shifted constructors, start-up, and maps to be at the top of the source file -src/devices/machine/z8536.cpp * Removed stray uses of device_timer_id -src/devices/sound/cdp1869.cpp * Removed inline overuse -src/devices/sound/mos7360.cpp * Converted to arrays rather than individually-numbered members -src/emu/device.cpp * Removed ID-based timer_alloc * Removed timer_set * Removed synchronize * Removed timer_expired * Added shorthand timer_alloc to avoid lengthy machine().scheduler().timer_alloc() calls -src/emu/schedule.cpp * Removed now-unused m_id and m_device members -src/mame/audio/alesis.cpp * Added initializers to constructor -src/mame/drivers/alto2.cpp * Removed custom-named driver init in favor of driver_init override * Removed octal constant in favor of more standard hex -src/mame/drivers/astinvad.cpp * Fixed 'kamizake' typo -src/mame/drivers/tm990189.cpp * Removed unnecessary machine reset override -src/mame/drivers/unichamp.cpp * Removed custom-named driver init in favor of driver_init override -src/mame/drivers/votrhv.cpp * Fixed ROM_LOAD macros and region() usage in memory maps -src/mame/machine/victor9k_fdc.cpp * Made bracing style consistent across the file -src/mame/video/gime.cpp * Removed unnecessary void specifiers in function prototypes
* cpu/mips/r4000.cpp: Added TimerIntDis mux to IPEX5. (#9718) Brice Onken2022-05-131-2/+7
|
* src/devices/cpu: Remove #include "debugger.h" where no longer necessary AJR2022-04-061-1/+1
|
* r4000.cpp: Set TLB global bit in EntryLo0/1 on TLBR instruction (#9348) Brice Onken2022-02-281-2/+3
|
* Added helpers for 64-bit count leading zeroes/ones. Vas Crabb2021-06-131-2/+2
|
* r4000: simplify branch state Patrick Mackinlay2021-04-021-113/+56
|
* r4000: timing improvements Patrick Mackinlay2021-04-011-14/+54
| | | | | | * external clock is doubled internally * consume additional cycles for integer multiply/divide * streamline memory access
* Eliminate ARRAY_LENGTH template in favor of C++17's std::size AJR2021-02-141-10/+10
| | | | | | | | | | * osdcomm.h: Move definition of EQUIVALENT_ARRAY to coretmpl.h * sharc.cpp, gt64xxx.cpp, ym2413.cpp, gb_lcd.cpp, snes_ppu.cpp: Use STRUCT_MEMBER for save state registration * gio/newport.cpp, megadrive/svp.cpp, nes_ctrl/bcbattle.cpp, arm7.cpp, tms9995.cpp, pckeybrd.cpp, sa1110.cpp, sa1111.cpp, jangou_blitter.cpp, vic4567.cpp: Use std::fill(_n) instead of memset * emucore.h: Remove obsolete typedef
* r4000: save exception pc on reset Patrick Mackinlay2021-02-011-6/+12
|
* -osd: Clean up inline maths utilities. Vas Crabb2021-01-181-2/+2
| | | | | | | | | | * Removed inline assembly for operations compilers handle well. * Added ARM and AArch64 implementation for a few operations. * Added unsigned integer add with carry out operations. -cpu/drccache.cpp: Detect whether RWX pages are supported. -dynax.cpp: Improved a few hanafuda DIP switch descriptions.
* fix several genuine issues found by coverity Patrick Mackinlay2021-01-061-2/+2
|
* unicode.h: Updates AJR2020-12-151-0/+1
| | | | | - Remove from emu.h (except for UTF8_xxx macros, which have been transplanted to emucore.h since a lot of drivers use them) and osdepend.h - Add std::string_view overrides for uchar_from_utf8 and normalize_unicode
* Enable GCC implicit fallthrough warning. Vas Crabb2020-11-151-3/+4
| | | | | | I've guessed whether break or [[fallthrough]] is appropriate. In cases where it looked particularly suspicious, I added a FIXME comment. All of these changes should be reviewed by someone familiar with the code.
* devices/cpu/r4000.cpp: initialized one variable to fix problem in devnoclear ↵ Ivan Vangelista2020-06-041-0/+2
| | | | build (nw)
* appease vs2019_clang with llvm 10.0 smf-2020-04-251-2/+2
|
* New working machines mooglyguy2020-03-051-32/+535
| | | | | | | -------------------- Indy (R5000, 150MHz) [Ryan Holtz] -r4000: Improved R5000 support; FCR31 now supports 8 condition flags, added MOVF/MOVT support, fixed MOVZ/MOVN ops. [Ryan Holtz]
* -r4000: Added basic R5000 support. [Ryan Holtz] MooglyGuy2020-03-041-6/+213
|
* r4000: cosmetic change (nw) Patrick Mackinlay2020-02-061-0/+2
|
* r4000: identify soft reset (nw) Patrick Mackinlay2020-01-231-1/+6
|
* r4000: fix bad virtual address for [ls][dw][lr] exceptions Patrick Mackinlay2020-01-071-29/+38
| | | | | | (nw) * get rid of _t type name suffixes * improve logging
* -r4000: Report the correct sub-revision for the R4600, and allow specific ↵ mooglyguy2019-09-081-2/+2
| | | | | | | | | | R4x00 types to specify the FPU ID as well. [Ryan Holtz] -indigo: Switched to using the new R4000 core. [Ryan Holtz] -hal2: Corrected chip revision ID to match real hardware. [Ryan Holtz] -sgi_mc: Correctly flag EISA bus present on both Indigo 2 and Indy, as VINO uses the EISA signals for GIO64 arbitration. [Ryan Holtz]
* r4000: revert unwanted change (nw) Patrick Mackinlay2019-08-151-2/+1
|
* debuggdbstub: uncomment parameters (nw) Patrick Mackinlay2019-08-151-1/+2
| | | | These unused parameters don't cause any warnings, so I suggest they shouldn't be commented; make the implementations match their declarations.
* r4000: interrupt/exception changes (nw) Patrick Mackinlay2019-08-151-17/+6
| | | | | | | | Rework interrupt handling to address two issues: * clean up software interrupt detection * prioritize instruction fetch tlb miss exceptions over interrupts when interrupt occurs while PC is unmapped The second issue is speculative but reasonably likely, and brings r4000 into line with mips1, where the need for this logic was discovered.
* r4000: mask cp0 registers (nw) Patrick Mackinlay2019-08-011-12/+47
|
* -r4000: Added bus error functionality. [Ryan Holtz] mooglyguy2019-05-251-6/+40
| | | | | | | | -newport: Fixed VRAM tests and several fast-clear bugs. [Ryan Holtz] -hpc3: Fixed several SGI IDE tests. [Ryan Holtz] -ioc2: Added stubs for modern PS/2 keyboard controller, nw
* r4000: fix brain damage (nw) Patrick Mackinlay2019-05-231-1/+1
|
* r4000: sgi ide fixes (nw) Patrick Mackinlay2019-05-231-55/+271
| | | | Corrects some TLB diagnostic errors (remaining ones require implementing a data cache), and the FPU "underflow" test (really an unimplemented instruction exception, not an underflow) by checking for denormalized or quiet NaN operands for all floating point arithmetic instructions..
* r4000: housekeeping (nw) Patrick Mackinlay2019-05-131-22/+21
|
* -ioc2: Fixed mappable interrupt checks. Fixes IRIX 6.5 installer hanging on ↵ mooglyguy2019-05-121-44/+8
| | | | | | keyboard input. [Ryan Holtz] -r4000: Changed LL/SC behaviour to not use a write tap. Possibly incorrect behaviour, but IRIX 6.5 installer doesn't hang anymore on miniroot creation, nw
* r4000: minor tweaks (nw) Patrick Mackinlay2019-05-071-40/+16
| | | | | | | * relaxed address validity checks in 32-bit mode allowing simplified base + offset computation * removed inaccurate/partial cycle counting * slight adjustment to ll/sc logic * corrected address alignment exception type
* mips: preserve upper 32 bits for single-precision fp operations (nw) Patrick Mackinlay2019-04-251-7/+25
| | | | | | | While this behaviour is undefined according to the MIPS R4000 Microprocessor User's Manual, various factors point toward it most likely being correct, including: 1. The fact MIPS-I exposes 16x64-bit floating-point registers, but internally implements them as pairs of 32-bit registers (with only the even-numbered pairs being valid for arithmetic operations), making it somewhat likely MOV.S, like LWC1 and SWC1, can access either half. 2. Explicit mention in IDT documentation and "See MIPS Run", i.e. "The odd-numbered registers can be accessed by move and load/store instructions", and other commentary. 3. The presence of paired-single operations in later MIPS32/64 specifications, which operate on independent single-precision values stored in each of the lower and upper halves of a single floating-point register.
* (nw) Clean up the mess on master Vas Crabb2019-03-261-0/+3067
| | | | | | | | | | | | | This effectively reverts b380514764cf857469bae61c11143a19f79a74c5 and c24473ddff715ecec2e258a6eb38960cf8c8e98e, restoring the state at 598cd5227223c3b04ca31f0dbc1981256d9ea3ff. Before pushing, please check that what you're about to push is sane. Check your local commit log and ensure there isn't anything out-of-place before pushing to mainline. When things like this happen, it wastes everyone's time. I really don't need this in a week when real work™ is busting my balls and I'm behind where I want to be with preparing for MAME release.
* Revert "conflict resolution (nw)" andreasnaive2019-03-251-3067/+0
| | | | | This reverts commit c24473ddff715ecec2e258a6eb38960cf8c8e98e, reversing changes made to 009cba4fb8102102168ef32870892438327f3705.
* mips3: trivial changes (nw) Patrick Mackinlay2019-02-181-42/+9
| | | | | | * use the new 64x64 multiply helpers * make sure unordered exceptions are generated by abs.fmt * correct an unimportant drc flag
* r4000: Fixed ABS.S and ABS.D. Fixes X server crashing in IRIX. [Ryan Holtz] MooglyGuy2019-02-161-0/+8
|
* r4000: minor fixes (nw) Patrick Mackinlay2019-02-141-39/+31
| | | | | | * paranoid approach for 64-bit mode check * sign extension bugs * signed multiply bug
* r4000: small performance tweak (nw) Patrick Mackinlay2019-02-111-26/+41
| | | | Added a primitive mru scheme for tlb searches, resulting in an average of ~1.5 iterations per scan and 2-3% speedup in one test case. Also removed the confusing reverse-endian logic from lwl/lwr and friends because apparently no commercial software implementation has ever used it (and wasn't supported in any of the other instructions anyway).
* Fix compile, nw MooglyGuy2019-02-101-2/+2
|
* -r4000: Added the ability to CTC and CFC from unknown fpr30, which IRIX does ↵ MooglyGuy2019-02-101-0/+6
| | | | often, nw
* r4000: tweak address calculation (nw) Patrick Mackinlay2019-02-081-103/+109
|
* r4000: size does matter (nw) Patrick Mackinlay2019-02-041-4/+4
|