ppc_tools.h

来自「SkyEye是一个可以运行嵌入式操作系统的硬件仿真工具」· C头文件 代码 · 共 44 行

H
44
字号
/* *	PearPC *	ppc_tools.h * *	Copyright (C) 2003 Sebastian Biallas (sb@biallas.net) * *	This program is free software; you can redistribute it and/or modify *	it under the terms of the GNU General Public License version 2 as *	published by the Free Software Foundation. * *	This program is distributed in the hope that it will be useful, *	but WITHOUT ANY WARRANTY; without even the implied warranty of *	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the *	GNU General Public License for more details. * *	You should have received a copy of the GNU General Public License *	along with this program; if not, write to the Free Software *	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */#ifndef __PPC_TOOLS_H__#define __PPC_TOOLS_H__#include "types.h"static inline bool ppc_carry_3(uint32 a, uint32 b, uint32 c){	if ((a+b) < a) {		return true;	}	if ((a+b+c) < c) {		return true;	}	return false;}static inline uint32 ppc_word_rotl(uint32 data, int n){	n &= 0x1f;	return (data << n) | (data >> (32-n));}#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?