diff options
Diffstat (limited to 'common/common.c')
-rw-r--r-- | common/common.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/common/common.c b/common/common.c index 9c91f910..5a546207 100644 --- a/common/common.c +++ b/common/common.c @@ -91,3 +91,32 @@ int idata_bytes(int opcode) return 0; } } + +/* + * Uninitialized data bytes length from opcode + */ +int resv_bytes(int opcode) +{ + switch (opcode) { + case I_RESB: + return 1; + case I_RESW: + return 2; + case I_RESD: + return 4; + case I_RESQ: + return 8; + case I_REST: + return 10; + case I_RESO: + return 16; + case I_RESY: + return 32; + case I_RESZ: + return 64; + case I_none: + return -1; + default: + return 0; + } +} |