git subrepo pull --force deps/lightning
[pcsx_rearmed.git] / deps / lightning / check / lightning.c
index e60ef05..3cf3e70 100644 (file)
@@ -30,6 +30,7 @@
 #include <stdarg.h>
 #include <lightning.h>
 #include <dlfcn.h>
+#include <math.h>
 
 #if defined(__linux__) && (defined(__i386__) || defined(__x86_64__))
 #  include <fpu_control.h>
@@ -327,6 +328,12 @@ static void htonr_ui(void);        static void ntohr_ui(void);
 static void htonr_ul(void);    static void ntohr_ul(void);
 #endif
 static void htonr(void);       static void ntohr(void);
+static void bswapr_us(void);   static void bswapr_ui(void);
+#if __WORDSIZE == 64
+static void bswapr_ul(void);
+#endif
+static void bswapr(void);
+static void movnr(void);       static void movzr(void);
 static void ldr_c(void);       static void ldi_c(void);
 static void ldr_uc(void);      static void ldi_uc(void);
 static void ldr_s(void);       static void ldi_s(void);
@@ -641,6 +648,12 @@ static instr_t               instr_vector[] = {
     entry(htonr_ul),   entry(ntohr_ul),
 #endif
     entry(htonr),      entry(ntohr),
+    entry(bswapr_us),  entry(bswapr_ui),
+#if __WORDSIZE == 64
+    entry(bswapr_ul),
+#endif
+    entry(bswapr),
+    entry(movnr),      entry(movzr),
     entry(ldr_c),      entry(ldi_c),
     entry(ldr_uc),     entry(ldi_uc),
     entry(ldr_s),      entry(ldi_s),
@@ -1489,6 +1502,12 @@ entry_ir_ir(htonr_ui)            entry_ir_ir(ntohr_ui)
 entry_ir_ir(htonr_ul)          entry_ir_ir(ntohr_ul)
 #endif
 entry_ir_ir(htonr)             entry_ir_ir(ntohr)
+entry_ir_ir(bswapr_us)         entry_ir_ir(bswapr_ui)
+#if __WORDSIZE == 64
+entry_ir_ir(bswapr_ul)
+#endif
+entry_ir_ir(bswapr)
+entry_ir_ir_ir(movnr)          entry_ir_ir_ir(movzr)
 entry_ir_ir(ldr_c)             entry_ir_pm(ldi_c)
 entry_ir_ir(ldr_uc)            entry_ir_pm(ldi_uc)
 entry_ir_ir(ldr_s)             entry_ir_pm(ldi_s)
@@ -3791,11 +3810,11 @@ execute(int argc, char *argv[])
     function = jit_emit();
     if (flag_verbose > 1 || flag_disasm) {
        jit_print();
-       fprintf(stdout, "  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n");
+       fprintf(stderr, "  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n");
     }
     if (flag_verbose > 0 || flag_disasm) {
        jit_disassemble();
-       fprintf(stdout, "  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n");
+       fprintf(stderr, "  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n");
     }
 
     jit_clear_state();