1; Trampoline for hppa64 CPU 2 3; Copyright 2017 Bruno Haible <bruno@clisp.org> 4; 5; This program is free software: you can redistribute it and/or modify 6; it under the terms of the GNU General Public License as published by 7; the Free Software Foundation; either version 2 of the License, or 8; (at your option) any later version. 9; 10; This program is distributed in the hope that it will be useful, 11; but WITHOUT ANY WARRANTY; without even the implied warranty of 12; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13; GNU General Public License for more details. 14; 15; You should have received a copy of the GNU General Public License 16; along with this program. If not, see <https://www.gnu.org/licenses/>. 17 18; Available registers: %r1, %r27, %r31. 19; %r27 has a fixed meaning at function calls: pic_base (a.k.a. gp or dp). 20; %r31 has a fixed meaning as millicode return pointer (mrp). 21 22#include "asm-hppa64.h" 23 24 .LEVEL 2.0w 25 TEXT1() 26 TEXT2() 27 .align 8 28 GLOBL(tramp) 29 DECLARE_FUNCTION(tramp) 30DEF(tramp) 31 .PROC 32 .CALLINFO FRAME=0,NO_CALLS 33 .ENTRY 34; The closure pointer is already in register %r27. 35; Move <data> into <variable>. 36 ldd 0(%r27),%r31 ; get <variable> 37 ldd 8(%r27),%r1 ; get <data> 38 std %r1,0(%r31) ; store <data> in <variable> 39; Jump to <function>. 40 ldd 16(%r27),%r27 ; get <function> 41 ldd 16(%r27),%r1 42 ldd 24(%r27),%r27 43 bve (%r1) ; jump to <function> 44 nop 45 .EXIT 46 .PROCEND 47DEF(L(fe1)) 48 FUNEND(tramp) 49 50#include "noexecstack.h" 51