| 3079 | } |
| 3080 | |
| 3081 | OpDispatchBuilder::CycleCounterPair OpDispatchBuilder::CycleCounter(bool SelfSynchronizingLoads) { |
| 3082 | Ref CounterLow {}; |
| 3083 | Ref CounterHigh {}; |
| 3084 | auto Counter = _CycleCounter(SelfSynchronizingLoads); |
| 3085 | if (CTX->Config.TSCScale) { |
| 3086 | CounterLow = _Lshl(OpSize::i32Bit, Counter, Constant(CTX->Config.TSCScale)); |
| 3087 | CounterHigh = _Lshr(OpSize::i64Bit, Counter, Constant(32 - CTX->Config.TSCScale)); |
| 3088 | } else { |
| 3089 | CounterLow = _Bfe(OpSize::i64Bit, 32, 0, Counter); |
| 3090 | CounterHigh = _Bfe(OpSize::i64Bit, 32, 32, Counter); |
| 3091 | } |
| 3092 | |
| 3093 | return { |
| 3094 | .CounterLow = CounterLow, |
| 3095 | .CounterHigh = CounterHigh, |
| 3096 | }; |
| 3097 | } |
| 3098 | |
| 3099 | void OpDispatchBuilder::RDTSCOp(OpcodeArgs) { |
| 3100 | auto Counter = CycleCounter(false); |
nothing calls this directly
no outgoing calls
no test coverage detected