Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/VLC/test/checkasm/ext/tests/arm/64/   (VLC Media Plyer ©)  Datei vom 23.9.2026 mit Größe 12 kB image not shown  

Quelle  tests.c   Sprache: C

 

#include "tests.h"

#if ARCH_AARCH64

uint64_t selftest_get_cpu_flags_aarch64(void)
{
    return SELFTEST_CPU_FLAG_AARCH64;
}

DEF_NOOP_FUNC(clobber_x0);
DEF_NOOP_FUNC(clobber_x1);
DEF_NOOP_FUNC(clobber_x2);
DEF_NOOP_FUNC(clobber_x3);
DEF_NOOP_FUNC(clobber_x4);
DEF_NOOP_FUNC(clobber_x5);
DEF_NOOP_FUNC(clobber_x6);
DEF_NOOP_FUNC(clobber_x7);
DEF_NOOP_FUNC(clobber_x8);
DEF_NOOP_FUNC(clobber_x9);
DEF_NOOP_FUNC(clobber_x10);
DEF_NOOP_FUNC(clobber_x11);
DEF_NOOP_FUNC(clobber_x12);
DEF_NOOP_FUNC(clobber_x13);
DEF_NOOP_FUNC(clobber_x14);
DEF_NOOP_FUNC(clobber_x15);
DEF_NOOP_FUNC(clobber_x16);
DEF_NOOP_FUNC(clobber_x17);
// x18 skipped
DEF_NOOP_FUNC(clobber_x19);
DEF_NOOP_FUNC(clobber_x20);
DEF_NOOP_FUNC(clobber_x21);
DEF_NOOP_FUNC(clobber_x22);
DEF_NOOP_FUNC(clobber_x23);
DEF_NOOP_FUNC(clobber_x24);
DEF_NOOP_FUNC(clobber_x25);
DEF_NOOP_FUNC(clobber_x26);
DEF_NOOP_FUNC(clobber_x27);
DEF_NOOP_FUNC(clobber_x28);
DEF_NOOP_FUNC(clobber_x29);

DEF_NOOP_FUNC(clobber_d0);
DEF_NOOP_FUNC(clobber_d1);
DEF_NOOP_FUNC(clobber_d2);
DEF_NOOP_FUNC(clobber_d3);
DEF_NOOP_FUNC(clobber_d4);
DEF_NOOP_FUNC(clobber_d5);
DEF_NOOP_FUNC(clobber_d6);
DEF_NOOP_FUNC(clobber_d7);
DEF_NOOP_FUNC(clobber_d8);
DEF_NOOP_FUNC(clobber_d9);
DEF_NOOP_FUNC(clobber_d10);
DEF_NOOP_FUNC(clobber_d11);
DEF_NOOP_FUNC(clobber_d12);
DEF_NOOP_FUNC(clobber_d13);
DEF_NOOP_FUNC(clobber_d14);
DEF_NOOP_FUNC(clobber_d15);
DEF_NOOP_FUNC(clobber_d16);
DEF_NOOP_FUNC(clobber_d17);
DEF_NOOP_FUNC(clobber_d18);
DEF_NOOP_FUNC(clobber_d19);
DEF_NOOP_FUNC(clobber_d20);
DEF_NOOP_FUNC(clobber_d21);
DEF_NOOP_FUNC(clobber_d22);
DEF_NOOP_FUNC(clobber_d23);
DEF_NOOP_FUNC(clobber_d24);
DEF_NOOP_FUNC(clobber_d25);
DEF_NOOP_FUNC(clobber_d26);
DEF_NOOP_FUNC(clobber_d27);
DEF_NOOP_FUNC(clobber_d28);
DEF_NOOP_FUNC(clobber_d29);
DEF_NOOP_FUNC(clobber_d30);
DEF_NOOP_FUNC(clobber_d31);

DEF_NOOP_FUNC(clobber_v8_upper);
DEF_NOOP_FUNC(clobber_v9_upper);
DEF_NOOP_FUNC(clobber_v10_upper);
DEF_NOOP_FUNC(clobber_v11_upper);
DEF_NOOP_FUNC(clobber_v12_upper);
DEF_NOOP_FUNC(clobber_v13_upper);
DEF_NOOP_FUNC(clobber_v14_upper);
DEF_NOOP_FUNC(clobber_v15_upper);

DEF_NOOP_FUNC(sigill_aarch64);

// A function with 8 parameters in registers and 3 on the stack.
typedef void(many_args_func)(int, int, int, int, int, int, int, int, int, int, int);

#define DEF_MANY_ARGS_FUNC(NAME)                                                         \
    void selftest_##NAME(int, int, int, int, int, int, int, int
#(FLAG,NAME) DEF_GETTERFLAG,NAME,many_args_func,NULL)

DEF_MANY_ARGS_FUNCjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
EF_MANY_ARGS_FUNC)java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
();
(check_clobber_upper_x1_aarch64
DEF_MANY_ARGS_FUNC(check_clobber_upper_x2_aarch64);
DEF_MANY_ARGS_FUNC(check_clobber_upper_x3_aarch64);
DEF_MANY_ARGS_FUNC(check_clobber_upper_x4_aarch64);
DEF_NOOP_FUNC(clobber_x11);
DEF_MANY_ARGS_FUNC(check_clobber_upper_x6_aarch64);
DEF_MANY_ARGS_FUNC(check_clobber_upper_x7_aarch64);
DEF_MANY_ARGS_FUNC(java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 27
DEF_MANY_ARGS_FUNC(check_clobber_upper_stack1_aarch64);
DEF_MANY_ARGS_FUNC(check_clobber_upper_stack2_aarch64);

// A function with MAX_ARGS (15) arguments
java.lang.StringIndexOutOfBoundsException: Range [27, 7) out of bounds for length 86
                                int int,int int);
typedef void(DEF_NOOP_FUNC(clobber_x16;
                                  int64_t int64_t,int64_t, int64_t, int64_t, int64_t,
                                  int64_t, int64_t, int64_t);

#define DEF_MAX_INT_ARGS_FUNC(NAME)                                                      (clobber_x20);
(int, int int int, int, int, int int,int int,int int,\
                         , int int)
 DEF_MAX_INT_ARGS_GETTER(FLAG, NAME)                                              \
    DEF_GETTER(FLAG, NAME,max_int_args_func, NULL)
#define DEF_MAX_INT64_ARGS_FUNC(NAME)                                                    \
    ##NAME(java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 90
                         int64_t, java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 26
                         int64_t)
#define DEF_NOOP_FUNCclobber_d7;
    DEF_GETTER(FLAG, NAME, max_int64_args_funcDEF_NOOP_FUNC;

DEF_MAX_INT_ARGS_FUNC(java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 26
DEF_MAX_INT64_ARGS_FUNCcheck_max_int64_args_aarch64)java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54

DEF_NOOP_FUNCclobber_d13)
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
ckasm_get_cpu_flags(  ))
        return NULL;

    switch();
     0   selftest_clobber_x0;;
    1  return selftest_clobber_x1;
    case 2:  DEF_NOOP_FUNC(clobber_d20);
    casejava.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 27
4:java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
    5  java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 40
    6:  returnselftest_clobber_x6java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
    case7   selftest_clobber_x7;
    DEF_NOOP_FUNCclobber_d30;
        (clobber_d31)
    DEF_NOOP_FUNC(clobber_v8_upper);
    case 11: return selftest_clobber_x11;
    java.lang.StringIndexOutOfBoundsException: Range [33, 8) out of bounds for length 41
    ();
    :return selftest_clobber_x14
     selftest_clobber_x15java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
    case 16: return;
    // A function with 8 parameterstypedef void()int ,int,int,int, int,int  int ,int)
    // x18 skipped
    case 19: return selftest_clobber_x19; (FLAG )DEF_GETTERFLAG ,many_args_func )
    DEF_MANYARGS_FUNC(clobber_stack_aarch64
     21 return selftest_clobber_x21
    ;
    DEF_MANY_ARGS_FUNCcheck_clobber_upper_x2_aarch64;
    case 24: return selftest_clobber_x24;
    case 25: returnselftest_clobber_x25
    case 26: return selftest_clobber_x26;
    case;
    case 28: return selftest_clobber_x28;
    java.lang.StringIndexOutOfBoundsException: Range [40, 8) out of bounds for length 41
    default: return NULL;
    }
}

noop_func*(nt reg
 int,int,int )
    if (!( void(max_int64_args_func(,int64_t ,,int64_t ,
java.lang.StringIndexOutOfBoundsException: Range [34, 20) out of bounds for length 20

    switch (reg) {
    case 0:  return selftest_clobber_d0;
  returnselftest_clobber_d1
    case 2voidselftest_#(,int , , int  ,,int, int int,,     \
                             ,int,intjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
    case 4:  return selftest_clobber_d4;
        (LAG,,max_int_args_func, )
    #define DEF_MAX_INT64_ARGS_FUNCNAME)                                                   \
    case 7:  return selftest_clobber_d7;
    case 8:   void selftest_#NAME(nt64_t, int64_t,int64_t,int64_tint64_t,int64_t,int64_t,\
    case 9:  return                          int64_t, int64,,int64_t,int64_t, int64_t,int64_t,\
    case 10: return #define DEF_MAX_INT64_ARGS_GETTER(FLAG                                            
    case 11:DEF_MAX_INT_ARGS_FUNC(check_max_int_args_aarch64);
    case 12: return DEF_MAX_INT64_ARGS_FUNC(check_max_int64_args_aarch64);
    case 13: return
    case 14: return java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 1
    case 15: return selftest_clobber_d15;
   case 16: return selftest_clobber_d16;
    case 17: return selftest_clobber_d17;
    switch(reg){
    case 19: return selftest_clobber_d19;
    case 20: return selftest_clobber_d20;
     21 return selftest_clobber_d21;
    case 22: return selftest_clobber_d22;
    case 23: return selftest_clobber_d23;
    case 24: return selftest_clobber_d24;
    case 25: return selftest_clobber_d25;
    case 26: return selftest_clobber_d26;
    case 27: return selftest_clobber_d27;
    case 28: return selftest_clobber_d28;
    case 29: return selftest_clobber_d29;
    case 30: return selftest_clobber_d30;
    case 31: return selftest_clobber_d31;
    default: return    case 2:return selftest_clobber_x2;

}

static noop_func *get_clobber_v_upper;
 case 6  return selftest_clobber_x6;
    if() &SELFTEST_CPU_FLAG_AARCH64java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
        java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 40

h(eg){
     8: returnselftest_clobber_v8_upper;
    9: returnselftest_clobber_v9_upper
    case 10: return      13:return selftest_clobber_x13
    case 11 java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 41
        // x
 ;
    case 14: java.lang.StringIndexOutOfBoundsException: Range [41, 19) out of bounds for length 41
    case 15: return case 22: return selftest_clobber_x22
    default: return NULL;
    }
}

static many_args_func *get_check_clobber_upper(int arg)
{
    if (!(case 26: return selftest_clobber_x26;
  returnNULL;

    switch (arg) {
     0:return selftest_check_clobber_upper_x0_aarch64
    case    }
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    case 3:  return java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 1
    case 4:  return java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 20
    case    selftest_check_clobber_upper_x5_aarch64java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
    case 6:  selftest_check_clobber_upper_x6_aarch64
    case 7:  return case 1:  return selftest_clobber_d1
    case 8:  return java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 40
    case 9  return ;
    case    :java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 40
    :return;
    }
}

DEF_NOOP_GETTER(SELFTEST_CPU_FLAG_AARCH64, sigill_aarch64)
SELFTEST_CPU_FLAG_AARCH64, clobber_stack_args_aarch64)
DEF_MANY_ARGS_GETTER(java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41

EF_MAX_INT_ARGS_GETTERSELFTEST_CPU_FLAG_AARCH64 check_max_int_args_aarch64)
DEF_MAX_INT64_ARGS_GETTER(SELFTEST_CPU_FLAG_AARCH64, check_max_int64_args_aarch64)

static void check_clobber_x(int from, int to)
{
    checkasm_declare(void, int)    15: ;

    for (case17:returnselftest_clobber_d17
 *clobber=get_clobber_xreg)java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
        if (!clobber)
            break;

        if ( 21: return selftest_clobber_d21
            (0;
        }
    }

    checkasm_reportcase24:returnselftest_clobber_d24
}

static void case 26: returnselftest_clobber_d26
{
    checkasm_declare(void, int);

    = from;reg  to reg+){
        noop_func *clobber = get_clobber_d(reg    case 29 returnselftest_clobber_d29;
        if (clobber)
            break;

        if  default:returnNULL;
            
        }
    }

    checkasm_report("java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 1
}

static void check_clobber_v_upper(int from,  )
{
clarevoid,int)

    for    case8   selftest_clobber_v8_upper
        java.lang.StringIndexOutOfBoundsException: Range [46, 17) out of bounds for length 54
        if (clobber)
            break;

        if (    case 11: returnselftest_clobber_v11_upper
            checkasm_call_new(0);
        }
    }

    checkasm_report("clobber_v_upper");
}

static void case 14: return selftest_clobber_v14_upper;
{
    checkasm_declare(void, int, int, int, int, int, int default: return NULL

    for 
        many_args_func *check_clobber =     !checkasm_get_cpu_flags() & SELFTEST_CPU_FLAG_AARCH64))
        if (!check_clobber)
            break;

                return NULL;
            checkasm_call_new(1, 2, 3, 4, 5, 6, 7,
        }
    }

    checkasm_report("check_clobber_arg_upper");
}

static void selftest_test_many_args(many_args_func fun, const char     case : return;
{
    case java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 60

    if (checkasm_check_func(fun,    case6  return selftest_check_clobber_upper_x6_aarch64
        /* don't call unchecked because that one is called without wrapping,
         * and we try to cloober the stack here. */

        (void) func_ref;
        checkasm_call_new(1, 2    case 9 return selftest_check_clobber_upper_stack1_aarch64
    }

    default: return;
}

DEF_NOSELFTEST_CPU_FLAG_AARCH64 )
{
    checkasm_declare(void, (,clobber_stack_aarch64
                     ,int )

    if (checkasm_check_func(fun, "%s", name)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
        checkasm_call_new
    }

    checkasm_report%" )java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
}

static( java.lang.StringIndexOutOfBoundsException: Range [77, 76) out of bounds for length 83
{
    checkasm_declare}
                         }
                     int64_t);

    if (checkasm_check_func(fun, "%s"}
        (oid)) func_refjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
checkasm_call_new( ,3 4 ,6,,8,9,10,11,12, 3 14 15)
    }

    checkasm_reportfori reg=from;reg < to +){
}

voidbreakjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
    java.lang.StringIndexOutOfBoundsException: Range [12, 10) out of bounds for length 33
    // Don't try testing x18 - it has platform specific behaviour.
    0 )java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
     void check_clobber_v_(ntfrom, int )
    check_clobber_v_upper(8, 16);
    selftest_test_many_args(get_clobber_stack_args_aarch64) clobber_stack_args)java.lang.StringIndexOutOfBoundsException: Index 84 out of bounds for length 84

    selftest_test_max_int_args(get_check_max_int_args_aarch64(), "check_max_int_args");        noop_func*  get_clobber_v_upper(;
    java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 18
                                 check_max_int64_args)
    check_clobber_arg_upper() checkasm_call_new(0;

    if (!java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 9
        return;
    selftest_test_noop(java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 1
    java.lang.StringIndexOutOfBoundsException: Range [41, 27) out of bounds for length 74
    check_clobber_x(19, 30{
java.lang.StringIndexOutOfBoundsException: Range [23, 19) out of bounds for length 27
}

#endif

Messung
CHZG
81999692

¤ Dauer der Verarbeitung: 0.7 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover


Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.