1bb16d227Schristos /* mem.h --- interface to memory for M32C simulator. 2bb16d227Schristos 3*8b657b07Schristos Copyright (C) 2005-2023 Free Software Foundation, Inc. 4bb16d227Schristos Contributed by Red Hat, Inc. 5bb16d227Schristos 6bb16d227Schristos This file is part of the GNU simulators. 7bb16d227Schristos 8bb16d227Schristos This program is free software; you can redistribute it and/or modify 9bb16d227Schristos it under the terms of the GNU General Public License as published by 10bb16d227Schristos the Free Software Foundation; either version 3 of the License, or 11bb16d227Schristos (at your option) any later version. 12bb16d227Schristos 13bb16d227Schristos This program is distributed in the hope that it will be useful, 14bb16d227Schristos but WITHOUT ANY WARRANTY; without even the implied warranty of 15bb16d227Schristos MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16bb16d227Schristos GNU General Public License for more details. 17bb16d227Schristos 18bb16d227Schristos You should have received a copy of the GNU General Public License 19bb16d227Schristos along with this program. If not, see <http://www.gnu.org/licenses/>. */ 20bb16d227Schristos 21bb16d227Schristos 22bb16d227Schristos void init_mem (void); 23bb16d227Schristos void mem_usage_stats (void); 24bb16d227Schristos 25bb16d227Schristos void mem_put_qi (int address, unsigned char value); 26bb16d227Schristos void mem_put_hi (int address, unsigned short value); 27bb16d227Schristos void mem_put_psi (int address, unsigned long value); 28bb16d227Schristos void mem_put_si (int address, unsigned long value); 29bb16d227Schristos 30bb16d227Schristos void mem_put_blk (int address, const void *bufptr, int nbytes); 31bb16d227Schristos 32bb16d227Schristos unsigned char mem_get_pc (void); 33bb16d227Schristos 34bb16d227Schristos unsigned char mem_get_qi (int address); 35bb16d227Schristos unsigned short mem_get_hi (int address); 36bb16d227Schristos unsigned long mem_get_psi (int address); 37bb16d227Schristos unsigned long mem_get_si (int address); 38bb16d227Schristos 39bb16d227Schristos void mem_get_blk (int address, void *bufptr, int nbytes); 40bb16d227Schristos 41bb16d227Schristos int sign_ext (int v, int bits); 42bb16d227Schristos 43bb16d227Schristos void m32c_sim_restore_console (void); 44bb16d227Schristos 45bb16d227Schristos extern int m32c_use_raw_console; 46