xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_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 # This Source Code Form is subject to the terms of the Mozilla Public
michael@0 2 # License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 3 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
michael@0 4
michael@0 5 .set r0,0; .set r1,1; .set RTOC,2; .set r3,3; .set r4,4
michael@0 6 .set r5,5; .set r6,6; .set r7,7; .set r8,8; .set r9,9
michael@0 7 .set r10,10; .set r11,11; .set r12,12; .set r13,13; .set r14,14
michael@0 8 .set r15,15; .set r16,16; .set r17,17; .set r18,18; .set r19,19
michael@0 9 .set r20,20; .set r21,21; .set r22,22; .set r23,23; .set r24,24
michael@0 10 .set r25,25; .set r26,26; .set r27,27; .set r28,28; .set r29,29
michael@0 11 .set r30,30; .set r31,31
michael@0 12 .set f0,0; .set f1,1; .set f2,2; .set f3,3; .set f4,4
michael@0 13 .set f5,5; .set f6,6; .set f7,7; .set f8,8; .set f9,9
michael@0 14 .set f10,10; .set f11,11; .set f12,12; .set f13,13; .set f14,14
michael@0 15 .set f15,15; .set f16,16; .set f17,17; .set f18,18; .set f19,19
michael@0 16 .set f20,20; .set f21,21; .set f22,22; .set f23,23; .set f24,24
michael@0 17 .set f25,25; .set f26,26; .set f27,27; .set f28,28; .set f29,29
michael@0 18 .set f30,30; .set f31,31
michael@0 19
michael@0 20 #if _CALL_ELF == 2
michael@0 21 #define STACK_PARAMS 96
michael@0 22 #else
michael@0 23 #define STACK_PARAMS 112
michael@0 24 #endif
michael@0 25
michael@0 26 #if _CALL_ELF == 2
michael@0 27 .section ".text"
michael@0 28 .type SharedStub,@function
michael@0 29 .globl SharedStub
michael@0 30 # Make the symbol hidden so that the branch from the stub does
michael@0 31 # not go via a PLT. This is not only better for performance,
michael@0 32 # but may be necessary to avoid linker errors since there is
michael@0 33 # no place to restore the TOC register in a sibling call.
michael@0 34 .hidden SharedStub
michael@0 35 .align 2
michael@0 36 SharedStub:
michael@0 37 0: addis 2,12,(.TOC.-0b)@ha
michael@0 38 addi 2,2,(.TOC.-0b)@l
michael@0 39 .localentry SharedStub,.-SharedStub
michael@0 40 #else
michael@0 41 .section ".text"
michael@0 42 .align 2
michael@0 43 .globl SharedStub
michael@0 44 # Make the symbol hidden so that the branch from the stub does
michael@0 45 # not go via a PLT. This is not only better for performance,
michael@0 46 # but may be necessary to avoid linker errors since there is
michael@0 47 # no place to restore the TOC register in a sibling call.
michael@0 48 .hidden SharedStub
michael@0 49 .section ".opd","aw"
michael@0 50 .align 3
michael@0 51
michael@0 52 SharedStub:
michael@0 53 .quad .SharedStub,.TOC.@tocbase
michael@0 54 .previous
michael@0 55 .type SharedStub,@function
michael@0 56
michael@0 57 .SharedStub:
michael@0 58 #endif
michael@0 59 mflr r0
michael@0 60
michael@0 61 std r4, -56(r1) # Save all GPRS
michael@0 62 std r5, -48(r1)
michael@0 63 std r6, -40(r1)
michael@0 64 std r7, -32(r1)
michael@0 65 std r8, -24(r1)
michael@0 66 std r9, -16(r1)
michael@0 67 std r10, -8(r1)
michael@0 68
michael@0 69 stfd f13, -64(r1) # ... and FPRS
michael@0 70 stfd f12, -72(r1)
michael@0 71 stfd f11, -80(r1)
michael@0 72 stfd f10, -88(r1)
michael@0 73 stfd f9, -96(r1)
michael@0 74 stfd f8, -104(r1)
michael@0 75 stfd f7, -112(r1)
michael@0 76 stfd f6, -120(r1)
michael@0 77 stfd f5, -128(r1)
michael@0 78 stfd f4, -136(r1)
michael@0 79 stfd f3, -144(r1)
michael@0 80 stfd f2, -152(r1)
michael@0 81 stfd f1, -160(r1)
michael@0 82
michael@0 83 subi r6,r1,56 # r6 --> gprData
michael@0 84 subi r7,r1,160 # r7 --> fprData
michael@0 85 addi r5,r1,STACK_PARAMS # r5 --> extra stack args
michael@0 86
michael@0 87 std r0, 16(r1)
michael@0 88
michael@0 89 stdu r1,-288(r1)
michael@0 90 # r3 has the 'self' pointer
michael@0 91 # already
michael@0 92
michael@0 93 mr r4,r11 # r4 is methodIndex selector,
michael@0 94 # passed via r11 in the
michael@0 95 # nsNSStubBase::StubXX() call
michael@0 96
michael@0 97 bl PrepareAndDispatch
michael@0 98 nop
michael@0 99
michael@0 100 ld 1,0(r1) # restore stack
michael@0 101 ld r0,16(r1) # restore LR
michael@0 102 mtlr r0
michael@0 103 blr
michael@0 104
michael@0 105 #if _CALL_ELF == 2
michael@0 106 .size SharedStub,.-SharedStub
michael@0 107 #else
michael@0 108 .size SharedStub,.-.SharedStub
michael@0 109 #endif
michael@0 110
michael@0 111 # Magic indicating no need for an executable stack
michael@0 112 .section .note.GNU-stack, "", @progbits ; .previous

mercurial