Implemented ToBuffer

This commit is contained in:
Connor Wood
2017-07-25 11:29:32 +01:00
parent 6df99953dc
commit 0652bc8099

View File

@@ -601,15 +601,16 @@ fn parse_def_to_buffer(data: &[u8],
})
}
// TODO: Compute the result
// TODO: Store the result, if appropriate
parser_opcode!(data, 0x96);
let operand = parse_term_arg(&data[2..], ctx)?;
let target = parse_target(&data[2 + operand.len..], ctx)?;
let res = AmlValue::Buffer(operand.val.get_as_buffer()?);
ctx.modify(target.val, res.clone());
Ok(AmlParseType {
val: AmlValue::Uninitialized,
val: res,
len: 1 + operand.len + target.len
})
}