changeset 389dbee088d2 in /z/repo/m5
details: http://repo.m5sim.org/m5?cmd=changeset;node=389dbee088d2
description:
merge
diffstat:
25 files changed, 616 insertions(+), 613 deletions(-)
src/arch/arm/linux/linux.hh
| 46
src/arch/x86/floatregs.hh
| 2
src/arch/x86/insts/microfpop.hh
| 4
src/arch/x86/insts/microldstop.hh
| 15
src/arch/x86/insts/microregop.hh
| 10
src/arch/x86/insts/static_inst.hh
| 12
src/arch/x86/isa/includes.isa
| 2
src/arch/x86/isa/insts/general_purpose/compare_and_test/bit_scan.py
| 6
src/arch/x86/isa/insts/general_purpose/control_transfer/interrupts_and_exceptions.py
| 2
src/arch/x86/isa/insts/general_purpose/control_transfer/jump.py
| 4
src/arch/x86/isa/insts/general_purpose/data_transfer/stack_operations.py
| 4
src/arch/x86/isa/insts/general_purpose/system_calls.py
| 4
src/arch/x86/isa/insts/system/control_registers.py
| 22
src/arch/x86/isa/microasm.isa
| 49
src/arch/x86/isa/microops/base.isa
| 2
src/arch/x86/isa/microops/fpop.isa
| 17
src/arch/x86/isa/microops/ldstop.isa
| 40
src/arch/x86/isa/microops/limmop.isa
| 12
src/arch/x86/isa/microops/regop.isa
| 50
src/arch/x86/miscregs.hh
| 57
src/mem/ruby/config/defaults.rb
| 2
tests/quick/50.memtest/ref/alpha/linux/memtest-ruby/ruby.stats
| 610 +++++-----
tests/quick/50.memtest/ref/alpha/linux/memtest-ruby/simerr
| 206 +--
tests/quick/50.memtest/ref/alpha/linux/memtest-ruby/simout
| 11
tests/quick/50.memtest/ref/alpha/linux/memtest-ruby/stats.txt
| 40
diffs (truncated from 2421 to 300 lines):
diff -r bd813379f121 -r 389dbee088d2 src/arch/arm/linux/linux.hh
--- a/src/arch/arm/linux/linux.hh Wed Jul 15 10:46:22 2009 -0500
+++ b/src/arch/arm/linux/linux.hh Thu Jul 16 15:40:48 2009 -0500
@@ -47,22 +47,22 @@
//@{
/// open(2) flag values.
- static const int TGT_O_RDONLY = 0x00000000; //!< O_RDONLY
- static const int TGT_O_WRONLY = 0x00000001; //!< O_WRONLY
- static const int TGT_O_RDWR = 0x00000002; //!< O_RDWR
- static const int TGT_O_CREAT = 0x00000100; //!< O_CREAT
- static const int TGT_O_EXCL = 0x00000200; //!< O_EXCL
- static const int TGT_O_NOCTTY = 0x00000400; //!< O_NOCTTY
- static const int TGT_O_TRUNC = 0x00001000; //!< O_TRUNC
- static const int TGT_O_APPEND = 0x00002000; //!< O_APPEND
- static const int TGT_O_NONBLOCK = 0x00004000; //!< O_NONBLOCK
- static const int TGT_O_SYNC = 0x00010000; //!< O_SYNC
- static const int TGT_FASYNC = 0x00020000; //!< FASYNC
- static const int TGT_O_DIRECT = 0x00040000; //!< O_DIRECT
- static const int TGT_O_LARGEFILE = 0x00100000; //!< O_LARGEFILE
- static const int TGT_O_DIRECTORY = 0x00200000; //!< O_DIRECTORY
- static const int TGT_O_NOFOLLOW = 0x00400000; //!< O_NOFOLLOW
- static const int TGT_O_NOATIME = 0x01000000; //!< O_NOATIME
+ static const int TGT_O_RDONLY = 00000000; //!< O_RDONLY
+ static const int TGT_O_WRONLY = 00000001; //!< O_WRONLY
+ static const int TGT_O_RDWR = 00000002; //!< O_RDWR
+ static const int TGT_O_CREAT = 00000100; //!< O_CREAT
+ static const int TGT_O_EXCL = 00000200; //!< O_EXCL
+ static const int TGT_O_NOCTTY = 00000400; //!< O_NOCTTY
+ static const int TGT_O_TRUNC = 00001000; //!< O_TRUNC
+ static const int TGT_O_APPEND = 00002000; //!< O_APPEND
+ static const int TGT_O_NONBLOCK = 00004000; //!< O_NONBLOCK
+ static const int TGT_O_SYNC = 00010000; //!< O_SYNC
+ static const int TGT_FASYNC = 00020000; //!< FASYNC
+ static const int TGT_O_DIRECTORY = 00040000; //!< O_DIRECTORY
+ static const int TGT_O_NOFOLLOW = 00100000; //!< O_NOFOLLOW
+ static const int TGT_O_DIRECT = 00200000; //!< O_DIRECT
+ static const int TGT_O_LARGEFILE = 00400000; //!< O_LARGEFILE
+ static const int TGT_O_NOATIME = 01000000; //!< O_NOATIME
//@}
/// For mmap().
@@ -70,13 +70,13 @@
//@{
/// For getsysinfo().
- static const unsigned GSI_PLATFORM_NAME = 103; //!< platform name as
string
- static const unsigned GSI_CPU_INFO = 59; //!< CPU information
- static const unsigned GSI_PROC_TYPE = 60; //!< get proc_type
- static const unsigned GSI_MAX_CPU = 30; //!< max # cpu's on this
machine
- static const unsigned GSI_CPUS_IN_BOX = 55; //!< number of CPUs in
system
- static const unsigned GSI_PHYSMEM = 19; //!< Physical memory in
KB
- static const unsigned GSI_CLK_TCK = 42; //!< clock freq in Hz
+ static const unsigned GSI_PLATFORM_NAME = 103; //!< platform name as string
+ static const unsigned GSI_CPU_INFO = 59; //!< CPU information
+ static const unsigned GSI_PROC_TYPE = 60; //!< get proc_type
+ static const unsigned GSI_MAX_CPU = 30; //!< max # cpu's on this
machine
+ static const unsigned GSI_CPUS_IN_BOX = 55; //!< number of CPUs in
system
+ static const unsigned GSI_PHYSMEM = 19; //!< Physical memory in KB
+ static const unsigned GSI_CLK_TCK = 42; //!< clock freq in Hz
//@}
//@{
diff -r bd813379f121 -r 389dbee088d2 src/arch/x86/floatregs.hh
--- a/src/arch/x86/floatregs.hh Wed Jul 15 10:46:22 2009 -0500
+++ b/src/arch/x86/floatregs.hh Thu Jul 16 15:40:48 2009 -0500
@@ -166,7 +166,7 @@
static inline FloatRegIndex
FLOATREG_STACK(int index, int top)
{
- return (FloatRegIndex)(NUM_FLOATREGS + ((top + index + 8) % 8));
+ return FLOATREG_FPR((top + index + 8) % 8);
}
};
diff -r bd813379f121 -r 389dbee088d2 src/arch/x86/insts/microfpop.hh
--- a/src/arch/x86/insts/microfpop.hh Wed Jul 15 10:46:22 2009 -0500
+++ b/src/arch/x86/insts/microfpop.hh Thu Jul 16 15:40:48 2009 -0500
@@ -80,13 +80,13 @@
const char *mnem, const char *_instMnem,
bool isMicro, bool isDelayed,
bool isFirst, bool isLast,
- RegIndex _src1, RegIndex _src2, RegIndex _dest,
+ InstRegIndex _src1, InstRegIndex _src2, InstRegIndex _dest,
uint8_t _dataSize, int8_t _spm,
OpClass __opClass) :
X86MicroopBase(_machInst, mnem, _instMnem,
isMicro, isDelayed, isFirst, isLast,
__opClass),
- src1(_src1), src2(_src2), dest(_dest),
+ src1(_src1.idx), src2(_src2.idx), dest(_dest.idx),
dataSize(_dataSize), spm(_spm)
{}
/*
diff -r bd813379f121 -r 389dbee088d2 src/arch/x86/insts/microldstop.hh
--- a/src/arch/x86/insts/microldstop.hh Wed Jul 15 10:46:22 2009 -0500
+++ b/src/arch/x86/insts/microldstop.hh Thu Jul 16 15:40:48 2009 -0500
@@ -93,20 +93,21 @@
LdStOp(ExtMachInst _machInst,
const char * mnem, const char * _instMnem,
bool isMicro, bool isDelayed, bool isFirst, bool isLast,
- uint8_t _scale, RegIndex _index, RegIndex _base,
- uint64_t _disp, uint8_t _segment,
- RegIndex _data,
+ uint8_t _scale, InstRegIndex _index, InstRegIndex _base,
+ uint64_t _disp, InstRegIndex _segment,
+ InstRegIndex _data,
uint8_t _dataSize, uint8_t _addressSize,
Request::FlagsType _memFlags,
OpClass __opClass) :
X86MicroopBase(machInst, mnem, _instMnem,
isMicro, isDelayed, isFirst, isLast, __opClass),
- scale(_scale), index(_index), base(_base),
- disp(_disp), segment(_segment),
- data(_data),
+ scale(_scale), index(_index.idx), base(_base.idx),
+ disp(_disp), segment(_segment.idx),
+ data(_data.idx),
dataSize(_dataSize), addressSize(_addressSize),
- memFlags(_memFlags | _segment)
+ memFlags(_memFlags | _segment.idx)
{
+ assert(_segment.idx < NUM_SEGMENTREGS);
foldOBit = (dataSize == 1 && !_machInst.rex.present) ? 1 << 6 : 0;
foldABit =
(addressSize == 1 && !_machInst.rex.present) ? 1 << 6 : 0;
diff -r bd813379f121 -r 389dbee088d2 src/arch/x86/insts/microregop.hh
--- a/src/arch/x86/insts/microregop.hh Wed Jul 15 10:46:22 2009 -0500
+++ b/src/arch/x86/insts/microregop.hh Thu Jul 16 15:40:48 2009 -0500
@@ -79,13 +79,13 @@
const char *mnem, const char *_instMnem,
bool isMicro, bool isDelayed,
bool isFirst, bool isLast,
- RegIndex _src1, RegIndex _dest,
+ InstRegIndex _src1, InstRegIndex _dest,
uint8_t _dataSize, uint16_t _ext,
OpClass __opClass) :
X86MicroopBase(_machInst, mnem, _instMnem,
isMicro, isDelayed, isFirst, isLast,
__opClass),
- src1(_src1), dest(_dest),
+ src1(_src1.idx), dest(_dest.idx),
dataSize(_dataSize), ext(_ext)
{
foldOBit = (dataSize == 1 && !_machInst.rex.present) ? 1 << 6 : 0;
@@ -107,14 +107,14 @@
const char *mnem, const char *_instMnem,
bool isMicro, bool isDelayed,
bool isFirst, bool isLast,
- RegIndex _src1, RegIndex _src2, RegIndex _dest,
+ InstRegIndex _src1, InstRegIndex _src2, InstRegIndex _dest,
uint8_t _dataSize, uint16_t _ext,
OpClass __opClass) :
RegOpBase(_machInst, mnem, _instMnem,
isMicro, isDelayed, isFirst, isLast,
_src1, _dest, _dataSize, _ext,
__opClass),
- src2(_src2)
+ src2(_src2.idx)
{
}
@@ -132,7 +132,7 @@
const char * mnem, const char *_instMnem,
bool isMicro, bool isDelayed,
bool isFirst, bool isLast,
- RegIndex _src1, uint8_t _imm8, RegIndex _dest,
+ InstRegIndex _src1, uint8_t _imm8, InstRegIndex _dest,
uint8_t _dataSize, uint16_t _ext,
OpClass __opClass) :
RegOpBase(_machInst, mnem, _instMnem,
diff -r bd813379f121 -r 389dbee088d2 src/arch/x86/insts/static_inst.hh
--- a/src/arch/x86/insts/static_inst.hh Wed Jul 15 10:46:22 2009 -0500
+++ b/src/arch/x86/insts/static_inst.hh Thu Jul 16 15:40:48 2009 -0500
@@ -64,6 +64,18 @@
namespace X86ISA
{
/**
+ * Class for register indices passed to instruction constructors. Using a
+ * wrapper struct for these lets take advantage of the compiler's type
+ * checking.
+ */
+ struct InstRegIndex
+ {
+ RegIndex idx;
+ explicit InstRegIndex(RegIndex _idx) : idx(_idx)
+ {}
+ };
+
+ /**
* Base class for all X86 static instructions.
*/
diff -r bd813379f121 -r 389dbee088d2 src/arch/x86/isa/includes.isa
--- a/src/arch/x86/isa/includes.isa Wed Jul 15 10:46:22 2009 -0500
+++ b/src/arch/x86/isa/includes.isa Thu Jul 16 15:40:48 2009 -0500
@@ -109,6 +109,8 @@
#include "cpu/static_inst.hh"
#include "mem/packet.hh"
#include "sim/faults.hh"
+
+using X86ISA::InstRegIndex;
}};
output decoder {{
diff -r bd813379f121 -r 389dbee088d2
src/arch/x86/isa/insts/general_purpose/compare_and_test/bit_scan.py
--- a/src/arch/x86/isa/insts/general_purpose/compare_and_test/bit_scan.py
Wed Jul 15 10:46:22 2009 -0500
+++ b/src/arch/x86/isa/insts/general_purpose/compare_and_test/bit_scan.py
Thu Jul 16 15:40:48 2009 -0500
@@ -84,7 +84,7 @@
microcode = '''
def macroop BSR_R_R {
# Determine if the input was zero, and also move it to a temp reg.
- movi t1, t1, t0, dataSize=8
+ mov t1, t1, t0, dataSize=8
and t1, regm, regm, flags=(ZF,)
br label("end"), flags=(CZF,)
@@ -132,7 +132,7 @@
def macroop BSR_R_M {
- movi t1, t1, t0, dataSize=8
+ mov t1, t1, t0, dataSize=8
ld t1, seg, sib, disp
# Determine if the input was zero, and also move it to a temp reg.
@@ -184,7 +184,7 @@
def macroop BSR_R_P {
rdip t7
- movi t1, t1, t0, dataSize=8
+ mov t1, t1, t0, dataSize=8
ld t1, seg, riprel, disp
# Determine if the input was zero, and also move it to a temp reg.
diff -r bd813379f121 -r 389dbee088d2
src/arch/x86/isa/insts/general_purpose/control_transfer/interrupts_and_exceptions.py
---
a/src/arch/x86/isa/insts/general_purpose/control_transfer/interrupts_and_exceptions.py
Wed Jul 15 10:46:22 2009 -0500
+++
b/src/arch/x86/isa/insts/general_purpose/control_transfer/interrupts_and_exceptions.py
Thu Jul 16 15:40:48 2009 -0500
@@ -143,7 +143,7 @@
# appropriate/other RIP checks.
# if temp_RIP > CS.limit throw #GP(0)
rdlimit t6, cs, dataSize=8
- subi t0, t1, t6, flags=(ECF,)
+ sub t0, t1, t6, flags=(ECF,)
fault "new GeneralProtection(0)", flags=(CECF,)
#(temp_CPL!=CPL)
diff -r bd813379f121 -r 389dbee088d2
src/arch/x86/isa/insts/general_purpose/control_transfer/jump.py
--- a/src/arch/x86/isa/insts/general_purpose/control_transfer/jump.py Wed Jul
15 10:46:22 2009 -0500
+++ b/src/arch/x86/isa/insts/general_purpose/control_transfer/jump.py Thu Jul
16 15:40:48 2009 -0500
@@ -118,7 +118,7 @@
limm t2, imm, dataSize=8
# Figure out the width of the offset.
limm t3, dsz, dataSize=8
- sll t3, t3, 3, dataSize=8
+ slli t3, t3, 3, dataSize=8
# Get the selector into t1.
sll t1, t2, t3, dataSize=8
mov t1, t0, t1, dataSize=2
@@ -178,7 +178,7 @@
limm t2, imm, dataSize=8
# Figure out the width of the offset.
limm t3, dsz, dataSize=8
- sll t3, t3, 3, dataSize=8
+ slli t3, t3, 3, dataSize=8
# Get the selector into t1.
sll t1, t2, t3, dataSize=8
mov t1, t0, t1, dataSize=2
diff -r bd813379f121 -r 389dbee088d2
src/arch/x86/isa/insts/general_purpose/data_transfer/stack_operations.py
--- a/src/arch/x86/isa/insts/general_purpose/data_transfer/stack_operations.py
Wed Jul 15 10:46:22 2009 -0500
+++ b/src/arch/x86/isa/insts/general_purpose/data_transfer/stack_operations.py
Thu Jul 16 15:40:48 2009 -0500
@@ -163,7 +163,7 @@
# Pull the different components out of the immediate
limm t1, imm
zexti t2, t1, 15, dataSize=8
- srl t1, t1, 16
+ srli t1, t1, 16
zexti t1, t1, 5, dataSize=8
# t1 is now the masked nesting level, and t2 is the amount of storage.
@@ -174,7 +174,7 @@
mov t6, t6, rsp, dataSize=asz
# If the nesting level is zero, skip all this stuff.
- subi t0, t1, t0, flags=(EZF,), dataSize=2
+ sub t0, t1, t0, flags=(EZF,), dataSize=2
br label("skipLoop"), flags=(CEZF,)
# If the level was 1, only push the saved rbp
diff -r bd813379f121 -r 389dbee088d2
src/arch/x86/isa/insts/general_purpose/system_calls.py
--- a/src/arch/x86/isa/insts/general_purpose/system_calls.py Wed Jul 15
10:46:22 2009 -0500
+++ b/src/arch/x86/isa/insts/general_purpose/system_calls.py Thu Jul 16
15:40:48 2009 -0500
@@ -65,7 +65,7 @@
# Stick rflags with RF masked into r11.
rflags t2
limm t3, "~RFBit", dataSize=8
- andi r11, t2, t3, dataSize=8
+ and r11, t2, t3, dataSize=8
rdval t3, star
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev