GCC __attribute__ meaning (reference for https://gcc.gnu.org/onlinedocs/gcc-3.2/gcc/Function-Att)
来源:互联网 发布:权志龙水原希子 知乎 编辑:程序博客网 时间:2024/05/19 20:41
busybox/src/include/platform.h
/* FAST_FUNC is a qualifier which (possibly) makes function call faster * and/or smaller by using modified ABI. It is usually only needed * on non-static, busybox internal functions. Recent versions of gcc * optimize statics automatically. FAST_FUNC on static is required * only if you need to match a function pointer's type */#if __GNUC_PREREQ(3,0) && defined(i386) /* || defined(__x86_64__)? *//* stdcall makes callee to pop arguments from stack, not caller */# define FAST_FUNC __attribute__((regparm(3),stdcall))/* #elif ... - add your favorite arch today! */#else# define FAST_FUNC#endif
busybox中经常有这种声明:再看FAST_FUNC属性函数的定义格式: 在gcc编译器中__attribute__((regparm(3),stdcall))的含义是:
regparm (
number)
regparm
attribute causes the compiler to pass up to number integer arguments in registers EAX, EDX, and ECX instead of on the stack. Functions that take a variable number of arguments will continue to be passed all of their arguments on the stack. stdcall
stdcall
attribute causes the compiler to assume that the called function will pop off the stack space used to pass arguments, unless it takes a variable number of arguments. 1 0
- GCC __attribute__ meaning (reference for https://gcc.gnu.org/onlinedocs/gcc-3.2/gcc/Function-Att)
- __attribute__ gcc
- GCC __attribute__
- gcc __attribute__(())
- gcc 已知的问题及规避方案 https://gcc.gnu.org/bugs/#known
- gcc/
- gcc
- gcc
- gcc
- GCC
- gcc
- GCC
- gcc
- gcc
- GCC
- gcc
- Gcc
- gcc
- 数据透传
- 低成本和高性能的MySQL云数据库的实现
- SpringMVC自动登录功能
- 设计模式学习笔记(五):建造者模式【Builder Pattern】(一)问题提出
- SAP财务会计学习
- GCC __attribute__ meaning (reference for https://gcc.gnu.org/onlinedocs/gcc-3.2/gcc/Function-Att)
- ios 日期操作封装
- 怎样通过boost库的breadth_first_search算法查找点到点的最短路径
- OpenCV数字图像处理(4) 平移
- 四大组件之BroadcastReceiver
- Linux的Init程序与系统服务管理
- Hadoop Exception: java.lang.IllegalArgumentException: Does not contain a valid host:port authority:
- minicom & runscript 介绍
- NSUserDefaults存储mutable类型实例