Software: Apache. PHP/5.4.45 

uname -a: Linux webm056.cluster010.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue
Sep 17 08:14:20 UTC 2024 x86_64
 

uid=243112(mycochar) gid=100(users) groups=100(users)  

Safe-mode: OFF (not secure)

/home/mycochar/www/image/photo/gcc-12.3.0/gcc/testsuite/jit.dg/   drwxr-xr-x
Free 0 B of 0 B (0%)
Your ip: 216.73.216.77 - Server ip: 213.186.33.19
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    

[Enumerate]    [Encoder]    [Tools]    [Proc.]    [FTP Brute]    [Sec.]    [SQL]    [PHP-Code]    [Backdoor Host]    [Back-Connection]    [milw0rm it!]    [PHP-Proxy]    [Self remove]
    


Viewing file:     test-sum-of-squares.c (3.57 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#include "libgccjit.h"

#include "harness.h"

static char *dump_vrp1;

void
create_code (gcc_jit_context *ctxt, void *user_data)
{
  /*
    Simple sum-of-squares, to test conditionals and looping

    int loop_test (int n)
    {
      int i;
      int sum = 0;
      for (i = 0; i < n ; i ++)
      {
    sum += i * i;
      }
      return sum;
   */
  gcc_jit_context_enable_dump (ctxt, "tree-vrp1", &dump_vrp1);

  gcc_jit_type *the_type =
    gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_INT);
  gcc_jit_type *return_type = the_type;

  gcc_jit_param *n =
    gcc_jit_context_new_param (ctxt, NULL, the_type, "n");
  gcc_jit_param *params[1] = {n};
  gcc_jit_function *func =
    gcc_jit_context_new_function (ctxt, NULL,
                  GCC_JIT_FUNCTION_EXPORTED,
                  return_type,
                  "loop_test",
                  1, params, 0);

  /* Build locals:  */
  gcc_jit_lvalue *i =
    gcc_jit_function_new_local (func, NULL, the_type, "i");
  gcc_jit_lvalue *sum =
    gcc_jit_function_new_local (func, NULL, the_type, "sum");

  gcc_jit_block *initial =
    gcc_jit_function_new_block (func, "initial");
  gcc_jit_block *loop_cond =
    gcc_jit_function_new_block (func, "loop_cond");
  gcc_jit_block *loop_body =
    gcc_jit_function_new_block (func, "loop_body");
  gcc_jit_block *after_loop =
    gcc_jit_function_new_block (func, "after_loop");

  /* sum = 0; */
  gcc_jit_block_add_assignment (
    initial, NULL,
    sum,
    gcc_jit_context_new_rvalue_from_int (ctxt, the_type, 0));

  /* i = 0; */
  gcc_jit_block_add_assignment (
    initial, NULL,
    i,
    gcc_jit_context_new_rvalue_from_int (ctxt, the_type, 0));

  gcc_jit_block_end_with_jump (initial, NULL, loop_cond);

  /* if (i >= n) */
  gcc_jit_block_end_with_conditional (
    loop_cond, NULL,
    gcc_jit_context_new_comparison (
       ctxt, NULL,
       GCC_JIT_COMPARISON_GE,
       gcc_jit_lvalue_as_rvalue (i),
       gcc_jit_param_as_rvalue (n)),
    after_loop,
    loop_body);

  /* sum += i * i */
  gcc_jit_block_add_assignment (
    loop_body, NULL,
    sum,
    gcc_jit_context_new_binary_op (
      ctxt, NULL,
      GCC_JIT_BINARY_OP_PLUS, the_type,
      gcc_jit_lvalue_as_rvalue (sum),
      gcc_jit_context_new_binary_op (
     ctxt, NULL,
     GCC_JIT_BINARY_OP_MULT, the_type,
     gcc_jit_lvalue_as_rvalue (i),
     gcc_jit_lvalue_as_rvalue (i))));

  /* i++ */
  gcc_jit_block_add_assignment (
    loop_body, NULL,
    i,
    gcc_jit_context_new_binary_op (
      ctxt, NULL,
      GCC_JIT_BINARY_OP_PLUS, the_type,
      gcc_jit_lvalue_as_rvalue (i),
      gcc_jit_context_new_rvalue_from_int (
    ctxt,
    the_type,
    1)));

  gcc_jit_block_end_with_jump (loop_body, NULL, loop_cond);

  /* return sum */
  gcc_jit_block_end_with_return (
    after_loop,
    NULL,
    gcc_jit_lvalue_as_rvalue (sum));
}

void
verify_code (gcc_jit_context *ctxt, gcc_jit_result *result)
{
  typedef int (*loop_test_fn_type) (int);
  CHECK_NON_NULL (result);
  loop_test_fn_type loop_test =
    (loop_test_fn_type)gcc_jit_result_get_code (result, "loop_test");
  CHECK_NON_NULL (loop_test);
  int val = loop_test (10);
  note ("loop_test returned: %d", val);
  CHECK_VALUE (val, 285);

  CHECK_NON_NULL (dump_vrp1);
  /* PR jit/64166
     An example of using gcc_jit_context_enable_dump to verify a property
     of the compile.

     In particular, this example verifies that we can read the dump from a
     pass with multiple instances.  Given that the format of the VRP dump
     is subject to change, merely verify that it contains the function
     name.  */
  CHECK_STRING_CONTAINS (dump_vrp1, ";; Function loop_test");
  free (dump_vrp1);
}

Enter:
 
Select:
 

Useful Commands
 
Warning. Kernel may be alerted using higher levels
Kernel Info:

Php Safe-Mode Bypass (Read Files)

File:

eg: /etc/passwd

Php Safe-Mode Bypass (List Directories):

Dir:

eg: /etc/

Search
  - regexp 

Upload
 
[ ok ]

Make Dir
 
[ ok ]
Make File
 
[ ok ]

Go Dir
 
Go File
 

--[ x2300 Locus7Shell v. 1.0a beta Modded by #!physx^ | www.LOCUS7S.com | Generation time: 0.0059 ]--