github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/executor/kvm_ppc64le.S (about) 1 // Copyright 2021 syzkaller project authors. All rights reserved. 2 // Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. 3 4 // kvm_gen.cc generates machine code from this file and saves it into kvm_ppc64le.S.h. 5 6 // +build 7 8 #include "kvm.h" 9 10 #define LOAD64(rn,name) \ 11 lis rn,name##@highest; \ 12 ori rn,rn,name##@higher; \ 13 rldicr rn,rn,32,31; \ 14 oris rn,rn,name##@h; \ 15 ori rn,rn,name##@l 16 17 .global kvm_ppc64_mr, kvm_ppc64_mr_end 18 kvm_ppc64_mr: 19 LOAD64(5, 0xbadc0de) 20 mr 4,5 21 mr 3,4 22 kvm_ppc64_mr_end: 23 24 .global kvm_ppc64_ld, kvm_ppc64_ld_end 25 kvm_ppc64_ld: 26 LOAD64(15, 0xbadc0de) 27 // Last double word of vma[24] 28 LOAD64(25, 24 * 0x10000 - 8) 29 std 15, 0(25) 30 ld 3, 0(25) 31 kvm_ppc64_ld_end: 32 33 .global kvm_ppc64_recharge_dec, kvm_ppc64_recharge_dec_end 34 kvm_ppc64_recharge_dec: 35 LOAD64(20,0x7ffffff) 36 #define SPRN_DEC 0x016 /* Decrement Register */ 37 mtspr SPRN_DEC,20 38 rfid 39 kvm_ppc64_recharge_dec_end: