diff --git a/mozilla/build/mac/build_scripts/MozillaCheckoutList.txt b/mozilla/build/mac/build_scripts/MozillaCheckoutList.txt index 3fe9405b13d..679228a397b 100644 --- a/mozilla/build/mac/build_scripts/MozillaCheckoutList.txt +++ b/mozilla/build/mac/build_scripts/MozillaCheckoutList.txt @@ -7,12 +7,12 @@ # mozilla/gc, , 10/25/2000 12:00:00 # -mozilla/nsprpub, NETSCAPE_6_2_1_BRANCH -mozilla/security/nss, NETSCAPE_6_2_1_BRANCH -mozilla/security/manager, NETSCAPE_6_2_1_BRANCH -mozilla/accessible, NETSCAPE_6_2_1_BRANCH -DirectorySDKSourceC, NETSCAPE_6_2_1_BRANCH -mozilla/lib/mac/Instrumentation, NETSCAPE_6_2_1_BRANCH -mozilla/gfx2, NETSCAPE_6_2_1_BRANCH -mozilla/modules/libpr0n, NETSCAPE_6_2_1_BRANCH -SeaMonkeyAll, NETSCAPE_6_2_1_BRANCH +mozilla/nsprpub, NETSCAPE_6_2_1_RELEASE +mozilla/security/nss, NETSCAPE_6_2_1_RELEASE +mozilla/security/manager, NETSCAPE_6_2_1_RELEASE +mozilla/accessible, NETSCAPE_6_2_1_RELEASE +DirectorySDKSourceC, NETSCAPE_6_2_1_RELEASE +mozilla/lib/mac/Instrumentation, NETSCAPE_6_2_1_RELEASE +mozilla/gfx2, NETSCAPE_6_2_1_RELEASE +mozilla/modules/libpr0n, NETSCAPE_6_2_1_RELEASE +SeaMonkeyAll, NETSCAPE_6_2_1_RELEASE diff --git a/mozilla/client.mak b/mozilla/client.mak index 5b6486b42a1..c8cf67d6364 100644 --- a/mozilla/client.mak +++ b/mozilla/client.mak @@ -40,14 +40,14 @@ MOZ_OBJDIR = WIN32_O.OBJ #// Figure out how to do the pull. #//------------------------------------------------------------------------ # uncomment these, modify branch tag, and check in to branch for milestones -MOZ_BRANCH=NETSCAPE_6_2_1_BRANCH -NSPR_CO_TAG=NETSCAPE_6_2_1_BRANCH -PSM_CO_TAG=NETSCAPE_6_2_1_BRANCH -NSS_CO_TAG=NETSCAPE_6_2_1_BRANCH -LDAPCSDK_CO_TAG=NETSCAPE_6_2_1_BRANCH -ACCESSIBLE_CO_TAG=NETSCAPE_6_2_1_BRANCH -IMGLIB2_CO_TAG=NETSCAPE_6_2_1_BRANCH -GFX2_CO_TAG=NETSCAPE_6_2_1_BRANCH +MOZ_BRANCH=NETSCAPE_6_2_1_RELEASE +NSPR_CO_TAG=NETSCAPE_6_2_1_RELEASE +PSM_CO_TAG=NETSCAPE_6_2_1_RELEASE +NSS_CO_TAG=NETSCAPE_6_2_1_RELEASE +LDAPCSDK_CO_TAG=NETSCAPE_6_2_1_RELEASE +ACCESSIBLE_CO_TAG=NETSCAPE_6_2_1_RELEASE +IMGLIB2_CO_TAG=NETSCAPE_6_2_1_RELEASE +GFX2_CO_TAG=NETSCAPE_6_2_1_RELEASE !ifdef MOZ_BRANCH diff --git a/mozilla/client.mk b/mozilla/client.mk index 3a04381863a..6a998acd30c 100644 --- a/mozilla/client.mk +++ b/mozilla/client.mk @@ -52,14 +52,14 @@ # # For branches, uncomment the MOZ_CO_TAG line with the proper tag, # and commit this file on that tag. -MOZ_CO_TAG = NETSCAPE_6_2_1_BRANCH -NSPR_CO_TAG = NETSCAPE_6_2_1_BRANCH -PSM_CO_TAG = NETSCAPE_6_2_1_BRANCH -NSS_CO_TAG = NETSCAPE_6_2_1_BRANCH -LDAPCSDK_CO_TAG = NETSCAPE_6_2_1_BRANCH -ACCESSIBLE_CO_TAG = NETSCAPE_6_2_1_BRANCH -GFX2_CO_TAG = NETSCAPE_6_2_1_BRANCH -IMGLIB2_CO_TAG = NETSCAPE_6_2_1_BRANCH +MOZ_CO_TAG = NETSCAPE_6_2_1_RELEASE +NSPR_CO_TAG = NETSCAPE_6_2_1_RELEASE +PSM_CO_TAG = NETSCAPE_6_2_1_RELEASE +NSS_CO_TAG = NETSCAPE_6_2_1_RELEASE +LDAPCSDK_CO_TAG = NETSCAPE_6_2_1_RELEASE +ACCESSIBLE_CO_TAG = NETSCAPE_6_2_1_RELEASE +GFX2_CO_TAG = NETSCAPE_6_2_1_RELEASE +IMGLIB2_CO_TAG = NETSCAPE_6_2_1_RELEASE BUILD_MODULES = all ####################################################################### diff --git a/mozilla/js/landbranch.pl b/mozilla/js/landbranch.pl deleted file mode 100755 index 369b74d43e0..00000000000 --- a/mozilla/js/landbranch.pl +++ /dev/null @@ -1,227 +0,0 @@ -#! /usr/local/bin/perl5 - -use File::Path; - -# The development branch is where primary development and checkins -# are done on a day-to-day basis. -$development_branch_prefix = "SpiderMonkey140"; - -# Space-separated list of CVS-controlled directories to tag/merge -$merge_dirs = - "mozilla/js/src " ; - -# When line below uncommented, don't recurse into subdirs -#$recurse_flag = '-l'; - -#---------------------------------------------------------------------------- - -# The merge branch is itself a branch off of the development branch -# at a point where the development branch is thought to be stable. -# (A branch is used rather than a static tag because, inevitably, -# the development branch is not quite as stable/buildable as was -# thought.) The contents of the merge branch will be copied to -# the trunk when merging takes place. - - -# The following tags are created automatically by this script: -# -# JS_STABLE_DROP -# -# A static tag on the development branch (or a branch off the -# development branch) that indicates the code that should be merged -# into the trunk. This is a "variable" tag in the sense that it is -# redefined after each merge. -# -# JS_LAST_STABLE_DROP -# -# A static tag that is a copy of what the JS_STABLE_DROP tag was in -# the previous merge cycle. This is a "variable" tag that is -# redefined after each merge. Changes in the branch can be merged -# to the trunk by using: -# -# cvs up -jJS_LAST_STABLE_DROP -jJS_STABLE_DROP -# -# JS_LANDING -# -# A static tag that identifies the code on the trunk after the merge -# from the branch to the trunk takes place. This is a "variable" -# tag that is redefined after each merge. Changes on the trunk -# since the last branch landing can be seen by using: -# -# cvs diff -rJS_LANDING -rHEAD -# -# JS_LANDING_mmddyyyy -# -# This is a tag on the trunk which may be used for archaeological -# purposes. This tag is made from the JS_LANDING tag. - - -$development_branch = $development_branch_prefix . "_BRANCH"; -$development_base = $development_branch_prefix . "_BASE"; - -sub help { -print <<"END"; -$0: A tool for merging stable snapshots of JavaScript from a CVS -development branch onto the trunk - -Landing a snapshot of the development branch consists of -the following steps: - - 1) Tag all/some files on the branch to identify files to be merged. - 2) Merge files from the branch into the trunk using a temporary - working directory. - 3) Resolve any conflicts that arise as a result of the merge. - 4) Commit merged changes to the trunk. - 5) Make changes to resolve (build) difficulties and re-commit. - Repeat as necessary. - 6) Backpropagate changes on the trunk to the development branch. - -This script will assist with steps #2, #4 and #6: - - $0 -merge JS_STABLE_10131998 - $0 -commit - $0 -backpatch - -END -} - -sub log { - local($msg) = @_; - print LOGFILE $msg if $logfile; -} - -# Similar to die built-in -sub die { - local($msg) = @_; - &log($msg); - chomp($msg); - if ($logfile) { - $msg .= "\nSee $logfile for details."; - } - die "$msg\n"; -} - -# Similar to system() built-in -sub system { - local(@args) = @_; - local($cmd) = join(" ", @args); - &log("Executing: $cmd\n"); - - if ($logfile) { - $cmd .= " >> $logfile 2>&1"; - close(LOGFILE); - } - - local($result) = 0xffff & system($cmd); - - if ($logfile) { - open(LOGFILE, ">>$logfile"); - } - - return unless ($result); - $msg = "Died while executing $cmd"; - - if ($result == 0xff00) { - &die("$msg\nWhile executExecution failed due to perl error: $!. "); - } else { - $result >>= 8; - &die("$msg\nExecution failed; exit status: $result. "); - } -} - -chomp($root_dir = `pwd`); - -# Default log file -$logfile = $root_dir . "/log"; - -while ($#ARGV >=0) { - $_ = shift; - - if (/-merge/) { - $do_tag = 1; - $do_checkout = 1; - $do_merge = 1; - $tag = shift; - } elsif (/-commit/ || /-ci/) { - $do_commit = 1; - } elsif (/-backpatch/) { - $do_backpatch = 1; - } elsif (/-log/) { - $logfile = shift; - } elsif (/-tag/) { # Debugging option - $do_tag = 1; - $tag = shift; - } elsif (/-co/) { # Debugging option - $do_checkout = 1; - } else { - print STDERR "Illegal option: $_\n" unless (/-h/); - &help(); - exit(1); - } -} - -die "You must set your CVSROOT environment variable" if !$ENV{"CVSROOT"}; - -if ($logfile) { - open(LOGFILE, ">$logfile") || die "Couldn't open log file \"$logfile\""; - print("Logging to file \"$logfile\".\n"); -} - -$trunk_dir = $root_dir . "/trunk"; - -if ($do_tag) { - if (!$tag) { - &die("Must specify tag on command-line\n"); - } - - print("Tagging tree with tag JS_STABLE_DROP.\n"); - &system("cvs rtag $recurse_flag -F -r $tag JS_STABLE_DROP $merge_dirs"); -} - -if ($do_checkout) { - - # Delete trunk subdir if it already exists - if (-d $trunk_dir) { - &log("Deleting directory $trunk_dir\n"); - rmtree ($trunk_dir, 0, 1); - } - &log("Creating directory $trunk_dir\n"); - mkdir($trunk_dir, 0777) || die "Couldn't create directory $trunk_dir"; - - # Check out on trunk - print("Checking out $merge_dirs.\n"); - chdir $trunk_dir; - &system("cvs co $recurse_flag -A $merge_dirs"); -} - -if ($do_merge) { - chdir $trunk_dir; - print("Merging from JS_STABLE_DROP into trunk\n"); - &system("cvs up -jJS_LAST_STABLE_DROP -jJS_STABLE_DROP"); -} - -if ($do_commit) { - &die("No merged tree found. Wrong directory ?") if (!chdir $trunk_dir); - - ($_,$_,$_,$day,$mon,$year,$_,$_) = localtime(time()); - if ($year < 30) { - $year = "20" . $year; - } else { - $year = "19" . $year; - } - - $mmddyyyy = sprintf("%02d%02d%s", $mon, $day, $year); - - print("Checking in code on trunk"); - &system("cvs ci -m 'Stable drop of JavaScript interpreter code from " . - "$development_branch'"); - - # Tag merged result - &system("cvs tag -F JS_LANDING"); - &system("cvs tag -F JS_LANDING_$mmddyyyy"); - - # Move JS_LAST_STABLE_DROP tag forward - &system("cvs tag -F -rJS_STABLE_DROP JS_LAST_STABLE_DROP"); -} - - diff --git a/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ipf32.s b/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ipf32.s new file mode 100644 index 00000000000..c846b1f43cb --- /dev/null +++ b/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ipf32.s @@ -0,0 +1,145 @@ + +// Select C numeric constant + .radix C +// for 64 bit mode, use .psr abi64 + .psr abi32 +// big endian + .psr msb +// Section has executable code + .section .text, "ax","progbits" +// procedure named 'XPTC_InvokeByIndex' + .proc XPTC_InvokeByIndex +// manual bundling + .explicit + +// extern "C" PRUint32 +// invoke_copy_to_stack(uint64_t* d, +// const PRUint32 paramCount, nsXPTCVariant* s) + .global invoke_copy_to_stack +// .exclass invoke_copy_to_stack, @fullyvisible + .type invoke_copy_to_stack,@function + +// .exclass XPTC_InvokeByIndex, @fullyvisible + .type XPTC_InvokeByIndex,@function + +// XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex, +// PRUint32 paramCount, nsXPTCVariant* params); +XPTC_InvokeByIndex:: + .prologue + .save ar.pfs, r37 +// allocate 4 input args, 6 local args, and 8 output args + alloc r37 = ar.pfs, 4, 6, 8, 0 // M + nop.i 0 ;; // I + +// unwind table already knows gp, no need to specify anything + add r39 = 0, gp // A + .save rp, r36 + mov r36 = rp // I + .vframe r38 + add r38 = 0, sp ;; // A + +// We first calculate the amount of extra memory stack space required +// for the arguments, and register storage. +// We then call invoke_copy_to_stack() to write the argument contents +// to the specified memory regions. +// We then copy the integer arguments to integer registers, and floating +// arguments to float registers. +// Lastly we load the virtual table jump pointer, and call the target +// subroutine. + +// in0 : that +// in1 : methodIndex +// in2 : paramCount +// in3 : params + +// stack frame size is 16 + (8 * even(paramCount)) + 64 + 64 +// 16 byte frame header +// 8 * even(paramCount) memory argument area +// 64 bytes integer register area +// 64 bytes float register area +// This scheme makes sure stack fram size is a multiple of 16 + + .body + add r10 = 8, r0 // A +// r41 points to float register area + add r41 = -64, sp // A +// r40 points to int register area + add r40 = -128, sp ;; // A + + add out1 = 0, r40 // A + add out2 = 0, r41 // A + tbit.z p14,p15 = in2,0 ;; // I + +// compute 8 * even(paramCount) +(p14) shladd r11 = in2, 3, r0 ;; // A +(p15) shladd r11 = in2, 3, r10 ;; // A + sub out0 = r40, r11 ;; // A + +// advance the stack frame + add sp = -16, out0 // A + add out3 = 0, in2 // A + add out4 = 0, in3 // A + +// branch to invoke_copy_to_stack + br.call.sptk.few rp = invoke_copy_to_stack ;; // B + +// restore gp + add gp = 0, r39 // A + add out0 = 0, in0 // A + +// load the integer and float registers + ld8 out1 = [r40], 8 // M + ldfd f8 = [r41], 8 ;; // M + + ld8 out2 = [r40], 8 // M + ldfd f9 = [r41], 8 ;; // M + + ld8 out3 = [r40], 8 // M + ldfd f10 = [r41], 8 ;; // M + + ld8 out4 = [r40], 8 // M + ldfd f11 = [r41], 8 ;; // M + + ld8 out5 = [r40], 8 // M + ldfd f12 = [r41], 8 ;; // M +// 16 * methodIndex + shladd r11 = in1, 4, r0 // A + + ld8 out6 = [r40], 8 // M + ldfd f13 = [r41], 8 ;; // M + + ld8 out7 = [r40], 8 // M + ldfd f14 = [r41], 8 // M + addp4 r8 = 0, in0 ;; // A + +// look up virtual base table and dispatch to target subroutine +// This section assumes 32 bit pointer mode, and virtual base table +// layout from the ABI http://www.codesourcery.com/cxx-abi/abi.html + +// load base table + ld4 r8 = [r8] ;; // M + addp4 r8 = r11, r8 ;; // A + + // first entry is jump pointer, second entry is gp + addp4 r9 = 8, r8 ;; // A +// load jump pointer + ld8 r8 = [r8] + +// load gp + ld8 gp = [r9] ;; // M + mov b6 = r8 ;; // I + +// branch to target virtual function + br.call.sptk.few rp = b6 ;; // B + +// epilog + mov ar.pfs = r37 // I + mov rp = r36 ;; // I + + add sp = 0, r38 // A + add gp = 0, r39 // A + br.ret.sptk.few rp ;; // B + + .endp + + diff --git a/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ipf32.cpp b/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ipf32.cpp new file mode 100644 index 00000000000..ff348d36fa0 --- /dev/null +++ b/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ipf32.cpp @@ -0,0 +1,148 @@ + +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- + * + * The contents of this file are subject to the Netscape Public + * License Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.mozilla.org/NPL/ + * + * Software distributed under the License is distributed on an "AS + * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + * implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code is mozilla.org code. + * + * The Initial Developer of the Original Code is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1999 Netscape Communications Corporation. All + * Rights Reserved. + * + * Contributor(s): + */ + +#include "xptcprivate.h" + +#include + +// "This code is for IA64 only" + + +/* invoke_copy_to_stack() will copy from variant array 's' to + * the stack argument area 'mloc', the integer register area 'iloc', and + * the float register area 'floc'. + * + */ +extern "C" void +invoke_copy_to_stack(uint64_t* mloc, uint64_t* iloc, uint64_t* floc, + const PRUint32 paramCount, nsXPTCVariant* s) +{ + uint64_t* dest = mloc; + PRUint32 len = paramCount; + nsXPTCVariant* source = s; + + PRUint32 indx; + PRUint32 endlen; + endlen = (len > 7) ? 7 : len; + /* handle the memory arguments */ + for (indx = 7; indx < len; ++indx) + { + if (source[indx].IsPtrData()) + { +#ifdef __LP64__ + /* 64 bit pointer mode */ + *((void**) dest) = source[indx].ptr; +#else + /* 32 bit pointer mode */ + uint32_t* adr = (uint32_t*) dest; + *(adr) = 0; + *(adr+1) = (uint32_t) source[indx].ptr; +#endif + } + else + switch (source[indx].type) + { + case nsXPTType::T_I8 : *(dest) = source[indx].val.i8; break; + case nsXPTType::T_I16 : *(dest) = source[indx].val.i16; break; + case nsXPTType::T_I32 : *(dest) = source[indx].val.i32; break; + case nsXPTType::T_I64 : *(dest) = source[indx].val.i64; break; + case nsXPTType::T_U8 : *(dest) = source[indx].val.u8; break; + case nsXPTType::T_U16 : *(dest) = source[indx].val.u16; break; + case nsXPTType::T_U32 : *(dest) = source[indx].val.u32; break; + case nsXPTType::T_U64 : *(dest) = source[indx].val.u64; break; + case nsXPTType::T_FLOAT : *(dest) = source[indx].val.u32; break; + case nsXPTType::T_DOUBLE: *(dest) = source[indx].val.u64; break; + case nsXPTType::T_BOOL : *(dest) = source[indx].val.b; break; + case nsXPTType::T_CHAR : *(dest) = source[indx].val.c; break; + case nsXPTType::T_WCHAR : *(dest) = source[indx].val.wc; break; + default: + // all the others are plain pointer types +#ifdef __LP64__ + /* 64 bit pointer mode */ + *((void**) dest) = source[indx].val.p; +#else + { + /* 32 bit pointer mode */ + uint32_t* adr = (uint32_t*) dest; + *(adr) = 0; + *(adr+1) = (uint32_t) source[indx].val.p; + } +#endif + } + ++dest; + } + /* process register arguments */ + dest = iloc; + for (indx = 0; indx < endlen; ++indx) + { + if (source[indx].IsPtrData()) + { +#ifdef __LP64__ + /* 64 bit pointer mode */ + *((void**) dest) = source[indx].ptr; +#else + /* 32 bit pointer mode */ + uint32_t* adr = (uint32_t*) dest; + *(adr) = 0; + *(adr+1) = (uint32_t) source[indx].ptr; +#endif + } + else + switch (source[indx].type) + { + case nsXPTType::T_I8 : *(dest) = source[indx].val.i8; break; + case nsXPTType::T_I16 : *(dest) = source[indx].val.i16; break; + case nsXPTType::T_I32 : *(dest) = source[indx].val.i32; break; + case nsXPTType::T_I64 : *(dest) = source[indx].val.i64; break; + case nsXPTType::T_U8 : *(dest) = source[indx].val.u8; break; + case nsXPTType::T_U16 : *(dest) = source[indx].val.u16; break; + case nsXPTType::T_U32 : *(dest) = source[indx].val.u32; break; + case nsXPTType::T_U64 : *(dest) = source[indx].val.u64; break; + case nsXPTType::T_FLOAT : + *((double*) (floc++)) = (double) source[indx].val.f; + break; + case nsXPTType::T_DOUBLE: + *((double*) (floc++)) = source[indx].val.d; + break; + case nsXPTType::T_BOOL : *(dest) = source[indx].val.b; break; + case nsXPTType::T_CHAR : *(dest) = source[indx].val.c; break; + case nsXPTType::T_WCHAR : *(dest) = source[indx].val.wc; break; + default: + // all the others are plain pointer types +#ifdef __LP64__ + /* 64 bit pointer mode */ + *((void**) dest) = source[indx].val.p; +#else + { + /* 32 bit pointer mode */ + uint32_t* adr = (uint32_t*) dest; + *(adr) = 0; + *(adr+1) = (uint32_t) source[indx].val.p; + } +#endif + } + ++dest; + } + +} + diff --git a/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ipf32.s b/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ipf32.s new file mode 100644 index 00000000000..591e88e5ade --- /dev/null +++ b/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ipf32.s @@ -0,0 +1,124 @@ + +// Select C numeric constant + .radix C + .psr abi32 + .psr msb +// Section has executable code + .section .text, "ax","progbits" +// procedure named 'SharedStub' + .proc SharedStub +// manual bundling + .explicit + + .global PrepareAndDispatch +// .exclass PrepareAndDispatch, @fullyvisible + .type PrepareAndDispatch,@function + +SharedStub:: +// 9 arguments, first 8 are the input arguments of previous +// function call. The last one is methodIndex, and is passed in memory + .prologue + .save ar.pfs , r41 +// allocate 8 input args, 4 local args, and 5 output args + alloc r41 = ar.pfs, 8, 4, 5, 0 // M + .save rp, r40 + mov r40 = rp // I + nop.i 0 ;; // I + + .save ar.unat, r42 + mov r42 = ar.unat // M + .fframe 144 + add sp = -144, sp // A +// unwind table already knows gp, don't need to specify anything + add r43 = 0, gp ;; // A + +// We have possible 8 integer registers and 8 float registers that could +// be arguments. We also have a stack region from the previous +// stack frame that may hold some stack arguments. +// We need to write the integer registers to a memory region, write +// the float registers to a memory region (making sure we don't step +// on NAT while touching the registers). We also mark the memory +// address of the stack arguments. +// We then call PrepareAndDispatch() specifying the three memory +// region pointers. + + + .body + add out0 = 0, in0 // A move self ptr +// 144 bytes = 16 byte stack header + 64 byte int space + 64 byte float space +// current frame is 144 bytes, previous frame is 112 bytes +// restarg is at 144 + 112 + 16 bytes away from current sp +// (current frame + previous frame + previous previous frame header) +// methodIndex is at 144 + 16 bytes away from current sp +// (current frame + previous frame header) + add out4 = 192, sp // A restarg address + add r11 = 160, sp ;; // A address of methodIndex + + ld8 out1 = [r11] // M load methodIndex +// sp + 16 is the start of intargs + add out2 = 16, sp // A address of intargs +// the intargs take up 64 bytes, so sp + 16 + 64 is the start of floatargs + add out3 = 80, sp ;; // A address of floatargs + + add r11 = 0, out2 ;; // A + st8.spill [r11] = in1, 8 // M + add r10 = 0, out3 ;; // A + + st8.spill [r11] = in2, 8 ;; // M + st8.spill [r11] = in3, 8 // M + nop.i 0 ;; // I + + st8.spill [r11] = in4, 8 ;; // M + st8.spill [r11] = in5, 8 // M + nop.i 0 ;; // I + + st8.spill [r11] = in6, 8 ;; // M + st8.spill [r11] = in7 // M + fclass.nm p14,p15 = f8,@nat ;; // F + +(p14) stfd [r10] = f8, 8 // M +(p15) add r10 = 8, r10 // A + fclass.nm p12,p13 = f9,@nat ;; // F + +(p12) stfd [r10] = f9, 8 // M +(p13) add r10 = 8, r10 // A + fclass.nm p14,p15 =f10,@nat ;; // F + +(p14) stfd [r10] = f10, 8 // M +(p15) add r10 = 8, r10 // A + fclass.nm p12,p13 =f11,@nat ;; // F + +(p12) stfd [r10] = f11, 8 // M +(p13) add r10 = 8, r10 // A + fclass.nm p14,p15 =f12,@nat ;; // F + +(p14) stfd [r10] = f12, 8 // M +(p15) add r10 = 8, r10 // A + fclass.nm p12,p13 =f13,@nat ;; // F + +(p12) stfd [r10] = f13, 8 // M +(p13) add r10 = 8, r10 // A + fclass.nm p14,p15 =f14,@nat ;; // F + +(p14) stfd [r10] = f14, 8 // M +(p15) add r10 = 8, r10 // A + fclass.nm p12,p13 =f15,@nat ;; // F + +(p12) stfd [r10] = f15, 8 // M +(p13) add r10 = 8, r10 // A + +// branch to PrepareAndDispatch + br.call.dptk.few rp = PrepareAndDispatch ;; // B + +// epilog + mov ar.unat = r42 // M + mov ar.pfs = r41 // I + mov rp = r40 ;; // I + + add gp = 0, r43 // A + add sp = 144, sp // A + br.ret.dptk.few rp ;; // B + + .endp + + diff --git a/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ipf32.cpp b/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ipf32.cpp new file mode 100644 index 00000000000..43d9e7d7d8c --- /dev/null +++ b/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ipf32.cpp @@ -0,0 +1,169 @@ + +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- + * + * The contents of this file are subject to the Netscape Public + * License Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.mozilla.org/NPL/ + * + * Software distributed under the License is distributed on an "AS + * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + * implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code is mozilla.org code. + * + * The Initial Developer of the Original Code is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1999 Netscape Communications Corporation. All + * Rights Reserved. + * + * Contributor(s): + */ + + +#include "xptcprivate.h" + +#include +#include + +// "This code is for IA64 only" + +/* Implement shared vtbl methods. */ + +extern "C" nsresult +PrepareAndDispatch(nsXPTCStubBase* self, PRUint32 methodIndex, + uint64_t* intargs, uint64_t* floatargs, uint64_t* restargs) +{ + +#define PARAM_BUFFER_COUNT 16 + + nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT]; + nsXPTCMiniVariant* dispatchParams = NULL; + nsIInterfaceInfo* iface_info = NULL; + const nsXPTMethodInfo* info; + nsresult result = NS_ERROR_FAILURE; + uint64_t* iargs = intargs; + uint64_t* fargs = floatargs; + PRUint8 paramCount; + PRUint8 i; + + NS_ASSERTION(self,"no self"); + + self->GetInterfaceInfo(&iface_info); + NS_ASSERTION(iface_info,"no interface info"); + + iface_info->GetMethodInfo(PRUint16(methodIndex), &info); + NS_ASSERTION(info,"no interface info"); + + paramCount = info->GetParamCount(); + + // setup variant array pointer + if(paramCount > PARAM_BUFFER_COUNT) + dispatchParams = new nsXPTCMiniVariant[paramCount]; + else + dispatchParams = paramBuffer; + NS_ASSERTION(dispatchParams,"no place for params"); + + for(i = 0; i < paramCount; ++i) + { + int isfloat = 0; + const nsXPTParamInfo& param = info->GetParam(i); + const nsXPTType& type = param.GetType(); + nsXPTCMiniVariant* dp = &dispatchParams[i]; + + if(param.IsOut() || !type.IsArithmetic()) + { +#ifdef __LP64__ + /* 64 bit pointer mode */ + dp->val.p = (void*) *iargs; +#else + /* 32 bit pointer mode */ + uint32_t* adr = (uint32_t*) iargs; + dp->val.p = (void*) (*(adr+1)); +#endif + } + else + switch(type) + { + case nsXPTType::T_I8 : dp->val.i8 = *(iargs); break; + case nsXPTType::T_I16 : dp->val.i16 = *(iargs); break; + case nsXPTType::T_I32 : dp->val.i32 = *(iargs); break; + case nsXPTType::T_I64 : dp->val.i64 = *(iargs); break; + case nsXPTType::T_U8 : dp->val.u8 = *(iargs); break; + case nsXPTType::T_U16 : dp->val.u16 = *(iargs); break; + case nsXPTType::T_U32 : dp->val.u32 = *(iargs); break; + case nsXPTType::T_U64 : dp->val.u64 = *(iargs); break; + case nsXPTType::T_FLOAT : + isfloat = 1; + if (i < 7) + dp->val.f = (float) *((double*) fargs); /* register */ + else + dp->val.u32 = *(fargs); /* memory */ + break; + case nsXPTType::T_DOUBLE : + isfloat = 1; + dp->val.u64 = *(fargs); + break; + case nsXPTType::T_BOOL : dp->val.b = *(iargs); break; + case nsXPTType::T_CHAR : dp->val.c = *(iargs); break; + case nsXPTType::T_WCHAR : dp->val.wc = *(iargs); break; + default: + NS_ASSERTION(0, "bad type"); + break; + } + if (i < 7) + { + /* we are parsing register arguments */ + if (i == 6) + { + // run out of register arguments, move on to memory arguments + iargs = restargs; + fargs = restargs; + } + else + { + ++iargs; // advance one integer register slot + if (isfloat) ++fargs; // advance float register slot if isfloat + } + } + else + { + /* we are parsing memory arguments */ + ++iargs; + ++fargs; + } + } + + result = self->CallMethod((PRUint16) methodIndex, info, dispatchParams); + + NS_RELEASE(iface_info); + + if(dispatchParams != paramBuffer) + delete [] dispatchParams; + + return result; +} + +extern "C" int SharedStub(PRUint64,PRUint64,PRUint64,PRUint64, + PRUint64,PRUint64,PRUint64,PRUint64,PRUint64); + +/* Variable a0-a7 were put there so we can have access to the 8 input + registers on Stubxyz entry */ + +#define STUB_ENTRY(n) \ +nsresult nsXPTCStubBase::Stub##n(PRUint64 a1, \ +PRUint64 a2,PRUint64 a3,PRUint64 a4,PRUint64 a5,PRUint64 a6,PRUint64 a7) \ +{ uint64_t a0 = (uint64_t) this; \ + return SharedStub(a0,a1,a2,a3,a4,a5,a6,a7,(PRUint64) n); \ +} + +#define SENTINEL_ENTRY(n) \ +nsresult nsXPTCStubBase::Sentinel##n() \ +{ \ + NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ + return NS_ERROR_NOT_IMPLEMENTED; \ +} + +#include "xptcstubsdef.inc" +