Convert Endian

Submission Date: 2024/9/23 17:03:39
Status: Accepted
Author: rosso01
Lines: 40

VSM

imm i"56" $ls0v imm i"16" $lr0v imm i"8" $lr8v imm i"0x00000000000000FF" $ls8v ullsr $lm0v $ls0v $nowrite #((X[i] >> 56) & 0x00000000000000FF) uland $aluf $ls8v $ln0v isub $ls0v $lr0v $ls0v #| ((X[i] >> 40) & 0x000000000000FF00) ullsl $ls8v $lr8v $ls8v ullsr $lm0v $ls0v $nowrite uland $aluf $ls8v $nowrite ulor $ln0v $aluf $ln0v isub $ls0v $lr0v $ls0v #| ((X[i] >> 24) & 0x0000000000FF0000) ullsl $ls8v $lr8v $ls8v ullsr $lm0v $ls0v $nowrite uland $aluf $ls8v $nowrite ulor $ln0v $aluf $ln0v isub $ls0v $lr0v $ls0v #| ((X[i] >> 8) & 0x00000000FF000000) ullsl $ls8v $lr8v $ls8v ullsr $lm0v $ls0v $nowrite uland $aluf $ls8v $nowrite ulor $ln0v $aluf $ln0v ullsl $ls8v $lr8v $ls8v #| ((X[i] << 8) & 0x000000FF00000000) ullsl $lm0v $ls0v $nowrite uland $aluf $ls8v $nowrite ulor $ln0v $aluf $ln0v iadd $ls0v $lr0v $ls0v #| ((X[i] << 24) & 0x0000FF0000000000) ullsl $ls8v $lr8v $ls8v ullsl $lm0v $ls0v $nowrite uland $aluf $ls8v $nowrite ulor $ln0v $aluf $ln0v iadd $ls0v $lr0v $ls0v #| ((X[i] << 40) & 0x00FF000000000000) ullsl $ls8v $lr8v $ls8v ullsl $lm0v $ls0v $nowrite uland $aluf $ls8v $nowrite ulor $ln0v $aluf $ln0v iadd $ls0v $lr0v $ls0v #| ((X[i] << 56) & 0xFF00000000000000) ullsl $ls8v $lr8v $ls8v ullsl $lm0v $ls0v $nowrite uland $aluf $ls8v $nowrite ulor $ln0v $aluf $ln0v

Standard Output

ACCEPTED!! score=40 j=40 m=0 bytes=974

Standard Error

------------------- vsm -------------------- # ======= In(0): ((4_PE:1))@LM0 / ULong ======= d set $lm0p0 1 5FE1DC66CBEA3DB3 # values=[6909045637428952499] / ULong @[0] d set $lm0p1 1 F362035C2EF5950E # values=[17537583593393853710] / ULong @[1] d set $lm0p2 1 BB63F46AC799D447 # values=[13502904847239337031] / ULong @[2] d set $lm0p3 1 9941AEBC98CB2C14 # values=[11043299886329703444] / ULong @[3] imm i"56" $ls0v imm i"16" $lr0v imm i"8" $lr8v imm i"0x00000000000000FF" $ls8v ullsr $lm0v $ls0v $nowrite #((X[i] >> 56) & 0x00000000000000FF) uland $aluf $ls8v $ln0v isub $ls0v $lr0v $ls0v #| ((X[i] >> 40) & 0x000000000000FF00) ullsl $ls8v $lr8v $ls8v ullsr $lm0v $ls0v $nowrite uland $aluf $ls8v $nowrite ulor $ln0v $aluf $ln0v isub $ls0v $lr0v $ls0v #| ((X[i] >> 24) & 0x0000000000FF0000) ullsl $ls8v $lr8v $ls8v ullsr $lm0v $ls0v $nowrite uland $aluf $ls8v $nowrite ulor $ln0v $aluf $ln0v isub $ls0v $lr0v $ls0v #| ((X[i] >> 8) & 0x00000000FF000000) ullsl $ls8v $lr8v $ls8v ullsr $lm0v $ls0v $nowrite uland $aluf $ls8v $nowrite ulor $ln0v $aluf $ln0v ullsl $ls8v $lr8v $ls8v #| ((X[i] << 8) & 0x000000FF00000000) ullsl $lm0v $ls0v $nowrite uland $aluf $ls8v $nowrite ulor $ln0v $aluf $ln0v iadd $ls0v $lr0v $ls0v #| ((X[i] << 24) & 0x0000FF0000000000) ullsl $ls8v $lr8v $ls8v ullsl $lm0v $ls0v $nowrite uland $aluf $ls8v $nowrite ulor $ln0v $aluf $ln0v iadd $ls0v $lr0v $ls0v #| ((X[i] << 40) & 0x00FF000000000000) ullsl $ls8v $lr8v $ls8v ullsl $lm0v $ls0v $nowrite uland $aluf $ls8v $nowrite ulor $ln0v $aluf $ln0v iadd $ls0v $lr0v $ls0v #| ((X[i] << 56) & 0xFF00000000000000) ullsl $ls8v $lr8v $ls8v ullsl $lm0v $ls0v $nowrite uland $aluf $ls8v $nowrite ulor $ln0v $aluf $ln0v # ======= Out(0): ((4_PE:1))@LM1 / ULong ======= d getd $ln0n0c0b0m0p0 1 # expect=[12915737465693462879] / ULong @[0] d getd $ln0n0c0b0m0p1 1 # expect=[1051015667521905395] / ULong @[1] d getd $ln0n0c0b0m0p2 1 # expect=[5175930953527485371] / ULong @[2] d getd $ln0n0c0b0m0p3 1 # expect=[1453760636594831769] / ULong @[3] ------------------- asm -------------------- j 010000000000000000000000000000000000001010000000001010000000000100000000000000000000111000000000000000000000000000000000000000000000000011111111100111110000000000000000000000000000000000000000000111000000000000000000000000000000001100000000000000000000000000000000000000010000000000000000111000000000000000000000000000000000000000100000000000000000111000000000000000000000000000000000000000110000000000000000111000000000000000 j 010000000000000000000000010100000000001010000000000000000000000100000000000000000000010000000000000000000000000000000000000000000000000011111111100111110000000000000000000000000000000000000000000111000000000000000000000000000000001100000000000000000000010000000000000000000000000000000000010000000000000000000000100000000000000000000000000000000000010000000000000000000000110000000000000000000000000000000000010000000000000000 j 010000000000000000000000010100000100001010000000000000000000000100000000000000000000001000000000000000000000000000000000000000000000000011111111100111110000000000000000000000000000000000000000000111000000000000000000000000000000001100000000000000000001010000000000000000000000000000000000001000000000000000000001100000000000000000000000000000000000001000000000000000000001110000000000000000000000000000000000001000000000000000 j 010000000000000000000000000000000000001010000000001010000010000100000000000000000011111111000000000000000000000000000000000000000000000011111111100111110000000000000000000000000000000000000000000111000000000000000000000000000000001100000000000000000000000000000000000001010000000000000011111111000000000000000000000000000000000001100000000000000011111111000000000000000000000000000000000001110000000000000011111111000000000000 j 010000000000000000000000000000000000001010000000000000000000000101000000000000000000000000000001000000000000000000000000000000000000000011111111100011001000011001000000000000000000000000000000000111000000000000000000000000000000001100000000000000000000000000000000000000000000000010000000000010000000000000000000000000000000000000000000000100000000000100000000000000000000000000000000000000000000000110000000000110000000000000 j 010000000000000000000000000000000000001010000000000000000000000101000001000000000000000000000000101000000000000000010000000000000000000011111111100001011001100001000000000000000000000000000000000111000000000000000000000000000000001100000000000000000000000000000000000000000000001010000000000000000000000010000000000000000000000000000000001100000000000000000000000100000000000000000000000000000000001110000000000000000000000110 j 010000000000000000000000000000000000001010000000001010000000000101000000000000000000000000000000000000000000000000000000000000000000000011111111101000010000001000000000000000000000000000000000000111000000000000000000000000000000001100000000000000000000000000000010000000010000000010000000000000000000000000000000000000000100000000100000000100000000000000000000000000000000000000000110000000110000000110000000000000000000000000 j 010000000000000000000000000000000000001010000010001010000010000101000001000000000000000000000000000000000000000000000000000000000000000011111111100010111000001000000000000000000000000000000000000111000000000000000000000000000000001100000000000000000000000000001010000001010000001010000000000000000000000000000000000000001100000001100000001100000000000000000000000000000000000000001110000001110000001110000000000000000000000000 j 010000000000000000000000000000000000001010000000000000000000000101000000000000000000000000000001000000000000000000000000000000000000000011111111100011001000011001000000000000000000000000000000000111000000000000000000000000000000001100000000000000000000000000000000000000000000000010000000000010000000000000000000000000000000000000000000000100000000000100000000000000000000000000000000000000000000000110000000000110000000000000 j 010000000000000000000000000000000000001010000000000000000000000101000001000000000000000000000000000000000000000000000000000000000000000011111111100001011001100001000000000000000000000000000000000111000000000000000000000000000000001100000000000000000000000000000000000000000000001010000000000000000000000000000000000000000000000000000000001100000000000000000000000000000000000000000000000000000000001110000000000000000000000000 j 010000000000000000000000000000000000001010000000000000000000000100000000000000000000000000000000101000000000000000010000000000000000000011111111100001101000100110000000000000000000000000000000000111000000000000000000000000000000001100000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000110 j 010000000000000000000000000000000000001010000000001010000000000101000000000000000000000000000000000000000000000000000000000000000000000011111111101000010000001000000000000000000000000000000000000111000000000000000000000000000000001100000000000000000000000000000010000000010000000010000000000000000000000000000000000000000100000000100000000100000000000000000000000000000000000000000110000000110000000110000000000000000000000000 j 010000000000000000000000000000000000001010000010001010000010000101000001000000000000000000000000000000000000000000000000000000000000000011111111100010111000001000000000000000000000000000000000000111000000000000000000000000000000001100000000000000000000000000001010000001010000001010000000000000000000000000000000000000001100000001100000001100000000000000000000000000000000000000001110000001110000001110000000000000000000000000 j 010000000000000000000000000000000000001010000000000000000000000101000000000000000000000000000001000000000000000000000000000000000000000011111111100011001000011001000000000000000000000000000000000111000000000000000000000000000000001100000000000000000000000000000000000000000000000010000000000010000000000000000000000000000000000000000000000100000000000100000000000000000000000000000000000000000000000110000000000110000000000000 j 010000000000000000000000000000000000001010000000000000000000000101000001000000000000000000000000000000000000000000000000000000000000000011111111100001011001100001000000000000000000000000000000000111000000000000000000000000000000001100000000000000000000000000000000000000000000001010000000000000000000000000000000000000000000000000000000001100000000000000000000000000000000000000000000000000000000001110000000000000000000000000 j 010000000000000000000000000000000000001010000000000000000000000100000000000000000000000000000000101000000000000000010000000000000000000011111111100001101000100110000000000000000000000000000000000111000000000000000000000000000000001100000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000110 j 010000000000000000000000000000000000001010000000001010000000000101000000000000000000000000000000000000000000000000000000000000000000000011111111101000010000001000000000000000000000000000000000000111000000000000000000000000000000001100000000000000000000000000000010000000010000000010000000000000000000000000000000000000000100000000100000000100000000000000000000000000000000000000000110000000110000000110000000000000000000000000 j 010000000000000000000000000000000000001010000010001010000010000101000001000000000000000000000000000000000000000000000000000000000000000011111111100010111000001000000000000000000000000000000000000111000000000000000000000000000000001100000000000000000000000000001010000001010000001010000000000000000000000000000000000000001100000001100000001100000000000000000000000000000000000000001110000001110000001110000000000000000000000000 j 010000000000000000000000000000000000001010000000000000000000000101000000000000000000000000000001000000000000000000000000000000000000000011111111100011001000011001000000000000000000000000000000000111000000000000000000000000000000001100000000000000000000000000000000000000000000000010000000000010000000000000000000000000000000000000000000000100000000000100000000000000000000000000000000000000000000000110000000000110000000000000 j 010000000000000000000000000000000000001010000000000000000000000101000001000000000000000000000000000000000000000000000000000000000000000011111111100001011001100001000000000000000000000000000000000111000000000000000000000000000000001100000000000000000000000000000000000000000000001010000000000000000000000000000000000000000000000000000000001100000000000000000000000000000000000000000000000000000000001110000000000000000000000000 j 010000000000000000000000000000000000001010000000000000000000000100000000000000000000000000000000101000000000000000010000000000000000000011111111100001101000100110000000000000000000000000000000000111000000000000000000000000000000001100000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000110 j 010000000000000000000000000000000000001010000010001010000010000101000001000000000000000000000000000000000000000000000000000000000000000011111111100010111000001000000000000000000000000000000000000111000000000000000000000000000000001100000000000000000000000000001010000001010000001010000000000000000000000000000000000000001100000001100000001100000000000000000000000000000000000000001110000001110000001110000000000000000000000000 j 010000000000000000000000000000000000001010000000000000000000000101000000000000000000000000000001000000000000000000000000000000000000000011111111100010111000011001000000000000000000000000000000000111000000000000000000000000000000001100000000000000000000000000000000000000000000000010000000000010000000000000000000000000000000000000000000000100000000000100000000000000000000000000000000000000000000000110000000000110000000000000 j 010000000000000000000000000000000000001010000000000000000000000101000001000000000000000000000000000000000000000000000000000000000000000011111111100001011001100001000000000000000000000000000000000111000000000000000000000000000000001100000000000000000000000000000000000000000000001010000000000000000000000000000000000000000000000000000000001100000000000000000000000000000000000000000000000000000000001110000000000000000000000000 j 010000000000000000000000000000000000001010000000000000000000000100000000000000000000000000000000101000000000000000010000000000000000000011111111100001101000100110000000000000000000000000000000000111000000000000000000000000000000001100000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000110 j 010000000000000000000000000000000000001010000000001010000000000101000000000000000000000000000000000000000000000000000000000000000000000011111111101000000000001000000000000000000000000000000000000111000000000000000000000000000000001100000000000000000000000000000010000000010000000010000000000000000000000000000000000000000100000000100000000100000000000000000000000000000000000000000110000000110000000110000000000000000000000000 j 010000000000000000000000000000000000001010000010001010000010000101000001000000000000000000000000000000000000000000000000000000000000000011111111100010111000001000000000000000000000000000000000000111000000000000000000000000000000001100000000000000000000000000001010000001010000001010000000000000000000000000000000000000001100000001100000001100000000000000000000000000000000000000001110000001110000001110000000000000000000000000 j 010000000000000000000000000000000000001010000000000000000000000101000000000000000000000000000001000000000000000000000000000000000000000011111111100010111000011001000000000000000000000000000000000111000000000000000000000000000000001100000000000000000000000000000000000000000000000010000000000010000000000000000000000000000000000000000000000100000000000100000000000000000000000000000000000000000000000110000000000110000000000000 j 010000000000000000000000000000000000001010000000000000000000000101000001000000000000000000000000000000000000000000000000000000000000000011111111100001011001100001000000000000000000000000000000000111000000000000000000000000000000001100000000000000000000000000000000000000000000001010000000000000000000000000000000000000000000000000000000001100000000000000000000000000000000000000000000000000000000001110000000000000000000000000 j 010000000000000000000000000000000000001010000000000000000000000100000000000000000000000000000000101000000000000000010000000000000000000011111111100001101000100110000000000000000000000000000000000111000000000000000000000000000000001100000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000110 j 010000000000000000000000000000000000001010000000001010000000000101000000000000000000000000000000000000000000000000000000000000000000000011111111101000000000001000000000000000000000000000000000000111000000000000000000000000000000001100000000000000000000000000000010000000010000000010000000000000000000000000000000000000000100000000100000000100000000000000000000000000000000000000000110000000110000000110000000000000000000000000 j 010000000000000000000000000000000000001010000010001010000010000101000001000000000000000000000000000000000000000000000000000000000000000011111111100010111000001000000000000000000000000000000000000111000000000000000000000000000000001100000000000000000000000000001010000001010000001010000000000000000000000000000000000000001100000001100000001100000000000000000000000000000000000000001110000001110000001110000000000000000000000000 j 010000000000000000000000000000000000001010000000000000000000000101000000000000000000000000000001000000000000000000000000000000000000000011111111100010111000011001000000000000000000000000000000000111000000000000000000000000000000001100000000000000000000000000000000000000000000000010000000000010000000000000000000000000000000000000000000000100000000000100000000000000000000000000000000000000000000000110000000000110000000000000 j 010000000000000000000000000000000000001010000000000000000000000101000001000000000000000000000000000000000000000000000000000000000000000011111111100001011001100001000000000000000000000000000000000111000000000000000000000000000000001100000000000000000000000000000000000000000000001010000000000000000000000000000000000000000000000000000000001100000000000000000000000000000000000000000000000000000000001110000000000000000000000000 j 010000000000000000000000000000000000001010000000000000000000000100000000000000000000000000000000101000000000000000010000000000000000000011111111100001101000100110000000000000000000000000000000000111000000000000000000000000000000001100000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000110 j 010000000000000000000000000000000000001010000000001010000000000101000000000000000000000000000000000000000000000000000000000000000000000011111111101000000000001000000000000000000000000000000000000111000000000000000000000000000000001100000000000000000000000000000010000000010000000010000000000000000000000000000000000000000100000000100000000100000000000000000000000000000000000000000110000000110000000110000000000000000000000000 j 010000000000000000000000000000000000001010000010001010000010000101000001000000000000000000000000000000000000000000000000000000000000000011111111100010111000001000000000000000000000000000000000000111000000000000000000000000000000001100000000000000000000000000001010000001010000001010000000000000000000000000000000000000001100000001100000001100000000000000000000000000000000000000001110000001110000001110000000000000000000000000 j 010000000000000000000000000000000000001010000000000000000000000101000000000000000000000000000001000000000000000000000000000000000000000011111111100010111000011001000000000000000000000000000000000111000000000000000000000000000000001100000000000000000000000000000000000000000000000010000000000010000000000000000000000000000000000000000000000100000000000100000000000000000000000000000000000000000000000110000000000110000000000000 j 010000000000000000000000000000000000001010000000000000000000000101000001000000000000000000000000000000000000000000000000000000000000000011111111100001011001100001000000000000000000000000000000000111000000000000000000000000000000001100000000000000000000000000000000000000000000001010000000000000000000000000000000000000000000000000000000001100000000000000000000000000000000000000000000000000000000001110000000000000000000000000 j 010000000000000000000000000000000000001010000000000000000000000100000000000000000000000000000000101000000000000000010000000000000000000011111111100001101000100110000000000000000000000000000000000111000000000000000000000000000000001100000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000110 ------------------- emu -------------------- DEBUG-LM1(n0c0b0m0p0,0):(-7.27246e-62) (0xb33deacb66dce15f) #d getd $ln0n0c0b0m0p0 1 # expect=[12915737465693462879] / ULong @[0] DEBUG-LM1(n0c0b0m0p1,0):(2.10752e-238) (0x0e95f52e5c0362f3) #d getd $ln0n0c0b0m0p1 1 # expect=[1051015667521905395] / ULong @[1] DEBUG-LM1(n0c0b0m0p2,0):(1.09532e+38) (0x47d499c76af463bb) #d getd $ln0n0c0b0m0p2 1 # expect=[5175930953527485371] / ULong @[2] DEBUG-LM1(n0c0b0m0p3,0):(1.7107e-211) (0x142ccb98bcae4199) #d getd $ln0n0c0b0m0p3 1 # expect=[1453760636594831769] / ULong @[3] ------------------- inputs -------------------- [ 6909045637428952499, 17537583593393853710, 13502904847239337031, 11043299886329703444] ------------------- expect -------------------- [12915737465693462879, 1051015667521905395, 5175930953527485371, 1453760636594831769] ------------------- actual -------------------- [12915737465693462879, 1051015667521905395, 5175930953527485371, 1453760636594831769] ------------------- check result --------------------