xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_parisc_linux.s

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

michael@0 1 /* -*- Mode: asm; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
michael@0 2 * Version: MPL 1.1
michael@0 3 *
michael@0 4 * This Source Code Form is subject to the terms of the Mozilla Public
michael@0 5 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 7
michael@0 8 .LEVEL 1.1
michael@0 9 .text
michael@0 10 .align 4
michael@0 11
michael@0 12 framesz:
michael@0 13 .equ 128
michael@0 14
michael@0 15 .globl NS_InvokeByIndex
michael@0 16 .type NS_InvokeByIndex, @function
michael@0 17
michael@0 18
michael@0 19 NS_InvokeByIndex:
michael@0 20 .PROC
michael@0 21 .CALLINFO FRAME=72, CALLER,SAVE_RP, SAVE_SP, ENTRY_GR=3
michael@0 22 .ENTRY
michael@0 23
michael@0 24 ; frame marker takes 48 bytes,
michael@0 25 ; register spill area takes 8 bytes,
michael@0 26 ; local stack area takes 72 bytes result in 128 bytes total
michael@0 27
michael@0 28 STW %rp,-20(%sp)
michael@0 29 STW,MA %r3,128(%sp)
michael@0 30
michael@0 31 LDO -framesz(%r30),%r28
michael@0 32 STW %r28,-4(%r30) ; save previous sp
michael@0 33 STW %r19,-32(%r30)
michael@0 34
michael@0 35 STW %r26,-36-framesz(%r30) ; save argument registers in
michael@0 36 STW %r25,-40-framesz(%r30) ; in PREVIOUS frame
michael@0 37 STW %r24,-44-framesz(%r30) ;
michael@0 38 STW %r23,-48-framesz(%r30) ;
michael@0 39
michael@0 40 .CALL ARGW0=GR,ARGW1=GR,ARGW2=GR ;in=24,25,26;out=28
michael@0 41 BL invoke_count_bytes,%r31
michael@0 42 COPY %r31,%r2
michael@0 43
michael@0 44 CMPIB,>= 0,%r28, .+76
michael@0 45 COPY %r30,%r3 ; copy stack ptr to saved stack ptr
michael@0 46 ADD %r30,%r28,%r30 ; extend stack frame
michael@0 47 LDW -4(%r3),%r28 ; move frame
michael@0 48 STW %r28,-4(%r30)
michael@0 49 LDW -8(%r3),%r28
michael@0 50 STW %r28,-8(%r30)
michael@0 51 LDW -12(%r3),%r28
michael@0 52 STW %r28,-12(%r30)
michael@0 53 LDW -16(%r3),%r28
michael@0 54 STW %r28,-16(%r30)
michael@0 55 LDW -20(%r3),%r28
michael@0 56 STW %r28,-20(%r30)
michael@0 57 LDW -24(%r3),%r28
michael@0 58 STW %r28,-24(%r30)
michael@0 59 LDW -28(%r3),%r28
michael@0 60 STW %r28,-28(%r30)
michael@0 61 LDW -32(%r3),%r28
michael@0 62 STW %r28,-32(%r30)
michael@0 63
michael@0 64 LDO -40(%r30),%r26 ; load copy address
michael@0 65 LDW -44-framesz(%r3),%r25 ; load rest of 2 arguments
michael@0 66 LDW -48-framesz(%r3),%r24 ;
michael@0 67
michael@0 68 LDW -32(%r30),%r19 ; shared lib call destroys r19; reload
michael@0 69 .CALL ARGW0=GR,ARGW1=GR,ARGW2=GR ;in=24,25,26
michael@0 70 BL invoke_copy_to_stack,%r31
michael@0 71 COPY %r31,%r2
michael@0 72
michael@0 73 LDO -48(%r30),%r20
michael@0 74 EXTRW,U,= %r28,31,1,%r22
michael@0 75 FLDD 0(%r20),%fr7 ; load double arg 1
michael@0 76 EXTRW,U,= %r28,30,1,%r22
michael@0 77 FLDW 8(%r20),%fr5L ; load float arg 1
michael@0 78 EXTRW,U,= %r28,29,1,%r22
michael@0 79 FLDW 4(%r20),%fr6L ; load float arg 2
michael@0 80 EXTRW,U,= %r28,28,1,%r22
michael@0 81 FLDW 0(%r20),%fr7L ; load float arg 3
michael@0 82
michael@0 83 LDW -36-framesz(%r3),%r26 ; load ptr to 'that'
michael@0 84 LDW -40(%r30),%r25 ; load the rest of dispatch argument registers
michael@0 85 LDW -44(%r30),%r24
michael@0 86 LDW -48(%r30),%r23
michael@0 87
michael@0 88 LDW -36-framesz(%r3),%r20 ; load vtable addr
michael@0 89 LDW -40-framesz(%r3),%r28 ; load index
michael@0 90 LDW 0(%r20),%r20 ; follow vtable
michael@0 91 SH2ADDL %r28,%r20,%r28 ; add 4*index to vtable entry
michael@0 92 LDW 0(%r28),%r22 ; load vtable entry
michael@0 93
michael@0 94 .CALL ARGW0=GR,ARGW1=GR,ARGW2=GR,ARGW3=GR,RTNVAL=GR ;in=22-26;out=28;
michael@0 95 BL $$dyncall,%r31
michael@0 96 COPY %r31,%r2
michael@0 97
michael@0 98 LDW -32(%r30),%r19
michael@0 99 COPY %r3,%r30 ; restore saved stack ptr
michael@0 100
michael@0 101 LDW -148(%sp),%rp
michael@0 102 LDWM -128(%sp),%r3
michael@0 103 BV,N (%rp)
michael@0 104 NOP
michael@0 105 .EXIT
michael@0 106 .PROCEND ;in=23,24,25,26;
michael@0 107 .SIZE NS_InvokeByIndex, .-NS_InvokeByIndex
michael@0 108

mercurial