diff dyncall/dyncall_callvm_mips_o32.c @ 466:ddfb9577a00e

introduced platform-native thiscall mode (DC_CALL_C_DEFAULT_THIS), as needed for upcoming aggregate support (until now only x86 platforms allowed for specifically selecting thiscall mode, given the different conventions on the same platform); also added respective DC_SIGCHAR_CC_THISCALL ('*')
author Tassilo Philipp
date Wed, 02 Feb 2022 18:30:44 +0100
parents e2899b4ff713
children 71c884e610f0
line wrap: on
line diff
--- a/dyncall/dyncall_callvm_mips_o32.c	Wed Feb 02 12:55:23 2022 +0100
+++ b/dyncall/dyncall_callvm_mips_o32.c	Wed Feb 02 18:30:44 2022 +0100
@@ -6,7 +6,7 @@
  Description: mips "o32" ABI callvm implementation
  License:
 
-   Copyright (c) 2007-2020 Daniel Adler <dadler@uni-goettingen.de>, 
+   Copyright (c) 2007-2020 Daniel Adler <dadler@uni-goettingen.de>,
                            Tassilo Philipp <tphilipp@potion-studios.com>
 
    Permission to use, copy, modify, and distribute this software for any
@@ -130,16 +130,16 @@
 # if 0
     self->mRegData.u[self->mArgCount].f[1] = x;
    call kernel
-        
+
 	mips:
 	lwc1  $f12,  4($5)    <--- byte offset 4
 	lwc1  $f13,  0($5)
-	lwc1  $f14, 12($5)    <--- byte offset 12 
+	lwc1  $f14, 12($5)    <--- byte offset 12
 	lwc1  $f15,  8($5)
 	mipsel:
 	lwc1  $f12,  0($5)    <--- byte offset 4
 	lwc1  $f13,  4($5)
-	lwc1  $f14,  8($5)    <--- byte offset 12 
+	lwc1  $f14,  8($5)    <--- byte offset 12
 	lwc1  $f15, 12($5)
 
 #  if defined(DC__Endian_LITTLE)
@@ -192,7 +192,7 @@
 , &dc_callvm_mode_mips_o32
 , &dc_callvm_argBool_mips_o32
 , &dc_callvm_argChar_mips_o32
-, &dc_callvm_argShort_mips_o32 
+, &dc_callvm_argShort_mips_o32
 , &dc_callvm_argInt_mips_o32
 , &dc_callvm_argLong_mips_o32
 , &dc_callvm_argLongLong_mips_o32
@@ -221,13 +221,14 @@
 
   switch(mode) {
     case DC_CALL_C_DEFAULT:
+    case DC_CALL_C_DEFAULT_THIS:
     case DC_CALL_C_MIPS32_O32:
     case DC_CALL_C_ELLIPSIS:
     case DC_CALL_C_ELLIPSIS_VARARGS:
       vt = &gVT_mips_o32;
       break;
     default:
-      self->mInterface.mError = DC_ERROR_UNSUPPORTED_MODE; 
+      self->mInterface.mError = DC_ERROR_UNSUPPORTED_MODE;
       return;
   }
   dc_callvm_base_init(&self->mInterface, vt);