LINUX.ORG.RU

Передача параметров функции в Си, через регистры


0

0
Возникла проблема. У меня есть много библиотек написанных на асме. На Watcom C, я писал: dword my_func(void*,void*,dword,dword); #pragma aux my_func parm [edi] [esi] [eax] [edx] У все работало. С gcc такая тема не прокатывает, он все равно пихает в стек. Очень нужно.
★
Похоже, что тут их надо или править, или в корзину...
anonymous
()
gcc -mregparm=num Control how many registers are used to pass integer arguments. By default, no registers are used to pass arguments, and at most 3 registers can be used. You can control this behavior for a specific function by using the function attribute `regparm'. See section Declaring Attributes of Functions. Warning: if you use this switch, and num is nonzero, then you must build all modules with the same value, including any libraries. This includes the system libraries and startup modules.
human ★
()
Вы не можете добавлять комментарии в эту тему: топик перемещен в архив.