summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/debug/express.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/debug/express.h')
-rw-r--r--src/emu/debug/express.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/emu/debug/express.h b/src/emu/debug/express.h
index 4023eb538fc..6efa38fb032 100644
--- a/src/emu/debug/express.h
+++ b/src/emu/debug/express.h
@@ -161,8 +161,8 @@ public:
// callback functions for memory reads/writes
typedef std::function<expression_error::error_code(void *cbparam, const char *name, expression_space space)> valid_func;
- typedef std::function<u64(void *cbparam, const char *name, expression_space space, u32 offset, int size)> read_func;
- typedef std::function<void(void *cbparam, const char *name, expression_space space, u32 offset, int size, u64 value)> write_func;
+ typedef std::function<u64(void *cbparam, const char *name, expression_space space, u32 offset, int size, bool with_se)> read_func;
+ typedef std::function<void(void *cbparam, const char *name, expression_space space, u32 offset, int size, u64 value, bool with_se)> write_func;
enum read_write
{
@@ -195,8 +195,8 @@ public:
// memory accessors
expression_error::error_code memory_valid(const char *name, expression_space space);
- u64 memory_value(const char *name, expression_space space, u32 offset, int size);
- void set_memory_value(const char *name, expression_space space, u32 offset, int size, u64 value);
+ u64 memory_value(const char *name, expression_space space, u32 offset, int size, bool with_se);
+ void set_memory_value(const char *name, expression_space space, u32 offset, int size, u64 value, bool with_se);
private:
// internal state
@@ -255,8 +255,10 @@ private:
TIN_MEMORY_SIZE_MASK = 3 << TIN_MEMORY_SIZE_SHIFT,
TIN_MEMORY_SPACE_SHIFT = 20, // 4 bits (20-23)
TIN_MEMORY_SPACE_MASK = 0xf << TIN_MEMORY_SPACE_SHIFT,
- TIN_PRECEDENCE_SHIFT = 24, // 8 bits (24-31)
- TIN_PRECEDENCE_MASK = 0xff << TIN_PRECEDENCE_SHIFT
+ TIN_PRECEDENCE_SHIFT = 24, // 5 bits (24-28)
+ TIN_PRECEDENCE_MASK = 0x1f << TIN_PRECEDENCE_SHIFT,
+ TIN_SIDE_EFFECT_SHIFT = 29, // 1 bit (29)
+ TIN_SIDE_EFFECT_MASK = 1 << TIN_SIDE_EFFECT_SHIFT
};
// types of tokens
@@ -295,6 +297,7 @@ private:
bool right_to_left() const { assert(m_type == OPERATOR); return ((m_flags & TIN_RIGHT_TO_LEFT_MASK) != 0); }
expression_space memory_space() const { assert(m_type == OPERATOR || m_type == MEMORY); return expression_space((m_flags & TIN_MEMORY_SPACE_MASK) >> TIN_MEMORY_SPACE_SHIFT); }
int memory_size() const { assert(m_type == OPERATOR || m_type == MEMORY); return (m_flags & TIN_MEMORY_SIZE_MASK) >> TIN_MEMORY_SIZE_SHIFT; }
+ bool memory_side_effect() const { assert(m_type == OPERATOR || m_type == MEMORY); return (m_flags & TIN_SIDE_EFFECT_MASK) >> TIN_SIDE_EFFECT_SHIFT; }
// setters
parse_token &set_offset(int offset) { m_offset = offset; return *this; }
@@ -311,6 +314,7 @@ private:
parse_token &set_right_to_left() { assert(m_type == OPERATOR); m_flags |= TIN_RIGHT_TO_LEFT_MASK; return *this; }
parse_token &set_memory_space(expression_space space) { assert(m_type == OPERATOR || m_type == MEMORY); m_flags = (m_flags & ~TIN_MEMORY_SPACE_MASK) | ((space << TIN_MEMORY_SPACE_SHIFT) & TIN_MEMORY_SPACE_MASK); return *this; }
parse_token &set_memory_size(int log2ofbits) { assert(m_type == OPERATOR || m_type == MEMORY); m_flags = (m_flags & ~TIN_MEMORY_SIZE_MASK) | ((log2ofbits << TIN_MEMORY_SIZE_SHIFT) & TIN_MEMORY_SIZE_MASK); return *this; }
+ parse_token &set_memory_side_effect(bool with_se) { assert(m_type == OPERATOR || m_type == MEMORY); m_flags = with_se ? m_flags | TIN_SIDE_EFFECT_MASK : m_flags & ~TIN_SIDE_EFFECT_MASK; return *this; }
parse_token &set_memory_source(const char *string) { assert(m_type == OPERATOR || m_type == MEMORY); m_string = string; return *this; }
// access
@@ -359,7 +363,7 @@ private:
void parse_number(parse_token &token, const char *string, int base, expression_error::error_code errcode);
void parse_quoted_char(parse_token &token, const char *&string);
void parse_quoted_string(parse_token &token, const char *&string);
- void parse_memory_operator(parse_token &token, const char *string);
+ void parse_memory_operator(parse_token &token, const char *string, bool with_se);
void normalize_operator(parse_token *prevtoken, parse_token &thistoken);
void infix_to_postfix();