ia64/xen-unstable

changeset 13910:ed6501070f37

Support INC/DEC in mmio decoder. Opcodes 0xFE and 0xFF.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Wed Feb 14 12:10:01 2007 +0000 (2007-02-14)
parents 6daa91dc9247
children d08c2af53804
files xen/arch/x86/hvm/platform.c
line diff
     1.1 --- a/xen/arch/x86/hvm/platform.c	Wed Feb 14 12:02:20 2007 +0000
     1.2 +++ b/xen/arch/x86/hvm/platform.c	Wed Feb 14 12:10:01 2007 +0000
     1.3 @@ -690,6 +690,39 @@ static int mmio_decode(int address_bytes
     1.4          } else
     1.5              return DECODE_failure;
     1.6  
     1.7 +    case 0xFE:
     1.8 +    case 0xFF:
     1.9 +    {
    1.10 +        unsigned char ins_subtype = (opcode[1] >> 3) & 7;
    1.11 +
    1.12 +        if ( opcode[0] == 0xFE ) {
    1.13 +            *op_size = BYTE;
    1.14 +            GET_OP_SIZE_FOR_BYTE(size_reg);
    1.15 +        } else {
    1.16 +            GET_OP_SIZE_FOR_NONEBYTE(*op_size);
    1.17 +            size_reg = *op_size;
    1.18 +        }
    1.19 +
    1.20 +        mmio_op->immediate = 1;
    1.21 +        mmio_op->operand[0] = mk_operand(size_reg, 0, 0, IMMEDIATE);
    1.22 +        mmio_op->operand[1] = mk_operand(size_reg, 0, 0, MEMORY);
    1.23 +
    1.24 +        switch ( ins_subtype ) {
    1.25 +        case 0: /* inc */
    1.26 +            mmio_op->instr = INSTR_ADD;
    1.27 +            return DECODE_success;
    1.28 +
    1.29 +        case 1: /* dec */
    1.30 +            mmio_op->instr = INSTR_OR;
    1.31 +            return DECODE_success;
    1.32 +
    1.33 +        default:
    1.34 +            printk("%x/%x, This opcode isn't handled yet!\n",
    1.35 +                   *opcode, ins_subtype);
    1.36 +            return DECODE_failure;
    1.37 +        }
    1.38 +    }
    1.39 +
    1.40      case 0x0F:
    1.41          break;
    1.42