cvsuser     03/09/22 13:46:15

  Modified:    .        build_nativecall.pl call_list.txt
  Log:
  Add some new types to the NCI. Non-x86 w/JIT only, alas
  
  Revision  Changes    Path
  1.20      +26 -1     parrot/build_nativecall.pl
  
  Index: build_nativecall.pl
  ===================================================================
  RCS file: /cvs/public/parrot/build_nativecall.pl,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -w -r1.19 -r1.20
  --- build_nativecall.pl       30 Jul 2003 14:59:46 -0000      1.19
  +++ build_nativecall.pl       22 Sep 2003 20:46:15 -0000      1.20
  @@ -5,6 +5,7 @@
   my %ret_count;
   %ret_count = (p => [0,0,0,1,0],        # Returning a pointer that we PMC stuff
              i => [0,1,0,0,0],        # Returning an int
  +           3 => [0,1,0,0,0],        # Returning an int pointer
              l => [0,1,0,0,0],        # Returning a long
              c => [0,1,0,0,0],        # returning a char
              s => [0,1,0,0,0],        # returning a short
  @@ -17,9 +18,12 @@
   
   my (%ret_type) = (p => "void *",
                  i => "int",
  +               3 => "int *",
                  l => "long",
  +               4 => "long *",
                  c => "char",
                  s => "short",
  +                  2 => "short *",
                     f => "float",
                     d => "double",
                     t => "char *",
  @@ -28,9 +32,12 @@
   
   my (%proto_type) = (p => "void *",
                    i => "int",
  +                 3 => "int *",
                    l => "long",
  +                 4 => "long *",
                    c => "char",
                    s => "short",
  +                    2 => "short *",
                    f => "float",
                    d => "double",
                    t => "char *",
  @@ -43,9 +50,12 @@
   
   my (%ret_type_decl) = (p => "void *",
                       i => "int",
  +                    3 => "int *",
                       l => "long",
  +                    4 => "long *",
                       c => "char",
                       s => "short",
  +                       2 => "short *",
                          f => "float",
                          d => "double",
                          t => "char *",
  @@ -54,9 +64,12 @@
   
   my (%ret_assign) = (p => "PMC_data(final_destination) = return_data;\nPMC_REG(5) = 
final_destination;",
                    i => "INT_REG(5) = return_data;",
  +                 3 => "INT_REG(5) = *return_data;",
                    l => "INT_REG(5) = return_data;",
  +                 4 => "INT_REG(5) = *return_data;",
                    c => "INT_REG(5) = return_data;",
                    s => "INT_REG(5) = return_data;",
  +                    2 => "INT_REG(5) = *return_data;",
                       f => "NUM_REG(5) = return_data;",
                       d => "NUM_REG(5) = return_data;",
                    v => "",
  @@ -64,6 +77,9 @@
   
   my (%func_call_assign) = (p => "return_data = ",
                          i => "return_data = ",
  +                       3 => "return_data = ",
  +                       2 => "return_data = ",
  +                       4 => "return_data = ",
                          l => "return_data = ",
                          c => "return_data = ",
                          s => "return_data = ",
  @@ -87,7 +103,7 @@
   /* nci.c
    *  Copyright: 2001-2003 The Perl Foundation.  All Rights Reserved.
    *  CVS Info
  - *     $Id: build_nativecall.pl,v 1.19 2003/07/30 14:59:46 leo Exp $
  + *     $Id: build_nativecall.pl,v 1.20 2003/09/22 20:46:15 dan Exp $
    *  Overview:
    *     Native Call Interface routines. The code needed to build a
    *     parrot to C call frame is in here
  @@ -203,10 +219,19 @@
       /i/ && do {my $regnum = $reg_ref->{i}++;
               return "(int)INT_REG($regnum)";
                 };
  +    /3/ && do {my $regnum = $reg_ref->{i}++;
  +            return "&(int)INT_REG($regnum)";
  +              };
       /l/ && do {my $regnum = $reg_ref->{i}++;
               return "(long)INT_REG($regnum)";
                 };
  +    /4/ && do {my $regnum = $reg_ref->{i}++;
  +            return "&(long)INT_REG($regnum)";
  +              };
       /s/ && do {my $regnum = $reg_ref->{i}++;
  +            return "(short)INT_REG($regnum)";
  +              };
  +    /2/ && do {my $regnum = $reg_ref->{i}++;
               return "(short)INT_REG($regnum)";
                 };
       /f/ && do {my $regnum = $reg_ref->{n}++;
  
  
  
  1.10      +11 -0     parrot/call_list.txt
  
  Index: call_list.txt
  ===================================================================
  RCS file: /cvs/public/parrot/call_list.txt,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -w -r1.9 -r1.10
  --- call_list.txt     30 Jul 2003 14:59:46 -0000      1.9
  +++ call_list.txt     22 Sep 2003 20:46:15 -0000      1.10
  @@ -6,6 +6,9 @@
   # s - short
   # i - int
   # l - long
  +# 2 - pointer to short
  +# 3 - pointer to int
  +# 4 - pointer to long
   # NUM reg stuff
   # f - float
   # d - double
  @@ -40,6 +43,14 @@
   i    pppp
   i    ppi
   p    It
  +i    4i
  +i    4
  +i    42p
  +i    lp
  +i    lsp
  +i    pll
  +i    ilsp
  +i    pl
   # These are needed for parrotio.pmc
   i    IP
   v    IP
  
  
  

Reply via email to