summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/cpu/drcbec.c
Commit message (Collapse)AuthorAgeFilesLines
* fixed most of the -Wunreachable-code-break and -Wunreachable-code-return ↵ Oliver Stöneberg2014-09-081-4/+2
| | | | warnings of clang 3.5 when compiling MESS (nw)
* Bulk convert files that already had standard BSD license in my name Aaron Giles2013-10-161-31/+2
| | | | to new license tagged form.
* Fix an assertion in the DRC C back-end -nw- Phil Bennett2013-05-281-1/+1
|
* Cleanups and version bumpmame0148 Miodrag Milanovic2013-01-111-382/+382
|
* Clean-ups and version bumpmame0147 Miodrag Milanovic2012-09-171-3/+3
| | | note: hoarded dump removed too from coco_cart.xml, this will not be tolerated
* added missing \n to some fatalerror() calls (no whatsnew) Oliver Stöneberg2012-09-071-3/+3
|
* DRC: Give C backend x86/x64 shift=0 behavior for consistency [R. Belmont] R. Belmont2012-09-071-8/+21
|
* drcbec: Calculate NZ flags properly for 32x32=32 form of MULS. [R. Belmont] R. Belmont2012-08-121-1/+2
|
* drcbec: compute flags correctly for ADDC/SUBB [R. Belmont] R. Belmont2012-08-101-2/+16
|
* Switch to using delegates for some callbacks: Aaron Giles2011-04-271-2/+3
| | | | | | | | | | | | - non-device timer callbacks - machine state changing callbacks - configuration callbacks - per-screen VBLANK callbacks - DRC backend callbacks For the timer case only, I added wrappers for the old-style functions. Over time, drivers should switch to device timers instead, reducing the number of timers that are directly allocated through the scheduler.
* Cleanups and version bump.mame0141u1 Aaron Giles2011-01-241-169/+169
|
* Redo most of the DRC/backend support as C++ Aaron Giles2011-01-171-928/+862
| | | | | | | | | | | | | | Yes, it is intentional that the x86/x64 backends compile everywhere. Backends are now derived from drcbe_interface and implement several required overrides. x86emit.h now uses namespaces so that the x86/x64 emitters can co-exist. New file uml.h/uml.c actually describes the UML language, separating out several concepts from drcuml.c. Lots of other changes/fixes.
* C++-ified the DRC backend utility helpers. Aaron Giles2011-01-061-28/+22
|
* Convert drccache to C++ Aaron Giles2011-01-051-6/+6
|
* running_device -> device_t Aaron Giles2010-12-311-3/+3
| | | | | They both already existed. No sense in having two names for the same object type.
* Remove memory_read/write_byte/word/dword/qword* variants. Again, this is mostly Aaron Giles2010-08-191-28/+28
| | | | | | | | | | | | | | | | | | bulk search & replace: S: memory_read_([bytewordq]+)_[0-9lbe_maskd]+( *)\(( *)([^,]+)( *),( *) R: \4->read_\1\2\(\3 S: memory_read_([bytewordq]+)( *)\(( *)([^,]+)( *),( *) R: \4->read_\1\2\(\3 S: memory_write_([bytewordq]+)_[0-9lbe_maskd]+( *)\(( *)([^,]+)( *),( *) R: \4->write_\1\2\(\3 S: memory_write_([bytewordq]+)( *)\(( *)([^,]+)( *),( *) R: \4->write_\1\2\(\3 Gets 99% of the cases.
* Replace "const address_space" with "address_space" throughout the system. Aaron Giles2010-08-191-1/+1
| | | | | | | | | | | The purpose of making it const before was to discourage direct tampering, but private/protected does a better job of that now anyhow, and it is annoying now. s/const[ \t]+address_space\b/address_space/g; Is basically what I did.
* Changed CPU callbacks to use cpu_device, eliminating a bunch of casting. Aaron Giles2010-06-081-1/+1
|
* WARNING: There are likely to be regressions in both functionality and Aaron Giles2010-06-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | performance as a result of this change. Do not panic; report issues to the list in the short term and I will look into them. There are probably also some details I forgot to mention. Please ask questions if anything is not clear. NOTE: This is a major internal change to the way devices are handled in MAME. There is a small impact on drivers, but the bulk of the changes are to the devices themselves. Full documentation on the new device handling is in progress at http://mamedev.org/devwiki/index.php/MAME_Device_Basics Defined two new casting helpers: [Aaron Giles] downcast<type>(value) should be used for safe and efficient downcasting from a base class to a derived class. It wraps static_cast<> by adding an assert that a matching dynamic_cast<> returns the same result in debug builds. crosscast<type>(value) should be used for safe casting from one type to another in multiple inheritance scenarios. It compiles to a dynamic_cast<> plus an assert on the result. Since it does not optimize down to static_cast<>, you should prefer downcast<> over crosscast<> when you can. Redefined running_device to be a proper C++ class (now called device_t). Same for device_config (still called device_config). All devices and device_configs must now be derived from these base classes. This means each device type now has a pair of its own unique classes that describe the device. Drivers are encouraged to use the specific device types instead of the generic running_device or device_t classes. Drivers that have a state class defined in their header file are encouraged to use initializers off the constructor to locate devices. [Aaron Giles] Removed the following fields from the device and device configuration classes as they never were necessary or provided any use: device class, device family, source file, version, credits. [Aaron Giles] Added templatized variant of machine->device() which performs a downcast as part of the device fetch. Thus machine->device<timer_device>("timer") will locate a device named "timer", downcast it to a timer_device, and assert if the downcast fails. [Aaron Giles] Removed most publically accessible members of running_device/device_t in favor of inline accessor functions. The only remaining public member is machine. Thus all references to device->type are now device->type(), etc. [Aaron Giles] Created a number of device interface classes which are designed to be mix- ins for the device classes, providing specific extended functionality and information. There are standard interface classes for sound, execution, state, nvram, memory, and disassembly. Devices can opt into 0 or more of these classes. [Aaron Giles] Converted the classic CPU device to a standard device that uses the execution, state, memory, and disassembly interfaces. Used this new class (cpu_device) to implement the existing CPU device interface. In the future it will be possible to convert each CPU core to its own device type, but for now they are still all CPU devices with a cpu_type() that specifies exactly which kind of CPU. [Aaron Giles] Created a new header devlegcy.h which wraps the old device interface using some special template classes. To use these with an existing device, simply remove from the device header the DEVICE_GET_INFO() declaration and the #define mapping the ALL_CAPS name to the DEVICE_GET_INFO. In their place #include "devlegcy.h" and use the DECLARE_LEGACY_DEVICE() macro. In addition, there is a DECLARE_LEGACY_SOUND_DEVICE() macro for wrapping existing sound devices into new-style devices, and a DECLARE_LEGACY_NVRAM_DEVICE() for wrapping NVRAM devices. Also moved the token and inline_config members to the legacy device class, as these are not used in modern devices. [Aaron Giles] Converted the standard base devices (VIDEO_SCREEN, SPEAKER, and TIMER) from legacy devices to the new C++ style. Also renamed VIDEO_SCREEN to simply SCREEN. The various global functions that were previously used to access information or modify the state of these devices are now replaced by methods on the device classes. Specifically: video_screen_configure() == screen->configure() video_screen_set_visarea() == screen->set_visible_area() video_screen_update_partial() == screen->update_partial() video_screen_update_now() == screen->update_now() video_screen_get_vpos() == screen->vpos() video_screen_get_hpos() == screen->hpos() video_screen_get_vblank() == screen->vblank() video_screen_get_hblank() == screen->hblank() video_screen_get_width() == screen->width() video_screen_get_height() == screen->height() video_screen_get_visible_area() == screen->visible_area() video_screen_get_time_until_pos() == screen->time_until_pos() video_screen_get_time_until_vblank_start() == screen->time_until_vblank_start() video_screen_get_time_until_vblank_end() == screen->time_until_vblank_end() video_screen_get_time_until_update() == screen->time_until_update() video_screen_get_scan_period() == screen->scan_period() video_screen_get_frame_period() == screen->frame_period() video_screen_get_frame_number() == screen->frame_number() timer_device_adjust_oneshot() == timer->adjust() timer_device_adjust_periodic() == timer->adjust() timer_device_reset() == timer->reset() timer_device_enable() == timer->enable() timer_device_enabled() == timer->enabled() timer_device_get_param() == timer->param() timer_device_set_param() == timer->set_param() timer_device_get_ptr() == timer->get_ptr() timer_device_set_ptr() == timer->set_ptr() timer_device_timeelapsed() == timer->time_elapsed() timer_device_timeleft() == timer->time_left() timer_device_starttime() == timer->start_time() timer_device_firetime() == timer->fire_time() Updated all drivers that use the above functions to fetch the specific device type (timer_device or screen_device) and call the appropriate method. [Aaron Giles] Changed machine->primary_screen and the 'screen' parameter to VIDEO_UPDATE to specifically pass in a screen_device object. [Aaron Giles] Defined a new custom interface for the Z80 daisy chain. This interface behaves like the standard interfaces, and can be added to any device that implements the Z80 daisy chain behavior. Converted all existing Z80 daisy chain devices to new-style devices that inherit this interface. [Aaron Giles] Changed the way CPU state tables are built up. Previously, these were data structures defined by a CPU core which described all the registers and how to output them. This functionality is now part of the state interface and is implemented via the device_state_entry class. Updated all CPU cores which were using the old data structure to use the new form. The syntax is currently awkward, but will be cleaner for CPUs that are native new devices. [Aaron Giles] Converted the okim6295 and eeprom devices to the new model. These were necessary because they both require multiple interfaces to operate and it didn't make sense to create legacy device templates for these single cases. (okim6295 needs the sound interface and the memory interface, while eeprom requires both the nvram and memory interfaces). [Aaron Giles] Changed parameters in a few callback functions from pointers to references in situations where they are guaranteed to never be NULL. [Aaron Giles] Removed MDRV_CPU_FLAGS() which was only used for disabling a CPU. Changed it to MDRV_DEVICE_DISABLE() instead. Updated drivers. [Aaron Giles] Reorganized the token parsing for machine configurations. The core parsing code knows how to create/replace/remove devices, but all device token parsing is now handled in the device_config class, which in turn will make use of any interface classes or device-specific token handling for custom token processing. [Aaron Giles] Moved many validity checks out of validity.c and into the device interface classes. For example, address space validation is now part of the memory interface class. [Aaron Giles] Consolidated address space parameters (bus width, endianness, etc.) into a single address_space_config class. Updated all code that queried for address space parameters to use the new mechanism. [Aaron Giles]
* Correct a long-standing design flaw: device configuration state Aaron Giles2010-01-181-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | is now separate from runtime device state. I have larger plans for devices, so there is some temporary scaffolding to hold everything together, but this first step does separate things out. There is a new class 'running_device' which represents the state of a live device. A list of these running_devices sits in machine->devicelist and is created when a running_machine is instantiated. To access the configuration state, use device->baseconfig() which returns a reference to the configuration. The list of running_devices in machine->devicelist has a 1:1 correspondance with the list of device configurations in machine->config->devicelist, and most navigation options work equally on either (scanning by class, type, etc.) For the most part, drivers will now deal with running_device objects instead of const device_config objects. In fact, in order to do this patch, I did the following global search & replace: const device_config -> running_device device->static_config -> device->baseconfig().static_config device->inline_config -> device->baseconfig().inline_config and then fixed up the compiler errors that fell out. Some specifics: Removed device_get_info_* functions and replaced them with methods called get_config_*. Added methods for get_runtime_* to access runtime state from the running_device. DEVICE_GET_INFO callbacks are only passed a device_config *. This means they have no access to the token or runtime state at all. For most cases this is fine. Added new DEVICE_GET_RUNTIME_INFO callback that is passed the running_device for accessing data that is live at runtime. In the future this will go away to make room for a cleaner mechanism. Cleaned up the handoff of memory regions from the memory subsystem to the devices.
* Within src/emu, basic conversions: Aaron Giles2010-01-121-1/+1
| | | | | | devtag_get_device ... machine->device() memory_find_address_space ... device->space()
* First round of an attempted cleanup of header files in the system. Aaron Giles2010-01-101-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Created new central header "emu.h"; this should be included by pretty much any driver or device as the first include. This file in turn includes pretty much everything a driver or device will need, minus any other devices it references. Note that emu.h should *never* be included by another header file. - Updated all files in the core (src/emu) to use emu.h. - Removed a ton of redundant and poorly-tracked header includes from within other header files. - Temporarily changed driver.h to map to emu.h until we update files outside of the core. Added class wrapper around tagmap so it can be directly included and accessed within objects that need it. Updated all users to embed tagmap objects and changed them to call through the class. Added nicer functions for finding devices, ports, and regions in a machine: machine->device("tag") -- return the named device, or NULL machine->port("tag") -- return the named port, or NULL machine->region("tag"[, &length[, &flags]]) -- return the named region and optionally its length and flags Made the device tag an astring. This required touching a lot of code that printed the device to explicitly fetch the C-string from it. (Thank you gcc for flagging that issue!)
* Changes to sync with new toolchain: Aaron Giles2010-01-031-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Removed CPP_COMPILE option. All files (except expat and zlib) are now compiled as C++ by default. For now, imagine nothing has changed. The goal is not to go hog-wild with C++isms, but to leverage it where it makes the most sense. 2. Mapped INLINE to plain old C++ inline now, fixing several cases where this was problematic. 3. Marked global const structures explicitly extern since consts are locally-scoped by default in C++. 4. Added new 'default' make target which just builds the emulator. Use 'make all' to build everything including the tools. 5. 64-bit builds now get a '64' suffix on them. We might want to just make this true for Windows builds, but it's on for everyone at the moment. 6. (Windows) Removed UNICODE option. UNICODE is enabled by default on all Windows builds now. The 32-bit version links against libunicows.a for continued Win9x compatibility. 7. (Windows) Removed hacks surrounding unicode handling of main(). They are no longer necessary with the new tools.
* Results of running the latest srcclean. Aaron Giles2009-12-281-1/+1
|
* Enhanced the UML opcodes for LOAD, LOADS, and STORE to support Aaron Giles2009-12-131-6/+298
| | | | | | | | | | arbitrary scaling factors. Previously, specifying a size implied a scaling factor equal to the size (i.e., specifying DWORD meant the index was scaled by 4). This is still the default. However, now you can specify the scale explicitly for other cases. For example, you can specify DWORD_x1 to fetch a DWORD but don't scale the index at all, or BYTE_x8 to fetch a BYTE while scaling the index by 8. Updated all backends to make this work.
* Added missing casts and made other tweaks. The entire project Aaron Giles2009-04-271-0/+1
| | | | | can now be optionally compiled with the C++ compiler (mingw g++ only for the moment; MSVC still has issues).
* Moved some of the CPU cores over to use get_safe_token like other devices. Aaron Giles2009-03-121-13/+13
| | | | Also cleaned them so they compile.
* From: Atari Ace [mailto:atari_ace@verizon.net] Aaron Giles2008-12-071-1/+0
| | | | | | | | | | | | | | | | | | Sent: Saturday, December 06, 2008 4:52 PM To: submit@mamedev.org Cc: atariace@hotmail.com Subject: [patch] Deprecat.h cleanup Hi mamedev, This patch changes some global Machine references to use machine, device->machine, ... instead, and removes any unneeded #include "deprecat.h" lines as well (about 10% of them in fact). It was generated using the attached script, and then reverting some cases where it was overzealous. ~aa
* Cleanups and version bump for 0.128u4.mame0128u4 Aaron Giles2008-11-241-1/+1
|
* Removed memory context switch. Let the fun begin. Aaron Giles2008-11-241-28/+33
|
* Debugger interfaces cleanup. Still more to do but this compiles and Aaron Giles2008-11-211-3/+5
| | | | | | | works. Added callback parameters to the expression engine. Improved CPU parsing so you can use a CPU tag or index in most commands that take one. Switched to passing CPU and address space objects around where appropriate. Lots of other minor tweaks.
* Another big one. Aaron Giles2008-11-201-28/+28
| | | | | | | | | | | | | | | | | | | | Moved memory global state into a struct hanging off of the machine. Updated almost all memory APIs to take an address_space * where appropriate, and updated all callers. Changed memory internals to use address spaces where appropriate. Changed accessors to point to the memory_* functions instead of the address space-specific functions. Improved internal handling of watchpoints. Added cputag_* functions: cputag_reset(), cputag_get_index(), cputag_get_address_space(). These just expand via macros to an initial fetch of the CPU via cputag_get_cpu() followed by the standard CPU call. Added debugger_interrupt_hook() and debugger_exception_hook() calls which intelligently look at the debugger flags before calling. Did minimal cleanup of debugger, mainly moving CPU-specific data to hang off of the CPU classdata for more direct access.
* WARNING: this compiles, but not fully cleanly, and a number of drivers Aaron Giles2008-11-141-28/+28
| | | | | | | | | | | | | | | | are broken. Changed READ/WRITE handlers to accept an address_space * instead of a machine *. The address_space object was enhanced to contain a machine and a pointer to the relevant CPU object. Fixed a number of errors found by the compiler, mostly in the core and CPU/sound handlers, but there is a lot remaining to fix. Added new function cpu_get_address_space() to fetch the address space for calling in manually to these functions. In some instances, code which should eventually be converted to a device is hard-coding fetching the program space of CPU #0 in order to have something valid to pass.
* From Oliver Stoeneberg [oliverst@online.de] Aaron Giles2008-09-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | This contains three different patches: 20080829.patch Introducing the running_machine* parameter in a few more places. Next step would be to make the execute_* function aware of it, if that's OK. Also used the machine parameter in memory.c were it's available. 20080829_1.patch The already discussed and probably being rejected removal of dreprecat.h from debugger.h. I think this is a low-risk patch (we had worse cleanups) and it lowers the risk of new code using deprecated function beign introduced in MAME/MESS, because there is no invisible inclusion of deprecat.h anymore (I think one driver - kofball.c - got it with deprecated code). 20080829_2.patch The last Machine -> machine conversion I had sitting in my local tree. I know the proper way is to turn them into devices, but I still haven't looked into that.
* Fixed 64-bit writes in C back-end. Aaron Giles2008-07-011-35/+33
|
* Removed DEBUGGER flag from makefile and ENABLE_DEBUGGER Aaron Giles2008-06-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | macro from the source code. All MAME builds now include the debugger, and it is enabled/disabled exclusively by the runtime command-line/ini settings. This is a minor speed hit for now, but will be further optimized going forward. Changed the 'd' suffix in the makefile to apply to DEBUG builds (versus DEBUGGER builds as it did before). Changed machine->debug_mode to machine->debug_flags. These flags now indicate several things, such as whether debugging is enabled, whether CPU cores should call the debugger on each instruction, and whether there are live watchpoints on each address space. Redesigned a significant portion of debugcpu.c around the concept of maintaining these flags globally and a similar, more complete set of flags internally for each CPU. All previous functionality should work as designed but should be more robust and faster to work with. Added new debugger hooks for starting/stopping CPU execution. This allows the debugger to decide whether or not a given CPU needs to call the debugger on each instruction during the coming timeslice. Added new debugger hook for reporting exceptions. Proper exception breakpoints are not yet implemented. Added new module debugger.c which is where global debugger functions live.
* UML: Aaron Giles2008-06-171-4/+17
| | | | | | - reactivated back-end validation mechanism - added back-end validation for ADD/SUB/MUL/DIV/CMP forms - fixed several errors in dealing with more obscure flag combinations
* Cleanups and version bump.mame0125u5 Aaron Giles2008-06-121-1/+1
|
* x86/x64 back-ends: Aaron Giles2008-06-121-1/+86
| | | | | | | | | | | | | | | | | * fixed adc/sbb so that they don't optimize out ever * fixed detection of special and/or/xor cases * fixed GETFLGS opcode so that it doesn't return anything other than requested flags * changed LZCNT/BSWAP to be more flexible in register selection C back-end: * implemented flag variants of SEXT/ROLAND/ROLINS/LZCNT/BSWAP PPC DRC: * added more symbols for debugging * fixed lmw/stmw if rA is one of the loaded/stored registers * removed unnecessary variables & structure members * optimized for the XER and CR0 case where XER doesn't need an overflow calculation *
* UML: Aaron Giles2008-06-061-2/+3
| | | | * Added NOP opcode
* UML changes: Aaron Giles2008-06-061-2/+1
| | | | | | | | | | * Added more extensive per-opcode information in preparation for UML optimization step. * Made validation more thorough using the extended information. * Disabled back-end validation for now until it can be revisited using the new tables. * Changed GETFLGS encoding so that the mask is in parameter 2 instead of the flags field.
* Separated condflags into two individual fields. Aaron Giles2008-06-051-6/+6
|
* Cleanups/version bump.mame0125u4 Aaron Giles2008-06-051-10/+10
|
* PowerPC dynamic recompiler: [Aaron Giles] Aaron Giles2008-06-051-172/+221
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - rewrote PowerPC implementation as a dynamic recompiler on top of the universal recompiler engine - wrote a front-end to analyze PowerPC code paths and register usage - wrote a common shared module with C implementations of tricky CPU behaviors - added separate CPU types for the variants supported, instead of relying on a hidden model enum - rewrote the serial port emulation for the 4xx series to be more accurate and not rely on separate DMA handlers - rewrote the MMU handling to implement a software TLB that faults in pages and handles changed bits appropriately - implemented emulation of the PowerPC 603's software TLB, which allows the model 3 games to run without a hack to disable the MMU Updated the PowerPC disassembler to share constants with the rest of the core, and to more aggressively use simplified mnemonics, especially for branches. [Aaron Giles] Universal recompiler: - fixed frontend to handle opcode widths different from bus width - added several new opcodes: * (D)GETFLGS - copies the UML flags to a destination operand * FDRNDS - rounds a double precision value to single precision - renamed several opcodes: * SETC -> CARRY * XTRACT -> ROLAND * INSERT -> ROLINS - consolidated the following opcodes: * LOAD?U -> LOAD * LOAD?S -> LOADS * STORE? -> STORE * READ?U -> READ * READ?M -> READM * WRITE? -> WRITE * WRITM? -> WRITEM * SEXT? -> SEXT * FTOI?? -> FTOINT * FFRI? -> FFRINT * FFRF? -> FFRFLT - removed some opcodes: * FLAGS - can be done with GETFLGS/LOAD4/ROLINS * ZEXT - can be achieved with AND * READ?S - can be achieved with READ/SEXT - updated C, x86, and x64 back-ends to support these opcode changes - updated disassembler to support these opcode changes MIPS3 dynamic recompiler: - updated to use new/changed opcode forms - changed context switch so that it only swaps a single pointer Konami Hornet changes: [Aaron Giles] - updated to new PowerPC configurations - updated some memory handlers to be native 8-bit handlers - cleaned up JVS implementation to work with new serial code - added fast RAM for the work RAM to give a small speed boost Konami GTI Club changes: [Aaron Giles] - updated to new PowerPC configurations - updated some memory handlers to be native 8-bit handlers Konami Viper/ZR107 changes: [Aaron Giles] - updated to new PowerPC configurations Sega Model 3 changes: [Aaron Giles] - updated to new PowerPC configurations - reimplemented/centralized interrupt handling - these games are broken for the moment Fixed crasher due to some Konami games using 8 layers in the K056832 implementation, even though it was only written for 4. [Aaron Giles] Added fisttp opcode to i386 disassembler. [Aaron Giles]
* Several miscellaneous changes: Aaron Giles2008-05-291-13/+16
| | | | | | | | | | | | | | | | | | | | | | | | 1. In the MIPS core: - renamed struct mips3_config -> mips3_config - updated all drivers to the new names - removed MIPS3DRC_STRICT_COP0 flag, which is no longer used - a few minor cleanups 2. In the CPU interface: - added new 'intention' parameter to the translate callback to indicate read/write/fetch access, user/supervisor mode, and a flag for debugging - updated all call sites to pass an appropriate value - updated all CPU cores to the new prototype 3. In the UML: - added new opcode SETC to set the carry flag from a source bit - added new opcode BSWAP to swap bytes within a value - updated C, x86, x64 back-ends to support the new opcodes - updated disassembler to support the new opcodes 4. In the DRC frontend: - fixed bug in handling edge case with the PC near the 0 or ~0
* Cleanups and version bump. Aaron Giles2008-05-221-1/+1
|
* UML changes: Aaron Giles2008-05-221-0/+46
| | | | | | | | | | | | | | | | | | * Added new opcode LZCNT which returns the number of leading zeros in a parameter. * Added new opcode XTRACT which is a combined rotate/mask (basically rlwinm from PowerPC) * Added new opcode INSERT which is a combined rotate/mask/blend (basically rlwimi from PowerPC). Best. Opcode. Ever. * Updated all back-ends to support these new opcodes. * Fixed several bugs relating to shifts/rotates and optimizing out cases incorrectly. MIPS3 DRC changes: * Updated to use INSERT and XTRACT where appropriate * Cleaned up register usage to enable an additional direct mapping; this means Linux gets 1 now and Windows gets 3
* Added back-end validation mechanism, and a handful of tests as examples. Aaron Giles2008-05-191-10/+47
| | | | | | | | | | | | | | This will be expanded in the future. Added two new opcodes: SAVE and RESTORE to save and restore the entire virtual machine state for examination/setup. Added new back-end function get_info() which returns information from the back-end about how many actual registers will be mapped. Fixed a bug that mapped the high a low parts of registers to the same address. This should help the C back-end run better on big-endian architectures.
* Cleaned up operand sizing in the C core. Should be closer to working Aaron Giles2008-05-171-19/+35
| | | | on big-endian systems.
* - define isnan as _isnan for MSC_VER Laurent Desnogues2008-05-121-2/+3
|