Re: [RFC PATCH v2 1/3] target/mips/op_helper: Convert multiple if() to switch case

2020-08-13 Thread Jiaxun Yang
在 2020/8/14 上午2:15, Philippe Mathieu-Daudé 写道: The cache operation is encoded in bits [20:18] of the instruction. The 'op' argument of helper_cache() contains the bits [20:16]. Extract the 3 bits and parse them using a switch case. This allow us to handle multiple cache types (the cache type i

[RFC PATCH v2 1/3] target/mips/op_helper: Convert multiple if() to switch case

2020-08-13 Thread Philippe Mathieu-Daudé
The cache operation is encoded in bits [20:18] of the instruction. The 'op' argument of helper_cache() contains the bits [20:16]. Extract the 3 bits and parse them using a switch case. This allow us to handle multiple cache types (the cache type is encoded in bits [17:16]). Previously the if() blo