1a5a4af3bSchristos /* Misc. support for CPU family m32rbf. 2a5a4af3bSchristos 3a5a4af3bSchristos THIS FILE IS MACHINE GENERATED WITH CGEN. 4a5a4af3bSchristos 5*8b657b07Schristos Copyright 1996-2023 Free Software Foundation, Inc. 6a5a4af3bSchristos 7a5a4af3bSchristos This file is part of the GNU simulators. 8a5a4af3bSchristos 9a5a4af3bSchristos This file is free software; you can redistribute it and/or modify 10a5a4af3bSchristos it under the terms of the GNU General Public License as published by 11a5a4af3bSchristos the Free Software Foundation; either version 3, or (at your option) 12a5a4af3bSchristos any later version. 13a5a4af3bSchristos 14a5a4af3bSchristos It is distributed in the hope that it will be useful, but WITHOUT 15a5a4af3bSchristos ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 16a5a4af3bSchristos or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public 17a5a4af3bSchristos License for more details. 18a5a4af3bSchristos 19a5a4af3bSchristos You should have received a copy of the GNU General Public License along 20a5a4af3bSchristos with this program; if not, see <http://www.gnu.org/licenses/>. 21a5a4af3bSchristos 22a5a4af3bSchristos */ 23a5a4af3bSchristos 24a5a4af3bSchristos #define WANT_CPU m32rbf 25a5a4af3bSchristos #define WANT_CPU_M32RBF 26a5a4af3bSchristos 27a5a4af3bSchristos #include "sim-main.h" 28a5a4af3bSchristos #include "cgen-ops.h" 29a5a4af3bSchristos 30a5a4af3bSchristos /* Get the value of h-pc. */ 31a5a4af3bSchristos 32a5a4af3bSchristos USI 33a5a4af3bSchristos m32rbf_h_pc_get (SIM_CPU *current_cpu) 34a5a4af3bSchristos { 35a5a4af3bSchristos return CPU (h_pc); 36a5a4af3bSchristos } 37a5a4af3bSchristos 38a5a4af3bSchristos /* Set a value for h-pc. */ 39a5a4af3bSchristos 40a5a4af3bSchristos void 41a5a4af3bSchristos m32rbf_h_pc_set (SIM_CPU *current_cpu, USI newval) 42a5a4af3bSchristos { 43a5a4af3bSchristos CPU (h_pc) = newval; 44a5a4af3bSchristos } 45a5a4af3bSchristos 46a5a4af3bSchristos /* Get the value of h-gr. */ 47a5a4af3bSchristos 48a5a4af3bSchristos SI 49a5a4af3bSchristos m32rbf_h_gr_get (SIM_CPU *current_cpu, UINT regno) 50a5a4af3bSchristos { 51a5a4af3bSchristos return CPU (h_gr[regno]); 52a5a4af3bSchristos } 53a5a4af3bSchristos 54a5a4af3bSchristos /* Set a value for h-gr. */ 55a5a4af3bSchristos 56a5a4af3bSchristos void 57a5a4af3bSchristos m32rbf_h_gr_set (SIM_CPU *current_cpu, UINT regno, SI newval) 58a5a4af3bSchristos { 59a5a4af3bSchristos CPU (h_gr[regno]) = newval; 60a5a4af3bSchristos } 61a5a4af3bSchristos 62a5a4af3bSchristos /* Get the value of h-cr. */ 63a5a4af3bSchristos 64a5a4af3bSchristos USI 65a5a4af3bSchristos m32rbf_h_cr_get (SIM_CPU *current_cpu, UINT regno) 66a5a4af3bSchristos { 67a5a4af3bSchristos return GET_H_CR (regno); 68a5a4af3bSchristos } 69a5a4af3bSchristos 70a5a4af3bSchristos /* Set a value for h-cr. */ 71a5a4af3bSchristos 72a5a4af3bSchristos void 73a5a4af3bSchristos m32rbf_h_cr_set (SIM_CPU *current_cpu, UINT regno, USI newval) 74a5a4af3bSchristos { 75a5a4af3bSchristos SET_H_CR (regno, newval); 76a5a4af3bSchristos } 77a5a4af3bSchristos 78a5a4af3bSchristos /* Get the value of h-accum. */ 79a5a4af3bSchristos 80a5a4af3bSchristos DI 81a5a4af3bSchristos m32rbf_h_accum_get (SIM_CPU *current_cpu) 82a5a4af3bSchristos { 83a5a4af3bSchristos return GET_H_ACCUM (); 84a5a4af3bSchristos } 85a5a4af3bSchristos 86a5a4af3bSchristos /* Set a value for h-accum. */ 87a5a4af3bSchristos 88a5a4af3bSchristos void 89a5a4af3bSchristos m32rbf_h_accum_set (SIM_CPU *current_cpu, DI newval) 90a5a4af3bSchristos { 91a5a4af3bSchristos SET_H_ACCUM (newval); 92a5a4af3bSchristos } 93a5a4af3bSchristos 94a5a4af3bSchristos /* Get the value of h-cond. */ 95a5a4af3bSchristos 96a5a4af3bSchristos BI 97a5a4af3bSchristos m32rbf_h_cond_get (SIM_CPU *current_cpu) 98a5a4af3bSchristos { 99a5a4af3bSchristos return CPU (h_cond); 100a5a4af3bSchristos } 101a5a4af3bSchristos 102a5a4af3bSchristos /* Set a value for h-cond. */ 103a5a4af3bSchristos 104a5a4af3bSchristos void 105a5a4af3bSchristos m32rbf_h_cond_set (SIM_CPU *current_cpu, BI newval) 106a5a4af3bSchristos { 107a5a4af3bSchristos CPU (h_cond) = newval; 108a5a4af3bSchristos } 109a5a4af3bSchristos 110a5a4af3bSchristos /* Get the value of h-psw. */ 111a5a4af3bSchristos 112a5a4af3bSchristos UQI 113a5a4af3bSchristos m32rbf_h_psw_get (SIM_CPU *current_cpu) 114a5a4af3bSchristos { 115a5a4af3bSchristos return GET_H_PSW (); 116a5a4af3bSchristos } 117a5a4af3bSchristos 118a5a4af3bSchristos /* Set a value for h-psw. */ 119a5a4af3bSchristos 120a5a4af3bSchristos void 121a5a4af3bSchristos m32rbf_h_psw_set (SIM_CPU *current_cpu, UQI newval) 122a5a4af3bSchristos { 123a5a4af3bSchristos SET_H_PSW (newval); 124a5a4af3bSchristos } 125a5a4af3bSchristos 126a5a4af3bSchristos /* Get the value of h-bpsw. */ 127a5a4af3bSchristos 128a5a4af3bSchristos UQI 129a5a4af3bSchristos m32rbf_h_bpsw_get (SIM_CPU *current_cpu) 130a5a4af3bSchristos { 131a5a4af3bSchristos return CPU (h_bpsw); 132a5a4af3bSchristos } 133a5a4af3bSchristos 134a5a4af3bSchristos /* Set a value for h-bpsw. */ 135a5a4af3bSchristos 136a5a4af3bSchristos void 137a5a4af3bSchristos m32rbf_h_bpsw_set (SIM_CPU *current_cpu, UQI newval) 138a5a4af3bSchristos { 139a5a4af3bSchristos CPU (h_bpsw) = newval; 140a5a4af3bSchristos } 141a5a4af3bSchristos 142a5a4af3bSchristos /* Get the value of h-bbpsw. */ 143a5a4af3bSchristos 144a5a4af3bSchristos UQI 145a5a4af3bSchristos m32rbf_h_bbpsw_get (SIM_CPU *current_cpu) 146a5a4af3bSchristos { 147a5a4af3bSchristos return CPU (h_bbpsw); 148a5a4af3bSchristos } 149a5a4af3bSchristos 150a5a4af3bSchristos /* Set a value for h-bbpsw. */ 151a5a4af3bSchristos 152a5a4af3bSchristos void 153a5a4af3bSchristos m32rbf_h_bbpsw_set (SIM_CPU *current_cpu, UQI newval) 154a5a4af3bSchristos { 155a5a4af3bSchristos CPU (h_bbpsw) = newval; 156a5a4af3bSchristos } 157a5a4af3bSchristos 158a5a4af3bSchristos /* Get the value of h-lock. */ 159a5a4af3bSchristos 160a5a4af3bSchristos BI 161a5a4af3bSchristos m32rbf_h_lock_get (SIM_CPU *current_cpu) 162a5a4af3bSchristos { 163a5a4af3bSchristos return CPU (h_lock); 164a5a4af3bSchristos } 165a5a4af3bSchristos 166a5a4af3bSchristos /* Set a value for h-lock. */ 167a5a4af3bSchristos 168a5a4af3bSchristos void 169a5a4af3bSchristos m32rbf_h_lock_set (SIM_CPU *current_cpu, BI newval) 170a5a4af3bSchristos { 171a5a4af3bSchristos CPU (h_lock) = newval; 172a5a4af3bSchristos } 173