check_ops.sh
来自「qemu性能直逼VMware的仿真器QEMU 的模擬速度約為實機的 25%;約為」· Shell 代码 · 共 48 行
SH
48 行
#! /bin/sh# Script to check for duplicate function prologues in op.o# Typically this indicates missing FORCE_RET();# This script does not detect other errors that may be present.# Usage: check_ops.sh [-m machine] [op.o]# machine and op.o are guessed if not specified.if [ "x$1" = "x-m" ]; then machine=$2 shift 2else machine=`uname -m`fiif [ -z "$1" ]; then for f in `find . -name op.o`; do /bin/sh "$0" -m $machine $f done exit 0ficase $machine in i?86) ret='\tret' ;; x86_64) ret='\tretq' ;; arm) ret='\tldm.*pc' ;; ppc* | powerpc*) ret='\tblr' ;; mips*) ret='\tjr.*ra' ;; *) echo "Unknown machine `uname -m`" ;;esacecho $1# op_exit_tb causes false positives on some hosts.${CROSS}objdump -dr $1 | \ sed -e '/>:$\|'"$ret"'/!d' -e 's/.*<\(.*\)>:/~\1:/' -e 's/.*'"$ret"'.*/!/' | \ sed -e ':1;N;s/\n//;t1' | sed -e 's/~/\n/g' | grep -v '^op_exit_tb' | \ grep '^op_.*!!'
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?