max_stars_repo_path stringlengths 4 261 | max_stars_repo_name stringlengths 6 106 | max_stars_count int64 0 38.8k | id stringlengths 1 6 | text stringlengths 7 1.05M |
|---|---|---|---|---|
programs/oeis/301/A301697.asm | karttu/loda | 0 | 242277 | ; A301697: Coordination sequence for node of type V2 in "krj" 2-D tiling (or net).
; 1,5,10,16,22,27,32,37,42,48,54,59,64,69,74,80,86,91,96,101,106,112,118,123,128,133,138,144,150,155,160,165,170,176,182,187,192,197,202,208,214,219,224,229,234,240,246,251,256,261,266,272,278,283,288,293,298,304,310,315,320,325,330,336,342,347,352,357,362,368,374,379,384,389,394,400,406,411,416,421,426,432,438,443,448,453,458,464,470,475,480,485,490,496,502,507,512,517,522,528,534
mov $3,$0
mov $4,$0
lpb $0,1
sub $0,1
trn $0,3
sub $1,$1
add $1,$3
add $1,$3
sub $1,4
trn $2,$1
sub $1,$0
add $1,1
add $2,3
trn $0,$2
add $0,1
sub $3,2
lpe
add $1,2
lpb $4,1
add $1,4
sub $4,1
lpe
sub $1,1
|
target/cos_117/disasm/iop_overlay1/LOGON.asm | jrrk2/cray-sim | 49 | 14665 | 0x0000 (0x000000) 0x2100- f:00020 d: 256 | A = OR[256]
0x0001 (0x000002) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x0002 (0x000004) 0x2908- f:00024 d: 264 | OR[264] = A
0x0003 (0x000006) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0004 (0x000008) 0x292C- f:00024 d: 300 | OR[300] = A
0x0005 (0x00000A) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0006 (0x00000C) 0x2926- f:00024 d: 294 | OR[294] = A
0x0007 (0x00000E) 0x212C- f:00020 d: 300 | A = OR[300]
0x0008 (0x000010) 0x290D- f:00024 d: 269 | OR[269] = A
0x0009 (0x000012) 0x210D- f:00020 d: 269 | A = OR[269]
0x000A (0x000014) 0x1607- f:00013 d: 7 | A = A - 7 (0x0007)
0x000B (0x000016) 0x8002- f:00100 d: 2 | P = P + 2 (0x000D), C = 0
0x000C (0x000018) 0x8602- f:00103 d: 2 | P = P + 2 (0x000E), A # 0
0x000D (0x00001A) 0x7002- f:00070 d: 2 | P = P + 2 (0x000F)
0x000E (0x00001C) 0x700F- f:00070 d: 15 | P = P + 15 (0x001D)
0x000F (0x00001E) 0x210D- f:00020 d: 269 | A = OR[269]
0x0010 (0x000020) 0x8602- f:00103 d: 2 | P = P + 2 (0x0012), A # 0
0x0011 (0x000022) 0x700C- f:00070 d: 12 | P = P + 12 (0x001D)
0x0012 (0x000024) 0x2048- f:00020 d: 72 | A = OR[72]
0x0013 (0x000026) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x0014 (0x000028) 0x290E- f:00024 d: 270 | OR[270] = A
0x0015 (0x00002A) 0x210D- f:00020 d: 269 | A = OR[269]
0x0016 (0x00002C) 0x1601- f:00013 d: 1 | A = A - 1 (0x0001)
0x0017 (0x00002E) 0x8405- f:00102 d: 5 | P = P + 5 (0x001C), A = 0
0x0018 (0x000030) 0x1007- f:00010 d: 7 | A = 7 (0x0007)
0x0019 (0x000032) 0x2B0E- f:00025 d: 270 | OR[270] = A + OR[270]
0x001A (0x000034) 0x2F0D- f:00027 d: 269 | OR[269] = OR[269] - 1
0x001B (0x000036) 0x7206- f:00071 d: 6 | P = P - 6 (0x0015)
0x001C (0x000038) 0x7003- f:00070 d: 3 | P = P + 3 (0x001F)
0x001D (0x00003A) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x001E (0x00003C) 0x290E- f:00024 d: 270 | OR[270] = A
0x001F (0x00003E) 0x210E- f:00020 d: 270 | A = OR[270]
0x0020 (0x000040) 0x2926- f:00024 d: 294 | OR[294] = A
0x0021 (0x000042) 0x2126- f:00020 d: 294 | A = OR[294]
0x0022 (0x000044) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x0023 (0x000046) 0x2908- f:00024 d: 264 | OR[264] = A
0x0024 (0x000048) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0025 (0x00004A) 0x2927- f:00024 d: 295 | OR[295] = A
0x0026 (0x00004C) 0x2118- f:00020 d: 280 | A = OR[280]
0x0027 (0x00004E) 0x8402- f:00102 d: 2 | P = P + 2 (0x0029), A = 0
0x0028 (0x000050) 0x7018- f:00070 d: 24 | P = P + 24 (0x0040)
0x0029 (0x000052) 0x752F- f:00072 d: 303 | R = P + 303 (0x0158)
0x002A (0x000054) 0x2126- f:00020 d: 294 | A = OR[294]
0x002B (0x000056) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x002C (0x000058) 0x2908- f:00024 d: 264 | OR[264] = A
0x002D (0x00005A) 0x3108- f:00030 d: 264 | A = (OR[264])
0x002E (0x00005C) 0x2913- f:00024 d: 275 | OR[275] = A
0x002F (0x00005E) 0x2113- f:00020 d: 275 | A = OR[275]
0x0030 (0x000060) 0x8602- f:00103 d: 2 | P = P + 2 (0x0032), A # 0
0x0031 (0x000062) 0x700E- f:00070 d: 14 | P = P + 14 (0x003F)
0x0032 (0x000064) 0x1019- f:00010 d: 25 | A = 25 (0x0019)
0x0033 (0x000066) 0x292D- f:00024 d: 301 | OR[301] = A
0x0034 (0x000068) 0x2113- f:00020 d: 275 | A = OR[275]
0x0035 (0x00006A) 0x292E- f:00024 d: 302 | OR[302] = A
0x0036 (0x00006C) 0x112D- f:00010 d: 301 | A = 301 (0x012D)
0x0037 (0x00006E) 0x5800- f:00054 d: 0 | B = A
0x0038 (0x000070) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0039 (0x000072) 0x7C09- f:00076 d: 9 | R = OR[9]
0x003A (0x000074) 0x2126- f:00020 d: 294 | A = OR[294]
0x003B (0x000076) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x003C (0x000078) 0x2908- f:00024 d: 264 | OR[264] = A
0x003D (0x00007A) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x003E (0x00007C) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x003F (0x00007E) 0x7113- f:00070 d: 275 | P = P + 275 (0x0152)
0x0040 (0x000080) 0x2127- f:00020 d: 295 | A = OR[295]
0x0041 (0x000082) 0x8402- f:00102 d: 2 | P = P + 2 (0x0043), A = 0
0x0042 (0x000084) 0x701D- f:00070 d: 29 | P = P + 29 (0x005F)
0x0043 (0x000086) 0x1018- f:00010 d: 24 | A = 24 (0x0018)
0x0044 (0x000088) 0x292D- f:00024 d: 301 | OR[301] = A
0x0045 (0x00008A) 0x1020- f:00010 d: 32 | A = 32 (0x0020)
0x0046 (0x00008C) 0x292E- f:00024 d: 302 | OR[302] = A
0x0047 (0x00008E) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0048 (0x000090) 0x292F- f:00024 d: 303 | OR[303] = A
0x0049 (0x000092) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x004A (0x000094) 0x2930- f:00024 d: 304 | OR[304] = A
0x004B (0x000096) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x004C (0x000098) 0x2931- f:00024 d: 305 | OR[305] = A
0x004D (0x00009A) 0x1127- f:00010 d: 295 | A = 295 (0x0127)
0x004E (0x00009C) 0x2932- f:00024 d: 306 | OR[306] = A
0x004F (0x00009E) 0x112D- f:00010 d: 301 | A = 301 (0x012D)
0x0050 (0x0000A0) 0x5800- f:00054 d: 0 | B = A
0x0051 (0x0000A2) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0052 (0x0000A4) 0x7C09- f:00076 d: 9 | R = OR[9]
0x0053 (0x0000A6) 0x8602- f:00103 d: 2 | P = P + 2 (0x0055), A # 0
0x0054 (0x0000A8) 0x700B- f:00070 d: 11 | P = P + 11 (0x005F)
0x0055 (0x0000AA) 0x1007- f:00010 d: 7 | A = 7 (0x0007)
0x0056 (0x0000AC) 0x292D- f:00024 d: 301 | OR[301] = A
0x0057 (0x0000AE) 0x1001- f:00010 d: 1 | A = 1 (0x0001)
0x0058 (0x0000B0) 0x292E- f:00024 d: 302 | OR[302] = A
0x0059 (0x0000B2) 0x112D- f:00010 d: 301 | A = 301 (0x012D)
0x005A (0x0000B4) 0x5800- f:00054 d: 0 | B = A
0x005B (0x0000B6) 0x1800-0x2B18 f:00014 d: 0 | A = 11032 (0x2B18)
0x005D (0x0000BA) 0x7C09- f:00076 d: 9 | R = OR[9]
0x005E (0x0000BC) 0x721B- f:00071 d: 27 | P = P - 27 (0x0043)
0x005F (0x0000BE) 0x2127- f:00020 d: 295 | A = OR[295]
0x0060 (0x0000C0) 0x290E- f:00024 d: 270 | OR[270] = A
0x0061 (0x0000C2) 0x1020- f:00010 d: 32 | A = 32 (0x0020)
0x0062 (0x0000C4) 0x290D- f:00024 d: 269 | OR[269] = A
0x0063 (0x0000C6) 0x210D- f:00020 d: 269 | A = OR[269]
0x0064 (0x0000C8) 0x8406- f:00102 d: 6 | P = P + 6 (0x006A), A = 0
0x0065 (0x0000CA) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0066 (0x0000CC) 0x390E- f:00034 d: 270 | (OR[270]) = A
0x0067 (0x0000CE) 0x2F0D- f:00027 d: 269 | OR[269] = OR[269] - 1
0x0068 (0x0000D0) 0x2D0E- f:00026 d: 270 | OR[270] = OR[270] + 1
0x0069 (0x0000D2) 0x7206- f:00071 d: 6 | P = P - 6 (0x0063)
0x006A (0x0000D4) 0x2127- f:00020 d: 295 | A = OR[295]
0x006B (0x0000D6) 0x1408- f:00012 d: 8 | A = A + 8 (0x0008)
0x006C (0x0000D8) 0x2908- f:00024 d: 264 | OR[264] = A
0x006D (0x0000DA) 0x1800-0x4331 f:00014 d: 0 | A = 17201 (0x4331)
0x006F (0x0000DE) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0070 (0x0000E0) 0x2127- f:00020 d: 295 | A = OR[295]
0x0071 (0x0000E2) 0x1409- f:00012 d: 9 | A = A + 9 (0x0009)
0x0072 (0x0000E4) 0x2908- f:00024 d: 264 | OR[264] = A
0x0073 (0x0000E6) 0x1042- f:00010 d: 66 | A = 66 (0x0042)
0x0074 (0x0000E8) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0075 (0x0000EA) 0x212C- f:00020 d: 300 | A = OR[300]
0x0076 (0x0000EC) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x0077 (0x0000EE) 0x292C- f:00024 d: 300 | OR[300] = A
0x0078 (0x0000F0) 0x2127- f:00020 d: 295 | A = OR[295]
0x0079 (0x0000F2) 0x140A- f:00012 d: 10 | A = A + 10 (0x000A)
0x007A (0x0000F4) 0x2908- f:00024 d: 264 | OR[264] = A
0x007B (0x0000F6) 0x3108- f:00030 d: 264 | A = (OR[264])
0x007C (0x0000F8) 0x0A09- f:00005 d: 9 | A = A < 9 (0x0009)
0x007D (0x0000FA) 0x252C- f:00022 d: 300 | A = A + OR[300]
0x007E (0x0000FC) 0x0C09- f:00006 d: 9 | A = A >> 9 (0x0009)
0x007F (0x0000FE) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0080 (0x000100) 0x2127- f:00020 d: 295 | A = OR[295]
0x0081 (0x000102) 0x2913- f:00024 d: 275 | OR[275] = A
0x0082 (0x000104) 0x2113- f:00020 d: 275 | A = OR[275]
0x0083 (0x000106) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x0084 (0x000108) 0x2913- f:00024 d: 275 | OR[275] = A
0x0085 (0x00010A) 0x2127- f:00020 d: 295 | A = OR[295]
0x0086 (0x00010C) 0x140A- f:00012 d: 10 | A = A + 10 (0x000A)
0x0087 (0x00010E) 0x2908- f:00024 d: 264 | OR[264] = A
0x0088 (0x000110) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0089 (0x000112) 0x1A00-0xFF00 f:00015 d: 0 | A = A & 65280 (0xFF00)
0x008B (0x000116) 0x2513- f:00022 d: 275 | A = A + OR[275]
0x008C (0x000118) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x008D (0x00011A) 0x2126- f:00020 d: 294 | A = OR[294]
0x008E (0x00011C) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x008F (0x00011E) 0x2908- f:00024 d: 264 | OR[264] = A
0x0090 (0x000120) 0x2127- f:00020 d: 295 | A = OR[295]
0x0091 (0x000122) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0092 (0x000124) 0x2100- f:00020 d: 256 | A = OR[256]
0x0093 (0x000126) 0x1404- f:00012 d: 4 | A = A + 4 (0x0004)
0x0094 (0x000128) 0x2908- f:00024 d: 264 | OR[264] = A
0x0095 (0x00012A) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0096 (0x00012C) 0x2913- f:00024 d: 275 | OR[275] = A
0x0097 (0x00012E) 0x2127- f:00020 d: 295 | A = OR[295]
0x0098 (0x000130) 0x1411- f:00012 d: 17 | A = A + 17 (0x0011)
0x0099 (0x000132) 0x2908- f:00024 d: 264 | OR[264] = A
0x009A (0x000134) 0x2113- f:00020 d: 275 | A = OR[275]
0x009B (0x000136) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x009C (0x000138) 0x2100- f:00020 d: 256 | A = OR[256]
0x009D (0x00013A) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x009E (0x00013C) 0x2908- f:00024 d: 264 | OR[264] = A
0x009F (0x00013E) 0x3108- f:00030 d: 264 | A = (OR[264])
0x00A0 (0x000140) 0x2913- f:00024 d: 275 | OR[275] = A
0x00A1 (0x000142) 0x2100- f:00020 d: 256 | A = OR[256]
0x00A2 (0x000144) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003)
0x00A3 (0x000146) 0x2908- f:00024 d: 264 | OR[264] = A
0x00A4 (0x000148) 0x3108- f:00030 d: 264 | A = (OR[264])
0x00A5 (0x00014A) 0x2914- f:00024 d: 276 | OR[276] = A
0x00A6 (0x00014C) 0x2113- f:00020 d: 275 | A = OR[275]
0x00A7 (0x00014E) 0x2928- f:00024 d: 296 | OR[296] = A
0x00A8 (0x000150) 0x2114- f:00020 d: 276 | A = OR[276]
0x00A9 (0x000152) 0x1406- f:00012 d: 6 | A = A + 6 (0x0006)
0x00AA (0x000154) 0x2929- f:00024 d: 297 | OR[297] = A
0x00AB (0x000156) 0x8002- f:00100 d: 2 | P = P + 2 (0x00AD), C = 0
0x00AC (0x000158) 0x2D28- f:00026 d: 296 | OR[296] = OR[296] + 1
0x00AD (0x00015A) 0x2113- f:00020 d: 275 | A = OR[275]
0x00AE (0x00015C) 0x292A- f:00024 d: 298 | OR[298] = A
0x00AF (0x00015E) 0x2114- f:00020 d: 276 | A = OR[276]
0x00B0 (0x000160) 0x1400- f:00012 d: 0 | A = A + 0 (0x0000)
0x00B1 (0x000162) 0x292B- f:00024 d: 299 | OR[299] = A
0x00B2 (0x000164) 0x8002- f:00100 d: 2 | P = P + 2 (0x00B4), C = 0
0x00B3 (0x000166) 0x2D2A- f:00026 d: 298 | OR[298] = OR[298] + 1
0x00B4 (0x000168) 0x2104- f:00020 d: 260 | A = OR[260]
0x00B5 (0x00016A) 0x290D- f:00024 d: 269 | OR[269] = A
0x00B6 (0x00016C) 0x2104- f:00020 d: 260 | A = OR[260]
0x00B7 (0x00016E) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003)
0x00B8 (0x000170) 0x1A00-0xFFFC f:00015 d: 0 | A = A & 65532 (0xFFFC)
0x00BA (0x000174) 0x2904- f:00024 d: 260 | OR[260] = A
0x00BB (0x000176) 0x2104- f:00020 d: 260 | A = OR[260]
0x00BC (0x000178) 0x2924- f:00024 d: 292 | OR[292] = A
0x00BD (0x00017A) 0x1040- f:00010 d: 64 | A = 64 (0x0040)
0x00BE (0x00017C) 0x2B04- f:00025 d: 260 | OR[260] = A + OR[260]
0x00BF (0x00017E) 0x2104- f:00020 d: 260 | A = OR[260]
0x00C0 (0x000180) 0x2705- f:00023 d: 261 | A = A - OR[261]
0x00C1 (0x000182) 0xB234- f:00131 d: 52 | R = OR[52], C = 1
0x00C2 (0x000184) 0x000B- f:00000 d: 11 | PASS | **** non-standard encoding with D:0x000B ****
0x00C3 (0x000186) 0x210D- f:00020 d: 269 | A = OR[269]
0x00C4 (0x000188) 0x3904- f:00034 d: 260 | (OR[260]) = A
0x00C5 (0x00018A) 0x2D04- f:00026 d: 260 | OR[260] = OR[260] + 1
0x00C6 (0x00018C) 0x2124- f:00020 d: 292 | A = OR[292]
0x00C7 (0x00018E) 0x290E- f:00024 d: 270 | OR[270] = A
0x00C8 (0x000190) 0x1040- f:00010 d: 64 | A = 64 (0x0040)
0x00C9 (0x000192) 0x290D- f:00024 d: 269 | OR[269] = A
0x00CA (0x000194) 0x210D- f:00020 d: 269 | A = OR[269]
0x00CB (0x000196) 0x8406- f:00102 d: 6 | P = P + 6 (0x00D1), A = 0
0x00CC (0x000198) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x00CD (0x00019A) 0x390E- f:00034 d: 270 | (OR[270]) = A
0x00CE (0x00019C) 0x2F0D- f:00027 d: 269 | OR[269] = OR[269] - 1
0x00CF (0x00019E) 0x2D0E- f:00026 d: 270 | OR[270] = OR[270] + 1
0x00D0 (0x0001A0) 0x7206- f:00071 d: 6 | P = P - 6 (0x00CA)
0x00D1 (0x0001A2) 0x2100- f:00020 d: 256 | A = OR[256]
0x00D2 (0x0001A4) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x00D3 (0x0001A6) 0x2908- f:00024 d: 264 | OR[264] = A
0x00D4 (0x0001A8) 0x3108- f:00030 d: 264 | A = (OR[264])
0x00D5 (0x0001AA) 0x2921- f:00024 d: 289 | OR[289] = A
0x00D6 (0x0001AC) 0x2100- f:00020 d: 256 | A = OR[256]
0x00D7 (0x0001AE) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003)
0x00D8 (0x0001B0) 0x2908- f:00024 d: 264 | OR[264] = A
0x00D9 (0x0001B2) 0x3108- f:00030 d: 264 | A = (OR[264])
0x00DA (0x0001B4) 0x2922- f:00024 d: 290 | OR[290] = A
0x00DB (0x0001B6) 0x1058- f:00010 d: 88 | A = 88 (0x0058)
0x00DC (0x0001B8) 0x2B22- f:00025 d: 290 | OR[290] = A + OR[290]
0x00DD (0x0001BA) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x00DE (0x0001BC) 0x2923- f:00024 d: 291 | OR[291] = A
0x00DF (0x0001BE) 0x2123- f:00020 d: 291 | A = OR[291]
0x00E0 (0x0001C0) 0x1680- f:00013 d: 128 | A = A - 128 (0x0080)
0x00E1 (0x0001C2) 0x8222- f:00101 d: 34 | P = P + 34 (0x0103), C = 1
0x00E2 (0x0001C4) 0x1010- f:00010 d: 16 | A = 16 (0x0010)
0x00E3 (0x0001C6) 0x290D- f:00024 d: 269 | OR[269] = A
0x00E4 (0x0001C8) 0x1080- f:00010 d: 128 | A = 128 (0x0080)
0x00E5 (0x0001CA) 0x2723- f:00023 d: 291 | A = A - OR[291]
0x00E6 (0x0001CC) 0x2908- f:00024 d: 264 | OR[264] = A
0x00E7 (0x0001CE) 0x210D- f:00020 d: 269 | A = OR[269]
0x00E8 (0x0001D0) 0x2708- f:00023 d: 264 | A = A - OR[264]
0x00E9 (0x0001D2) 0x8004- f:00100 d: 4 | P = P + 4 (0x00ED), C = 0
0x00EA (0x0001D4) 0x1080- f:00010 d: 128 | A = 128 (0x0080)
0x00EB (0x0001D6) 0x2723- f:00023 d: 291 | A = A - OR[291]
0x00EC (0x0001D8) 0x290D- f:00024 d: 269 | OR[269] = A
0x00ED (0x0001DA) 0x210D- f:00020 d: 269 | A = OR[269]
0x00EE (0x0001DC) 0x2913- f:00024 d: 275 | OR[275] = A
0x00EF (0x0001DE) 0x1027- f:00010 d: 39 | A = 39 (0x0027)
0x00F0 (0x0001E0) 0x292D- f:00024 d: 301 | OR[301] = A
0x00F1 (0x0001E2) 0x2121- f:00020 d: 289 | A = OR[289]
0x00F2 (0x0001E4) 0x292E- f:00024 d: 302 | OR[302] = A
0x00F3 (0x0001E6) 0x2122- f:00020 d: 290 | A = OR[290]
0x00F4 (0x0001E8) 0x2523- f:00022 d: 291 | A = A + OR[291]
0x00F5 (0x0001EA) 0x292F- f:00024 d: 303 | OR[303] = A
0x00F6 (0x0001EC) 0x2124- f:00020 d: 292 | A = OR[292]
0x00F7 (0x0001EE) 0x2930- f:00024 d: 304 | OR[304] = A
0x00F8 (0x0001F0) 0x2113- f:00020 d: 275 | A = OR[275]
0x00F9 (0x0001F2) 0x2931- f:00024 d: 305 | OR[305] = A
0x00FA (0x0001F4) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x00FB (0x0001F6) 0x2932- f:00024 d: 306 | OR[306] = A
0x00FC (0x0001F8) 0x112D- f:00010 d: 301 | A = 301 (0x012D)
0x00FD (0x0001FA) 0x5800- f:00054 d: 0 | B = A
0x00FE (0x0001FC) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x00FF (0x0001FE) 0x7C09- f:00076 d: 9 | R = OR[9]
0x0100 (0x000200) 0x1010- f:00010 d: 16 | A = 16 (0x0010)
0x0101 (0x000202) 0x2B23- f:00025 d: 291 | OR[291] = A + OR[291]
0x0102 (0x000204) 0x7223- f:00071 d: 35 | P = P - 35 (0x00DF)
0x0103 (0x000206) 0x2F04- f:00027 d: 260 | OR[260] = OR[260] - 1
0x0104 (0x000208) 0x3104- f:00030 d: 260 | A = (OR[260])
0x0105 (0x00020A) 0x2904- f:00024 d: 260 | OR[260] = A
0x0106 (0x00020C) 0x2104- f:00020 d: 260 | A = OR[260]
0x0107 (0x00020E) 0x2706- f:00023 d: 262 | A = A - OR[262]
0x0108 (0x000210) 0x8007- f:00100 d: 7 | P = P + 7 (0x010F), C = 0
0x0109 (0x000212) 0x2104- f:00020 d: 260 | A = OR[260]
0x010A (0x000214) 0x2705- f:00023 d: 261 | A = A - OR[261]
0x010B (0x000216) 0x8003- f:00100 d: 3 | P = P + 3 (0x010E), C = 0
0x010C (0x000218) 0x8402- f:00102 d: 2 | P = P + 2 (0x010E), A = 0
0x010D (0x00021A) 0x7002- f:00070 d: 2 | P = P + 2 (0x010F)
0x010E (0x00021C) 0x7003- f:00070 d: 3 | P = P + 3 (0x0111)
0x010F (0x00021E) 0x7C34- f:00076 d: 52 | R = OR[52]
0x0110 (0x000220) 0x000B- f:00000 d: 11 | PASS | **** non-standard encoding with D:0x000B ****
0x0111 (0x000222) 0x2100- f:00020 d: 256 | A = OR[256]
0x0112 (0x000224) 0x1415- f:00012 d: 21 | A = A + 21 (0x0015)
0x0113 (0x000226) 0x2908- f:00024 d: 264 | OR[264] = A
0x0114 (0x000228) 0x1040- f:00010 d: 64 | A = 64 (0x0040)
0x0115 (0x00022A) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0116 (0x00022C) 0x2100- f:00020 d: 256 | A = OR[256]
0x0117 (0x00022E) 0x1416- f:00012 d: 22 | A = A + 22 (0x0016)
0x0118 (0x000230) 0x2908- f:00024 d: 264 | OR[264] = A
0x0119 (0x000232) 0x1008- f:00010 d: 8 | A = 8 (0x0008)
0x011A (0x000234) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x011B (0x000236) 0x2100- f:00020 d: 256 | A = OR[256]
0x011C (0x000238) 0x1418- f:00012 d: 24 | A = A + 24 (0x0018)
0x011D (0x00023A) 0x2908- f:00024 d: 264 | OR[264] = A
0x011E (0x00023C) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x011F (0x00023E) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0120 (0x000240) 0x2100- f:00020 d: 256 | A = OR[256]
0x0121 (0x000242) 0x141C- f:00012 d: 28 | A = A + 28 (0x001C)
0x0122 (0x000244) 0x2908- f:00024 d: 264 | OR[264] = A
0x0123 (0x000246) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0124 (0x000248) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0125 (0x00024A) 0x2100- f:00020 d: 256 | A = OR[256]
0x0126 (0x00024C) 0x143A- f:00012 d: 58 | A = A + 58 (0x003A)
0x0127 (0x00024E) 0x2913- f:00024 d: 275 | OR[275] = A
0x0128 (0x000250) 0x2113- f:00020 d: 275 | A = OR[275]
0x0129 (0x000252) 0x290D- f:00024 d: 269 | OR[269] = A
0x012A (0x000254) 0x1001- f:00010 d: 1 | A = 1 (0x0001)
0x012B (0x000256) 0x390D- f:00034 d: 269 | (OR[269]) = A
0x012C (0x000258) 0x2D0D- f:00026 d: 269 | OR[269] = OR[269] + 1
0x012D (0x00025A) 0x310D- f:00030 d: 269 | A = (OR[269])
0x012E (0x00025C) 0x8409- f:00102 d: 9 | P = P + 9 (0x0137), A = 0
0x012F (0x00025E) 0x1002- f:00010 d: 2 | A = 2 (0x0002)
0x0130 (0x000260) 0x292D- f:00024 d: 301 | OR[301] = A
0x0131 (0x000262) 0x210D- f:00020 d: 269 | A = OR[269]
0x0132 (0x000264) 0x292E- f:00024 d: 302 | OR[302] = A
0x0133 (0x000266) 0x112D- f:00010 d: 301 | A = 301 (0x012D)
0x0134 (0x000268) 0x5800- f:00054 d: 0 | B = A
0x0135 (0x00026A) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0136 (0x00026C) 0x7C09- f:00076 d: 9 | R = OR[9]
0x0137 (0x00026E) 0x1028- f:00010 d: 40 | A = 40 (0x0028)
0x0138 (0x000270) 0x292D- f:00024 d: 301 | OR[301] = A
0x0139 (0x000272) 0x1800-0x0017 f:00014 d: 0 | A = 23 (0x0017)
0x013B (0x000276) 0x292E- f:00024 d: 302 | OR[302] = A
0x013C (0x000278) 0x1800-0xFFFF f:00014 d: 0 | A = 65535 (0xFFFF)
0x013E (0x00027C) 0x292F- f:00024 d: 303 | OR[303] = A
0x013F (0x00027E) 0x112D- f:00010 d: 301 | A = 301 (0x012D)
0x0140 (0x000280) 0x5800- f:00054 d: 0 | B = A
0x0141 (0x000282) 0x1800-0x2B18 f:00014 d: 0 | A = 11032 (0x2B18)
0x0143 (0x000286) 0x7C09- f:00076 d: 9 | R = OR[9]
0x0144 (0x000288) 0x2100- f:00020 d: 256 | A = OR[256]
0x0145 (0x00028A) 0x141B- f:00012 d: 27 | A = A + 27 (0x001B)
0x0146 (0x00028C) 0x2908- f:00024 d: 264 | OR[264] = A
0x0147 (0x00028E) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0148 (0x000290) 0x1A00-0xFF00 f:00015 d: 0 | A = A & 65280 (0xFF00)
0x014A (0x000294) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x014B (0x000296) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x014C (0x000298) 0x7448- f:00072 d: 72 | R = P + 72 (0x0194)
0x014D (0x00029A) 0x2005- f:00020 d: 5 | A = OR[5]
0x014E (0x00029C) 0x1406- f:00012 d: 6 | A = A + 6 (0x0006)
0x014F (0x00029E) 0x2908- f:00024 d: 264 | OR[264] = A
0x0150 (0x0002A0) 0x211D- f:00020 d: 285 | A = OR[285]
0x0151 (0x0002A2) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0152 (0x0002A4) 0x102A- f:00010 d: 42 | A = 42 (0x002A)
0x0153 (0x0002A6) 0x292D- f:00024 d: 301 | OR[301] = A
0x0154 (0x0002A8) 0x112D- f:00010 d: 301 | A = 301 (0x012D)
0x0155 (0x0002AA) 0x5800- f:00054 d: 0 | B = A
0x0156 (0x0002AC) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0157 (0x0002AE) 0x7C09- f:00076 d: 9 | R = OR[9]
0x0158 (0x0002B0) 0x2100- f:00020 d: 256 | A = OR[256]
0x0159 (0x0002B2) 0x141A- f:00012 d: 26 | A = A + 26 (0x001A)
0x015A (0x0002B4) 0x2908- f:00024 d: 264 | OR[264] = A
0x015B (0x0002B6) 0x3108- f:00030 d: 264 | A = (OR[264])
0x015C (0x0002B8) 0x291E- f:00024 d: 286 | OR[286] = A
0x015D (0x0002BA) 0x1018- f:00010 d: 24 | A = 24 (0x0018)
0x015E (0x0002BC) 0x2B1E- f:00025 d: 286 | OR[286] = A + OR[286]
0x015F (0x0002BE) 0x1028- f:00010 d: 40 | A = 40 (0x0028)
0x0160 (0x0002C0) 0x292D- f:00024 d: 301 | OR[301] = A
0x0161 (0x0002C2) 0x1800-0x014C f:00014 d: 0 | A = 332 (0x014C)
0x0163 (0x0002C6) 0x292E- f:00024 d: 302 | OR[302] = A
0x0164 (0x0002C8) 0x1800-0x0000 f:00014 d: 0 | A = 0 (0x0000)
0x0166 (0x0002CC) 0x292F- f:00024 d: 303 | OR[303] = A
0x0167 (0x0002CE) 0x1800-0x018E f:00014 d: 0 | A = 398 (0x018E)
0x0169 (0x0002D2) 0x2930- f:00024 d: 304 | OR[304] = A
0x016A (0x0002D4) 0x211E- f:00020 d: 286 | A = OR[286]
0x016B (0x0002D6) 0x2931- f:00024 d: 305 | OR[305] = A
0x016C (0x0002D8) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x016D (0x0002DA) 0x2932- f:00024 d: 306 | OR[306] = A
0x016E (0x0002DC) 0x112D- f:00010 d: 301 | A = 301 (0x012D)
0x016F (0x0002DE) 0x5800- f:00054 d: 0 | B = A
0x0170 (0x0002E0) 0x1800-0x2B18 f:00014 d: 0 | A = 11032 (0x2B18)
0x0172 (0x0002E4) 0x7C09- f:00076 d: 9 | R = OR[9]
0x0173 (0x0002E6) 0x1028- f:00010 d: 40 | A = 40 (0x0028)
0x0174 (0x0002E8) 0x292D- f:00024 d: 301 | OR[301] = A
0x0175 (0x0002EA) 0x1800-0x0125 f:00014 d: 0 | A = 293 (0x0125)
0x0177 (0x0002EE) 0x292E- f:00024 d: 302 | OR[302] = A
0x0178 (0x0002F0) 0x211E- f:00020 d: 286 | A = OR[286]
0x0179 (0x0002F2) 0x292F- f:00024 d: 303 | OR[303] = A
0x017A (0x0002F4) 0x211E- f:00020 d: 286 | A = OR[286]
0x017B (0x0002F6) 0x2930- f:00024 d: 304 | OR[304] = A
0x017C (0x0002F8) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x017D (0x0002FA) 0x2931- f:00024 d: 305 | OR[305] = A
0x017E (0x0002FC) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x017F (0x0002FE) 0x2932- f:00024 d: 306 | OR[306] = A
0x0180 (0x000300) 0x2127- f:00020 d: 295 | A = OR[295]
0x0181 (0x000302) 0x2933- f:00024 d: 307 | OR[307] = A
0x0182 (0x000304) 0x2128- f:00020 d: 296 | A = OR[296]
0x0183 (0x000306) 0x2934- f:00024 d: 308 | OR[308] = A
0x0184 (0x000308) 0x2129- f:00020 d: 297 | A = OR[297]
0x0185 (0x00030A) 0x2935- f:00024 d: 309 | OR[309] = A
0x0186 (0x00030C) 0x212A- f:00020 d: 298 | A = OR[298]
0x0187 (0x00030E) 0x2936- f:00024 d: 310 | OR[310] = A
0x0188 (0x000310) 0x212B- f:00020 d: 299 | A = OR[299]
0x0189 (0x000312) 0x2937- f:00024 d: 311 | OR[311] = A
0x018A (0x000314) 0x1015- f:00010 d: 21 | A = 21 (0x0015)
0x018B (0x000316) 0x2938- f:00024 d: 312 | OR[312] = A
0x018C (0x000318) 0x1016- f:00010 d: 22 | A = 22 (0x0016)
0x018D (0x00031A) 0x2939- f:00024 d: 313 | OR[313] = A
0x018E (0x00031C) 0x112D- f:00010 d: 301 | A = 301 (0x012D)
0x018F (0x00031E) 0x5800- f:00054 d: 0 | B = A
0x0190 (0x000320) 0x1800-0x2B18 f:00014 d: 0 | A = 11032 (0x2B18)
0x0192 (0x000324) 0x7C09- f:00076 d: 9 | R = OR[9]
0x0193 (0x000326) 0x0200- f:00001 d: 0 | EXIT
0x0194 (0x000328) 0x2100- f:00020 d: 256 | A = OR[256]
0x0195 (0x00032A) 0x140E- f:00012 d: 14 | A = A + 14 (0x000E)
0x0196 (0x00032C) 0x2908- f:00024 d: 264 | OR[264] = A
0x0197 (0x00032E) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0198 (0x000330) 0x291A- f:00024 d: 282 | OR[282] = A
0x0199 (0x000332) 0x2100- f:00020 d: 256 | A = OR[256]
0x019A (0x000334) 0x140F- f:00012 d: 15 | A = A + 15 (0x000F)
0x019B (0x000336) 0x2908- f:00024 d: 264 | OR[264] = A
0x019C (0x000338) 0x3108- f:00030 d: 264 | A = (OR[264])
0x019D (0x00033A) 0x291B- f:00024 d: 283 | OR[283] = A
0x019E (0x00033C) 0x2100- f:00020 d: 256 | A = OR[256]
0x019F (0x00033E) 0x1410- f:00012 d: 16 | A = A + 16 (0x0010)
0x01A0 (0x000340) 0x2908- f:00024 d: 264 | OR[264] = A
0x01A1 (0x000342) 0x3108- f:00030 d: 264 | A = (OR[264])
0x01A2 (0x000344) 0x291C- f:00024 d: 284 | OR[284] = A
0x01A3 (0x000346) 0x2104- f:00020 d: 260 | A = OR[260]
0x01A4 (0x000348) 0x290D- f:00024 d: 269 | OR[269] = A
0x01A5 (0x00034A) 0x2104- f:00020 d: 260 | A = OR[260]
0x01A6 (0x00034C) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003)
0x01A7 (0x00034E) 0x1A00-0xFFFC f:00015 d: 0 | A = A & 65532 (0xFFFC)
0x01A9 (0x000352) 0x2904- f:00024 d: 260 | OR[260] = A
0x01AA (0x000354) 0x2104- f:00020 d: 260 | A = OR[260]
0x01AB (0x000356) 0x291E- f:00024 d: 286 | OR[286] = A
0x01AC (0x000358) 0x1018- f:00010 d: 24 | A = 24 (0x0018)
0x01AD (0x00035A) 0x2B04- f:00025 d: 260 | OR[260] = A + OR[260]
0x01AE (0x00035C) 0x2104- f:00020 d: 260 | A = OR[260]
0x01AF (0x00035E) 0x2705- f:00023 d: 261 | A = A - OR[261]
0x01B0 (0x000360) 0xB234- f:00131 d: 52 | R = OR[52], C = 1
0x01B1 (0x000362) 0x000B- f:00000 d: 11 | PASS | **** non-standard encoding with D:0x000B ****
0x01B2 (0x000364) 0x210D- f:00020 d: 269 | A = OR[269]
0x01B3 (0x000366) 0x3904- f:00034 d: 260 | (OR[260]) = A
0x01B4 (0x000368) 0x2D04- f:00026 d: 260 | OR[260] = OR[260] + 1
0x01B5 (0x00036A) 0x2100- f:00020 d: 256 | A = OR[256]
0x01B6 (0x00036C) 0x1411- f:00012 d: 17 | A = A + 17 (0x0011)
0x01B7 (0x00036E) 0x2908- f:00024 d: 264 | OR[264] = A
0x01B8 (0x000370) 0x3108- f:00030 d: 264 | A = (OR[264])
0x01B9 (0x000372) 0x291F- f:00024 d: 287 | OR[287] = A
0x01BA (0x000374) 0x211F- f:00020 d: 287 | A = OR[287]
0x01BB (0x000376) 0xAC03-0x02FF f:00126 d: 3 | P = OR[3]+767 (0x02FF), A = 0
0x01BD (0x00037A) 0x211E- f:00020 d: 286 | A = OR[286]
0x01BE (0x00037C) 0x290E- f:00024 d: 270 | OR[270] = A
0x01BF (0x00037E) 0x1018- f:00010 d: 24 | A = 24 (0x0018)
0x01C0 (0x000380) 0x290D- f:00024 d: 269 | OR[269] = A
0x01C1 (0x000382) 0x210D- f:00020 d: 269 | A = OR[269]
0x01C2 (0x000384) 0x8406- f:00102 d: 6 | P = P + 6 (0x01C8), A = 0
0x01C3 (0x000386) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x01C4 (0x000388) 0x390E- f:00034 d: 270 | (OR[270]) = A
0x01C5 (0x00038A) 0x2F0D- f:00027 d: 269 | OR[269] = OR[269] - 1
0x01C6 (0x00038C) 0x2D0E- f:00026 d: 270 | OR[270] = OR[270] + 1
0x01C7 (0x00038E) 0x7206- f:00071 d: 6 | P = P - 6 (0x01C1)
0x01C8 (0x000390) 0x1028- f:00010 d: 40 | A = 40 (0x0028)
0x01C9 (0x000392) 0x292D- f:00024 d: 301 | OR[301] = A
0x01CA (0x000394) 0x1800-0x014C f:00014 d: 0 | A = 332 (0x014C)
0x01CC (0x000398) 0x292E- f:00024 d: 302 | OR[302] = A
0x01CD (0x00039A) 0x1800-0x0000 f:00014 d: 0 | A = 0 (0x0000)
0x01CF (0x00039E) 0x292F- f:00024 d: 303 | OR[303] = A
0x01D0 (0x0003A0) 0x1800-0x0189 f:00014 d: 0 | A = 393 (0x0189)
0x01D2 (0x0003A4) 0x2930- f:00024 d: 304 | OR[304] = A
0x01D3 (0x0003A6) 0x211E- f:00020 d: 286 | A = OR[286]
0x01D4 (0x0003A8) 0x2931- f:00024 d: 305 | OR[305] = A
0x01D5 (0x0003AA) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x01D6 (0x0003AC) 0x2932- f:00024 d: 306 | OR[306] = A
0x01D7 (0x0003AE) 0x112D- f:00010 d: 301 | A = 301 (0x012D)
0x01D8 (0x0003B0) 0x5800- f:00054 d: 0 | B = A
0x01D9 (0x0003B2) 0x1800-0x2B18 f:00014 d: 0 | A = 11032 (0x2B18)
0x01DB (0x0003B6) 0x7C09- f:00076 d: 9 | R = OR[9]
0x01DC (0x0003B8) 0x2119- f:00020 d: 281 | A = OR[281]
0x01DD (0x0003BA) 0x290E- f:00024 d: 270 | OR[270] = A
0x01DE (0x0003BC) 0x1018- f:00010 d: 24 | A = 24 (0x0018)
0x01DF (0x0003BE) 0x290D- f:00024 d: 269 | OR[269] = A
0x01E0 (0x0003C0) 0x210D- f:00020 d: 269 | A = OR[269]
0x01E1 (0x0003C2) 0x8406- f:00102 d: 6 | P = P + 6 (0x01E7), A = 0
0x01E2 (0x0003C4) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x01E3 (0x0003C6) 0x390E- f:00034 d: 270 | (OR[270]) = A
0x01E4 (0x0003C8) 0x2F0D- f:00027 d: 269 | OR[269] = OR[269] - 1
0x01E5 (0x0003CA) 0x2D0E- f:00026 d: 270 | OR[270] = OR[270] + 1
0x01E6 (0x0003CC) 0x7206- f:00071 d: 6 | P = P - 6 (0x01E0)
0x01E7 (0x0003CE) 0x211B- f:00020 d: 283 | A = OR[283]
0x01E8 (0x0003D0) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x01E9 (0x0003D2) 0x291B- f:00024 d: 283 | OR[283] = A
0x01EA (0x0003D4) 0x2119- f:00020 d: 281 | A = OR[281]
0x01EB (0x0003D6) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x01EC (0x0003D8) 0x2908- f:00024 d: 264 | OR[264] = A
0x01ED (0x0003DA) 0x3108- f:00030 d: 264 | A = (OR[264])
0x01EE (0x0003DC) 0x0A09- f:00005 d: 9 | A = A < 9 (0x0009)
0x01EF (0x0003DE) 0x251B- f:00022 d: 283 | A = A + OR[283]
0x01F0 (0x0003E0) 0x0C09- f:00006 d: 9 | A = A >> 9 (0x0009)
0x01F1 (0x0003E2) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x01F2 (0x0003E4) 0x211A- f:00020 d: 282 | A = OR[282]
0x01F3 (0x0003E6) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x01F4 (0x0003E8) 0x291A- f:00024 d: 282 | OR[282] = A
0x01F5 (0x0003EA) 0x2119- f:00020 d: 281 | A = OR[281]
0x01F6 (0x0003EC) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x01F7 (0x0003EE) 0x2908- f:00024 d: 264 | OR[264] = A
0x01F8 (0x0003F0) 0x3108- f:00030 d: 264 | A = (OR[264])
0x01F9 (0x0003F2) 0x1A00-0xFF00 f:00015 d: 0 | A = A & 65280 (0xFF00)
0x01FB (0x0003F6) 0x251A- f:00022 d: 282 | A = A + OR[282]
0x01FC (0x0003F8) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x01FD (0x0003FA) 0x211C- f:00020 d: 284 | A = OR[284]
0x01FE (0x0003FC) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x01FF (0x0003FE) 0x291C- f:00024 d: 284 | OR[284] = A
0x0200 (0x000400) 0x2119- f:00020 d: 281 | A = OR[281]
0x0201 (0x000402) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x0202 (0x000404) 0x2908- f:00024 d: 264 | OR[264] = A
0x0203 (0x000406) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0204 (0x000408) 0x0A09- f:00005 d: 9 | A = A < 9 (0x0009)
0x0205 (0x00040A) 0x251C- f:00022 d: 284 | A = A + OR[284]
0x0206 (0x00040C) 0x0C09- f:00006 d: 9 | A = A >> 9 (0x0009)
0x0207 (0x00040E) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0208 (0x000410) 0x2119- f:00020 d: 281 | A = OR[281]
0x0209 (0x000412) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x020A (0x000414) 0x2908- f:00024 d: 264 | OR[264] = A
0x020B (0x000416) 0x3108- f:00030 d: 264 | A = (OR[264])
0x020C (0x000418) 0x1A00-0xFF00 f:00015 d: 0 | A = A & 65280 (0xFF00)
0x020E (0x00041C) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x020F (0x00041E) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0210 (0x000420) 0x2119- f:00020 d: 281 | A = OR[281]
0x0211 (0x000422) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003)
0x0212 (0x000424) 0x2908- f:00024 d: 264 | OR[264] = A
0x0213 (0x000426) 0x1800-0x0200 f:00014 d: 0 | A = 512 (0x0200)
0x0215 (0x00042A) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0216 (0x00042C) 0x2119- f:00020 d: 281 | A = OR[281]
0x0217 (0x00042E) 0x1404- f:00012 d: 4 | A = A + 4 (0x0004)
0x0218 (0x000430) 0x2908- f:00024 d: 264 | OR[264] = A
0x0219 (0x000432) 0x3108- f:00030 d: 264 | A = (OR[264])
0x021A (0x000434) 0x0A09- f:00005 d: 9 | A = A < 9 (0x0009)
0x021B (0x000436) 0x1408- f:00012 d: 8 | A = A + 8 (0x0008)
0x021C (0x000438) 0x0C09- f:00006 d: 9 | A = A >> 9 (0x0009)
0x021D (0x00043A) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x021E (0x00043C) 0x2119- f:00020 d: 281 | A = OR[281]
0x021F (0x00043E) 0x1405- f:00012 d: 5 | A = A + 5 (0x0005)
0x0220 (0x000440) 0x2908- f:00024 d: 264 | OR[264] = A
0x0221 (0x000442) 0x1800-0xF000 f:00014 d: 0 | A = 61440 (0xF000)
0x0223 (0x000446) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0224 (0x000448) 0x2119- f:00020 d: 281 | A = OR[281]
0x0225 (0x00044A) 0x1406- f:00012 d: 6 | A = A + 6 (0x0006)
0x0226 (0x00044C) 0x2908- f:00024 d: 264 | OR[264] = A
0x0227 (0x00044E) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0228 (0x000450) 0x0E01- f:00007 d: 1 | A = A << 1 (0x0001)
0x0229 (0x000452) 0x0A08- f:00005 d: 8 | A = A < 8 (0x0008)
0x022A (0x000454) 0x1400- f:00012 d: 0 | A = A + 0 (0x0000)
0x022B (0x000456) 0x0C09- f:00006 d: 9 | A = A >> 9 (0x0009)
0x022C (0x000458) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x022D (0x00045A) 0x101D- f:00010 d: 29 | A = 29 (0x001D)
0x022E (0x00045C) 0x292D- f:00024 d: 301 | OR[301] = A
0x022F (0x00045E) 0x1001- f:00010 d: 1 | A = 1 (0x0001)
0x0230 (0x000460) 0x292E- f:00024 d: 302 | OR[302] = A
0x0231 (0x000462) 0x112D- f:00010 d: 301 | A = 301 (0x012D)
0x0232 (0x000464) 0x5800- f:00054 d: 0 | B = A
0x0233 (0x000466) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0234 (0x000468) 0x7C09- f:00076 d: 9 | R = OR[9]
0x0235 (0x00046A) 0x2006- f:00020 d: 6 | A = OR[6]
0x0236 (0x00046C) 0x140C- f:00012 d: 12 | A = A + 12 (0x000C)
0x0237 (0x00046E) 0x2908- f:00024 d: 264 | OR[264] = A
0x0238 (0x000470) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0239 (0x000472) 0x2921- f:00024 d: 289 | OR[289] = A
0x023A (0x000474) 0x2006- f:00020 d: 6 | A = OR[6]
0x023B (0x000476) 0x140D- f:00012 d: 13 | A = A + 13 (0x000D)
0x023C (0x000478) 0x2908- f:00024 d: 264 | OR[264] = A
0x023D (0x00047A) 0x3108- f:00030 d: 264 | A = (OR[264])
0x023E (0x00047C) 0x2922- f:00024 d: 290 | OR[290] = A
0x023F (0x00047E) 0x2006- f:00020 d: 6 | A = OR[6]
0x0240 (0x000480) 0x140B- f:00012 d: 11 | A = A + 11 (0x000B)
0x0241 (0x000482) 0x2908- f:00024 d: 264 | OR[264] = A
0x0242 (0x000484) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0243 (0x000486) 0x291D- f:00024 d: 285 | OR[285] = A
0x0244 (0x000488) 0x86D0- f:00103 d: 208 | P = P + 208 (0x0314), A # 0
0x0245 (0x00048A) 0x1027- f:00010 d: 39 | A = 39 (0x0027)
0x0246 (0x00048C) 0x292D- f:00024 d: 301 | OR[301] = A
0x0247 (0x00048E) 0x2121- f:00020 d: 289 | A = OR[289]
0x0248 (0x000490) 0x292E- f:00024 d: 302 | OR[302] = A
0x0249 (0x000492) 0x2122- f:00020 d: 290 | A = OR[290]
0x024A (0x000494) 0x292F- f:00024 d: 303 | OR[303] = A
0x024B (0x000496) 0x2119- f:00020 d: 281 | A = OR[281]
0x024C (0x000498) 0x2930- f:00024 d: 304 | OR[304] = A
0x024D (0x00049A) 0x1018- f:00010 d: 24 | A = 24 (0x0018)
0x024E (0x00049C) 0x0802- f:00004 d: 2 | A = A > 2 (0x0002)
0x024F (0x00049E) 0x2931- f:00024 d: 305 | OR[305] = A
0x0250 (0x0004A0) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0251 (0x0004A2) 0x2932- f:00024 d: 306 | OR[306] = A
0x0252 (0x0004A4) 0x112D- f:00010 d: 301 | A = 301 (0x012D)
0x0253 (0x0004A6) 0x5800- f:00054 d: 0 | B = A
0x0254 (0x0004A8) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0255 (0x0004AA) 0x7C09- f:00076 d: 9 | R = OR[9]
0x0256 (0x0004AC) 0x1028- f:00010 d: 40 | A = 40 (0x0028)
0x0257 (0x0004AE) 0x292D- f:00024 d: 301 | OR[301] = A
0x0258 (0x0004B0) 0x1800-0x0125 f:00014 d: 0 | A = 293 (0x0125)
0x025A (0x0004B4) 0x292E- f:00024 d: 302 | OR[302] = A
0x025B (0x0004B6) 0x211E- f:00020 d: 286 | A = OR[286]
0x025C (0x0004B8) 0x292F- f:00024 d: 303 | OR[303] = A
0x025D (0x0004BA) 0x211E- f:00020 d: 286 | A = OR[286]
0x025E (0x0004BC) 0x2930- f:00024 d: 304 | OR[304] = A
0x025F (0x0004BE) 0x2121- f:00020 d: 289 | A = OR[289]
0x0260 (0x0004C0) 0x2931- f:00024 d: 305 | OR[305] = A
0x0261 (0x0004C2) 0x2122- f:00020 d: 290 | A = OR[290]
0x0262 (0x0004C4) 0x2932- f:00024 d: 306 | OR[306] = A
0x0263 (0x0004C6) 0x2127- f:00020 d: 295 | A = OR[295]
0x0264 (0x0004C8) 0x2933- f:00024 d: 307 | OR[307] = A
0x0265 (0x0004CA) 0x2128- f:00020 d: 296 | A = OR[296]
0x0266 (0x0004CC) 0x2934- f:00024 d: 308 | OR[308] = A
0x0267 (0x0004CE) 0x2129- f:00020 d: 297 | A = OR[297]
0x0268 (0x0004D0) 0x2935- f:00024 d: 309 | OR[309] = A
0x0269 (0x0004D2) 0x212A- f:00020 d: 298 | A = OR[298]
0x026A (0x0004D4) 0x2936- f:00024 d: 310 | OR[310] = A
0x026B (0x0004D6) 0x212B- f:00020 d: 299 | A = OR[299]
0x026C (0x0004D8) 0x2937- f:00024 d: 311 | OR[311] = A
0x026D (0x0004DA) 0x1015- f:00010 d: 21 | A = 21 (0x0015)
0x026E (0x0004DC) 0x2938- f:00024 d: 312 | OR[312] = A
0x026F (0x0004DE) 0x1016- f:00010 d: 22 | A = 22 (0x0016)
0x0270 (0x0004E0) 0x2939- f:00024 d: 313 | OR[313] = A
0x0271 (0x0004E2) 0x112D- f:00010 d: 301 | A = 301 (0x012D)
0x0272 (0x0004E4) 0x5800- f:00054 d: 0 | B = A
0x0273 (0x0004E6) 0x1800-0x2B18 f:00014 d: 0 | A = 11032 (0x2B18)
0x0275 (0x0004EA) 0x7C09- f:00076 d: 9 | R = OR[9]
0x0276 (0x0004EC) 0x291D- f:00024 d: 285 | OR[285] = A
0x0277 (0x0004EE) 0x869D- f:00103 d: 157 | P = P + 157 (0x0314), A # 0
0x0278 (0x0004F0) 0x2122- f:00020 d: 290 | A = OR[290]
0x0279 (0x0004F2) 0x8604- f:00103 d: 4 | P = P + 4 (0x027D), A # 0
0x027A (0x0004F4) 0x2121- f:00020 d: 289 | A = OR[289]
0x027B (0x0004F6) 0x8602- f:00103 d: 2 | P = P + 2 (0x027D), A # 0
0x027C (0x0004F8) 0x701E- f:00070 d: 30 | P = P + 30 (0x029A)
0x027D (0x0004FA) 0x1026- f:00010 d: 38 | A = 38 (0x0026)
0x027E (0x0004FC) 0x292D- f:00024 d: 301 | OR[301] = A
0x027F (0x0004FE) 0x2121- f:00020 d: 289 | A = OR[289]
0x0280 (0x000500) 0x292E- f:00024 d: 302 | OR[302] = A
0x0281 (0x000502) 0x2122- f:00020 d: 290 | A = OR[290]
0x0282 (0x000504) 0x292F- f:00024 d: 303 | OR[303] = A
0x0283 (0x000506) 0x2119- f:00020 d: 281 | A = OR[281]
0x0284 (0x000508) 0x2930- f:00024 d: 304 | OR[304] = A
0x0285 (0x00050A) 0x1018- f:00010 d: 24 | A = 24 (0x0018)
0x0286 (0x00050C) 0x0802- f:00004 d: 2 | A = A > 2 (0x0002)
0x0287 (0x00050E) 0x2931- f:00024 d: 305 | OR[305] = A
0x0288 (0x000510) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0289 (0x000512) 0x2932- f:00024 d: 306 | OR[306] = A
0x028A (0x000514) 0x112D- f:00010 d: 301 | A = 301 (0x012D)
0x028B (0x000516) 0x5800- f:00054 d: 0 | B = A
0x028C (0x000518) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x028D (0x00051A) 0x7C09- f:00076 d: 9 | R = OR[9]
0x028E (0x00051C) 0x101E- f:00010 d: 30 | A = 30 (0x001E)
0x028F (0x00051E) 0x292D- f:00024 d: 301 | OR[301] = A
0x0290 (0x000520) 0x2121- f:00020 d: 289 | A = OR[289]
0x0291 (0x000522) 0x292E- f:00024 d: 302 | OR[302] = A
0x0292 (0x000524) 0x2122- f:00020 d: 290 | A = OR[290]
0x0293 (0x000526) 0x292F- f:00024 d: 303 | OR[303] = A
0x0294 (0x000528) 0x1001- f:00010 d: 1 | A = 1 (0x0001)
0x0295 (0x00052A) 0x2930- f:00024 d: 304 | OR[304] = A
0x0296 (0x00052C) 0x112D- f:00010 d: 301 | A = 301 (0x012D)
0x0297 (0x00052E) 0x5800- f:00054 d: 0 | B = A
0x0298 (0x000530) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0299 (0x000532) 0x7C09- f:00076 d: 9 | R = OR[9]
0x029A (0x000534) 0x1028- f:00010 d: 40 | A = 40 (0x0028)
0x029B (0x000536) 0x292D- f:00024 d: 301 | OR[301] = A
0x029C (0x000538) 0x1800-0x014C f:00014 d: 0 | A = 332 (0x014C)
0x029E (0x00053C) 0x292E- f:00024 d: 302 | OR[302] = A
0x029F (0x00053E) 0x1800-0x0001 f:00014 d: 0 | A = 1 (0x0001)
0x02A1 (0x000542) 0x292F- f:00024 d: 303 | OR[303] = A
0x02A2 (0x000544) 0x1800-0x020B f:00014 d: 0 | A = 523 (0x020B)
0x02A4 (0x000548) 0x2930- f:00024 d: 304 | OR[304] = A
0x02A5 (0x00054A) 0x211E- f:00020 d: 286 | A = OR[286]
0x02A6 (0x00054C) 0x2931- f:00024 d: 305 | OR[305] = A
0x02A7 (0x00054E) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x02A8 (0x000550) 0x2932- f:00024 d: 306 | OR[306] = A
0x02A9 (0x000552) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x02AA (0x000554) 0x2933- f:00024 d: 307 | OR[307] = A
0x02AB (0x000556) 0x1014- f:00010 d: 20 | A = 20 (0x0014)
0x02AC (0x000558) 0x2934- f:00024 d: 308 | OR[308] = A
0x02AD (0x00055A) 0x112D- f:00010 d: 301 | A = 301 (0x012D)
0x02AE (0x00055C) 0x5800- f:00054 d: 0 | B = A
0x02AF (0x00055E) 0x1800-0x2B18 f:00014 d: 0 | A = 11032 (0x2B18)
0x02B1 (0x000562) 0x7C09- f:00076 d: 9 | R = OR[9]
0x02B2 (0x000564) 0x8645- f:00103 d: 69 | P = P + 69 (0x02F7), A # 0
0x02B3 (0x000566) 0x2119- f:00020 d: 281 | A = OR[281]
0x02B4 (0x000568) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x02B5 (0x00056A) 0x2908- f:00024 d: 264 | OR[264] = A
0x02B6 (0x00056C) 0x3108- f:00030 d: 264 | A = (OR[264])
0x02B7 (0x00056E) 0x0808- f:00004 d: 8 | A = A > 8 (0x0008)
0x02B8 (0x000570) 0x2913- f:00024 d: 275 | OR[275] = A
0x02B9 (0x000572) 0x2113- f:00020 d: 275 | A = OR[275]
0x02BA (0x000574) 0x271B- f:00023 d: 283 | A = A - OR[283]
0x02BB (0x000576) 0x863C- f:00103 d: 60 | P = P + 60 (0x02F7), A # 0
0x02BC (0x000578) 0x2119- f:00020 d: 281 | A = OR[281]
0x02BD (0x00057A) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x02BE (0x00057C) 0x2908- f:00024 d: 264 | OR[264] = A
0x02BF (0x00057E) 0x3108- f:00030 d: 264 | A = (OR[264])
0x02C0 (0x000580) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x02C1 (0x000582) 0x2914- f:00024 d: 276 | OR[276] = A
0x02C2 (0x000584) 0x2114- f:00020 d: 276 | A = OR[276]
0x02C3 (0x000586) 0x271A- f:00023 d: 282 | A = A - OR[282]
0x02C4 (0x000588) 0x8633- f:00103 d: 51 | P = P + 51 (0x02F7), A # 0
0x02C5 (0x00058A) 0x2113- f:00020 d: 275 | A = OR[275]
0x02C6 (0x00058C) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x02C7 (0x00058E) 0x2913- f:00024 d: 275 | OR[275] = A
0x02C8 (0x000590) 0x2119- f:00020 d: 281 | A = OR[281]
0x02C9 (0x000592) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x02CA (0x000594) 0x2908- f:00024 d: 264 | OR[264] = A
0x02CB (0x000596) 0x3108- f:00030 d: 264 | A = (OR[264])
0x02CC (0x000598) 0x1A00-0xFF00 f:00015 d: 0 | A = A & 65280 (0xFF00)
0x02CE (0x00059C) 0x2513- f:00022 d: 275 | A = A + OR[275]
0x02CF (0x00059E) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x02D0 (0x0005A0) 0x2114- f:00020 d: 276 | A = OR[276]
0x02D1 (0x0005A2) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x02D2 (0x0005A4) 0x2914- f:00024 d: 276 | OR[276] = A
0x02D3 (0x0005A6) 0x2119- f:00020 d: 281 | A = OR[281]
0x02D4 (0x0005A8) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x02D5 (0x0005AA) 0x2908- f:00024 d: 264 | OR[264] = A
0x02D6 (0x0005AC) 0x3108- f:00030 d: 264 | A = (OR[264])
0x02D7 (0x0005AE) 0x0A09- f:00005 d: 9 | A = A < 9 (0x0009)
0x02D8 (0x0005B0) 0x2514- f:00022 d: 276 | A = A + OR[276]
0x02D9 (0x0005B2) 0x0C09- f:00006 d: 9 | A = A >> 9 (0x0009)
0x02DA (0x0005B4) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x02DB (0x0005B6) 0x2119- f:00020 d: 281 | A = OR[281]
0x02DC (0x0005B8) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x02DD (0x0005BA) 0x2908- f:00024 d: 264 | OR[264] = A
0x02DE (0x0005BC) 0x3108- f:00030 d: 264 | A = (OR[264])
0x02DF (0x0005BE) 0x0808- f:00004 d: 8 | A = A > 8 (0x0008)
0x02E0 (0x0005C0) 0x2913- f:00024 d: 275 | OR[275] = A
0x02E1 (0x0005C2) 0x2113- f:00020 d: 275 | A = OR[275]
0x02E2 (0x0005C4) 0x271C- f:00023 d: 284 | A = A - OR[284]
0x02E3 (0x0005C6) 0x8614- f:00103 d: 20 | P = P + 20 (0x02F7), A # 0
0x02E4 (0x0005C8) 0x2119- f:00020 d: 281 | A = OR[281]
0x02E5 (0x0005CA) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x02E6 (0x0005CC) 0x2908- f:00024 d: 264 | OR[264] = A
0x02E7 (0x0005CE) 0x3108- f:00030 d: 264 | A = (OR[264])
0x02E8 (0x0005D0) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x02E9 (0x0005D2) 0x2913- f:00024 d: 275 | OR[275] = A
0x02EA (0x0005D4) 0x2113- f:00020 d: 275 | A = OR[275]
0x02EB (0x0005D6) 0x1601- f:00013 d: 1 | A = A - 1 (0x0001)
0x02EC (0x0005D8) 0x860B- f:00103 d: 11 | P = P + 11 (0x02F7), A # 0
0x02ED (0x0005DA) 0x2119- f:00020 d: 281 | A = OR[281]
0x02EE (0x0005DC) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003)
0x02EF (0x0005DE) 0x2908- f:00024 d: 264 | OR[264] = A
0x02F0 (0x0005E0) 0x3108- f:00030 d: 264 | A = (OR[264])
0x02F1 (0x0005E2) 0x2913- f:00024 d: 275 | OR[275] = A
0x02F2 (0x0005E4) 0x2113- f:00020 d: 275 | A = OR[275]
0x02F3 (0x0005E6) 0x1E00-0x0200 f:00017 d: 0 | A = A - 512 (0x0200)
0x02F5 (0x0005EA) 0x8602- f:00103 d: 2 | P = P + 2 (0x02F7), A # 0
0x02F6 (0x0005EC) 0x7007- f:00070 d: 7 | P = P + 7 (0x02FD)
0x02F7 (0x0005EE) 0x2F1F- f:00027 d: 287 | OR[287] = OR[287] - 1
0x02F8 (0x0005F0) 0x733E- f:00071 d: 318 | P = P - 318 (0x01BA)
0x02F9 (0x0005F2) 0x1800-0x003E f:00014 d: 0 | A = 62 (0x003E)
0x02FB (0x0005F6) 0x291D- f:00024 d: 285 | OR[285] = A
0x02FC (0x0005F8) 0x7018- f:00070 d: 24 | P = P + 24 (0x0314)
0x02FD (0x0005FA) 0x2100- f:00020 d: 256 | A = OR[256]
0x02FE (0x0005FC) 0x141D- f:00012 d: 29 | A = A + 29 (0x001D)
0x02FF (0x0005FE) 0x2913- f:00024 d: 275 | OR[275] = A
0x0300 (0x000600) 0x100F- f:00010 d: 15 | A = 15 (0x000F)
0x0301 (0x000602) 0x1600- f:00013 d: 0 | A = A - 0 (0x0000)
0x0302 (0x000604) 0x120F- f:00011 d: 15 | A = A & 15 (0x000F)
0x0303 (0x000606) 0x5800- f:00054 d: 0 | B = A
0x0304 (0x000608) 0x1001- f:00010 d: 1 | A = 1 (0x0001)
0x0305 (0x00060A) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001)
0x0306 (0x00060C) 0x290D- f:00024 d: 269 | OR[269] = A
0x0307 (0x00060E) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0308 (0x000610) 0x0804- f:00004 d: 4 | A = A > 4 (0x0004)
0x0309 (0x000612) 0x2513- f:00022 d: 275 | A = A + OR[275]
0x030A (0x000614) 0x290E- f:00024 d: 270 | OR[270] = A
0x030B (0x000616) 0x310E- f:00030 d: 270 | A = (OR[270])
0x030C (0x000618) 0x4C00- f:00046 d: 0 | A = A >> B
0x030D (0x00061A) 0x0801- f:00004 d: 1 | A = A > 1 (0x0001)
0x030E (0x00061C) 0x0A01- f:00005 d: 1 | A = A < 1 (0x0001)
0x030F (0x00061E) 0x250D- f:00022 d: 269 | A = A + OR[269]
0x0310 (0x000620) 0x4E00- f:00047 d: 0 | A = A << B
0x0311 (0x000622) 0x390E- f:00034 d: 270 | (OR[270]) = A
0x0312 (0x000624) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0313 (0x000626) 0x291D- f:00024 d: 285 | OR[285] = A
0x0314 (0x000628) 0x2F04- f:00027 d: 260 | OR[260] = OR[260] - 1
0x0315 (0x00062A) 0x3104- f:00030 d: 260 | A = (OR[260])
0x0316 (0x00062C) 0x2904- f:00024 d: 260 | OR[260] = A
0x0317 (0x00062E) 0x2104- f:00020 d: 260 | A = OR[260]
0x0318 (0x000630) 0x2706- f:00023 d: 262 | A = A - OR[262]
0x0319 (0x000632) 0x8007- f:00100 d: 7 | P = P + 7 (0x0320), C = 0
0x031A (0x000634) 0x2104- f:00020 d: 260 | A = OR[260]
0x031B (0x000636) 0x2705- f:00023 d: 261 | A = A - OR[261]
0x031C (0x000638) 0x8003- f:00100 d: 3 | P = P + 3 (0x031F), C = 0
0x031D (0x00063A) 0x8402- f:00102 d: 2 | P = P + 2 (0x031F), A = 0
0x031E (0x00063C) 0x7002- f:00070 d: 2 | P = P + 2 (0x0320)
0x031F (0x00063E) 0x7003- f:00070 d: 3 | P = P + 3 (0x0322)
0x0320 (0x000640) 0x7C34- f:00076 d: 52 | R = OR[52]
0x0321 (0x000642) 0x000B- f:00000 d: 11 | PASS | **** non-standard encoding with D:0x000B ****
0x0322 (0x000644) 0x0200- f:00001 d: 0 | EXIT
0x0323 (0x000646) 0x0000- f:00000 d: 0 | PASS
0x0324 (0x000648) 0x0000- f:00000 d: 0 | PASS
0x0325 (0x00064A) 0x0000- f:00000 d: 0 | PASS
0x0326 (0x00064C) 0x0000- f:00000 d: 0 | PASS
0x0327 (0x00064E) 0x0000- f:00000 d: 0 | PASS
|
mul.asm | Klaus073/Assembly-language | 0 | 167099 | <filename>mul.asm
[org 0x0100]
jmp start
num1: db 5
num2 : dw 100
; If the source is a word then it is multiplied by AX and the result is stored in DX and AX.
start:
mov ax,1000
mov bx,[num2]
mul bx
; If the source is a byte then it is multiplied by AL and the result is stored in AH and AL.
mov ax,0
mov bx,0
mov ax,100
mov bl,[num1]
mul bx
mov ax, 0x4c00
int 0x21 |
oeis/134/A134400.asm | neoneye/loda-programs | 11 | 99134 | ; A134400: M * A007318, where M = triangle with (1, 1, 2, 3,...) in the main diagonal and the rest zeros.
; Submitted by <NAME>
; 1,1,1,2,4,2,3,9,9,3,4,16,24,16,4,5,25,50,50,25,5,6,36,90,120,90,36,6,7,49,147,245,245,147,49,7,8,64,224,448,560,448,224,64,8,9,81,324,756,1134,1134,756,324,81,9
pow $1,$0
lpb $0
add $1,1
add $1,$2
add $2,1
sub $0,$2
bin $1,$0
mul $1,$2
lpe
mov $0,$1
|
Universe/Trunc/Universal.agda | sattlerc/HoTT-Agda | 0 | 5856 | {-# OPTIONS --without-K #-}
{- After a few preliminary lemmata about representing dependent functions,
this module will derive the dependent universal property of
our truncations (defined later) from the non-dependent one. -}
module Universe.Trunc.Universal where
open import lib.Basics
open import lib.Equivalences2
open import lib.NType2
open import lib.types.Pi
open import lib.types.Sigma
open import lib.types.Unit
open import Universe.Utility.General
open import Universe.Utility.TruncUniverse
-- In the fibration fst : Σ A B → A, the fiber over a is given by B a.
trivial-fibers : ∀ {i j} {A : Type i} {B : A → Type j} (a : A)
→ B a ≃ Σ (Σ A B) (λ s → a == fst s)
trivial-fibers {A = A} {B} a =
B a ≃⟨ Σ₁-Unit ⁻¹ ⟩
Σ ⊤ (λ _ → B a) ≃⟨ equiv-Σ-fst _ (snd (e ⁻¹)) ⟩
Σ (Σ A (λ s → a == s)) (B ∘ fst) ≃⟨ Σ-comm-snd ⟩
Σ (Σ A B) (λ s → a == fst s) ≃∎ where
e : Σ A (λ s → a == s) ≃ ⊤
e = contr-equiv-Unit (pathfrom-is-contr a)
{- Liftings of u : Π A B through fst : {a : A} → Σ (B a) (C a) → B a
correponds to dependent functions from (a : A) to C a (u a).
As mentioned in the article, we will make use only of a special case:
liftings of u : A → B through fst : Σ B C → B correponds to
dependent functions from (a : A) to C a. -}
Π-as-liftings : ∀ {i j k} {A : Type i} {B : A → Type j}
(u : Π A B) {C : (a : A) → B a → Type k} → _
Π-as-liftings {A = A} {B} u {C} =
Π A (λ a → C a (u a))
≃⟨ trivial-fibers u ⟩
Σ (Σ (Π A B) (λ r → Π A (λ a → C a (r a)))) (λ {(r , _) → u == r})
≃⟨ equiv-Σ-fst _ (snd choice) ⁻¹ ⟩
Σ (Π A (λ a → Σ (B a) (C a))) (λ s → u == fst ∘ s)
≃∎
{- Dependent functions from (a : A) to B a
are given by sections of fst : Σ A B → A.
Noting that sections are non-dependent functions, this folklore insight
is a main ingredient in passing from non-dependent universal property
to the dependent one. -}
Π-as-sections : ∀ {i j} {A : Type i} {B : A → Type j}
→ Π A B ≃ Σ (A → Σ A B) (λ s → idf _ == fst ∘ s)
Π-as-sections = Π-as-liftings (idf _)
{- Fix a truncation level n and a Type A. We will examine what it means
for an n-type 'type' with constructor cons : A → ⟦ type ⟧
to have the universal property of the n-truncation of A. -}
module _ {i} {n : ℕ₋₂} {A : Type i}
(type : n -Type i) (cons : A → ⟦ type ⟧) where
-- *** Definition 6.2 ***
{- The (non-dependent) universal property:
λ f → f ∘ cons induces equivalence (type → X) ≃ (A → X) -}
univ-Type : ∀ (k : ULevel) → Type (i ⊔ lsucc k)
univ-Type k = (X : n -Type k) → is-equiv
{A = ⟦ type ⟧ → ⟦ X ⟧}
{B = A → ⟦ X ⟧}
(λ f → f ∘ cons)
{- The dependent universal property:
λ f → f ∘ cons induces ((a : type) → X a) ≃ ((a : A) → X (cons a)) -}
duniv-Type : ∀ (k : ULevel) → Type (i ⊔ lsucc k)
duniv-Type k = (X : ⟦ type ⟧ → n -Type k) → is-equiv
{A = Π ⟦ type ⟧ (⟦_⟧ ∘ X )}
{B = Π A (⟦_⟧ ∘ X ∘ cons)}
(λ f → f ∘ cons)
{- If the universal property holds for a certain elimination universe U_j₂,
then also for an elimination universe U_j₁ with j₁ ≤ j₂.
Agda does not support specifying ordering relations between
universe levels directly, but we may simulate j₁ ≤ j₂
by decomposing j₁ = k₁ and j₂ = k₁ ⊔ k₂. -}
univ-lower : ∀ {k₁} (k₂ : ULevel) → univ-Type (k₁ ⊔ k₂) → univ-Type k₁
univ-lower {k₁} k₂ univ X = transport (λ z → is-equiv (λ f → z ∘ f ∘ cons))
(λ= (<–-inv-r e)) hup where
e : Lift {j = k₁ ⊔ k₂} ⟦ X ⟧ ≃ ⟦ X ⟧
e = lift-equiv
hup : is-equiv (λ f → –> e ∘ <– e ∘ f ∘ cons)
hup = pre∘-is-equiv (snd e)
∘ise univ (Lift-≤ X)
∘ise pre∘-is-equiv (snd (e ⁻¹))
-- *** Lemma 6.6 ***
{- We will now prove the main lemma of this section:
The (non-dependent) universal property implies the dependent one. -}
module with-univ {j} (univ : univ-Type (i ⊔ j)) (P : ⟦ type ⟧ → n -Type j) where
-- abbreviating the underlying types (for readability)
T = ⟦ type ⟧
Q = ⟦_⟧ ∘ P
{- As is usual for deriving dependent eliminators, the crux for deriving
the dependent universal property is to first transform the *dependent*
function spaces into *non-dependent* sections/liftings according to
the lemmata above. -}
eqv : Π T Q ≃ Π A (Q ∘ cons)
eqv = Π-as-liftings cons ⁻¹ ∘e eqv-liftings ∘e Π-as-liftings (idf _) where
{- Our goal now is an equivalence of Σ-types where the first components
fit the template of the *non-dependent* universal property. -}
eqv-liftings : Σ (T → Σ T Q) (λ s → idf _ == fst ∘ s)
≃ Σ (A → Σ T Q) (λ t → cons == fst ∘ t)
eqv-liftings = equiv-Σ' (_ , univ (Σ-≤ type P)) lem where
{- What remains is just the universal property applied to X itself,
and then switching to path spaces. In the usual derivation of
dependent elimination, this corresponds to application of
the η-rule to the identity function. -}
lem : (s : T → Σ T Q) → (idf _ == fst ∘ s) ≃ (cons == fst ∘ s ∘ cons)
lem s = equiv-ap (_ , univ-lower (i ⊔ j) univ type) (idf _) (fst ∘ s)
{- Due to construction of the above equivalence via conjugation of
the (non-dependent) universal property (on the first component),
its action ends up being precisely composition with the constructor.
Because of technical limitations of the Agda type-checker,
we encapsulate the result in an abstract block to prevent
the type checker from unnecessarily unfolding its value later on. -}
abstract
duniv : is-equiv (λ (f : ⟦ Π-≤ ⟦ type ⟧ P ⟧) → f ∘ cons)
duniv = snd eqv
|
test/Succeed/fol-theorems/Definition06.agda | asr/apia | 10 | 10352 | <reponame>asr/apia<gh_stars>1-10
------------------------------------------------------------------------------
-- Testing the translation of definitions
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-# OPTIONS --without-K #-}
module Definition06 where
postulate
D : Set
_≡_ : D → D → Set
a c : D
b : D
b = a
{-# ATP definition b #-}
postulate
foo : c ≡ b
-- We test the use of an ATP definition by a local hint.
postulate bar : c ≡ a
{-# ATP prove bar foo #-}
|
examples/usart-puts-test.asm | TPKato/pAVRlib | 0 | 164923 | ;;; Test program of usart-puts.asm
;;- This program sends "Hello, World!" and "Bye." via USART.
;;; ------------------------------------------------------------
;;; Define your device in device.inc or use
;;; .include "m8def.inc"
;;; and so on as usual.
.include "device.inc"
;;; ------------------------------------------------------------
RESET:
ldi r16, high(RAMEND)
out SPH, r16
ldi r16, low(RAMEND)
out SPL, r16
rcall USART_INITIALIZE
ldi r25, high(STR_HELLO)
ldi r24, low (STR_HELLO)
rcall USART_PUTS
ldi r25, high(STR_BYE)
ldi r24, low (STR_BYE)
rcall USART_PUTS
LOOP:
rjmp LOOP
STR_HELLO: .db "Hello, World!", 0x0d, 0x0a, 0
STR_BYE: .db "Bye.", 0x0d, 0x0a, 0, 0
.include "usart.asm"
.include "usart-puts.asm"
|
programs/oeis/228/A228138.asm | jmorken/loda | 1 | 166698 | <filename>programs/oeis/228/A228138.asm
; A228138: Number of blocks in a Steiner system S(2, 4, A228137(n+1)).
; 4,13,20,50,63,111,130,196,221,305,336,438,475,595,638,776,825,981,1036,1210,1271,1463,1530,1740,1813,2041,2120,2366,2451,2715,2806,3088,3185,3485,3588,3906,4015,4351,4466,4820,4941,5313,5440,5830,5963,6371,6510,6936,7081,7525,7676,8138,8295,8775,8938,9436,9605,10121,10296,10830,11011,11563,11750,12320,12513,13101,13300,13906,14111,14735,14946,15588,15805,16465,16688,17366,17595,18291,18526,19240,19481,20213,20460,21210,21463,22231,22490,23276,23541,24345,24616,25438,25715,26555,26838,27696,27985,28861,29156,30050,30351,31263,31570,32500,32813,33761,34080,35046,35371,36355,36686,37688,38025,39045,39388,40426,40775,41831,42186,43260,43621,44713,45080,46190,46563,47691,48070,49216,49601,50765,51156,52338,52735,53935,54338,55556,55965,57201,57616,58870,59291,60563,60990,62280,62713,64021,64460,65786,66231,67575,68026,69388,69845,71225,71688,73086,73555,74971,75446,76880,77361,78813,79300,80770,81263,82751,83250,84756,85261,86785,87296,88838,89355,90915,91438,93016,93545,95141,95676,97290,97831,99463,100010,101660,102213,103881,104440,106126,106691,108395,108966,110688,111265,113005,113588,115346,115935,117711,118306,120100,120701,122513,123120,124950,125563,127411,128030,129896,130521,132405,133036,134938,135575,137495,138138,140076,140725,142681,143336,145310,145971,147963,148630,150640,151313,153341,154020,156066,156751,158815,159506,161588,162285,164385,165088,167206,167915,170051,170766,172920,173641,175813,176540,178730,179463,181671,182410,184636,185381,187625
mov $1,$0
add $1,$0
add $1,1
mov $2,$0
mov $3,$0
mov $4,$0
lpb $0
sub $0,1
trn $0,1
add $2,2
add $4,$2
mov $2,$1
mul $2,2
add $2,$1
lpe
add $4,5
add $1,$4
add $1,4
lpb $3
add $1,3
sub $3,1
lpe
sub $1,6
|
boot/lib/func_print.asm | holloway87/learning-os-development | 0 | 168152 | ; Print a null terminated string, start address in bx
func_print:
pusha
func_print_loop:
mov cl, [bx]
cmp cl, 0
je func_print_done
mov ah, 0x0e
mov al, [bx]
int 0x10
add bx, 1
jmp func_print_loop
func_print_done:
popa
ret
|
src/demologic.adb | Kidev/DemoAdaPhysics2D | 5 | 27886 | <filename>src/demologic.adb
with HAL.Touch_Panel; use HAL.Touch_Panel;
with STM32.Board; use STM32.Board;
with STM32.GPIO; use STM32.GPIO;
with STM32.User_Button; use STM32;
with L3GD20; use L3GD20;
with Circles;
with Rectangles;
with HAL.Bitmap; use HAL.Bitmap;
with BMP_Fonts;
package body DemoLogic is
function Inputs(W : in out World; Frozen : in out Boolean;
Cooldown : Integer; Cue : in out VisualCue) return Boolean
is
State : constant TP_State := Touch_Panel.Get_All_Touch_Points;
Axes : L3GD20.Angle_Rates;
Shaked : Boolean := False;
PushVec : Vec2D := (0.0, 0.0);
Threshold : constant Angle_Rate := 100;
Multiplier : constant Float := 0.02;
begin
CurWorld := W;
Get_Raw_Angle_Rates (Gyro, Axes);
Cue := VisualCue'(0, 0, -1, EntCircle, EntCreatorMat, EntLinkerSelected);
-- User button
if User_Button.Has_Been_Pressed then
Mode := Modes'Val((Modes'Pos(Mode) + 1) mod (Modes'Pos(Modes'Last) + 1));
ModeActions(Frozen);
if Mode = M_Frozen then
ShowActionMenu;
if Quit then
Cue := VisualCue'(-1, -1, -1, EntCircle, EntCreatorMat, null);
return False;
end if;
Mode := Modes'Val((Modes'Pos(Mode) + 1) mod (Modes'Pos(Modes'Last) + 1));
ModeActions(Frozen);
end if;
end if;
-- Entity creator
if Cooldown = 0 then
if State'Length >= 1 then
Hold := Natural'Min(Hold + 1, MaxHold);
LastX := State(State'First).X;
LastY := State(State'First).Y;
if LastX > 0 and LastY > 0 and Hold > 0 then
DisplayEntity(LastX, LastY, Hold, Cue);
end if;
elsif Hold > 0 then
if LastX > 0 and LastY > 0 and Hold > 0 then
CreateEntity(W, LastX, LastY, Hold);
end if;
Hold := 0;
return True;
end if;
elsif State'Length >= 1 then
Hold := Natural'Min(Hold + 1, MaxHold);
LastX := State(State'First).X;
LastY := State(State'First).Y;
if LastX > 0 and LastY > 0 and Hold > 0 then
DisplayEntity(LastX, LastY, Hold, Cue);
end if;
end if;
-- Gyro
if Cooldown = 0 then
PushVec := (0.0, 0.0);
if abs Axes.X >= Threshold then
Shaked := True;
PushVec.y := PushVec.y + Float(Axes.X);
end if;
if abs Axes.Y >= Threshold then
Shaked := True;
PushVec.x := PushVec.x + Float(Axes.Y);
end if;
if Shaked then
declare
use EntsList;
Curs : EntsList.Cursor := W.GetEntities.First;
E : EntityClassAcc;
begin
while Curs /= EntsList.No_Element loop
E := EntsList.Element(Curs);
E.all.ApplyForce(PushVec * E.Mass * Multiplier);
Curs := EntsList.Next(Curs);
end loop;
end;
return True;
end if;
end if;
return False;
end Inputs;
procedure ModeActions(Frozen : in out Boolean)
is
begin
EntLinkerSelected := null;
if Mode = M_Frozen then
Frozen := True;
else
Frozen := False;
end if;
case Mode is
when M_Disabled => SetLEDs(False, False);
when M_Rectangle | M_Circle => SetLEDs(False, True);
when M_Frozen => SetLEDs(False, False);
when M_Link => SetLEDs(True, True);
when M_Edit => SetLEDs(True, False);
end case;
end ModeActions;
procedure SetLEDs(R, G : Boolean) is
begin
if R then Turn_On(Red_LED); else Turn_Off(Red_LED); end if;
if G then Turn_On(Green_LED); else Turn_Off(Green_LED); end if;
end SetLEDs;
procedure ShowActionMenu is
ActionMenu : Menu;
begin
ActionMenu.Init(Black, White, BMP_Fonts.Font12x12, Menu_Static);
ActionMenu.AddItem(GetGravityStr, (40, 200, 40, 80), ToggleGravity'Access);
ActionMenu.AddItem("C:" & GetMatName(EntCreatorMat), GotoNextSolidMat'Access);
ActionMenu.AddItem("E:" & GetMatName(EntEditorMat), GotoNextMat'Access);
ActionMenu.AddItem("L:" & GetLinkTypeName(EntLinkerType), GotoNextLinkType'Access);
ActionMenu.AddItem("QUIT", QuitDemo'Access);
ActionMenu.Show;
ActionMenu.Listen;
end ShowActionMenu;
procedure QuitDemo(This : in out Menu) is
begin
This.MenuType := Menu_Default;
Quit := True;
end QuitDemo;
procedure ToggleGravity(This : in out Menu) is
use EntsList;
E : EntityClassAcc;
Curs : EntsList.Cursor := CurWorld.Entities.First;
Grav : constant Vec2D := (0.0, (if GlobalGravity.y = 0.0 then 9.81 else 0.0));
begin
GlobalGravity := Grav;
This.ChangeText(0, GetGravityStr);
while Curs /= EntsList.No_Element loop
E := EntsList.Element(Curs);
E.all.SetGravity(Grav);
Curs := EntsList.Next(Curs);
end loop;
end ToggleGravity;
procedure CreateEntity(W : in out World; X, Y : Integer; H : Natural)
is
begin
case Mode is
when M_Circle => CreateCircle(W, X, Y, H);
when M_Rectangle => CreateRectangle(W, X, Y, H);
when M_Disabled => null;
when M_Frozen => null;
when M_Link => TryToLinkAt(W, X, Y);
when M_Edit => TryToEditAt(W, X, Y);
end case;
end CreateEntity;
procedure TryToLinkAt(W : in out World; X, Y : Integer)
is
Pos : constant Vec2D := (Float(X), Float(Y));
Ent : constant EntityClassAcc := W.GetClosest(Pos, SM_Entity);
begin
if Ent = null then
EntLinkerSelected := null;
elsif EntLinkerSelected = null then
EntLinkerSelected := Ent;
elsif Ent /= EntLinkerSelected then
W.LinkEntities(EntLinkerSelected, Ent, EntLinkerType);
EntLinkerSelected := null;
else
EntLinkerSelected := null;
end if;
end TryToLinkAt;
procedure TryToEditAt(W : in out World; X, Y : Integer)
is
Pos : constant Vec2D := (Float(X), Float(Y));
Ent : EntityClassAcc := null;
begin
if EntEditorMat = VACUUM then
Ent := W.GetClosest(Pos, SM_All);
elsif IsSolidMaterial(EntEditorMat) then
Ent := W.GetClosest(Pos, SM_Entity);
else
Ent := W.GetClosest(Pos, SM_Environment);
end if;
if Ent /= null then
if IsSolidMaterial(Ent.Mat) and EntEditorMat = VACUUM then
W.RemoveEntity(Ent, True);
else
Ent.ChangeMaterial(EntEditorMat);
end if;
end if;
end TryToEditAt;
procedure DisplayEntity(X, Y : Integer; H : Natural; Cue : in out VisualCue)
is
begin
case Mode is
when M_Circle => Cue := VisualCue'(X, Y, H, EntCircle, EntCreatorMat, EntLinkerSelected);
when M_Rectangle => Cue := VisualCue'(X, Y, H, EntRectangle, EntCreatorMat, EntLinkerSelected);
when M_Disabled | M_Frozen | M_Link | M_Edit => null;
end case;
end DisplayEntity;
procedure CreateCircle(W : in out World; X, Y : Integer; H : Natural)
is
C : EntityClassAcc;
VecZero : constant Vec2D := (0.0, 0.0);
VecPos : constant Vec2D := (Float(X), Float(Y));
begin
C := Circles.Create(VecPos, VecZero, GlobalGravity, Float(H), EntCreatorMat);
W.AddEntity(C);
end CreateCircle;
procedure CreateRectangle(W : in out World; X, Y : Integer; H : Natural)
is
R : EntityClassAcc;
VecZero : constant Vec2D := (0.0, 0.0);
VecPos : constant Vec2D := (Float(X), Float(Y));
begin
R := Rectangles.Create(VecPos, VecZero, GlobalGravity, (Float(H), Float(H)) * 1.0, EntCreatorMat);
W.AddEntity(R);
end CreateRectangle;
function GetMatName(This : Material) return String
is
StrMat : constant String := MaterialType'Image(This.MType);
begin
return StrMat(StrMat'First + 2 .. StrMat'Last);
end GetMatName;
function GetLinkTypeName(This : LinkTypes) return String
is
StrType : constant String := LinkTypes'Image(This);
begin
return StrType(StrType'First + 2 .. StrType'Last);
end GetLinkTypeName;
function GetGravityStr return String
is
begin
if GlobalGravity.y = 0.0 then
return "GRAVITY OFF";
end if;
return "GRAVITY ON";
end GetGravityStr;
procedure GotoNextSolidMat(This : in out Menu) is
begin
case EntCreatorMat.MType is
when MTConcrete => EntCreatorMat := WOOD;
when MTWood => EntCreatorMat := STEEL;
when MTSteel => EntCreatorMat := RUBBER;
when MTRubber => EntCreatorMat := ICE;
when MTIce => EntCreatorMat := BALLOON;
when MTBalloon => EntCreatorMat := STATIC;
when MTStatic => EntCreatorMat := CONCRETE;
when others => EntCreatorMat := RUBBER;
end case;
This.ChangeText(1, "C:" & GetMatName(EntCreatorMat));
end GotoNextSolidMat;
procedure GotoNextMat(This : in out Menu) is
begin
case EntEditorMat.MType is
when ETVacuum => EntEditorMat := AIR;
when ETAir => EntEditorMat := WATER;
when ETWater => EntEditorMat := CONCRETE;
when MTConcrete => EntEditorMat := WOOD;
when MTWood => EntEditorMat := STEEL;
when MTSteel => EntEditorMat := RUBBER;
when MTRubber => EntEditorMat := ICE;
when MTIce => EntEditorMat := BALLOON;
when MTBalloon => EntEditorMat := STATIC;
when MTStatic => EntEditorMat := VACUUM;
end case;
This.ChangeText(2, "E:" & GetMatName(EntEditorMat));
end GotoNextMat;
procedure GotoNextLinkType(This : in out Menu) is
begin
EntLinkerType := LinkTypes'Val((LinkTypes'Pos(EntLinkerType) + 1) mod (LinkTypes'Pos(LinkTypes'Last) + 1));
This.ChangeText(3, "L:" & GetLinkTypeName(EntLinkerType));
end GotoNextLinkType;
end DemoLogic;
|
programs/oeis/002/A002328.asm | neoneye/loda | 22 | 87616 | <filename>programs/oeis/002/A002328.asm<gh_stars>10-100
; A002328: Numbers n such that n^2 - n - 1 is prime.
; 3,4,5,6,7,9,10,11,12,14,16,17,20,21,22,25,27,29,31,32,36,39,40,42,45,46,47,49,51,54,55,56,57,60,61,65,66,67,69,71,77,84,86,87,90,94,95,97,101,102,104,115,116,121,126,127,131,132,135,139,141,142,145,146,149,150,154,155,156,159,160,161,164,165,170,172,175,177,181,182,185,187,189,192,194,196,197,200,204,207,210,216,219,220,221,226,231,232,234,237
seq $0,89362 ; Numbers n such that n^2 - 5n + 5 is prime.
sub $0,2
|
Cubical/Algebra/CommRing/QuotientRing.agda | xekoukou/cubical | 0 | 7551 | <reponame>xekoukou/cubical
{-# OPTIONS --safe #-}
module Cubical.Algebra.CommRing.QuotientRing where
open import Cubical.Foundations.Prelude
open import Cubical.Data.Nat
open import Cubical.Data.FinData
open import Cubical.HITs.SetQuotients as SQ renaming (_/_ to _/sq_)
open import Cubical.HITs.PropositionalTruncation as PT
open import Cubical.Algebra.CommRing
open import Cubical.Algebra.CommRing.Ideal
open import Cubical.Algebra.CommRing.FGIdeal
open import Cubical.Algebra.Ring
open import Cubical.Algebra.Ring.QuotientRing renaming (_/_ to _/Ring_) hiding (asRing)
private
variable
ℓ ℓ' : Level
_/_ : (R : CommRing ℓ) → (I : IdealsIn R) → CommRing ℓ
R / I =
fst asRing , commringstr _ _ _ _ _
(iscommring (RingStr.isRing (snd asRing))
(elimProp2 (λ _ _ → squash/ _ _)
commEq))
where
asRing = (CommRing→Ring R) /Ring (CommIdeal→Ideal I)
_·/_ : fst asRing → fst asRing → fst asRing
_·/_ = RingStr._·_ (snd asRing)
commEq : (x y : fst R) → ([ x ] ·/ [ y ]) ≡ ([ y ] ·/ [ x ])
commEq x y i = [ CommRingStr.·Comm (snd R) x y i ]
[_]/ : {R : CommRing ℓ} {I : IdealsIn R} → (a : fst R) → fst (R / I)
[ a ]/ = [ a ]
--
module Quotient-FGideal-CommRing-Ring
(A'@(A , Ar) : CommRing ℓ)
(B'@(B , Br) : Ring ℓ')
(g'@(g , gr) : RingHom (CommRing→Ring A') B')
where
open CommRingStr Ar using ()
renaming
( 0r to 0A
; 1r to 1A
; _+_ to _+A_
; -_ to -A_
; _·_ to _·A_ )
open RingStr Br using ()
renaming
( 0r to 0B
; 1r to 1B
; _+_ to _+B_
; -_ to -B_
; _·_ to _·B_
; +Lid to +BIdL
; is-set to isSetB)
open CommRingStr
open IsRingHom
module _
{n : ℕ}
(v : FinVec A n)
(gnull : (k : Fin n) → g ( v k) ≡ 0B)
where
f : RingHom (CommRing→Ring (A' / (generatedIdeal _ v))) B'
fst f = SQ.rec (isSetB)
g
λ a b → PT.rec (isSetB _ _)
λ x → g a ≡⟨ cong g (sym (+Rid Ar a)) ⟩
g (a +A 0A) ≡⟨ cong (λ X → g (a +A X)) (sym (snd (+Inv Ar b))) ⟩
g (a +A ((-A b) +A b)) ≡⟨ cong g (+Assoc Ar a (-A b) b) ⟩
g ((a +A -A b) +A b) ≡⟨ pres+ gr (a +A -A b) b ⟩
(g(a +A -A b) +B g b) ≡⟨ cong (λ X → g X +B g b) (snd x) ⟩
(g (linearCombination A' (fst x) v) +B g b) ≡⟨ cong (λ X → X +B g b) (cancelLinearCombination A' B' g' n (fst x) v gnull) ⟩
0B +B g b ≡⟨ +BIdL (g b) ⟩
g b ∎
snd f = makeIsRingHom
(pres1 gr)
(elimProp (λ x p q i y j → isSetB _ _ (p y) (q y) i j)
λ a → elimProp (λ _ → isSetB _ _)
λ a' → pres+ gr a a')
(elimProp (λ x p q i y j → isSetB _ _ (p y) (q y) i j)
λ a → elimProp (λ _ → isSetB _ _)
λ a' → pres· gr a a')
module Quotient-FGideal-CommRing-CommRing
(A'@(A , Ar) : CommRing ℓ)
(B'@(B , Br) : CommRing ℓ')
(g'@(g , gr) : CommRingHom A' B')
{n : ℕ}
(v : FinVec A n)
(gnull : (k : Fin n) → g ( v k) ≡ CommRingStr.0r (snd B'))
where
f : CommRingHom (A' / (generatedIdeal _ v)) B'
f = Quotient-FGideal-CommRing-Ring.f A' (CommRing→Ring B') g' v gnull
|
oeis/083/A083425.asm | neoneye/loda-programs | 11 | 177732 | ; A083425: a(n) = (5*5^n + (-1)^n)/6.
; 1,4,21,104,521,2604,13021,65104,325521,1627604,8138021,40690104,203450521,1017252604,5086263021,25431315104,127156575521,635782877604,3178914388021,15894571940104,79472859700521,397364298502604,1986821492513021,9934107462565104,49670537312825521,248352686564127604,1241763432820638021,6208817164103190104,31044085820515950521,155220429102579752604,776102145512898763021,3880510727564493815104,19402553637822469075521,97012768189112345377604,485063840945561726888021,2425319204727808634440104
mov $1,5
pow $1,$0
mul $1,5
sub $1,5
div $1,6
add $1,1
mov $0,$1
|
Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xa0_notsx.log_21829_1342.asm | ljhsiun2/medusa | 9 | 11627 | .global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r13
push %r14
push %r15
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WC_ht+0x194a1, %r13
nop
and $40125, %r11
vmovups (%r13), %ymm3
vextracti128 $0, %ymm3, %xmm3
vpextrq $1, %xmm3, %rsi
nop
nop
nop
nop
nop
cmp $24458, %rbx
lea addresses_UC_ht+0x105e1, %r15
sub %r14, %r14
movb (%r15), %dl
nop
nop
nop
nop
nop
add $48943, %rbx
lea addresses_WC_ht+0x6e1, %rdx
nop
nop
nop
nop
nop
sub %rsi, %rsi
mov (%rdx), %r14
nop
nop
nop
nop
nop
cmp $57326, %rdx
lea addresses_WT_ht+0xf271, %r13
nop
nop
nop
add %r15, %r15
movl $0x61626364, (%r13)
nop
nop
nop
nop
sub %r15, %r15
lea addresses_A_ht+0x52e1, %rsi
lea addresses_normal_ht+0x14ae1, %rdi
clflush (%rsi)
nop
cmp $47734, %r15
mov $30, %rcx
rep movsl
sub %rdx, %rdx
lea addresses_WC_ht+0xace1, %rsi
lea addresses_normal_ht+0xdab9, %rdi
clflush (%rdi)
nop
nop
nop
inc %r13
mov $94, %rcx
rep movsl
nop
nop
nop
cmp $62641, %rdx
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %r15
pop %r14
pop %r13
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r12
push %r14
push %r9
push %rax
push %rdx
// Store
lea addresses_UC+0xd209, %r11
cmp $30100, %rax
movl $0x51525354, (%r11)
nop
nop
nop
nop
nop
add $62309, %r12
// Load
lea addresses_D+0x120e1, %r11
nop
dec %r9
mov (%r11), %dx
nop
xor $45709, %r9
// Faulty Load
mov $0x10ae3b0000000ee1, %r12
nop
nop
cmp %r14, %r14
mov (%r12), %eax
lea oracles, %r9
and $0xff, %rax
shlq $12, %rax
mov (%r9,%rax,1), %rax
pop %rdx
pop %rax
pop %r9
pop %r14
pop %r12
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_NC', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 3}}
{'src': {'type': 'addresses_D', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 9}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'type': 'addresses_NC', 'AVXalign': False, 'size': 4, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 6}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 5}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 7}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 3}}
{'src': {'type': 'addresses_A_ht', 'congruent': 9, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 8, 'same': False}}
{'src': {'type': 'addresses_WC_ht', 'congruent': 9, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 3, 'same': False}}
{'00': 21829}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
|
source/web/spikedog/core/matreshka-servlet_http_responses.ads | svn2github/matreshka | 24 | 23060 | <reponame>svn2github/matreshka
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Web Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2014-2015, <NAME> <<EMAIL>> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
-- This package provides base tagged type to build server specific HTTP
-- response objects.
------------------------------------------------------------------------------
with Matreshka.Servlet_HTTP_Requests;
with Servlet.HTTP_Responses;
package Matreshka.Servlet_HTTP_Responses is
pragma Preelaborate;
type Abstract_HTTP_Servlet_Response is abstract
limited new Servlet.HTTP_Responses.HTTP_Servlet_Response with private;
type HTTP_Servlet_Response_Access is
access all Abstract_HTTP_Servlet_Response'Class;
procedure Initialize
(Self : in out Abstract_HTTP_Servlet_Response'Class;
Request :
not null Matreshka.Servlet_HTTP_Requests.HTTP_Servlet_Request_Access);
procedure Set_Session_Cookie
(Self : in out Abstract_HTTP_Servlet_Response'Class);
-- Sets HTTP session cookie when necessary.
overriding function Get_Status
(Self : Abstract_HTTP_Servlet_Response)
return Servlet.HTTP_Responses.Status_Code;
-- Gets the current status code of this response.
overriding procedure Set_Status
(Self : in out Abstract_HTTP_Servlet_Response;
Status : Servlet.HTTP_Responses.Status_Code);
-- Sets the status code for this response.
private
type Abstract_HTTP_Servlet_Response is abstract
limited new Servlet.HTTP_Responses.HTTP_Servlet_Response with record
Status : Servlet.HTTP_Responses.Status_Code
:= Servlet.HTTP_Responses.Internal_Server_Error;
Request : Matreshka.Servlet_HTTP_Requests.HTTP_Servlet_Request_Access;
end record;
end Matreshka.Servlet_HTTP_Responses;
|
print_digits_macos.asm | Farzy/fant-asm | 0 | 24347 | <reponame>Farzy/fant-asm<filename>print_digits_macos.asm
section .bss
var1: resb 20
section .text
global _main
default rel
_main:
mov eax, 73651
int_to_string:
xor ebx, ebx ; digit counter
mov ecx, 10 ; divisor
.push_chars:
xor edx, edx
div ecx
add edx, '0'
push rdx ; push edx did not work on the online nasm compiler
inc ebx
test eax, eax
jnz .push_chars
lea rdi, [var1] ; store digits here
mov edx, ebx ; save string length
inc edx ; add 1 for \n
.pop_chars:
pop rax
stosb
dec ebx
test ebx, ebx
jnz .pop_chars
mov eax, 10 ; \n
stosb
mov rax, 0x02000004 ; system call for write
mov rdi, 1 ; file handle 1 is stdout
lea rsi, [var1] ; address of string to output
; number of bytes is already in RDX
syscall ; invoke operating system to do the write
mov rax, 0x02000001 ; system call for exit
xor rdi, rdi ; exit code 0
syscall ; invoke operating system to exit
|
libsrc/graphics/closegfx.asm | meesokim/z88dk | 0 | 177912 | ;
; Z88 Graphics Functions - Small C+ stubs
;
; Written around the Interlogic Standard Library
;
; Stubs Written by <NAME> - 30/9/98
;
;
; $Id: closegfx.asm,v 1.6 2015/01/19 01:32:46 pauloscustodio Exp $
;
;Usage: closegfx(struct *window)
;
;Close the map screen and restore memory map to normal
INCLUDE "graphics/grafix.inc" ; Contains fn defs
INCLUDE "map.def"
PUBLIC closegfx
; XREF oldozbank
.closegfx
pop bc
pop ix ;y
push ix
push bc
;Restore old bindings
; ld a,(oldozbank)
; ld (map_bk),a
; out (map_bk-$400),a
ld a,(ix+windnum)
ld bc,mp_del
call_oz(os_map)
ld hl,0 ;NULL=success
ret
|
src/Mystuff.agda | tetrapharmakon/agda-categories | 0 | 15965 |
module Mystuff where
-- open import Axiom.Extensionality.Propositional as AEP
open import Categories.Category.Cartesian.Bundle
open import Categories.Category.CartesianClosed.Canonical
open import Categories.Category.Core
open import Categories.Category.Slice
-- open import Categories.Functor
open import Categories.Category.BinaryProducts
-- open import Categories.Morphism
open import Categories.Object.Exponential -- 𝒞 hiding (repack)
open import Data.Product
open import Function using (const)
open import Level
open import Relation.Binary.Core using (Rel)
open import Relation.Binary.PropositionalEquality
open Relation.Binary.PropositionalEquality.≡-Reasoning
private
variable
a b c d e : Level
-- so painful
_⋆_ : ∀ {A : Set a} {B : A → Set b} {C : {x : A} → B x → Set c} →
(∀ {x} (y : B x) → C y) → (g : (x : A) → B x) →
((x : A) → C (g x))
f ⋆ g = λ x → f (g x)
simple : Category (suc zero) zero zero
simple =
record
-- structure
{ Obj = Set × Set
; _⇒_ = _⇒_
; _≈_ = _≡_
; id = (λ z → z) , proj₁
; _∘_ = _∘_
-- properties
; assoc = refl
; sym-assoc = refl
; identityˡ = refl
; identityʳ = refl
; identity² = refl
-- whew, they're all trivial!
; equiv = record { refl = refl ; sym = sym ; trans = trans }
; ∘-resp-≈ = ∘-resp
}
where
_⇒_ : Rel (Set × Set) zero
(i , x) ⇒ (j , y) = (i → j) × (x × i → y)
_∘_ : {A B C : Set × Set} → B ⇒ C → A ⇒ B → A ⇒ C
_∘_ {i , x} {j , y} {_} (u , f) (v , g) =
(λ t → u (v t)) , λ t → f (g t , v (proj₂ t))
∘-resp :
{A B C : Set × Set} {f h : B ⇒ C} {g i : A ⇒ B} →
--------------------------------------------------
f ≡ h → g ≡ i → (f ∘ g) ≡ (h ∘ i)
∘-resp {A} {B} {C} {f} {h} {g} {i} x y =
trans (cong (λ t → t ∘ g) x) (cong (λ t → h ∘ t) y)
data t : Set where
⊤ : t
!-unique-lemma : ∀ (x : t) → ⊤ ≡ x
!-unique-lemma ⊤ = refl
postulate
-- I'm lazy.
respSetC : {A B C : Set} {f h : B → C} {g i : A → B} →
f ≡ h →
g ≡ i →
(λ a → f (g a)) ≡ (λ a → h (i a))
extensionality : ∀ {A B : Set} {f g : A → B} →
(∀ (x : A) → f x ≡ g x) →
f ≡ g
-- I need the category of Sets...
SetC : Category (suc zero) zero zero
SetC =
record
{ Obj = Set
; _⇒_ = λ x y → x → y
; _≈_ = _≡_
; id = λ x → x
; _∘_ = λ f g a → f (g a)
; assoc = refl
; sym-assoc = refl
; identityˡ = refl
; identityʳ = refl
; identity² = refl
; equiv = record { refl = refl ; sym = sym ; trans = trans }
; ∘-resp-≈ = respSetC
}
_·_ : {I : Set} {A B C : Set} → (B × I → C) → (A × I → B) → A × I → C
_·_ {I} f g (x , i) = f (g(x , i) , i)
fiber-of-simple : {I : Set} → Category (suc zero) zero zero
fiber-of-simple {I} =
record
{ Obj = Set
; _⇒_ = λ X Y → X × I → Y
; _≈_ = _≡_
; id = proj₁
; _∘_ = _·_ -- this is the Kleisli composition
; assoc = refl
; sym-assoc = refl
; identityˡ = refl
; identityʳ = refl
; identity² = refl
; equiv = record { refl = refl ; sym = sym ; trans = trans }
; ∘-resp-≈ = rresp
}
where
rresp : {A B C : Set} {f h : B × I → C} {g i : A × I → B} → f ≡ h → g ≡ i → (f · g) ≡ (h · i)
rresp {A} {B} {C} {f} {h} {g} {i} x y = trans (cong (λ t → t · g) x) (cong (_·_ h) y)
-- each fiber of a simple fibration is cartesian
fiber-of-simple-cart : ∀ {I : Set} → CartesianCategory (suc zero) zero zero
fiber-of-simple-cart {I} =
record
{ U = fiber-of-simple {I}
; cartesian =
record
{ terminal =
record { ⊤ = t
; ⊤-is-terminal =
record
{ ! = const ⊤
; !-unique =
λ f → extensionality (λ x → !-unique-lemma (f x))
}
}
; products =
record
{ product = λ {A} {B} →
record
{ A×B = A × B
; π₁ = λ x → proj₁ (proj₁ x)
; π₂ = λ x → proj₂ (proj₁ x)
; ⟨_,_⟩ = λ f g t → f t , g t
; project₁ = refl
; project₂ = refl
; unique = λ {refl refl → refl}
} } } }
-- but also the total category is cartesian.
simple-cart : CartesianCategory (suc zero) zero zero
simple-cart = record
{ U = simple
; cartesian = record
{ terminal = record { ⊤ = t , t
; ⊤-is-terminal =
record { ! = const ⊤ , const ⊤
; !-unique = bang-uniq
} }
; products = record { product = λ {A} {B} → record
{ A×B = (proj₁ A × proj₁ B) , (proj₂ A × proj₂ B)
; π₁ = proj₁ , λ x → proj₁ (proj₁ x)
; π₂ = proj₂ , (λ x → proj₂ (proj₁ x))
; ⟨_,_⟩ = ⟨_,_⟩
; project₁ = refl
; project₂ = refl
; unique = λ {refl refl → refl}
} } } }
where
bang-uniq :
{A : Category.Obj simple}
-------------------------
(f : (simple Category.⇒ A) (t , t)) →
--------------------------------------
(simple Category.≈ (const ⊤ , const ⊤)) f
bang-uniq {I , X} (u , k) =
cong₂ Data.Product._,_
(extensionality (λ x → !-unique-lemma (u x)))
(extensionality (λ x → !-unique-lemma (k x)))
⟨_,_⟩ :
{A B C : Set × Set} →
(simple Category.⇒ C) A →
(simple Category.⇒ C) B →
(simple Category.⇒ C) ((proj₁ A × proj₁ B) , (proj₂ A × proj₂ B))
⟨_,_⟩ {A0 , A1} {B0 , B1} {C0 , C1} (u , h) (v , k) =
(λ x → (u x) , (v x)) , λ x → (h x) , (k x)
fib-of-simple-ccc : {I : Set} → CartesianClosed (fiber-of-simple {I})
fib-of-simple-ccc {I} =
record
{ ⊤ = t
; _×_ = _×_
; ! = λ x → ⊤
; π₁ = proj₁ ⋆ proj₁
; π₂ = proj₂ ⋆ proj₁
; ⟨_,_⟩ = λ f g ci → (f ci) , (g ci)
; !-unique = λ f → extensionality λ x → !-unique-lemma (f x)
; π₁-comp = refl
; π₂-comp = refl
; ⟨,⟩-unique = λ {refl refl → refl}
; _^_ = λ A B → B → A
; eval = evev
; curry = λ f ci a → f (((proj₁ ci) , a) , (proj₂ ci))
; eval-comp = refl
; curry-resp-≈ = λ {refl → refl}
; curry-unique = λ {refl → refl}
}
where
evev : {B A : Category.Obj (fiber-of-simple {I})} → (fiber-of-simple {I} Category.⇒ ((A → B) × A)) B
evev ((f , a) , i) = f a
{-
the arrow category has objects the morphisms of `Set` and
morphisms the commutative squares
A → B
↓ ↓
C → D
-}
arrow : Category (suc zero) zero zero
arrow = record
{ Obj = Σ (Set × Set) (λ x → proj₁ x → proj₂ x)
; _⇒_ = arr
; _≈_ = _≡_
; id = (λ z → z) , λ z → z
; _∘_ = λ {A} {B} {C} f g → comp {A} {B} {C} f g
; assoc = refl
; sym-assoc = refl
; identityˡ = refl
; identityʳ = refl
; identity² = refl
; equiv = record { refl = refl ; sym = sym ; trans = trans }
; ∘-resp-≈ = λ {refl refl → refl}
}
where
arr : Rel (Σ (Set × Set) (λ x → proj₁ x → proj₂ x)) zero
arr ((a , b) , x1) ((c , d) , y1) = (a → c) × (b → d)
comp : {A B C : Σ (Set × Set) (λ x → proj₁ x → proj₂ x)} → arr B C → arr A B → arr A C
comp {A} {B} {C} (f0 , f1) (g0 , g1) = (λ x → f0 (g0 x)) , λ x → f1 (g1 x)
arrow-ccc : CartesianClosed arrow
arrow-ccc = record
{ ⊤ = (t , t) , (λ _ → ⊤)
; _×_ = prod
; ! = (λ _ → ⊤) , (λ _ → ⊤)
; π₁ = proj₁ , proj₁
; π₂ = proj₂ , proj₂
; ⟨_,_⟩ = λ {A} {B} {C} f g → pair {A} {B} {C} f g
; !-unique = λ {A} → bang-uniq {A}
; π₁-comp = refl
; π₂-comp = refl
; ⟨,⟩-unique = λ {refl refl → refl}
; _^_ = to-the
; eval = λ {B} {A} → ev {B} {A}
; curry = λ {C} {A} {B} x → cur {C} {A} {B} x
; eval-comp = refl
; curry-resp-≈ = λ {refl → refl}
; curry-unique = {! !}
}
where
prod : Category.Obj arrow → Category.Obj arrow → Category.Obj arrow
prod ((X , Y) , u) ((A , B) , v) =
((X × A) , (Y × B)) , λ x → (u (proj₁ x)) , (v (proj₂ x))
pair : {C A B : Category.Obj arrow} →
(arrow Category.⇒ C) A →
(arrow Category.⇒ C) B →
(arrow Category.⇒ C) (prod A B)
pair {(X , Y) , u} {(A , B) , v} {(E , F) , w} (f0 , f1) (g0 , g1) =
(λ x → (f0 x) , (g0 x)) , (λ x → (f1 x) , (g1 x))
bang-uniq : {A : Category.Obj arrow} →
(f : (arrow Category.⇒ A) ((t , t) , (λ _ → ⊤))) →
((λ _ → ⊤) , (λ _ → ⊤)) ≡ f
bang-uniq (f0 , f1) =
cong₂ _,_
(extensionality λ x → !-unique-lemma (f0 x))
(extensionality (λ x → !-unique-lemma (f1 x)))
to-the : Category.Obj arrow →
Category.Obj arrow →
Category.Obj arrow
to-the ((B0 , B1) , u) ((A0 , A1) , v) =
(p , (A1 → B1)) , (λ x a1 → proj₂ (proj₁ x) a1)
where
p : Set
p = Σ ((A0 → B0) × (A1 → B1)) (λ r → (λ x → u ((proj₁ r) x)) ≡ (λ x → (proj₂ r) (v x)))
-- ^ it's the pullback-hom
-- λ x → u (s x) ≡ λ x → t (v x)
ev : {B A : Category.Obj arrow} → (arrow Category.⇒ prod (to-the B A) A) B
ev {(B0 , B1) , u} {(A0 , A1) , v} = dis , dat
where
dis : proj₁ (proj₁ (prod (to-the ((B0 , B1) , u) ((A0 , A1) , v)) ((A0 , A1) , v))) → B0
dis ((d , p) , a0) = (proj₁ d) a0
dat : proj₂ (proj₁ (prod (to-the ((B0 , B1) , u) ((A0 , A1) , v)) ((A0 , A1) , v))) → B1
dat (fst , snd) = fst snd
cur : {C A B : Category.Obj arrow} →
(arrow Category.⇒ (prod C A)) B →
(arrow Category.⇒ C) (to-the B A)
cur {(C0 , C1) , u} {(A0 , A1) , v} {(B0 , B1) , w} (fst , snd) =
(λ x → ((λ t → fst (x , t)) , λ t → snd (u x , t)) , extensionality (λ a0 → {! !})) , (λ z z₁ → snd (z , z₁)) |
src/ada-libc/src/libc-syslog.ads | mstewartgallus/linted | 0 | 4476 | with Interfaces.C; use Interfaces.C;
with Interfaces.C.Strings;
with System;
package Libc.Syslog with
Spark_Mode => Off is
pragma Preelaborate;
LOG_EMERG : constant :=
0; -- /usr/include/x86_64-linux-gnu/sys/syslog.h:51
LOG_ALERT : constant :=
1; -- /usr/include/x86_64-linux-gnu/sys/syslog.h:52
LOG_CRIT : constant := 2; -- /usr/include/x86_64-linux-gnu/sys/syslog.h:53
LOG_ERR : constant := 3; -- /usr/include/x86_64-linux-gnu/sys/syslog.h:54
LOG_WARNING : constant :=
4; -- /usr/include/x86_64-linux-gnu/sys/syslog.h:55
LOG_NOTICE : constant :=
5; -- /usr/include/x86_64-linux-gnu/sys/syslog.h:56
LOG_INFO : constant := 6; -- /usr/include/x86_64-linux-gnu/sys/syslog.h:57
LOG_DEBUG : constant :=
7; -- /usr/include/x86_64-linux-gnu/sys/syslog.h:58
LOG_PRIMASK : constant :=
16#07#; -- /usr/include/x86_64-linux-gnu/sys/syslog.h:60
-- arg-macro: function LOG_PRI ((p) and LOG_PRIMASK
-- return (p) and LOG_PRIMASK;
-- arg-macro: function LOG_MAKEPRI ((fac) or (pri)
-- return (fac) or (pri);
-- unsupported macro: LOG_KERN (0<<3)
LOG_USER : constant :=
(2**3); -- /usr/include/x86_64-linux-gnu/sys/syslog.h:94
-- unsupported macro: LOG_MAIL (2<<3)
-- unsupported macro: LOG_DAEMON (3<<3)
-- unsupported macro: LOG_AUTH (4<<3)
-- unsupported macro: LOG_SYSLOG (5<<3)
-- unsupported macro: LOG_LPR (6<<3)
-- unsupported macro: LOG_NEWS (7<<3)
-- unsupported macro: LOG_UUCP (8<<3)
-- unsupported macro: LOG_CRON (9<<3)
-- unsupported macro: LOG_AUTHPRIV (10<<3)
-- unsupported macro: LOG_FTP (11<<3)
-- unsupported macro: LOG_LOCAL0 (16<<3)
-- unsupported macro: LOG_LOCAL1 (17<<3)
-- unsupported macro: LOG_LOCAL2 (18<<3)
-- unsupported macro: LOG_LOCAL3 (19<<3)
-- unsupported macro: LOG_LOCAL4 (20<<3)
-- unsupported macro: LOG_LOCAL5 (21<<3)
-- unsupported macro: LOG_LOCAL6 (22<<3)
-- unsupported macro: LOG_LOCAL7 (23<<3)
LOG_NFACILITIES : constant :=
24; -- /usr/include/x86_64-linux-gnu/sys/syslog.h:116
LOG_FACMASK : constant :=
16#03f8#; -- /usr/include/x86_64-linux-gnu/sys/syslog.h:117
-- arg-macro: function LOG_FAC (((p) and LOG_FACMASK) >> 3
-- return ((p) and LOG_FACMASK) >> 3;
-- arg-macro: function LOG_MASK (2 ** (pri)
-- return 2 ** (pri);
-- arg-macro: function LOG_UPTO ((2 ** ((pri)+1)) - 1
-- return (2 ** ((pri)+1)) - 1;
LOG_PID : constant :=
16#01#; -- /usr/include/x86_64-linux-gnu/sys/syslog.h:162
LOG_CONS : constant :=
16#02#; -- /usr/include/x86_64-linux-gnu/sys/syslog.h:163
LOG_ODELAY : constant :=
16#04#; -- /usr/include/x86_64-linux-gnu/sys/syslog.h:164
LOG_NDELAY : constant :=
16#08#; -- /usr/include/x86_64-linux-gnu/sys/syslog.h:165
LOG_NOWAIT : constant :=
16#10#; -- /usr/include/x86_64-linux-gnu/sys/syslog.h:166
LOG_PERROR : constant :=
16#20#; -- /usr/include/x86_64-linux-gnu/sys/syslog.h:167
procedure closelog; -- /usr/include/x86_64-linux-gnu/sys/syslog.h:175
pragma Import (C, closelog, "closelog");
procedure openlog
(ident : char_array;
option : int;
facility : int); -- /usr/include/x86_64-linux-gnu/sys/syslog.h:181
pragma Import (C, openlog, "openlog");
function setlogmask
(mask : int)
return int; -- /usr/include/x86_64-linux-gnu/sys/syslog.h:184
pragma Import (C, setlogmask, "setlogmask");
procedure syslog (pri : int; fmt : char_array -- , ...
); -- /usr/include/x86_64-linux-gnu/sys/syslog.h:190
pragma Import (C_Variadic_2, syslog, "syslog");
procedure vsyslog
(pri : int;
fmt : Interfaces.C.Strings.chars_ptr;
ap : access System
.Address); -- /usr/include/x86_64-linux-gnu/sys/syslog.h:200
pragma Import (C, vsyslog, "vsyslog");
end Libc.Syslog;
|
data/maps/headers/Route23.asm | opiter09/ASM-Machina | 1 | 86909 | <gh_stars>1-10
map_header Route23, ROUTE_23, PLATEAU, NORTH | SOUTH
connection north, IndigoPlateau, INDIGO_PLATEAU, 0
connection south, Route22, ROUTE_22, 0 ; unnecessary
end_map_header
|
src/main/antlr/Basic.g4 | pg94au/Blinkenlights-Basic-Interpreter | 1 | 2190 | grammar Basic;
program : (line NEWLINE | NEWLINE)* ;
line : lineNum statement ;
// ProgramVisitor
lineNum : INT ;
statement : endStatement
| forStatement
| gosubStatement
| gotoStatement
| ifStatement
| inputStatement
| letStatement
| nextStatement
| printStatement
| returnStatement
;
endStatement : 'END' ;
forStatement : 'FOR' VARNAME '=' INT 'TO' INT ;
gosubStatement : 'GOSUB' INT ;
gotoStatement : 'GOTO' INT ;
ifStatement : 'IF' equation 'THEN' INT ;
inputStatement : 'INPUT' VARNAME ;
letStatement : 'LET' VARNAME '=' expression ;
nextStatement : 'NEXT' VARNAME ;
printStatement : 'PRINT' arg (argSeparator arg)* ;
returnStatement : 'RETURN' ;
// PrintArgumentVisitor
arg : QUOTED_STRING # printQuotedString
| expression # printExpression
| VARNAME # printVariable
;
argSeparator : (','|';') ;
// ExpressionVisitor
expression : INT # value
| VARNAME # variable
| expression '*' expression # multiplication
| expression '/' expression # division
| expression '+' expression # addition
| expression '-' expression # subtraction
| '(' expression ')' # parentheses
;
// EquationVisitor
equation : expression '==' expression # equals
| expression '!=' expression # doesNotEqual
| expression '>' expression # greaterThan
| expression '<' expression # lessThan
| expression '>=' expression # greaterThanOrEqual
| expression '<=' expression # lessThanOrEqual
;
VARNAME : [a-zA-Z][a-zA-Z0-9_]* ;
QUOTED_STRING : '"' ('\\"'|.)*? '"' ;
STRING : [a-zA-Z]+ ;
INT : '-'?[0-9]+ ;
WS : [ \t]+ -> skip;
NEWLINE : '\r'? '\n' ;
|
library/fmGUI_ManageLayouts/fmGUI_ManageLayouts_Close.applescript | NYHTC/applescript-fm-helper | 1 | 593 | -- fmGUI_ManageLayouts_Open(prefs)
-- NYHTC
-- close Manage Layouts
(*
HISTORY:
2020-03-04 ( dshockley ): Standardized version. Added fmGUI_ALL_Utilities_Close.
1.3.1 - 2017-11-30 ( eshagdar ): fixed using old varName.
1.3 - 2017-11-20 ( eshagdar ): make sure we're talking to the correct window - there may be several windows 'in front of' the manage layouts window.
1.2 - 2017-11-06 ( eshagdar ): added to htcLib. button click via handler. wait until window closes.
1.1 - 201x-xx-xx ( xxxxx ):
1.0 - 201x-xx-xx ( xxxxx ): created
REQUIRES:
fmGUI_AppFrontMost
fmGUI_ALL_Utilities_Close
fmGUI_NameOfFrontmostWindow
*)
on run
fmGUI_ManageLayouts_Close({})
end run
--------------------
-- START OF CODE
--------------------
on fmGUI_ManageLayouts_Close(prefs)
-- version 2020-03-04-1635
try
set windowNamePart to "Manage Layouts"
fmGUI_AppFrontMost()
fmGUI_ALL_Utilities_Close()
if fmGUI_NameOfFrontmostWindow() starts with windowNamePart then
tell application "System Events"
tell application process "FileMaker Pro Advanced"
set contextWindow to first window whose name begins with windowNamePart
set closeButton to first button of contextWindow whose description is "close button"
end tell
end tell
fmGUI_ObjectClick_Button({buttonRef:closeButton})
return windowWaitUntil({windowName:windowNamePart, windowNameTest:"does not contain"})
end if
return true
on error errMsg number errNum
error "unable to fmGUI_ManageLayouts_Close - " & errMsg number errNum
end try
end fmGUI_ManageLayouts_Close
--------------------
-- END OF CODE
--------------------
on fmGUI_AppFrontMost()
tell application "htcLib" to fmGUI_AppFrontMost()
end fmGUI_AppFrontMost
on fmGUI_ALL_Utilities_Close()
tell application "htcLib" to fmGUI_ALL_Utilities_Close()
end fmGUI_ALL_Utilities_Close
on fmGUI_NameOfFrontmostWindow()
tell application "htcLib" to fmGUI_NameOfFrontmostWindow()
end fmGUI_NameOfFrontmostWindow
on fmGUI_ObjectClick_Button(prefs)
set buttonRef to my coerceToString(buttonRef of prefs)
tell application "htcLib" to fmGUI_ObjectClick_Button({buttonRef:buttonRef} & prefs)
end fmGUI_ObjectClick_Button
on windowWaitUntil(prefs)
tell application "htcLib" to windowWaitUntil(prefs)
end windowWaitUntil
on coerceToString(incomingObject)
-- 2017-07-12 ( eshagdar ): bootstrap code to bring a coerceToString into this file for the sample to run ( instead of having a copy of the handler locally ).
tell application "Finder" to set coercePath to (container of (container of (path to me)) as text) & "text parsing:coerceToString.applescript"
set codeCoerce to read file coercePath as text
tell application "htcLib" to set codeCoerce to "script codeCoerce " & return & getTextBetween({sourceText:codeCoerce, beforeText:"-- START OF CODE", afterText:"-- END OF CODE"}) & return & "end script" & return & "return codeCoerce"
set codeCoerce to run script codeCoerce
tell codeCoerce to coerceToString(incomingObject)
end coerceToString
|
src/Integer/Basics.agda | nad/equality | 3 | 17520 | ------------------------------------------------------------------------
-- Integers
------------------------------------------------------------------------
-- This module contains some basic definitions with few dependencies
-- (in particular, not Groupoid). See Integer for more definitions.
-- The definitions below are reexported from Integer.
{-# OPTIONS --without-K --safe #-}
open import Equality
module Integer.Basics
{c⁺} (eq : ∀ {a p} → Equality-with-J a p c⁺) where
open Derived-definitions-and-properties eq
import Agda.Builtin.Int
open import Prelude renaming (_+_ to _⊕_)
open import Equality.Decidable-UIP eq
import Nat eq as Nat
-- Integers.
open Agda.Builtin.Int public
using ()
hiding (module Int)
renaming (Int to ℤ; pos to +_; negsuc to -[1+_])
module ℤ where
open Agda.Builtin.Int.Int public
using ()
renaming (pos to +_; negsuc to -[1+_])
private
variable
m n : ℕ
-- Turns natural numbers into the corresponding negative integers.
-[_] : ℕ → ℤ
-[ zero ] = + 0
-[ suc n ] = -[1+ n ]
-- Negation.
infix 8 -_
-_ : ℤ → ℤ
- + n = -[ n ]
- -[1+ n ] = + suc n
-- A helper function used to implement addition.
+_+-[1+_] : ℕ → ℕ → ℤ
+ m +-[1+ n ] =
if m Nat.<= n then -[1+ n ∸ m ] else + (m ∸ suc n)
private
-- An alternative implementation of +_+-[1+_].
+_+-[1+_]′ : ℕ → ℕ → ℤ
+ zero +-[1+ n ]′ = -[1+ n ]
+ suc m +-[1+ zero ]′ = + m
+ suc m +-[1+ suc n ]′ = + m +-[1+ n ]′
-- The alternative implementation of +_+-[1+_] is not optimised (it
-- does not use builtin functions), but it computes in the same way
-- as +_+-[1+_].
++-[1+]≡++-[1+]′ : ∀ m n → + m +-[1+ n ] ≡ + m +-[1+ n ]′
++-[1+]≡++-[1+]′ zero n = refl _
++-[1+]≡++-[1+]′ (suc m) zero = refl _
++-[1+]≡++-[1+]′ (suc m) (suc n) = ++-[1+]≡++-[1+]′ m n
-- Addition.
infixl 6 _+_
_+_ : ℤ → ℤ → ℤ
+ m + + n = + (m ⊕ n)
+ m + -[1+ n ] = + m +-[1+ n ]
-[1+ m ] + + n = + n +-[1+ m ]
-[1+ m ] + -[1+ n ] = -[1+ suc m ⊕ n ]
-- Subtraction.
infixl 6 _-_
_-_ : ℤ → ℤ → ℤ
i - j = i + - j
-- The +_ constructor is cancellative.
+-cancellative : + m ≡ + n → m ≡ n
+-cancellative = cong f
where
f : ℤ → ℕ
f (+ n) = n
f -[1+ n ] = n
-- The -[1+_] constructor is cancellative.
-[1+]-cancellative : -[1+ m ] ≡ -[1+ n ] → m ≡ n
-[1+]-cancellative = cong f
where
f : ℤ → ℕ
f (+ n) = n
f -[1+ n ] = n
-- Non-negative integers are not equal to negative integers.
+≢-[1+] : + m ≢ -[1+ n ]
+≢-[1+] +≡- = subst P +≡- tt
where
P : ℤ → Type
P (+ n) = ⊤
P -[1+ n ] = ⊥
-- Non-positive integers are not equal to positive integers.
+[1+]≢- : + suc m ≢ -[ n ]
+[1+]≢- {n = zero} = Nat.0≢+ ∘ sym ∘ +-cancellative
+[1+]≢- {n = suc _} = +≢-[1+]
-- Equality of integers is decidable.
infix 4 _≟_
_≟_ : Decidable-equality ℤ
+ m ≟ + n = ⊎-map (cong (+_)) (_∘ +-cancellative) (m Nat.≟ n)
+ m ≟ -[1+ n ] = no +≢-[1+]
-[1+ m ] ≟ + n = no (+≢-[1+] ∘ sym)
-[1+ m ] ≟ -[1+ n ] = ⊎-map (cong -[1+_]) (_∘ -[1+]-cancellative)
(m Nat.≟ n)
-- The integers form a set.
ℤ-set : Is-set ℤ
ℤ-set = decidable⇒set _≟_
-- Addition is commutative.
+-comm : ∀ i {j} → i + j ≡ j + i
+-comm (+ m) {j = + _} = cong (+_) $ Nat.+-comm m
+-comm (+ m) {j = -[1+ _ ]} = refl _
+-comm -[1+ m ] {j = + _} = refl _
+-comm -[1+ m ] {j = -[1+ _ ]} = cong (-[1+_] ∘ suc) $ Nat.+-comm m
|
tests/cl_test-device.adb | flyx/OpenCLAda | 8 | 16915 | <filename>tests/cl_test-device.adb
--------------------------------------------------------------------------------
-- Copyright (c) 2013, <NAME> <<EMAIL>>
--
-- Permission to use, copy, modify, and/or distribute this software for any
-- purpose with or without fee is hereby granted, provided that the above
-- copyright notice and this permission notice appear in all copies.
--
-- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
--------------------------------------------------------------------------------
with CL.Platforms;
with Ada.Text_IO;
with Ada.Strings.Fixed;
procedure CL_Test.Device is
package IO renames Ada.Text_IO;
Pfs : constant CL.Platforms.Platform_List := CL.Platforms.List;
pragma Assert (Pfs'Length > 0);
Pf : constant CL.Platforms.Platform := Pfs (1);
Dvs : constant CL.Platforms.Device_List := Pf.Devices (CL.Platforms.Device_Kind_All);
pragma Assert (Dvs'Length > 0);
DT : CL.Platforms.Device_Kind;
Fpc : CL.Platforms.Floating_Point_Config;
Ecs : CL.Platforms.Capability_Vector;
Cqps : CL.Platforms.CQ_Property_Vector;
begin
for Index in Dvs'Range loop
IO.Put_Line ("Device" & Index'Img);
DT := Dvs (Index).Kind;
IO.Put ("Type: ");
if DT.Default then
IO.Put ("Default ");
end if;
if DT.CPU then
IO.Put ("CPU ");
end if;
if DT.GPU then
IO.Put ("GPU ");
end if;
if DT.Accelerator then
IO.Put ("Accelerator");
end if;
IO.New_Line;
IO.Put ("Name: ");
IO.Put_Line (Dvs (Index).Name);
IO.Put ("Vendor: ");
IO.Put_Line (Dvs (Index).Vendor);
IO.Put ("Version: ");
IO.Put_Line (Dvs (Index).Version);
IO.Put ("Extensions: ");
IO.Put_Line (Dvs (Index).Extensions);
Ada.Text_IO.Put ("MAX_WORK_ITEM_SIZES: (");
declare
Sizes : constant CL.Size_List := Dvs (Index).Max_Work_Item_Sizes;
begin
for Size in Sizes'Range loop
if Size /= Sizes'Last then
Ada.Text_IO.Put (Size'Img & ", ");
else
Ada.Text_IO.Put_Line (Size'Img & ")");
end if;
end loop;
end;
Ada.Text_IO.Put ("MAX_WORK_GROUP_SIZE: ");
Ada.Text_IO.Put_Line (Dvs (Index).Max_Work_Group_Size'Img);
Ada.Text_IO.Put ("SINGLE_FLOATING_POINT_CONFIG: ");
Fpc := Dvs (Index).Single_Floating_Point_Config;
if Fpc.Denorm then Ada.Text_IO.Put ("Denorm "); end if;
if Fpc.Inf_Man then Ada.Text_IO.Put ("Inf_Man "); end if;
if Fpc.Round_To_Zero then Ada.Text_IO.Put ("Round_To_Zero "); end if;
if Fpc.Round_To_Nearest then Ada.Text_IO.Put ("Round_To_Nearest "); end if;
if Fpc.Round_To_Inf then Ada.Text_IO.Put ("Round_To_Inf "); end if;
if Fpc.FMA then Ada.Text_IO.Put ("FMA "); end if;
if Fpc.Soft_Float then Ada.Text_IO.Put ("Soft_Float"); end if;
Ada.Text_IO.New_Line;
Ada.Text_IO.Put ("MEMORY_CACHE_TYPE: ");
Ada.Text_IO.Put_Line (Dvs (Index).Memory_Cache_Type'Img);
Ada.Text_IO.Put ("LOCAL_MEMORY_TYPE: ");
Ada.Text_IO.Put_Line (Dvs (Index).Local_Memory_Type'Img);
Ada.Text_IO.Put ("EXECUTION_CAPABILITIES: ");
Ecs := Dvs (Index).Execution_Capabilities;
if Ecs.Kernel then Ada.Text_IO.Put ("Kernel "); end if;
if Ecs.Native_Kernel then Ada.Text_IO.Put ("Native_Kernel"); end if;
Ada.Text_IO.New_Line;
Ada.Text_IO.Put ("QUEUE_PROPERTIES: ");
Cqps := Dvs (Index).Command_Queue_Properties;
if Cqps.Out_Of_Order_Exec_Mode_Enable then
Ada.Text_IO.Put ("Out_Of_Order_Exec_Mode_Enable ");
end if;
if Cqps.Profiling_Enable then
Ada.Text_IO.Put ("Profiling_Enable");
end if;
Ada.Text_IO.New_Line;
Ada.Text_IO.Put_Line (Ada.Strings.Fixed."*" (80, '-'));
end loop;
end CL_Test.Device;
|
runtime/sources/arm/aeabi_uldivmod.asm | wdv4758h/Yeppp- | 30 | 29882 | //===-- aeabi_uldivmod.S - EABI uldivmod implementation -------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//compiler_rt License
//==============================================================================
//
//The compiler_rt library is dual licensed under both the University of Illinois
//"BSD-Like" license and the MIT license. As a user of this code you may choose
//to use it under either license. As a contributor, you agree to allow your code
//to be used under both.
//
//Full text of the relevant licenses is included below.
//
//==============================================================================
//
//University of Illinois/NCSA
//Open Source License
//
//Copyright (c) 2009-2013 by the contributors listed below
//
//All rights reserved.
//
//Developed by:
//
// LLVM Team
//
// University of Illinois at Urbana-Champaign
//
// http://llvm.org
//
//Permission is hereby granted, free of charge, to any person obtaining a copy of
//this software and associated documentation files (the "Software"), to deal with
//the Software without restriction, including without limitation the rights to
//use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
//of the Software, and to permit persons to whom the Software is furnished to do
//so, subject to the following conditions:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimers.
//
// * Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimers in the
// documentation and/or other materials provided with the distribution.
//
// * Neither the names of the LLVM Team, University of Illinois at
// Urbana-Champaign, nor the names of its contributors may be used to
// endorse or promote products derived from this Software without specific
// prior written permission.
//
//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
//FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
//SOFTWARE.
//
//=============================================================================
//
//Copyright (c) 2009-2013 by the contributors listed below
//
//Permission is hereby granted, free of charge, to any person obtaining a copy
//of this software and associated documentation files (the "Software"), to deal
//in the Software without restriction, including without limitation the rights
//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
//copies of the Software, and to permit persons to whom the Software is
//furnished to do so, subject to the following conditions:
//
//The above copyright notice and this permission notice shall be included in
//all copies or substantial portions of the Software.
//
//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
//THE SOFTWARE.
//
//=============================================================================
//CONTRIBUTORS
//
//Below is a partial list of people who have contributed to the LLVM/CompilerRT
//project.
//
//The list is sorted by surname and formatted to allow easy grepping and
//beautification by scripts. The fields are: name (N), email (E), web-address
//(W), PGP key ID and fingerprint (P), description (D), and snail-mail address
//(S).
//
//N: <NAME>
//E: <EMAIL>
//W: http://www.auroraux.org
//D: Code style and Readability fixes.
//
//N: <NAME>
//E: <EMAIL>
//W: http://www.auroraux.org
//D: CMake'ify Compiler-RT build system
//D: Maintain Solaris & AuroraUX ports of Compiler-RT
//
//N: <NAME>
//E: <EMAIL>
//D: Architect and primary author of compiler-rt
//===----------------------------------------------------------------------===//
// struct { uint64_t quot, uint64_t rem}
// __aeabi_uldivmod(uint64_t numerator, uint64_t denominator) {
// uint64_t rem, quot;
// quot = __udivmoddi4(numerator, denominator, &rem);
// return {quot, rem};
// }
.include "common.inc"
.syntax unified
BEGIN_ARM_FUNCTION __aeabi_uldivmod
push {r11, lr}
sub sp, sp, #16
add r12, sp, #8
str r12, [sp]
bl __udivmoddi4
ldr r2, [sp, #8]
ldr r3, [sp, #12]
add sp, sp, #16
pop {r11, pc}
END_ARM_FUNCTION __aeabi_uldivmod
|
oeis/005/A005572.asm | neoneye/loda-programs | 11 | 241577 | <reponame>neoneye/loda-programs
; A005572: Number of walks on cubic lattice starting and finishing on the xy plane and never going below it.
; Submitted by <NAME>
; 1,4,17,76,354,1704,8421,42508,218318,1137400,5996938,31940792,171605956,928931280,5061593709,27739833228,152809506582,845646470616,4699126915422,26209721959656,146681521121244,823429928805936,4635568494271458,26164055028730680,148028380046626572,839353395601384624,4769085923339484596,27148987714036365808,154826178654609946504,884416719050700918176,5059942789892711332861,28991380733173058343564,166337066846614898632422,955589820381552526558872,5496480887612472151994710,31651889874764017846769672
mov $1,1
mov $3,$0
mov $4,3
lpb $3
mul $1,$4
mul $1,$3
mul $1,2
add $2,1
add $5,$4
div $1,$5
add $2,$1
mul $2,2
sub $3,1
add $4,2
lpe
mov $0,$2
div $0,2
add $0,1
|
coreboot/src/vendorcode/amd/agesa/f14/Proc/Recovery/Mem/mru.asm | leetobin/firebrick | 9 | 81073 | ;*****************************************************************************
; AMD Generic Encapsulated Software Architecture
;
; $Workfile:: mu.asm $ $Revision:: 237#$ $Date: 2009-12-10 07:28:37 +0800 (Thu, 10 Dec 2009) $
; Description: Main memory controller system configuration for AGESA DDR 2
;
;
;*****************************************************************************
;
; Copyright (c) 2011, Advanced Micro Devices, Inc.
; All rights reserved.
;
; Redistribution and use in source and binary forms, with or without
; modification, are permitted provided that the following conditions are met:
; * Redistributions of source code must retain the above copyright
; notice, this list of conditions and the following disclaimer.
; * Redistributions in binary form must reproduce the above copyright
; notice, this list of conditions and the following disclaimer in the
; documentation and/or other materials provided with the distribution.
; * Neither the name of Advanced Micro Devices, Inc. nor the names of
; its contributors may be used to endorse or promote products derived
; from this software without specific prior written permission.
;
; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
; ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
; DISCLAIMED. IN NO EVENT SHALL ADVANCED MICRO DEVICES, INC. BE LIABLE FOR ANY
; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
; (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
; ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
;
;*****************************************************************************
;============================================================================
.XLIST
.LIST
.686p
.MODEL FLAT
.CODE
ASSUME FS: NOTHING
; Define the calling convention used for the C library modules
;@attention - This should be in a central include file
CALLCONV EQU NEAR C
;===============================================================================
;MemRecUOutPort:
;
; Do a 32 Bit IO Out operation using edx.
; NOTE: This function will be obsolete in the future.
;
; In: Port - port number
; Value - value to be written to port
;
; Out:
;
;All registers preserved except for "Out:"
;===============================================================================
MemRecUOutPort PROC CALLCONV PUBLIC Port:DWORD, Value:DWORD
pushad
mov edx,Port
mov eax,Value
out dx,al
popad
ret
MemRecUOutPort ENDP
;----------------------------------------------------------------------------
; _MFENCE();
;
_MFENCE macro
db 0Fh,0AEh,0F0h
endm
;----------------------------------------------------------------------------
; _EXECFENCE();
;
_EXECFENCE macro
out 0EDh,al ;prevent speculative execution of following instructions
endm
;===============================================================================
;MemRecUWrite1CL:
;
; Write data from buffer to a system address
;
; In: Address - System address to read from
; Pattern - pointer pattern.
;
; Out:
;
;All registers preserved except for "Out:"
;===============================================================================
MemRecUWrite1CL PROC CALLCONV PUBLIC Address:DWORD, Pattern:NEAR PTR DWORD
pushad
push ds
mov eax,Address
push ss
pop ds
xor edx,edx
mov edx, DWORD PTR Pattern
mov esi,edx
mov edx,16
_EXECFENCE
mov ecx,4
@@:
db 66h,0Fh,6Fh,06 ;MOVDQA xmm0,[esi]
db 64h,66h,0Fh,0E7h,00 ;MOVNTDQ fs:[eax],xmm0 (xmm0 is 128 bits)
add eax,edx
add esi,edx
loop @B
pop ds
popad
ret
MemRecUWrite1CL ENDP
;===============================================================================
;MemRecURead1CL:
;
; Read one cacheline to buffer
;
; In: Buffer - pointer buffer.
; : Address - System address to read from
;
; Out:
;
;All registers preserved except for "Out:"
;===============================================================================
MemRecURead1CL PROC CALLCONV PUBLIC Buffer:NEAR PTR DWORD, Address:DWORD
pushad
mov esi,Address
xor edx,edx
mov edx,DWORD PTR Buffer
mov edi,edx
mov ecx,64
@@:
mov al,fs:[esi]
mov ss:[edi],al
inc esi
inc edi
loop @B
popad
ret
MemRecURead1CL ENDP
;===============================================================================
;MemRecUFlushPattern:
;
; Flush one cache line
;
; In: Address - System address [31:0]
; Out:
;
;All registers preserved except for "Out:"
;===============================================================================
MemRecUFlushPattern PROC CALLCONV PUBLIC Address:DWORD
pushad
mov eax,Address
_EXECFENCE
;clflush fs:[eax]
db 064h ;access relative to FS BASE prefix
db 00Fh ;opcode
db 0AEh ;opcode
db 038h ;eax indirect addressing
_MFENCE
popad
ret
MemRecUFlushPattern ENDP
END
|
libsrc/_DEVELOPMENT/math/float/math48/lm/c/sdcc_iy/___slong2fs.asm | jpoikela/z88dk | 640 | 174509 |
SECTION code_clib
SECTION code_fp_math48
PUBLIC ___slong2fs
EXTERN cm48_sdcciyp_slong2ds
defc ___slong2fs = cm48_sdcciyp_slong2ds
|
Transynther/x86/_processed/AVXALIGN/_st_zr_4k_/i7-7700_9_0x48.log_21829_2402.asm | ljhsiun2/medusa | 9 | 160552 | .global s_prepare_buffers
s_prepare_buffers:
push %r13
push %r9
push %rax
push %rbp
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_normal_ht+0x1012c, %r13
nop
nop
nop
and $31662, %rcx
movups (%r13), %xmm3
vpextrq $1, %xmm3, %r9
nop
sub $36048, %rdi
lea addresses_D_ht+0x1ae4, %r13
clflush (%r13)
nop
nop
and $50598, %rdx
movb (%r13), %al
nop
cmp %rax, %rax
lea addresses_UC_ht+0x62e4, %rax
clflush (%rax)
xor %r13, %r13
movb (%rax), %dl
nop
nop
nop
nop
nop
sub $10230, %r9
lea addresses_D_ht+0x1d1c0, %r13
nop
nop
nop
nop
and $54483, %rbp
mov $0x6162636465666768, %r9
movq %r9, (%r13)
nop
nop
nop
nop
and %rdx, %rdx
lea addresses_normal_ht+0x7ee4, %r13
clflush (%r13)
nop
nop
sub %rdi, %rdi
mov $0x6162636465666768, %rcx
movq %rcx, %xmm4
movups %xmm4, (%r13)
nop
nop
nop
add $30341, %rdx
lea addresses_normal_ht+0x13ee4, %rsi
lea addresses_D_ht+0x1406a, %rdi
nop
nop
nop
nop
sub %rbp, %rbp
mov $121, %rcx
rep movsb
nop
nop
xor %rcx, %rcx
lea addresses_D_ht+0x19500, %rdx
nop
nop
nop
sub %rdi, %rdi
mov $0x6162636465666768, %rsi
movq %rsi, (%rdx)
and $40080, %r9
lea addresses_A_ht+0x1b2e4, %rdi
clflush (%rdi)
cmp %rdx, %rdx
movups (%rdi), %xmm3
vpextrq $1, %xmm3, %r9
nop
nop
add %rbp, %rbp
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r9
pop %r13
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r15
push %r8
push %r9
push %rax
push %rbx
push %rdi
// Load
lea addresses_normal+0x1c855, %r11
nop
sub %r8, %r8
movups (%r11), %xmm7
vpextrq $0, %xmm7, %r15
nop
nop
dec %rax
// Store
lea addresses_WT+0xdae4, %rdi
cmp $5444, %rbx
movl $0x51525354, (%rdi)
nop
sub %r8, %r8
// Load
lea addresses_UC+0x94e4, %r9
nop
nop
nop
nop
sub $28317, %rax
mov (%r9), %edi
nop
nop
nop
nop
and %rdi, %rdi
// Load
mov $0x6a4, %r8
nop
cmp $47850, %r9
movups (%r8), %xmm7
vpextrq $0, %xmm7, %rax
nop
nop
cmp %rbx, %rbx
// Store
lea addresses_WT+0x9ee4, %r8
clflush (%r8)
nop
nop
nop
nop
nop
add %r9, %r9
movl $0x51525354, (%r8)
nop
nop
nop
inc %r15
// Load
lea addresses_WT+0xe784, %r8
nop
nop
nop
nop
xor %rdi, %rdi
mov (%r8), %r15d
nop
and $39114, %r11
// Store
mov $0x8e4, %rdi
nop
nop
nop
nop
nop
add %r15, %r15
mov $0x5152535455565758, %r8
movq %r8, %xmm6
movaps %xmm6, (%rdi)
nop
nop
nop
and %rdi, %rdi
// Faulty Load
lea addresses_RW+0x16ae4, %rbx
nop
cmp %r9, %r9
movntdqa (%rbx), %xmm7
vpextrq $0, %xmm7, %r11
lea oracles, %rbx
and $0xff, %r11
shlq $12, %r11
mov (%rbx,%r11,1), %r11
pop %rdi
pop %rbx
pop %rax
pop %r9
pop %r8
pop %r15
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_RW', 'AVXalign': False, 'congruent': 0, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_normal', 'AVXalign': False, 'congruent': 0, 'size': 16, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT', 'AVXalign': True, 'congruent': 11, 'size': 4, 'same': False, 'NT': True}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC', 'AVXalign': False, 'congruent': 8, 'size': 4, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_P', 'AVXalign': False, 'congruent': 6, 'size': 16, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT', 'AVXalign': False, 'congruent': 9, 'size': 4, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WT', 'AVXalign': False, 'congruent': 5, 'size': 4, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_P', 'AVXalign': True, 'congruent': 7, 'size': 16, 'same': False, 'NT': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_RW', 'AVXalign': False, 'congruent': 0, 'size': 16, 'same': True, 'NT': True}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 0, 'size': 16, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 11, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 10, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 2, 'size': 8, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 10, 'size': 16, 'same': False, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 1, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 2, 'size': 8, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 8, 'size': 16, 'same': False, 'NT': False}}
{'54': 21379, '00': 450}
54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 00 54 54 54 54 54 54 54 00 54 54 54 54 54 54 00 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 00 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 00 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 00 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 00 54 00 54 54 54 54 54 54 54 54 54 54 00 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 00 54 54 54 54 54 54 54 54 54 00 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 00 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 00 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54
*/
|
Chapter_10/Program 10.1/x86_64/Program_10.1_NASM.asm | hexu1985/Assembly.Programming.And.Computer.Architecture | 0 | 18815 | ; Program 10.1
; Using Segment Selectors - NASM (64-bit)
; Copyright (c) 2019 Hall & Slonka
section .data
array: dd 3, 2, 6, 4, 1
section .text
global _main
_main:
mov rax, array ; array address to rax
mov ebx, [eax+4] ; second element to ebx
mov ecx, [ds:array] ; first element to ecx (compiler warning)
mov edx, [ds:array+8] ; third element to edx (compiler warning)
; "warning: ds segment base generated, but will be ignored in 64-bit mode"
mov rax, 60
xor rdi, rdi
syscall
|
AdaCompiler/in/test3.adb | vasilev-dev/AdaCompiler | 0 | 29311 | <gh_stars>0
procedure Hello is
begin
if min = max then
null;
elsif min < max then
null;
else
null;
end if;
for Iter in 1..5 loop
null;
end loop;
return;
end Hello; |
programs/oeis/188/A188511.asm | karttu/loda | 1 | 172743 | ; A188511: Floor(7n/10).
; 0,0,1,2,2,3,4,4,5,6,7,7,8,9,9,10,11,11,12,13,14,14,15,16,16,17,18,18,19,20,21,21,22,23,23,24,25,25,26,27,28,28,29,30,30,31,32,32,33,34,35,35,36,37,37,38,39,39,40,41,42,42,43,44,44,45,46,46,47,48,49,49,50,51,51,52,53,53,54,55,56,56,57,58,58,59,60,60,61,62,63
mul $0,7
mov $1,$0
div $1,10
|
java/src/main/antlr4/biz/karms/tools/httpdparser/HTTPDConfParser.g4 | web-servers/httpdparser | 1 | 1048 | <reponame>web-servers/httpdparser<gh_stars>1-10
/*
Copyright 2018 <NAME>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
parser grammar HTTPDConfParser;
options { tokenVocab=HTTPDConfLexer; }
config : (SEA_WS* element | SEA_WS* directive | COMMENT)+;
content : ( element | directive | COMMENT | SEA_WS)*;
// Directives
directive : SERVER_ROOT serverRootPath
| LISTEN listenAddresses
| DIRECTORY_INDEX directoryIndex
| USER user
| GROUP group
| CHROOT_DIR chrootDir
| SUEXEC suexec
| SERVER_ADMIN serverAdmin
| ALLOW_OVERRIDE allowOverride
| REQUIRE require
| OPTIONS options_
| ERROR_LOG errorLog
| LOG_LEVEL logLevel
| LOG_FORMAT logFormat
| CUSTOM_LOG customLog
| SCRIPT_ALIAS scriptAlias
| TYPES_CONFIG typesConfig
| ADD_TYPE addType
| ADD_OUTPUT_FILTER addOutputFilter
| ADD_DEFAULT_CHARSET addDefaultCharset
| MIME_MAGIC_FILE mimeMagicFile
| ENABLE_SEND_FILE enableSendfile
| INDEX_OPTIONS indexOptions
| ALIAS alias
| ACCESS_FILE_NAME accessFileName
| ADD_CHARSET addCharset
| ADD_DESCRIPTION addDescription
| ADD_HANDLER addHandler
| ADD_ICON addIcon
| ADD_ICONBYENCODING addIconByEncoding
| ADD_ICONBYTYPE addIconByType
| ADD_LANGUAGE addLanguage
| ALIAS_MATCH aliasMatch
| AUTH_DIGEST_PROVIDER authDigestProvider
| AUTH_NAME authName
| AUTH_TYPE authType
| AUTH_USER_FILE authUserFile
| BROWSER_MATCH browserMatch
| DAV dAV
| DAV_LOCK_DB dAVLockDB
| DEFAULT_ICON defaultIcon
| ERROR_DOCUMENT errorDocument
| FORCE_LANGUAGE_PRIORITY forceLanguagePriority
| HEADER_NAME headerName
| HOSTNAME_LOOKUPS hostnameLookups
| INDEX_IGNORE indexIgnore
| KEEP_ALIVE keepAlive
| KEEP_ALIVE_TIMEOUT keepAliveTimeout
| LANGUAGE_PRIORITY languagePriority
| MAX_CONNECTIONS_PER_CHILD maxConnectionsPerChild
| MAX_KEEP_ALIVE_REQUESTS maxKeepAliveRequests
| MAX_MEM_FREE maxMemFree
| PID_FILE pidFile
| PROXY_HTML_EVENTS proxyHTMLEvents
| PROXY_HTML_LINKS proxyHTMLLinks
| README_NAME readmeName
| REDIRECT_MATCH redirectMatch
| REMOVE_TYPE removeType
| REQUEST_HEADER requestHeader
| REQUEST_READ_TIMEOUT requestReadTimeout
| SERVER_SIGNATURE serverSignature
| SERVER_TOKENS serverTokens
| SET_ENV_IF setEnvIf
| SET_HANDLER setHandler
| SSL_CIPHER_SUITE sSLCipherSuite
| SSL_HONOR_CIPHER_ORDER sSLHonorCipherOrder
| SSL_OPTIONS sSLOptions
| SSL_PASSPHRASE_DIALOG sSLPassPhraseDialog
| SSL_PROTOCOL sSLProtocol
| SSL_PROXY_CIPHER_SUITE sSLProxyCipherSuite
| SSL_PROXY_PROTOCOL sSLProxyProtocol
| SSL_RANDOM_SEED sSLRandomSeed
| SSL_REQUIRE sSLRequire
| SSL_SESSION_CACHE sSLSessionCache
| SSL_SESSION_CACHE_TIMEOUT sSLSessionCacheTimeout
| SSL_STAPLING_CACHE sSLStaplingCache
| SSL_STAPLING_ERROR_CACHE_TIMEOUT sSLStaplingErrorCacheTimeout
| SSL_STAPLING_STANDARD_CACHE_TIMEOUT sSLStaplingStandardCacheTimeout
| SSL_USE_STAPLING sSLUseStapling
| THREADS_PER_CHILD threadsPerChild
| TIME_OUT timeOut
| TRANSFER_LOG transferLog
| USE_CANONICAL_NAME useCanonicalName
| USER_DIR userDir
;
serverRootPath : VALUE;
listenAddresses : VALUE;
directoryIndex : VALUE;
user : VALUE;
group : VALUE;
chrootDir : VALUE;
suexec : ONOFF;
serverAdmin : VALUE;
allowOverride : VALUE;
require : VALUE;
options_ : VALUE;
errorLog : VALUE;
logLevel : VALUE;
logFormat : VALUE;
customLog : VALUE;
scriptAlias : VALUE;
typesConfig : VALUE;
addType : VALUE;
addOutputFilter : VALUE;
addDefaultCharset : VALUE;
mimeMagicFile : VALUE;
enableSendfile : ONOFF;
indexOptions : VALUE;
alias : VALUE;
accessFileName : VALUE;
addCharset : VALUE;
addDescription : VALUE;
addHandler : VALUE;
addIcon : VALUE;
addIconByEncoding : VALUE;
addIconByType : VALUE;
addLanguage : VALUE;
aliasMatch : VALUE;
authDigestProvider : VALUE;
authName : VALUE;
authType : VALUE;
authUserFile : VALUE;
browserMatch : VALUE;
dAV : ONOFF;
dAVLockDB : VALUE;
defaultIcon : VALUE;
errorDocument : VALUE;
forceLanguagePriority : VALUE;
headerName : VALUE;
hostnameLookups : ONOFF;
indexIgnore : VALUE;
keepAlive : ONOFF;
keepAliveTimeout : NUMBER;
languagePriority : VALUE;
maxConnectionsPerChild : NUMBER;
maxKeepAliveRequests : NUMBER;
maxMemFree : NUMBER;
pidFile : VALUE;
proxyHTMLEvents : VALUE;
proxyHTMLLinks : VALUE;
readmeName : VALUE;
redirectMatch : VALUE;
removeType : VALUE;
requestHeader : VALUE;
requestReadTimeout : VALUE;
serverSignature : ONOFF;
serverTokens : VALUE;
setEnvIf : VALUE;
setHandler : VALUE;
sSLCipherSuite : VALUE;
sSLHonorCipherOrder : ONOFF;
sSLOptions : VALUE;
sSLPassPhraseDialog : VALUE;
sSLProtocol : VALUE;
sSLProxyCipherSuite : VALUE;
sSLProxyProtocol : VALUE;
sSLRandomSeed : VALUE;
sSLRequire : VALUE;
sSLSessionCache : VALUE;
sSLSessionCacheTimeout : NUMBER;
sSLStaplingCache : VALUE;
sSLStaplingErrorCacheTimeout : NUMBER;
sSLStaplingStandardCacheTimeout : NUMBER;
sSLUseStapling : ONOFF;
threadsPerChild : NUMBER;
timeOut : NUMBER;
transferLog : VALUE;
useCanonicalName : ONOFF;
userDir : VALUE;
// Elements
ifModule : EL_VAL*;
files : EL_VAL*;
virtualHost : EL_VAL*;
directory : EL_VAL*;
locationMatch : EL_VAL*;
location : EL_VAL*;
filesMatch : EL_VAL*;
requireAny : EL_VAL*;
requireAll : EL_VAL*;
requireNone : EL_VAL*;
proxy : EL_VAL*;
proxyMatch : EL_VAL*;
nameClose : EL_IFMODULE
| EL_FILES
| EL_VIRTUAL_HOST
| EL_DIRECTORY
| EL_LOCATION_MATCH
| EL_LOCATION
| EL_FILES_MATCH
| EL_REQUIRE_ANY
| EL_REQUIRE_ALL
| EL_REQUIRE_NONE
| EL_PROXY
| EL_PROXY_MATCH
;
element : EL_OPEN (
EL_IFMODULE ifModule |
EL_FILES files |
EL_VIRTUAL_HOST virtualHost |
EL_DIRECTORY directory |
EL_LOCATION_MATCH locationMatch |
EL_LOCATION location |
EL_FILES_MATCH filesMatch |
EL_REQUIRE_ANY requireAny |
EL_REQUIRE_ALL requireAll |
EL_REQUIRE_NONE requireNone |
EL_PROXY proxy |
EL_PROXY_MATCH proxyMatch
) EL_CLOSE content EL_OPEN nameClose EL_CLOSE; |
sound/sfxasm/BD.asm | NatsumiFox/Sonic-3-93-Nov-03 | 7 | 170476 | BD_Header:
sHeaderInit ; Z80 offset is $D8BA
sHeaderPatch BD_Patches
sHeaderTick $01
sHeaderCh $01
sHeaderSFX $80, $C0, BD_PSG3, $00, $00
BD_PSG3:
sNoisePSG $E7
sVolEnvPSG v1D
ssModZ80 $01, $01, $FE, $53
dc.b nAb6, $06, nEb5, $38
sStop
BD_Patches:
|
aunit/aunit-reporter-gnattest.adb | btmalone/alog | 0 | 14923 | ------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- A U N I T . R E P O R T E R . G N A T T E S T --
-- --
-- B o d y --
-- --
-- --
-- Copyright (C) 2012-2014, AdaCore --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- --
-- --
-- --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT is maintained by AdaCore (http://www.adacore.com) --
-- --
------------------------------------------------------------------------------
with GNAT.IO; use GNAT.IO;
with AUnit.Time_Measure; use AUnit.Time_Measure;
-- Reporter intended to be used by test drivers generated by gnattest.
package body AUnit.Reporter.GNATtest is
procedure Dump_Result_List (L : Result_Lists.List);
-- List failed assertions
procedure Report_Test (Test : Test_Result);
-- Report a single assertion failure or unexpected exception
procedure Put_Measure is new Gen_Put_Measure_In_Seconds;
-- Output elapsed time
procedure Indent (N : Natural);
-- Print N indentations to output
------------------------
-- Dump_Result_List --
------------------------
procedure Dump_Result_List (L : Result_Lists.List) is
use Result_Lists;
C : Cursor := First (L);
begin
-- Note: can't use Iterate because it violates restriction
-- No_Implicit_Dynamic_Code
while Has_Element (C) loop
Report_Test (Element (C));
Next (C);
end loop;
end Dump_Result_List;
------------
-- Indent --
------------
procedure Indent (N : Natural) is
begin
for J in 1 .. N loop
Put (" ");
end loop;
end Indent;
------------
-- Report --
------------
procedure Report (Engine : GNATtest_Reporter;
R : in out Result'Class;
Options : AUnit_Options := Default_Options)
is
pragma Unreferenced (Engine);
Failures_Count : Integer;
Crashes_Count : Integer;
Passed_Count : Integer;
Tests_Count : Integer;
begin
Tests_Count := Integer (Test_Count (R));
Crashes_Count := Integer (Error_Count (R));
Passed_Count := Integer (Success_Count (R));
Failures_Count := Tests_Count - (Passed_Count + Crashes_Count);
if Options.Report_Successes then
declare
S : Result_Lists.List;
begin
Successes (R, S);
Dump_Result_List (S);
end;
end if;
declare
F : Result_Lists.List;
begin
Failures (R, F);
Dump_Result_List (F);
end;
declare
E : Result_Lists.List;
begin
Errors (R, E);
Dump_Result_List (E);
end;
Put (Tests_Count);
Put (" tests run: ");
Put (Passed_Count);
Put (" passed; ");
Put (Failures_Count);
Put (" failed; ");
Put (Crashes_Count);
Put_Line (" crashed.");
end Report;
------------------
-- Report_Test --
------------------
procedure Report_Test (Test : Test_Result) is
Is_Assert : Boolean;
Is_Condition : Boolean := False;
T : AUnit_Duration;
N : Integer;
begin
Put (Test.Test_Name.all);
if Test.Failure /= null or else Test.Error /= null then
if Test.Failure /= null then
Is_Assert := True;
else
Is_Assert := False;
end if;
if Is_Assert then
Put (" error: corresponding test FAILED: ");
else
Put (" error: corresponding test CRASHED: ");
end if;
if Is_Assert then
if Test.Failure.Message'Length > 9 then
N := Test.Failure.Message'First;
if
Test.Failure.Message.all (N .. N + 8) = "req_sloc("
or else Test.Failure.Message.all (N .. N + 8) = "ens_sloc("
then
for I in N + 9 .. Test.Failure.Message'Last - 2 loop
if Test.Failure.Message.all (I + 1 .. I + 2) = "):" then
Put (Test.Failure.Message.all
(I + 3 .. Test.Failure.Message'Last));
Put (" (");
Put (Test.Failure.Message.all (N + 9 .. I));
Put_Line (")");
Is_Condition := True;
exit;
end if;
end loop;
end if;
end if;
if not Is_Condition then
Put (Test.Failure.Message.all);
Put (" (");
Put (Test.Failure.Source_Name.all);
Put (":");
Put (Test.Failure.Line);
Put (")");
end if;
if Test.Elapsed /= Time_Measure.Null_Time then
Put (" (");
T := Get_Measure (Test.Elapsed);
Put_Measure (T);
Put (")");
end if;
New_Line;
else
Put (Test.Error.Exception_Name.all);
if Test.Error.Exception_Message /= null then
Put (" : ");
Put (Test.Error.Exception_Message.all);
end if;
if Test.Elapsed /= Time_Measure.Null_Time then
Put (" (");
T := Get_Measure (Test.Elapsed);
Put_Measure (T);
Put (")");
end if;
New_Line;
if Test.Error.Traceback /= null then
Put_Line (" Traceback:");
declare
From, To : Natural := Test.Error.Traceback'First;
begin
while From <= Test.Error.Traceback'Last loop
To := From;
while To <= Test.Error.Traceback'Last
and then Test.Error.Traceback (To) /= ASCII.LF
loop
To := To + 1;
end loop;
Indent (2);
Put_Line (Test.Error.Traceback (From .. To - 1));
From := To + 1;
end loop;
end;
end if;
end if;
else
Put (" info: corresponding test PASSED");
if Test.Elapsed /= Time_Measure.Null_Time then
Put (" (");
T := Get_Measure (Test.Elapsed);
Put_Measure (T);
Put (")");
end if;
New_Line;
end if;
end Report_Test;
end AUnit.Reporter.GNATtest;
|
testbench/aes_decrypt/mpi/main.asm | Arka2009/LOCUS | 8 | 178778 | .arch armv5t
.fpu softvfp
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 2
.eabi_attribute 30, 6
.eabi_attribute 34, 0
.eabi_attribute 18, 4
.file "aes_mpi.c"
.global myRank
.data
.align 2
.type myRank, %object
.size myRank, 4
myRank:
.word 9999
.global mpi_buff
.bss
.align 2
.type mpi_buff, %object
.size mpi_buff, 64
mpi_buff:
.space 64
.text
.align 2
.global _Z8MPI_InitPiPPPc
.type _Z8MPI_InitPiPPPc, %function
_Z8MPI_InitPiPPPc:
.fnstart
.LFB2:
@ args = 0, pretend = 0, frame = 16
@ frame_needed = 1, uses_anonymous_args = 0
stmfd sp!, {fp, lr}
.save {fp, lr}
.setfp fp, sp, #4
add fp, sp, #4
.pad #16
sub sp, sp, #16
str r0, [fp, #-16]
str r1, [fp, #-20]
mov r3, #0
str r3, [fp, #-8]
b .L2
.L3:
mov r0, #1000
bl malloc
mov r3, r0
mov r1, r3
ldr r3, .L5
ldr r2, [fp, #-8]
str r1, [r3, r2, asl #2]
ldr r3, .L5
ldr r2, [fp, #-8]
ldr r3, [r3, r2, asl #2]
ldr r0, [fp, #-8]
mov r1, r3
bl m5_mpi_init
ldr r3, [fp, #-8]
add r3, r3, #1
str r3, [fp, #-8]
.L2:
ldr r3, [fp, #-8]
cmp r3, #15
movgt r3, #0
movle r3, #1
and r3, r3, #255
cmp r3, #0
bne .L3
mov r3, #0
mov r0, r3
sub sp, fp, #4
ldmfd sp!, {fp, pc}
.L6:
.align 2
.L5:
.word mpi_buff
.fnend
.size _Z8MPI_InitPiPPPc, .-_Z8MPI_InitPiPPPc
.align 2
.global _Z8MPI_InitPvPPS_
.type _Z8MPI_InitPvPPS_, %function
_Z8MPI_InitPvPPS_:
.fnstart
.LFB3:
@ args = 0, pretend = 0, frame = 8
@ frame_needed = 1, uses_anonymous_args = 0
stmfd sp!, {fp, lr}
.save {fp, lr}
.setfp fp, sp, #4
add fp, sp, #4
.pad #8
sub sp, sp, #8
str r0, [fp, #-8]
str r1, [fp, #-12]
ldr r0, [fp, #-8]
ldr r1, [fp, #-12]
bl _Z8MPI_InitPiPPPc
mov r3, r0
mov r0, r3
sub sp, fp, #4
ldmfd sp!, {fp, pc}
.fnend
.size _Z8MPI_InitPvPPS_, .-_Z8MPI_InitPvPPS_
.align 2
.global _Z13MPI_Comm_sizeiPi
.type _Z13MPI_Comm_sizeiPi, %function
_Z13MPI_Comm_sizeiPi:
.fnstart
.LFB4:
@ args = 0, pretend = 0, frame = 8
@ frame_needed = 1, uses_anonymous_args = 0
@ link register save eliminated.
str fp, [sp, #-4]!
add fp, sp, #0
sub sp, sp, #12
str r0, [fp, #-8]
str r1, [fp, #-12]
ldr r3, [fp, #-12]
mov r2, #16
str r2, [r3, #0]
mov r3, #0
mov r0, r3
add sp, fp, #0
ldmfd sp!, {fp}
bx lr
.cantunwind
.fnend
.size _Z13MPI_Comm_sizeiPi, .-_Z13MPI_Comm_sizeiPi
.align 2
.global _Z13MPI_Comm_rankiPi
.type _Z13MPI_Comm_rankiPi, %function
_Z13MPI_Comm_rankiPi:
.fnstart
.LFB5:
@ args = 0, pretend = 0, frame = 8
@ frame_needed = 1, uses_anonymous_args = 0
stmfd sp!, {fp, lr}
.save {fp, lr}
.setfp fp, sp, #4
add fp, sp, #4
.pad #8
sub sp, sp, #8
str r0, [fp, #-8]
str r1, [fp, #-12]
ldr r3, .L15
ldr r2, [r3, #0]
ldr r3, .L15+4
cmp r2, r3
bne .L12
bl m5_asgn
mov r3, r0
mov r2, r3
ldr r3, [fp, #-12]
str r2, [r3, #0]
ldr r3, [fp, #-12]
ldr r2, [r3, #0]
ldr r3, .L15
str r2, [r3, #0]
b .L13
.L12:
ldr r3, .L15
ldr r2, [r3, #0]
ldr r3, [fp, #-12]
str r2, [r3, #0]
.L13:
mov r3, #0
mov r0, r3
sub sp, fp, #4
ldmfd sp!, {fp, pc}
.L16:
.align 2
.L15:
.word myRank
.word 9999
.fnend
.size _Z13MPI_Comm_rankiPi, .-_Z13MPI_Comm_rankiPi
.align 2
.global _Z8MPI_SendPfiiiii
.type _Z8MPI_SendPfiiiii, %function
_Z8MPI_SendPfiiiii:
.fnstart
.LFB7:
@ args = 8, pretend = 0, frame = 24
@ frame_needed = 1, uses_anonymous_args = 0
@ link register save eliminated.
str fp, [sp, #-4]!
add fp, sp, #0
sub sp, sp, #28
str r0, [fp, #-16]
str r1, [fp, #-20]
str r2, [fp, #-24]
str r3, [fp, #-28]
ldr r3, [fp, #-28]
mov r3, r3, asl #6
orr r3, r3, #-268435456
str r3, [fp, #-28]
ldr r3, [fp, #-28]
str r3, [fp, #-8]
ldr r1, [fp, #-8]
ldr r2, [fp, #-16]
ldr r3, [fp, #-20]
#APP
@ 114 "../../lib/mpi.h" 1
1:
ldr r8, [r2]
str r8, [r1, #0]
add r2, r2, #4
subs r3, r3, #1
bne 1b
@ 0 "" 2
str r2, [fp, #-16]
str r3, [fp, #-20]
mov r3, #0
mov r0, r3
add sp, fp, #0
ldmfd sp!, {fp}
bx lr
.cantunwind
.fnend
.size _Z8MPI_SendPfiiiii, .-_Z8MPI_SendPfiiiii
.section .rodata
.align 2
.LC1:
.ascii "\012MPI_Send for double\000"
.text
.align 2
.global _Z8MPI_SendPdiiiii
.type _Z8MPI_SendPdiiiii, %function
_Z8MPI_SendPdiiiii:
.fnstart
.LFB8:
@ args = 8, pretend = 0, frame = 16
@ frame_needed = 1, uses_anonymous_args = 0
stmfd sp!, {fp, lr}
.save {fp, lr}
.setfp fp, sp, #4
add fp, sp, #4
.pad #16
sub sp, sp, #16
str r0, [fp, #-8]
str r1, [fp, #-12]
str r2, [fp, #-16]
str r3, [fp, #-20]
ldr r0, .L20
bl puts
mov r0, r3
sub sp, fp, #4
ldmfd sp!, {fp, pc}
.L21:
.align 2
.L20:
.word .LC1
.fnend
.size _Z8MPI_SendPdiiiii, .-_Z8MPI_SendPdiiiii
.align 2
.global _Z8MPI_RecvPfiiiiiPi
.type _Z8MPI_RecvPfiiiiiPi, %function
_Z8MPI_RecvPfiiiiiPi:
.fnstart
.LFB10:
@ args = 12, pretend = 0, frame = 24
@ frame_needed = 1, uses_anonymous_args = 0
@ link register save eliminated.
str fp, [sp, #-4]!
add fp, sp, #0
sub sp, sp, #28
str r0, [fp, #-16]
str r1, [fp, #-20]
str r2, [fp, #-24]
str r3, [fp, #-28]
ldr r3, [fp, #-28]
mov r3, r3, asl #6
orr r3, r3, #-268435456
str r3, [fp, #-28]
ldr r3, [fp, #-28]
str r3, [fp, #-8]
b .L23
.L24:
ldr r1, [fp, #-8]
ldr r2, [fp, #-16]
ldr r3, [fp, #-20]
#APP
@ 185 "../../lib/mpi.h" 1
ldr r8, [r1, #0]
str r8, [r2]
add r2, r2, #4
sub r3, r3, #1
@ 0 "" 2
str r2, [fp, #-16]
str r3, [fp, #-20]
.L23:
ldr r3, [fp, #-20]
cmp r3, #0
moveq r3, #0
movne r3, #1
and r3, r3, #255
cmp r3, #0
bne .L24
mov r3, #0
mov r0, r3
add sp, fp, #0
ldmfd sp!, {fp}
bx lr
.cantunwind
.fnend
.size _Z8MPI_RecvPfiiiiiPi, .-_Z8MPI_RecvPfiiiiiPi
.section .rodata
.align 2
.LC2:
.ascii "\012MPI_Recv for double\000"
.text
.align 2
.global _Z8MPI_RecvPdiiiiiPi
.type _Z8MPI_RecvPdiiiiiPi, %function
_Z8MPI_RecvPdiiiiiPi:
.fnstart
.LFB11:
@ args = 12, pretend = 0, frame = 16
@ frame_needed = 1, uses_anonymous_args = 0
stmfd sp!, {fp, lr}
.save {fp, lr}
.setfp fp, sp, #4
add fp, sp, #4
.pad #16
sub sp, sp, #16
str r0, [fp, #-8]
str r1, [fp, #-12]
str r2, [fp, #-16]
str r3, [fp, #-20]
ldr r0, .L27
bl puts
mov r0, r3
sub sp, fp, #4
ldmfd sp!, {fp, pc}
.L28:
.align 2
.L27:
.word .LC2
.fnend
.size _Z8MPI_RecvPdiiiiiPi, .-_Z8MPI_RecvPdiiiiiPi
.align 2
.global _Z9MPI_BcastPiiiii
.type _Z9MPI_BcastPiiiii, %function
_Z9MPI_BcastPiiiii:
.fnstart
.LFB12:
@ args = 4, pretend = 0, frame = 32
@ frame_needed = 1, uses_anonymous_args = 0
@ link register save eliminated.
str fp, [sp, #-4]!
add fp, sp, #0
sub sp, sp, #36
str r0, [fp, #-24]
str r1, [fp, #-28]
str r2, [fp, #-32]
str r3, [fp, #-36]
ldr r3, .L37
ldr r2, [r3, #0]
ldr r3, [fp, #-36]
cmp r2, r3
bne .L30
ldr r3, [fp, #-36]
orr r3, r3, #-268435456
orr r3, r3, #3072
str r3, [fp, #-36]
ldr r3, [fp, #-36]
str r3, [fp, #-16]
b .L31
.L32:
ldr r3, [fp, #-16]
ldr r2, [fp, #-24]
#APP
@ 233 "../../lib/mpi.h" 1
ldr r8, [r2]
str r8, [r3, #0]
@ 0 "" 2
ldr r3, [fp, #-24]
add r3, r3, #4
str r3, [fp, #-24]
ldr r3, [fp, #-28]
sub r3, r3, #1
str r3, [fp, #-28]
.L31:
ldr r3, [fp, #-28]
cmp r3, #0
movle r3, #0
movgt r3, #1
and r3, r3, #255
cmp r3, #0
bne .L32
b .L33
.L30:
ldr r3, .L37+4
str r3, [fp, #-12]
ldr r3, [fp, #-12]
str r3, [fp, #-8]
b .L34
.L35:
ldr r1, [fp, #-8]
ldr r2, [fp, #-24]
ldr r3, [fp, #-28]
#APP
@ 254 "../../lib/mpi.h" 1
ldr r8, [r1, #0]
str r8, [r2]
add r2, r2, #4
sub r3, r3, #1
@ 0 "" 2
str r2, [fp, #-24]
str r3, [fp, #-28]
.L34:
ldr r3, [fp, #-28]
cmp r3, #0
moveq r3, #0
movne r3, #1
and r3, r3, #255
cmp r3, #0
bne .L35
.L33:
mov r3, #0
mov r0, r3
add sp, fp, #0
ldmfd sp!, {fp}
bx lr
.L38:
.align 2
.L37:
.word myRank
.word -268432384
.cantunwind
.fnend
.size _Z9MPI_BcastPiiiii, .-_Z9MPI_BcastPiiiii
.align 2
.global _Z9MPI_BcastPfiiii
.type _Z9MPI_BcastPfiiii, %function
_Z9MPI_BcastPfiiii:
.fnstart
.LFB13:
@ args = 4, pretend = 0, frame = 32
@ frame_needed = 1, uses_anonymous_args = 0
@ link register save eliminated.
str fp, [sp, #-4]!
add fp, sp, #0
sub sp, sp, #36
str r0, [fp, #-24]
str r1, [fp, #-28]
str r2, [fp, #-32]
str r3, [fp, #-36]
ldr r3, .L47
ldr r2, [r3, #0]
ldr r3, [fp, #-36]
cmp r2, r3
bne .L40
ldr r3, [fp, #-36]
orr r3, r3, #-268435456
orr r3, r3, #3072
str r3, [fp, #-36]
ldr r3, [fp, #-36]
str r3, [fp, #-16]
b .L41
.L42:
ldr r3, [fp, #-16]
ldr r2, [fp, #-24]
#APP
@ 278 "../../lib/mpi.h" 1
ldr r8, [r2]
str r8, [r3, #0]
@ 0 "" 2
ldr r3, [fp, #-24]
add r3, r3, #4
str r3, [fp, #-24]
ldr r3, [fp, #-28]
sub r3, r3, #1
str r3, [fp, #-28]
.L41:
ldr r3, [fp, #-28]
cmp r3, #0
movle r3, #0
movgt r3, #1
and r3, r3, #255
cmp r3, #0
bne .L42
b .L43
.L40:
ldr r3, .L47+4
str r3, [fp, #-12]
ldr r3, [fp, #-12]
str r3, [fp, #-8]
b .L44
.L45:
ldr r1, [fp, #-8]
ldr r2, [fp, #-24]
ldr r3, [fp, #-28]
#APP
@ 301 "../../lib/mpi.h" 1
ldr r8, [r1, #0]
str r8, [r2]
add r2, r2, #4
sub r3, r3, #1
@ 0 "" 2
str r2, [fp, #-24]
str r3, [fp, #-28]
.L44:
ldr r3, [fp, #-28]
cmp r3, #0
moveq r3, #0
movne r3, #1
and r3, r3, #255
cmp r3, #0
bne .L45
.L43:
mov r3, #0
mov r0, r3
add sp, fp, #0
ldmfd sp!, {fp}
bx lr
.L48:
.align 2
.L47:
.word myRank
.word -268432384
.cantunwind
.fnend
.size _Z9MPI_BcastPfiiii, .-_Z9MPI_BcastPfiiii
.align 2
.global _Z11MPI_ScatterPiiiS_iiii
.type _Z11MPI_ScatterPiiiS_iiii, %function
_Z11MPI_ScatterPiiiS_iiii:
.fnstart
.LFB14:
@ args = 16, pretend = 0, frame = 96
@ frame_needed = 1, uses_anonymous_args = 0
stmfd sp!, {r4, r5, fp, lr}
.save {r4, r5, fp, lr}
.setfp fp, sp, #12
add fp, sp, #12
.pad #96
sub sp, sp, #96
str r0, [fp, #-96]
str r1, [fp, #-100]
str r2, [fp, #-104]
str r3, [fp, #-108]
sub r3, fp, #88
ldr r0, [fp, #16]
mov r1, r3
.LEHB0:
bl _Z13MPI_Comm_rankiPi
.LEHE0:
sub r3, fp, #84
ldr r0, [fp, #16]
mov r1, r3
bl _Z13MPI_Comm_sizeiPi
ldr r2, [fp, #-88]
ldr r3, [fp, #12]
cmp r2, r3
bne .L50
mov r3, #0
str r3, [fp, #-80]
b .L51
.L53:
ldr r2, [fp, #-80]
ldr r3, [fp, #12]
cmp r2, r3
beq .L52
ldr r3, [fp, #-80]
ldr r2, [fp, #-100]
mul r3, r2, r3
mov r3, r3, asl #2
ldr r2, [fp, #-96]
add r3, r2, r3
str r3, [fp, #-72]
ldr r3, [fp, #-100]
str r3, [fp, #-68]
ldr r3, [fp, #-104]
str r3, [fp, #-40]
ldr r3, [fp, #-80]
str r3, [fp, #-64]
mov r3, #0
str r3, [fp, #-36]
mov r3, #0
str r3, [fp, #-32]
ldr r3, [fp, #-64]
mov r3, r3, asl #6
orr r3, r3, #-268435456
str r3, [fp, #-64]
ldr r3, [fp, #-64]
str r3, [fp, #-60]
ldr r3, [fp, #-60]
ldr r1, [fp, #-72]
ldr r2, [fp, #-68]
mov r5, r1
mov r4, r2
#APP
@ 95 "../../lib/mpi.h" 1
1:
ldr r8, [r5]
str r8, [r3, #0]
add r5, r5, #4
subs r4, r4, #1
bne 1b
@ 0 "" 2
str r5, [fp, #-72]
str r4, [fp, #-68]
.L52:
ldr r3, [fp, #-80]
add r3, r3, #1
str r3, [fp, #-80]
.L51:
ldr r3, [fp, #-84]
ldr r2, [fp, #-80]
cmp r2, r3
movge r3, #0
movlt r3, #1
and r3, r3, #255
cmp r3, #0
bne .L53
mov r3, #0
str r3, [fp, #-76]
b .L54
.L55:
ldr r3, [fp, #-76]
mov r3, r3, asl #2
ldr r2, [fp, #-108]
add r3, r2, r3
ldr r1, [fp, #12]
ldr r2, [fp, #-76]
add r2, r1, r2
mov r2, r2, asl #2
ldr r1, [fp, #-96]
add r2, r1, r2
ldr r2, [r2, #0]
str r2, [r3, #0]
ldr r3, [fp, #-76]
add r3, r3, #1
str r3, [fp, #-76]
ldr r3, [fp, #4]
sub r3, r3, #1
str r3, [fp, #4]
.L54:
ldr r3, [fp, #4]
cmp r3, #0
movle r3, #0
movgt r3, #1
and r3, r3, #255
cmp r3, #0
bne .L55
b .L56
.L50:
ldr r3, [fp, #-108]
str r3, [fp, #-56]
ldr r3, [fp, #4]
str r3, [fp, #-52]
ldr r3, [fp, #8]
str r3, [fp, #-28]
ldr r3, [fp, #12]
str r3, [fp, #-48]
mov r3, #0
str r3, [fp, #-24]
mov r3, #0
str r3, [fp, #-20]
mov r3, #0
str r3, [fp, #-16]
ldr r3, [fp, #-48]
mov r3, r3, asl #6
orr r3, r3, #-268435456
str r3, [fp, #-48]
ldr r3, [fp, #-48]
str r3, [fp, #-44]
b .L57
.L58:
ldr r3, [fp, #-44]
ldr r1, [fp, #-56]
ldr r2, [fp, #-52]
mov r5, r1
mov r4, r2
#APP
@ 141 "../../lib/mpi.h" 1
ldr r8, [r3, #0]
str r8, [r5]
add r5, r5, #4
sub r4, r4, #1
@ 0 "" 2
str r5, [fp, #-56]
str r4, [fp, #-52]
.L57:
ldr r3, [fp, #-52]
cmp r3, #0
moveq r3, #0
movne r3, #1
and r3, r3, #255
cmp r3, #0
bne .L58
.L56:
mov r3, #0
b .L62
.L61:
.LEHB1:
bl __cxa_end_cleanup
.LEHE1:
.L62:
mov r0, r3
sub sp, fp, #12
ldmfd sp!, {r4, r5, fp, pc}
.global __gxx_personality_v0
.personality __gxx_personality_v0
.handlerdata
.LLSDA14:
.byte 0xff
.byte 0xff
.byte 0x1
.uleb128 .LLSDACSE14-.LLSDACSB14
.LLSDACSB14:
.uleb128 .LEHB0-.LFB14
.uleb128 .LEHE0-.LEHB0
.uleb128 .L61-.LFB14
.uleb128 0
.uleb128 .LEHB1-.LFB14
.uleb128 .LEHE1-.LEHB1
.uleb128 0
.uleb128 0
.LLSDACSE14:
.text
.fnend
.size _Z11MPI_ScatterPiiiS_iiii, .-_Z11MPI_ScatterPiiiS_iiii
.align 2
.global _Z11MPI_ScatterPfiiS_iiii
.type _Z11MPI_ScatterPfiiS_iiii, %function
_Z11MPI_ScatterPfiiS_iiii:
.fnstart
.LFB15:
@ args = 16, pretend = 0, frame = 96
@ frame_needed = 1, uses_anonymous_args = 0
stmfd sp!, {r4, r5, fp, lr}
.save {r4, r5, fp, lr}
.setfp fp, sp, #12
add fp, sp, #12
.pad #96
sub sp, sp, #96
str r0, [fp, #-96]
str r1, [fp, #-100]
str r2, [fp, #-104]
str r3, [fp, #-108]
sub r3, fp, #88
ldr r0, [fp, #16]
mov r1, r3
.LEHB2:
bl _Z13MPI_Comm_rankiPi
.LEHE2:
sub r3, fp, #84
ldr r0, [fp, #16]
mov r1, r3
bl _Z13MPI_Comm_sizeiPi
ldr r2, [fp, #-88]
ldr r3, [fp, #12]
cmp r2, r3
bne .L64
mov r3, #0
str r3, [fp, #-80]
b .L65
.L68:
ldr r2, [fp, #-80]
ldr r3, [fp, #12]
cmp r2, r3
beq .L66
ldr r3, [fp, #-80]
ldr r2, [fp, #-100]
mul r3, r2, r3
mov r3, r3, asl #2
ldr r2, [fp, #-96]
add r3, r2, r3
str r3, [fp, #-72]
ldr r3, [fp, #-100]
str r3, [fp, #-68]
ldr r3, [fp, #-104]
str r3, [fp, #-40]
ldr r3, [fp, #-80]
str r3, [fp, #-64]
mov r3, #0
str r3, [fp, #-36]
mov r3, #0
str r3, [fp, #-32]
ldr r3, [fp, #-64]
mov r3, r3, asl #6
orr r3, r3, #-268435456
str r3, [fp, #-64]
ldr r3, [fp, #-64]
str r3, [fp, #-60]
ldr r3, [fp, #-60]
ldr r1, [fp, #-72]
ldr r2, [fp, #-68]
mov r5, r1
mov r4, r2
#APP
@ 114 "../../lib/mpi.h" 1
1:
ldr r8, [r5]
str r8, [r3, #0]
add r5, r5, #4
subs r4, r4, #1
bne 1b
@ 0 "" 2
str r5, [fp, #-72]
str r4, [fp, #-68]
.L66:
ldr r3, [fp, #-80]
add r3, r3, #1
str r3, [fp, #-80]
.L65:
ldr r3, [fp, #-84]
ldr r2, [fp, #-80]
cmp r2, r3
movge r3, #0
movlt r3, #1
and r3, r3, #255
cmp r3, #0
bne .L68
mov r3, #0
str r3, [fp, #-76]
b .L69
.L70:
ldr r3, [fp, #-76]
mov r3, r3, asl #2
ldr r2, [fp, #-108]
add r3, r2, r3
ldr r1, [fp, #12]
ldr r2, [fp, #-76]
add r2, r1, r2
mov r2, r2, asl #2
ldr r1, [fp, #-96]
add r2, r1, r2
ldr r2, [r2, #0] @ float
str r2, [r3, #0] @ float
ldr r3, [fp, #-76]
add r3, r3, #1
str r3, [fp, #-76]
ldr r3, [fp, #4]
sub r3, r3, #1
str r3, [fp, #4]
.L69:
ldr r3, [fp, #4]
cmp r3, #0
movle r3, #0
movgt r3, #1
and r3, r3, #255
cmp r3, #0
bne .L70
b .L71
.L64:
ldr r3, [fp, #-108]
str r3, [fp, #-56]
ldr r3, [fp, #4]
str r3, [fp, #-52]
ldr r3, [fp, #8]
str r3, [fp, #-28]
ldr r3, [fp, #12]
str r3, [fp, #-48]
mov r3, #0
str r3, [fp, #-24]
mov r3, #0
str r3, [fp, #-20]
mov r3, #0
str r3, [fp, #-16]
ldr r3, [fp, #-48]
mov r3, r3, asl #6
orr r3, r3, #-268435456
str r3, [fp, #-48]
ldr r3, [fp, #-48]
str r3, [fp, #-44]
b .L72
.L73:
ldr r3, [fp, #-44]
ldr r1, [fp, #-56]
ldr r2, [fp, #-52]
mov r5, r1
mov r4, r2
#APP
@ 185 "../../lib/mpi.h" 1
ldr r8, [r3, #0]
str r8, [r5]
add r5, r5, #4
sub r4, r4, #1
@ 0 "" 2
str r5, [fp, #-56]
str r4, [fp, #-52]
.L72:
ldr r3, [fp, #-52]
cmp r3, #0
moveq r3, #0
movne r3, #1
and r3, r3, #255
cmp r3, #0
bne .L73
.L71:
mov r3, #0
b .L78
.L77:
.LEHB3:
bl __cxa_end_cleanup
.LEHE3:
.L78:
mov r0, r3
sub sp, fp, #12
ldmfd sp!, {r4, r5, fp, pc}
.personality __gxx_personality_v0
.handlerdata
.LLSDA15:
.byte 0xff
.byte 0xff
.byte 0x1
.uleb128 .LLSDACSE15-.LLSDACSB15
.LLSDACSB15:
.uleb128 .LEHB2-.LFB15
.uleb128 .LEHE2-.LEHB2
.uleb128 .L77-.LFB15
.uleb128 0
.uleb128 .LEHB3-.LFB15
.uleb128 .LEHE3-.LEHB3
.uleb128 0
.uleb128 0
.LLSDACSE15:
.text
.fnend
.size _Z11MPI_ScatterPfiiS_iiii, .-_Z11MPI_ScatterPfiiS_iiii
.align 2
.global _Z10MPI_GatherPiiiS_iiii
.type _Z10MPI_GatherPiiiS_iiii, %function
_Z10MPI_GatherPiiiS_iiii:
.fnstart
.LFB16:
@ args = 16, pretend = 0, frame = 96
@ frame_needed = 1, uses_anonymous_args = 0
stmfd sp!, {r4, r5, fp, lr}
.save {r4, r5, fp, lr}
.setfp fp, sp, #12
add fp, sp, #12
.pad #96
sub sp, sp, #96
str r0, [fp, #-96]
str r1, [fp, #-100]
str r2, [fp, #-104]
str r3, [fp, #-108]
sub r3, fp, #88
ldr r0, [fp, #16]
mov r1, r3
.LEHB4:
bl _Z13MPI_Comm_rankiPi
.LEHE4:
sub r3, fp, #84
ldr r0, [fp, #16]
mov r1, r3
bl _Z13MPI_Comm_sizeiPi
ldr r2, [fp, #-88]
ldr r3, [fp, #12]
cmp r2, r3
bne .L80
mov r3, #0
str r3, [fp, #-80]
b .L81
.L85:
ldr r2, [fp, #-80]
ldr r3, [fp, #12]
cmp r2, r3
beq .L82
ldr r3, [fp, #-80]
ldr r2, [fp, #4]
mul r3, r2, r3
mov r3, r3, asl #2
ldr r2, [fp, #-108]
add r3, r2, r3
str r3, [fp, #-72]
ldr r3, [fp, #4]
str r3, [fp, #-68]
ldr r3, [fp, #8]
str r3, [fp, #-40]
ldr r3, [fp, #-80]
str r3, [fp, #-64]
mov r3, #0
str r3, [fp, #-36]
mov r3, #0
str r3, [fp, #-32]
mov r3, #0
str r3, [fp, #-28]
ldr r3, [fp, #-64]
mov r3, r3, asl #6
orr r3, r3, #-268435456
str r3, [fp, #-64]
ldr r3, [fp, #-64]
str r3, [fp, #-60]
b .L83
.L84:
ldr r3, [fp, #-60]
ldr r1, [fp, #-72]
ldr r2, [fp, #-68]
mov r5, r1
mov r4, r2
#APP
@ 141 "../../lib/mpi.h" 1
ldr r8, [r3, #0]
str r8, [r5]
add r5, r5, #4
sub r4, r4, #1
@ 0 "" 2
str r5, [fp, #-72]
str r4, [fp, #-68]
.L83:
ldr r3, [fp, #-68]
cmp r3, #0
moveq r3, #0
movne r3, #1
and r3, r3, #255
cmp r3, #0
bne .L84
.L82:
ldr r3, [fp, #-80]
add r3, r3, #1
str r3, [fp, #-80]
.L81:
ldr r3, [fp, #-84]
ldr r2, [fp, #-80]
cmp r2, r3
movge r3, #0
movlt r3, #1
and r3, r3, #255
cmp r3, #0
bne .L85
mov r3, #0
str r3, [fp, #-76]
b .L86
.L87:
ldr r3, [fp, #-76]
mov r3, r3, asl #2
ldr r2, [fp, #-108]
add r3, r2, r3
ldr r1, [fp, #12]
ldr r2, [fp, #-76]
add r2, r1, r2
mov r2, r2, asl #2
ldr r1, [fp, #-96]
add r2, r1, r2
ldr r2, [r2, #0]
str r2, [r3, #0]
ldr r3, [fp, #-76]
add r3, r3, #1
str r3, [fp, #-76]
ldr r3, [fp, #4]
sub r3, r3, #1
str r3, [fp, #4]
.L86:
ldr r3, [fp, #4]
cmp r3, #0
movle r3, #0
movgt r3, #1
and r3, r3, #255
cmp r3, #0
bne .L87
b .L88
.L80:
ldr r3, [fp, #-96]
str r3, [fp, #-56]
ldr r3, [fp, #-100]
str r3, [fp, #-52]
ldr r3, [fp, #-104]
str r3, [fp, #-24]
ldr r3, [fp, #12]
str r3, [fp, #-48]
mov r3, #0
str r3, [fp, #-20]
mov r3, #0
str r3, [fp, #-16]
ldr r3, [fp, #-48]
mov r3, r3, asl #6
orr r3, r3, #-268435456
str r3, [fp, #-48]
ldr r3, [fp, #-48]
str r3, [fp, #-44]
ldr r3, [fp, #-44]
ldr r1, [fp, #-56]
ldr r2, [fp, #-52]
mov r5, r1
mov r4, r2
#APP
@ 95 "../../lib/mpi.h" 1
1:
ldr r8, [r5]
str r8, [r3, #0]
add r5, r5, #4
subs r4, r4, #1
bne 1b
@ 0 "" 2
str r5, [fp, #-56]
str r4, [fp, #-52]
.L88:
mov r3, #0
b .L92
.L91:
.LEHB5:
bl __cxa_end_cleanup
.LEHE5:
.L92:
mov r0, r3
sub sp, fp, #12
ldmfd sp!, {r4, r5, fp, pc}
.personality __gxx_personality_v0
.handlerdata
.LLSDA16:
.byte 0xff
.byte 0xff
.byte 0x1
.uleb128 .LLSDACSE16-.LLSDACSB16
.LLSDACSB16:
.uleb128 .LEHB4-.LFB16
.uleb128 .LEHE4-.LEHB4
.uleb128 .L91-.LFB16
.uleb128 0
.uleb128 .LEHB5-.LFB16
.uleb128 .LEHE5-.LEHB5
.uleb128 0
.uleb128 0
.LLSDACSE16:
.text
.fnend
.size _Z10MPI_GatherPiiiS_iiii, .-_Z10MPI_GatherPiiiS_iiii
.align 2
.global _Z10MPI_GatherPfiiS_iiii
.type _Z10MPI_GatherPfiiS_iiii, %function
_Z10MPI_GatherPfiiS_iiii:
.fnstart
.LFB17:
@ args = 16, pretend = 0, frame = 96
@ frame_needed = 1, uses_anonymous_args = 0
stmfd sp!, {r4, r5, fp, lr}
.save {r4, r5, fp, lr}
.setfp fp, sp, #12
add fp, sp, #12
.pad #96
sub sp, sp, #96
str r0, [fp, #-96]
str r1, [fp, #-100]
str r2, [fp, #-104]
str r3, [fp, #-108]
sub r3, fp, #88
ldr r0, [fp, #16]
mov r1, r3
.LEHB6:
bl _Z13MPI_Comm_rankiPi
.LEHE6:
sub r3, fp, #84
ldr r0, [fp, #16]
mov r1, r3
bl _Z13MPI_Comm_sizeiPi
ldr r2, [fp, #-88]
ldr r3, [fp, #12]
cmp r2, r3
bne .L94
mov r3, #0
str r3, [fp, #-80]
b .L95
.L100:
ldr r2, [fp, #-80]
ldr r3, [fp, #12]
cmp r2, r3
beq .L96
ldr r3, [fp, #-80]
ldr r2, [fp, #4]
mul r3, r2, r3
mov r3, r3, asl #2
ldr r2, [fp, #-108]
add r3, r2, r3
str r3, [fp, #-72]
ldr r3, [fp, #4]
str r3, [fp, #-68]
ldr r3, [fp, #8]
str r3, [fp, #-40]
ldr r3, [fp, #-80]
str r3, [fp, #-64]
mov r3, #0
str r3, [fp, #-36]
mov r3, #0
str r3, [fp, #-32]
mov r3, #0
str r3, [fp, #-28]
ldr r3, [fp, #-64]
mov r3, r3, asl #6
orr r3, r3, #-268435456
str r3, [fp, #-64]
ldr r3, [fp, #-64]
str r3, [fp, #-60]
b .L97
.L98:
ldr r3, [fp, #-60]
ldr r1, [fp, #-72]
ldr r2, [fp, #-68]
mov r5, r1
mov r4, r2
#APP
@ 185 "../../lib/mpi.h" 1
ldr r8, [r3, #0]
str r8, [r5]
add r5, r5, #4
sub r4, r4, #1
@ 0 "" 2
str r5, [fp, #-72]
str r4, [fp, #-68]
.L97:
ldr r3, [fp, #-68]
cmp r3, #0
moveq r3, #0
movne r3, #1
and r3, r3, #255
cmp r3, #0
bne .L98
.L96:
ldr r3, [fp, #-80]
add r3, r3, #1
str r3, [fp, #-80]
.L95:
ldr r3, [fp, #-84]
ldr r2, [fp, #-80]
cmp r2, r3
movge r3, #0
movlt r3, #1
and r3, r3, #255
cmp r3, #0
bne .L100
mov r3, #0
str r3, [fp, #-76]
b .L101
.L102:
ldr r3, [fp, #-76]
mov r3, r3, asl #2
ldr r2, [fp, #-108]
add r3, r2, r3
ldr r1, [fp, #12]
ldr r2, [fp, #-76]
add r2, r1, r2
mov r2, r2, asl #2
ldr r1, [fp, #-96]
add r2, r1, r2
ldr r2, [r2, #0] @ float
str r2, [r3, #0] @ float
ldr r3, [fp, #-76]
add r3, r3, #1
str r3, [fp, #-76]
ldr r3, [fp, #4]
sub r3, r3, #1
str r3, [fp, #4]
.L101:
ldr r3, [fp, #4]
cmp r3, #0
movle r3, #0
movgt r3, #1
and r3, r3, #255
cmp r3, #0
bne .L102
b .L103
.L94:
ldr r3, [fp, #-96]
str r3, [fp, #-56]
ldr r3, [fp, #-100]
str r3, [fp, #-52]
ldr r3, [fp, #-104]
str r3, [fp, #-24]
ldr r3, [fp, #12]
str r3, [fp, #-48]
mov r3, #0
str r3, [fp, #-20]
mov r3, #0
str r3, [fp, #-16]
ldr r3, [fp, #-48]
mov r3, r3, asl #6
orr r3, r3, #-268435456
str r3, [fp, #-48]
ldr r3, [fp, #-48]
str r3, [fp, #-44]
ldr r3, [fp, #-44]
ldr r1, [fp, #-56]
ldr r2, [fp, #-52]
mov r5, r1
mov r4, r2
#APP
@ 114 "../../lib/mpi.h" 1
1:
ldr r8, [r5]
str r8, [r3, #0]
add r5, r5, #4
subs r4, r4, #1
bne 1b
@ 0 "" 2
str r5, [fp, #-56]
str r4, [fp, #-52]
.L103:
mov r3, #0
b .L108
.L107:
.LEHB7:
bl __cxa_end_cleanup
.LEHE7:
.L108:
mov r0, r3
sub sp, fp, #12
ldmfd sp!, {r4, r5, fp, pc}
.personality __gxx_personality_v0
.handlerdata
.LLSDA17:
.byte 0xff
.byte 0xff
.byte 0x1
.uleb128 .LLSDACSE17-.LLSDACSB17
.LLSDACSB17:
.uleb128 .LEHB6-.LFB17
.uleb128 .LEHE6-.LEHB6
.uleb128 .L107-.LFB17
.uleb128 0
.uleb128 .LEHB7-.LFB17
.uleb128 .LEHE7-.LEHB7
.uleb128 0
.uleb128 0
.LLSDACSE17:
.text
.fnend
.size _Z10MPI_GatherPfiiS_iiii, .-_Z10MPI_GatherPfiiS_iiii
.align 2
.global _Z8MPI_WaitPiS_
.type _Z8MPI_WaitPiS_, %function
_Z8MPI_WaitPiS_:
.fnstart
.LFB18:
@ args = 0, pretend = 0, frame = 8
@ frame_needed = 1, uses_anonymous_args = 0
@ link register save eliminated.
str fp, [sp, #-4]!
add fp, sp, #0
sub sp, sp, #12
str r0, [fp, #-8]
str r1, [fp, #-12]
mov r3, #0
mov r0, r3
add sp, fp, #0
ldmfd sp!, {fp}
bx lr
.cantunwind
.fnend
.size _Z8MPI_WaitPiS_, .-_Z8MPI_WaitPiS_
.align 2
.global _Z10MPI_ReducePiS_iiiii
.type _Z10MPI_ReducePiS_iiiii, %function
_Z10MPI_ReducePiS_iiiii:
.fnstart
.LFB19:
@ args = 12, pretend = 0, frame = 152
@ frame_needed = 1, uses_anonymous_args = 0
@ link register save eliminated.
stmfd sp!, {r4, r5, fp}
add fp, sp, #8
sub sp, sp, #156
str r0, [fp, #-152]
str r1, [fp, #-156]
str r2, [fp, #-160]
str r3, [fp, #-164]
ldr r3, [fp, #-160]
str r3, [fp, #-144]
ldr r3, .L129
ldr r2, [r3, #0]
ldr r3, [fp, #8]
cmp r2, r3
bne .L112
b .L113
.L124:
ldr r2, [fp, #-160]
ldr r3, [fp, #-144]
rsb r3, r3, r2
mov r3, r3, asl #2
ldr r2, [fp, #-152]
add r3, r2, r3
ldr r2, [r3, #0]
ldr r1, [fp, #8]
mvn r3, #63
mov r1, r1, asl #2
sub r0, fp, #12
add r1, r0, r1
add r3, r1, r3
str r2, [r3, #0]
mov r3, #0
str r3, [fp, #-140]
b .L114
.L118:
ldr r2, [fp, #-140]
ldr r3, [fp, #8]
cmp r2, r3
beq .L115
ldr r3, [fp, #-140]
mov r3, r3, asl #2
sub r2, fp, #76
add r3, r2, r3
str r3, [fp, #-136]
mov r3, #1
str r3, [fp, #-132]
ldr r3, [fp, #-164]
str r3, [fp, #-104]
ldr r3, [fp, #-140]
str r3, [fp, #-128]
mov r3, #0
str r3, [fp, #-100]
mov r3, #0
str r3, [fp, #-96]
mov r3, #0
str r3, [fp, #-92]
ldr r3, [fp, #-128]
mov r3, r3, asl #6
orr r3, r3, #-268435456
str r3, [fp, #-128]
ldr r3, [fp, #-128]
str r3, [fp, #-124]
b .L116
.L117:
ldr r3, [fp, #-124]
ldr r1, [fp, #-136]
ldr r2, [fp, #-132]
mov r5, r1
mov r4, r2
#APP
@ 141 "../../lib/mpi.h" 1
ldr r8, [r3, #0]
str r8, [r5]
add r5, r5, #4
sub r4, r4, #1
@ 0 "" 2
str r5, [fp, #-136]
str r4, [fp, #-132]
.L116:
ldr r3, [fp, #-132]
cmp r3, #0
moveq r3, #0
movne r3, #1
and r3, r3, #255
cmp r3, #0
bne .L117
.L115:
ldr r3, [fp, #-140]
add r3, r3, #1
str r3, [fp, #-140]
.L114:
ldr r3, [fp, #-140]
cmp r3, #15
movgt r3, #0
movle r3, #1
and r3, r3, #255
cmp r3, #0
bne .L118
ldr r2, [fp, #-160]
ldr r3, [fp, #-144]
rsb r3, r3, r2
mov r3, r3, asl #2
ldr r2, [fp, #-156]
add r3, r2, r3
ldr r2, [fp, #-76]
str r2, [r3, #0]
mov r3, #1
str r3, [fp, #-140]
b .L119
.L123:
ldr r3, [fp, #4]
cmp r3, #1
bne .L120
ldr r2, [fp, #-140]
mvn r3, #63
mov r2, r2, asl #2
sub r1, fp, #12
add r2, r1, r2
add r3, r2, r3
ldr r2, [r3, #0]
ldr r1, [fp, #-160]
ldr r3, [fp, #-144]
rsb r3, r3, r1
mov r3, r3, asl #2
ldr r1, [fp, #-156]
add r3, r1, r3
ldr r3, [r3, #0]
cmp r2, r3
ble .L121
ldr r2, [fp, #-160]
ldr r3, [fp, #-144]
rsb r3, r3, r2
mov r3, r3, asl #2
ldr r2, [fp, #-156]
add r3, r2, r3
ldr r1, [fp, #-140]
mvn r2, #63
mov r1, r1, asl #2
sub ip, fp, #12
add r1, ip, r1
add r2, r1, r2
ldr r2, [r2, #0]
str r2, [r3, #0]
b .L121
.L120:
ldr r3, [fp, #4]
cmp r3, #2
bne .L122
ldr r2, [fp, #-140]
mvn r3, #63
mov r2, r2, asl #2
sub r0, fp, #12
add r2, r0, r2
add r3, r2, r3
ldr r2, [r3, #0]
ldr r1, [fp, #-160]
ldr r3, [fp, #-144]
rsb r3, r3, r1
mov r3, r3, asl #2
ldr r1, [fp, #-156]
add r3, r1, r3
ldr r3, [r3, #0]
cmp r2, r3
bge .L121
ldr r2, [fp, #-160]
ldr r3, [fp, #-144]
rsb r3, r3, r2
mov r3, r3, asl #2
ldr r2, [fp, #-156]
add r3, r2, r3
ldr r1, [fp, #-140]
mvn r2, #63
mov r1, r1, asl #2
sub ip, fp, #12
add r1, ip, r1
add r2, r1, r2
ldr r2, [r2, #0]
str r2, [r3, #0]
b .L121
.L122:
ldr r3, [fp, #4]
cmp r3, #3
bne .L121
ldr r2, [fp, #-160]
ldr r3, [fp, #-144]
rsb r3, r3, r2
mov r3, r3, asl #2
ldr r2, [fp, #-156]
add r3, r2, r3
ldr r1, [fp, #-160]
ldr r2, [fp, #-144]
rsb r2, r2, r1
mov r2, r2, asl #2
ldr r1, [fp, #-156]
add r2, r1, r2
ldr r1, [r2, #0]
ldr r0, [fp, #-140]
mvn r2, #63
mov r0, r0, asl #2
sub ip, fp, #12
add r0, ip, r0
add r2, r0, r2
ldr r2, [r2, #0]
add r2, r1, r2
str r2, [r3, #0]
.L121:
ldr r3, [fp, #-140]
add r3, r3, #1
str r3, [fp, #-140]
.L119:
ldr r3, [fp, #-140]
cmp r3, #15
movgt r3, #0
movle r3, #1
and r3, r3, #255
cmp r3, #0
bne .L123
ldr r3, [fp, #-144]
sub r3, r3, #1
str r3, [fp, #-144]
.L113:
ldr r3, [fp, #-144]
cmp r3, #0
movle r3, #0
movgt r3, #1
and r3, r3, #255
cmp r3, #0
bne .L124
b .L125
.L112:
ldr r3, [fp, #-160]
str r3, [fp, #-144]
b .L126
.L127:
ldr r2, [fp, #-160]
ldr r3, [fp, #-144]
rsb r3, r3, r2
mov r3, r3, asl #2
ldr r2, [fp, #-152]
add r3, r2, r3
str r3, [fp, #-120]
mov r3, #1
str r3, [fp, #-116]
ldr r3, [fp, #-164]
str r3, [fp, #-88]
ldr r3, [fp, #8]
str r3, [fp, #-112]
mov r3, #0
str r3, [fp, #-84]
mov r3, #0
str r3, [fp, #-80]
ldr r3, [fp, #-112]
mov r3, r3, asl #6
orr r3, r3, #-268435456
str r3, [fp, #-112]
ldr r3, [fp, #-112]
str r3, [fp, #-108]
ldr r3, [fp, #-108]
ldr r1, [fp, #-120]
ldr r2, [fp, #-116]
mov r5, r1
mov r4, r2
#APP
@ 95 "../../lib/mpi.h" 1
1:
ldr r8, [r5]
str r8, [r3, #0]
add r5, r5, #4
subs r4, r4, #1
bne 1b
@ 0 "" 2
str r5, [fp, #-120]
str r4, [fp, #-116]
ldr r3, [fp, #-144]
sub r3, r3, #1
str r3, [fp, #-144]
.L126:
ldr r3, [fp, #-144]
cmp r3, #0
moveq r3, #0
movne r3, #1
and r3, r3, #255
cmp r3, #0
bne .L127
.L125:
mov r3, #0
mov r0, r3
sub sp, fp, #8
ldmfd sp!, {r4, r5, fp}
bx lr
.L130:
.align 2
.L129:
.word myRank
.cantunwind
.fnend
.size _Z10MPI_ReducePiS_iiiii, .-_Z10MPI_ReducePiS_iiiii
.global __aeabi_fcmpgt
.global __aeabi_fcmplt
.global __aeabi_fadd
.align 2
.global _Z10MPI_ReducePfS_iiiii
.type _Z10MPI_ReducePfS_iiiii, %function
_Z10MPI_ReducePfS_iiiii:
.fnstart
.LFB20:
@ args = 12, pretend = 0, frame = 152
@ frame_needed = 1, uses_anonymous_args = 0
stmfd sp!, {r4, r5, fp, lr}
add fp, sp, #12
sub sp, sp, #152
str r0, [fp, #-152]
str r1, [fp, #-156]
str r2, [fp, #-160]
str r3, [fp, #-164]
ldr r3, [fp, #-160]
str r3, [fp, #-144]
ldr r3, .L155
ldr r2, [r3, #0]
ldr r3, [fp, #8]
cmp r2, r3
bne .L132
b .L133
.L147:
ldr r2, [fp, #-160]
ldr r3, [fp, #-144]
rsb r3, r3, r2
mov r3, r3, asl #2
ldr r2, [fp, #-152]
add r3, r2, r3
ldr r2, [r3, #0] @ float
ldr r1, [fp, #8]
mvn r3, #63
mov r1, r1, asl #2
sub r0, fp, #12
add r1, r0, r1
add r3, r1, r3
str r2, [r3, #0] @ float
mov r3, #0
str r3, [fp, #-140]
b .L134
.L139:
ldr r2, [fp, #-140]
ldr r3, [fp, #8]
cmp r2, r3
beq .L135
ldr r3, [fp, #-140]
mov r3, r3, asl #2
sub r2, fp, #76
add r3, r2, r3
str r3, [fp, #-136]
mov r3, #1
str r3, [fp, #-132]
ldr r3, [fp, #-164]
str r3, [fp, #-104]
ldr r3, [fp, #-140]
str r3, [fp, #-128]
mov r3, #0
str r3, [fp, #-100]
mov r3, #0
str r3, [fp, #-96]
mov r3, #0
str r3, [fp, #-92]
ldr r3, [fp, #-128]
mov r3, r3, asl #6
orr r3, r3, #-268435456
str r3, [fp, #-128]
ldr r3, [fp, #-128]
str r3, [fp, #-124]
b .L136
.L137:
ldr r3, [fp, #-124]
ldr r1, [fp, #-136]
ldr r2, [fp, #-132]
mov r5, r1
mov r4, r2
#APP
@ 185 "../../lib/mpi.h" 1
ldr r8, [r3, #0]
str r8, [r5]
add r5, r5, #4
sub r4, r4, #1
@ 0 "" 2
str r5, [fp, #-136]
str r4, [fp, #-132]
.L136:
ldr r3, [fp, #-132]
cmp r3, #0
moveq r3, #0
movne r3, #1
and r3, r3, #255
cmp r3, #0
bne .L137
.L135:
ldr r3, [fp, #-140]
add r3, r3, #1
str r3, [fp, #-140]
.L134:
ldr r3, [fp, #-140]
cmp r3, #15
movgt r3, #0
movle r3, #1
and r3, r3, #255
cmp r3, #0
bne .L139
ldr r2, [fp, #-160]
ldr r3, [fp, #-144]
rsb r3, r3, r2
mov r3, r3, asl #2
ldr r2, [fp, #-156]
add r3, r2, r3
ldr r2, [fp, #-76] @ float
str r2, [r3, #0] @ float
mov r3, #1
str r3, [fp, #-140]
b .L140
.L146:
ldr r3, [fp, #4]
cmp r3, #1
bne .L141
ldr r2, [fp, #-140]
mvn r3, #63
mov r2, r2, asl #2
sub r1, fp, #12
add r2, r1, r2
add r3, r2, r3
ldr r2, [r3, #0] @ float
ldr r1, [fp, #-160]
ldr r3, [fp, #-144]
rsb r3, r3, r1
mov r3, r3, asl #2
ldr r1, [fp, #-156]
add r3, r1, r3
ldr r3, [r3, #0] @ float
mov r0, r2
mov r1, r3
bl __aeabi_fcmpgt
mov r3, r0
cmp r3, #0
beq .L142
.L153:
ldr r2, [fp, #-160]
ldr r3, [fp, #-144]
rsb r3, r3, r2
mov r3, r3, asl #2
ldr r2, [fp, #-156]
add r3, r2, r3
ldr r1, [fp, #-140]
mvn r2, #63
mov r1, r1, asl #2
sub r0, fp, #12
add r1, r0, r1
add r2, r1, r2
ldr r2, [r2, #0] @ float
str r2, [r3, #0] @ float
b .L142
.L141:
ldr r3, [fp, #4]
cmp r3, #2
bne .L144
ldr r2, [fp, #-140]
mvn r3, #63
mov r2, r2, asl #2
sub r1, fp, #12
add r2, r1, r2
add r3, r2, r3
ldr r2, [r3, #0] @ float
ldr r1, [fp, #-160]
ldr r3, [fp, #-144]
rsb r3, r3, r1
mov r3, r3, asl #2
ldr r1, [fp, #-156]
add r3, r1, r3
ldr r3, [r3, #0] @ float
mov r0, r2
mov r1, r3
bl __aeabi_fcmplt
mov r3, r0
cmp r3, #0
beq .L142
.L154:
ldr r2, [fp, #-160]
ldr r3, [fp, #-144]
rsb r3, r3, r2
mov r3, r3, asl #2
ldr r2, [fp, #-156]
add r3, r2, r3
ldr r1, [fp, #-140]
mvn r2, #63
mov r1, r1, asl #2
sub r0, fp, #12
add r1, r0, r1
add r2, r1, r2
ldr r2, [r2, #0] @ float
str r2, [r3, #0] @ float
b .L142
.L144:
ldr r3, [fp, #4]
cmp r3, #3
bne .L142
ldr r2, [fp, #-160]
ldr r3, [fp, #-144]
rsb r3, r3, r2
mov r3, r3, asl #2
ldr r2, [fp, #-156]
add r4, r2, r3
ldr r2, [fp, #-160]
ldr r3, [fp, #-144]
rsb r3, r3, r2
mov r3, r3, asl #2
ldr r2, [fp, #-156]
add r3, r2, r3
ldr r2, [r3, #0] @ float
ldr r1, [fp, #-140]
mvn r3, #63
mov r1, r1, asl #2
sub r0, fp, #12
add r1, r0, r1
add r3, r1, r3
ldr r3, [r3, #0] @ float
mov r0, r2
mov r1, r3
bl __aeabi_fadd
mov r3, r0
str r3, [r4, #0] @ float
.L142:
ldr r3, [fp, #-140]
add r3, r3, #1
str r3, [fp, #-140]
.L140:
ldr r3, [fp, #-140]
cmp r3, #15
movgt r3, #0
movle r3, #1
and r3, r3, #255
cmp r3, #0
bne .L146
ldr r3, [fp, #-144]
sub r3, r3, #1
str r3, [fp, #-144]
.L133:
ldr r3, [fp, #-144]
cmp r3, #0
movle r3, #0
movgt r3, #1
and r3, r3, #255
cmp r3, #0
bne .L147
b .L148
.L132:
ldr r3, [fp, #-160]
str r3, [fp, #-144]
b .L149
.L151:
ldr r2, [fp, #-160]
ldr r3, [fp, #-144]
rsb r3, r3, r2
mov r3, r3, asl #2
ldr r2, [fp, #-152]
add r3, r2, r3
str r3, [fp, #-120]
mov r3, #1
str r3, [fp, #-116]
ldr r3, [fp, #-164]
str r3, [fp, #-88]
ldr r3, [fp, #8]
str r3, [fp, #-112]
mov r3, #0
str r3, [fp, #-84]
mov r3, #0
str r3, [fp, #-80]
ldr r3, [fp, #-112]
mov r3, r3, asl #6
orr r3, r3, #-268435456
str r3, [fp, #-112]
ldr r3, [fp, #-112]
str r3, [fp, #-108]
ldr r3, [fp, #-108]
ldr r1, [fp, #-120]
ldr r2, [fp, #-116]
mov r5, r1
mov r4, r2
#APP
@ 114 "../../lib/mpi.h" 1
1:
ldr r8, [r5]
str r8, [r3, #0]
add r5, r5, #4
subs r4, r4, #1
bne 1b
@ 0 "" 2
str r5, [fp, #-120]
str r4, [fp, #-116]
ldr r3, [fp, #-144]
sub r3, r3, #1
str r3, [fp, #-144]
.L149:
ldr r3, [fp, #-144]
cmp r3, #0
moveq r3, #0
movne r3, #1
and r3, r3, #255
cmp r3, #0
bne .L151
.L148:
mov r3, #0
mov r0, r3
sub sp, fp, #12
ldmfd sp!, {r4, r5, fp, pc}
.L156:
.align 2
.L155:
.word myRank
.cantunwind
.fnend
.size _Z10MPI_ReducePfS_iiiii, .-_Z10MPI_ReducePfS_iiiii
.global __aeabi_d2iz
.global __aeabi_i2d
.global __aeabi_dcmpgt
.global __aeabi_dcmplt
.global __aeabi_dadd
.align 2
.global _Z10MPI_ReducePdS_iiiii
.type _Z10MPI_ReducePdS_iiiii, %function
_Z10MPI_ReducePdS_iiiii:
.fnstart
.LFB21:
@ args = 12, pretend = 0, frame = 128
@ frame_needed = 1, uses_anonymous_args = 0
stmfd sp!, {r4, r5, r6, r7, fp, lr}
.save {r4, r5, r6, r7, fp, lr}
.setfp fp, sp, #20
add fp, sp, #20
.pad #136
sub sp, sp, #136
str r0, [fp, #-136]
str r1, [fp, #-140]
str r2, [fp, #-144]
str r3, [fp, #-148]
sub r3, fp, #132
ldr r0, [fp, #12]
mov r1, r3
.LEHB8:
bl _Z13MPI_Comm_rankiPi
sub r3, fp, #128
ldr r0, [fp, #12]
mov r1, r3
bl _Z13MPI_Comm_sizeiPi
ldr r3, [fp, #-144]
str r3, [fp, #-124]
ldr r2, [fp, #-132]
ldr r3, [fp, #8]
cmp r2, r3
bne .L158
b .L159
.L172:
ldr r2, [fp, #-144]
ldr r3, [fp, #-124]
rsb r3, r3, r2
mov r3, r3, asl #3
ldr r2, [fp, #-136]
add r3, r2, r3
ldmia r3, {r3-r4}
mov r0, r3
mov r1, r4
bl __aeabi_d2iz
mov r2, r0
ldr r1, [fp, #8]
mvn r3, #63
mov r1, r1, asl #2
sub r0, fp, #20
add r1, r0, r1
add r3, r1, r3
str r2, [r3, #0]
mov r3, #0
str r3, [fp, #-120]
b .L160
.L164:
ldr r2, [fp, #-120]
ldr r3, [fp, #8]
cmp r2, r3
beq .L161
ldr r3, [fp, #-120]
mov r3, r3, asl #2
sub r2, fp, #84
add r3, r2, r3
str r3, [fp, #-116]
mov r3, #1
str r3, [fp, #-112]
ldr r3, [fp, #-148]
str r3, [fp, #-100]
ldr r3, [fp, #-120]
str r3, [fp, #-108]
mov r3, #0
str r3, [fp, #-96]
mov r3, #0
str r3, [fp, #-92]
mov r3, #0
str r3, [fp, #-88]
ldr r3, [fp, #-108]
mov r3, r3, asl #6
orr r3, r3, #-268435456
str r3, [fp, #-108]
ldr r3, [fp, #-108]
str r3, [fp, #-104]
b .L162
.L163:
ldr r3, [fp, #-104]
ldr r1, [fp, #-116]
ldr r2, [fp, #-112]
mov r5, r1
mov r4, r2
#APP
@ 141 "../../lib/mpi.h" 1
ldr r8, [r3, #0]
str r8, [r5]
add r5, r5, #4
sub r4, r4, #1
@ 0 "" 2
str r5, [fp, #-116]
str r4, [fp, #-112]
.L162:
ldr r3, [fp, #-112]
cmp r3, #0
moveq r3, #0
movne r3, #1
and r3, r3, #255
cmp r3, #0
bne .L163
.L161:
ldr r3, [fp, #-120]
add r3, r3, #1
str r3, [fp, #-120]
.L160:
ldr r3, [fp, #-128]
ldr r2, [fp, #-120]
cmp r2, r3
movge r3, #0
movlt r3, #1
and r3, r3, #255
cmp r3, #0
bne .L164
ldr r2, [fp, #-144]
ldr r3, [fp, #-124]
rsb r3, r3, r2
mov r3, r3, asl #3
ldr r2, [fp, #-140]
add r5, r2, r3
ldr r3, [fp, #-84]
mov r0, r3
bl __aeabi_i2d
mov r3, r0
mov r4, r1
stmia r5, {r3-r4}
mov r3, #1
str r3, [fp, #-120]
b .L165
.L171:
ldr r3, [fp, #4]
cmp r3, #1
bne .L166
ldr r2, [fp, #-120]
mvn r3, #63
mov r2, r2, asl #2
sub r1, fp, #20
add r2, r1, r2
add r3, r2, r3
ldr r3, [r3, #0]
mov r0, r3
bl __aeabi_i2d
mov r2, r1
mov r1, r0
ldr r0, [fp, #-144]
ldr r3, [fp, #-124]
rsb r3, r3, r0
mov r3, r3, asl #3
ldr r0, [fp, #-140]
add r3, r0, r3
ldmia r3, {r3-r4}
mov r0, r1
mov r1, r2
mov r2, r3
mov r3, r4
bl __aeabi_dcmpgt
mov r3, r0
cmp r3, #0
beq .L167
.L179:
ldr r2, [fp, #-144]
ldr r3, [fp, #-124]
rsb r3, r3, r2
mov r3, r3, asl #3
ldr r2, [fp, #-140]
add r5, r2, r3
ldr r2, [fp, #-120]
mvn r3, #63
mov r2, r2, asl #2
sub r0, fp, #20
add r2, r0, r2
add r3, r2, r3
ldr r3, [r3, #0]
mov r0, r3
bl __aeabi_i2d
mov r3, r0
mov r4, r1
stmia r5, {r3-r4}
b .L167
.L166:
ldr r3, [fp, #4]
cmp r3, #2
bne .L169
ldr r2, [fp, #-120]
mvn r3, #63
mov r2, r2, asl #2
sub r1, fp, #20
add r2, r1, r2
add r3, r2, r3
ldr r3, [r3, #0]
mov r0, r3
bl __aeabi_i2d
mov r2, r1
mov r1, r0
ldr r0, [fp, #-144]
ldr r3, [fp, #-124]
rsb r3, r3, r0
mov r3, r3, asl #3
ldr r0, [fp, #-140]
add r3, r0, r3
ldmia r3, {r3-r4}
mov r0, r1
mov r1, r2
mov r2, r3
mov r3, r4
bl __aeabi_dcmplt
mov r3, r0
cmp r3, #0
beq .L167
.L180:
ldr r2, [fp, #-144]
ldr r3, [fp, #-124]
rsb r3, r3, r2
mov r3, r3, asl #3
ldr r2, [fp, #-140]
add r5, r2, r3
ldr r2, [fp, #-120]
mvn r3, #63
mov r2, r2, asl #2
sub r0, fp, #20
add r2, r0, r2
add r3, r2, r3
ldr r3, [r3, #0]
mov r0, r3
bl __aeabi_i2d
mov r3, r0
mov r4, r1
stmia r5, {r3-r4}
b .L167
.L169:
ldr r3, [fp, #4]
cmp r3, #3
bne .L167
ldr r2, [fp, #-144]
ldr r3, [fp, #-124]
rsb r3, r3, r2
mov r3, r3, asl #3
ldr r2, [fp, #-140]
add r7, r2, r3
ldr r2, [fp, #-144]
ldr r3, [fp, #-124]
rsb r3, r3, r2
mov r3, r3, asl #3
ldr r2, [fp, #-140]
add r3, r2, r3
ldmia r3, {r5-r6}
ldr r2, [fp, #-120]
mvn r3, #63
mov r2, r2, asl #2
sub r1, fp, #20
add r2, r1, r2
add r3, r2, r3
ldr r3, [r3, #0]
mov r0, r3
bl __aeabi_i2d
mov r3, r0
mov r4, r1
mov r0, r5
mov r1, r6
mov r2, r3
mov r3, r4
bl __aeabi_dadd
mov r3, r0
mov r4, r1
stmia r7, {r3-r4}
.L167:
ldr r3, [fp, #-120]
add r3, r3, #1
str r3, [fp, #-120]
.L165:
ldr r3, [fp, #-128]
ldr r2, [fp, #-120]
cmp r2, r3
movge r3, #0
movlt r3, #1
and r3, r3, #255
cmp r3, #0
bne .L171
ldr r3, [fp, #-124]
sub r3, r3, #1
str r3, [fp, #-124]
.L159:
ldr r3, [fp, #-124]
cmp r3, #0
movle r3, #0
movgt r3, #1
and r3, r3, #255
cmp r3, #0
bne .L172
b .L173
.L158:
ldr r3, [fp, #-144]
str r3, [fp, #-124]
b .L174
.L175:
ldr r2, [fp, #-144]
ldr r3, [fp, #-124]
rsb r3, r3, r2
mov r3, r3, asl #3
ldr r2, [fp, #-136]
add r3, r2, r3
mov r2, #0
str r2, [sp, #0]
mov r2, #0
str r2, [sp, #4]
mov r0, r3
mov r1, #1
ldr r2, [fp, #-148]
ldr r3, [fp, #8]
bl _Z8MPI_SendPdiiiii
.LEHE8:
ldr r3, [fp, #-124]
sub r3, r3, #1
str r3, [fp, #-124]
.L174:
ldr r3, [fp, #-124]
cmp r3, #0
moveq r3, #0
movne r3, #1
and r3, r3, #255
cmp r3, #0
bne .L175
.L173:
mov r3, #0
b .L181
.L178:
.LEHB9:
bl __cxa_end_cleanup
.LEHE9:
.L181:
mov r0, r3
sub sp, fp, #20
ldmfd sp!, {r4, r5, r6, r7, fp, pc}
.personality __gxx_personality_v0
.handlerdata
.LLSDA21:
.byte 0xff
.byte 0xff
.byte 0x1
.uleb128 .LLSDACSE21-.LLSDACSB21
.LLSDACSB21:
.uleb128 .LEHB8-.LFB21
.uleb128 .LEHE8-.LEHB8
.uleb128 .L178-.LFB21
.uleb128 0
.uleb128 .LEHB9-.LFB21
.uleb128 .LEHE9-.LEHB9
.uleb128 0
.uleb128 0
.LLSDACSE21:
.text
.fnend
.size _Z10MPI_ReducePdS_iiiii, .-_Z10MPI_ReducePdS_iiiii
.align 2
.global _Z13MPI_AllreducePiS_iiii
.type _Z13MPI_AllreducePiS_iiii, %function
_Z13MPI_AllreducePiS_iiii:
.fnstart
.LFB22:
@ args = 8, pretend = 0, frame = 224
@ frame_needed = 1, uses_anonymous_args = 0
stmfd sp!, {r4, r5, fp, lr}
.save {r4, r5, fp, lr}
.setfp fp, sp, #12
add fp, sp, #12
.pad #224
sub sp, sp, #224
str r0, [fp, #-224]
str r1, [fp, #-228]
str r2, [fp, #-232]
str r3, [fp, #-236]
sub r3, fp, #216
ldr r0, [fp, #8]
mov r1, r3
.LEHB10:
bl _Z13MPI_Comm_rankiPi
.LEHE10:
sub r3, fp, #212
ldr r0, [fp, #8]
mov r1, r3
bl _Z13MPI_Comm_sizeiPi
ldr r3, [fp, #-232]
str r3, [fp, #-208]
mov r3, #0
str r3, [fp, #-200]
ldr r2, [fp, #-216]
ldr r3, [fp, #-200]
cmp r2, r3
bne .L183
b .L184
.L198:
ldr r2, [fp, #-232]
ldr r3, [fp, #-208]
rsb r3, r3, r2
mov r3, r3, asl #2
ldr r2, [fp, #-224]
add r3, r2, r3
ldr r2, [r3, #0]
ldr r1, [fp, #-200]
mvn r3, #63
mov r1, r1, asl #2
sub r0, fp, #12
add r1, r0, r1
add r3, r1, r3
str r2, [r3, #0]
mov r3, #0
str r3, [fp, #-204]
b .L185
.L189:
ldr r2, [fp, #-204]
ldr r3, [fp, #-200]
cmp r2, r3
beq .L186
ldr r3, [fp, #-204]
mov r3, r3, asl #2
sub r2, fp, #76
add r3, r2, r3
str r3, [fp, #-196]
mov r3, #1
str r3, [fp, #-192]
ldr r3, [fp, #-236]
str r3, [fp, #-132]
ldr r3, [fp, #-204]
str r3, [fp, #-188]
mov r3, #0
str r3, [fp, #-128]
mov r3, #0
str r3, [fp, #-124]
mov r3, #0
str r3, [fp, #-120]
ldr r3, [fp, #-188]
mov r3, r3, asl #6
orr r3, r3, #-268435456
str r3, [fp, #-188]
ldr r3, [fp, #-188]
str r3, [fp, #-184]
b .L187
.L188:
ldr r3, [fp, #-184]
ldr r1, [fp, #-196]
ldr r2, [fp, #-192]
mov r5, r1
mov r4, r2
#APP
@ 141 "../../lib/mpi.h" 1
ldr r8, [r3, #0]
str r8, [r5]
add r5, r5, #4
sub r4, r4, #1
@ 0 "" 2
str r5, [fp, #-196]
str r4, [fp, #-192]
.L187:
ldr r3, [fp, #-192]
cmp r3, #0
moveq r3, #0
movne r3, #1
and r3, r3, #255
cmp r3, #0
bne .L188
.L186:
ldr r3, [fp, #-204]
add r3, r3, #1
str r3, [fp, #-204]
.L185:
ldr r3, [fp, #-212]
ldr r2, [fp, #-204]
cmp r2, r3
movge r3, #0
movlt r3, #1
and r3, r3, #255
cmp r3, #0
bne .L189
ldr r2, [fp, #-232]
ldr r3, [fp, #-208]
rsb r3, r3, r2
mov r3, r3, asl #2
ldr r2, [fp, #-228]
add r3, r2, r3
ldr r2, [fp, #-76]
str r2, [r3, #0]
mov r3, #1
str r3, [fp, #-204]
b .L190
.L194:
ldr r3, [fp, #4]
cmp r3, #1
bne .L191
ldr r2, [fp, #-204]
mvn r3, #63
mov r2, r2, asl #2
sub r1, fp, #12
add r2, r1, r2
add r3, r2, r3
ldr r2, [r3, #0]
ldr r1, [fp, #-232]
ldr r3, [fp, #-208]
rsb r3, r3, r1
mov r3, r3, asl #2
ldr r1, [fp, #-228]
add r3, r1, r3
ldr r3, [r3, #0]
cmp r2, r3
ble .L192
ldr r2, [fp, #-232]
ldr r3, [fp, #-208]
rsb r3, r3, r2
mov r3, r3, asl #2
ldr r2, [fp, #-228]
add r3, r2, r3
ldr r1, [fp, #-204]
mvn r2, #63
mov r1, r1, asl #2
sub ip, fp, #12
add r1, ip, r1
add r2, r1, r2
ldr r2, [r2, #0]
str r2, [r3, #0]
b .L192
.L191:
ldr r3, [fp, #4]
cmp r3, #2
bne .L193
ldr r2, [fp, #-204]
mvn r3, #63
mov r2, r2, asl #2
sub r0, fp, #12
add r2, r0, r2
add r3, r2, r3
ldr r2, [r3, #0]
ldr r1, [fp, #-232]
ldr r3, [fp, #-208]
rsb r3, r3, r1
mov r3, r3, asl #2
ldr r1, [fp, #-228]
add r3, r1, r3
ldr r3, [r3, #0]
cmp r2, r3
bge .L192
ldr r2, [fp, #-232]
ldr r3, [fp, #-208]
rsb r3, r3, r2
mov r3, r3, asl #2
ldr r2, [fp, #-228]
add r3, r2, r3
ldr r1, [fp, #-204]
mvn r2, #63
mov r1, r1, asl #2
sub ip, fp, #12
add r1, ip, r1
add r2, r1, r2
ldr r2, [r2, #0]
str r2, [r3, #0]
b .L192
.L193:
ldr r3, [fp, #4]
cmp r3, #3
bne .L192
ldr r2, [fp, #-232]
ldr r3, [fp, #-208]
rsb r3, r3, r2
mov r3, r3, asl #2
ldr r2, [fp, #-228]
add r3, r2, r3
ldr r1, [fp, #-232]
ldr r2, [fp, #-208]
rsb r2, r2, r1
mov r2, r2, asl #2
ldr r1, [fp, #-228]
add r2, r1, r2
ldr r1, [r2, #0]
ldr r0, [fp, #-204]
mvn r2, #63
mov r0, r0, asl #2
sub ip, fp, #12
add r0, ip, r0
add r2, r0, r2
ldr r2, [r2, #0]
add r2, r1, r2
str r2, [r3, #0]
.L192:
ldr r3, [fp, #-204]
add r3, r3, #1
str r3, [fp, #-204]
.L190:
ldr r3, [fp, #-212]
ldr r2, [fp, #-204]
cmp r2, r3
movge r3, #0
movlt r3, #1
and r3, r3, #255
cmp r3, #0
bne .L194
mov r3, #0
str r3, [fp, #-204]
b .L195
.L197:
ldr r2, [fp, #-204]
ldr r3, [fp, #-200]
cmp r2, r3
beq .L196
ldr r2, [fp, #-232]
ldr r3, [fp, #-208]
rsb r3, r3, r2
mov r3, r3, asl #2
ldr r2, [fp, #-228]
add r3, r2, r3
str r3, [fp, #-180]
mov r3, #1
str r3, [fp, #-176]
ldr r3, [fp, #-236]
str r3, [fp, #-116]
ldr r3, [fp, #-204]
str r3, [fp, #-172]
mov r3, #0
str r3, [fp, #-112]
mov r3, #0
str r3, [fp, #-108]
ldr r3, [fp, #-172]
mov r3, r3, asl #6
orr r3, r3, #-268435456
str r3, [fp, #-172]
ldr r3, [fp, #-172]
str r3, [fp, #-168]
ldr r3, [fp, #-168]
ldr r1, [fp, #-180]
ldr r2, [fp, #-176]
mov r5, r1
mov r4, r2
#APP
@ 95 "../../lib/mpi.h" 1
1:
ldr r8, [r5]
str r8, [r3, #0]
add r5, r5, #4
subs r4, r4, #1
bne 1b
@ 0 "" 2
str r5, [fp, #-180]
str r4, [fp, #-176]
.L196:
ldr r3, [fp, #-204]
add r3, r3, #1
str r3, [fp, #-204]
.L195:
ldr r3, [fp, #-212]
ldr r2, [fp, #-204]
cmp r2, r3
movge r3, #0
movlt r3, #1
and r3, r3, #255
cmp r3, #0
bne .L197
ldr r3, [fp, #-208]
sub r3, r3, #1
str r3, [fp, #-208]
.L184:
ldr r3, [fp, #-208]
cmp r3, #0
movle r3, #0
movgt r3, #1
and r3, r3, #255
cmp r3, #0
bne .L198
b .L199
.L183:
ldr r3, [fp, #-232]
str r3, [fp, #-208]
b .L200
.L203:
ldr r2, [fp, #-232]
ldr r3, [fp, #-208]
rsb r3, r3, r2
mov r3, r3, asl #2
ldr r2, [fp, #-224]
add r3, r2, r3
str r3, [fp, #-164]
mov r3, #1
str r3, [fp, #-160]
ldr r3, [fp, #-236]
str r3, [fp, #-104]
ldr r3, [fp, #-200]
str r3, [fp, #-156]
mov r3, #0
str r3, [fp, #-100]
mov r3, #0
str r3, [fp, #-96]
ldr r3, [fp, #-156]
mov r3, r3, asl #6
orr r3, r3, #-268435456
str r3, [fp, #-156]
ldr r3, [fp, #-156]
str r3, [fp, #-152]
ldr r3, [fp, #-152]
ldr r1, [fp, #-164]
ldr r2, [fp, #-160]
mov r5, r1
mov r4, r2
#APP
@ 95 "../../lib/mpi.h" 1
1:
ldr r8, [r5]
str r8, [r3, #0]
add r5, r5, #4
subs r4, r4, #1
bne 1b
@ 0 "" 2
str r5, [fp, #-164]
str r4, [fp, #-160]
ldr r2, [fp, #-232]
ldr r3, [fp, #-208]
rsb r3, r3, r2
mov r3, r3, asl #2
ldr r2, [fp, #-228]
add r3, r2, r3
str r3, [fp, #-148]
mov r3, #1
str r3, [fp, #-144]
ldr r3, [fp, #-236]
str r3, [fp, #-92]
ldr r3, [fp, #-200]
str r3, [fp, #-140]
mov r3, #0
str r3, [fp, #-88]
mov r3, #0
str r3, [fp, #-84]
mov r3, #0
str r3, [fp, #-80]
ldr r3, [fp, #-140]
mov r3, r3, asl #6
orr r3, r3, #-268435456
str r3, [fp, #-140]
ldr r3, [fp, #-140]
str r3, [fp, #-136]
b .L201
.L202:
ldr r3, [fp, #-136]
ldr r1, [fp, #-148]
ldr r2, [fp, #-144]
mov r5, r1
mov r4, r2
#APP
@ 141 "../../lib/mpi.h" 1
ldr r8, [r3, #0]
str r8, [r5]
add r5, r5, #4
sub r4, r4, #1
@ 0 "" 2
str r5, [fp, #-148]
str r4, [fp, #-144]
.L201:
ldr r3, [fp, #-144]
cmp r3, #0
moveq r3, #0
movne r3, #1
and r3, r3, #255
cmp r3, #0
bne .L202
ldr r3, [fp, #-208]
sub r3, r3, #1
str r3, [fp, #-208]
.L200:
ldr r3, [fp, #-208]
cmp r3, #0
moveq r3, #0
movne r3, #1
and r3, r3, #255
cmp r3, #0
bne .L203
.L199:
mov r3, #0
b .L207
.L206:
.LEHB11:
bl __cxa_end_cleanup
.LEHE11:
.L207:
mov r0, r3
sub sp, fp, #12
ldmfd sp!, {r4, r5, fp, pc}
.personality __gxx_personality_v0
.handlerdata
.LLSDA22:
.byte 0xff
.byte 0xff
.byte 0x1
.uleb128 .LLSDACSE22-.LLSDACSB22
.LLSDACSB22:
.uleb128 .LEHB10-.LFB22
.uleb128 .LEHE10-.LEHB10
.uleb128 .L206-.LFB22
.uleb128 0
.uleb128 .LEHB11-.LFB22
.uleb128 .LEHE11-.LEHB11
.uleb128 0
.uleb128 0
.LLSDACSE22:
.text
.fnend
.size _Z13MPI_AllreducePiS_iiii, .-_Z13MPI_AllreducePiS_iiii
.global __aeabi_f2iz
.global __aeabi_i2f
.align 2
.global _Z13MPI_AllreducePfS_iiii
.type _Z13MPI_AllreducePfS_iiii, %function
_Z13MPI_AllreducePfS_iiii:
.fnstart
.LFB23:
@ args = 8, pretend = 0, frame = 224
@ frame_needed = 1, uses_anonymous_args = 0
stmfd sp!, {r4, r5, fp, lr}
.save {r4, r5, fp, lr}
.setfp fp, sp, #12
add fp, sp, #12
.pad #224
sub sp, sp, #224
str r0, [fp, #-224]
str r1, [fp, #-228]
str r2, [fp, #-232]
str r3, [fp, #-236]
sub r3, fp, #216
ldr r0, [fp, #8]
mov r1, r3
.LEHB12:
bl _Z13MPI_Comm_rankiPi
.LEHE12:
sub r3, fp, #212
ldr r0, [fp, #8]
mov r1, r3
bl _Z13MPI_Comm_sizeiPi
ldr r3, [fp, #-232]
str r3, [fp, #-208]
mov r3, #0
str r3, [fp, #-200]
ldr r2, [fp, #-216]
ldr r3, [fp, #-200]
cmp r2, r3
bne .L209
b .L210
.L227:
ldr r2, [fp, #-232]
ldr r3, [fp, #-208]
rsb r3, r3, r2
mov r3, r3, asl #2
ldr r2, [fp, #-224]
add r3, r2, r3
ldr r3, [r3, #0] @ float
mov r0, r3
bl __aeabi_f2iz
mov r2, r0
ldr r1, [fp, #-200]
mvn r3, #63
mov r1, r1, asl #2
sub r0, fp, #12
add r1, r0, r1
add r3, r1, r3
str r2, [r3, #0]
mov r3, #0
str r3, [fp, #-204]
b .L211
.L215:
ldr r2, [fp, #-204]
ldr r3, [fp, #-200]
cmp r2, r3
beq .L212
ldr r3, [fp, #-204]
mov r3, r3, asl #2
sub r2, fp, #76
add r3, r2, r3
str r3, [fp, #-196]
mov r3, #1
str r3, [fp, #-192]
ldr r3, [fp, #-236]
str r3, [fp, #-132]
ldr r3, [fp, #-204]
str r3, [fp, #-188]
mov r3, #0
str r3, [fp, #-128]
mov r3, #0
str r3, [fp, #-124]
mov r3, #0
str r3, [fp, #-120]
ldr r3, [fp, #-188]
mov r3, r3, asl #6
orr r3, r3, #-268435456
str r3, [fp, #-188]
ldr r3, [fp, #-188]
str r3, [fp, #-184]
b .L213
.L214:
ldr r3, [fp, #-184]
ldr r1, [fp, #-196]
ldr r2, [fp, #-192]
mov r5, r1
mov r4, r2
#APP
@ 141 "../../lib/mpi.h" 1
ldr r8, [r3, #0]
str r8, [r5]
add r5, r5, #4
sub r4, r4, #1
@ 0 "" 2
str r5, [fp, #-196]
str r4, [fp, #-192]
.L213:
ldr r3, [fp, #-192]
cmp r3, #0
moveq r3, #0
movne r3, #1
and r3, r3, #255
cmp r3, #0
bne .L214
.L212:
ldr r3, [fp, #-204]
add r3, r3, #1
str r3, [fp, #-204]
.L211:
ldr r3, [fp, #-212]
ldr r2, [fp, #-204]
cmp r2, r3
movge r3, #0
movlt r3, #1
and r3, r3, #255
cmp r3, #0
bne .L215
ldr r2, [fp, #-232]
ldr r3, [fp, #-208]
rsb r3, r3, r2
mov r3, r3, asl #2
ldr r2, [fp, #-228]
add r4, r2, r3
ldr r3, [fp, #-76]
mov r0, r3
bl __aeabi_i2f
mov r3, r0
str r3, [r4, #0] @ float
mov r3, #1
str r3, [fp, #-204]
b .L216
.L222:
ldr r3, [fp, #4]
cmp r3, #1
bne .L217
ldr r2, [fp, #-204]
mvn r3, #63
mov r2, r2, asl #2
sub r1, fp, #12
add r2, r1, r2
add r3, r2, r3
ldr r3, [r3, #0]
mov r0, r3
bl __aeabi_i2f
mov r2, r0
ldr r1, [fp, #-232]
ldr r3, [fp, #-208]
rsb r3, r3, r1
mov r3, r3, asl #2
ldr r1, [fp, #-228]
add r3, r1, r3
ldr r3, [r3, #0] @ float
mov r0, r2
mov r1, r3
bl __aeabi_fcmpgt
mov r3, r0
cmp r3, #0
beq .L218
.L238:
ldr r2, [fp, #-232]
ldr r3, [fp, #-208]
rsb r3, r3, r2
mov r3, r3, asl #2
ldr r2, [fp, #-228]
add r4, r2, r3
ldr r2, [fp, #-204]
mvn r3, #63
mov r2, r2, asl #2
sub r0, fp, #12
add r2, r0, r2
add r3, r2, r3
ldr r3, [r3, #0]
mov r0, r3
bl __aeabi_i2f
mov r3, r0
str r3, [r4, #0] @ float
b .L218
.L217:
ldr r3, [fp, #4]
cmp r3, #2
bne .L220
ldr r2, [fp, #-204]
mvn r3, #63
mov r2, r2, asl #2
sub r1, fp, #12
add r2, r1, r2
add r3, r2, r3
ldr r3, [r3, #0]
mov r0, r3
bl __aeabi_i2f
mov r2, r0
ldr r1, [fp, #-232]
ldr r3, [fp, #-208]
rsb r3, r3, r1
mov r3, r3, asl #2
ldr r1, [fp, #-228]
add r3, r1, r3
ldr r3, [r3, #0] @ float
mov r0, r2
mov r1, r3
bl __aeabi_fcmplt
mov r3, r0
cmp r3, #0
beq .L218
.L239:
ldr r2, [fp, #-232]
ldr r3, [fp, #-208]
rsb r3, r3, r2
mov r3, r3, asl #2
ldr r2, [fp, #-228]
add r4, r2, r3
ldr r2, [fp, #-204]
mvn r3, #63
mov r2, r2, asl #2
sub r0, fp, #12
add r2, r0, r2
add r3, r2, r3
ldr r3, [r3, #0]
mov r0, r3
bl __aeabi_i2f
mov r3, r0
str r3, [r4, #0] @ float
b .L218
.L220:
ldr r3, [fp, #4]
cmp r3, #3
bne .L218
ldr r2, [fp, #-232]
ldr r3, [fp, #-208]
rsb r3, r3, r2
mov r3, r3, asl #2
ldr r2, [fp, #-228]
add r4, r2, r3
ldr r2, [fp, #-232]
ldr r3, [fp, #-208]
rsb r3, r3, r2
mov r3, r3, asl #2
ldr r2, [fp, #-228]
add r3, r2, r3
ldr r5, [r3, #0] @ float
ldr r2, [fp, #-204]
mvn r3, #63
mov r2, r2, asl #2
sub r1, fp, #12
add r2, r1, r2
add r3, r2, r3
ldr r3, [r3, #0]
mov r0, r3
bl __aeabi_i2f
mov r3, r0
mov r0, r5
mov r1, r3
bl __aeabi_fadd
mov r3, r0
str r3, [r4, #0] @ float
.L218:
ldr r3, [fp, #-204]
add r3, r3, #1
str r3, [fp, #-204]
.L216:
ldr r3, [fp, #-212]
ldr r2, [fp, #-204]
cmp r2, r3
movge r3, #0
movlt r3, #1
and r3, r3, #255
cmp r3, #0
bne .L222
mov r3, #0
str r3, [fp, #-204]
b .L223
.L226:
ldr r2, [fp, #-204]
ldr r3, [fp, #-200]
cmp r2, r3
beq .L224
ldr r2, [fp, #-232]
ldr r3, [fp, #-208]
rsb r3, r3, r2
mov r3, r3, asl #2
ldr r2, [fp, #-228]
add r3, r2, r3
str r3, [fp, #-180]
mov r3, #1
str r3, [fp, #-176]
ldr r3, [fp, #-236]
str r3, [fp, #-116]
ldr r3, [fp, #-204]
str r3, [fp, #-172]
mov r3, #0
str r3, [fp, #-112]
mov r3, #0
str r3, [fp, #-108]
ldr r3, [fp, #-172]
mov r3, r3, asl #6
orr r3, r3, #-268435456
str r3, [fp, #-172]
ldr r3, [fp, #-172]
str r3, [fp, #-168]
ldr r3, [fp, #-168]
ldr r1, [fp, #-180]
ldr r2, [fp, #-176]
mov r5, r1
mov r4, r2
#APP
@ 114 "../../lib/mpi.h" 1
1:
ldr r8, [r5]
str r8, [r3, #0]
add r5, r5, #4
subs r4, r4, #1
bne 1b
@ 0 "" 2
str r5, [fp, #-180]
str r4, [fp, #-176]
.L224:
ldr r3, [fp, #-204]
add r3, r3, #1
str r3, [fp, #-204]
.L223:
ldr r3, [fp, #-212]
ldr r2, [fp, #-204]
cmp r2, r3
movge r3, #0
movlt r3, #1
and r3, r3, #255
cmp r3, #0
bne .L226
ldr r3, [fp, #-208]
sub r3, r3, #1
str r3, [fp, #-208]
.L210:
ldr r3, [fp, #-208]
cmp r3, #0
movle r3, #0
movgt r3, #1
and r3, r3, #255
cmp r3, #0
bne .L227
b .L228
.L209:
ldr r3, [fp, #-232]
str r3, [fp, #-208]
b .L229
.L234:
ldr r2, [fp, #-232]
ldr r3, [fp, #-208]
rsb r3, r3, r2
mov r3, r3, asl #2
ldr r2, [fp, #-224]
add r3, r2, r3
str r3, [fp, #-164]
mov r3, #1
str r3, [fp, #-160]
ldr r3, [fp, #-236]
str r3, [fp, #-104]
ldr r3, [fp, #-200]
str r3, [fp, #-156]
mov r3, #0
str r3, [fp, #-100]
mov r3, #0
str r3, [fp, #-96]
ldr r3, [fp, #-156]
mov r3, r3, asl #6
orr r3, r3, #-268435456
str r3, [fp, #-156]
ldr r3, [fp, #-156]
str r3, [fp, #-152]
ldr r3, [fp, #-152]
ldr r1, [fp, #-164]
ldr r2, [fp, #-160]
mov r5, r1
mov r4, r2
#APP
@ 114 "../../lib/mpi.h" 1
1:
ldr r8, [r5]
str r8, [r3, #0]
add r5, r5, #4
subs r4, r4, #1
bne 1b
@ 0 "" 2
str r5, [fp, #-164]
str r4, [fp, #-160]
ldr r2, [fp, #-232]
ldr r3, [fp, #-208]
rsb r3, r3, r2
mov r3, r3, asl #2
ldr r2, [fp, #-228]
add r3, r2, r3
str r3, [fp, #-148]
mov r3, #1
str r3, [fp, #-144]
ldr r3, [fp, #-236]
str r3, [fp, #-92]
ldr r3, [fp, #-200]
str r3, [fp, #-140]
mov r3, #0
str r3, [fp, #-88]
mov r3, #0
str r3, [fp, #-84]
mov r3, #0
str r3, [fp, #-80]
ldr r3, [fp, #-140]
mov r3, r3, asl #6
orr r3, r3, #-268435456
str r3, [fp, #-140]
ldr r3, [fp, #-140]
str r3, [fp, #-136]
b .L231
.L232:
ldr r3, [fp, #-136]
ldr r1, [fp, #-148]
ldr r2, [fp, #-144]
mov r5, r1
mov r4, r2
#APP
@ 185 "../../lib/mpi.h" 1
ldr r8, [r3, #0]
str r8, [r5]
add r5, r5, #4
sub r4, r4, #1
@ 0 "" 2
str r5, [fp, #-148]
str r4, [fp, #-144]
.L231:
ldr r3, [fp, #-144]
cmp r3, #0
moveq r3, #0
movne r3, #1
and r3, r3, #255
cmp r3, #0
bne .L232
ldr r3, [fp, #-208]
sub r3, r3, #1
str r3, [fp, #-208]
.L229:
ldr r3, [fp, #-208]
cmp r3, #0
moveq r3, #0
movne r3, #1
and r3, r3, #255
cmp r3, #0
bne .L234
.L228:
mov r3, #0
b .L240
.L237:
.LEHB13:
bl __cxa_end_cleanup
.LEHE13:
.L240:
mov r0, r3
sub sp, fp, #12
ldmfd sp!, {r4, r5, fp, pc}
.personality __gxx_personality_v0
.handlerdata
.LLSDA23:
.byte 0xff
.byte 0xff
.byte 0x1
.uleb128 .LLSDACSE23-.LLSDACSB23
.LLSDACSB23:
.uleb128 .LEHB12-.LFB23
.uleb128 .LEHE12-.LEHB12
.uleb128 .L237-.LFB23
.uleb128 0
.uleb128 .LEHB13-.LFB23
.uleb128 .LEHE13-.LEHB13
.uleb128 0
.uleb128 0
.LLSDACSE23:
.text
.fnend
.size _Z13MPI_AllreducePfS_iiii, .-_Z13MPI_AllreducePfS_iiii
.align 2
.global _Z13MPI_AllreducePdS_iiii
.type _Z13MPI_AllreducePdS_iiii, %function
_Z13MPI_AllreducePdS_iiii:
.fnstart
.LFB24:
@ args = 8, pretend = 0, frame = 136
@ frame_needed = 1, uses_anonymous_args = 0
stmfd sp!, {r4, r5, r6, r7, fp, lr}
.save {r4, r5, r6, r7, fp, lr}
.setfp fp, sp, #20
add fp, sp, #20
.pad #152
sub sp, sp, #152
str r0, [fp, #-144]
str r1, [fp, #-148]
str r2, [fp, #-152]
str r3, [fp, #-156]
sub r3, fp, #136
ldr r0, [fp, #8]
mov r1, r3
.LEHB14:
bl _Z13MPI_Comm_rankiPi
.LEHE14:
sub r3, fp, #132
ldr r0, [fp, #8]
mov r1, r3
bl _Z13MPI_Comm_sizeiPi
ldr r3, [fp, #-152]
str r3, [fp, #-128]
mov r3, #0
str r3, [fp, #-120]
ldr r2, [fp, #-136]
ldr r3, [fp, #-120]
cmp r2, r3
bne .L242
b .L243
.L259:
ldr r2, [fp, #-152]
ldr r3, [fp, #-128]
rsb r3, r3, r2
mov r3, r3, asl #3
ldr r2, [fp, #-144]
add r3, r2, r3
ldmia r3, {r3-r4}
mov r0, r3
mov r1, r4
bl __aeabi_d2iz
mov r2, r0
ldr r1, [fp, #-120]
mvn r3, #63
mov r1, r1, asl #2
sub r0, fp, #20
add r1, r0, r1
add r3, r1, r3
str r2, [r3, #0]
mov r3, #0
str r3, [fp, #-124]
b .L244
.L248:
ldr r2, [fp, #-124]
ldr r3, [fp, #-120]
cmp r2, r3
beq .L245
ldr r3, [fp, #-124]
mov r3, r3, asl #2
sub r2, fp, #84
add r3, r2, r3
str r3, [fp, #-116]
mov r3, #1
str r3, [fp, #-112]
ldr r3, [fp, #-156]
str r3, [fp, #-100]
ldr r3, [fp, #-124]
str r3, [fp, #-108]
mov r3, #0
str r3, [fp, #-96]
mov r3, #0
str r3, [fp, #-92]
mov r3, #0
str r3, [fp, #-88]
ldr r3, [fp, #-108]
mov r3, r3, asl #6
orr r3, r3, #-268435456
str r3, [fp, #-108]
ldr r3, [fp, #-108]
str r3, [fp, #-104]
b .L246
.L247:
ldr r3, [fp, #-104]
ldr r1, [fp, #-116]
ldr r2, [fp, #-112]
mov r5, r1
mov r4, r2
#APP
@ 141 "../../lib/mpi.h" 1
ldr r8, [r3, #0]
str r8, [r5]
add r5, r5, #4
sub r4, r4, #1
@ 0 "" 2
str r5, [fp, #-116]
str r4, [fp, #-112]
.L246:
ldr r3, [fp, #-112]
cmp r3, #0
moveq r3, #0
movne r3, #1
and r3, r3, #255
cmp r3, #0
bne .L247
.L245:
ldr r3, [fp, #-124]
add r3, r3, #1
str r3, [fp, #-124]
.L244:
ldr r3, [fp, #-132]
ldr r2, [fp, #-124]
cmp r2, r3
movge r3, #0
movlt r3, #1
and r3, r3, #255
cmp r3, #0
bne .L248
ldr r2, [fp, #-152]
ldr r3, [fp, #-128]
rsb r3, r3, r2
mov r3, r3, asl #3
ldr r2, [fp, #-148]
add r5, r2, r3
ldr r3, [fp, #-84]
mov r0, r3
bl __aeabi_i2d
mov r3, r0
mov r4, r1
stmia r5, {r3-r4}
mov r3, #1
str r3, [fp, #-124]
b .L249
.L255:
ldr r3, [fp, #4]
cmp r3, #1
bne .L250
ldr r2, [fp, #-124]
mvn r3, #63
mov r2, r2, asl #2
sub r1, fp, #20
add r2, r1, r2
add r3, r2, r3
ldr r3, [r3, #0]
mov r0, r3
bl __aeabi_i2d
mov r2, r1
mov r1, r0
ldr r0, [fp, #-152]
ldr r3, [fp, #-128]
rsb r3, r3, r0
mov r3, r3, asl #3
ldr r0, [fp, #-148]
add r3, r0, r3
ldmia r3, {r3-r4}
mov r0, r1
mov r1, r2
mov r2, r3
mov r3, r4
bl __aeabi_dcmpgt
mov r3, r0
cmp r3, #0
beq .L251
.L268:
ldr r2, [fp, #-152]
ldr r3, [fp, #-128]
rsb r3, r3, r2
mov r3, r3, asl #3
ldr r2, [fp, #-148]
add r5, r2, r3
ldr r2, [fp, #-124]
mvn r3, #63
mov r2, r2, asl #2
sub r0, fp, #20
add r2, r0, r2
add r3, r2, r3
ldr r3, [r3, #0]
mov r0, r3
bl __aeabi_i2d
mov r3, r0
mov r4, r1
stmia r5, {r3-r4}
b .L251
.L250:
ldr r3, [fp, #4]
cmp r3, #2
bne .L253
ldr r2, [fp, #-124]
mvn r3, #63
mov r2, r2, asl #2
sub r1, fp, #20
add r2, r1, r2
add r3, r2, r3
ldr r3, [r3, #0]
mov r0, r3
bl __aeabi_i2d
mov r2, r1
mov r1, r0
ldr r0, [fp, #-152]
ldr r3, [fp, #-128]
rsb r3, r3, r0
mov r3, r3, asl #3
ldr r0, [fp, #-148]
add r3, r0, r3
ldmia r3, {r3-r4}
mov r0, r1
mov r1, r2
mov r2, r3
mov r3, r4
bl __aeabi_dcmplt
mov r3, r0
cmp r3, #0
beq .L251
.L269:
ldr r2, [fp, #-152]
ldr r3, [fp, #-128]
rsb r3, r3, r2
mov r3, r3, asl #3
ldr r2, [fp, #-148]
add r5, r2, r3
ldr r2, [fp, #-124]
mvn r3, #63
mov r2, r2, asl #2
sub r0, fp, #20
add r2, r0, r2
add r3, r2, r3
ldr r3, [r3, #0]
mov r0, r3
bl __aeabi_i2d
mov r3, r0
mov r4, r1
stmia r5, {r3-r4}
b .L251
.L253:
ldr r3, [fp, #4]
cmp r3, #3
bne .L251
ldr r2, [fp, #-152]
ldr r3, [fp, #-128]
rsb r3, r3, r2
mov r3, r3, asl #3
ldr r2, [fp, #-148]
add r7, r2, r3
ldr r2, [fp, #-152]
ldr r3, [fp, #-128]
rsb r3, r3, r2
mov r3, r3, asl #3
ldr r2, [fp, #-148]
add r3, r2, r3
ldmia r3, {r5-r6}
ldr r2, [fp, #-124]
mvn r3, #63
mov r2, r2, asl #2
sub r1, fp, #20
add r2, r1, r2
add r3, r2, r3
ldr r3, [r3, #0]
mov r0, r3
bl __aeabi_i2d
mov r3, r0
mov r4, r1
mov r0, r5
mov r1, r6
mov r2, r3
mov r3, r4
bl __aeabi_dadd
mov r3, r0
mov r4, r1
stmia r7, {r3-r4}
.L251:
ldr r3, [fp, #-124]
add r3, r3, #1
str r3, [fp, #-124]
.L249:
ldr r3, [fp, #-132]
ldr r2, [fp, #-124]
cmp r2, r3
movge r3, #0
movlt r3, #1
and r3, r3, #255
cmp r3, #0
bne .L255
mov r3, #0
str r3, [fp, #-124]
b .L256
.L258:
ldr r2, [fp, #-124]
ldr r3, [fp, #-120]
cmp r2, r3
beq .L257
ldr r2, [fp, #-152]
ldr r3, [fp, #-128]
rsb r3, r3, r2
mov r3, r3, asl #3
ldr r2, [fp, #-148]
add r3, r2, r3
mov r2, #0
str r2, [sp, #0]
mov r2, #0
str r2, [sp, #4]
mov r0, r3
mov r1, #1
ldr r2, [fp, #-156]
ldr r3, [fp, #-124]
.LEHB15:
bl _Z8MPI_SendPdiiiii
.LEHE15:
.L257:
ldr r3, [fp, #-124]
add r3, r3, #1
str r3, [fp, #-124]
.L256:
ldr r3, [fp, #-132]
ldr r2, [fp, #-124]
cmp r2, r3
movge r3, #0
movlt r3, #1
and r3, r3, #255
cmp r3, #0
bne .L258
ldr r3, [fp, #-128]
sub r3, r3, #1
str r3, [fp, #-128]
.L243:
ldr r3, [fp, #-128]
cmp r3, #0
movle r3, #0
movgt r3, #1
and r3, r3, #255
cmp r3, #0
bne .L259
b .L260
.L242:
ldr r3, [fp, #-152]
str r3, [fp, #-128]
b .L261
.L262:
ldr r2, [fp, #-152]
ldr r3, [fp, #-128]
rsb r3, r3, r2
mov r3, r3, asl #3
ldr r2, [fp, #-144]
add r3, r2, r3
mov r2, #0
str r2, [sp, #0]
mov r2, #0
str r2, [sp, #4]
mov r0, r3
mov r1, #1
ldr r2, [fp, #-156]
ldr r3, [fp, #-120]
.LEHB16:
bl _Z8MPI_SendPdiiiii
ldr r2, [fp, #-152]
ldr r3, [fp, #-128]
rsb r3, r3, r2
mov r3, r3, asl #3
ldr r2, [fp, #-148]
add r3, r2, r3
mov r2, #0
str r2, [sp, #0]
mov r2, #0
str r2, [sp, #4]
mov r2, #0
str r2, [sp, #8]
mov r0, r3
mov r1, #1
ldr r2, [fp, #-156]
ldr r3, [fp, #-120]
bl _Z8MPI_RecvPdiiiiiPi
.LEHE16:
ldr r3, [fp, #-128]
sub r3, r3, #1
str r3, [fp, #-128]
.L261:
ldr r3, [fp, #-128]
cmp r3, #0
moveq r3, #0
movne r3, #1
and r3, r3, #255
cmp r3, #0
bne .L262
.L260:
mov r3, #0
b .L270
.L267:
b .L265
.L266:
.L265:
.LEHB17:
bl __cxa_end_cleanup
.LEHE17:
.L270:
mov r0, r3
sub sp, fp, #20
ldmfd sp!, {r4, r5, r6, r7, fp, pc}
.personality __gxx_personality_v0
.handlerdata
.LLSDA24:
.byte 0xff
.byte 0xff
.byte 0x1
.uleb128 .LLSDACSE24-.LLSDACSB24
.LLSDACSB24:
.uleb128 .LEHB14-.LFB24
.uleb128 .LEHE14-.LEHB14
.uleb128 .L266-.LFB24
.uleb128 0
.uleb128 .LEHB15-.LFB24
.uleb128 .LEHE15-.LEHB15
.uleb128 .L267-.LFB24
.uleb128 0
.uleb128 .LEHB16-.LFB24
.uleb128 .LEHE16-.LEHB16
.uleb128 .L266-.LFB24
.uleb128 0
.uleb128 .LEHB17-.LFB24
.uleb128 .LEHE17-.LEHB17
.uleb128 0
.uleb128 0
.LLSDACSE24:
.text
.fnend
.size _Z13MPI_AllreducePdS_iiii, .-_Z13MPI_AllreducePdS_iiii
.align 2
.global _Z12MPI_AlltoallPiiiS_iii
.type _Z12MPI_AlltoallPiiiS_iii, %function
_Z12MPI_AlltoallPiiiS_iii:
.fnstart
.LFB25:
@ args = 12, pretend = 0, frame = 96
@ frame_needed = 1, uses_anonymous_args = 0
stmfd sp!, {r4, r5, fp, lr}
.save {r4, r5, fp, lr}
.setfp fp, sp, #12
add fp, sp, #12
.pad #96
sub sp, sp, #96
str r0, [fp, #-96]
str r1, [fp, #-100]
str r2, [fp, #-104]
str r3, [fp, #-108]
sub r3, fp, #88
ldr r0, [fp, #12]
mov r1, r3
.LEHB18:
bl _Z13MPI_Comm_rankiPi
sub r3, fp, #84
ldr r0, [fp, #12]
mov r1, r3
bl _Z13MPI_Comm_sizeiPi
bl m5_barrier
mov r3, #0
str r3, [fp, #-80]
b .L272
.L274:
ldr r3, [fp, #-88]
ldr r2, [fp, #-80]
cmp r2, r3
beq .L273
ldr r3, [fp, #-80]
ldr r2, [fp, #-100]
mul r3, r2, r3
mov r3, r3, asl #2
ldr r2, [fp, #-96]
add r3, r2, r3
str r3, [fp, #-72]
ldr r3, [fp, #-100]
str r3, [fp, #-68]
ldr r3, [fp, #-104]
str r3, [fp, #-40]
ldr r3, [fp, #-80]
str r3, [fp, #-64]
mov r3, #5
str r3, [fp, #-36]
mov r3, #0
str r3, [fp, #-32]
ldr r3, [fp, #-64]
mov r3, r3, asl #6
orr r3, r3, #-268435456
str r3, [fp, #-64]
ldr r3, [fp, #-64]
str r3, [fp, #-60]
ldr r3, [fp, #-60]
ldr r1, [fp, #-72]
ldr r2, [fp, #-68]
mov r5, r1
mov r4, r2
#APP
@ 95 "../../lib/mpi.h" 1
1:
ldr r8, [r5]
str r8, [r3, #0]
add r5, r5, #4
subs r4, r4, #1
bne 1b
@ 0 "" 2
str r5, [fp, #-72]
str r4, [fp, #-68]
.L273:
ldr r3, [fp, #-80]
add r3, r3, #1
str r3, [fp, #-80]
.L272:
ldr r3, [fp, #-84]
ldr r2, [fp, #-80]
cmp r2, r3
movge r3, #0
movlt r3, #1
and r3, r3, #255
cmp r3, #0
bne .L274
mov r3, #0
str r3, [fp, #-76]
b .L275
.L276:
ldr r3, [fp, #-88]
ldr r2, [fp, #4]
mul r2, r3, r2
ldr r3, [fp, #-76]
add r3, r2, r3
mov r3, r3, asl #2
ldr r2, [fp, #-108]
add r3, r2, r3
ldr r2, [fp, #-88]
ldr r1, [fp, #-100]
mul r1, r2, r1
ldr r2, [fp, #-76]
add r2, r1, r2
mov r2, r2, asl #2
ldr r1, [fp, #-96]
add r2, r1, r2
ldr r2, [r2, #0]
str r2, [r3, #0]
ldr r3, [fp, #-76]
add r3, r3, #1
str r3, [fp, #-76]
.L275:
ldr r2, [fp, #4]
ldr r3, [fp, #-76]
rsb r3, r3, r2
cmp r3, #0
movle r3, #0
movgt r3, #1
and r3, r3, #255
cmp r3, #0
bne .L276
mov r3, #0
str r3, [fp, #-80]
b .L277
.L281:
ldr r3, [fp, #-88]
ldr r2, [fp, #-80]
cmp r2, r3
beq .L278
ldr r3, [fp, #-80]
ldr r2, [fp, #4]
mul r3, r2, r3
mov r3, r3, asl #2
ldr r2, [fp, #-108]
add r3, r2, r3
str r3, [fp, #-56]
ldr r3, [fp, #4]
str r3, [fp, #-52]
ldr r3, [fp, #8]
str r3, [fp, #-28]
ldr r3, [fp, #-80]
str r3, [fp, #-48]
mov r3, #5
str r3, [fp, #-24]
mov r3, #0
str r3, [fp, #-20]
mov r3, #0
str r3, [fp, #-16]
ldr r3, [fp, #-48]
mov r3, r3, asl #6
orr r3, r3, #-268435456
str r3, [fp, #-48]
ldr r3, [fp, #-48]
str r3, [fp, #-44]
b .L279
.L280:
ldr r3, [fp, #-44]
ldr r1, [fp, #-56]
ldr r2, [fp, #-52]
mov r5, r1
mov r4, r2
#APP
@ 141 "../../lib/mpi.h" 1
ldr r8, [r3, #0]
str r8, [r5]
add r5, r5, #4
sub r4, r4, #1
@ 0 "" 2
str r5, [fp, #-56]
str r4, [fp, #-52]
.L279:
ldr r3, [fp, #-52]
cmp r3, #0
moveq r3, #0
movne r3, #1
and r3, r3, #255
cmp r3, #0
bne .L280
.L278:
ldr r3, [fp, #-80]
add r3, r3, #1
str r3, [fp, #-80]
.L277:
ldr r3, [fp, #-84]
ldr r2, [fp, #-80]
cmp r2, r3
movge r3, #0
movlt r3, #1
and r3, r3, #255
cmp r3, #0
bne .L281
bl m5_barrier
.LEHE18:
mov r3, #0
b .L285
.L284:
.LEHB19:
bl __cxa_end_cleanup
.LEHE19:
.L285:
mov r0, r3
sub sp, fp, #12
ldmfd sp!, {r4, r5, fp, pc}
.personality __gxx_personality_v0
.handlerdata
.LLSDA25:
.byte 0xff
.byte 0xff
.byte 0x1
.uleb128 .LLSDACSE25-.LLSDACSB25
.LLSDACSB25:
.uleb128 .LEHB18-.LFB25
.uleb128 .LEHE18-.LEHB18
.uleb128 .L284-.LFB25
.uleb128 0
.uleb128 .LEHB19-.LFB25
.uleb128 .LEHE19-.LEHB19
.uleb128 0
.uleb128 0
.LLSDACSE25:
.text
.fnend
.size _Z12MPI_AlltoallPiiiS_iii, .-_Z12MPI_AlltoallPiiiS_iii
.align 2
.global _Z12MPI_AlltoallPfiiS_iii
.type _Z12MPI_AlltoallPfiiS_iii, %function
_Z12MPI_AlltoallPfiiS_iii:
.fnstart
.LFB26:
@ args = 12, pretend = 0, frame = 96
@ frame_needed = 1, uses_anonymous_args = 0
stmfd sp!, {r4, r5, fp, lr}
.save {r4, r5, fp, lr}
.setfp fp, sp, #12
add fp, sp, #12
.pad #96
sub sp, sp, #96
str r0, [fp, #-96]
str r1, [fp, #-100]
str r2, [fp, #-104]
str r3, [fp, #-108]
sub r3, fp, #88
ldr r0, [fp, #12]
mov r1, r3
.LEHB20:
bl _Z13MPI_Comm_rankiPi
sub r3, fp, #84
ldr r0, [fp, #12]
mov r1, r3
bl _Z13MPI_Comm_sizeiPi
bl m5_barrier
mov r3, #0
str r3, [fp, #-80]
b .L287
.L290:
ldr r3, [fp, #-88]
ldr r2, [fp, #-80]
cmp r2, r3
beq .L288
ldr r3, [fp, #-80]
ldr r2, [fp, #-100]
mul r3, r2, r3
mov r3, r3, asl #2
ldr r2, [fp, #-96]
add r3, r2, r3
str r3, [fp, #-72]
ldr r3, [fp, #-100]
str r3, [fp, #-68]
ldr r3, [fp, #-104]
str r3, [fp, #-40]
ldr r3, [fp, #-80]
str r3, [fp, #-64]
mov r3, #0
str r3, [fp, #-36]
mov r3, #0
str r3, [fp, #-32]
ldr r3, [fp, #-64]
mov r3, r3, asl #6
orr r3, r3, #-268435456
str r3, [fp, #-64]
ldr r3, [fp, #-64]
str r3, [fp, #-60]
ldr r3, [fp, #-60]
ldr r1, [fp, #-72]
ldr r2, [fp, #-68]
mov r5, r1
mov r4, r2
#APP
@ 114 "../../lib/mpi.h" 1
1:
ldr r8, [r5]
str r8, [r3, #0]
add r5, r5, #4
subs r4, r4, #1
bne 1b
@ 0 "" 2
str r5, [fp, #-72]
str r4, [fp, #-68]
.L288:
ldr r3, [fp, #-80]
add r3, r3, #1
str r3, [fp, #-80]
.L287:
ldr r3, [fp, #-84]
ldr r2, [fp, #-80]
cmp r2, r3
movge r3, #0
movlt r3, #1
and r3, r3, #255
cmp r3, #0
bne .L290
mov r3, #0
str r3, [fp, #-76]
b .L291
.L292:
ldr r3, [fp, #-88]
ldr r2, [fp, #4]
mul r3, r2, r3
mov r2, r3
ldr r3, [fp, #-76]
add r3, r2, r3
mov r3, r3, asl #2
ldr r2, [fp, #-108]
add r3, r2, r3
ldr r2, [fp, #-88]
ldr r1, [fp, #-100]
mul r2, r1, r2
mov r1, r2
ldr r2, [fp, #-76]
add r2, r1, r2
mov r2, r2, asl #2
ldr r1, [fp, #-96]
add r2, r1, r2
ldr r2, [r2, #0] @ float
str r2, [r3, #0] @ float
ldr r3, [fp, #-76]
add r3, r3, #1
str r3, [fp, #-76]
.L291:
ldr r2, [fp, #4]
ldr r3, [fp, #-76]
rsb r3, r3, r2
cmp r3, #0
movle r3, #0
movgt r3, #1
and r3, r3, #255
cmp r3, #0
bne .L292
mov r3, #0
str r3, [fp, #-80]
b .L293
.L298:
ldr r3, [fp, #-88]
ldr r2, [fp, #-80]
cmp r2, r3
beq .L294
ldr r3, [fp, #-80]
ldr r2, [fp, #4]
mul r3, r2, r3
mov r3, r3, asl #2
ldr r2, [fp, #-108]
add r3, r2, r3
str r3, [fp, #-56]
ldr r3, [fp, #4]
str r3, [fp, #-52]
ldr r3, [fp, #8]
str r3, [fp, #-28]
ldr r3, [fp, #-80]
str r3, [fp, #-48]
mov r3, #0
str r3, [fp, #-24]
mov r3, #0
str r3, [fp, #-20]
mov r3, #0
str r3, [fp, #-16]
ldr r3, [fp, #-48]
mov r3, r3, asl #6
orr r3, r3, #-268435456
str r3, [fp, #-48]
ldr r3, [fp, #-48]
str r3, [fp, #-44]
b .L295
.L296:
ldr r3, [fp, #-44]
ldr r1, [fp, #-56]
ldr r2, [fp, #-52]
mov r5, r1
mov r4, r2
#APP
@ 185 "../../lib/mpi.h" 1
ldr r8, [r3, #0]
str r8, [r5]
add r5, r5, #4
sub r4, r4, #1
@ 0 "" 2
str r5, [fp, #-56]
str r4, [fp, #-52]
.L295:
ldr r3, [fp, #-52]
cmp r3, #0
moveq r3, #0
movne r3, #1
and r3, r3, #255
cmp r3, #0
bne .L296
.L294:
ldr r3, [fp, #-80]
add r3, r3, #1
str r3, [fp, #-80]
.L293:
ldr r3, [fp, #-84]
ldr r2, [fp, #-80]
cmp r2, r3
movge r3, #0
movlt r3, #1
and r3, r3, #255
cmp r3, #0
bne .L298
bl m5_barrier
.LEHE20:
mov r3, #0
b .L302
.L301:
.LEHB21:
bl __cxa_end_cleanup
.LEHE21:
.L302:
mov r0, r3
sub sp, fp, #12
ldmfd sp!, {r4, r5, fp, pc}
.personality __gxx_personality_v0
.handlerdata
.LLSDA26:
.byte 0xff
.byte 0xff
.byte 0x1
.uleb128 .LLSDACSE26-.LLSDACSB26
.LLSDACSB26:
.uleb128 .LEHB20-.LFB26
.uleb128 .LEHE20-.LEHB20
.uleb128 .L301-.LFB26
.uleb128 0
.uleb128 .LEHB21-.LFB26
.uleb128 .LEHE21-.LEHB21
.uleb128 0
.uleb128 0
.LLSDACSE26:
.text
.fnend
.size _Z12MPI_AlltoallPfiiS_iii, .-_Z12MPI_AlltoallPfiiS_iii
.align 2
.global _Z12MPI_AlltoallPdiiS_iii
.type _Z12MPI_AlltoallPdiiS_iii, %function
_Z12MPI_AlltoallPdiiS_iii:
.fnstart
.LFB27:
@ args = 12, pretend = 0, frame = 32
@ frame_needed = 1, uses_anonymous_args = 0
stmfd sp!, {r4, fp, lr}
.save {r4, fp, lr}
.setfp fp, sp, #8
add fp, sp, #8
.pad #52
sub sp, sp, #52
str r0, [fp, #-32]
str r1, [fp, #-36]
str r2, [fp, #-40]
str r3, [fp, #-44]
sub r3, fp, #28
ldr r0, [fp, #12]
mov r1, r3
.LEHB22:
bl _Z13MPI_Comm_rankiPi
sub r3, fp, #24
ldr r0, [fp, #12]
mov r1, r3
bl _Z13MPI_Comm_sizeiPi
bl m5_barrier
mov r3, #0
str r3, [fp, #-20]
b .L304
.L306:
ldr r3, [fp, #-28]
ldr r2, [fp, #-20]
cmp r2, r3
beq .L305
ldr r3, [fp, #-20]
ldr r2, [fp, #-36]
mul r3, r2, r3
mov r3, r3, asl #3
ldr r2, [fp, #-32]
add r3, r2, r3
mov r2, #0
str r2, [sp, #0]
mov r2, #0
str r2, [sp, #4]
mov r0, r3
ldr r1, [fp, #-36]
ldr r2, [fp, #-40]
ldr r3, [fp, #-20]
bl _Z8MPI_SendPdiiiii
.L305:
ldr r3, [fp, #-20]
add r3, r3, #1
str r3, [fp, #-20]
.L304:
ldr r3, [fp, #-24]
ldr r2, [fp, #-20]
cmp r2, r3
movge r3, #0
movlt r3, #1
and r3, r3, #255
cmp r3, #0
bne .L306
mov r3, #0
str r3, [fp, #-16]
b .L307
.L308:
ldr r3, [fp, #-28]
ldr r2, [fp, #4]
mul r3, r2, r3
mov r2, r3
ldr r3, [fp, #-16]
add r3, r2, r3
mov r3, r3, asl #3
ldr r2, [fp, #-44]
add r2, r2, r3
ldr r3, [fp, #-28]
ldr r1, [fp, #-36]
mul r3, r1, r3
mov r1, r3
ldr r3, [fp, #-16]
add r3, r1, r3
mov r3, r3, asl #3
ldr r1, [fp, #-32]
add r3, r1, r3
ldmia r3, {r3-r4}
stmia r2, {r3-r4}
ldr r3, [fp, #-16]
add r3, r3, #1
str r3, [fp, #-16]
.L307:
ldr r2, [fp, #4]
ldr r3, [fp, #-16]
rsb r3, r3, r2
cmp r3, #0
movle r3, #0
movgt r3, #1
and r3, r3, #255
cmp r3, #0
bne .L308
mov r3, #0
str r3, [fp, #-20]
b .L309
.L311:
ldr r3, [fp, #-28]
ldr r2, [fp, #-20]
cmp r2, r3
beq .L310
ldr r3, [fp, #-20]
ldr r2, [fp, #4]
mul r3, r2, r3
mov r3, r3, asl #3
ldr r2, [fp, #-44]
add r3, r2, r3
mov r2, #0
str r2, [sp, #0]
mov r2, #0
str r2, [sp, #4]
mov r2, #0
str r2, [sp, #8]
mov r0, r3
ldr r1, [fp, #4]
ldr r2, [fp, #8]
ldr r3, [fp, #-20]
bl _Z8MPI_RecvPdiiiiiPi
.L310:
ldr r3, [fp, #-20]
add r3, r3, #1
str r3, [fp, #-20]
.L309:
ldr r3, [fp, #-24]
ldr r2, [fp, #-20]
cmp r2, r3
movge r3, #0
movlt r3, #1
and r3, r3, #255
cmp r3, #0
bne .L311
bl m5_barrier
.LEHE22:
mov r3, #0
b .L315
.L314:
.LEHB23:
bl __cxa_end_cleanup
.LEHE23:
.L315:
mov r0, r3
sub sp, fp, #8
ldmfd sp!, {r4, fp, pc}
.personality __gxx_personality_v0
.handlerdata
.LLSDA27:
.byte 0xff
.byte 0xff
.byte 0x1
.uleb128 .LLSDACSE27-.LLSDACSB27
.LLSDACSB27:
.uleb128 .LEHB22-.LFB27
.uleb128 .LEHE22-.LEHB22
.uleb128 .L314-.LFB27
.uleb128 0
.uleb128 .LEHB23-.LFB27
.uleb128 .LEHE23-.LEHB23
.uleb128 0
.uleb128 0
.LLSDACSE27:
.text
.fnend
.size _Z12MPI_AlltoallPdiiS_iii, .-_Z12MPI_AlltoallPdiiS_iii
.align 2
.global _Z13MPI_AlltoallvPiS_S_iS_S_S_ii
.type _Z13MPI_AlltoallvPiS_S_iS_S_S_ii, %function
_Z13MPI_AlltoallvPiS_S_iS_S_S_ii:
.fnstart
.LFB28:
@ args = 20, pretend = 0, frame = 96
@ frame_needed = 1, uses_anonymous_args = 0
stmfd sp!, {r4, r5, fp, lr}
.save {r4, r5, fp, lr}
.setfp fp, sp, #12
add fp, sp, #12
.pad #96
sub sp, sp, #96
str r0, [fp, #-96]
str r1, [fp, #-100]
str r2, [fp, #-104]
str r3, [fp, #-108]
sub r3, fp, #88
ldr r0, [fp, #20]
mov r1, r3
.LEHB24:
bl _Z13MPI_Comm_rankiPi
sub r3, fp, #84
ldr r0, [fp, #20]
mov r1, r3
bl _Z13MPI_Comm_sizeiPi
bl m5_barrier
.LEHE24:
mov r3, #0
str r3, [fp, #-80]
b .L317
.L319:
ldr r3, [fp, #-88]
ldr r2, [fp, #-80]
cmp r2, r3
beq .L318
ldr r3, [fp, #-80]
mov r3, r3, asl #2
ldr r2, [fp, #-104]
add r3, r2, r3
ldr r3, [r3, #0]
mov r3, r3, asl #2
ldr r2, [fp, #-96]
add r2, r2, r3
ldr r3, [fp, #-80]
mov r3, r3, asl #2
ldr r1, [fp, #-100]
add r3, r1, r3
ldr r3, [r3, #0]
str r2, [fp, #-72]
str r3, [fp, #-68]
ldr r3, [fp, #-108]
str r3, [fp, #-40]
ldr r3, [fp, #-80]
str r3, [fp, #-64]
mov r3, #2
str r3, [fp, #-36]
mov r3, #0
str r3, [fp, #-32]
ldr r3, [fp, #-64]
mov r3, r3, asl #6
orr r3, r3, #-268435456
str r3, [fp, #-64]
ldr r3, [fp, #-64]
str r3, [fp, #-60]
ldr r3, [fp, #-60]
ldr r1, [fp, #-72]
ldr r2, [fp, #-68]
mov r5, r1
mov r4, r2
#APP
@ 95 "../../lib/mpi.h" 1
1:
ldr r8, [r5]
str r8, [r3, #0]
add r5, r5, #4
subs r4, r4, #1
bne 1b
@ 0 "" 2
str r5, [fp, #-72]
str r4, [fp, #-68]
.L318:
ldr r3, [fp, #-80]
add r3, r3, #1
str r3, [fp, #-80]
.L317:
ldr r3, [fp, #-84]
ldr r2, [fp, #-80]
cmp r2, r3
movge r3, #0
movlt r3, #1
and r3, r3, #255
cmp r3, #0
bne .L319
mov r3, #0
str r3, [fp, #-76]
b .L320
.L321:
ldr r3, [fp, #-88]
mov r3, r3, asl #2
ldr r2, [fp, #12]
add r3, r2, r3
ldr r3, [r3, #0]
mov r2, r3
ldr r3, [fp, #-76]
add r3, r2, r3
mov r3, r3, asl #2
ldr r2, [fp, #4]
add r3, r2, r3
ldr r2, [fp, #-88]
mov r2, r2, asl #2
ldr r1, [fp, #-104]
add r2, r1, r2
ldr r2, [r2, #0]
mov r1, r2
ldr r2, [fp, #-76]
add r2, r1, r2
mov r2, r2, asl #2
ldr r1, [fp, #-96]
add r2, r1, r2
ldr r2, [r2, #0]
str r2, [r3, #0]
ldr r3, [fp, #-76]
add r3, r3, #1
str r3, [fp, #-76]
.L320:
ldr r3, [fp, #-88]
mov r3, r3, asl #2
ldr r2, [fp, #8]
add r3, r2, r3
ldr r2, [r3, #0]
ldr r3, [fp, #-76]
rsb r3, r3, r2
cmp r3, #0
movle r3, #0
movgt r3, #1
and r3, r3, #255
cmp r3, #0
bne .L321
mov r3, #0
str r3, [fp, #-80]
b .L322
.L326:
ldr r3, [fp, #-88]
ldr r2, [fp, #-80]
cmp r2, r3
beq .L323
ldr r3, [fp, #-80]
mov r3, r3, asl #2
ldr r2, [fp, #12]
add r3, r2, r3
ldr r3, [r3, #0]
mov r3, r3, asl #2
ldr r2, [fp, #4]
add r2, r2, r3
ldr r3, [fp, #-80]
mov r3, r3, asl #2
ldr r1, [fp, #8]
add r3, r1, r3
ldr r3, [r3, #0]
str r2, [fp, #-56]
str r3, [fp, #-52]
ldr r3, [fp, #16]
str r3, [fp, #-28]
ldr r3, [fp, #-80]
str r3, [fp, #-48]
mov r3, #2
str r3, [fp, #-24]
mov r3, #0
str r3, [fp, #-20]
mov r3, #0
str r3, [fp, #-16]
ldr r3, [fp, #-48]
mov r3, r3, asl #6
orr r3, r3, #-268435456
str r3, [fp, #-48]
ldr r3, [fp, #-48]
str r3, [fp, #-44]
b .L324
.L325:
ldr r3, [fp, #-44]
ldr r1, [fp, #-56]
ldr r2, [fp, #-52]
mov r5, r1
mov r4, r2
#APP
@ 141 "../../lib/mpi.h" 1
ldr r8, [r3, #0]
str r8, [r5]
add r5, r5, #4
sub r4, r4, #1
@ 0 "" 2
str r5, [fp, #-56]
str r4, [fp, #-52]
.L324:
ldr r3, [fp, #-52]
cmp r3, #0
moveq r3, #0
movne r3, #1
and r3, r3, #255
cmp r3, #0
bne .L325
.L323:
ldr r3, [fp, #-80]
add r3, r3, #1
str r3, [fp, #-80]
.L322:
ldr r3, [fp, #-84]
ldr r2, [fp, #-80]
cmp r2, r3
movge r3, #0
movlt r3, #1
and r3, r3, #255
cmp r3, #0
bne .L326
mov r3, #0
b .L330
.L329:
.LEHB25:
bl __cxa_end_cleanup
.LEHE25:
.L330:
mov r0, r3
sub sp, fp, #12
ldmfd sp!, {r4, r5, fp, pc}
.personality __gxx_personality_v0
.handlerdata
.LLSDA28:
.byte 0xff
.byte 0xff
.byte 0x1
.uleb128 .LLSDACSE28-.LLSDACSB28
.LLSDACSB28:
.uleb128 .LEHB24-.LFB28
.uleb128 .LEHE24-.LEHB24
.uleb128 .L329-.LFB28
.uleb128 0
.uleb128 .LEHB25-.LFB28
.uleb128 .LEHE25-.LEHB25
.uleb128 0
.uleb128 0
.LLSDACSE28:
.text
.fnend
.size _Z13MPI_AlltoallvPiS_S_iS_S_S_ii, .-_Z13MPI_AlltoallvPiS_S_iS_S_S_ii
.align 2
.global _Z13MPI_AlltoallvPfPiS0_iS_S0_S0_ii
.type _Z13MPI_AlltoallvPfPiS0_iS_S0_S0_ii, %function
_Z13MPI_AlltoallvPfPiS0_iS_S0_S0_ii:
.fnstart
.LFB29:
@ args = 20, pretend = 0, frame = 96
@ frame_needed = 1, uses_anonymous_args = 0
stmfd sp!, {r4, r5, fp, lr}
.save {r4, r5, fp, lr}
.setfp fp, sp, #12
add fp, sp, #12
.pad #96
sub sp, sp, #96
str r0, [fp, #-96]
str r1, [fp, #-100]
str r2, [fp, #-104]
str r3, [fp, #-108]
sub r3, fp, #88
ldr r0, [fp, #20]
mov r1, r3
.LEHB26:
bl _Z13MPI_Comm_rankiPi
sub r3, fp, #84
ldr r0, [fp, #20]
mov r1, r3
bl _Z13MPI_Comm_sizeiPi
bl m5_barrier
.LEHE26:
mov r3, #0
str r3, [fp, #-80]
b .L332
.L335:
ldr r3, [fp, #-88]
ldr r2, [fp, #-80]
cmp r2, r3
beq .L333
ldr r3, [fp, #-80]
mov r3, r3, asl #2
ldr r2, [fp, #-104]
add r3, r2, r3
ldr r3, [r3, #0]
mov r3, r3, asl #2
ldr r2, [fp, #-96]
add r2, r2, r3
ldr r3, [fp, #-80]
mov r3, r3, asl #2
ldr r1, [fp, #-100]
add r3, r1, r3
ldr r3, [r3, #0]
str r2, [fp, #-72]
str r3, [fp, #-68]
ldr r3, [fp, #-108]
str r3, [fp, #-40]
ldr r3, [fp, #-80]
str r3, [fp, #-64]
mov r3, #0
str r3, [fp, #-36]
mov r3, #0
str r3, [fp, #-32]
ldr r3, [fp, #-64]
mov r3, r3, asl #6
orr r3, r3, #-268435456
str r3, [fp, #-64]
ldr r3, [fp, #-64]
str r3, [fp, #-60]
ldr r3, [fp, #-60]
ldr r1, [fp, #-72]
ldr r2, [fp, #-68]
mov r5, r1
mov r4, r2
#APP
@ 114 "../../lib/mpi.h" 1
1:
ldr r8, [r5]
str r8, [r3, #0]
add r5, r5, #4
subs r4, r4, #1
bne 1b
@ 0 "" 2
str r5, [fp, #-72]
str r4, [fp, #-68]
.L333:
ldr r3, [fp, #-80]
add r3, r3, #1
str r3, [fp, #-80]
.L332:
ldr r3, [fp, #-84]
ldr r2, [fp, #-80]
cmp r2, r3
movge r3, #0
movlt r3, #1
and r3, r3, #255
cmp r3, #0
bne .L335
mov r3, #0
str r3, [fp, #-76]
b .L336
.L337:
ldr r3, [fp, #-88]
mov r3, r3, asl #2
ldr r2, [fp, #12]
add r3, r2, r3
ldr r3, [r3, #0]
mov r2, r3
ldr r3, [fp, #-76]
add r3, r2, r3
mov r3, r3, asl #2
ldr r2, [fp, #4]
add r3, r2, r3
ldr r2, [fp, #-88]
mov r2, r2, asl #2
ldr r1, [fp, #-104]
add r2, r1, r2
ldr r2, [r2, #0]
mov r1, r2
ldr r2, [fp, #-76]
add r2, r1, r2
mov r2, r2, asl #2
ldr r1, [fp, #-96]
add r2, r1, r2
ldr r2, [r2, #0] @ float
str r2, [r3, #0] @ float
ldr r3, [fp, #-76]
add r3, r3, #1
str r3, [fp, #-76]
.L336:
ldr r3, [fp, #-88]
mov r3, r3, asl #2
ldr r2, [fp, #8]
add r3, r2, r3
ldr r2, [r3, #0]
ldr r3, [fp, #-76]
rsb r3, r3, r2
cmp r3, #0
movle r3, #0
movgt r3, #1
and r3, r3, #255
cmp r3, #0
bne .L337
mov r3, #0
str r3, [fp, #-80]
b .L338
.L343:
ldr r3, [fp, #-88]
ldr r2, [fp, #-80]
cmp r2, r3
beq .L339
ldr r3, [fp, #-80]
mov r3, r3, asl #2
ldr r2, [fp, #12]
add r3, r2, r3
ldr r3, [r3, #0]
mov r3, r3, asl #2
ldr r2, [fp, #4]
add r2, r2, r3
ldr r3, [fp, #-80]
mov r3, r3, asl #2
ldr r1, [fp, #8]
add r3, r1, r3
ldr r3, [r3, #0]
str r2, [fp, #-56]
str r3, [fp, #-52]
ldr r3, [fp, #16]
str r3, [fp, #-28]
ldr r3, [fp, #-80]
str r3, [fp, #-48]
mov r3, #0
str r3, [fp, #-24]
mov r3, #0
str r3, [fp, #-20]
mov r3, #0
str r3, [fp, #-16]
ldr r3, [fp, #-48]
mov r3, r3, asl #6
orr r3, r3, #-268435456
str r3, [fp, #-48]
ldr r3, [fp, #-48]
str r3, [fp, #-44]
b .L340
.L341:
ldr r3, [fp, #-44]
ldr r1, [fp, #-56]
ldr r2, [fp, #-52]
mov r5, r1
mov r4, r2
#APP
@ 185 "../../lib/mpi.h" 1
ldr r8, [r3, #0]
str r8, [r5]
add r5, r5, #4
sub r4, r4, #1
@ 0 "" 2
str r5, [fp, #-56]
str r4, [fp, #-52]
.L340:
ldr r3, [fp, #-52]
cmp r3, #0
moveq r3, #0
movne r3, #1
and r3, r3, #255
cmp r3, #0
bne .L341
.L339:
ldr r3, [fp, #-80]
add r3, r3, #1
str r3, [fp, #-80]
.L338:
ldr r3, [fp, #-84]
ldr r2, [fp, #-80]
cmp r2, r3
movge r3, #0
movlt r3, #1
and r3, r3, #255
cmp r3, #0
bne .L343
mov r3, #0
b .L347
.L346:
.LEHB27:
bl __cxa_end_cleanup
.LEHE27:
.L347:
mov r0, r3
sub sp, fp, #12
ldmfd sp!, {r4, r5, fp, pc}
.personality __gxx_personality_v0
.handlerdata
.LLSDA29:
.byte 0xff
.byte 0xff
.byte 0x1
.uleb128 .LLSDACSE29-.LLSDACSB29
.LLSDACSB29:
.uleb128 .LEHB26-.LFB29
.uleb128 .LEHE26-.LEHB26
.uleb128 .L346-.LFB29
.uleb128 0
.uleb128 .LEHB27-.LFB29
.uleb128 .LEHE27-.LEHB27
.uleb128 0
.uleb128 0
.LLSDACSE29:
.text
.fnend
.size _Z13MPI_AlltoallvPfPiS0_iS_S0_S0_ii, .-_Z13MPI_AlltoallvPfPiS0_iS_S0_S0_ii
.align 2
.global _Z13MPI_AlltoallvPdPiS0_iS_S0_S0_ii
.type _Z13MPI_AlltoallvPdPiS0_iS_S0_S0_ii, %function
_Z13MPI_AlltoallvPdPiS0_iS_S0_S0_ii:
.fnstart
.LFB30:
@ args = 20, pretend = 0, frame = 32
@ frame_needed = 1, uses_anonymous_args = 0
stmfd sp!, {r4, fp, lr}
.save {r4, fp, lr}
.setfp fp, sp, #8
add fp, sp, #8
.pad #52
sub sp, sp, #52
str r0, [fp, #-32]
str r1, [fp, #-36]
str r2, [fp, #-40]
str r3, [fp, #-44]
sub r3, fp, #28
ldr r0, [fp, #20]
mov r1, r3
.LEHB28:
bl _Z13MPI_Comm_rankiPi
sub r3, fp, #24
ldr r0, [fp, #20]
mov r1, r3
bl _Z13MPI_Comm_sizeiPi
mov r3, #0
str r3, [fp, #-20]
b .L349
.L351:
ldr r3, [fp, #-28]
ldr r2, [fp, #-20]
cmp r2, r3
beq .L350
ldr r3, [fp, #-20]
mov r3, r3, asl #2
ldr r2, [fp, #-40]
add r3, r2, r3
ldr r3, [r3, #0]
mov r3, r3, asl #3
ldr r2, [fp, #-32]
add r2, r2, r3
ldr r3, [fp, #-20]
mov r3, r3, asl #2
ldr r1, [fp, #-36]
add r3, r1, r3
ldr r3, [r3, #0]
mov r1, #0
str r1, [sp, #0]
mov r1, #0
str r1, [sp, #4]
mov r0, r2
mov r1, r3
ldr r2, [fp, #-44]
ldr r3, [fp, #-20]
bl _Z8MPI_SendPdiiiii
.L350:
ldr r3, [fp, #-20]
add r3, r3, #1
str r3, [fp, #-20]
.L349:
ldr r3, [fp, #-24]
ldr r2, [fp, #-20]
cmp r2, r3
movge r3, #0
movlt r3, #1
and r3, r3, #255
cmp r3, #0
bne .L351
mov r3, #0
str r3, [fp, #-16]
b .L352
.L353:
ldr r3, [fp, #-28]
mov r3, r3, asl #2
ldr r2, [fp, #12]
add r3, r2, r3
ldr r3, [r3, #0]
mov r2, r3
ldr r3, [fp, #-16]
add r3, r2, r3
mov r3, r3, asl #3
ldr r2, [fp, #4]
add r2, r2, r3
ldr r3, [fp, #-28]
mov r3, r3, asl #2
ldr r1, [fp, #-40]
add r3, r1, r3
ldr r3, [r3, #0]
mov r1, r3
ldr r3, [fp, #-16]
add r3, r1, r3
mov r3, r3, asl #3
ldr r1, [fp, #-32]
add r3, r1, r3
ldmia r3, {r3-r4}
stmia r2, {r3-r4}
ldr r3, [fp, #-16]
add r3, r3, #1
str r3, [fp, #-16]
.L352:
ldr r3, [fp, #-28]
mov r3, r3, asl #2
ldr r2, [fp, #8]
add r3, r2, r3
ldr r2, [r3, #0]
ldr r3, [fp, #-16]
rsb r3, r3, r2
cmp r3, #0
movle r3, #0
movgt r3, #1
and r3, r3, #255
cmp r3, #0
bne .L353
mov r3, #0
str r3, [fp, #-20]
b .L354
.L356:
ldr r3, [fp, #-28]
ldr r2, [fp, #-20]
cmp r2, r3
beq .L355
ldr r3, [fp, #-20]
mov r3, r3, asl #2
ldr r2, [fp, #12]
add r3, r2, r3
ldr r3, [r3, #0]
mov r3, r3, asl #3
ldr r2, [fp, #4]
add r2, r2, r3
ldr r3, [fp, #-20]
mov r3, r3, asl #2
ldr r1, [fp, #8]
add r3, r1, r3
ldr r3, [r3, #0]
mov r1, #0
str r1, [sp, #0]
mov r1, #0
str r1, [sp, #4]
mov r1, #0
str r1, [sp, #8]
mov r0, r2
mov r1, r3
ldr r2, [fp, #16]
ldr r3, [fp, #-20]
bl _Z8MPI_RecvPdiiiiiPi
.LEHE28:
.L355:
ldr r3, [fp, #-20]
add r3, r3, #1
str r3, [fp, #-20]
.L354:
ldr r3, [fp, #-24]
ldr r2, [fp, #-20]
cmp r2, r3
movge r3, #0
movlt r3, #1
and r3, r3, #255
cmp r3, #0
bne .L356
mov r3, #0
b .L360
.L359:
.LEHB29:
bl __cxa_end_cleanup
.LEHE29:
.L360:
mov r0, r3
sub sp, fp, #8
ldmfd sp!, {r4, fp, pc}
.personality __gxx_personality_v0
.handlerdata
.LLSDA30:
.byte 0xff
.byte 0xff
.byte 0x1
.uleb128 .LLSDACSE30-.LLSDACSB30
.LLSDACSB30:
.uleb128 .LEHB28-.LFB30
.uleb128 .LEHE28-.LEHB28
.uleb128 .L359-.LFB30
.uleb128 0
.uleb128 .LEHB29-.LFB30
.uleb128 .LEHE29-.LEHB29
.uleb128 0
.uleb128 0
.LLSDACSE30:
.text
.fnend
.size _Z13MPI_AlltoallvPdPiS0_iS_S0_S0_ii, .-_Z13MPI_AlltoallvPdPiS0_iS_S0_S0_ii
.align 2
.global _Z12MPI_Finalizev
.type _Z12MPI_Finalizev, %function
_Z12MPI_Finalizev:
.fnstart
.LFB31:
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 1, uses_anonymous_args = 0
@ link register save eliminated.
str fp, [sp, #-4]!
add fp, sp, #0
mov r3, #0
mov r0, r3
add sp, fp, #0
ldmfd sp!, {fp}
bx lr
.cantunwind
.fnend
.size _Z12MPI_Finalizev, .-_Z12MPI_Finalizev
.global encpt_rk
.bss
.align 2
.type encpt_rk, %object
.size encpt_rk, 176
encpt_rk:
.space 176
.global decpt_rk
.data
.align 2
.type decpt_rk, %object
.size decpt_rk, 176
decpt_rk:
.word 385851771
.word -1016722110
.word 2128444183
.word -956400154
.word -865807366
.word -116512505
.word -1497815267
.word 2049776679
.word -1666659504
.word 896203517
.word 1605832218
.word -594265286
.word 1771485926
.word -1446891091
.word 1792931047
.word -2094844640
.word 30271560
.word -1068201141
.word -1021328054
.word -369180217
.word 1050615382
.word -1046912253
.word 55266817
.word 719389837
.word 233057925
.word -16351915
.word -1026413310
.word 699026060
.word 1487806749
.word -220048432
.word 1037324375
.word -344430706
.word -306428573
.word -1437830451
.word -818543737
.word -693356583
.word 1801089897
.word 1206925230
.word 1702523210
.word 429536350
.word 868642057
.word 1047026703
.word 1661145977
.word -1837356535
.text
.align 2
.type _ZL4rotrji, %function
_ZL4rotrji:
.fnstart
.LFB32:
@ args = 0, pretend = 0, frame = 8
@ frame_needed = 1, uses_anonymous_args = 0
@ link register save eliminated.
str fp, [sp, #-4]!
add fp, sp, #0
sub sp, sp, #12
str r0, [fp, #-8]
str r1, [fp, #-12]
ldr r2, [fp, #-8]
ldr r3, [fp, #-12]
mov r3, r2, ror r3
mov r0, r3
add sp, fp, #0
ldmfd sp!, {fp}
bx lr
.cantunwind
.fnend
.size _ZL4rotrji, .-_ZL4rotrji
.align 2
.global _Z19rijndaelKeySetupEncPjPKh
.type _Z19rijndaelKeySetupEncPjPKh, %function
_Z19rijndaelKeySetupEncPjPKh:
.fnstart
.LFB33:
@ args = 0, pretend = 0, frame = 16
@ frame_needed = 1, uses_anonymous_args = 0
@ link register save eliminated.
str fp, [sp, #-4]!
add fp, sp, #0
sub sp, sp, #20
str r0, [fp, #-16]
str r1, [fp, #-20]
ldr r3, [fp, #-20]
ldrb r3, [r3, #0] @ zero_extendqisi2
mov r2, r3, asl #24
ldr r3, [fp, #-20]
add r3, r3, #1
ldrb r3, [r3, #0] @ zero_extendqisi2
mov r3, r3, asl #16
eor r2, r2, r3
ldr r3, [fp, #-20]
add r3, r3, #2
ldrb r3, [r3, #0] @ zero_extendqisi2
mov r3, r3, asl #8
eor r2, r2, r3
ldr r3, [fp, #-20]
add r3, r3, #3
ldrb r3, [r3, #0] @ zero_extendqisi2
eor r2, r2, r3
ldr r3, [fp, #-16]
str r2, [r3, #0]
ldr r3, [fp, #-16]
add r3, r3, #4
ldr r2, [fp, #-20]
add r2, r2, #4
ldrb r2, [r2, #0] @ zero_extendqisi2
mov r1, r2, asl #24
ldr r2, [fp, #-20]
add r2, r2, #5
ldrb r2, [r2, #0] @ zero_extendqisi2
mov r2, r2, asl #16
eor r1, r1, r2
ldr r2, [fp, #-20]
add r2, r2, #6
ldrb r2, [r2, #0] @ zero_extendqisi2
mov r2, r2, asl #8
eor r1, r1, r2
ldr r2, [fp, #-20]
add r2, r2, #7
ldrb r2, [r2, #0] @ zero_extendqisi2
eor r2, r1, r2
str r2, [r3, #0]
ldr r3, [fp, #-16]
add r3, r3, #8
ldr r2, [fp, #-20]
add r2, r2, #8
ldrb r2, [r2, #0] @ zero_extendqisi2
mov r1, r2, asl #24
ldr r2, [fp, #-20]
add r2, r2, #9
ldrb r2, [r2, #0] @ zero_extendqisi2
mov r2, r2, asl #16
eor r1, r1, r2
ldr r2, [fp, #-20]
add r2, r2, #10
ldrb r2, [r2, #0] @ zero_extendqisi2
mov r2, r2, asl #8
eor r1, r1, r2
ldr r2, [fp, #-20]
add r2, r2, #11
ldrb r2, [r2, #0] @ zero_extendqisi2
eor r2, r1, r2
str r2, [r3, #0]
ldr r3, [fp, #-16]
add r3, r3, #12
ldr r2, [fp, #-20]
add r2, r2, #12
ldrb r2, [r2, #0] @ zero_extendqisi2
mov r1, r2, asl #24
ldr r2, [fp, #-20]
add r2, r2, #13
ldrb r2, [r2, #0] @ zero_extendqisi2
mov r2, r2, asl #16
eor r1, r1, r2
ldr r2, [fp, #-20]
add r2, r2, #14
ldrb r2, [r2, #0] @ zero_extendqisi2
mov r2, r2, asl #8
eor r1, r1, r2
ldr r2, [fp, #-20]
add r2, r2, #15
ldrb r2, [r2, #0] @ zero_extendqisi2
eor r2, r1, r2
str r2, [r3, #0]
mov r3, #0
str r3, [fp, #-12]
b .L366
.L367:
ldr r3, [fp, #-16]
ldr r3, [r3, #12]
str r3, [fp, #-8]
ldr r3, [fp, #-16]
add r3, r3, #16
ldr r2, [fp, #-16]
ldr r1, [r2, #0]
ldr r2, [fp, #-8]
mov r2, r2, lsr #16
and r0, r2, #255
ldr r2, .L368
ldr r2, [r2, r0, asl #2]
mov r2, r2, asl #8
and r2, r2, #-16777216
eor r1, r1, r2
ldr r2, [fp, #-8]
mov r2, r2, lsr #8
and r0, r2, #255
ldr r2, .L368
ldr r2, [r2, r0, asl #2]
and r2, r2, #16711680
eor r1, r1, r2
ldr r2, [fp, #-8]
and r0, r2, #255
ldr r2, .L368
ldr r2, [r2, r0, asl #2]
and r2, r2, #65280
eor r1, r1, r2
ldr r2, [fp, #-8]
mov r0, r2, lsr #24
ldr r2, .L368
ldr r2, [r2, r0, asl #2]
mov r2, r2, lsr #8
and r2, r2, #255
eor r1, r1, r2
ldr r0, .L368+4
ldr r2, [fp, #-12]
add r2, r0, r2
ldrb r2, [r2, #0] @ zero_extendqisi2
mov r2, r2, asl #24
eor r2, r1, r2
str r2, [r3, #0]
ldr r3, [fp, #-16]
add r3, r3, #20
ldr r2, [fp, #-16]
add r2, r2, #4
ldr r1, [r2, #0]
ldr r2, [fp, #-16]
add r2, r2, #16
ldr r2, [r2, #0]
eor r2, r1, r2
str r2, [r3, #0]
ldr r3, [fp, #-16]
add r3, r3, #24
ldr r2, [fp, #-16]
add r2, r2, #8
ldr r1, [r2, #0]
ldr r2, [fp, #-16]
add r2, r2, #20
ldr r2, [r2, #0]
eor r2, r1, r2
str r2, [r3, #0]
ldr r3, [fp, #-16]
add r3, r3, #28
ldr r2, [fp, #-16]
add r2, r2, #12
ldr r1, [r2, #0]
ldr r2, [fp, #-16]
add r2, r2, #24
ldr r2, [r2, #0]
eor r2, r1, r2
str r2, [r3, #0]
ldr r3, [fp, #-16]
add r3, r3, #16
str r3, [fp, #-16]
ldr r3, [fp, #-12]
add r3, r3, #1
str r3, [fp, #-12]
.L366:
ldr r3, [fp, #-12]
cmp r3, #9
movgt r3, #0
movle r3, #1
and r3, r3, #255
cmp r3, #0
bne .L367
add sp, fp, #0
ldmfd sp!, {fp}
bx lr
.L369:
.align 2
.L368:
.word _ZL3Te0
.word _ZL5rcons
.cantunwind
.fnend
.size _Z19rijndaelKeySetupEncPjPKh, .-_Z19rijndaelKeySetupEncPjPKh
.align 2
.global _Z26rijndaelKeySetupEnc_MasterPjPKhi
.type _Z26rijndaelKeySetupEnc_MasterPjPKhi, %function
_Z26rijndaelKeySetupEnc_MasterPjPKhi:
.fnstart
.LFB34:
@ args = 0, pretend = 0, frame = 48
@ frame_needed = 1, uses_anonymous_args = 0
@ link register save eliminated.
stmfd sp!, {r4, r5, fp}
add fp, sp, #8
sub sp, sp, #52
str r0, [fp, #-48]
str r1, [fp, #-52]
str r2, [fp, #-56]
ldr r3, [fp, #-52]
ldrb r3, [r3, #0] @ zero_extendqisi2
mov r2, r3, asl #24
ldr r3, [fp, #-52]
add r3, r3, #1
ldrb r3, [r3, #0] @ zero_extendqisi2
mov r3, r3, asl #16
eor r2, r2, r3
ldr r3, [fp, #-52]
add r3, r3, #2
ldrb r3, [r3, #0] @ zero_extendqisi2
mov r3, r3, asl #8
eor r2, r2, r3
ldr r3, [fp, #-52]
add r3, r3, #3
ldrb r3, [r3, #0] @ zero_extendqisi2
eor r2, r2, r3
ldr r3, [fp, #-48]
str r2, [r3, #0]
ldr r3, [fp, #-48]
add r3, r3, #4
ldr r2, [fp, #-52]
add r2, r2, #4
ldrb r2, [r2, #0] @ zero_extendqisi2
mov r1, r2, asl #24
ldr r2, [fp, #-52]
add r2, r2, #5
ldrb r2, [r2, #0] @ zero_extendqisi2
mov r2, r2, asl #16
eor r1, r1, r2
ldr r2, [fp, #-52]
add r2, r2, #6
ldrb r2, [r2, #0] @ zero_extendqisi2
mov r2, r2, asl #8
eor r1, r1, r2
ldr r2, [fp, #-52]
add r2, r2, #7
ldrb r2, [r2, #0] @ zero_extendqisi2
eor r2, r1, r2
str r2, [r3, #0]
ldr r3, [fp, #-48]
add r3, r3, #8
ldr r2, [fp, #-52]
add r2, r2, #8
ldrb r2, [r2, #0] @ zero_extendqisi2
mov r1, r2, asl #24
ldr r2, [fp, #-52]
add r2, r2, #9
ldrb r2, [r2, #0] @ zero_extendqisi2
mov r2, r2, asl #16
eor r1, r1, r2
ldr r2, [fp, #-52]
add r2, r2, #10
ldrb r2, [r2, #0] @ zero_extendqisi2
mov r2, r2, asl #8
eor r1, r1, r2
ldr r2, [fp, #-52]
add r2, r2, #11
ldrb r2, [r2, #0] @ zero_extendqisi2
eor r2, r1, r2
str r2, [r3, #0]
ldr r3, [fp, #-48]
add r3, r3, #12
ldr r2, [fp, #-52]
add r2, r2, #12
ldrb r2, [r2, #0] @ zero_extendqisi2
mov r1, r2, asl #24
ldr r2, [fp, #-52]
add r2, r2, #13
ldrb r2, [r2, #0] @ zero_extendqisi2
mov r2, r2, asl #16
eor r1, r1, r2
ldr r2, [fp, #-52]
add r2, r2, #14
ldrb r2, [r2, #0] @ zero_extendqisi2
mov r2, r2, asl #8
eor r1, r1, r2
ldr r2, [fp, #-52]
add r2, r2, #15
ldrb r2, [r2, #0] @ zero_extendqisi2
eor r2, r1, r2
str r2, [r3, #0]
ldr r3, [fp, #-48]
str r3, [fp, #-44]
ldr r3, [fp, #-56]
add r3, r3, #1
ldr r2, [fp, #-44]
str r2, [fp, #-40]
mov r2, #4
str r2, [fp, #-36]
mov r2, #4
str r2, [fp, #-24]
str r3, [fp, #-32]
mov r3, #0
str r3, [fp, #-20]
mov r3, #0
str r3, [fp, #-16]
ldr r3, [fp, #-32]
mov r3, r3, asl #6
orr r3, r3, #-268435456
str r3, [fp, #-32]
ldr r3, [fp, #-32]
str r3, [fp, #-28]
ldr r3, [fp, #-28]
ldr r1, [fp, #-40]
ldr r2, [fp, #-36]
mov r5, r1
mov r4, r2
#APP
@ 95 "../../lib/mpi.h" 1
1:
ldr r8, [r5]
str r8, [r3, #0]
add r5, r5, #4
subs r4, r4, #1
bne 1b
@ 0 "" 2
str r5, [fp, #-40]
str r4, [fp, #-36]
sub sp, fp, #8
ldmfd sp!, {r4, r5, fp}
bx lr
.cantunwind
.fnend
.size _Z26rijndaelKeySetupEnc_MasterPjPKhi, .-_Z26rijndaelKeySetupEnc_MasterPjPKhi
.align 2
.global _Z26rijndaelKeySetupEnc_MiddlePji
.type _Z26rijndaelKeySetupEnc_MiddlePji, %function
_Z26rijndaelKeySetupEnc_MiddlePji:
.fnstart
.LFB35:
@ args = 0, pretend = 0, frame = 88
@ frame_needed = 1, uses_anonymous_args = 0
@ link register save eliminated.
stmfd sp!, {r4, r5, fp}
add fp, sp, #8
sub sp, sp, #92
str r0, [fp, #-96]
str r1, [fp, #-100]
ldr r3, [fp, #-96]
str r3, [fp, #-84]
ldr r3, [fp, #-100]
sub r3, r3, #1
ldr r2, [fp, #-84]
str r2, [fp, #-72]
mov r2, #4
str r2, [fp, #-68]
mov r2, #4
str r2, [fp, #-40]
str r3, [fp, #-64]
mov r3, #0
str r3, [fp, #-36]
mov r3, #0
str r3, [fp, #-32]
mov r3, #0
str r3, [fp, #-28]
ldr r3, [fp, #-64]
mov r3, r3, asl #6
orr r3, r3, #-268435456
str r3, [fp, #-64]
ldr r3, [fp, #-64]
str r3, [fp, #-60]
b .L372
.L373:
ldr r3, [fp, #-60]
ldr r1, [fp, #-72]
ldr r2, [fp, #-68]
mov r5, r1
mov r4, r2
#APP
@ 141 "../../lib/mpi.h" 1
ldr r8, [r3, #0]
str r8, [r5]
add r5, r5, #4
sub r4, r4, #1
@ 0 "" 2
str r5, [fp, #-72]
str r4, [fp, #-68]
.L372:
ldr r3, [fp, #-68]
cmp r3, #0
moveq r3, #0
movne r3, #1
and r3, r3, #255
cmp r3, #0
bne .L373
mov r3, #0
str r3, [fp, #-88]
b .L374
.L375:
ldr r3, [fp, #-96]
ldr r3, [r3, #12]
str r3, [fp, #-80]
ldr r3, [fp, #-96]
add r3, r3, #16
ldr r2, [fp, #-96]
ldr r1, [r2, #0]
ldr r2, [fp, #-80]
mov r2, r2, lsr #16
and r0, r2, #255
ldr r2, .L377
ldr r2, [r2, r0, asl #2]
mov r2, r2, asl #8
and r2, r2, #-16777216
eor r1, r1, r2
ldr r2, [fp, #-80]
mov r2, r2, lsr #8
and r0, r2, #255
ldr r2, .L377
ldr r2, [r2, r0, asl #2]
and r2, r2, #16711680
eor r1, r1, r2
ldr r2, [fp, #-80]
and r0, r2, #255
ldr r2, .L377
ldr r2, [r2, r0, asl #2]
and r2, r2, #65280
eor r1, r1, r2
ldr r2, [fp, #-80]
mov r0, r2, lsr #24
ldr r2, .L377
ldr r2, [r2, r0, asl #2]
mov r2, r2, lsr #8
and r2, r2, #255
eor r1, r1, r2
ldr r2, [fp, #-100]
sub r2, r2, #1
mov r0, r2, asl #1
ldr r2, [fp, #-88]
add r2, r0, r2
ldr r0, .L377+4
ldrb r2, [r0, r2] @ zero_extendqisi2
mov r2, r2, asl #24
eor r2, r1, r2
str r2, [r3, #0]
ldr r3, [fp, #-96]
add r3, r3, #20
ldr r2, [fp, #-96]
add r2, r2, #4
ldr r1, [r2, #0]
ldr r2, [fp, #-96]
add r2, r2, #16
ldr r2, [r2, #0]
eor r2, r1, r2
str r2, [r3, #0]
ldr r3, [fp, #-96]
add r3, r3, #24
ldr r2, [fp, #-96]
add r2, r2, #8
ldr r1, [r2, #0]
ldr r2, [fp, #-96]
add r2, r2, #20
ldr r2, [r2, #0]
eor r2, r1, r2
str r2, [r3, #0]
ldr r3, [fp, #-96]
add r3, r3, #28
ldr r2, [fp, #-96]
add r2, r2, #12
ldr r1, [r2, #0]
ldr r2, [fp, #-96]
add r2, r2, #24
ldr r2, [r2, #0]
eor r2, r1, r2
str r2, [r3, #0]
ldr r3, [fp, #-96]
add r3, r3, #16
str r3, [fp, #-96]
ldr r3, [fp, #-88]
add r3, r3, #1
str r3, [fp, #-88]
.L374:
ldr r3, [fp, #-88]
cmp r3, #1
movgt r3, #0
movle r3, #1
and r3, r3, #255
cmp r3, #0
bne .L375
ldr r3, [fp, #-100]
cmp r3, #5
beq .L371
ldr r3, [fp, #-96]
str r3, [fp, #-76]
ldr r3, [fp, #-100]
add r3, r3, #1
ldr r2, [fp, #-76]
str r2, [fp, #-56]
mov r2, #4
str r2, [fp, #-52]
mov r2, #4
str r2, [fp, #-24]
str r3, [fp, #-48]
mov r3, #0
str r3, [fp, #-20]
mov r3, #0
str r3, [fp, #-16]
ldr r3, [fp, #-48]
mov r3, r3, asl #6
orr r3, r3, #-268435456
str r3, [fp, #-48]
ldr r3, [fp, #-48]
str r3, [fp, #-44]
ldr r3, [fp, #-44]
ldr r1, [fp, #-56]
ldr r2, [fp, #-52]
mov r5, r1
mov r4, r2
#APP
@ 95 "../../lib/mpi.h" 1
1:
ldr r8, [r5]
str r8, [r3, #0]
add r5, r5, #4
subs r4, r4, #1
bne 1b
@ 0 "" 2
str r5, [fp, #-56]
str r4, [fp, #-52]
.L371:
sub sp, fp, #8
ldmfd sp!, {r4, r5, fp}
bx lr
.L378:
.align 2
.L377:
.word _ZL3Te0
.word _ZL5rcons
.cantunwind
.fnend
.size _Z26rijndaelKeySetupEnc_MiddlePji, .-_Z26rijndaelKeySetupEnc_MiddlePji
.align 2
.global _Z5ROUNDiPjS_S_S_jjjjPKj
.type _Z5ROUNDiPjS_S_S_jjjjPKj, %function
_Z5ROUNDiPjS_S_S_jjjjPKj:
.fnstart
.LFB36:
@ args = 24, pretend = 0, frame = 16
@ frame_needed = 1, uses_anonymous_args = 0
stmfd sp!, {r4, fp, lr}
add fp, sp, #8
sub sp, sp, #20
str r0, [fp, #-16]
str r1, [fp, #-20]
str r2, [fp, #-24]
str r3, [fp, #-28]
ldr r3, [fp, #8]
mov r2, r3, lsr #24
ldr r3, .L380
ldr r4, [r3, r2, asl #2]
ldr r3, [fp, #20]
mov r3, r3, lsr #16
and r2, r3, #255
ldr r3, .L380
ldr r3, [r3, r2, asl #2]
mov r0, r3
mov r1, #8
bl _ZL4rotrji
mov r3, r0
eor r4, r4, r3
ldr r3, [fp, #16]
mov r3, r3, lsr #8
and r2, r3, #255
ldr r3, .L380
ldr r3, [r3, r2, asl #2]
mov r0, r3
mov r1, #16
bl _ZL4rotrji
mov r3, r0
eor r4, r4, r3
ldr r3, [fp, #12]
and r2, r3, #255
ldr r3, .L380
ldr r3, [r3, r2, asl #2]
mov r0, r3
mov r1, #24
bl _ZL4rotrji
mov r3, r0
eor r2, r4, r3
ldr r3, [fp, #-16]
mov r3, r3, asl #4
ldr r1, [fp, #24]
add r3, r1, r3
ldr r3, [r3, #0]
eor r2, r2, r3
ldr r3, [fp, #-20]
str r2, [r3, #0]
ldr r3, [fp, #12]
mov r2, r3, lsr #24
ldr r3, .L380
ldr r4, [r3, r2, asl #2]
ldr r3, [fp, #8]
mov r3, r3, lsr #16
and r2, r3, #255
ldr r3, .L380
ldr r3, [r3, r2, asl #2]
mov r0, r3
mov r1, #8
bl _ZL4rotrji
mov r3, r0
eor r4, r4, r3
ldr r3, [fp, #20]
mov r3, r3, lsr #8
and r2, r3, #255
ldr r3, .L380
ldr r3, [r3, r2, asl #2]
mov r0, r3
mov r1, #16
bl _ZL4rotrji
mov r3, r0
eor r4, r4, r3
ldr r3, [fp, #16]
and r2, r3, #255
ldr r3, .L380
ldr r3, [r3, r2, asl #2]
mov r0, r3
mov r1, #24
bl _ZL4rotrji
mov r3, r0
eor r2, r4, r3
ldr r3, [fp, #-16]
mov r3, r3, asl #4
add r3, r3, #4
ldr r1, [fp, #24]
add r3, r1, r3
ldr r3, [r3, #0]
eor r2, r2, r3
ldr r3, [fp, #-24]
str r2, [r3, #0]
ldr r3, [fp, #16]
mov r2, r3, lsr #24
ldr r3, .L380
ldr r4, [r3, r2, asl #2]
ldr r3, [fp, #12]
mov r3, r3, lsr #16
and r2, r3, #255
ldr r3, .L380
ldr r3, [r3, r2, asl #2]
mov r0, r3
mov r1, #8
bl _ZL4rotrji
mov r3, r0
eor r4, r4, r3
ldr r3, [fp, #8]
mov r3, r3, lsr #8
and r2, r3, #255
ldr r3, .L380
ldr r3, [r3, r2, asl #2]
mov r0, r3
mov r1, #16
bl _ZL4rotrji
mov r3, r0
eor r4, r4, r3
ldr r3, [fp, #20]
and r2, r3, #255
ldr r3, .L380
ldr r3, [r3, r2, asl #2]
mov r0, r3
mov r1, #24
bl _ZL4rotrji
mov r3, r0
eor r2, r4, r3
ldr r3, [fp, #-16]
mov r3, r3, asl #4
add r3, r3, #8
ldr r1, [fp, #24]
add r3, r1, r3
ldr r3, [r3, #0]
eor r2, r2, r3
ldr r3, [fp, #-28]
str r2, [r3, #0]
ldr r3, [fp, #20]
mov r2, r3, lsr #24
ldr r3, .L380
ldr r4, [r3, r2, asl #2]
ldr r3, [fp, #16]
mov r3, r3, lsr #16
and r2, r3, #255
ldr r3, .L380
ldr r3, [r3, r2, asl #2]
mov r0, r3
mov r1, #8
bl _ZL4rotrji
mov r3, r0
eor r4, r4, r3
ldr r3, [fp, #12]
mov r3, r3, lsr #8
and r2, r3, #255
ldr r3, .L380
ldr r3, [r3, r2, asl #2]
mov r0, r3
mov r1, #16
bl _ZL4rotrji
mov r3, r0
eor r4, r4, r3
ldr r3, [fp, #8]
and r2, r3, #255
ldr r3, .L380
ldr r3, [r3, r2, asl #2]
mov r0, r3
mov r1, #24
bl _ZL4rotrji
mov r3, r0
eor r2, r4, r3
ldr r3, [fp, #-16]
mov r3, r3, asl #4
add r3, r3, #12
ldr r1, [fp, #24]
add r3, r1, r3
ldr r3, [r3, #0]
eor r2, r2, r3
ldr r3, [fp, #4]
str r2, [r3, #0]
sub sp, fp, #8
ldmfd sp!, {r4, fp, pc}
.L381:
.align 2
.L380:
.word _ZL3Td0
.cantunwind
.fnend
.size _Z5ROUNDiPjS_S_S_jjjjPKj, .-_Z5ROUNDiPjS_S_S_jjjjPKj
.align 2
.global _Z22rijndaelDecrypt_MasterPKjPKhi
.type _Z22rijndaelDecrypt_MasterPKjPKhi, %function
_Z22rijndaelDecrypt_MasterPKjPKhi:
.fnstart
.LFB37:
@ args = 0, pretend = 0, frame = 64
@ frame_needed = 1, uses_anonymous_args = 0
@ link register save eliminated.
stmfd sp!, {r4, r5, fp}
add fp, sp, #8
sub sp, sp, #68
str r0, [fp, #-64]
str r1, [fp, #-68]
str r2, [fp, #-72]
ldr r3, [fp, #-68]
ldrb r3, [r3, #0] @ zero_extendqisi2
mov r2, r3, asl #24
ldr r3, [fp, #-68]
add r3, r3, #1
ldrb r3, [r3, #0] @ zero_extendqisi2
mov r3, r3, asl #16
eor r2, r2, r3
ldr r3, [fp, #-68]
add r3, r3, #2
ldrb r3, [r3, #0] @ zero_extendqisi2
mov r3, r3, asl #8
eor r2, r2, r3
ldr r3, [fp, #-68]
add r3, r3, #3
ldrb r3, [r3, #0] @ zero_extendqisi2
eor r2, r2, r3
ldr r3, [fp, #-64]
ldr r3, [r3, #0]
eor r3, r2, r3
str r3, [fp, #-28]
ldr r3, [fp, #-68]
add r3, r3, #4
ldrb r3, [r3, #0] @ zero_extendqisi2
mov r2, r3, asl #24
ldr r3, [fp, #-68]
add r3, r3, #5
ldrb r3, [r3, #0] @ zero_extendqisi2
mov r3, r3, asl #16
eor r2, r2, r3
ldr r3, [fp, #-68]
add r3, r3, #6
ldrb r3, [r3, #0] @ zero_extendqisi2
mov r3, r3, asl #8
eor r2, r2, r3
ldr r3, [fp, #-68]
add r3, r3, #7
ldrb r3, [r3, #0] @ zero_extendqisi2
eor r2, r2, r3
ldr r3, [fp, #-64]
add r3, r3, #4
ldr r3, [r3, #0]
eor r3, r2, r3
str r3, [fp, #-24]
ldr r3, [fp, #-68]
add r3, r3, #8
ldrb r3, [r3, #0] @ zero_extendqisi2
mov r2, r3, asl #24
ldr r3, [fp, #-68]
add r3, r3, #9
ldrb r3, [r3, #0] @ zero_extendqisi2
mov r3, r3, asl #16
eor r2, r2, r3
ldr r3, [fp, #-68]
add r3, r3, #10
ldrb r3, [r3, #0] @ zero_extendqisi2
mov r3, r3, asl #8
eor r2, r2, r3
ldr r3, [fp, #-68]
add r3, r3, #11
ldrb r3, [r3, #0] @ zero_extendqisi2
eor r2, r2, r3
ldr r3, [fp, #-64]
add r3, r3, #8
ldr r3, [r3, #0]
eor r3, r2, r3
str r3, [fp, #-20]
ldr r3, [fp, #-68]
add r3, r3, #12
ldrb r3, [r3, #0] @ zero_extendqisi2
mov r2, r3, asl #24
ldr r3, [fp, #-68]
add r3, r3, #13
ldrb r3, [r3, #0] @ zero_extendqisi2
mov r3, r3, asl #16
eor r2, r2, r3
ldr r3, [fp, #-68]
add r3, r3, #14
ldrb r3, [r3, #0] @ zero_extendqisi2
mov r3, r3, asl #8
eor r2, r2, r3
ldr r3, [fp, #-68]
add r3, r3, #15
ldrb r3, [r3, #0] @ zero_extendqisi2
eor r2, r2, r3
ldr r3, [fp, #-64]
add r3, r3, #12
ldr r3, [r3, #0]
eor r3, r2, r3
str r3, [fp, #-16]
sub r3, fp, #28
str r3, [fp, #-60]
ldr r3, [fp, #-72]
add r3, r3, #1
ldr r2, [fp, #-60]
str r2, [fp, #-56]
mov r2, #4
str r2, [fp, #-52]
mov r2, #4
str r2, [fp, #-40]
str r3, [fp, #-48]
mov r3, #0
str r3, [fp, #-36]
mov r3, #0
str r3, [fp, #-32]
ldr r3, [fp, #-48]
mov r3, r3, asl #6
orr r3, r3, #-268435456
str r3, [fp, #-48]
ldr r3, [fp, #-48]
str r3, [fp, #-44]
ldr r3, [fp, #-44]
ldr r1, [fp, #-56]
ldr r2, [fp, #-52]
mov r5, r1
mov r4, r2
#APP
@ 95 "../../lib/mpi.h" 1
1:
ldr r8, [r5]
str r8, [r3, #0]
add r5, r5, #4
subs r4, r4, #1
bne 1b
@ 0 "" 2
str r5, [fp, #-56]
str r4, [fp, #-52]
sub sp, fp, #8
ldmfd sp!, {r4, r5, fp}
bx lr
.cantunwind
.fnend
.size _Z22rijndaelDecrypt_MasterPKjPKhi, .-_Z22rijndaelDecrypt_MasterPKjPKhi
.align 2
.global _Z22rijndaelDecrypt_MiddlePKji
.type _Z22rijndaelDecrypt_MiddlePKji, %function
_Z22rijndaelDecrypt_MiddlePKji:
.fnstart
.LFB38:
@ args = 0, pretend = 0, frame = 104
@ frame_needed = 1, uses_anonymous_args = 0
stmfd sp!, {r4, r5, r6, fp, lr}
add fp, sp, #16
sub sp, sp, #132
str r0, [fp, #-120]
str r1, [fp, #-124]
mov r3, #0
str r3, [fp, #-116]
str r3, [fp, #-112]
str r3, [fp, #-108]
str r3, [fp, #-104]
.word 0xeff00000
.word 0xf0000000
// mov r3, #0
// sub r3, fp, #36
// mov r2, #4
// mov r2, #4
//
str r3, [fp, #-100]
ldr r3, [fp, #-124]
sub r3, r3, #1
ldr r6, [fp, #-100]
str r6, [fp, #-96]
str r2, [fp, #-92]
str r2, [fp, #-64]
str r3, [fp, #-88]
mov r3, #0
str r3, [fp, #-60]
str r3, [fp, #-56]
str r3, [fp, #-52]
ldr r3, [fp, #-88]
.word 0xeff00002
.word 0xf0000000
// mov r3, r3, asl #6
// orr r3, r3, #-268435456
//
str r3, [fp, #-88]
ldr r3, [fp, #-88]
str r3, [fp, #-84]
b .L384
.L385:
ldr r3, [fp, #-84]
ldr r1, [fp, #-96]
ldr r2, [fp, #-92]
mov r5, r1
mov r4, r2
#APP
@ 141 "../../lib/mpi.h" 1
ldr r8, [r3, #0]
str r8, [r5]
add r5, r5, #4
sub r4, r4, #1
@ 0 "" 2
str r5, [fp, #-96]
str r4, [fp, #-92]
.L384:
ldr r3, [fp, #-92]
cmp r3, #0
moveq r3, #0
movne r3, #1
and r3, r3, #255
cmp r3, #0
bne .L385
ldr r3, [fp, #-124]
sub r3, r3, #1
mov r3, r3, asl #1
add r0, r3, #1
ldr r5, [fp, #-36]
ldr r4, [fp, #-32]
ldr lr, [fp, #-28]
ldr ip, [fp, #-24]
sub r1, fp, #116
sub r2, fp, #112
sub r3, fp, #108
sub r6, fp, #104
str r6, [sp, #0]
str r5, [sp, #4]
str r4, [sp, #8]
str lr, [sp, #12]
str ip, [sp, #16]
ldr ip, [fp, #-120]
str ip, [sp, #20]
bl _Z5ROUNDiPjS_S_S_jjjjPKj
ldr r3, [fp, #-124]
mov r0, r3, asl #1
ldr r5, [fp, #-116]
ldr r4, [fp, #-112]
ldr lr, [fp, #-108]
ldr ip, [fp, #-104]
sub r1, fp, #36
.word 0xeff00003
.word 0xf0000000
// sub r8, fp, #36
// sub r3, fp, #36
// add r3, r3, #8
// sub r6, fp, #36
// add r6, r6, #12
//
add r2, r8, #4
str r6, [sp, #0]
str r5, [sp, #4]
str r4, [sp, #8]
str lr, [sp, #12]
str ip, [sp, #16]
ldr ip, [fp, #-120]
str ip, [sp, #20]
bl _Z5ROUNDiPjS_S_S_jjjjPKj
ldr r3, [fp, #-124]
ldr r2, [fp, #-100]
str r2, [fp, #-80]
.word 0xeff00004
.word 0xf0000000
// add r8, r3, #1
// mov r2, #4
// mov r3, #0
//
str r2, [fp, #-76]
str r2, [fp, #-48]
str r8, [fp, #-72]
str r3, [fp, #-44]
str r3, [fp, #-40]
ldr r3, [fp, #-72]
mov r3, r3, asl #6
orr r3, r3, #-268435456
str r3, [fp, #-72]
ldr r3, [fp, #-72]
str r3, [fp, #-68]
ldr r3, [fp, #-68]
ldr r1, [fp, #-80]
ldr r2, [fp, #-76]
mov r5, r1
mov r4, r2
#APP
@ 95 "../../lib/mpi.h" 1
1:
ldr r8, [r5]
str r8, [r3, #0]
add r5, r5, #4
subs r4, r4, #1
bne 1b
@ 0 "" 2
str r5, [fp, #-80]
str r4, [fp, #-76]
sub sp, fp, #16
ldmfd sp!, {r4, r5, r6, fp, pc}
.cantunwind
.fnend
.size _Z22rijndaelDecrypt_MiddlePKji, .-_Z22rijndaelDecrypt_MiddlePKji
.align 2
.global _Z21rijndaelDecrypt_FinalPKjPhi
.type _Z21rijndaelDecrypt_FinalPKjPhi, %function
_Z21rijndaelDecrypt_FinalPKjPhi:
.fnstart
.LFB39:
@ args = 0, pretend = 0, frame = 88
@ frame_needed = 1, uses_anonymous_args = 0
stmfd sp!, {r4, r5, fp, lr}
add fp, sp, #12
sub sp, sp, #112
str r0, [fp, #-88]
str r1, [fp, #-92]
str r2, [fp, #-96]
mov r3, #0
str r3, [fp, #-84]
mov r3, #0
str r3, [fp, #-80]
mov r3, #0
str r3, [fp, #-76]
mov r3, #0
str r3, [fp, #-72]
mov r3, #10
str r3, [fp, #-68]
sub r3, fp, #28
str r3, [fp, #-64]
ldr r3, [fp, #-96]
sub r3, r3, #1
ldr r2, [fp, #-64]
str r2, [fp, #-60]
mov r2, #4
str r2, [fp, #-56]
mov r2, #4
str r2, [fp, #-44]
str r3, [fp, #-52]
mov r3, #0
str r3, [fp, #-40]
mov r3, #0
str r3, [fp, #-36]
mov r3, #0
str r3, [fp, #-32]
ldr r3, [fp, #-52]
mov r3, r3, asl #6
orr r3, r3, #-268435456
str r3, [fp, #-52]
ldr r3, [fp, #-52]
str r3, [fp, #-48]
b .L387
.L388:
ldr r3, [fp, #-48]
ldr r1, [fp, #-60]
ldr r2, [fp, #-56]
mov r5, r1
mov r4, r2
#APP
@ 141 "../../lib/mpi.h" 1
ldr r8, [r3, #0]
str r8, [r5]
add r5, r5, #4
sub r4, r4, #1
@ 0 "" 2
str r5, [fp, #-60]
str r4, [fp, #-56]
.L387:
ldr r3, [fp, #-56]
cmp r3, #0
moveq r3, #0
movne r3, #1
and r3, r3, #255
cmp r3, #0
bne .L388
ldr r4, [fp, #-28]
ldr lr, [fp, #-24]
ldr ip, [fp, #-20]
ldr r0, [fp, #-16]
sub r1, fp, #84
sub r2, fp, #80
sub r3, fp, #76
sub r5, fp, #72
str r5, [sp, #0]
str r4, [sp, #4]
str lr, [sp, #8]
str ip, [sp, #12]
str r0, [sp, #16]
ldr r0, [fp, #-88]
str r0, [sp, #20]
mov r0, #9
bl _Z5ROUNDiPjS_S_S_jjjjPKj
ldr r3, [fp, #-68]
mov r3, r3, asl #2
mov r3, r3, asl #2
ldr r2, [fp, #-88]
add r3, r2, r3
str r3, [fp, #-88]
ldr r3, [fp, #-84]
mov r3, r3, lsr #24
ldr r2, .L389
ldrb r3, [r2, r3] @ zero_extendqisi2
mov r2, r3, asl #24
ldr r3, [fp, #-72]
mov r3, r3, lsr #16
and r3, r3, #255
ldr r1, .L389
ldrb r3, [r1, r3] @ zero_extendqisi2
mov r3, r3, asl #16
eor r2, r2, r3
ldr r3, [fp, #-76]
mov r3, r3, lsr #8
and r3, r3, #255
ldr r1, .L389
ldrb r3, [r1, r3] @ zero_extendqisi2
mov r3, r3, asl #8
eor r2, r2, r3
ldr r3, [fp, #-80]
and r3, r3, #255
ldr r1, .L389
ldrb r3, [r1, r3] @ zero_extendqisi2
eor r3, r2, r3
mov r2, r3
ldr r3, [fp, #-88]
ldr r3, [r3, #0]
eor r3, r2, r3
str r3, [fp, #-28]
ldr r3, [fp, #-28]
mov r3, r3, lsr #24
and r2, r3, #255
ldr r3, [fp, #-92]
strb r2, [r3, #0]
ldr r3, [fp, #-92]
add r3, r3, #1
ldr r2, [fp, #-28]
mov r2, r2, lsr #16
and r2, r2, #255
strb r2, [r3, #0]
ldr r3, [fp, #-92]
add r3, r3, #2
ldr r2, [fp, #-28]
mov r2, r2, lsr #8
and r2, r2, #255
strb r2, [r3, #0]
ldr r3, [fp, #-92]
add r3, r3, #3
ldr r2, [fp, #-28]
and r2, r2, #255
strb r2, [r3, #0]
ldr r3, [fp, #-80]
mov r3, r3, lsr #24
ldr r2, .L389
ldrb r3, [r2, r3] @ zero_extendqisi2
mov r2, r3, asl #24
ldr r3, [fp, #-84]
mov r3, r3, lsr #16
and r3, r3, #255
ldr r1, .L389
ldrb r3, [r1, r3] @ zero_extendqisi2
mov r3, r3, asl #16
eor r2, r2, r3
ldr r3, [fp, #-72]
mov r3, r3, lsr #8
and r3, r3, #255
ldr r1, .L389
ldrb r3, [r1, r3] @ zero_extendqisi2
mov r3, r3, asl #8
eor r2, r2, r3
ldr r3, [fp, #-76]
and r3, r3, #255
ldr r1, .L389
ldrb r3, [r1, r3] @ zero_extendqisi2
eor r3, r2, r3
mov r2, r3
ldr r3, [fp, #-88]
add r3, r3, #4
ldr r3, [r3, #0]
eor r3, r2, r3
str r3, [fp, #-24]
ldr r3, [fp, #-92]
add r3, r3, #4
ldr r2, [fp, #-24]
mov r2, r2, lsr #24
and r2, r2, #255
strb r2, [r3, #0]
ldr r3, [fp, #-92]
add r3, r3, #5
ldr r2, [fp, #-24]
mov r2, r2, lsr #16
and r2, r2, #255
strb r2, [r3, #0]
ldr r3, [fp, #-92]
add r3, r3, #6
ldr r2, [fp, #-24]
mov r2, r2, lsr #8
and r2, r2, #255
strb r2, [r3, #0]
ldr r3, [fp, #-92]
add r3, r3, #7
ldr r2, [fp, #-24]
and r2, r2, #255
strb r2, [r3, #0]
ldr r3, [fp, #-76]
mov r3, r3, lsr #24
ldr r2, .L389
ldrb r3, [r2, r3] @ zero_extendqisi2
mov r2, r3, asl #24
ldr r3, [fp, #-80]
mov r3, r3, lsr #16
and r3, r3, #255
ldr r1, .L389
ldrb r3, [r1, r3] @ zero_extendqisi2
mov r3, r3, asl #16
eor r2, r2, r3
ldr r3, [fp, #-84]
mov r3, r3, lsr #8
and r3, r3, #255
ldr r1, .L389
ldrb r3, [r1, r3] @ zero_extendqisi2
mov r3, r3, asl #8
eor r2, r2, r3
ldr r3, [fp, #-72]
and r3, r3, #255
ldr r1, .L389
ldrb r3, [r1, r3] @ zero_extendqisi2
eor r3, r2, r3
mov r2, r3
ldr r3, [fp, #-88]
add r3, r3, #8
ldr r3, [r3, #0]
eor r3, r2, r3
str r3, [fp, #-20]
ldr r3, [fp, #-92]
add r3, r3, #8
ldr r2, [fp, #-20]
mov r2, r2, lsr #24
and r2, r2, #255
strb r2, [r3, #0]
ldr r3, [fp, #-92]
add r3, r3, #9
ldr r2, [fp, #-20]
mov r2, r2, lsr #16
and r2, r2, #255
strb r2, [r3, #0]
ldr r3, [fp, #-92]
add r3, r3, #10
ldr r2, [fp, #-20]
mov r2, r2, lsr #8
and r2, r2, #255
strb r2, [r3, #0]
ldr r3, [fp, #-92]
add r3, r3, #11
ldr r2, [fp, #-20]
and r2, r2, #255
strb r2, [r3, #0]
ldr r3, [fp, #-72]
mov r3, r3, lsr #24
ldr r2, .L389
ldrb r3, [r2, r3] @ zero_extendqisi2
mov r2, r3, asl #24
ldr r3, [fp, #-76]
mov r3, r3, lsr #16
and r3, r3, #255
ldr r1, .L389
ldrb r3, [r1, r3] @ zero_extendqisi2
mov r3, r3, asl #16
eor r2, r2, r3
ldr r3, [fp, #-80]
mov r3, r3, lsr #8
and r3, r3, #255
ldr r1, .L389
ldrb r3, [r1, r3] @ zero_extendqisi2
mov r3, r3, asl #8
eor r2, r2, r3
ldr r3, [fp, #-84]
and r3, r3, #255
ldr r1, .L389
ldrb r3, [r1, r3] @ zero_extendqisi2
eor r3, r2, r3
mov r2, r3
ldr r3, [fp, #-88]
add r3, r3, #12
ldr r3, [r3, #0]
eor r3, r2, r3
str r3, [fp, #-16]
ldr r3, [fp, #-92]
add r3, r3, #12
ldr r2, [fp, #-16]
mov r2, r2, lsr #24
and r2, r2, #255
strb r2, [r3, #0]
ldr r3, [fp, #-92]
add r3, r3, #13
ldr r2, [fp, #-16]
mov r2, r2, lsr #16
and r2, r2, #255
strb r2, [r3, #0]
ldr r3, [fp, #-92]
add r3, r3, #14
ldr r2, [fp, #-16]
mov r2, r2, lsr #8
and r2, r2, #255
strb r2, [r3, #0]
ldr r3, [fp, #-92]
add r3, r3, #15
ldr r2, [fp, #-16]
and r2, r2, #255
strb r2, [r3, #0]
sub sp, fp, #12
ldmfd sp!, {r4, r5, fp, pc}
.L390:
.align 2
.L389:
.word _ZL4Td4s
.cantunwind
.fnend
.size _Z21rijndaelDecrypt_FinalPKjPhi, .-_Z21rijndaelDecrypt_FinalPKjPhi
.section .rodata
.align 2
.LC0:
.byte 125
.byte -102
.byte -44
.byte -122
.byte -3
.byte 96
.byte 20
.byte 79
.byte 87
.byte -3
.byte 119
.byte -108
.byte -93
.byte -14
.byte -96
.byte -5
.text
.align 2
.global main
.type main, %function
main:
.fnstart
.LFB40:
@ args = 0, pretend = 0, frame = 48
@ frame_needed = 1, uses_anonymous_args = 0
stmfd sp!, {fp, lr}
.save {fp, lr}
.setfp fp, sp, #4
add fp, sp, #4
.pad #48
sub sp, sp, #48
str r0, [fp, #-48]
str r1, [fp, #-52]
ldr r3, .L405
ldr r3, [r3, #0]
str r3, [fp, #-8]
mov r3, #6
str r3, [fp, #-32]
mov r3, #10
str r3, [fp, #-36]
sub r2, fp, #48
sub r3, fp, #52
mov r0, r2
mov r1, r3
.LEHB30:
bl _Z8MPI_InitPiPPPc
sub r3, fp, #40
mov r0, #0
mov r1, r3
bl _Z13MPI_Comm_rankiPi
bl m5_barrier
ldr r3, [fp, #-40]
cmp r3, #0
bne .L392
mov r0, #0
mov r1, #0
mov r2, #0
mov r3, #0
bl m5_dump_stats
mov r0, #0
mov r1, #0
mov r2, #0
mov r3, #0
bl m5_reset_stats
.L392:
mov r3, #1000
str r3, [fp, #-28]
mov r3, #0
str r3, [fp, #-36]
b .L393
.L398:
ldr r3, [fp, #-40]
cmp r3, #0
bne .L394
ldr r3, .L405+4
sub r1, fp, #24
mov r2, r3
mov r3, #16
mov r0, r1
mov r1, r2
mov r2, r3
bl memcpy
ldr r3, [fp, #-40]
sub r2, fp, #24
ldr r0, .L405+8
mov r1, r2
mov r2, r3
bl _Z22rijndaelDecrypt_MasterPKjPKhi
b .L395
.L394:
ldr r3, [fp, #-32]
sub r2, r3, #1
ldr r3, [fp, #-40]
cmp r2, r3
bne .L396
sub r3, fp, #24
mov r2, #0
str r2, [r3, #0]
add r3, r3, #4
mov r2, #0
str r2, [r3, #0]
add r3, r3, #4
mov r2, #0
str r2, [r3, #0]
add r3, r3, #4
mov r2, #0
str r2, [r3, #0]
add r3, r3, #4
ldr r3, [fp, #-40]
sub r2, fp, #24
ldr r0, .L405+8
mov r1, r2
mov r2, r3
bl _Z21rijndaelDecrypt_FinalPKjPhi
b .L395
.L396:
ldr r3, [fp, #-40]
ldr r0, .L405+8
mov r1, r3
bl _Z22rijndaelDecrypt_MiddlePKji
.L395:
ldr r1, [fp, #-36]
ldr r3, .L405+12
smull r2, r3, r1, r3
mov r2, r3, asr #1
.word 0xeff00001
.word 0xf0000000
// mov r3, r1, asr #31
// rsb r2, r3, r2
// mov r3, r2
// mov r3, r3, asl #2
// add r3, r3, r2
// rsb r2, r3, r1
//
cmp r2, #0
bne .L397
bl m5_barrier
.L397:
ldr r3, [fp, #-36]
add r3, r3, #1
str r3, [fp, #-36]
.L393:
ldr r2, [fp, #-36]
ldr r3, [fp, #-28]
cmp r2, r3
movge r3, #0
movlt r3, #1
and r3, r3, #255
cmp r3, #0
bne .L398
ldr r3, [fp, #-32]
sub r2, r3, #1
ldr r3, [fp, #-40]
cmp r2, r3
bne .L399
mov r0, #0
mov r1, #0
mov r2, #0
mov r3, #0
bl m5_dump_stats
mov r0, #0
mov r1, #0
mov r2, #0
mov r3, #0
bl m5_reset_stats
.LEHE30:
.L399:
bl _Z12MPI_Finalizev
mov r3, #0
mov r0, r3
ldr r3, .L405
ldr r2, [fp, #-8]
ldr r3, [r3, #0]
cmp r2, r3
beq .L402
b .L404
.L403:
.LEHB31:
bl __cxa_end_cleanup
.LEHE31:
.L404:
bl __stack_chk_fail
.L402:
sub sp, fp, #4
ldmfd sp!, {fp, pc}
.L406:
.align 2
.L405:
.word __stack_chk_guard
.word .LC0
.word decpt_rk
.word 1717986919
.personality __gxx_personality_v0
.handlerdata
.LLSDA40:
.byte 0xff
.byte 0xff
.byte 0x1
.uleb128 .LLSDACSE40-.LLSDACSB40
.LLSDACSB40:
.uleb128 .LEHB30-.LFB40
.uleb128 .LEHE30-.LEHB30
.uleb128 .L403-.LFB40
.uleb128 0
.uleb128 .LEHB31-.LFB40
.uleb128 .LEHE31-.LEHB31
.uleb128 0
.uleb128 0
.LLSDACSE40:
.text
.fnend
.size main, .-main
.section .rodata
.align 2
.type _ZL3Te0, %object
.size _ZL3Te0, 1024
_ZL3Te0:
.word -966564955
.word -126059388
.word -294160487
.word -159679603
.word -855539
.word -697603139
.word -563122255
.word -1849309868
.word 1613770832
.word 33620227
.word -832084055
.word 1445669757
.word -402719207
.word -1244145822
.word 1303096294
.word -327780710
.word -1882535355
.word 528646813
.word -1983264448
.word -92439161
.word -268764651
.word -1302767125
.word -1907931191
.word -68095989
.word 1101901292
.word -1277897625
.word 1604494077
.word 1169141738
.word 597466303
.word 1403299063
.word -462261610
.word -1681866661
.word 1974974402
.word -503448292
.word 1033081774
.word 1277568618
.word 1815492186
.word 2118074177
.word -168298750
.word -2083730353
.word 1748251740
.word 1369810420
.word -773462732
.word -101584632
.word -495881837
.word -1411852173
.word 1647391059
.word 706024767
.word 134480908
.word -1782069422
.word 1176707941
.word -1648114850
.word 806885416
.word 932615841
.word 168101135
.word 798661301
.word 235341577
.word 605164086
.word 461406363
.word -538779075
.word -840176858
.word 1311188841
.word 2142417613
.word -361400929
.word 302582043
.word 495158174
.word 1479289972
.word 874125870
.word 907746093
.word -596742478
.word -1269146898
.word 1537253627
.word -1538108682
.word 1983593293
.word -1210657183
.word 2108928974
.word 1378429307
.word -572267714
.word 1580150641
.word 327451799
.word -1504488459
.word -1177431704
.word 0
.word -1041371860
.word 1075847264
.word -469959649
.word 2041688520
.word -1235526675
.word -731223362
.word -1916023994
.word 1740553945
.word 1916352843
.word -1807070498
.word -1739830060
.word -1336387352
.word -2049978550
.word -1143943061
.word -974131414
.word 1336584933
.word -302253290
.word -2042412091
.word -1706209833
.word 1714631509
.word 293963156
.word -1975171633
.word -369493744
.word 67240454
.word -25198719
.word -1605349136
.word 2017213508
.word 631218106
.word 1269344483
.word -1571728909
.word 1571005438
.word -2143272768
.word 93294474
.word 1066570413
.word 563977660
.word 1882732616
.word -235539196
.word 1673313503
.word 2008463041
.word -1344611723
.word 1109467491
.word 537923632
.word -436207846
.word -34344178
.word -1076702611
.word -2117218996
.word 403442708
.word 638784309
.word -1007883217
.word -1101045791
.word 899127202
.word -2008791860
.word 773265209
.word -1815821225
.word 1437050866
.word -58818942
.word 2050833735
.word -932944724
.word -1168286233
.word 840505643
.word -428641387
.word -1067425632
.word 427917720
.word -1638969391
.word -1545806721
.word 1143087718
.word 1412049534
.word 999329963
.word 193497219
.word -1941551414
.word -940642775
.word 1807268051
.word 672404540
.word -1478566279
.word -1134666014
.word 369822493
.word -1378100362
.word -606019525
.word 1681011286
.word 1949973070
.word 336202270
.word -1840690725
.word 201721354
.word 1210328172
.word -1201906460
.word -1614626211
.word -1110191250
.word 1135389935
.word -1000185178
.word 965841320
.word 831886756
.word -739974089
.word -226920053
.word -706222286
.word -1949775805
.word 1849112409
.word -630362697
.word 26054028
.word -1311386268
.word -1672589614
.word 1235855840
.word -663982924
.word -1403627782
.word -202050553
.word -806688219
.word -899324497
.word -193299826
.word 1202630377
.word 268961816
.word 1874508501
.word -260540280
.word 1243948399
.word 1546530418
.word 941366308
.word 1470539505
.word 1941222599
.word -1748580783
.word -873928669
.word -1579295364
.word -395021156
.word 1042226977
.word -1773450275
.word 1639824860
.word 227249030
.word 260737669
.word -529502064
.word 2084453954
.word 1907733956
.word -865704278
.word -1874310952
.word 100860677
.word -134810111
.word 470683154
.word -1033805405
.word 1781871967
.word -1370007559
.word 1773779408
.word 394692241
.word -1715355304
.word 974986535
.word 664706745
.word -639508168
.word -336005101
.word 731420851
.word 571543859
.word -764843589
.word -1445340816
.word 126783113
.word 865375399
.word 765172662
.word 1008606754
.word 361203602
.word -907417312
.word -2016489911
.word -1437248001
.word 1344809080
.word -1512054918
.word 59542671
.word 1503764984
.word 160008576
.word 437062935
.word 1707065306
.word -672733647
.word -2076032314
.word -798463816
.word -2109652541
.word 697932208
.word 1512910199
.word 504303377
.word 2075177163
.word -1470868228
.word 1841019862
.word 739644986
.align 2
.type _ZL3Td0, %object
.size _ZL3Td0, 1024
_ZL3Td0:
.word 1374988112
.word 2118214995
.word 437757123
.word 975658646
.word 1001089995
.word 530400753
.word -1392879445
.word 1273168787
.word 540080725
.word -1384747530
.word -1999866223
.word -184398811
.word 1340463100
.word -987051049
.word 641025152
.word -1251826801
.word -558802359
.word 632953703
.word 1172967064
.word 1576976609
.word -1020300030
.word -2125664238
.word -1924753501
.word 1809054150
.word 59727847
.word 361929877
.word -1083344149
.word -1789765158
.word -725712083
.word 1484005843
.word 1239443753
.word -1899378620
.word 1975683434
.word -191989384
.word -1722270101
.word 666464733
.word -1092530250
.word -259478249
.word -920605594
.word 2110667444
.word 1675577880
.word -451268222
.word -1756286112
.word 1649639237
.word -1318815776
.word -1150570876
.word -25059300
.word -116905068
.word 1883793496
.word -1891238631
.word -1797362553
.word 1383856311
.word -1418472669
.word 1917518562
.word -484470953
.word 1716890410
.word -1293211641
.word 800440835
.word -2033878118
.word -751368027
.word 807962610
.word 599762354
.word 33778362
.word -317291940
.word -1966138325
.word -1485196142
.word -217582864
.word 1315562145
.word 1708848333
.word 101039829
.word -785096161
.word -995688822
.word 875451293
.word -1561111136
.word 92987698
.word -1527321739
.word 193195065
.word 1080094634
.word 1584504582
.word -1116860335
.word 1042385657
.word -1763899843
.word -583137874
.word 1306967366
.word -1856729675
.word 1908694277
.word 67556463
.word 1615861247
.word 429456164
.word -692196969
.word -1992277044
.word 1742315127
.word -1326955843
.word 126454664
.word -417768648
.word 2043211483
.word -1585706425
.word 2084704233
.word -125559095
.word 0
.word 159417987
.word 841739592
.word 504459436
.word 1817866830
.word -49348613
.word 260388950
.word 1034867998
.word 908933415
.word 168810852
.word 1750902305
.word -1688513327
.word 607530554
.word 202008497
.word -1822955761
.word -1259432238
.word 463180190
.word -2134850225
.word 1641816226
.word 1517767529
.word 470948374
.word -493635062
.word -1063245083
.word 1008918595
.word 303765277
.word 235474187
.word -225720403
.word 766945465
.word 337553864
.word 1475418501
.word -1351284916
.word -291906117
.word -1551933187
.word -150919521
.word 1551037884
.word 1147550661
.word 1543208500
.word -1958532746
.word -886847780
.word -1225917336
.word -1192955549
.word -684598070
.word 1113818384
.word 328671808
.word -2067394272
.word -2058738563
.word -759480840
.word -1359400431
.word -953573011
.word 496906059
.word -592301837
.word 226906860
.word 2009195472
.word 733156972
.word -1452230247
.word 294930682
.word 1206477858
.word -1459843900
.word -1594867942
.word 1451044056
.word 573804783
.word -2025238841
.word -650587711
.word -1932877058
.word -1730933962
.word -1493859889
.word -1518674392
.word -625504730
.word 1068351396
.word 742039012
.word 1350078989
.word 1784663195
.word 1417561698
.word -158526526
.word -1864845080
.word 775550814
.word -2101104651
.word -1621262146
.word 1775276924
.word 1876241833
.word -819653965
.word -928212677
.word 270040487
.word -392404114
.word -616842373
.word -853116919
.word 1851332852
.word -325404927
.word -2091935064
.word -426414491
.word -1426069890
.word 566021896
.word -283776794
.word -1159226407
.word 1248802510
.word -358676012
.word 699432150
.word 832877231
.word 708780849
.word -962227152
.word 899835584
.word 1951317047
.word -58537306
.word -527380304
.word 866637845
.word -251357110
.word 1106041591
.word 2144161806
.word 395441711
.word 1984812685
.word 1139781709
.word -861254316
.word -459930401
.word -1630423581
.word 1282050075
.word -1054072904
.word 1181045119
.word -1654724092
.word 25965917
.word -91786125
.word -83148498
.word -1285087910
.word -1831087534
.word -384805325
.word 1842759443
.word -1697160820
.word 933301370
.word 1509430414
.word -351060855
.word -827774994
.word -1218328267
.word -518199827
.word 2051518780
.word -1663901863
.word 1441952575
.word 404016761
.word 1942435775
.word 1408749034
.word 1610459739
.word -549621996
.word 2017778566
.word -894438527
.word -1184316354
.word 941896748
.word -1029488545
.word 371049330
.word -1126030068
.word 675039627
.word -15887039
.word 967311729
.word 135050206
.word -659233636
.word 1683407248
.word 2076935265
.word -718096784
.word 1215061108
.word -793225406
.align 2
.type _ZL4Td4s, %object
.size _ZL4Td4s, 256
_ZL4Td4s:
.byte 82
.byte 9
.byte 106
.byte -43
.byte 48
.byte 54
.byte -91
.byte 56
.byte -65
.byte 64
.byte -93
.byte -98
.byte -127
.byte -13
.byte -41
.byte -5
.byte 124
.byte -29
.byte 57
.byte -126
.byte -101
.byte 47
.byte -1
.byte -121
.byte 52
.byte -114
.byte 67
.byte 68
.byte -60
.byte -34
.byte -23
.byte -53
.byte 84
.byte 123
.byte -108
.byte 50
.byte -90
.byte -62
.byte 35
.byte 61
.byte -18
.byte 76
.byte -107
.byte 11
.byte 66
.byte -6
.byte -61
.byte 78
.byte 8
.byte 46
.byte -95
.byte 102
.byte 40
.byte -39
.byte 36
.byte -78
.byte 118
.byte 91
.byte -94
.byte 73
.byte 109
.byte -117
.byte -47
.byte 37
.byte 114
.byte -8
.byte -10
.byte 100
.byte -122
.byte 104
.byte -104
.byte 22
.byte -44
.byte -92
.byte 92
.byte -52
.byte 93
.byte 101
.byte -74
.byte -110
.byte 108
.byte 112
.byte 72
.byte 80
.byte -3
.byte -19
.byte -71
.byte -38
.byte 94
.byte 21
.byte 70
.byte 87
.byte -89
.byte -115
.byte -99
.byte -124
.byte -112
.byte -40
.byte -85
.byte 0
.byte -116
.byte -68
.byte -45
.byte 10
.byte -9
.byte -28
.byte 88
.byte 5
.byte -72
.byte -77
.byte 69
.byte 6
.byte -48
.byte 44
.byte 30
.byte -113
.byte -54
.byte 63
.byte 15
.byte 2
.byte -63
.byte -81
.byte -67
.byte 3
.byte 1
.byte 19
.byte -118
.byte 107
.byte 58
.byte -111
.byte 17
.byte 65
.byte 79
.byte 103
.byte -36
.byte -22
.byte -105
.byte -14
.byte -49
.byte -50
.byte -16
.byte -76
.byte -26
.byte 115
.byte -106
.byte -84
.byte 116
.byte 34
.byte -25
.byte -83
.byte 53
.byte -123
.byte -30
.byte -7
.byte 55
.byte -24
.byte 28
.byte 117
.byte -33
.byte 110
.byte 71
.byte -15
.byte 26
.byte 113
.byte 29
.byte 41
.byte -59
.byte -119
.byte 111
.byte -73
.byte 98
.byte 14
.byte -86
.byte 24
.byte -66
.byte 27
.byte -4
.byte 86
.byte 62
.byte 75
.byte -58
.byte -46
.byte 121
.byte 32
.byte -102
.byte -37
.byte -64
.byte -2
.byte 120
.byte -51
.byte 90
.byte -12
.byte 31
.byte -35
.byte -88
.byte 51
.byte -120
.byte 7
.byte -57
.byte 49
.byte -79
.byte 18
.byte 16
.byte 89
.byte 39
.byte -128
.byte -20
.byte 95
.byte 96
.byte 81
.byte 127
.byte -87
.byte 25
.byte -75
.byte 74
.byte 13
.byte 45
.byte -27
.byte 122
.byte -97
.byte -109
.byte -55
.byte -100
.byte -17
.byte -96
.byte -32
.byte 59
.byte 77
.byte -82
.byte 42
.byte -11
.byte -80
.byte -56
.byte -21
.byte -69
.byte 60
.byte -125
.byte 83
.byte -103
.byte 97
.byte 23
.byte 43
.byte 4
.byte 126
.byte -70
.byte 119
.byte -42
.byte 38
.byte -31
.byte 105
.byte 20
.byte 99
.byte 85
.byte 33
.byte 12
.byte 125
.align 2
.type _ZL5rcons, %object
.size _ZL5rcons, 10
_ZL5rcons:
.byte 1
.byte 2
.byte 4
.byte 8
.byte 16
.byte 32
.byte 64
.byte -128
.byte 27
.byte 54
.ident "GCC: (Ubuntu/Linaro 4.7.3-12ubuntu1) 4.7.3"
.section .note.GNU-stack,"",%progbits
|
org.alloytools.alloy.extra/extra/models/book/appendixA/ring.als | Kaixi26/org.alloytools.alloy | 527 | 4416 | module appendixA/ring
sig Node { next: set Node }
pred isRing {
// You have to fill in the appropriate formula here
}
run isRing for exactly 4 Node
|
src/atomic.asm | isabella232/stdcxx | 53 | 96517 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; atomic.asm
;
; $Id$
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; Licensed to the Apache Software Foundation (ASF) under one or more
; contributor license agreements. See the NOTICE file distributed
; with this work for additional information regarding copyright
; ownership. The ASF licenses this file to you under the Apache
; License, Version 2.0 (the "License"); you may not use this file
; except in compliance with the License. You may obtain a copy of
; the License at
;
; http://www.apache.org/licenses/LICENSE-2.0
;
; Unless required by applicable law or agreed to in writing, software
; distributed under the License is distributed on an "AS IS" BASIS,
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
; implied. See the License for the specific language governing
; permissions and limitations under the License.
;
; Copyright 2003-2006 <NAME>.
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
ifdef Win32
include <x86/atomic.inc>
elseifdef x64
include <x86_64/atomic.inc>
endif
end
|
third_party/antlr_grammars_v4/cto/CtoLexer.g4 | mikhan808/rsyntaxtextarea-antlr4-extension | 4 | 5863 | <reponame>mikhan808/rsyntaxtextarea-antlr4-extension<gh_stars>1-10
/*
[The "BSD licence"]
Copyright (c) 2018 <NAME>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*
A grammar for Hyperledger Composer Modeling Language
https://hyperledger.github.io/composer/v0.19/reference/cto_language.html
*/
lexer grammar CtoLexer;
// Keywords
ABSTRACT: 'abstract';
ASSET: 'asset';
CONCEPT: 'concept';
DEFAULT: 'default';
ENUM: 'enum';
EVENT: 'event';
EXTENDS: 'extends';
IDENTIFIED: 'identified by';
IMPORT: 'import';
NAMESPACE: 'namespace';
OPTIONAL: 'optional';
PARTICIPANT: 'participant';
RANGE: 'range';
REGEX: 'regex';
TRANSACTION: 'transaction';
//primitive types
BOOLEAN: 'Boolean';
DATE_TIME: 'DateTime';
DOUBLE: 'Double';
INTEGER: 'Integer';
LONG: 'Long';
STRING: 'String';
// Separators
LPAREN: '(';
RPAREN: ')';
LBRACE: '{';
RBRACE: '}';
LBRACK: '[';
RBRACK: ']';
SEMI: ';';
COMMA: ',';
DOT: '.';
COLON: ':';
// Operators
ASSIGN: '=';
MUL: '*';
// Additional symbols
AT: '@';
ELLIPSIS: '...';
REF: '--> ';
VAR: 'o ';
// Literals
DECIMAL_LITERAL: ('0' | [1-9] (Digits? | '_'+ Digits)) [lL]?;
OCT_LITERAL: '0' '_'* [0-7] ([0-7_]* [0-7])? [lL]?;
FLOAT_LITERAL: (Digits '.' Digits? | '.' Digits) ExponentPart? [fFdD]?
| Digits (ExponentPart [fFdD]? | [fFdD])
;
BOOL_LITERAL: 'true'
| 'false'
;
DATE_TIME_LITERAL: Bound FullDate 'T' FullTime Bound;
// Whitespace and comments
WS: [ \t\r\n\u000C]+ -> skip;
LINE_COMMENT: '//' ~[\r\n]* -> channel(HIDDEN);
COMMENT: '/*' .*? '*/' -> channel(HIDDEN);
//REGEX Expr
REGEX_EXPR: '/'.*?'/';
fragment Bound: '"' | '\'';
fragment FullDate: Year '-' Month '-' Day;
fragment Year: Digit Digit Digit Digit;
fragment Month: [0][0-9]|[1][0-2];
fragment Day: [0-2][0-9]|[0-3][01];
fragment FullTime
: PartialTime TimeOffset;
fragment TimeOffset
: 'Z' | TimeNumOffset;
fragment TimeNumOffset
: '-' [01][0-2] (':' (HalfHour))?
| '+' [01][0-5] (':' (HalfHour | [4][5]))?
;
fragment HalfHour: [0][0] | [3][0];
fragment PartialTime
: [0-2][0-3] ':' Sixty ':' Sixty ('.' [0-9]*)?;
fragment Sixty: [0-5] Digit;
fragment Digit: [0-9];
IDENTIFIER: LetterOrDigit+;
CHAR_LITERAL: '\'' (~["\\\r\n] | EscapeSequence)* '\'';
STRING_LITERAL: '"' (~["\\\r\n] | EscapeSequence)* '"';
// Fragment rules
fragment ExponentPart
: [eE] [+-]? Digits
;
fragment EscapeSequence
: '\\' [btnfr"'\\]
| '\\' ([0-3]? [0-7])? [0-7]
| '\\' 'u'+ HexDigit HexDigit HexDigit HexDigit
;
fragment HexDigits
: HexDigit ((HexDigit | '_')* HexDigit)?
;
fragment HexDigit
: [0-9a-fA-F]
;
fragment Digits
: [0-9] ([0-9_]* [0-9])?
;
fragment LetterOrDigit
: Letter
| [0-9]
;
fragment Letter
: [a-zA-Z$_] // these are below 0x7F
| ~[\u0000-\u007F\uD800-\uDBFF] // covers all characters above 0x7F which are not a surrogate
| [\uD800-\uDBFF] [\uDC00-\uDFFF] // covers UTF-16 surrogate pairs encodings for U+10000 to U+10FFFF
;
|
Transynther/x86/_processed/NONE/_ht_zr_un_/i7-7700_9_0xca.log_21829_824.asm | ljhsiun2/medusa | 9 | 88788 | <reponame>ljhsiun2/medusa<gh_stars>1-10
.global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r14
push %r8
push %rax
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WT_ht+0x547f, %r14
clflush (%r14)
nop
add $55999, %rdx
mov $0x6162636465666768, %r12
movq %r12, %xmm2
movups %xmm2, (%r14)
nop
nop
xor %rdi, %rdi
lea addresses_WT_ht+0xbe77, %rcx
nop
nop
nop
nop
nop
sub %rax, %rax
mov (%rcx), %esi
nop
nop
nop
sub %rdx, %rdx
lea addresses_WC_ht+0x97bf, %rdx
nop
nop
xor %rdi, %rdi
mov $0x6162636465666768, %r12
movq %r12, %xmm7
movups %xmm7, (%rdx)
cmp $34081, %rsi
lea addresses_WT_ht+0x14237, %r14
nop
nop
nop
nop
cmp $25106, %rsi
mov (%r14), %eax
nop
nop
nop
nop
sub $27149, %rax
lea addresses_A_ht+0xafdf, %r14
nop
nop
nop
nop
nop
inc %rsi
vmovups (%r14), %ymm2
vextracti128 $0, %ymm2, %xmm2
vpextrq $1, %xmm2, %r12
nop
nop
nop
nop
sub $17410, %r12
lea addresses_WT_ht+0x18695, %rsi
lea addresses_A_ht+0xc27f, %rdi
nop
nop
nop
nop
nop
sub %r8, %r8
mov $5, %rcx
rep movsw
nop
nop
sub $28849, %r14
lea addresses_A_ht+0x92bf, %r14
nop
nop
inc %r12
movl $0x61626364, (%r14)
nop
nop
nop
nop
nop
xor %rdi, %rdi
lea addresses_A_ht+0x1727f, %rsi
lea addresses_WC_ht+0xb37f, %rdi
nop
nop
nop
nop
nop
cmp %r8, %r8
mov $56, %rcx
rep movsw
nop
nop
nop
xor $8739, %rax
lea addresses_A_ht+0x4b8f, %rsi
lea addresses_UC_ht+0x12c7f, %rdi
nop
and $64641, %r12
mov $72, %rcx
rep movsq
nop
nop
nop
nop
nop
xor $10697, %rsi
lea addresses_WT_ht+0x17dd7, %rsi
lea addresses_A_ht+0xe61f, %rdi
nop
inc %rdx
mov $124, %rcx
rep movsq
nop
nop
cmp $8603, %rdx
lea addresses_D_ht+0x1760f, %r12
nop
and %r8, %r8
vmovups (%r12), %ymm2
vextracti128 $0, %ymm2, %xmm2
vpextrq $0, %xmm2, %r14
nop
nop
nop
nop
nop
add %r12, %r12
lea addresses_UC_ht+0x6606, %rsi
lea addresses_A_ht+0x387f, %rdi
nop
cmp $2174, %r12
mov $44, %rcx
rep movsq
nop
nop
nop
nop
and $16620, %rdx
lea addresses_UC_ht+0x1e47f, %rdx
xor $52681, %rcx
mov $0x6162636465666768, %rdi
movq %rdi, %xmm2
movups %xmm2, (%rdx)
xor %rax, %rax
lea addresses_D_ht+0x487f, %rsi
lea addresses_WC_ht+0x33cf, %rdi
nop
nop
inc %rax
mov $96, %rcx
rep movsb
xor $36535, %r12
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rax
pop %r8
pop %r14
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r14
push %r8
push %rbx
push %rdi
push %rdx
push %rsi
// Store
lea addresses_UC+0x1647f, %r12
nop
nop
add %rdi, %rdi
mov $0x5152535455565758, %rbx
movq %rbx, (%r12)
nop
nop
nop
nop
nop
add %rdx, %rdx
// Store
lea addresses_US+0x1a70f, %r14
nop
nop
nop
nop
nop
cmp $64971, %rsi
movb $0x51, (%r14)
nop
nop
sub %r8, %r8
// Load
mov $0x2f2d730000000c7f, %rbx
nop
nop
nop
nop
nop
and $18811, %r14
movb (%rbx), %r8b
nop
nop
nop
dec %r12
// Faulty Load
lea addresses_WT+0xc7f, %r14
nop
nop
nop
nop
nop
cmp %rbx, %rbx
mov (%r14), %r8d
lea oracles, %rbx
and $0xff, %r8
shlq $12, %r8
mov (%rbx,%r8,1), %r8
pop %rsi
pop %rdx
pop %rdi
pop %rbx
pop %r8
pop %r14
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 1, 'NT': False, 'type': 'addresses_WT'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 11, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_UC'}}
{'OP': 'STOR', 'dst': {'congruent': 4, 'AVXalign': False, 'same': False, 'size': 1, 'NT': True, 'type': 'addresses_US'}}
{'src': {'congruent': 11, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_NC'}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 4, 'NT': False, 'type': 'addresses_WT'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'congruent': 11, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_WT_ht'}}
{'src': {'congruent': 3, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_WT_ht'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 4, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_WC_ht'}}
{'src': {'congruent': 2, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_WT_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 5, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 0, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'congruent': 8, 'same': False, 'type': 'addresses_A_ht'}}
{'OP': 'STOR', 'dst': {'congruent': 6, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_A_ht'}}
{'src': {'congruent': 9, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'dst': {'congruent': 7, 'same': True, 'type': 'addresses_WC_ht'}}
{'src': {'congruent': 4, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'dst': {'congruent': 8, 'same': False, 'type': 'addresses_UC_ht'}}
{'src': {'congruent': 3, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'congruent': 5, 'same': False, 'type': 'addresses_A_ht'}}
{'src': {'congruent': 4, 'AVXalign': False, 'same': True, 'size': 32, 'NT': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 0, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 10, 'same': False, 'type': 'addresses_A_ht'}}
{'OP': 'STOR', 'dst': {'congruent': 11, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_UC_ht'}}
{'src': {'congruent': 10, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'congruent': 3, 'same': False, 'type': 'addresses_WC_ht'}}
{'47': 12, '00': 131, 'ff': 66, 'bb': 18418, '45': 1413, '49': 236, 'ba': 1553}
ba ba ba ba ba 47 ba ba ba ba ba ba ba ba ba ba ba ba 45 ba ba ba ba ba 00 ba ba ba ba ba ba 49 ba 49 ba 45 45 ba ba ba ba ba ba ba 49 ba ba ba 49 ba ba ba ba ba ba ba ba ba ba ba 45 ba ba ba ba ba 00 ba ba ba ba 49 ba ba ba 45 ba ba ba ba ba ba ba ba ba 49 ba ba ba ba ba ba ba ba ba ba ba 49 ba ba ba ba ba ba ba ba ba ba ba ba ba 49 ba ba ba ba ba ba ba 45 ba 45 ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba 45 ba ba ba ba ba ba ba ba 00 ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba 45 ba ba ba ba ba ba ba ba ba 45 ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba 49 ba ba ba ba ba ba 49 ba ba ba 45 ba ba ba ba ba ba ba ba 45 ba ba ba ba 45 ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba 45 ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba 45 ba ba ba ba ba ba ba ba 45 45 ba ba ba ba ba ba ba 00 ba ba ba ba 49 ba ba ba ba ba ba ba ba ba ba ba ba 45 ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba 45 00 ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba 00 ba ba ba ba ba 45 ba ba ba ba ba ba ba ba ba ba ba ba 49 ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba 00 ba ba ba ba ba ba ba ba ba ba ba 45 ba ba ba ba ba 45 ba ba ba ba ba ba ba ba ba ba 45 ba 00 ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba 49 ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba 45 ba ba 45 ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba 49 ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba 49 ba ba ba ba ba ba ba ba ba ba ba ba ba 00 ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba 45 ba ba 45 ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba 45 ba ba ba ba ba ba ba ba ba ba 49 ba ba ba ba ba ba ba 00 ba ba ba ba ba ba ba ba ba ba ba ba ba ba 00 ba ba ba ba ba ba ba ba ba ba ba 45 ba ba ba ba ba ba ba ba ba ba 00 00 ba ba ba ba 49 ba ba ba ba ba ba ba ba ba ba 45 ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba 49 ba ba ba ba ba ba ba ba 49 ba ba ba ba ba ba ba ba 49 ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba 45 ba ba 45 ba ba ba 49 ba ba ba 49 ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba 49 ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba 45 45 ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba 00 ba ba ba 45 ba ba ba ba ff ba ba ba ba ba ba 45 ba ba ba ba ba ba ba ba ba 45 ba ba ba ba ba ba ba ba ba ba ba ba ba 49 ba ba 45 ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba 49 ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba ba 45 ba 45 ba ba ba ba ba ba 49 ba ba ba ba ba ba 49 ba ba ba
*/
|
lib/Haskell/RangedSets/Boundaries.agda | ioanasv/agda2hs | 1 | 3032 | module Haskell.RangedSets.Boundaries where
open import Agda.Builtin.Nat as Nat hiding (_==_; _<_; _+_; _-_)
open import Agda.Builtin.Char
open import Agda.Builtin.Int using (pos; negsuc)
open import Haskell.Prim
open import Haskell.Prim.Ord
open import Haskell.Prim.Bool
open import Haskell.Prim.Char
open import Haskell.Prim.Maybe
open import Haskell.Prim.Enum
open import Haskell.Prim.Num
open import Haskell.Prim.Eq
open import Haskell.Prim.Functor
open import Haskell.Prim.Monoid
open import Haskell.Prim.Monad
open import Haskell.Prim.Applicative
open import Haskell.Prim.Int
open import Haskell.Prim.List
open import Haskell.Prim.Integer
open import Haskell.Prim.Real
open import Haskell.Prim.Tuple
open import Haskell.Prim.Double
open import Haskell.Prim.Bounded
open import Agda.Builtin.Char
{-# FOREIGN AGDA2HS
import Data.Ratio
#-}
record DiscreteOrdered (a : Set) ⦃ _ : Ord a ⦄ : Set where
field
adjacent : a → a → Bool
adjacentBelow : a → Maybe a
open DiscreteOrdered ⦃ ... ⦄ public
{-# COMPILE AGDA2HS DiscreteOrdered class #-}
orderingFromInt : Int → Ordering
orderingFromInt n = if_then_else_ (n == 0) LT (if_then_else_ (n == 1) EQ GT)
{-# COMPILE AGDA2HS orderingFromInt #-}
boundedAdjacentBool : (x y : Bool) → Bool
boundedAdjacentBool x y = if_then_else_ (x < y) true false
{-# COMPILE AGDA2HS boundedAdjacentBool #-}
boundedBelowBool : (x : Bool) → Maybe Bool
boundedBelowBool x = if_then_else_ (x == false) Nothing (Just false)
{-# COMPILE AGDA2HS boundedBelowBool #-}
boundedAdjacentOrdering : (x y : Ordering) → Bool
boundedAdjacentOrdering x y = if_then_else_ (x < y && x < GT) ((fromEnum x) + 1 == (fromEnum y)) false
{-# COMPILE AGDA2HS boundedAdjacentOrdering #-}
boundedBelowOrdering : (x : Ordering) → Maybe Ordering
boundedBelowOrdering x = if_then_else_ (x == LT) Nothing (Just (orderingFromInt ((fromEnum x) - 1)))
{-# COMPILE AGDA2HS boundedBelowOrdering #-}
boundedAdjacentChar : (x y : Char) → Bool
boundedAdjacentChar x y = if_then_else_ (x < y && x /= '\1114111') (((fromEnum x) + 1) == fromEnum y) false
{-# COMPILE AGDA2HS boundedAdjacentChar #-}
boundedBelowChar : (x : Char) → Maybe Char
boundedBelowChar x = if_then_else_ (x == '\0') Nothing (Just (chr ((ord x) - 1)))
{-# COMPILE AGDA2HS boundedBelowChar #-}
boundedAdjacentInt : (x y : Int) → Bool
boundedAdjacentInt x y = if_then_else_ (x < y && x /= 9223372036854775807) (x + 1 == y) false
{-# COMPILE AGDA2HS boundedAdjacentInt #-}
boundedBelowInt : (x : Int) → Maybe Int
boundedBelowInt x = if_then_else_ (x == -9223372036854775808) Nothing (Just (x - 1))
{-# COMPILE AGDA2HS boundedBelowInt #-}
boundedAdjacentInteger : (x y : Integer) → Bool
boundedAdjacentInteger x y = ((fromEnum x) + 1 == (fromEnum y))
{-# COMPILE AGDA2HS boundedAdjacentInteger #-}
boundedBelowInteger : (x : Integer) → Maybe Integer
boundedBelowInteger x = Just (x - (toInteger 1))
{-# COMPILE AGDA2HS boundedBelowInteger #-}
constructTuple : ⦃ o : Ord a ⦄ → ⦃ o2 : Ord b ⦄ → ⦃ DiscreteOrdered b ⦃ o2 ⦄ ⦄ → a → Maybe b → Maybe (a × b)
constructTuple _ Nothing = Nothing
constructTuple a (Just value) = Just (a , value)
{-# COMPILE AGDA2HS constructTuple #-}
constructTriple : ⦃ Ord a ⦄ → ⦃ Ord b ⦄ → ⦃ o : Ord c ⦄ → ⦃ DiscreteOrdered c ⦃ o ⦄ ⦄ → a → b → Maybe c → Maybe (a × b × c)
constructTriple _ _ Nothing = Nothing
constructTriple a b (Just value) = Just (a , b , value)
{-# COMPILE AGDA2HS constructTriple #-}
constructQuadtruple : ⦃ Ord a ⦄ → ⦃ Ord b ⦄ → ⦃ Ord c ⦄ → ⦃ o : Ord d ⦄ → ⦃ DiscreteOrdered d ⦃ o ⦄ ⦄
→ a → b → c → Maybe d → Maybe (Tuple (a ∷ b ∷ c ∷ d ∷ []))
constructQuadtruple _ _ _ Nothing = Nothing
constructQuadtruple a b c (Just value) = Just (a ∷ b ∷ c ∷ value ∷ [])
{-# COMPILE AGDA2HS constructQuadtruple #-}
instance
isDiscreteOrderedBool : DiscreteOrdered Bool
isDiscreteOrderedBool . adjacent = boundedAdjacentBool
isDiscreteOrderedBool . adjacentBelow = boundedBelowBool
{-# COMPILE AGDA2HS isDiscreteOrderedBool #-}
instance
isDiscreteOrderedOrdering : DiscreteOrdered Ordering
isDiscreteOrderedOrdering . adjacent = boundedAdjacentOrdering
isDiscreteOrderedOrdering . adjacentBelow = boundedBelowOrdering
{-# COMPILE AGDA2HS isDiscreteOrderedOrdering #-}
instance
isDiscreteOrderedChar : DiscreteOrdered Char
isDiscreteOrderedChar . adjacent = boundedAdjacentChar
isDiscreteOrderedChar . adjacentBelow = boundedBelowChar
{-# COMPILE AGDA2HS isDiscreteOrderedChar #-}
instance
isDiscreteOrderedInt : DiscreteOrdered Int
isDiscreteOrderedInt . adjacent = boundedAdjacentInt
isDiscreteOrderedInt . adjacentBelow = boundedBelowInt
{-# COMPILE AGDA2HS isDiscreteOrderedInt #-}
instance
isDiscreteOrderedInteger : DiscreteOrdered Integer
isDiscreteOrderedInteger . adjacent = boundedAdjacentInteger
isDiscreteOrderedInteger . adjacentBelow = boundedBelowInteger
{-# COMPILE AGDA2HS isDiscreteOrderedInteger #-}
instance
isDiscreteOrderedDouble : DiscreteOrdered Double
isDiscreteOrderedDouble . adjacent x y = false
isDiscreteOrderedDouble . adjacentBelow x = Nothing
{-# COMPILE AGDA2HS isDiscreteOrderedDouble #-}
instance
isDiscreteOrderedList : ⦃ o : Ord a ⦄ → ⦃ ol : Ord (List a) ⦄ → DiscreteOrdered (List a) ⦃ ol ⦄
isDiscreteOrderedList . adjacent x y = false
isDiscreteOrderedList . adjacentBelow x = Nothing
{-# COMPILE AGDA2HS isDiscreteOrderedList #-}
instance
isDiscreteOrderedRatio : ⦃ o : Ord a ⦄ → ⦃ Integral a ⦄ → ⦃ or : Ord (Ratio a )⦄ → DiscreteOrdered (Ratio a) ⦃ or ⦄
isDiscreteOrderedRatio . adjacent x y = false
isDiscreteOrderedRatio . adjacentBelow x = Nothing
{-# COMPILE AGDA2HS isDiscreteOrderedRatio #-}
instance
isDiscreteOrderedTuple : ⦃ Ord a ⦄ → ⦃ o : Ord b ⦄ → ⦃ DiscreteOrdered b ⦃ o ⦄ ⦄
→ ⦃ ot : Ord (a × b) ⦄ → DiscreteOrdered (a × b) ⦃ ot ⦄
isDiscreteOrderedTuple . adjacent (x1 , x2) (y1 , y2) = (x1 == y1) && (adjacent x2 y2)
isDiscreteOrderedTuple . adjacentBelow (x1 , x2) = constructTuple x1 (adjacentBelow x2)
{-# COMPILE AGDA2HS isDiscreteOrderedTuple #-}
instance
isDiscreteOrderedTriple : ⦃ Ord a ⦄ → ⦃ Ord b ⦄ → ⦃ o : Ord c ⦄ → ⦃ DiscreteOrdered c ⦃ o ⦄ ⦄
→ ⦃ ot : Ord (a × b × c) ⦄ → DiscreteOrdered (a × b × c) ⦃ ot ⦄
isDiscreteOrderedTriple . adjacent (x1 , x2 , x3) (y1 , y2 , y3) = (x1 == y1) && (x2 == y2) && (adjacent x3 y3)
isDiscreteOrderedTriple . adjacentBelow (x1 , x2 , x3) = constructTriple x1 x2 (adjacentBelow x3)
{-# COMPILE AGDA2HS isDiscreteOrderedTriple #-}
instance
isDiscreteOrderedQuadtruple : ⦃ Ord a ⦄ → ⦃ Ord b ⦄ → ⦃ Ord c ⦄
→ ⦃ o : Ord d ⦄ → ⦃ DiscreteOrdered d ⦃ o ⦄ ⦄
→ ⦃ ot : Ord (Tuple (a ∷ b ∷ c ∷ d ∷ [])) ⦄ → DiscreteOrdered (Tuple (a ∷ b ∷ c ∷ d ∷ [])) ⦃ ot ⦄
isDiscreteOrderedQuadtruple . adjacent (x1 ∷ x2 ∷ x3 ∷ x4 ∷ []) (y1 ∷ y2 ∷ y3 ∷ y4 ∷ []) = (x1 == y1) && (x2 == y2) && (x3 == y3) && (adjacent x4 y4)
isDiscreteOrderedQuadtruple . adjacentBelow (x1 ∷ x2 ∷ x3 ∷ x4 ∷ []) = constructQuadtruple x1 x2 x3 (adjacentBelow x4)
{-# COMPILE AGDA2HS isDiscreteOrderedQuadtruple #-}
data Boundary (a : Set) ⦃ b : Ord a ⦄ ⦃ _ : DiscreteOrdered a ⦃ b ⦄ ⦄ : Set where
BoundaryAbove : a → Boundary a
BoundaryBelow : a → Boundary a
BoundaryAboveAll : Boundary a
BoundaryBelowAll : Boundary a
{-# COMPILE AGDA2HS Boundary #-}
above : ⦃ o : Ord a ⦄ → ⦃ dio : DiscreteOrdered a ⦄
→ Boundary a ⦃ o ⦄ → a → Bool
above (BoundaryAbove b) a = a > b
above (BoundaryBelow b) a = a >= b
above BoundaryAboveAll _ = false
above BoundaryBelowAll _ = true
{-# COMPILE AGDA2HS above #-}
infixr 4 _/>/_
_/>/_ : ⦃ o : Ord a ⦄ → ⦃ dio : DiscreteOrdered a ⦄
→ a → Boundary a ⦃ o ⦄ → Bool
_/>/_ x (BoundaryAbove b) = x > b
_/>/_ x (BoundaryBelow b) = x >= b
_/>/_ _ BoundaryAboveAll = false
_/>/_ _ BoundaryBelowAll = true
{-# COMPILE AGDA2HS _/>/_ #-}
instance
isBoundaryEq : ⦃ o : Ord a ⦄ → ⦃ dio : DiscreteOrdered a ⦄ → Eq (Boundary a)
isBoundaryEq . _==_ (BoundaryAbove b1) (BoundaryAbove b2) = (b1 == b2)
isBoundaryEq . _==_ (BoundaryAbove b1) (BoundaryBelow b2) = if_then_else_ (b1 < b2 && (adjacent b1 b2)) true false
isBoundaryEq . _==_ (BoundaryBelow b1) (BoundaryBelow b2) = (b1 == b2)
isBoundaryEq . _==_ (BoundaryBelow b1) (BoundaryAbove b2) = if_then_else_ (b1 > b2 && (adjacent b2 b1)) true false
isBoundaryEq . _==_ BoundaryAboveAll BoundaryAboveAll = true
isBoundaryEq . _==_ BoundaryBelowAll BoundaryBelowAll = true
isBoundaryEq . _==_ _ _ = false
{-# COMPILE AGDA2HS isBoundaryEq #-}
instance
isBoundaryOrd : ⦃ o : Ord a ⦄ → ⦃ dio : DiscreteOrdered a ⦄ → Ord (Boundary a)
isBoundaryOrd . compare (BoundaryAbove b1) (BoundaryAbove b2) = compare b1 b2
isBoundaryOrd . compare (BoundaryAbove b1) (BoundaryBelow b2) = if_then_else_ (b1 < b2) (if_then_else_ (adjacent b1 b2) EQ LT) GT
isBoundaryOrd . compare (BoundaryAbove b1) BoundaryAboveAll = LT
isBoundaryOrd . compare (BoundaryAbove b1) BoundaryBelowAll = GT
isBoundaryOrd . compare (BoundaryBelow b1) (BoundaryBelow b2) = compare b1 b2
isBoundaryOrd . compare (BoundaryBelow b1) (BoundaryAbove b2) = if_then_else_ (b1 > b2) (if_then_else_ (adjacent b2 b1) EQ GT) LT
isBoundaryOrd . compare (BoundaryBelow b1) BoundaryAboveAll = LT
isBoundaryOrd . compare (BoundaryBelow b1) BoundaryBelowAll = GT
isBoundaryOrd . compare BoundaryAboveAll BoundaryAboveAll = EQ
isBoundaryOrd . compare BoundaryAboveAll _ = GT
isBoundaryOrd . compare BoundaryBelowAll BoundaryBelowAll = EQ
isBoundaryOrd . compare BoundaryBelowAll _ = LT
isBoundaryOrd ._<_ x y = compare x y == LT
isBoundaryOrd ._>_ x y = compare x y == GT
isBoundaryOrd ._<=_ x BoundaryAboveAll = true
isBoundaryOrd ._<=_ BoundaryBelowAll y = true
isBoundaryOrd ._<=_ x y = (compare x y == LT) || (compare x y == EQ)
isBoundaryOrd ._>=_ x y = (compare x y == GT) || (compare x y == EQ)
isBoundaryOrd .max x y = if (compare x y == GT) then x else y
isBoundaryOrd .min x y = if (compare x y == LT) then x else y
{-# COMPILE AGDA2HS isBoundaryOrd #-}
|
iod/con2/sprite/cf6.asm | olifink/smsqe | 0 | 23077 | * Sprite cf6
*
* Mode 4
* +|-----------+
* - gg ggg gg -
* |g g g g|
* |g g g |
* |g gg ggg |
* |g g g g|
* |g g g g|
* | gg g gg |
* +|-----------+
*
section sprite
xdef sp_cf6
xref sp_zero
sp_cf6
dc.w $0100,$0000
dc.w 12,7,0,0
dc.l sc4_cf6-*
dc.l sp_zero-*
dc.l 0
sc4_cf6
dc.w $6E00,$6000
dc.w $8800,$9000
dc.w $8800,$8000
dc.w $8C00,$E000
dc.w $8800,$9000
dc.w $8800,$9000
dc.w $6800,$6000
*
end
|
test/asset/agda-stdlib-1.0/Function/Related/TypeIsomorphisms/Solver.agda | omega12345/agda-mode | 0 | 13904 | <reponame>omega12345/agda-mode
------------------------------------------------------------------------
-- The Agda standard library
--
-- Automatic solver for equations over product and sum types
--
-- See examples at the bottom of the file for how to use this solver
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Function.Related.TypeIsomorphisms.Solver where
open import Algebra using (CommutativeSemiring)
import Algebra.Solver.Ring.NaturalCoefficients.Default
open import Data.Empty using (⊥)
open import Data.Product using (_×_)
open import Data.Sum using (_⊎_)
open import Data.Unit using (⊤)
open import Level using (Level; Lift)
open import Function.Inverse as Inv using (_↔_)
open import Function.Related as Related
open import Function.Related.TypeIsomorphisms
------------------------------------------------------------------------
-- The solver
module ×-⊎-Solver (k : Symmetric-kind) {ℓ} =
Algebra.Solver.Ring.NaturalCoefficients.Default
(×-⊎-commutativeSemiring k ℓ)
------------------------------------------------------------------------
-- Tests
private
-- A test of the solver above.
test : {ℓ : Level} (A B C : Set ℓ) →
(Lift ℓ ⊤ × A × (B ⊎ C)) ↔ (A × B ⊎ C × (Lift ℓ ⊥ ⊎ A))
test = solve 3 (λ A B C → con 1 :* (A :* (B :+ C)) :=
A :* B :+ C :* (con 0 :+ A))
Inv.id
where open ×-⊎-Solver bijection
|
Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnarl/s-taasde.adb | djamal2727/Main-Bearing-Analytical-Model | 0 | 26009 | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- S Y S T E M . T A S K I N G . A S Y N C _ D E L A Y S --
-- --
-- B o d y --
-- --
-- Copyright (C) 1998-2020, Free Software Foundation, Inc. --
-- --
-- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNARL was developed by the GNARL team at Florida State University. --
-- Extensive contributions were provided by Ada Core Technologies, Inc. --
-- --
------------------------------------------------------------------------------
with Ada.Unchecked_Conversion;
with Ada.Task_Identification;
with System.Task_Primitives.Operations;
with System.Tasking.Utilities;
with System.Tasking.Initialization;
with System.Tasking.Debug;
with System.OS_Primitives;
with System.Interrupt_Management.Operations;
package body System.Tasking.Async_Delays is
package STPO renames System.Task_Primitives.Operations;
package ST renames System.Tasking;
package STU renames System.Tasking.Utilities;
package STI renames System.Tasking.Initialization;
package OSP renames System.OS_Primitives;
function To_System is new Ada.Unchecked_Conversion
(Ada.Task_Identification.Task_Id, Task_Id);
Timer_Attention : Boolean := False;
pragma Atomic (Timer_Attention);
task Timer_Server is
pragma Interrupt_Priority (System.Any_Priority'Last);
end Timer_Server;
Timer_Server_ID : constant ST.Task_Id := To_System (Timer_Server'Identity);
-- The timer queue is a circular doubly linked list, ordered by absolute
-- wakeup time. The first item in the queue is Timer_Queue.Succ.
-- It is given a Resume_Time that is larger than any legitimate wakeup
-- time, so that the ordered insertion will always stop searching when it
-- gets back to the queue header block.
Timer_Queue : aliased Delay_Block;
package Init_Timer_Queue is end Init_Timer_Queue;
pragma Unreferenced (Init_Timer_Queue);
-- Initialize the Timer_Queue. This is a package to work around the
-- fact that statements are syntactically illegal here. We want this
-- initialization to happen before the Timer_Server is activated. A
-- build-in-place function would also work, but that's not supported
-- on all platforms (e.g. cil).
package body Init_Timer_Queue is
begin
Timer_Queue.Succ := Timer_Queue'Unchecked_Access;
Timer_Queue.Pred := Timer_Queue'Unchecked_Access;
Timer_Queue.Resume_Time := Duration'Last;
end Init_Timer_Queue;
------------------------
-- Cancel_Async_Delay --
------------------------
-- This should (only) be called from the compiler-generated cleanup routine
-- for an async. select statement with delay statement as trigger. The
-- effect should be to remove the delay from the timer queue, and exit one
-- ATC nesting level.
-- The usage and logic are similar to Cancel_Protected_Entry_Call, but
-- simplified because this is not a true entry call.
procedure Cancel_Async_Delay (D : Delay_Block_Access) is
Dpred : Delay_Block_Access;
Dsucc : Delay_Block_Access;
begin
-- A delay block level of Level_No_Pending_Abort indicates the delay
-- has been canceled. If the delay has already been canceled, there is
-- nothing more to be done.
if D.Level = Level_No_Pending_Abort then
return;
end if;
D.Level := Level_No_Pending_Abort;
-- Remove self from timer queue
STI.Defer_Abort_Nestable (D.Self_Id);
STPO.Write_Lock (Timer_Server_ID);
Dpred := D.Pred;
Dsucc := D.Succ;
Dpred.Succ := Dsucc;
Dsucc.Pred := Dpred;
D.Succ := D;
D.Pred := D;
STPO.Unlock (Timer_Server_ID);
-- Note that the above deletion code is required to be
-- idempotent, since the block may have been dequeued
-- previously by the Timer_Server.
-- leave the asynchronous select
STPO.Write_Lock (D.Self_Id);
STU.Exit_One_ATC_Level (D.Self_Id);
STPO.Unlock (D.Self_Id);
STI.Undefer_Abort_Nestable (D.Self_Id);
end Cancel_Async_Delay;
----------------------
-- Enqueue_Duration --
----------------------
function Enqueue_Duration
(T : Duration;
D : Delay_Block_Access) return Boolean
is
begin
if T <= 0.0 then
D.Timed_Out := True;
STPO.Yield;
return False;
else
-- The corresponding call to Undefer_Abort is performed by the
-- expanded code (see exp_ch9).
STI.Defer_Abort (STPO.Self);
Time_Enqueue
(STPO.Monotonic_Clock
+ Duration'Min (T, OSP.Max_Sensible_Delay), D);
return True;
end if;
end Enqueue_Duration;
------------------
-- Time_Enqueue --
------------------
-- Allocate a queue element for the wakeup time T and put it in the
-- queue in wakeup time order. Assume we are on an asynchronous
-- select statement with delay trigger. Put the calling task to
-- sleep until either the delay expires or is canceled.
-- We use one entry call record for this delay, since we have
-- to increment the ATC nesting level, but since it is not a
-- real entry call we do not need to use any of the fields of
-- the call record. The following code implements a subset of
-- the actions for the asynchronous case of Protected_Entry_Call,
-- much simplified since we know this never blocks, and does not
-- have the full semantics of a protected entry call.
procedure Time_Enqueue
(T : Duration;
D : Delay_Block_Access)
is
Self_Id : constant Task_Id := STPO.Self;
Q : Delay_Block_Access;
begin
pragma Debug (Debug.Trace (Self_Id, "Async_Delay", 'P'));
pragma Assert (Self_Id.Deferral_Level = 1,
"async delay from within abort-deferred region");
if Self_Id.ATC_Nesting_Level = ATC_Level'Last then
raise Storage_Error with "not enough ATC nesting levels";
end if;
Self_Id.ATC_Nesting_Level := Self_Id.ATC_Nesting_Level + 1;
pragma Debug
(Debug.Trace (Self_Id, "ASD: entered ATC level: " &
ATC_Level'Image (Self_Id.ATC_Nesting_Level), 'A'));
D.Level := Self_Id.ATC_Nesting_Level;
D.Self_Id := Self_Id;
D.Resume_Time := T;
STPO.Write_Lock (Timer_Server_ID);
-- Previously, there was code here to dynamically create
-- the Timer_Server task, if one did not already exist.
-- That code had a timing window that could allow multiple
-- timer servers to be created. Luckily, the need for
-- postponing creation of the timer server should now be
-- gone, since this package will only be linked in if
-- there are calls to enqueue calls on the timer server.
-- Insert D in the timer queue, at the position determined
-- by the wakeup time T.
Q := Timer_Queue.Succ;
while Q.Resume_Time < T loop
Q := Q.Succ;
end loop;
-- Q is the block that has Resume_Time equal to or greater than
-- T. After the insertion we want Q to be the successor of D.
D.Succ := Q;
D.Pred := Q.Pred;
D.Pred.Succ := D;
Q.Pred := D;
-- If the new element became the head of the queue,
-- signal the Timer_Server to wake up.
if Timer_Queue.Succ = D then
Timer_Attention := True;
STPO.Wakeup (Timer_Server_ID, ST.Timer_Server_Sleep);
end if;
STPO.Unlock (Timer_Server_ID);
end Time_Enqueue;
---------------
-- Timed_Out --
---------------
function Timed_Out (D : Delay_Block_Access) return Boolean is
begin
return D.Timed_Out;
end Timed_Out;
------------------
-- Timer_Server --
------------------
task body Timer_Server is
Ignore : constant Boolean := STU.Make_Independent;
-- Local Declarations
Next_Wakeup_Time : Duration := Duration'Last;
Timedout : Boolean;
Yielded : Boolean;
Now : Duration;
Dequeued : Delay_Block_Access;
Dequeued_Task : Task_Id;
pragma Unreferenced (Timedout, Yielded);
begin
pragma Assert (Timer_Server_ID = STPO.Self);
-- Since this package may be elaborated before System.Interrupt,
-- we need to call Setup_Interrupt_Mask explicitly to ensure that
-- this task has the proper signal mask.
Interrupt_Management.Operations.Setup_Interrupt_Mask;
-- Initialize the timer queue to empty, and make the wakeup time of the
-- header node be larger than any real wakeup time we will ever use.
loop
STI.Defer_Abort (Timer_Server_ID);
STPO.Write_Lock (Timer_Server_ID);
-- The timer server needs to catch pending aborts after finalization
-- of library packages. If it doesn't poll for it, the server will
-- sometimes hang.
if not Timer_Attention then
Timer_Server_ID.Common.State := ST.Timer_Server_Sleep;
if Next_Wakeup_Time = Duration'Last then
Timer_Server_ID.User_State := 1;
Next_Wakeup_Time :=
STPO.Monotonic_Clock + OSP.Max_Sensible_Delay;
else
Timer_Server_ID.User_State := 2;
end if;
STPO.Timed_Sleep
(Timer_Server_ID, Next_Wakeup_Time,
OSP.Absolute_RT, ST.Timer_Server_Sleep,
Timedout, Yielded);
Timer_Server_ID.Common.State := ST.Runnable;
end if;
-- Service all of the wakeup requests on the queue whose times have
-- been reached, and update Next_Wakeup_Time to next wakeup time
-- after that (the wakeup time of the head of the queue if any, else
-- a time far in the future).
Timer_Server_ID.User_State := 3;
Timer_Attention := False;
Now := STPO.Monotonic_Clock;
while Timer_Queue.Succ.Resume_Time <= Now loop
-- Dequeue the waiting task from the front of the queue
pragma Debug (System.Tasking.Debug.Trace
(Timer_Server_ID, "Timer service: waking up waiting task", 'E'));
Dequeued := Timer_Queue.Succ;
Timer_Queue.Succ := Dequeued.Succ;
Dequeued.Succ.Pred := Dequeued.Pred;
Dequeued.Succ := Dequeued;
Dequeued.Pred := Dequeued;
-- We want to abort the queued task to the level of the async.
-- select statement with the delay. To do that, we need to lock
-- the ATCB of that task, but to avoid deadlock we need to release
-- the lock of the Timer_Server. This leaves a window in which
-- another task might perform an enqueue or dequeue operation on
-- the timer queue, but that is OK because we always restart the
-- next iteration at the head of the queue.
STPO.Unlock (Timer_Server_ID);
STPO.Write_Lock (Dequeued.Self_Id);
Dequeued_Task := Dequeued.Self_Id;
Dequeued.Timed_Out := True;
STI.Locked_Abort_To_Level
(Timer_Server_ID, Dequeued_Task, Dequeued.Level - 1);
STPO.Unlock (Dequeued_Task);
STPO.Write_Lock (Timer_Server_ID);
end loop;
Next_Wakeup_Time := Timer_Queue.Succ.Resume_Time;
-- Service returns the Next_Wakeup_Time.
-- The Next_Wakeup_Time is either an infinity (no delay request)
-- or the wakeup time of the queue head. This value is used for
-- an actual delay in this server.
STPO.Unlock (Timer_Server_ID);
STI.Undefer_Abort (Timer_Server_ID);
end loop;
end Timer_Server;
end System.Tasking.Async_Delays;
|
src/time_triggered_scheduling.ads | jorge-real/TTS | 1 | 22154 | ------------------------------------------------------------
--
-- ADA REAL-TIME TIME-TRIGGERED SCHEDULING SUPPORT
--
-- @file time_triggered_scheduling.ads
--
-- @package Time_Triggered_Scheduling (SPEC)
--
-- @brief
-- Ada Real-Time Time Triggered Scheduling support: Time Triggered Scheduling
--
-- Ravenscar version
------------------------------------------------------------
pragma Profile (Ravenscar);
private with Ada.Real_Time.Timing_Events, System;
with Ada.Real_Time; use Ada.Real_Time;
generic
Number_Of_Work_IDs : Positive;
package Time_Triggered_Scheduling is
-- Work identifier types
type Any_Work_Id is new Integer range Integer'First .. Number_Of_Work_IDs;
subtype Special_Work_Id is Any_Work_Id range Any_Work_Id'First .. 0;
subtype Regular_Work_Id is Any_Work_Id range 1 .. Any_Work_Id'Last;
-- Special IDs
Empty_Slot : constant Special_Work_Id;
Mode_Change_Slot : constant Special_Work_Id;
-- A time slot in the TT plan
type Time_Slot is record
Slot_Duration : Time_Span;
Work_Id : Any_Work_Id;
Next_Slot_Separation : Time_Span := Time_Span_Zero;
-- User_Defined_Info: Any_User_Defined_Info;
end record;
-- Types representing/accessing TT plans
type Time_Triggered_Plan is array (Natural range <>) of Time_Slot;
type Time_Triggered_Plan_Access is access all Time_Triggered_Plan;
-- Set new TT plan to start at the end of the next mode change slot
procedure Set_Plan (TTP : in Time_Triggered_Plan_Access);
-- TT works use this procedure to wait for their next assigned slot
-- The When_Was_Released result informs caller of slot starting time
procedure Wait_For_Activation (Work_Id : Regular_Work_Id;
When_Was_Released : out Time);
private
use Ada.Real_Time.Timing_Events;
Empty_Slot : constant Special_Work_Id := 0;
Mode_Change_Slot : constant Special_Work_Id := -1;
protected Time_Triggered_Scheduler
with Priority => System.Interrupt_Priority'Last is
-- Setting a new TT plan
procedure Set_Plan (TTP : in Time_Triggered_Plan_Access);
private
-- New slot timing event
NS_Event : Timing_Event;
-- New slot handler procedure
procedure NS_Handler (Event : in out Timing_Event);
-- This access object is the reason why the scheduler is declared
-- in this private part, given that this is a generioc package.
-- It should be a constant, but a PO can't have constant components.
NS_Handler_Access : Timing_Event_Handler := NS_Handler'Access;
-- Procedure to enforce plan change
procedure Change_Plan (At_Time : Time);
-- Currently running plan and next plan to switch to, if any
Current_Plan : Time_Triggered_Plan_Access := null;
Next_Plan : Time_Triggered_Plan_Access := null;
-- Index numbers of current and next slots in the plan
Current_Slot_Index : Natural := 0;
Next_Slot_Index : Natural := 0;
-- Start time of next slot
Next_Slot_Release : Time := Time_Last;
end Time_Triggered_Scheduler;
end Time_Triggered_Scheduling;
|
asm/lib/io.asm | tteeoo/svc | 2 | 21863 | <reponame>tteeoo/svc
; This file is intended to be sourced by another.
; It defines subroutines for input and output.
; Prints a string.
; ra = Address of the start of the string.
; rb = Starting address to print to.
print:
; The following code is like a while loop.
; Pseudocode:
; while ((ac = memory[ra]) != 0) {
; memory[rb] = ac | 0x0f00
; ra++
; rb++
; }
; Label the start of the subroutine for looping purposes.
&loop_print_str
; If the value stored at the address in aa is 0x0, skip to the end.
ldr ac ra
cml ac 0
gte &after_print_str
; Store the loaded character with the applied VGA color codes
; at the address stored in bb, then increase aa and bb by 1.
orr (0x0f00)
str rb ac
inc ra, rb
; Loop back up.
gto &loop_print_str
; Label the end of the subroutine so it can be skipped to.
&after_print_str
ret
|
gcc-gcc-7_3_0-release/gcc/ada/s-trafor-default.adb | best08618/asylo | 7 | 13037 | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- S Y S T E M . T R A C E S . F O R M A T --
-- --
-- B o d y --
-- --
-- Copyright (C) 2001-2009, Free Software Foundation, Inc. --
-- --
-- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with System.Parameters;
package body System.Traces.Format is
procedure Send_Trace (Id : Trace_T; Info : String) is separate;
------------------
-- Format_Trace --
------------------
function Format_Trace (Source : String) return String_Trace is
Length : constant Integer := Source'Length;
Result : String_Trace := (others => ' ');
begin
-- If run-time tracing active, then fill the string
if Parameters.Runtime_Traces then
if Max_Size - Length > 0 then
Result (1 .. Length) := Source (1 .. Length);
Result (Length + 1 .. Max_Size) := (others => ' ');
Result (Length + 1) := ASCII.NUL;
else
Result (1 .. Max_Size - 1) :=
Source (Source'First .. Source'First - 1 + Max_Size - 1);
Result (Max_Size) := ASCII.NUL;
end if;
end if;
return Result;
end Format_Trace;
------------
-- Append --
------------
function Append
(Source : String_Trace;
Annex : String) return String_Trace
is
Result : String_Trace := (others => ' ');
Annex_Length : constant Integer := Annex'Length;
Source_Length : Integer;
begin
if Parameters.Runtime_Traces then
-- First we determine the size used, without the spaces at the end,
-- if a String_Trace is present. Look at System.Traces.Tasking for
-- examples.
Source_Length := 1;
while Source (Source_Length) /= ASCII.NUL loop
Source_Length := Source_Length + 1;
end loop;
-- Then we fill the string
if Source_Length - 1 + Annex_Length <= Max_Size then
Result (1 .. Source_Length - 1) :=
Source (1 .. Source_Length - 1);
Result (Source_Length .. Source_Length - 1 + Annex_Length) :=
Annex (1 .. Annex_Length);
Result (Source_Length + Annex_Length) := ASCII.NUL;
Result (Source_Length + Annex_Length + 1 .. Max_Size) :=
(others => ' ');
else
Result (1 .. Source_Length - 1) := Source (1 .. Source_Length - 1);
Result (Source_Length .. Max_Size - 1) :=
Annex (1 .. Max_Size - Source_Length);
Result (Max_Size) := ASCII.NUL;
end if;
end if;
return Result;
end Append;
end System.Traces.Format;
|
Scripts Pack Source Items/Scripts Pack/Core Components/Disable AirDrop (Recent Wi-Fi Hardware) (10.7).applescript | Phorofor/ScriptsPack.macOS | 1 | 1191 | # Scripts Pack - Tweak various preference variables in macOS
# <Phorofor, https://github.com/Phorofor/>
-- Enables AirDrop or disables it on Macs with recent hardware. See http://support.apple.com/kb/HT4783 for a list of Mac computers that have AirDrop enabled by default
-- Disable AirDrop on AirDrop enabled Macs
-- Versions compatible: Lion (10.7)+
-- Preference Identifier: com.apple.NetworkBrowser
-- Preference Key: DisableAirDrop
-- Preference location: ~/Library/Preferences/com.apple.NetworkBrowser.plist
-- Default value (boolean): --
set defaultHD to (get path to system folder) as string
set mIcon to defaultHD & "Library:CoreServices:CoreTypes.bundle:Contents:Resources:AirDrop"
(*
set MacVer to do shell script "sw_vers -productVersion"
set Min to "10.7.0" as string
if MacVer < Min then
display alert "Outdated Mac OS Version!" message "You're using Mac OS " & MacVer & ". This AirDrop feature isn't available for your current version of Mac OS. You must be using Mac OS Lion (10.7) or later in order for this to work!" buttons ["OK", "More Information"] as warning cancel button 1
do shell script "open http://support.apple.com/kb/SP629"
else
*)
try
set prValue to do shell script "defaults read com.apple.NetworkBrowser DisableAirDrop"
if prValue = "0" then
set psValue to "AirDrop is currently enabled. You can transfer files to other computers with AirDrop. You can choose to disable it if you wish to."
else
set psValue to "AirDrop isn't enabled right now. You cannot use AirDrop and its features. To use it, click the 'Enable' button."
end if
on error
set psValue to "AirDrop is enabled by default on Macs with supported hardware."
end try
display alert "Would you like to disable or enable AirDrop?" message "When disabled you cannot access the AirDrop features for this user. For a list of AirDrop enabled computers by default see: http://support.apple.com/kb/HT4783 for more information." & return & return & psValue buttons {"Cancel", "Enable", "Disable"} cancel button 1 default button 2
if the button returned of the result is "Enable" then
do shell script "defaults write com.apple.NetworkBrowser DisableAirDrop -bool NO"
set bT to "You chose to enable AirDrop."
else
do shell script "defaults write com.apple.NetworkBrowser DisableAirDrop -bool YES"
set bT to "You chose to disable AirDrop."
end if
tell application "System Events" to (name of every process)
if the result contains "Finder" then
tell application "Finder"
display alert "NetworkBrowser - Changes Applied" message bT & " For the changes to take effect, you'll need to restart Finder. Would you like to restart it now?" buttons {"Restart it later", "Restart Finder"} cancel button 1
end tell
do shell script "killall Finder"
else
display dialog bT & " You'll be able see your changes the next time you run Finder." buttons ["Cancel", "Open Finder"] with title "NetworkBrowser - AirDrop Changes Applied!" with icon mIcon
tell application "Finder" to run
end if
#end if |
programs/oeis/059/A059029.asm | neoneye/loda | 22 | 9874 | ; A059029: a(n) = n if n is even, 2*n + 1 if n is odd.
; 0,3,2,7,4,11,6,15,8,19,10,23,12,27,14,31,16,35,18,39,20,43,22,47,24,51,26,55,28,59,30,63,32,67,34,71,36,75,38,79,40,83,42,87,44,91,46,95,48,99,50,103,52,107,54,111,56,115,58,119,60,123,62,127,64,131,66,135,68,139,70,143,72,147,74,151,76,155,78,159,80,163,82,167,84,171,86,175,88,179,90,183,92,187,94,191,96,195,98,199
add $0,1
mov $1,2
gcd $1,$0
mul $1,$0
sub $1,1
mov $0,$1
|
ch05/64 bit/CallProc_64.asm | William0Friend/my_masm | 0 | 167090 | <reponame>William0Friend/my_masm<filename>ch05/64 bit/CallProc_64.asm<gh_stars>0
; Calling a subroutine in 64-bit mode (CallProc_64.asm)
extrn ExitProcess: PROC
.code
main proc
sub rsp,8 ; align the stack pointer
sub rsp,20h ; reserve 32 bytes for shadow parameters
mov rcx,1 ; pass four parameters, in order
mov rdx,2
mov r8,3
mov r9,4
call AddFour ; look for return value in RAX
mov ecx,0
call ExitProcess
main endp
AddFour proc
mov rax,rcx
add rax,rdx
add rax,r8
add rax,r9 ; sum is in RAX
ret
AddFour endp
end |
source/amf/uml/amf-umldi-uml_association_or_connector_or_link_shapes-collections.ads | svn2github/matreshka | 24 | 9020 | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011-2012, <NAME> <<EMAIL>> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
-- This file is generated, don't edit it.
------------------------------------------------------------------------------
with AMF.Generic_Collections;
package AMF.UMLDI.UML_Association_Or_Connector_Or_Link_Shapes.Collections is
pragma Preelaborate;
package UMLDI_UML_Association_Or_Connector_Or_Link_Shape_Collections is
new AMF.Generic_Collections
(UMLDI_UML_Association_Or_Connector_Or_Link_Shape,
UMLDI_UML_Association_Or_Connector_Or_Link_Shape_Access);
type Set_Of_UMLDI_UML_Association_Or_Connector_Or_Link_Shape is
new UMLDI_UML_Association_Or_Connector_Or_Link_Shape_Collections.Set with null record;
Empty_Set_Of_UMLDI_UML_Association_Or_Connector_Or_Link_Shape : constant Set_Of_UMLDI_UML_Association_Or_Connector_Or_Link_Shape;
type Ordered_Set_Of_UMLDI_UML_Association_Or_Connector_Or_Link_Shape is
new UMLDI_UML_Association_Or_Connector_Or_Link_Shape_Collections.Ordered_Set with null record;
Empty_Ordered_Set_Of_UMLDI_UML_Association_Or_Connector_Or_Link_Shape : constant Ordered_Set_Of_UMLDI_UML_Association_Or_Connector_Or_Link_Shape;
type Bag_Of_UMLDI_UML_Association_Or_Connector_Or_Link_Shape is
new UMLDI_UML_Association_Or_Connector_Or_Link_Shape_Collections.Bag with null record;
Empty_Bag_Of_UMLDI_UML_Association_Or_Connector_Or_Link_Shape : constant Bag_Of_UMLDI_UML_Association_Or_Connector_Or_Link_Shape;
type Sequence_Of_UMLDI_UML_Association_Or_Connector_Or_Link_Shape is
new UMLDI_UML_Association_Or_Connector_Or_Link_Shape_Collections.Sequence with null record;
Empty_Sequence_Of_UMLDI_UML_Association_Or_Connector_Or_Link_Shape : constant Sequence_Of_UMLDI_UML_Association_Or_Connector_Or_Link_Shape;
private
Empty_Set_Of_UMLDI_UML_Association_Or_Connector_Or_Link_Shape : constant Set_Of_UMLDI_UML_Association_Or_Connector_Or_Link_Shape
:= (UMLDI_UML_Association_Or_Connector_Or_Link_Shape_Collections.Set with null record);
Empty_Ordered_Set_Of_UMLDI_UML_Association_Or_Connector_Or_Link_Shape : constant Ordered_Set_Of_UMLDI_UML_Association_Or_Connector_Or_Link_Shape
:= (UMLDI_UML_Association_Or_Connector_Or_Link_Shape_Collections.Ordered_Set with null record);
Empty_Bag_Of_UMLDI_UML_Association_Or_Connector_Or_Link_Shape : constant Bag_Of_UMLDI_UML_Association_Or_Connector_Or_Link_Shape
:= (UMLDI_UML_Association_Or_Connector_Or_Link_Shape_Collections.Bag with null record);
Empty_Sequence_Of_UMLDI_UML_Association_Or_Connector_Or_Link_Shape : constant Sequence_Of_UMLDI_UML_Association_Or_Connector_Or_Link_Shape
:= (UMLDI_UML_Association_Or_Connector_Or_Link_Shape_Collections.Sequence with null record);
end AMF.UMLDI.UML_Association_Or_Connector_Or_Link_Shapes.Collections;
|
libsrc/target/zx81/chroma81/zx_aaddr2cx.asm | jpoikela/z88dk | 640 | 162985 | <gh_stars>100-1000
; uint __FASTCALL__ zx_aaddr2cx(void *attraddr)
; Stefano, 2014.12
SECTION code_clib
PUBLIC zx_aaddr2cx
PUBLIC _zx_aaddr2cx
EXTERN HRG_LineStart
.zx_aaddr2cx
._zx_aaddr2cx
IF FORlambda
ld hl,8319
ELSE
ld hl,HRG_LineStart+2+32768
ENDIF
and a
sbc hl,de
IF FORlambda
ld de,33
ELSE
ld de,35
ENDIF
and a
.sbloop
sbc hl,de
jr nc,sbloop
adc hl,de
ld a,l
and $1f
ld l,a
; ld h,0
ret
|
Transynther/x86/_processed/NONE/_zr_/i7-8650U_0xd2.log_13591_460.asm | ljhsiun2/medusa | 9 | 23593 | <filename>Transynther/x86/_processed/NONE/_zr_/i7-8650U_0xd2.log_13591_460.asm<gh_stars>1-10
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r11
push %r12
push %r13
push %r14
push %rcx
push %rdi
push %rsi
lea addresses_WT_ht+0xc601, %rsi
lea addresses_UC_ht+0x4b1f, %rdi
nop
nop
nop
nop
nop
add %r14, %r14
mov $104, %rcx
rep movsl
nop
nop
nop
nop
sub $28380, %r13
lea addresses_normal_ht+0x1df01, %r10
nop
nop
nop
and $37782, %r12
mov $0x6162636465666768, %r14
movq %r14, %xmm1
movups %xmm1, (%r10)
nop
nop
cmp $22082, %r14
lea addresses_normal_ht+0x102fb, %r10
clflush (%r10)
nop
nop
nop
nop
nop
dec %rdi
movw $0x6162, (%r10)
nop
nop
cmp $31202, %r14
lea addresses_WT_ht+0x6f01, %rsi
lea addresses_UC_ht+0xb8c1, %rdi
clflush (%rsi)
add $16481, %r11
mov $15, %rcx
rep movsl
nop
nop
nop
xor $55311, %rdi
lea addresses_A_ht+0x1b101, %r10
nop
nop
nop
nop
xor %r12, %r12
movl $0x61626364, (%r10)
nop
nop
nop
nop
nop
sub $52334, %rsi
lea addresses_normal_ht+0x1d8d1, %rdi
nop
nop
inc %r14
mov (%rdi), %r10d
add $43767, %r11
lea addresses_A_ht+0x16581, %r12
nop
nop
cmp %rsi, %rsi
mov (%r12), %r11
nop
nop
nop
nop
and %r13, %r13
lea addresses_UC_ht+0x18601, %r10
clflush (%r10)
nop
nop
sub $15638, %r11
mov $0x6162636465666768, %rsi
movq %rsi, (%r10)
xor $13843, %r11
lea addresses_D_ht+0x11101, %rsi
clflush (%rsi)
nop
nop
nop
nop
dec %r11
mov (%rsi), %r12d
nop
nop
and %r14, %r14
lea addresses_WC_ht+0xe401, %r12
nop
nop
nop
nop
nop
sub $12402, %rdi
vmovups (%r12), %ymm3
vextracti128 $1, %ymm3, %xmm3
vpextrq $1, %xmm3, %rcx
nop
nop
nop
nop
dec %r12
lea addresses_WC_ht+0xc991, %r12
sub %rsi, %rsi
mov $0x6162636465666768, %r11
movq %r11, (%r12)
nop
nop
nop
nop
sub %rcx, %rcx
lea addresses_D_ht+0x18501, %r12
nop
nop
nop
add %r13, %r13
mov (%r12), %ecx
nop
nop
add %r11, %r11
pop %rsi
pop %rdi
pop %rcx
pop %r14
pop %r13
pop %r12
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r15
push %r9
push %rax
push %rbp
push %rdi
push %rsi
// Faulty Load
lea addresses_A+0x1d901, %r15
nop
sub %rax, %rax
mov (%r15), %di
lea oracles, %rax
and $0xff, %rdi
shlq $12, %rdi
mov (%rax,%rdi,1), %rdi
pop %rsi
pop %rdi
pop %rbp
pop %rax
pop %r9
pop %r15
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_A', 'size': 2, 'AVXalign': True, 'NT': False, 'congruent': 0, 'same': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_A', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
<gen_prepare_buffer>
{'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 0, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 6, 'same': True}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 4, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 4, 'AVXalign': False, 'NT': True, 'congruent': 4, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 7, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 8, 'same': True}}
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 7, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 7, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 4, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}}
{'00': 13591}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
|
MSDOS/Virus.MSDOS.Unknown.npad.asm | fengjixuchui/Family | 3 | 99007 | <gh_stars>1-10
INTERRUPTS SEGMENT AT 0H ;This is where the keyboard interrupt
ORG 9H*4 ;holds the address of its service routine
KEYBOARD_INT LABEL DWORD
INTERRUPTS ENDS
SCREEN SEGMENT AT 0B000H ;A dummy segment to use as the
SCREEN ENDS ;Extra Segment
ROM_BIOS_DATA SEGMENT AT 40H ;BIOS statuses held here, also keyboard buffer
ORG 1AH
HEAD DW ? ;Unread chars go from Head to Tail
TAIL DW ?
BUFFER DW 16 DUP (?) ;The buffer itself
BUFFER_END LABEL WORD
ROM_BIOS_DATA ENDS
CODE_SEG SEGMENT
ASSUME CS:CODE_SEG
ORG 100H ;ORG = 100H to make this into a .COM file
FIRST: JMP LOAD_PAD ;First time through jump to initialize routine
CNTRL_N_FLAG DW 0 ;Cntrl-N on or off
PAD DB '_',499 DUP(' ') ;Memory storage for pad
PAD_CURSOR DW 0 ;Current position in pad
PAD_OFFSET DW 0 ;Chooses 1st 250 bytes or 2nd
FIRST_POSITION DW ? ;Position of 1st char on screen
ATTRIBUTE DB 112 ;Pad Attribute -- reverse video
SCREEN_SEG_OFFSET DW 0 ;0 for mono, 8000H for graphics
IO_CHAR DW ? ;Holds addr of Put or Get_Char
STATUS_PORT DW ? ;Video controller status port
OLD_KEYBOARD_INT DD ? ;Location of old kbd interrupt
N_PAD PROC NEAR ;The keyboard interrupt will now come here.
ASSUME CS:CODE_SEG
PUSH AX ;Save the used registers for good form
PUSH BX
PUSH CX
PUSH DX
PUSH DI
PUSH SI
PUSH DS
PUSH ES
PUSHF ;First, call old keyboard interrupt
CALL OLD_KEYBOARD_INT
ASSUME DS:ROM_BIOS_DATA ;Examine the char just put in
MOV BX,ROM_BIOS_DATA
MOV DS,BX
MOV BX,TAIL ;Point to current tail
CMP BX,HEAD ;If at head, kbd int has deleted char
JE IN ;So leave
SUB BX,2 ;Point to just read in character
CMP BX,OFFSET BUFFER ;Did we undershoot buffer?
JAE NO_WRAP ;Nope
MOV BX,OFFSET BUFFER_END ;Yes -- move to buffer top
SUB BX,2
NO_WRAP:MOV DX,[BX] ;Char in DX now
CMP DX,310EH ;Is the char a Cntrl-N?
JNE NOT_CNTRL_N ;No
MOV TAIL,BX ;Yes -- delete it from buffer
NOT CNTRL_N_FLAG ;Switch Modes
CMP CNTRL_N_FLAG,0 ;Cntrl-N off?
JNE CNTRL_N_ON ;No, only other choice is on
CNTRL_N_OFF:
MOV ATTRIBUTE,7 ;Set up for normal video
MOV PAD_OFFSET,250 ;Point to 2nd half of pad
LEA AX,PUT_CHAR ;Make IO call Put_Char as it scans
MOV IO_CHAR,AX ;over all locations in pad on screen
CALL IO ;Restore screen
IN: JMP OUT ;Done
CNTRL_N_ON:
MOV PAD_OFFSET,250 ;Point to screen stroage part of pad
LEA AX,GET_CHAR ;Make IO use Get_char so current screen
MOV IO_CHAR,AX ;is stored
CALL IO ;Store Screen
CALL DISPLAY ;And put up the pad
JMP OUT ;Done here.
NOT_CNTRL_N:
TEST CNTRL_N_FLAG,1 ;Is Cntrl-N on?
JZ IN ;No -- leave
MOV TAIL,BX ;Yes, delete this char from buffer
CMP DX,5300H ;Decide what to do -- is it a Delete?
JNE RUBOUT_TEST ;No -- try Rubout
MOV BX,249 ;Yes -- fill pad with spaces
DEL_LOOP:
MOV PAD[BX],' ' ;Move space to current pad position
DEC BX ;and go back one
JNZ DEL_LOOP ;until done.
MOV PAD,'_' ;Put the cursor at the beginning
MOV PAD_CURSOR,0 ;And start cursor over
CALL DISPLAY ;Put up the new pad on screen
JMP OUT ;And take our leave
RUBOUT_TEST:
CMP DX,0E08H ;Is it a Rubout?
JNE CRLF_TEST ;No -- try carriage return-line feed
MOV BX,PAD_CURSOR ;Yes -- get current pad location
CMP BX,0 ;Are we at beginning?
JLE NEVER_MIND ;Yes -- can't rubout past beginning
MOV PAD[BX],' ' ;No -- move space to current position
MOV PAD[BX-1],'_' ;And move cursor back one
DEC PAD_CURSOR ;Set the pad location straight
NEVER_MIND:
CALL DISPLAY ;And put the result on the screen
JMP OUT ;Done here.
CRLF_TEST:
CMP DX,1C0DH ;Is it a carriage return-line feed?
JNE CHAR_TEST ;No -- put it in the pad
CALL CRLF ;Yes -- move to next line
CALL DISPLAY ;And display result on screen
JMP OUT ;Done.
CHAR_TEST:
MOV BX,PAD_CURSOR ;Get current pad location
CMP BX,249 ;Are we past the end of the pad?
JGE PAST_END ;Yes -- throw away char
MOV PAD[BX],DL ;No -- move ASCII code into pad
MOV PAD[BX+1],'_' ;Advance cursor
INC PAD_CURSOR ;Increment pad location
PAST_END:
CALL DISPLAY ;Put result on screen
OUT: POP ES ;Having done Pushes, here are the Pops
POP DS
POP SI
POP DI
POP DX
POP CX
POP BX
POP AX
IRET ;An interrupt needs an IRET
N_PAD ENDP
DISPLAY PROC NEAR ;Puts the whole pad on the screen
PUSH AX
MOV ATTRIBUTE,112 ;Use reverse video
MOV PAD_OFFSET,0 ;Use 1st 250 bytes of pad memory
LEA AX,PUT_CHAR ;Make IO use Put-Char so it does
MOV IO_CHAR,AX
CALL IO ;Put result on screen
POP AX
RET ;Leave
DISPLAY ENDP
CRLF PROC NEAR ;This handles carriage returns
CMP PAD_CURSOR,225 ;Are we on last line?
JGE DONE ;Yes, can't do a carriage return, exit
NEXT_CHAR:
MOV BX,PAD_CURSOR ;Get pad location
MOV AX,BX ;Get another copy for destructive tests
EDGE_TEST:
CMP AX,24 ;Are we at the edge of the pad display?
JE AT_EDGE ;Yes -- fill pad with new cursor
JL ADD_SPACE ;No -- Advance another space
SUB AX,25 ;Subtract another line-width
JMP EDGE_TEST ;Check if at edge now
ADD_SPACE:
MOV PAD[BX],' ' ;Add a space
INC PAD_CURSOR ;Update pad location
JMP NEXT_CHAR ;Check if at edge now
AT_EDGE:
MOV PAD[BX+1],'_' ;Put cursor in next location
INC PAD_CURSOR ;Update pad location to new cursor
DONE: RET ;And out.
CRLF ENDP
GET_CHAR PROC NEAR ;Gets a char from screen and advances position
PUSH DX
MOV SI,2 ;Loop twice, once for char, once for attribute
MOV DX,STATUS_PORT ;Get ready to read video controller status
G_WAIT_LOW: ;Start waiting for a new horizontal scan -
IN AL,DX ;Make sure the video controller scan status
TEST AL,1 ;is low
JNZ G_WAIT_LOW
G_WAIT_HIGH: ;After port has gone low, it must go high
IN AL,DX ;before it is safe to read directly from
TEST AL,1 ;the screen buffer in memory
JZ G_WAIT_HIGH
MOV AH,ES:[DI] ;Do the move from the screen, one byte at a time
INC DI ;Move to next screen location
DEC SI ;Decrement loop counter
CMP SI,0 ;Are we done?
JE LEAVE ;Yes
MOV PAD[BX],AH ;No -- put char we got into the pad
JMP G_WAIT_LOW ;Do it again
LEAVE: INC BX ;Update pad location
POP DX
RET
GET_CHAR ENDP
PUT_CHAR PROC NEAR ;Puts one char on screen and advances position
PUSH DX
MOV AH,PAD[BX] ;Get the char to be put onto the screen
MOV SI,2 ;Loop twice, once for char, once for attribute
MOV DX,STATUS_PORT ;Get ready to read video controller status
P_WAIT_LOW: ;Start waiting for a new horizontal scan -
IN AL,DX ;Make sure the video controller scan status
TEST AL,1 ;is low
JNZ P_WAIT_LOW
P_WAIT_HIGH: ;After port has gone low, it must go high
IN AL,DX ;before it is safe to write directly to
TEST AL,1 ;the screen buffer in memory
JZ P_WAIT_HIGH
MOV ES:[DI],AH ;Move to screen, one byte at a time
MOV AH,ATTRIBUTE ;Load attribute byte for second pass
INC DI ;Point to next screen postion
DEC SI ;Decrement loop counter
JNZ P_WAIT_LOW ;If not zero, do it one more time
INC BX ;Point to next char in pad
POP DX
RET ;Exeunt
PUT_CHAR ENDP
IO PROC NEAR ;This scans over all screen positions of the pad
ASSUME ES:SCREEN ;Use screen as extra segment
MOV BX,SCREEN
MOV ES,BX
MOV DI,SCREEN_SEG_OFFSET ;DI will be pointer to screen postion
ADD DI,FIRST_POSITION ;Add width of screen minus pad width
MOV BX,PAD_OFFSET ;BX will be pad location pointer
MOV CX,10 ;There will be 10 lines
LINE_LOOP:
MOV DX,25 ;And 25 spaces across
CHAR_LOOP:
CALL IO_CHAR ;Call Put-Char or Get-Char
DEC DX ;Decrement character loop counter
JNZ CHAR_LOOP ;If not zero, scan over next character
ADD DI,FIRST_POSITION ;Add width of screen minus pad width
LOOP LINE_LOOP ;And now go back to do next line
RET ;Finished
IO ENDP
LOAD_PAD PROC NEAR ;This procedure intializes everything
ASSUME DS:INTERRUPTS ;The data segment will be the Interrupt area
MOV AX,INTERRUPTS
MOV DS,AX
MOV AX,KEYBOARD_INT ;Get the old interrupt service routine
MOV OLD_KEYBOARD_INT,AX ;address and put it into our location
MOV AX,KEYBOARD_INT[2] ;OLD_KEYBOARD_INT so we can call it.
MOV OLD_KEYBOARD_INT[2],AX
MOV KEYBOARD_INT,OFFSET N_PAD ;Now load the address of our notepad
MOV KEYBOARD_INT[2],CS ;routine into the keyboard interrupt
MOV AH,15 ;Ask for service 15 of INT 10H
INT 10H ;This tells us how display is set up
SUB AH,25 ;Move to twenty places before edge
SHL AH,1 ;Mult by two (char & attribute bytes)
MOV BYTE PTR FIRST_POSITION,AH ;Set screen cursor
MOV STATUS_PORT,03BAH ;Assume this is a monochrome display
TEST AL,4 ;Is it?
JNZ EXIT ;Yes - jump out
MOV SCREEN_SEG_OFFSET,8000H ;No - set up for graphics display
MOV STATUS_PORT,03DAH
EXIT: MOV DX,OFFSET LOAD_PAD ;Set up everything but LOAD_PAD to
INT 27H ;stay and attach itself to DOS
LOAD_PAD ENDP
CODE_SEG ENDS
END FIRST ;END "FIRST" so 8088 will go to FIRST first.
|
Graph/Category.agda | Lolirofle/stuff-in-agda | 6 | 7267 | open import Type
module Graph.Category {ℓ₁ ℓ₂} {V : Type{ℓ₁}} where
open import Data.Tuple as Tuple using ()
open import Functional
open import Logic.Propositional
import Lvl
open import Graph{ℓ₁}{ℓ₂}(V)
open import Graph.Walk{ℓ₁}{ℓ₂}{V}
open import Graph.Walk.Proofs{ℓ₁}{ℓ₂}{V}
open import Relator.Equals
open import Relator.Equals.Proofs
open import Relator.Equals.Proofs.Equiv
open import Structure.Category
import Structure.Categorical.Names as Names
open import Structure.Categorical.Properties
open import Structure.Function
open import Structure.Operator
open import Structure.Relator.Properties
open import Syntax.Transitivity
module _ (_⟶_ : Graph) where
private variable a b c d : V
private variable e e₁ e₂ e₃ : a ⟶ b
private variable w w₁ w₂ w₃ : Walk(_⟶_) a b
Walk-transitivity-raw-identityₗ-raw : (Walk-transitivity-raw at w ≡ w)
Walk-transitivity-raw-identityₗ-raw = [≡]-intro
Walk-transitivity-raw-identityᵣ-raw : (Walk-transitivity-raw w at ≡ w)
Walk-transitivity-raw-identityᵣ-raw {a}{.a} {Walk.at} = [≡]-intro
Walk-transitivity-raw-identityᵣ-raw {a}{c} {Walk.prepend {b = b} e w} = congruence₁(prepend e) (Walk-transitivity-raw-identityᵣ-raw {b}{c} {w})
Walk-transitivity-raw-associativity-raw : Names.Morphism.Associativity{Obj = V}(\{w} → Walk-transitivity-raw{_⟶_ = _⟶_}{z = w})
Walk-transitivity-raw-associativity-raw {a}{b}{c}{d} {Walk.at} {w₂}{w₃} = [≡]-intro
Walk-transitivity-raw-associativity-raw {a}{b}{c}{d} {Walk.prepend e w₁}{w₂}{w₃} = congruence₁(prepend e) (Walk-transitivity-raw-associativity-raw {a}{b}{c}{_} {w₁}{w₂}{w₃})
instance
Walk-transitivity-raw-identityₗ : Morphism.Identityₗ{Obj = V}(\{w} → Walk-transitivity-raw{z = w})(at)
Walk-transitivity-raw-identityₗ = Morphism.intro Walk-transitivity-raw-identityₗ-raw
instance
Walk-transitivity-raw-identityᵣ : Morphism.Identityᵣ{Obj = V}(\{w} → Walk-transitivity-raw{z = w})(at)
Walk-transitivity-raw-identityᵣ = Morphism.intro Walk-transitivity-raw-identityᵣ-raw
instance
Walk-transitivity-raw-identity : Morphism.Identity{Obj = V}(\{w} → Walk-transitivity-raw{_⟶_ = _⟶_}{z = w})(at)
Walk-transitivity-raw-identity = [∧]-intro Walk-transitivity-raw-identityₗ Walk-transitivity-raw-identityᵣ
-- The category arising from a graph by its vertices and walks.
-- Note that `Walk` is defined so that every sequence of edges have an unique walk. For example `ReflexitiveTransitiveClosure` (a relation equivalent to a walk) would not work.
free-category : Category(Walk(_⟶_))
Category._∘_ free-category = swap(transitivity(Walk(_⟶_)))
Category.id free-category = reflexivity(Walk(_⟶_))
BinaryOperator.congruence (Category.binaryOperator free-category) [≡]-intro [≡]-intro = [≡]-intro
Morphism.Associativity.proof (Category.associativity free-category) {a}{b}{c}{d} {w₁}{w₂}{w₃} = symmetry(_≡_) (Walk-transitivity-raw-associativity-raw {d}{c}{b}{a} {w₃}{w₂}{w₁})
Morphism.Identityₗ.proof (Tuple.left (Category.identity free-category)) = Walk-transitivity-raw-identityᵣ-raw
Morphism.Identityᵣ.proof (Tuple.right (Category.identity free-category)) = Walk-transitivity-raw-identityₗ-raw
|
_build/dispatcher/jmp_ippsECCPBindGxyTblStd521r1_d6e8fae1.asm | zyktrcn/ippcp | 1 | 98627 | extern m7_ippsECCPBindGxyTblStd521r1:function
extern n8_ippsECCPBindGxyTblStd521r1:function
extern y8_ippsECCPBindGxyTblStd521r1:function
extern e9_ippsECCPBindGxyTblStd521r1:function
extern l9_ippsECCPBindGxyTblStd521r1:function
extern n0_ippsECCPBindGxyTblStd521r1:function
extern k0_ippsECCPBindGxyTblStd521r1:function
extern ippcpJumpIndexForMergedLibs
extern ippcpSafeInit:function
segment .data
align 8
dq .Lin_ippsECCPBindGxyTblStd521r1
.Larraddr_ippsECCPBindGxyTblStd521r1:
dq m7_ippsECCPBindGxyTblStd521r1
dq n8_ippsECCPBindGxyTblStd521r1
dq y8_ippsECCPBindGxyTblStd521r1
dq e9_ippsECCPBindGxyTblStd521r1
dq l9_ippsECCPBindGxyTblStd521r1
dq n0_ippsECCPBindGxyTblStd521r1
dq k0_ippsECCPBindGxyTblStd521r1
segment .text
global ippsECCPBindGxyTblStd521r1:function (ippsECCPBindGxyTblStd521r1.LEndippsECCPBindGxyTblStd521r1 - ippsECCPBindGxyTblStd521r1)
.Lin_ippsECCPBindGxyTblStd521r1:
db 0xf3, 0x0f, 0x1e, 0xfa
call ippcpSafeInit wrt ..plt
align 16
ippsECCPBindGxyTblStd521r1:
db 0xf3, 0x0f, 0x1e, 0xfa
mov rax, qword [rel ippcpJumpIndexForMergedLibs wrt ..gotpc]
movsxd rax, dword [rax]
lea r11, [rel .Larraddr_ippsECCPBindGxyTblStd521r1]
mov r11, qword [r11+rax*8]
jmp r11
.LEndippsECCPBindGxyTblStd521r1:
|
appleScripts/takeScreenshot.applescript | nbowen/IMMAT | 8 | 1771 | <reponame>nbowen/IMMAT
# Get the File
on run {rep as String , phone as String}
set PATH_TO_REPOSITORY to rep
set path_to_file to PATH_TO_REPOSITORY & "my_screenshot.png"
# set it as a POSIX file
set my_file to (path_to_file as POSIX file)
# send stuff
tell application "Messages"
set myid to get id of first service
set theBuddy to participant phone of account id myid
send my_file to theBuddy
end tell
end run |
test/frogger.asm | slcz/hummingbird | 0 | 21989 | #include "hi.asm"
iodata = 0xff0
ioctrl = 0xff1
ioin = 0xff1
jmp start
send_data:
st iodata
li(0x03)
st ioctrl
li(0x01)
st ioctrl
send_data_r = . + 1
send_data_r0:
jmp 0
send_ctrl:
st iodata
li(0x02)
st ioctrl
lh 0x00
st ioctrl
send_ctrl_r = . + 1
send_ctrl_r0:
jmp 0
start:
lh 0x00
st ioctrl
li(1f) st send_ctrl_r
li(0x38)
jmp send_ctrl
1:
ror ror ror ror
li(1f) st send_ctrl_r
li(0x0c) jmp send_ctrl
1:
ror ror ror ror
li(1f) st send_ctrl_r
li(0x01) jmp send_ctrl
1:
li(0x0f)
st count1
wait2:
li(0xff)
st count
wait3: ror
ld count
addi (-1) st count ne
jc wait3
ld count1
addi (-1) st count1 ne
jc wait2
li(1f) st send_ctrl_r
li(0x06) jmp send_ctrl
1:
ror ror ror ror
li(1f) st send_ctrl_r
li(0x40) jmp send_ctrl
1:
ror ror ror ror
2:
li(1f) st send_data_r
p_text_1 = . + 1
ld frog cmpi (-1) eq
jc 4f
jmp send_data
1:
ror ror ror ror
ld p_text_1 addi 1 st p_text_1
jmp 2b
4:
li(1f) st send_ctrl_r
li(0x80) jmp send_ctrl
1:
ror ror ror ror
2:
li(1f) st send_data_r
p_text_2 = . + 1
ld text cmpi (-1) eq
jc draw_frog
jmp send_data
1:
ror ror ror ror
ld p_text_2 addi 1 st p_text_2
jmp 2b
// draw frog
draw_frog:
ld loc
add frog_loc
st frog_loc
frog_loc = . + 1
ld text
cmp twenty ne jc 1f
li(0x01)
jmp draw_done
1:
cmpi 0x04 ne jc 1f
li(0x03)
jmp draw_done
1:
cmpi 0x05 ne jc 1f
li(0x01)
jmp draw_done
1:
li(0x03)
draw_done:
st tmp
li(1f) st send_ctrl_r
ld loc
cmp forty lt
jc 2f
add twenty_four
2:
add eighty jmp send_ctrl
1:
ror ror ror ror
li(1f) st send_data_r
ld tmp jmp send_data
1:
loop:
li(0xff)
st count1
wait1:
li(0xff)
st count
wait: ror
ld count
addi (-1) st count ne
jc wait
ld count1
addi (-1) st count1 ne
jc wait1
// preserve previous location
ld loc
st prev
lh 0x0 st up st down
// polling
li(0x10)
st ioctrl
li(0xf)
st count
1:
ror
ld count
addi (-1)
st count
eq jc 1f
jmp 1b
1:
ld ioin
st btn
lh 0x00
st ioctrl
ld btn
nori 0xfe eq
jc 1f
li(0x1) st down
jmp polling_done
1:
ld btn
nori 0xfd eq
jc polling_done
li(0x1) st up
polling_done:
// compute new location
ld up eq jc 1f
ld bot ne jc 2f
ld loc sub forty st loc
jmp 2f
1:
ld down eq jc 3f
ld bot cmpi 1 ne jc 2f
ld loc add forty st loc
2:
li(1) sub bot st bot
3:
ld loc addi 1 st loc
ld s addi 1 st s
cmp forty ne jc 1f
lh 0 st s
ld loc sub forty st loc
1:
ld loc
st save_context
save_context = . + 1
ld text
st t
ld loc cmp eighty_dec lt jc 1f
cmp onetwenty lt jc 2f
li(0x01) st result jmp finish
2:
jmp finish
1:
ld t cmp twenty ne jc 1f
ld bot eq jc 1f
li(0x01) st tmp jmp save_loc
1:
ld t cmp twenty ne jc 1f
ld bot ne jc 1f
lh 0x00 st tmp jmp save_loc
1:
ld t cmpi 0x04 ne jc 1f
ld bot eq jc 1f
li(0x03) st tmp jmp save_loc
1:
ld t cmpi 0x04 ne jc 1f
ld bot ne jc 1f
jmp finish
1:
ld t cmpi 0x05 ne jc 1f
ld bot eq jc 1f
jmp finish
1:
ld t cmpi 0x05 ne jc 1f
ld bot ne jc 1f
li(0x02) st tmp jmp save_loc
1: jmp finish
save_loc:
li(0x63) st send_ctrl_r0 st send_data_r0
jmp 1f
.=768
1:
li(1f) st send_ctrl_r
ld prev
cmp forty lt
jc 2f
add twenty_four
2:
add eighty jmp send_ctrl
1:
ror ror ror ror
li(1f) st send_data_r
ld prev
st loc_data_get
loc_data_get = . + 1
ld text
jmp send_data
1:
ror ror ror ror
li(1f) st send_ctrl_r
ld loc
cmp forty lt
jc 2f
add twenty_four
2:
add eighty jmp send_ctrl
1:
ror ror ror ror
li(1f) st send_data_r
ld tmp jmp send_data
1:
ror ror ror ror
li(1f) st send_ctrl_r
li(0x18) jmp send_ctrl
1: ror ror ror ror jmp loop
hlt
count: 0xff
count1: 0xff
loc: 46
prev: 0
s: 6
twenty: 0x20
up: 0
down: 0
bot: 1
forty: 40
twenty_four: 24
tmp: 0
t: 0
eighty: 0x80
result: 0
eighty_dec: 80
onetwenty: 120
.=1024
frog:
0x04 0x0e 0x04 0x0a 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x04 0x0e 0x04 0x0a
0x04 0x0e 0x04 0x0a 0x00 0x00 0x1f 0x00
0x00 0x00 0x1f 0x00 0x04 0x0e 0x04 0x0a
0x00 0x00 0x1f 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x1f 0x00
0x00 0x00 0x1f 0x00 0x00 0x00 0x1f 0x00
(-1)
.=1280
text:
0x04 0x04 0x06 0x20 0x20 0x06 0x04 0x06 0x20 0x20 0x05 0x06 0x04 0x04 0x06 0x04
0x04 0x20 0x20 0x04 0x04 0x06 0x20 0x04 0x04 0x06 0x05 0x04 0x04 0x04 0x20 0x20
0x04 0x06 0x04 0x04 0x20 0x05 0x20 0x06 0x05 0x05 0x05 0x20 0x20 0x04 0x04 0x04
0x20 0x20 0x20 0x05 0x05 0x05 0x05 0x20 0x20 0x05 0x05 0x20 0x20 0x04 0x04 0x04
0x04 0x04 0x20 0x20 0x06 0x06 0x20 0x20 0x05 0x20 0x04 0x04 0x20 0x20 0x20 0x05
(-1)
finish:
li(0x65) st send_ctrl_r0 st send_data_r0
li(1f) st send_ctrl_r
li(0x02) jmp send_ctrl
1:
li(0xff)
st count
7: ror
ld count
addi (-1) st count ne
jc 7b
li(1f) st send_ctrl_r
li(0x80) jmp send_ctrl
1:
ror ror ror ror
ld result eq jc jloss
li(1f) st send_data_r
2:
p_text_3 = . + 1
ld win cmpi (-1) eq
jc die
jmp send_data
1:
ror ror ror ror
ld p_text_3 addi 1 st p_text_3
jmp 2b
jloss:
li(1f) st send_data_r
2:
p_text_4 = . + 1
ld loss cmpi (-1) eq
jc die
jmp send_data
1:
ror ror ror ror
ld p_text_4 addi 1 st p_text_4
jmp 2b
die: jmp die
win: $W $I $N $! $ $ $ (-1)
loss: $L $O $S $S $ $ $ (-1)
btn: 3
|
src/message-login.adb | zenharris/ada-bbs | 2 | 21180 | <reponame>zenharris/ada-bbs<filename>src/message-login.adb
with Message.Reader; use Message.Reader;
Package body Message.Login is
procedure Read_Config (FileName : in String;
UserName : out Unbounded_String;
FullName : out Unbounded_String;
Password : out Unbounded_String) is
HeaderType, HeaderText, scratch : Unbounded_String;
File : File_Type;
begin
Open (File => File,
Mode => In_File,
Name => Filename);
scratch := SUIO.Get_Line(File);
while scratch /= "" loop
HeaderType := To_Unbounded_String(SU.Slice(scratch,1,SU.Index(scratch,":")-1));
HeaderText := To_Unbounded_String(SU.Slice(scratch,SU.Index(scratch,":")+2,SU.Length(scratch)));
if HeaderType = "UserName" then
UserName := HeaderText;
elsif HeaderType = "FullName" then
FullName := HeaderText;
elsif HeaderType = "Password" then
Password := HeaderText;
end if;
scratch := SUIO.Get_Line(File);
end loop;
Close (File);
exception
when End_Error =>
Close (File);
null;
end Read_Config;
-- function FileExists (Namen : Unbounded_String) return Boolean is
-- File : File_Type;
-- begin
-- Open (File => File,
-- Mode => In_File,
-- Name => To_String(Namen));
-- Close (File);
-- return True;
-- exception
-- when End_Error =>
-- Close (File);
-- return True;
-- when ADA.IO_EXCEPTIONS.NAME_ERROR =>
-- return False;
-- end FileExists;
procedure Create_User is
File : File_Type;
UserName, FullName, Password, Password2, Fname : Unbounded_String;
NowDate : Time := Clock;
Width,Columns : Column_Position := 50;
Length,Lines : Line_Position := 8;
Display_Window : Window;
begin
Get_Size(Number_Of_Lines => Lines,Number_Of_Columns => Columns);
Display_Window := Sub_Window(Win => Standard_Window,
Number_Of_Lines => Length,
Number_Of_Columns => Width,
First_Line_Position => (Lines - Length) / 2,
First_Column_Position => (Columns - Width) / 2);
Clear(Display_Window);
Box(Display_Window);
loop
Add (Display_Window,Line => 2,Column => 2,Str => "UserName : ");
Texaco.Line_Editor(Display_Window,
StartLine => 2,
StartColumn => 15,
Editlength => 16,
Edline => UserName,
MaxLength => 15,
SuppressSpaces => True);
-- FName := UserName & ".cfg";
Fname := To_Unbounded_String(Ada.Strings.Fixed.Translate(To_String(UserName),
Ada.Strings.Maps.Constants.Lower_Case_Map));
Fname := "users/" & FName & ".cfg";
if Exists (To_String(FName)) then
Display_Warning.Warning("That Username is already in use",Down => Integer(Length-1));
UserName := To_Unbounded_String("");
Redraw(Display_Window,0,Integer(Length)-1);
Refresh(Display_Window);
end if;
exit when UserName /= "";
end loop;
loop
Add (Display_Window,Line => 3,Column => 2,Str => "Full Name : ");
Texaco.Line_Editor(Display_Window,
StartLine => 3,
StartColumn => 15,
Editlength => 31,
Edline => FullName,
MaxLength => 30);
exit when FullName /= "";
end loop;
loop
Add (Display_Window,Line => 4,Column => 2,Str => "Password : ");
Texaco.Password_Editor(Display_Window,
StartLine => 4,
StartColumn => 15,
Edline => Password,
MaxLength => 15);
Add (Display_Window,Line => 5,Column => 2,Str => "Re-Type Password : ");
Texaco.Password_Editor(Display_Window,
StartLine => 5,
StartColumn => 21,
Edline => Password2,
MaxLength => 15);
if Password /= Password2 then
Display_Warning.Warning("Passwords Do Not Match",Down => Integer(Length-1));
Password := To_Unbounded_String("");
Password2 := To_Unbounded_String("");
end if;
exit when Password /= "";
end loop;
if Display_Warning.GetYN("Do You want to save this User Y/N",Down => Integer(Length-1)) then
-- FName := UserName & ".cfg";
Create (File => File,
Mode => Out_File,
Name => To_String(FName));
SUIO.Put_Line(File,"UserName: " & UserName);
SUIO.Put_Line(File,"FullName: " & FullName);
SUIO.Put_Line(File,"Password: " & Password);
SUIO.Put_Line(File,"CreateDate: " & To_Unbounded_String(Image (NowDate)));
SUIO.Put_Line(File,To_Unbounded_String(""));
Close (File);
end if;
Clear(Display_Window);
Refresh(Display_Window);
Delete (Win => Display_Window);
end Create_User;
procedure Login_User is
InputUserName, InputPassword, Fname, UserName,FullName,Password : Unbounded_String;
Width,Columns : Column_Position := 50;
Length,Lines : Line_Position := 8;
Display_Window : Window;
begin
Get_Size(Number_Of_Lines => Lines,Number_Of_Columns => Columns);
Display_Window := Sub_Window(Win => Standard_Window,
Number_Of_Lines => Length,
Number_Of_Columns => Width,
First_Line_Position => (Lines - Length) / 2,
First_Column_Position => (Columns - Width) / 2);
Clear(Display_Window);
Box(Display_Window);
loop
Add (Display_Window,Line => 2,Column => 2,Str => "UserName : ");
Texaco.Line_Editor(Display_Window,
StartLine => 2,
StartColumn => 15,
Editlength => 16,
Edline => InputUserName,
MaxLength => 15,
SuppressSpaces => True);
exit when InputUserName /= "";
end loop;
loop
Add (Display_Window,Line => 3,Column => 2,Str => "Password : ");
Texaco.Password_Editor(Display_Window,
StartLine => 3,
StartColumn => 15,
Edline => InputPassword,
MaxLength => 15);
exit when InputPassword /= "";
end loop;
Fname := To_Unbounded_String(Ada.Strings.Fixed.Translate(To_String(InputUserName),
Ada.Strings.Maps.Constants.Lower_Case_Map));
Fname := "users/" & Fname & ".cfg";
if Exists (To_String(FName)) then
Read_Config(To_String(Fname),UserName => UserName,
FullName => FullName,
Password => Password);
if InputPassword = Password then
UserLoggedIn := True;
UserLoggedName := UserName;
UserLoggedFullName := FullName;
Display_Warning.Warning(To_String("Logged in "& UserLoggedName),Down => Integer(Length-1));
else
Display_Warning.Warning("Login Failed",Down => Integer(Length-1));
end if;
else
Display_Warning.Warning("Login Failed",Down => Integer(Length-1));
end if;
Clear(Display_Window);
Refresh(Display_Window);
Delete (Win => Display_Window);
end Login_User;
end Message.Login;
|
oeis/098/A098497.asm | neoneye/loda-programs | 11 | 246777 | ; A098497: Main diagonal of triangle A098495.
; Submitted by <NAME>
; 1,-1,1,-7,76,-989,15289,-275807,5702887,-133121449,3464398070,-99482086439,3125039826481,-106610733533317,3925411300203301,-155161278879431551,6553471162481684656
add $0,1
mov $1,1
mov $2,$0
mov $4,1
lpb $0
sub $0,1
sub $1,$4
mov $3,$2
mul $3,$1
add $4,$3
lpe
mov $0,$4
|
regtests/servlet-core-tests.ads | My-Colaborations/ada-servlet | 6 | 20411 | <gh_stars>1-10
-----------------------------------------------------------------------
-- Servlets Tests - Unit tests for Servlet.Core
-- Copyright (C) 2010, 2011, 2012, 2013, 2015, 2018 <NAME>
-- Written by <NAME> (<EMAIL>)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with Ada.Strings.Unbounded;
with Util.Tests;
with Util.Beans.Basic;
with Util.Beans.Objects;
package Servlet.Core.Tests is
use Ada.Strings.Unbounded;
procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite);
type Test_Servlet1 is new Servlet with record
Add_Resource : Boolean := False;
end record;
procedure Do_Get (Server : in Test_Servlet1;
Request : in out Requests.Request'Class;
Response : in out Responses.Response'Class);
type Test_Servlet2 is new Test_Servlet1 with null record;
procedure Do_Post (Server : in Test_Servlet2;
Request : in out Requests.Request'Class;
Response : in out Responses.Response'Class);
type Test_Servlet3 is new Servlet with record
Raise_Exception : Boolean := False;
end record;
procedure Do_Get (Server : in Test_Servlet3;
Request : in out Requests.Request'Class;
Response : in out Responses.Response'Class);
type Test is new Util.Tests.Test with record
Writer : Integer;
end record;
-- Test creation of session
procedure Test_Create_Servlet (T : in out Test);
-- Test add servlet
procedure Test_Add_Servlet (T : in out Test);
-- Test getting a resource path
procedure Test_Get_Resource (T : in out Test);
procedure Test_Request_Dispatcher (T : in out Test);
-- Test mapping and servlet path on a request.
procedure Test_Servlet_Path (T : in out Test);
-- Test mapping and servlet path on a request.
procedure Test_Filter_Mapping (T : in out Test);
-- Test execution of filters
procedure Test_Filter_Execution (T : in out Test);
-- Test execution of filters on complex mapping.
procedure Test_Complex_Filter_Execution (T : in out Test);
-- Test execution of the cache control filter.
procedure Test_Cache_Control_Filter (T : in out Test);
-- Test reading XML configuration file.
procedure Test_Read_Configuration (T : in out Test);
-- Test the Get_Name_Dispatcher.
procedure Test_Name_Dispatcher (T : in out Test);
-- Check that the mapping for the given URI matches the server.
procedure Check_Mapping (T : in out Test;
Ctx : in Servlet_Registry;
URI : in String;
Server : in Servlet_Access;
Filter : in Natural := 0);
-- Check that the request is done on the good servlet and with the correct servlet path
-- and path info.
procedure Check_Request (T : in out Test;
Ctx : in Servlet_Registry;
URI : in String;
Servlet_Path : in String;
Path_Info : in String);
type Form_Bean is new Util.Beans.Basic.Bean with record
Name : Unbounded_String;
Password : Unbounded_String;
Email : Unbounded_String;
Called : Natural := 0;
Gender : Unbounded_String;
Use_Flash : Boolean := False;
Def_Nav : Boolean := False;
Perm_Error : Boolean := False;
end record;
type Form_Bean_Access is access all Form_Bean'Class;
-- Get the value identified by the name.
overriding
function Get_Value (From : in Form_Bean;
Name : in String) return Util.Beans.Objects.Object;
-- Set the value identified by the name.
overriding
procedure Set_Value (From : in out Form_Bean;
Name : in String;
Value : in Util.Beans.Objects.Object);
end Servlet.Core.Tests;
|
other.7z/SFC.7z/SFC/ソースデータ/ヨッシーアイランド/日本_Ver1/sfc/ys_chr.asm | prismotizm/gigaleak | 0 | 27579 | <reponame>prismotizm/gigaleak
Name: ys_chr.asm
Type: file
Size: 16538
Last-Modified: '2016-05-13T04:51:16Z'
SHA-1: 16CFAA5869A8DCA4CE1F0896ED4A720A53B5D8CA
Description: null
|
examples/usb_device_msc_sdcard/system/f407_168_8/Startup.asm | AIHZP/andysworkshop-stm32plus | 607 | 29088 | /**
******************************************************************************
* @file startup_stm32f4xx.s
* @author MCD Application Team
* @version V1.0.0
* @date 30-September-2011
* @brief STM32F4xx Devices vector table for RIDE7 toolchain.
* This module performs:
* - Set the initial SP
* - Set the initial PC == Reset_Handler,
* - Set the vector table entries with the exceptions ISR address
* - Configure the clock system and the external SRAM mounted on
* STM324xG-EVAL board to be used as data memory (optional,
* to be enabled by user)
* - Branches to main in the C library (which eventually
* calls main()).
* After Reset the Cortex-M4 processor is in Thread mode,
* priority is Privileged, and the Stack is set to Main.
******************************************************************************
* @attention
*
* THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
* TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
* DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
* FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
* CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
*
* <h2><center>© COPYRIGHT 2011 STMicroelectronics</center></h2>
******************************************************************************
*/
.syntax unified
.cpu cortex-m3
.fpu softvfp
.thumb
.global g_pfnVectors
.global Default_Handler
/* start address for the initialization values of the .data section.
defined in linker script */
.word _sidata
/* start address for the .data section. defined in linker script */
.word _sdata
/* end address for the .data section. defined in linker script */
.word _edata
/* start address for the .bss section. defined in linker script */
.word _sbss
/* end address for the .bss section. defined in linker script */
.word _ebss
/* stack used for SystemInit_ExtMemCtl; always internal RAM used */
/**
* @brief This is the code that gets called when the processor first
* starts execution following a reset event. Only the absolutely
* necessary set is performed, after which the application
* supplied main() routine is called.
* @param None
* @retval : None
*/
.section .text.Reset_Handler
.weak Reset_Handler
.type Reset_Handler, %function
Reset_Handler:
/* Copy the data segment initializers from flash to SRAM */
movs r1, #0
b LoopCopyDataInit
CopyDataInit:
ldr r3, =_sidata
ldr r3, [r3, r1]
str r3, [r0, r1]
adds r1, r1, #4
LoopCopyDataInit:
ldr r0, =_sdata
ldr r3, =_edata
adds r2, r0, r1
cmp r2, r3
bcc CopyDataInit
ldr r2, =_sbss
b LoopFillZerobss
/* Zero fill the bss segment. */
FillZerobss:
movs r3, #0
str r3, [r2], #4
LoopFillZerobss:
ldr r3, = _ebss
cmp r2, r3
bcc FillZerobss
/* Call the clock system intitialization function.*/
bl SystemInit
/* Call the application's entry point.*/
bl main
bx lr
.size Reset_Handler, .-Reset_Handler
/**
* @brief This is the code that gets called when the processor receives an
* unexpected interrupt. This simply enters an infinite loop, preserving
* the system state for examination by a debugger.
* @param None
* @retval None
*/
.section .text.Default_Handler,"ax",%progbits
Default_Handler:
Infinite_Loop:
b Infinite_Loop
.size Default_Handler, .-Default_Handler
/******************************************************************************
*
* The minimal vector table for a Cortex M3. Note that the proper constructs
* must be placed on this to ensure that it ends up at physical address
* 0x0000.0000.
*
*******************************************************************************/
.section .isr_vector,"a",%progbits
.type g_pfnVectors, %object
.size g_pfnVectors, .-g_pfnVectors
g_pfnVectors:
.word _estack
.word Reset_Handler
.word NMI_Handler
.word HardFault_Handler
.word MemManage_Handler
.word BusFault_Handler
.word UsageFault_Handler
.word 0
.word 0
.word 0
.word 0
.word SVC_Handler
.word DebugMon_Handler
.word 0
.word PendSV_Handler
.word SysTick_Handler
/* External Interrupts */
.word WWDG_IRQHandler /* Window WatchDog */
.word PVD_IRQHandler /* PVD through EXTI Line detection */
.word TAMP_STAMP_IRQHandler /* Tamper and TimeStamps through the EXTI line */
.word RTC_WKUP_IRQHandler /* RTC Wakeup through the EXTI line */
.word FLASH_IRQHandler /* FLASH */
.word RCC_IRQHandler /* RCC */
.word EXTI0_IRQHandler /* EXTI Line0 */
.word EXTI1_IRQHandler /* EXTI Line1 */
.word EXTI2_IRQHandler /* EXTI Line2 */
.word EXTI3_IRQHandler /* EXTI Line3 */
.word EXTI4_IRQHandler /* EXTI Line4 */
.word DMA1_Stream0_IRQHandler /* DMA1 Stream 0 */
.word DMA1_Stream1_IRQHandler /* DMA1 Stream 1 */
.word DMA1_Stream2_IRQHandler /* DMA1 Stream 2 */
.word DMA1_Stream3_IRQHandler /* DMA1 Stream 3 */
.word DMA1_Stream4_IRQHandler /* DMA1 Stream 4 */
.word DMA1_Stream5_IRQHandler /* DMA1 Stream 5 */
.word DMA1_Stream6_IRQHandler /* DMA1 Stream 6 */
.word ADC_IRQHandler /* ADC1, ADC2 and ADC3s */
.word CAN1_TX_IRQHandler /* CAN1 TX */
.word CAN1_RX0_IRQHandler /* CAN1 RX0 */
.word CAN1_RX1_IRQHandler /* CAN1 RX1 */
.word CAN1_SCE_IRQHandler /* CAN1 SCE */
.word EXTI9_5_IRQHandler /* External Line[9:5]s */
.word TIM1_BRK_TIM9_IRQHandler /* TIM1 Break and TIM9 */
.word TIM1_UP_TIM10_IRQHandler /* TIM1 Update and TIM10 */
.word TIM1_TRG_COM_TIM11_IRQHandler /* TIM1 Trigger and Commutation and TIM11 */
.word TIM1_CC_IRQHandler /* TIM1 Capture Compare */
.word TIM2_IRQHandler /* TIM2 */
.word TIM3_IRQHandler /* TIM3 */
.word TIM4_IRQHandler /* TIM4 */
.word I2C1_EV_IRQHandler /* I2C1 Event */
.word I2C1_ER_IRQHandler /* I2C1 Error */
.word I2C2_EV_IRQHandler /* I2C2 Event */
.word I2C2_ER_IRQHandler /* I2C2 Error */
.word SPI1_IRQHandler /* SPI1 */
.word SPI2_IRQHandler /* SPI2 */
.word USART1_IRQHandler /* USART1 */
.word USART2_IRQHandler /* USART2 */
.word USART3_IRQHandler /* USART3 */
.word EXTI15_10_IRQHandler /* External Line[15:10]s */
.word RTC_Alarm_IRQHandler /* RTC Alarm (A and B) through EXTI Line */
.word OTG_FS_WKUP_IRQHandler /* USB OTG FS Wakeup through EXTI line */
.word TIM8_BRK_TIM12_IRQHandler /* TIM8 Break and TIM12 */
.word TIM8_UP_TIM13_IRQHandler /* TIM8 Update and TIM13 */
.word TIM8_TRG_COM_TIM14_IRQHandler /* TIM8 Trigger and Commutation and TIM14 */
.word TIM8_CC_IRQHandler /* TIM8 Capture Compare */
.word DMA1_Stream7_IRQHandler /* DMA1 Stream7 */
.word FSMC_IRQHandler /* FSMC */
.word SDIO_IRQHandler /* SDIO */
.word TIM5_IRQHandler /* TIM5 */
.word SPI3_IRQHandler /* SPI3 */
.word UART4_IRQHandler /* UART4 */
.word UART5_IRQHandler /* UART5 */
.word TIM6_DAC_IRQHandler /* TIM6 and DAC1&2 underrun errors */
.word TIM7_IRQHandler /* TIM7 */
.word DMA2_Stream0_IRQHandler /* DMA2 Stream 0 */
.word DMA2_Stream1_IRQHandler /* DMA2 Stream 1 */
.word DMA2_Stream2_IRQHandler /* DMA2 Stream 2 */
.word DMA2_Stream3_IRQHandler /* DMA2 Stream 3 */
.word DMA2_Stream4_IRQHandler /* DMA2 Stream 4 */
.word ETH_IRQHandler /* Ethernet */
.word ETH_WKUP_IRQHandler /* Ethernet Wakeup through EXTI line */
.word CAN2_TX_IRQHandler /* CAN2 TX */
.word CAN2_RX0_IRQHandler /* CAN2 RX0 */
.word CAN2_RX1_IRQHandler /* CAN2 RX1 */
.word CAN2_SCE_IRQHandler /* CAN2 SCE */
.word OTG_FS_IRQHandler /* USB OTG FS */
.word DMA2_Stream5_IRQHandler /* DMA2 Stream 5 */
.word DMA2_Stream6_IRQHandler /* DMA2 Stream 6 */
.word DMA2_Stream7_IRQHandler /* DMA2 Stream 7 */
.word USART6_IRQHandler /* USART6 */
.word I2C3_EV_IRQHandler /* I2C3 event */
.word I2C3_ER_IRQHandler /* I2C3 error */
.word OTG_HS_EP1_OUT_IRQHandler /* USB OTG HS End Point 1 Out */
.word OTG_HS_EP1_IN_IRQHandler /* USB OTG HS End Point 1 In */
.word OTG_HS_WKUP_IRQHandler /* USB OTG HS Wakeup through EXTI */
.word OTG_HS_IRQHandler /* USB OTG HS */
.word DCMI_IRQHandler /* DCMI */
.word CRYP_IRQHandler /* CRYP crypto */
.word HASH_RNG_IRQHandler /* Hash and Rng */
.word FPU_IRQHandler /* FPU */
/*******************************************************************************
*
* Provide weak aliases for each Exception handler to the Default_Handler.
* As they are weak aliases, any function with the same name will override
* this definition.
*
*******************************************************************************/
.weak NMI_Handler
.thumb_set NMI_Handler,Default_Handler
.weak HardFault_Handler
.thumb_set HardFault_Handler,Default_Handler
.weak MemManage_Handler
.thumb_set MemManage_Handler,Default_Handler
.weak BusFault_Handler
.thumb_set BusFault_Handler,Default_Handler
.weak UsageFault_Handler
.thumb_set UsageFault_Handler,Default_Handler
.weak SVC_Handler
.thumb_set SVC_Handler,Default_Handler
.weak DebugMon_Handler
.thumb_set DebugMon_Handler,Default_Handler
.weak PendSV_Handler
.thumb_set PendSV_Handler,Default_Handler
/*
* SysTick_Handler in stm32plus is now marked 'weak' so that compatibility with other
* frameworks is made possible.
.weak SysTick_Handler
.thumb_set SysTick_Handler,Default_Handler
*/
.weak WWDG_IRQHandler
.thumb_set WWDG_IRQHandler,Default_Handler
.weak PVD_IRQHandler
.thumb_set PVD_IRQHandler,Default_Handler
.weak TAMP_STAMP_IRQHandler
.thumb_set TAMP_STAMP_IRQHandler,Default_Handler
.weak RTC_WKUP_IRQHandler
.thumb_set RTC_WKUP_IRQHandler,Default_Handler
.weak FLASH_IRQHandler
.thumb_set FLASH_IRQHandler,Default_Handler
.weak RCC_IRQHandler
.thumb_set RCC_IRQHandler,Default_Handler
.weak EXTI0_IRQHandler
.thumb_set EXTI0_IRQHandler,Default_Handler
.weak EXTI1_IRQHandler
.thumb_set EXTI1_IRQHandler,Default_Handler
.weak EXTI2_IRQHandler
.thumb_set EXTI2_IRQHandler,Default_Handler
.weak EXTI3_IRQHandler
.thumb_set EXTI3_IRQHandler,Default_Handler
.weak EXTI4_IRQHandler
.thumb_set EXTI4_IRQHandler,Default_Handler
.weak DMA1_Stream0_IRQHandler
.thumb_set DMA1_Stream0_IRQHandler,Default_Handler
.weak DMA1_Stream1_IRQHandler
.thumb_set DMA1_Stream1_IRQHandler,Default_Handler
.weak DMA1_Stream2_IRQHandler
.thumb_set DMA1_Stream2_IRQHandler,Default_Handler
.weak DMA1_Stream3_IRQHandler
.thumb_set DMA1_Stream3_IRQHandler,Default_Handler
.weak DMA1_Stream4_IRQHandler
.thumb_set DMA1_Stream4_IRQHandler,Default_Handler
.weak DMA1_Stream5_IRQHandler
.thumb_set DMA1_Stream5_IRQHandler,Default_Handler
.weak DMA1_Stream6_IRQHandler
.thumb_set DMA1_Stream6_IRQHandler,Default_Handler
.weak ADC_IRQHandler
.thumb_set ADC_IRQHandler,Default_Handler
.weak CAN1_TX_IRQHandler
.thumb_set CAN1_TX_IRQHandler,Default_Handler
.weak CAN1_RX0_IRQHandler
.thumb_set CAN1_RX0_IRQHandler,Default_Handler
.weak CAN1_RX1_IRQHandler
.thumb_set CAN1_RX1_IRQHandler,Default_Handler
.weak CAN1_SCE_IRQHandler
.thumb_set CAN1_SCE_IRQHandler,Default_Handler
.weak EXTI9_5_IRQHandler
.thumb_set EXTI9_5_IRQHandler,Default_Handler
.weak TIM1_BRK_TIM9_IRQHandler
.thumb_set TIM1_BRK_TIM9_IRQHandler,Default_Handler
.weak TIM1_UP_TIM10_IRQHandler
.thumb_set TIM1_UP_TIM10_IRQHandler,Default_Handler
.weak TIM1_TRG_COM_TIM11_IRQHandler
.thumb_set TIM1_TRG_COM_TIM11_IRQHandler,Default_Handler
.weak TIM1_CC_IRQHandler
.thumb_set TIM1_CC_IRQHandler,Default_Handler
.weak TIM2_IRQHandler
.thumb_set TIM2_IRQHandler,Default_Handler
.weak TIM3_IRQHandler
.thumb_set TIM3_IRQHandler,Default_Handler
.weak TIM4_IRQHandler
.thumb_set TIM4_IRQHandler,Default_Handler
.weak I2C1_EV_IRQHandler
.thumb_set I2C1_EV_IRQHandler,Default_Handler
.weak I2C1_ER_IRQHandler
.thumb_set I2C1_ER_IRQHandler,Default_Handler
.weak I2C2_EV_IRQHandler
.thumb_set I2C2_EV_IRQHandler,Default_Handler
.weak I2C2_ER_IRQHandler
.thumb_set I2C2_ER_IRQHandler,Default_Handler
.weak SPI1_IRQHandler
.thumb_set SPI1_IRQHandler,Default_Handler
.weak SPI2_IRQHandler
.thumb_set SPI2_IRQHandler,Default_Handler
.weak USART1_IRQHandler
.thumb_set USART1_IRQHandler,Default_Handler
.weak USART2_IRQHandler
.thumb_set USART2_IRQHandler,Default_Handler
.weak USART3_IRQHandler
.thumb_set USART3_IRQHandler,Default_Handler
.weak EXTI15_10_IRQHandler
.thumb_set EXTI15_10_IRQHandler,Default_Handler
.weak RTC_Alarm_IRQHandler
.thumb_set RTC_Alarm_IRQHandler,Default_Handler
.weak OTG_FS_WKUP_IRQHandler
.thumb_set OTG_FS_WKUP_IRQHandler,Default_Handler
.weak TIM8_BRK_TIM12_IRQHandler
.thumb_set TIM8_BRK_TIM12_IRQHandler,Default_Handler
.weak TIM8_UP_TIM13_IRQHandler
.thumb_set TIM8_UP_TIM13_IRQHandler,Default_Handler
.weak TIM8_TRG_COM_TIM14_IRQHandler
.thumb_set TIM8_TRG_COM_TIM14_IRQHandler,Default_Handler
.weak TIM8_CC_IRQHandler
.thumb_set TIM8_CC_IRQHandler,Default_Handler
.weak DMA1_Stream7_IRQHandler
.thumb_set DMA1_Stream7_IRQHandler,Default_Handler
.weak FSMC_IRQHandler
.thumb_set FSMC_IRQHandler,Default_Handler
.weak SDIO_IRQHandler
.thumb_set SDIO_IRQHandler,Default_Handler
.weak TIM5_IRQHandler
.thumb_set TIM5_IRQHandler,Default_Handler
.weak SPI3_IRQHandler
.thumb_set SPI3_IRQHandler,Default_Handler
.weak UART4_IRQHandler
.thumb_set UART4_IRQHandler,Default_Handler
.weak UART5_IRQHandler
.thumb_set UART5_IRQHandler,Default_Handler
.weak TIM6_DAC_IRQHandler
.thumb_set TIM6_DAC_IRQHandler,Default_Handler
.weak TIM7_IRQHandler
.thumb_set TIM7_IRQHandler,Default_Handler
.weak DMA2_Stream0_IRQHandler
.thumb_set DMA2_Stream0_IRQHandler,Default_Handler
.weak DMA2_Stream1_IRQHandler
.thumb_set DMA2_Stream1_IRQHandler,Default_Handler
.weak DMA2_Stream2_IRQHandler
.thumb_set DMA2_Stream2_IRQHandler,Default_Handler
.weak DMA2_Stream3_IRQHandler
.thumb_set DMA2_Stream3_IRQHandler,Default_Handler
.weak DMA2_Stream4_IRQHandler
.thumb_set DMA2_Stream4_IRQHandler,Default_Handler
.weak ETH_IRQHandler
.thumb_set ETH_IRQHandler,Default_Handler
.weak ETH_WKUP_IRQHandler
.thumb_set ETH_WKUP_IRQHandler,Default_Handler
.weak CAN2_TX_IRQHandler
.thumb_set CAN2_TX_IRQHandler,Default_Handler
.weak CAN2_RX0_IRQHandler
.thumb_set CAN2_RX0_IRQHandler,Default_Handler
.weak CAN2_RX1_IRQHandler
.thumb_set CAN2_RX1_IRQHandler,Default_Handler
.weak CAN2_SCE_IRQHandler
.thumb_set CAN2_SCE_IRQHandler,Default_Handler
.weak OTG_FS_IRQHandler
.thumb_set OTG_FS_IRQHandler,Default_Handler
.weak DMA2_Stream5_IRQHandler
.thumb_set DMA2_Stream5_IRQHandler,Default_Handler
.weak DMA2_Stream6_IRQHandler
.thumb_set DMA2_Stream6_IRQHandler,Default_Handler
.weak DMA2_Stream7_IRQHandler
.thumb_set DMA2_Stream7_IRQHandler,Default_Handler
.weak USART6_IRQHandler
.thumb_set USART6_IRQHandler,Default_Handler
.weak I2C3_EV_IRQHandler
.thumb_set I2C3_EV_IRQHandler,Default_Handler
.weak I2C3_ER_IRQHandler
.thumb_set I2C3_ER_IRQHandler,Default_Handler
.weak OTG_HS_EP1_OUT_IRQHandler
.thumb_set OTG_HS_EP1_OUT_IRQHandler,Default_Handler
.weak OTG_HS_EP1_IN_IRQHandler
.thumb_set OTG_HS_EP1_IN_IRQHandler,Default_Handler
.weak OTG_HS_WKUP_IRQHandler
.thumb_set OTG_HS_WKUP_IRQHandler,Default_Handler
.weak OTG_HS_IRQHandler
.thumb_set OTG_HS_IRQHandler,Default_Handler
.weak DCMI_IRQHandler
.thumb_set DCMI_IRQHandler,Default_Handler
.weak CRYP_IRQHandler
.thumb_set CRYP_IRQHandler,Default_Handler
.weak HASH_RNG_IRQHandler
.thumb_set HASH_RNG_IRQHandler,Default_Handler
.weak FPU_IRQHandler
.thumb_set FPU_IRQHandler,Default_Handler
/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
|
mat/src/mat-readers-streams.adb | stcarrez/mat | 7 | 9467 | <reponame>stcarrez/mat
-----------------------------------------------------------------------
-- mat-readers-streams -- Reader for streams
-- Copyright (C) 2014, 2015 <NAME>
-- Written by <NAME> (<EMAIL>)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with Ada.Streams;
with Ada.IO_Exceptions;
with Util.Log.Loggers;
with MAT.Types;
with MAT.Readers.Marshaller;
package body MAT.Readers.Streams is
-- The logger
Log : constant Util.Log.Loggers.Logger := Util.Log.Loggers.Create ("MAT.Readers.Files");
MAX_MSG_SIZE : constant Ada.Streams.Stream_Element_Offset := 4096;
-- ------------------------------
-- Read a message from the stream.
-- ------------------------------
overriding
procedure Read_Message (Reader : in out Stream_Reader_Type;
Msg : in out Message_Type) is
use type Ada.Streams.Stream_Element_Offset;
Buffer : constant Util.Streams.Buffered.Buffer_Access := Msg.Buffer.Buffer;
Last : Ada.Streams.Stream_Element_Offset;
begin
Reader.Stream.Read (Buffer (0 .. 1), Last);
if Last /= 2 then
raise Ada.IO_Exceptions.End_Error;
end if;
Msg.Buffer.Size := 2;
Msg.Buffer.Current := Msg.Buffer.Start;
Msg.Size := Natural (MAT.Readers.Marshaller.Get_Uint16 (Msg.Buffer));
if Msg.Size < 2 then
Log.Error ("Invalid message size {0}", Natural'Image (Msg.Size));
end if;
if Ada.Streams.Stream_Element_Offset (Msg.Size) >= Buffer'Last then
Log.Error ("Message size {0} is too big", Natural'Image (Msg.Size));
raise Ada.IO_Exceptions.Data_Error;
end if;
Reader.Stream.Read (Buffer (0 .. Ada.Streams.Stream_Element_Offset (Msg.Size - 1)), Last);
Msg.Buffer.Current := Msg.Buffer.Start;
Msg.Buffer.Last := Buffer (Last)'Address;
Msg.Buffer.Size := Msg.Size;
Log.Debug ("Read message size {0}", Natural'Image (Msg.Size));
end Read_Message;
-- ------------------------------
-- Read the events from the stream and stop when the end of the stream is reached.
-- ------------------------------
procedure Read_All (Reader : in out Stream_Reader_Type) is
use Ada.Streams;
use type MAT.Types.Uint8;
Buffer : aliased Buffer_Type;
Msg : Message;
Last : Ada.Streams.Stream_Element_Offset;
Format : MAT.Types.Uint8;
begin
Reader.Data := new Ada.Streams.Stream_Element_Array (0 .. MAX_MSG_SIZE);
Msg.Buffer := Buffer'Unchecked_Access;
Msg.Buffer.Start := Reader.Data (0)'Address;
Msg.Buffer.Current := Msg.Buffer.Start;
Msg.Buffer.Last := Reader.Data (MAX_MSG_SIZE)'Address;
Msg.Buffer.Size := 1;
Buffer.Buffer := Reader.Data;
Reader.Stream.Read (Reader.Data (0 .. 0), Last);
Format := MAT.Readers.Marshaller.Get_Uint8 (Msg.Buffer);
if Format = 0 then
Msg.Buffer.Endian := LITTLE_ENDIAN;
Log.Debug ("Data stream is little endian");
else
Msg.Buffer.Endian := BIG_ENDIAN;
Log.Debug ("Data stream is big endian");
end if;
Reader.Read_Message (Msg);
Reader.Read_Event_Definitions (Msg);
while not Reader.Stream.Is_Eof loop
Reader.Read_Message (Msg);
Reader.Dispatch_Message (Msg);
end loop;
exception
when Ada.IO_Exceptions.End_Error =>
null;
end Read_All;
end MAT.Readers.Streams;
|
programs/oeis/095/A095340.asm | neoneye/loda | 22 | 7018 | <reponame>neoneye/loda
; A095340: Total number of nodes in all labeled graphs on n nodes.
; 1,4,24,256,5120,196608,14680064,2147483648,618475290624,351843720888320,396316767208603648,885443715538058477568,3929008913747544817795072,34662321099990647697175478272,608472288109550112718417538580480
add $0,1
mov $1,$0
mov $2,$0
sub $2,$0
add $2,1
lpb $1
mul $0,$2
sub $1,1
mul $2,2
lpe
|
_incObj/13 Lava Ball Maker.asm | kodishmediacenter/msu-md-sonic | 9 | 99122 | <filename>_incObj/13 Lava Ball Maker.asm
; ---------------------------------------------------------------------------
; Object 13 - lava ball maker (MZ, SLZ)
; ---------------------------------------------------------------------------
LavaMaker:
moveq #0,d0
move.b obRoutine(a0),d0
move.w LavaM_Index(pc,d0.w),d1
jsr LavaM_Index(pc,d1.w)
bra.w LBall_ChkDel
; ===========================================================================
LavaM_Index: dc.w LavaM_Main-LavaM_Index
dc.w LavaM_MakeLava-LavaM_Index
; ---------------------------------------------------------------------------
;
; Lava ball production rates
;
LavaM_Rates: dc.b 30, 60, 90, 120, 150, 180
; ===========================================================================
LavaM_Main: ; Routine 0
addq.b #2,obRoutine(a0)
move.b obSubtype(a0),d0
lsr.w #4,d0
andi.w #$F,d0
move.b LavaM_Rates(pc,d0.w),obDelayAni(a0)
move.b obDelayAni(a0),obTimeFrame(a0) ; set time delay for lava balls
andi.b #$F,obSubtype(a0)
LavaM_MakeLava: ; Routine 2
subq.b #1,obTimeFrame(a0) ; subtract 1 from time delay
bne.s LavaM_Wait ; if time still remains, branch
move.b obDelayAni(a0),obTimeFrame(a0) ; reset time delay
bsr.w ChkObjectVisible
bne.s LavaM_Wait
bsr.w FindFreeObj
bne.s LavaM_Wait
move.b #id_LavaBall,0(a1) ; load lava ball object
move.w obX(a0),obX(a1)
move.w obY(a0),obY(a1)
move.b obSubtype(a0),obSubtype(a1)
LavaM_Wait:
rts |
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0x48.log_21829_2805.asm | ljhsiun2/medusa | 9 | 102583 | <reponame>ljhsiun2/medusa<gh_stars>1-10
.global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r9
push %rax
push %rbp
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WT_ht+0x808e, %r9
nop
nop
dec %rax
movb $0x61, (%r9)
and %rdx, %rdx
lea addresses_normal_ht+0xc61c, %r11
nop
nop
nop
nop
nop
and %r9, %r9
movl $0x61626364, (%r11)
nop
nop
nop
xor %rdx, %rdx
lea addresses_WC_ht+0x1643c, %rsi
lea addresses_WT_ht+0x17afc, %rdi
nop
nop
nop
nop
nop
dec %rbp
mov $48, %rcx
rep movsw
nop
nop
nop
nop
nop
dec %rdx
lea addresses_WT_ht+0x84fc, %rsi
lea addresses_normal_ht+0x14efc, %rdi
nop
add %rbp, %rbp
mov $103, %rcx
rep movsb
add %r11, %r11
lea addresses_WC_ht+0x156fc, %rcx
nop
cmp $40012, %rsi
movb $0x61, (%rcx)
nop
nop
nop
nop
dec %rsi
lea addresses_D_ht+0x1b5fc, %r9
nop
nop
nop
nop
cmp %rax, %rax
movups (%r9), %xmm6
vpextrq $1, %xmm6, %rsi
dec %rdi
lea addresses_A_ht+0x4d7c, %rdi
add $3528, %rbp
and $0xffffffffffffffc0, %rdi
movntdqa (%rdi), %xmm6
vpextrq $1, %xmm6, %rdx
dec %rbp
lea addresses_normal_ht+0x1cc28, %rsi
lea addresses_A_ht+0x7efc, %rdi
nop
nop
nop
xor %r11, %r11
mov $10, %rcx
rep movsq
nop
nop
nop
nop
nop
add %rax, %rax
lea addresses_A_ht+0x151ec, %rsi
lea addresses_A_ht+0x1b6fc, %rdi
nop
nop
and %r9, %r9
mov $49, %rcx
rep movsq
nop
nop
add %rdi, %rdi
lea addresses_WC_ht+0x16834, %r9
nop
inc %rcx
mov (%r9), %bp
nop
nop
nop
nop
and $53496, %rcx
lea addresses_WT_ht+0x138fc, %rsi
lea addresses_A_ht+0x162e6, %rdi
sub $39947, %rdx
mov $81, %rcx
rep movsq
nop
dec %rdi
lea addresses_D_ht+0x17cdc, %rsi
lea addresses_UC_ht+0xad46, %rdi
clflush (%rdi)
nop
nop
cmp $45854, %r11
mov $58, %rcx
rep movsw
nop
nop
nop
nop
nop
sub $3647, %rbp
lea addresses_WC_ht+0x547c, %r9
dec %r11
mov $0x6162636465666768, %rax
movq %rax, %xmm5
vmovups %ymm5, (%r9)
nop
nop
cmp $39861, %rsi
lea addresses_WC_ht+0x1bafc, %rsi
lea addresses_WC_ht+0xb8b9, %rdi
nop
nop
nop
and $20611, %rax
mov $0, %rcx
rep movsq
nop
nop
sub %rsi, %rsi
lea addresses_WC_ht+0x26a7, %r11
clflush (%r11)
nop
nop
nop
nop
nop
sub %r9, %r9
mov $0x6162636465666768, %rcx
movq %rcx, %xmm7
vmovups %ymm7, (%r11)
nop
add %rax, %rax
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r9
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r13
push %r8
push %r9
push %rax
push %rbx
push %rdx
// Store
lea addresses_WC+0xc9fc, %r9
clflush (%r9)
nop
nop
nop
xor $11313, %rax
mov $0x5152535455565758, %r8
movq %r8, %xmm6
vmovups %ymm6, (%r9)
nop
nop
xor $25572, %rax
// Store
lea addresses_US+0x1ee7c, %rax
nop
nop
nop
nop
nop
add $12829, %r12
mov $0x5152535455565758, %r13
movq %r13, %xmm0
movups %xmm0, (%rax)
nop
nop
nop
nop
xor $20577, %rdx
// Faulty Load
lea addresses_UC+0x1e6fc, %rdx
nop
nop
xor %rbx, %rbx
mov (%rdx), %r12w
lea oracles, %rbx
and $0xff, %r12
shlq $12, %r12
mov (%rbx,%r12,1), %r12
pop %rdx
pop %rbx
pop %rax
pop %r9
pop %r8
pop %r13
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_UC', 'AVXalign': False, 'congruent': 0, 'size': 16, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'AVXalign': False, 'congruent': 5, 'size': 32, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_US', 'AVXalign': False, 'congruent': 6, 'size': 16, 'same': False, 'NT': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_UC', 'AVXalign': False, 'congruent': 0, 'size': 2, 'same': True, 'NT': False}}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 0, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 5, 'size': 4, 'same': False, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 8, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 11, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 10, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 6, 'size': 16, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 7, 'size': 16, 'same': False, 'NT': True}}
{'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 11, 'same': True}}
{'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 4, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 11, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 2, 'size': 2, 'same': False, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 1, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 4, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 1, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 0, 'size': 32, 'same': False, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 0, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 0, 'size': 32, 'same': False, 'NT': False}}
{'00': 21829}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
|
couchmobile-old-couch/firmware code/int-rc.X/tcpip/TCPIP Stack/BigInt_helper.asm | CouchmobileUNSW/couchmobile-electrical | 2 | 103980 | <reponame>CouchmobileUNSW/couchmobile-electrical
; *********************************************************************
; *
; * Big Integer Assembly Helpers
; * Library for Microchip TCP/IP Stack
; * - Accelerates processing for BigInt functions
; *
; *********************************************************************
; * FileName: BigInt_helper.asm
; * Dependencies: None
; * Processor: PIC18
; * Compiler: Microchip C18 v3.30 or higher
; * Company: Microchip Technology, Inc.
; *
; * Software License Agreement
; *
; * Copyright (C) 2002-2009 Microchip Technology Inc. All rights
; * reserved.
; *
; * Microchip licenses to you the right to use, modify, copy, and
; * distribute:
; * (i) the Software when embedded on a Microchip microcontroller or
; * digital signal controller product ("Device") which is
; * integrated into Licensee's product; or
; * (ii) ONLY the Software driver source files ENC28J60.c, ENC28J60.h,
; * ENCX24J600.c and ENCX24J600.h ported to a non-Microchip device
; * used in conjunction with a Microchip ethernet controller for
; * the sole purpose of interfacing with the ethernet controller.
; *
; * You should refer to the license agreement accompanying this
; * Software for additional information regarding your rights and
; * obligations.
; *
; * THE SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT
; * WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT
; * LIMITATION, ANY WARRANTY OF MERCHANTABILITY, FITNESS FOR A
; * PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL
; * MICROCHIP BE LIABLE FOR ANY INCIDENTAL, SPECIAL, INDIRECT OR
; * CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF
; * PROCUREMENT OF SUBSTITUTE GOODS, TECHNOLOGY OR SERVICES, ANY CLAIMS
; * BY THIRD PARTIES (INCLUDING BUT NOT LIMITED TO ANY DEFENSE
; * THEREOF), ANY CLAIMS FOR INDEMNITY OR CONTRIBUTION, OR OTHER
; * SIMILAR COSTS, WHETHER ASSERTED ON THE BASIS OF CONTRACT, TORT
; * (INCLUDING NEGLIGENCE), BREACH OF WARRANTY, OR OTHERWISE.
; *
; *
; * Author Date Comment
; *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
; * <NAME> 06/20/07 Original
; * <NAME> 11/15/07 Converted to little endian
; ********************************************************************/
BIGINT_VARS udata
global _iA
global _iB
global _iBr ; when B is a ROM pointer
global _iR
global _xA
global _xB
global _xBr ; when B is a ROM pointer
global _wC
_iA res 2 ;*_iA, starting pointer for A (low address)
_xA res 2 ;*_xA, end pointer for A (high address)
_iB res 2 ;*_iB, starting pointer for B (low address)
_xB res 2 ;*_xB, end pointer for B (high address)
_iBr res 3 ;*_iBr, starting pointer for B in ROM (low address)
_xBr res 3 ;*_xBr, end pointer for B in ROM (high address)
_iR res 2 ;*_iR, starting pointer for multiplication Result (low address)
_wC res 1 ;Value of C for _masBI (scalar) and _mul (temp storage)
CarryByte res 1 ;Value of carry for _mul and _sqr (scalar)
CarryH res 1 ;High value of carry for _sqr (scalar)
BIGINT_CODE code
#include p18cxxx.inc
#include P18MACRO.INC
;***************************************************************************
; Function: void _addBI()
;
; PreCondition: _iA and _iB are loaded with the LSB of each BigInt
; _xA and _xB are loaded with the MSB of each BigInt
; A.size >= B.magnitude
; A and B must both be 2048 bits or less (256 bytes)
;
; Input: A and B, the BigInts to add
;
; Output: A = A + B
;
; Side Effects: None
;
; Stack Req: 2 bytes
;
; Overview: Quickly performs the bulk addition of two BigInts
;***************************************************************************
GLOBAL _addBI
_addBI:
Stk2PushFromReg FSR2L ;Save FSR2 on the stack
banksel _xA ;select the assembly pointer bank
movff _iA+0x0,FSR0L ;Put iA in FSR0
movff _iA+0x1,FSR0H
movff _iB+0x0,FSR2L ;Put iB in FSR2
movff _iB+0x1,FSR2H
; Predecrement A and B pointers
movf POSTDEC0, W
movf POSTDEC2, W
; Calculate how many adds are needed divided by 8, store count in
; PRODH
; Note: This assumes there are no more than 256 adds to do
decf _iB+0x0, W
subwf _xB+0x0, W
andlw 0xF8
movwf PRODH
swapf PRODH, F
rlncf PRODH, F
incf PRODH, F ; Preincrement so we can start the loop with a decrement
clrf PRODL ; Start out with no carry
bra aTest8Add
; Add 8 bytes of B into A at a time. Doing it in such large
; chunks saves loop and branch overhead
aDo8Add:
rrcf PRODL, F ; Load carry in value
movf PREINC2, W
addwfc PREINC0, F
movf PREINC2, W
addwfc PREINC0, F
movf PREINC2, W
addwfc PREINC0, F
movf PREINC2, W
addwfc PREINC0, F
movf PREINC2, W
addwfc PREINC0, F
movf PREINC2, W
addwfc PREINC0, F
movf PREINC2, W
addwfc PREINC0, F
movf PREINC2, W
addwfc PREINC0, F
rlcf PRODL, F ; Save carry out value
aTest8Add:
decf PRODH, F
bnz aDo8Add
rrcf PRODL, F ; Load carry in value
bra aTestResidualAdd
; Add up to 7 bytes of B into A, one byte at a time.
aDoResidualAdd:
movf PREINC2, W
addwfc PREINC0, F
aTestResidualAdd:
movf FSR2L, W
xorwf _xB+0x0, W
bnz aDoResidualAdd
; Carry forward the carry out (in A) if needed
bnc aDone
aDoFinalCarry:
movf FSR0L, W
xorwf _xA+0x0, W
bz aDone
incf PREINC0, F
bc aDoFinalCarry
aDone:
Stk2PopToReg FSR2L ;restore FSR2 from stack
return
;***************************************************************************
; Function: void _addBIROM()
;
; PreCondition: _iA and _iBr are loaded with the LSB of each BigInt
; _xA and _xBr are loaded with the MSB of each BigInt
; A.size >= B.magnitude
; A and B must both be 2048 bits or less (256 bytes)
;
; Input: A: a BigInt in RAM
; B: a BigInt in ROM
;
; Output: A = A + B
;
; Side Effects: Overwrites TBLPTRU:TBLPTRH:TBLPTRL registers
;
; Stack Req: 0 bytes
;
; Overview: Quickly performs the bulk addition of two BigInts
;***************************************************************************
GLOBAL _addBIROM
_addBIROM:
banksel _xA ;Select the assembly pointer bank
movff _iA+0x0,FSR0L ;Put iA in FSR0
movff _iA+0x1,FSR0H
movff _iBr+0x0,TBLPTRL ;Put iB in TBLPTR
movff _iBr+0x1,TBLPTRH
movff _iBr+0x2,TBLPTRU
; Predecrement A and B pointers
movf POSTDEC0, W
tblrd*-
; Calculate how many adds are needed divided by 8, store count in
; PRODH
; Note: This assumes there are no more than 256 adds to do
decf _iBr+0x0, W
subwf _xBr+0x0, W
andlw 0xF8
movwf PRODH
swapf PRODH, F
rlncf PRODH, F
incf PRODH, F ; Preincrement so we can start the loop with a decrement
clrf PRODL ; Start out with no carry
bra aRTest8Add
; Add 8 bytes of B into A at a time. Doing it in such large
; chunks saves loop and branch overhead
aRDo8Add:
rrcf PRODL, F ; Load carry in value
tblrd+*
movf TABLAT, W
addwfc PREINC0, F
tblrd+*
movf TABLAT, W
addwfc PREINC0, F
tblrd+*
movf TABLAT, W
addwfc PREINC0, F
tblrd+*
movf TABLAT, W
addwfc PREINC0, F
tblrd+*
movf TABLAT, W
addwfc PREINC0, F
tblrd+*
movf TABLAT, W
addwfc PREINC0, F
tblrd+*
movf TABLAT, W
addwfc PREINC0, F
tblrd+*
movf TABLAT, W
addwfc PREINC0, F
rlcf PRODL, F ; Save carry out value
aRTest8Add:
decf PRODH, F
bnz aRDo8Add
rrcf PRODL, F ; Load carry in value
bra aRTestResidualAdd
; Add up to 7 bytes of B into A, one byte at a time.
aRDoResidualAdd:
tblrd+*
movf TABLAT, W
addwfc PREINC0, F
aRTestResidualAdd:
movf TBLPTRL, W
xorwf _xBr+0x0, W
bnz aRDoResidualAdd
; Carry forward the carry out (in A) if needed
bnc aRDone
aRDoFinalCarry:
movf FSR0L, W
xorwf _xA+0x0, W
bz aRDone
incf PREINC0, F
bc aRDoFinalCarry
aRDone:
return
;***************************************************************************
; Function: void _subBI()
;
; PreCondition: _iA and _iB are loaded with the LSB of each BigInt
; _xA and _xB are loaded with the MSB of each BigInt
; A.size >= B.magnitude
; A and B must both be 2048 bits or less (256 bytes)
;
; Input: A and B, the BigInts to subtract
;
; Output: A = A - B
;
; Side Effects: None
;
; Stack Req: 2 bytes
;
; Overview: Quickly performs the bulk subtraction of two BigInts
;***************************************************************************
GLOBAL _subBI
_subBI:
Stk2PushFromReg FSR2L ;Save FSR2 on the stack
banksel _xA ;select the assembly pointer bank
movff _iA+0x0,FSR0L ;Put iA in FSR0
movff _iA+0x1,FSR0H
movff _iB+0x0,FSR2L ;Put iB in FSR2
movff _iB+0x1,FSR2H
; Predecrement A and B pointers
movf POSTDEC0, W
movf POSTDEC2, W
; Calculate how many subtracts are needed divided by 8, store
; count in PRODH
; Note: This assumes there are no more than 256 subtracts to do
decf _iB+0x0, W
subwf _xB+0x0, W
andlw 0xF8
movwf PRODH
swapf PRODH, F
rlncf PRODH, F
incf PRODH, F ; Preincrement so we can start the loop with a decrement
setf PRODL ; Start out with no borrow
bra sTest8Subtract
; Add 8 bytes of B into A at a time. Doing it in such large
; chunks saves loop and branch overhead
sDo8Subtract:
rrcf PRODL, F ; Load borrow in value
movf PREINC2, W
subwfb PREINC0, F
movf PREINC2, W
subwfb PREINC0, F
movf PREINC2, W
subwfb PREINC0, F
movf PREINC2, W
subwfb PREINC0, F
movf PREINC2, W
subwfb PREINC0, F
movf PREINC2, W
subwfb PREINC0, F
movf PREINC2, W
subwfb PREINC0, F
movf PREINC2, W
subwfb PREINC0, F
rlcf PRODL, F ; Save borrow out value
sTest8Subtract:
decf PRODH, F
bnz sDo8Subtract
rrcf PRODL, F ; Load borrow in value
bra sTestResidualSubtract
; Subtract up to 7 bytes of B from A, one byte at a time.
sDoResidualSubtract:
movf PREINC2, W
subwfb PREINC0, F
sTestResidualSubtract:
movf FSR2L, W
xorwf _xB+0x0, W
bnz sDoResidualSubtract
; Carry forward the borrow out (in A) if needed
bc sDone
sDoFinalCarry:
movf FSR0L, W
xorwf _xA+0x0, W
bz sDone
decf PREINC0, F
bnc sDoFinalCarry
sDone:
Stk2PopToReg FSR2L ;restore FSR2 from stack
return
;***************************************************************************
; Function: void _subBIROM()
;
; PreCondition: _iA and _iBr are loaded with the LSB of each BigInt
; _xA and _xBr are loaded with the MSB of each BigInt
; A.size >= B.magnitude
; A and B must both be 2048 bits or less (256 bytes)
;
; Input: A: a BigInt in RAM
; B: a BigInt in ROM
;
; Output: A = A - B
;
; Side Effects: Overwrites TBLPTRU:TBLPTRH:TBLPTRL registers
;
; Stack Req: None
;
; Overview: Quickly performs the bulk subtraction of two BigInts
;***************************************************************************
GLOBAL _subBIROM
_subBIROM:
banksel _xA ;Select the assembly pointer bank
movff _iA+0x0,FSR0L ;Put iA in FSR0
movff _iA+0x1,FSR0H
movff _iBr+0x0,TBLPTRL ;Put iB in TBLPTR
movff _iBr+0x1,TBLPTRH
movff _iBr+0x2,TBLPTRU
; Predecrement A and B pointers
movf POSTDEC0, W
tblrd*-
; Calculate how many adds are needed divided by 8, store count in
; PRODH
; Note: This assumes there are no more than 256 adds to do
decf _iBr+0x0, W
subwf _xBr+0x0, W
andlw 0xF8
movwf PRODH
swapf PRODH, F
rlncf PRODH, F
incf PRODH, F ; Preincrement so we can start the loop with a decrement
setf PRODL ; Start out with no borrow
bra sRTest8Subtract
; Subtract 8 bytes of B from A at a time. Doing it in such large
; chunks saves loop and branch overhead
sRDo8Subtract:
rrcf PRODL, F ; Load borrow in value
tblrd+*
movf TABLAT, W
subwfb PREINC0, F
tblrd+*
movf TABLAT, W
subwfb PREINC0, F
tblrd+*
movf TABLAT, W
subwfb PREINC0, F
tblrd+*
movf TABLAT, W
subwfb PREINC0, F
tblrd+*
movf TABLAT, W
subwfb PREINC0, F
tblrd+*
movf TABLAT, W
subwfb PREINC0, F
tblrd+*
movf TABLAT, W
subwfb PREINC0, F
tblrd+*
movf TABLAT, W
subwfb PREINC0, F
rlcf PRODL, F ; Save borrow out value
sRTest8Subtract:
decf PRODH, F
bnz sRDo8Subtract
rrcf PRODL, F ; Load borrow in value
bra sRTestResidualSubtract
; Subtract up to 7 bytes of B from A, one byte at a time.
sRDoResidualSubtract:
tblrd+*
movf TABLAT, W
subwfb PREINC0, F
sRTestResidualSubtract:
movf TBLPTRL, W
xorwf _xBr+0x0, W
bnz sRDoResidualSubtract
; Carry forward the borrow out (in A) if needed
bc sRDone
sRDoFinalCarry:
movf FSR0L, W
xorwf _xA+0x0, W
bz sRDone
incf PREINC0, F
bnc sRDoFinalCarry
sRDone:
return
;***************************************************************************
; Function: void _zeroBI()
;
; PreCondition: _iA is loaded with the LSB of the BigInt
; _xA is loaded with the MSB the BigInt
;
; Input: A: a BigInt
;
; Output: A = 0
;
; Side Effects: None
;
; Stack Req: None
;
; Overview: Sets all bytes from _iA to _xA to zero
;***************************************************************************
GLOBAL _zeroBI
_zeroBI:
banksel _xA ;select the assembly pointer bank
movff _iA+0x0,FSR0L ;Put iA-1 in FSR0
movff _iA+0x1,FSR0H
movf POSTDEC0, W
zLoop:
clrf PREINC0 ;set byte to zero
movf FSR0L,W ;check if A is at MSB
xorwf _xA+0x0,W ;test low byte first
bnz zLoop ;add to A, and continue
movf FSR0H,W ;check high byte
xorwf _xA+0x1,W ;
bnz zLoop ;if A is not at MSB, we're not done
return
;***************************************************************************
; Function: void _msbBI()
;
; PreCondition: _iA is loaded with the address of the LSB of the BigInt buffer
; _xA is loaded with the address of the right most byte of the BigInt buffer
;
; Input: None
;
; Output: _xA is now pointing to the MSB of the BigInt
;
; Side Effects: None
;
; Overview: Finds the MSB (first non-zero word) of the BigInt, starting
; from the right-most word and testing to the left. This
; function will stop if _iA is reached.
;***************************************************************************
GLOBAL _msbBI
_msbBI:
banksel _xA ; Select the correct bank
movff _xA+0x0,FSR0L ; Put xA in FSR0
movff _xA+0x1,FSR0H
msbLoop:
movf FSR0L, W
subwf _iA+0x0, W
bz msbFound
movf POSTDEC0, W ; load the next value
bz msbLoop ; if value isn't zero, this is the MSB
movf PREINC0, W ; Correct the pointer's last decrement
; Copy FSR0 back to _xA and return
msbFound:
movff FSR0L,_xA+0x0 ; Move FSR0 back to iA
movff FSR0H,_xA+0x1
return
;***************************************************************************
; Function: void _mulBI()
;
; PreCondition: _iA and _iB are loaded with the LSB of each BigInt
; _xA and _xB are loaded with the MSB of each BigInt
; _iR is the LSB of the accumulator BigInt
; _iR is zeroed, and has enough space
; A and B must both by 2048 bits or less (256 bytes max)
;
; Input: A and B, the BigInts to multiply
;
; Output: R = A * B
;
; Side Effects: None
;
; Stack Req: 2 bytes
;
; Overview: Performs the bulk multiplication of two BigInts
;***************************************************************************
GLOBAL _mulBI
_mulBI:
Stk2PushFromReg FSR2L ;Save FSR2 on the stack
banksel _xA ;select the assembly pointer bank
; Predecrement B and R pointers
clrf WREG
decf _iB+0x0, F
subwfb _iB+0x1, F
decf _iR+0x0, F
subwfb _iR+0x1, F
mLoadB:
; Load B pointer to FSR2 and increment B pointer
; Increment iR to match the new starting position
; Fetch new B value
movff _iB+0x0, FSR2L
movff _iB+0x1, FSR2H
clrf WREG
mLoadBAgain:
incf _iB+0x0, F
addwfc _iB+0x1, F
incf _iR+0x0, F
addwfc _iR+0x1, F
movf PREINC2, W
bz mLoadBAgain ; No need to multiply this byte if it is zero
movwf _wC
; Restore iA start pointer in FSR0
movff _iA+0x0, FSR0L
movff _iA+0x1, FSR0H
; Store new iR start pointer in FSR2
movff _iR+0x0, FSR2L
movff _iR+0x1, FSR2H
; Clear carry byte
clrf CarryByte
mLoopA:
movf CarryByte, W ;load carry byte
addwf INDF2, F ;add to accumulator
clrf CarryByte ;clear carry byte
rlcf CarryByte, F ;if a carry occurred, save to CarryByte
movf _wC, W ;load wC
mulwf POSTINC0 ;calculate wC * A[iA++]
movf PRODL,W ;load low result byte
addwf POSTINC2, F ;add to accumulator, and move ptr
movf PRODH,W ;load high result byte
addwfc CarryByte, F ;add to carry byte, along with
; any carry from previous addition
; See if A loop is done
decf FSR0L, W
xorwf _xA+0x0, W
bnz mLoopA
; If A loop is done, finish out the carrying
movff CarryByte, INDF2 ;save carry byte (always adding to zero)
; See if B loop is done
movf _xB+0x0, W
xorwf _iB+0x0, W
bnz mLoadB
mDone:
Stk2PopToReg FSR2L ;restore old FSR2
return
;***************************************************************************
; Function: void _mulBIROM()
;
; PreCondition: _iA and _iBr are loaded with the LSB of each BigInt
; _xA and _xBr are loaded with the MSB of each BigInt
; _iR is the LSB of the accumulator BigInt
; _iR is zeroed, and has enough space
;
; Input: A: BigInt in RAM
; B: BigInt in ROM
;
; Output: R = A * B
;
; Side Effects: Overwrites TBLPTRU:TBLPTRH:TBLPTRL
;
; Stack Req: 2 bytes
;
; Overview: Performs the bulk multiplication of two BigInts
;***************************************************************************
GLOBAL _mulBIROM
_mulBIROM:
Stk2PushFromReg FSR2L ;Save FSR2 on the stack
banksel _xA ;select the assembly pointer bank
; Predecrement B and R pointers
movff _iBr+0x0, TBLPTRL
movff _iBr+0x1, TBLPTRH
movff _iBr+0x2, TBLPTRU
tblrd*-
clrf WREG
decf _iR+0x0, F
subwfb _iR+0x1, F
mRLoadB:
; Increment iR to match the new starting position
; Fetch new B value
clrf WREG
mRLoadBAgain:
incf _iR+0x0, F
addwfc _iR+0x1, F
tblrd+*
movf TABLAT, W
bz mRLoadBAgain ; No need to multiply this byte if it is zero
movwf _wC
; Restore iA start pointer in FSR0
movff _iA+0x0, FSR0L
movff _iA+0x1, FSR0H
; Store new iR start pointer in FSR2
movff _iR+0x0, FSR2L
movff _iR+0x1, FSR2H
; Clear carry byte
clrf CarryByte
mRLoopA:
movf CarryByte, W ;load carry byte
addwf INDF2, F ;add to accumulator
clrf CarryByte ;clear carry byte
rlcf CarryByte, F ;if a carry occurred, save to CarryByte
movf _wC, W ;load wC
mulwf POSTINC0 ;calculate wC * A[iA++]
movf PRODL,W ;load low result byte
addwf POSTINC2, F ;add to accumulator, and move ptr
movf PRODH,W ;load high result byte
addwfc CarryByte, F ;add to carry byte, along with
; any carry from previous addition
; See if A loop is done
decf FSR0L, W
xorwf _xA+0x0, W
bnz mRLoopA
; If A loop is done, finish out the carrying
movff CarryByte, INDF2 ;save carry byte (always adding to zero)
; See if B loop is done
movf _xBr+0x0, W
xorwf TBLPTRL, W
bnz mRLoadB
mRDone:
Stk2PopToReg FSR2L ;restore old FSR2
return
;***************************************************************************
; Function: void _sqrBI()
;
; PreCondition: _iA is loaded with the LSB of the BigInt
; _xA is loaded with the MSB of the BigInt
; _iR is the LSB of the accumulator BigInt
; _iR is zeroed, and has enough space
;
; Input: A: Source BigInt to square
; R: Output location
;
; Output: R = A * A
;
; Side Effects: None
;
; Stack Req: 6 bytes
;
; Overview: Performs the bulk multiplication of two BigInts
;***************************************************************************
GLOBAL _sqrBI
_sqrBI:
Stk2PushFromReg FSR2L ;Save FSR2 on the stack
banksel _iA ;select the assembly pointer bank
;decement iA (to set up for termination case)
clrf WREG ;load zero to W
decf _iA,F ;decrement iA
subwfb _iA+0x1,F ;borrow if needed
;set up for outer loop over all values of A
Stk2PushFromReg _iR ;save initial iR to stack
Stk2PushFromReg _iA ;save initial iA to stack
qOuterLoop:
Stk2PopToReg FSR0L ;pop next iA from stack
Stk2PopToReg FSR2L ;pop next iR from stack
;check if outer loop is done
movf FSR0L,W ;check if low byte of A ptr
xorwf _xA+0x0,W ; equals low byte of stop ptr
bnz qNextOut ;if not, work on next byte of A
movf FSR0H,W ;check if high byte of A ptr
xorwf _xA+0x1,W ; equals high byte of stop ptr
bz qDone ;if so, terminate
qNextOut:
;save next value of iR
movf PREINC2,W ;decrement iR twice for next value
movf PREINC2,W
Stk2PushFromReg FSR2L ;save next value of iR to stack
movf POSTDEC2,W ;restore iR value
movf POSTDEC2,W
;save next value of iA
movf PREINC0,W ;decrement iA for next value
Stk2PushFromReg FSR0L ;save next value of iA to stack
;load wC with value of A[iA--]
;check wC==0, if so then we can skip this byte
movf POSTDEC0,W ;restore iA and copy value
bz qOuterLoop ;if B==0, continue to next byte
movwf _wC ; into temporary byte
;set up for inner loop over all remaining values in A
clrf CarryByte ;clear carry bytes
clrf CarryH
;first result only gets accumulated once
mulwf PREINC0 ;square first byte (W = B above)
movf PRODL,W ;load PRODL
addwf POSTINC2,F ;accumulate
movf PRODH,W ;load PRODH
addwfc CarryByte,F ;save carry byte (with prev carry)
qInnerLoop:
;if A isn't complete, keep looping
movf FSR0L,W ;check if low byte of A ptr
xorwf _xA+0x0,W ; equals low byte of stop ptr
bnz qInnerByte ;if not, continue looping
movf FSR0H,W ;check if high byte of A ptr
xorwf _xA+0x1,W ; equals high byte of stop ptr
bz qInnerDone ;if not, continue looping
qInnerByte:
;all future bytes get accumulated twice
movf CarryByte,W ;load carry byte
addwf INDF2,F ;add to accumulator
movff CarryH,CarryByte ;move high carry byte down
clrf CarryH
btfsc STATUS,C ;if a carry occurred
incf CarryByte,F ; add 1 to the carry byte
movf _wC,W ;load B
mulwf PREINC0 ;calculate B * A[iA--]
bcf STATUS,C ;multiply product by 2
rlcf PRODL,F
rlcf PRODH,F
btfsc STATUS,C ;if a carry occurrs
incf CarryH,F ; save 1 to the CarryH byte
movf PRODL,W ;load low result byte
addwf POSTINC2,F ;add to accumulator, and move ptr
movf PRODH,W ;load high result byte
addwfc CarryByte,F ;add to carry byte, along with
; any carry from previous addition
btfsc STATUS,C ;if a carry occurrs
incf CarryH,F ; save 1 to the CarryH byte
bra qInnerLoop
qInnerDone
;A is complete, finish out the carrying
movf CarryByte,W ;accumulate the carry bytes
addwf POSTINC2,F
movf CarryH,W
addwfc INDF2
bra qOuterLoop
qDone:
;movff FSR2L,_iR+0x0
;movff FSR2H,_iR+0x1
Stk2PopToReg FSR2L ;restore old FSR2
return
;***************************************************************************
; Function: void _masBI()
;
; PreCondition: _iB is loaded with the LSB of the modulus BigInt
; _xB is loaded with the MSB of the modulus BigInt
; _wC is loaded with the 8 bit integer by which to multiply
; _iR is the starting LSB of the decumulator BigInt
; B must be 256 bytes or less
;
; Input: B: a BigInt to multiply with wC
; wC: a simple scalar
; R: a BigInt decumulator to subtract the result from
;
; Output: R = R - (B * wC)
;
; Side Effects: None
;
; Stack Req: 2 bytes
;
; Overview: Performs a Multiply And Subtract function. This is used in
; the modulus calculation.
;
; Note: As an optimization, the final borrow forward propagation
; is commented out below. This results in an a potentially
; incorrect result in R, but for the BigIntMod() algorithm,
; the final borrow forward propagation would be both unneeded
; and unwanted. For BigIntMod(), this underflow is repaired
; by adding B back into R one or two times.
;***************************************************************************
GLOBAL _masBI
_masBI:
Stk2PushFromReg FSR2L ;Save FSR2 on the stack
banksel _xB ;select the assembly pointer bank
; Load B pointer into FSR2 and R pointer into FSR0
movff _iR+0x0, FSR0L ;load iR into FSR0
movff _iR+0x1, FSR0H
movff _iB+0x0, FSR2L ;load iB into FSR2
movff _iB+0x1, FSR2H
; Predecrement B pointer
movf POSTDEC2, W
; Calculate loop counters for /4 and /1
masLoop4Init:
clrf CarryByte
movf FSR2L, W
subwf _xB+0x0, W
bcf STATUS, C
rrcf WREG, W
rlcf CarryByte
rrcf WREG, W
btfsc STATUS, C
bsf CarryByte, 1
movwf CarryH
movf CarryH, F
bz masLoopInit
clrf WREG
masLoop4:
subwf INDF0, F ;subtract from decumulator
movf _wC, W ;load B
mulwf PREINC2 ;calculate wC * B[iB--]
btfss STATUS, C ;if a borrow occurred
incf PRODH, F ; save 1 to the carry byte
movf PRODL, W ;load low result byte
subwf POSTINC0, F ;subtract from decumulator, and move ptr
movf PRODH, W
btfss STATUS, C
incf PRODH, W
subwf INDF0, F ;subtract from decumulator
movf _wC, W ;load B
mulwf PREINC2 ;calculate wC * B[iB--]
btfss STATUS, C ;if a borrow occurred
incf PRODH, F ; save 1 to the carry byte
movf PRODL, W ;load low result byte
subwf POSTINC0, F ;subtract from decumulator, and move ptr
movf PRODH, W
btfss STATUS, C
incf PRODH, W
subwf INDF0, F ;subtract from decumulator
movf _wC, W ;load B
mulwf PREINC2 ;calculate wC * B[iB--]
btfss STATUS, C ;if a borrow occurred
incf PRODH, F ; save 1 to the carry byte
movf PRODL, W ;load low result byte
subwf POSTINC0, F ;subtract from decumulator, and move ptr
movf PRODH, W
btfss STATUS, C
incf PRODH, W
subwf INDF0, F ;subtract from decumulator
movf _wC, W ;load B
mulwf PREINC2 ;calculate wC * B[iB--]
btfss STATUS, C ;if a borrow occurred
incf PRODH, F ; save 1 to the carry byte
movf PRODL, W ;load low result byte
subwf POSTINC0, F ;subtract from decumulator, and move ptr
movf PRODH, W
btfss STATUS, C
incf PRODH, W
; See if we've looped through all (B bytes)/4
decfsz CarryH, F
bra masLoop4
masLoopInit:
movf CarryByte, F
bz masFinalBorrow
masLoop:
subwf INDF0, F ;subtract from decumulator
movf _wC, W ;load B
mulwf PREINC2 ;calculate wC * B[iB--]
btfss STATUS, C ;if a borrow occurred
incf PRODH, F ; save 1 to the carry byte
movf PRODL, W ;load low result byte
subwf POSTINC0, F ;subtract from decumulator, and move ptr
movf PRODH, W
btfss STATUS, C
incf PRODH, W
; See if we've looped through all B bytes in the residual
decfsz CarryByte, F
bra masLoop
; If B is complete, finish out the borrow and return
masFinalBorrow:
subwf POSTINC0, F
Stk2PopToReg FSR2L ;restore old FSR2
return
;***************************************************************************
; Function: void _masBIROM()
;
; PreCondition: _iBr is loaded with the LSB of the modulus BigInt
; _xBr is loaded with the MSB of the modulus BigInt
; _wC is loaded with the 8 bit integer by which to multiply
; _iR is the starting LSB of the decumulator BigInt
; Br must be 256 bytes or less
;
; Input: Br: a BigInt in ROM to multiply with wC
; wC: a simple scalar
; R: a BigInt decumulator in RAM to subtract the result from
;
; Output: R = R - (Br * wC)
;
; Side Effects: Overwrites TBLPTRU:TBLPTRH:TBLPTRL
;
; Stack Req: None
;
; Overview: Performs a Multiply And Subtract function. This is used in
; the modulus calculation.
;
; Note: As an optimization, the final borrow forward propagation
; is commented out below. This results in an a potentially
; incorrect result in R, but for the BigIntMod() algorithm,
; the final borrow forward propagation would be both unneeded
; and unwanted. For BigIntMod(), this underflow is repaired
; by adding B back into R one or two times.
;***************************************************************************
GLOBAL _masBIROM
_masBIROM:
banksel _xB ;select the assembly pointer bank
; Load B pointer into TBLPTR and R pointer into FSR0
movff _iR+0x0, FSR0L ;load iR into FSR0
movff _iR+0x1, FSR0H
movff _iBr+0x0, TBLPTRL ;load iBr into TBLPTR
movff _iBr+0x1, TBLPTRH
movff _iBr+0x2, TBLPTRU
; Predecrement Br pointer and set up carry byte
tblrd*-
; Calculate loop counters for /4 and /1
masRLoop4Init:
clrf CarryByte
movf TBLPTRL, W
subwf _xBr+0x0, W
bcf STATUS, C
rrcf WREG, W
rlcf CarryByte
rrcf WREG, W
btfsc STATUS, C
bsf CarryByte, 1
movwf CarryH
movf CarryH, F
bz masRLoopInit
clrf WREG
masRLoop4:
subwf INDF0, F ;subtract from decumulator
movf _wC, W ;load B
tblrd+*
mulwf TABLAT ;calculate wC * B[iB--]
btfss STATUS, C ;if a borrow occurred
incf PRODH, F ; save 1 to the carry byte
movf PRODL, W ;load low result byte
subwf POSTINC0, F ;subtract from decumulator, and move ptr
movf PRODH, W
btfss STATUS, C
incf PRODH, W
subwf INDF0, F ;subtract from decumulator
movf _wC, W ;load B
tblrd+*
mulwf TABLAT ;calculate wC * B[iB--]
btfss STATUS, C ;if a borrow occurred
incf PRODH, F ; save 1 to the carry byte
movf PRODL, W ;load low result byte
subwf POSTINC0, F ;subtract from decumulator, and move ptr
movf PRODH, W
btfss STATUS, C
incf PRODH, W
subwf INDF0, F ;subtract from decumulator
movf _wC, W ;load B
tblrd+*
mulwf TABLAT ;calculate wC * B[iB--]
btfss STATUS, C ;if a borrow occurred
incf PRODH, F ; save 1 to the carry byte
movf PRODL, W ;load low result byte
subwf POSTINC0, F ;subtract from decumulator, and move ptr
movf PRODH, W
btfss STATUS, C
incf PRODH, W
subwf INDF0, F ;subtract from decumulator
movf _wC, W ;load B
tblrd+*
mulwf TABLAT ;calculate wC * B[iB--]
btfss STATUS, C ;if a borrow occurred
incf PRODH, F ; save 1 to the carry byte
movf PRODL, W ;load low result byte
subwf POSTINC0, F ;subtract from decumulator, and move ptr
movf PRODH, W
btfss STATUS, C
incf PRODH, W
; See if we've looped through all B bytes
decfsz CarryH, F
bra masRLoop4
masRLoopInit:
movf CarryByte, F
bz masRFinalBorrow
masRLoop:
subwf INDF0, F ;subtract from decumulator
movf _wC, W ;load B
tblrd+*
mulwf TABLAT ;calculate wC * B[iB--]
btfss STATUS, C ;if a borrow occurred
incf PRODH, F ; save 1 to the carry byte
movf PRODL, W ;load low result byte
subwf POSTINC0, F ;subtract from decumulator, and move ptr
movf PRODH, W
btfss STATUS, C
incf PRODH, W
; See if we've looped through all B bytes in the residual
decfsz CarryByte, F
bra masRLoop
; If B is complete, finish out the borrow and return
masRFinalBorrow:
subwf POSTINC0, F
return
;***************************************************************************
; Function: void _copyBI()
;
; PreCondition: _iA and _iB are loaded with the LSB of each BigInt
; _xA and _xB are loaded with the MSB of each BigInt
; B must be 256 bytes or less
;
; Input: A: the destination
; B: the source
;
; Output: A = B
;
; Side Effects: None
;
; Stack Req: 2 bytes
;
; Overview: Copies a value from BigInt B into BigInt A. If A has more
; bytes allocated than B, then the most significant bytes in
; A are zero padded. If A has less bytes allocated than B,
; then the most significant bytes are truncated off in A.
;***************************************************************************
GLOBAL _copyBI
_copyBI:
Stk2PushFromReg FSR2L ;Save FSR2 on the stack
banksel _xA ;select the assembly pointer bank
;Load and predecrement iA, iB (to set up termination case)
movff _iA+0x0, FSR0L ;load iA into FSR0
movff _iA+0x1, FSR0H
movff _iB+0x0, FSR2L ;load iB into FSR2
movff _iB+0x1, FSR2H
movf POSTDEC0, W
movf POSTDEC2, W
cLoop:
movff PREINC2, PREINC0 ;copy B to A
movf FSR2L, W ;check if low byte of B ptr
xorwf _xB+0x0, W ; equals low byte of stop ptr
bz cZeroTest ;if so, B is done, so clear rest of A
movf FSR0L, W ;check if low byte of A ptr
xorwf _xA+0x0, W ; equals low byte of stop ptr
bnz cLoop ;if not, continue
movf FSR0H, W ;check if high byte of A ptr
xorwf _xA+0x1, W ; equals high byte of stop ptr
bnz cLoop ;if so, terminate
bra cZeroTest
cZero:
clrf PREINC0 ;set A byte to zero
cZeroTest:
movf FSR0L, W ;check if low byte of A ptr
xorwf _xA+0x0, W ; equals low byte of stop ptr
bnz cZero ;if not, continue
movf FSR0H, W ;check if high byte of A ptr
xorwf _xA+0x1, W ; equals high byte of stop ptr
bnz cZero ;if so, terminate
Stk2PopToReg FSR2L ;restore old FSR2
return
end
|
OSDev/Try-12/boot/16/print16.asm | Ashwin-Paudel/Tries | 0 | 170625 | ;
; print16.asm
; KripayaOS Project
; Author(s): [Ashwin: <EMAIL>]
;
[bits 16]
print16:
; Save the registers
push ax
push bx
; Allow Printing to the screen
mov ah, 0x0E
.loop:
; Check if character is null
cmp byte[bx], 0
je .done
; Print to the screen
mov al, byte[bx]
int 0x10
; Increment bx and loop again
inc bx
jmp .loop
.done:
; Restore the registers and return
pop bx
pop ax
ret
print_hex16:
; Save the registers
push ax
push bx
push cx
; Allow Printing to the screen
mov ah, 0x0E
; Print the prefix
mov al, '0'
int 0x10
mov al, 'x'
int 0x10
; Change the value of cx (counter)
mov cx, 4
.loop_hex:
; Check if character is null
cmp cx, 0
jmp .hex_done
; Save bx and shift of upper bit
push bx
shr bx, 12
; Check if it's a character
cmp bx, 10
jge .hex_alpha
; Set al = 0 and add bl
mov al, '0'
add al, bl
; End of loop
jmp .hex_loop_done
.hex_alpha:
; Subtract 10 from dl to get the amount
sub bl, 10
; Move 'A' to al and then add bl
mov al, 'A'
add al, bl
.hex_loop_done:
; Print the character
int 0x10
; Restore bx and shift to next 4 bits
pop bx
shl bx, 4
; Decrement the cx counter
dec cx
; Loop again
jmp .loop_hex
.hex_done:
; Restore the registers and return
pop cx
pop bx
pop ax
ret
|
data/battle/ai/stall_moves.asm | genterz/pokecross | 28 | 165067 | ; AI_OPPORTUNIST discourages these moves
; when the player's HP is low.
StallMoves:
db SWORDS_DANCE
db TAIL_WHIP
db LEER
db GROWL
db DISABLE
db MIST
db COUNTER
db LEECH_SEED
db GROWTH
db STRING_SHOT
db MEDITATE
db AGILITY
db RAGE
db MIMIC
db SCREECH
db HARDEN
db WITHDRAW
db DEFENSE_CURL
db BARRIER
db LIGHT_SCREEN
db HAZE
db REFLECT
db FOCUS_ENERGY
db BIDE
db AMNESIA
db TRANSFORM
db SPLASH
db ACID_ARMOR
db SHARPEN
db CONVERSION
db SUBSTITUTE
db FLAME_WHEEL
db -1 ; end
|
tests/nonsmoke/functional/CompileTests/experimental_ada_tests/tests/private_type_definition.ads | ouankou/rose | 488 | 28344 | package Private_Type_Definition is
type Type_1 is private;
type Type_2 is tagged private;
type Type_3 is abstract tagged limited private;
type Parent_Type_1 is tagged record
Component_1 : Integer;
end record;
type Type_4 is new Parent_Type_1 with private;
private
type Type_1 is new Integer;
type Type_2 is tagged null record;
type Type_3 is abstract tagged limited null record;
type Type_4 is new Parent_Type_1 with record
Component_2 : Float;
end record;
end Private_Type_Definition;
|
courses/fundamentals_of_ada/labs/prompts/190_exceptions/simple_math.adb | AdaCore/training_material | 15 | 18580 | with Ada.Numerics.Generic_Elementary_Functions;
package body Simple_Math is
package Math is new Ada.Numerics.Generic_Elementary_Functions (Float_T);
-- Sqrt should raise our exception when X < 0 and
-- the square root of X otherwise
function Sqrt
(X : Float_T)
return Float_T is
begin
return Math.Sqrt (X); -- not fully implemented
end Sqrt;
-- Square should raise our exception when X*X is too large and
-- the X*X otherwise
function Square
(X : Float_T)
return Float_T is
begin
return X * X;
end Square;
function Multiply
(L, R : Float_T)
return Float_T is
begin
return L * R;
end Multiply;
function Divide
(N, D : Float_T)
return Float_T is
begin
return N / D;
end Divide;
end Simple_Math;
|
src/cupcake-windows.ads | skordal/cupcake | 2 | 1084 | -- The Cupcake GUI Toolkit
-- (c) <NAME> 2012 <<EMAIL>>
-- Report bugs and issues on <http://github.com/skordal/cupcake/issues>
-- vim:ts=3:sw=3:et:si:sta
with Cupcake.Colors;
with Cupcake.Primitives;
with Cupcake.Backends;
private with Ada.Containers.Doubly_Linked_Lists;
package Cupcake.Windows is
-- Normal window type:
type Window_Record (<>) is tagged limited private;
type Window is access all Window_Record'Class;
-- Creates a new window:
function New_Window (Width, Height : in Positive; Title : in String)
return Window;
function New_Window (Size : in Primitives.Dimension; Title : in String)
return Window;
-- Destroys a window:
procedure Destroy (Object : not null access Window_Record);
-- Sets the visibility of a window; this is used to show and close windows:
procedure Set_Visible (This : access Window_Record'Class;
Visible : Boolean := True);
-- Window size operations:
function Get_Size (This : in Window_Record'Class)
return Primitives.Dimension with Inline, Pure_Function;
procedure Set_Size (This : in out Window_Record'Class;
Size : in Primitives.Dimension) with Inline;
-- Window color operations:
function Get_Background_Color (This : in Window_Record'Class)
return Colors.Color with Inline, Pure_Function;
procedure Set_Background_Color (This : out Window_Record'Class;
Color : in Colors.Color) with Inline;
-- Expose handler for windows:
procedure Expose_Handler (This : in Window_Record'Class);
-- Resize handler for windows:
procedure Resize_Handler (This : in out Window_Record'Class;
New_Size : in Primitives.Dimension);
-- Close event handler for windows; returns true if the window should
-- close:
function Close_Handler (This : in Window_Record'Class) return Boolean;
---- BACKEND OPERATIONS: ----
-- Posts an expose event to a window; this causes a redraw of the entire
-- window:
procedure Post_Expose (ID : in Backends.Window_ID_Type);
pragma Export (C, Post_Expose);
procedure Post_Expose (This : in Window_Record'Class);
-- Posts a resize event to a window:
procedure Post_Resize (ID : in Backends.Window_ID_Type;
Width, Height : in Natural);
pragma Export (C, Post_Resize);
procedure Post_Resize (ID : in Backends.Window_ID_Type;
New_Size : in Primitives.Dimension);
-- Posts a close request to a window:
procedure Post_Close_Event (ID : in Backends.Window_ID_Type);
pragma Export (C, Post_Close_Event);
private
-- List of active (visible) windows, for event propagation:
package Window_Lists is new Ada.Containers.Doubly_Linked_Lists (
Element_Type => Window);
Visible_Window_List : Window_Lists.List;
-- Gets a window pointer by ID if the window is visible; returns null
-- otherwise:
function Get_Visible_Window (ID : in Backends.Window_ID_Type) return Window;
function Get_Visible_Window (ID : in Backends.Window_ID_Type)
return Backends.Window_Data_Pointer;
pragma Export (C, Get_Visible_Window);
-- Normal window type definition:
type Window_Record is tagged limited record
Size : Primitives.Dimension;
Background_Color : Colors.Color := Colors.DEFAULT_BACKGROUND_COLOR;
Backend_Data : Backends.Window_Data_Pointer;
ID : Backends.Window_ID_Type;
end record;
end Cupcake.Windows;
|
src/Source/Type.agda | JLimperg/msc-thesis-code | 5 | 1711 | <filename>src/Source/Type.agda
{-# OPTIONS --without-K --safe #-}
module Source.Type where
open import Source.Size as S using
( Size ; Δ ; Δ′ ; Δ″ ; Ω ; Ω′ ; Ω″ ; n ; m ; o ; p ; b )
open import Source.Size.Substitution.Canonical as SC using
( Sub⊢ )
open import Source.Size.Substitution.Theory
open import Source.Size.Substitution.Universe as SU using
( σ ; τ ; ι ; ⟨_⟩ )
open import Util.Prelude
open S.Ctx
infixr 3 Π_,_
infixr 4 _⇒_
infixl 4 _∙_
data Type (Δ : S.Ctx) : Set where
Nat : (n : Size Δ) → Type Δ
Stream : (n : Size Δ) → Type Δ
_⇒_ : (T U : Type Δ) → Type Δ
Π_,_ : (n : Size Δ) (T : Type (Δ ∙ n)) → Type Δ
variable T U V W T′ U′ V′ W′ : Type Δ
Π-≡⁺ : ∀ {n m} {T : Type (Δ ∙ n)} {U : Type (Δ ∙ m)}
→ (n≡m : n ≡ m)
→ subst (λ n → Type (Δ ∙ n)) n≡m T ≡ U
→ (Π n , T) ≡ (Π m , U)
Π-≡⁺ refl refl = refl
data Ctx (Δ : S.Ctx) : Set where
[] : Ctx Δ
_∙_ : (Γ : Ctx Δ) (T : Type Δ) → Ctx Δ
variable Γ Γ′ Γ″ Ψ Ψ′ Ψ″ : Ctx Δ
sub : SC.Sub Δ Ω → Type Ω → Type Δ
sub σ (Nat n) = Nat (SC.sub σ n)
sub σ (Stream n) = Stream (SC.sub σ n)
sub σ (T ⇒ U) = sub σ T ⇒ sub σ U
sub σ (Π n , T) = Π SC.sub σ n , sub (SC.Lift σ) T
abstract
sub->> : ∀ {Δ Δ′ Δ″} (σ : SC.Sub Δ Δ′) (τ : SC.Sub Δ′ Δ″) T
→ sub (σ SC.>> τ) T ≡ sub σ (sub τ T)
sub->> σ τ (Nat n) = cong Nat (SC.sub->> n refl)
sub->> σ τ (Stream n) = cong Stream (SC.sub->> n refl)
sub->> σ τ (T ⇒ U) = cong₂ _⇒_ (sub->> σ τ T) (sub->> σ τ U)
sub->> σ τ (Π n , T)
rewrite SC.sub->> {σ = σ} {τ} n refl
= cong (λ T → Π SC.sub σ (SC.sub τ n) , T)
(trans (cong (λ σ → sub σ T) (sym SC.Lift>>Lift))
(sub->> (SC.Lift σ) (SC.Lift τ) T))
sub-Id : (T : Type Δ) → sub SC.Id T ≡ T
sub-Id (Nat n) = cong Nat (SC.sub-Id n refl)
sub-Id (Stream n) = cong Stream (SC.sub-Id n refl)
sub-Id (T ⇒ U) = cong₂ _⇒_ (sub-Id T) (sub-Id U)
sub-Id (Π n , T)
rewrite SC.sub-Id n refl
= cong (λ T → Π n , T) (sub-Id T)
instance
SubTheory-Type : SubTheory Type
SubTheory-Type = record
{ _[_] = λ T σ → sub σ T
; [Id] = sub-Id
; [>>] = sub->>
}
subΓ : SC.Sub Δ Ω → Ctx Ω → Ctx Δ
subΓ σ [] = []
subΓ σ (Γ ∙ T) = subΓ σ Γ ∙ sub σ T
abstract
subΓ->> : ∀ (σ : SC.Sub Δ Δ′) (τ : SC.Sub Δ′ Δ″) Γ
→ subΓ (σ SC.>> τ) Γ ≡ subΓ σ (subΓ τ Γ)
subΓ->> σ τ [] = refl
subΓ->> σ τ (Γ ∙ T) = cong₂ _∙_ (subΓ->> σ τ Γ) (sub->> σ τ T)
subΓ-Id : (Γ : Ctx Δ) → subΓ SC.Id Γ ≡ Γ
subΓ-Id [] = refl
subΓ-Id (Γ ∙ T) = cong₂ _∙_ (subΓ-Id Γ) (sub-Id T)
instance
SubTheory-Ctx : SubTheory Ctx
SubTheory-Ctx = record
{ _[_] = λ Γ σ → subΓ σ Γ
; [Id] = subΓ-Id
; [>>] = subΓ->>
}
|
programs/oeis/141/A141855.asm | neoneye/loda | 22 | 105249 | ; A141855: Primes congruent to 8 mod 11.
; 19,41,107,151,173,239,283,349,503,547,569,613,701,811,877,1009,1031,1097,1163,1229,1361,1427,1471,1493,1559,1669,1801,1823,1867,1889,1933,1999,2087,2131,2153,2351,2417,2549,2593,2659,2791,2857,2879,3011,3121,3187,3209,3253,3319,3407,3517,3539,3583,3671,3803,3847,4001,4111,4133,4177,4243,4397,4441,4463,4507,4639,4793,4903,4969,5101,5167,5189,5233,5387,5431,5519,5563,5651,5717,5783,5827,5849,5981,6047,6091,6113,6311,6421,6553,6619,6883,6949,6971,7103,7213,7411,7433,7477,7499,7741
mov $2,$0
add $2,2
pow $2,2
lpb $2
add $1,7
sub $2,1
mov $3,$1
seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0.
sub $0,$3
add $1,4
mov $4,$0
max $4,0
cmp $4,$0
mul $2,$4
lpe
div $1,2
sub $1,22
mul $1,2
add $1,41
mov $0,$1
|
programs/oeis/138/A138034.asm | jmorken/loda | 1 | 18973 | <filename>programs/oeis/138/A138034.asm
; A138034: Expansion of (1+3*x^2)/(1-x+x^2).
; 1,1,3,2,-1,-3,-2,1,3,2,-1,-3,-2,1,3,2,-1,-3,-2,1,3,2,-1,-3,-2,1,3,2,-1,-3,-2,1,3,2,-1,-3,-2,1,3,2,-1,-3,-2,1,3,2,-1,-3,-2,1,3,2,-1,-3,-2,1,3,2,-1,-3,-2,1,3,2,-1,-3,-2,1,3,2,-1,-3,-2,1,3,2,-1,-3,-2,1,3,2,-1,-3,-2,1,3,2,-1,-3,-2,1,3,2,-1,-3,-2,1,3,2,-1,-3,-2,1,3
add $0,1
mul $0,2
sub $0,3
div $0,2
mov $1,1
mov $2,2
lpb $0
sub $0,1
add $1,$2
sub $2,$1
lpe
|
programs/oeis/100/A100775.asm | karttu/loda | 1 | 24267 | <reponame>karttu/loda
; A100775: a(n) = 97*n + 101.
; 101,198,295,392,489,586,683,780,877,974,1071,1168,1265,1362,1459,1556,1653,1750,1847,1944,2041,2138,2235,2332,2429,2526,2623,2720,2817,2914,3011,3108,3205,3302,3399,3496,3593,3690,3787,3884,3981,4078,4175,4272,4369,4466,4563,4660,4757,4854,4951,5048,5145,5242,5339,5436,5533,5630,5727,5824,5921,6018,6115,6212,6309,6406,6503,6600,6697,6794,6891,6988,7085,7182,7279,7376,7473,7570,7667,7764,7861,7958,8055,8152,8249,8346,8443,8540,8637,8734,8831,8928,9025,9122,9219,9316,9413,9510,9607,9704,9801,9898,9995,10092,10189,10286,10383,10480,10577,10674,10771,10868,10965,11062,11159,11256,11353,11450,11547,11644,11741,11838,11935,12032,12129,12226,12323,12420,12517,12614,12711,12808,12905,13002,13099,13196,13293,13390,13487,13584,13681,13778,13875,13972,14069,14166,14263,14360,14457,14554,14651,14748,14845,14942,15039,15136,15233,15330,15427,15524,15621,15718,15815,15912,16009,16106,16203,16300,16397,16494,16591,16688,16785,16882,16979,17076,17173,17270,17367,17464,17561,17658,17755,17852,17949,18046,18143,18240,18337,18434,18531,18628,18725,18822,18919,19016,19113,19210,19307,19404,19501,19598,19695,19792,19889,19986,20083,20180,20277,20374,20471,20568,20665,20762,20859,20956,21053,21150,21247,21344,21441,21538,21635,21732,21829,21926,22023,22120,22217,22314,22411,22508,22605,22702,22799,22896,22993,23090,23187,23284,23381,23478,23575,23672,23769,23866,23963,24060,24157,24254
mov $1,$0
mul $1,97
add $1,101
|
programs/oeis/175/A175869.asm | neoneye/loda | 22 | 11669 | <filename>programs/oeis/175/A175869.asm
; A175869: Partial sums of ceiling(n^2/23).
; 0,1,2,3,4,6,8,11,14,18,23,29,36,44,53,63,75,88,103,119,137,157,179,202,228,256,286,318,353,390,430,472,517,565,616,670,727,787,850,917,987,1061,1138,1219,1304,1393,1485,1582,1683,1788,1897,2011,2129,2252,2379,2511,2648,2790,2937,3089,3246,3408,3576,3749,3928,4112,4302,4498,4700,4907,5121,5341,5567,5799,6038,6283,6535,6793,7058,7330,7609,7895,8188,8488,8795,9110,9432,9762,10099,10444,10797,11158,11526,11903,12288,12681,13082,13492,13910,14337
mov $8,$0
mov $9,$0
lpb $8
mov $0,$9
sub $8,1
sub $0,$8
pow $0,2
trn $3,$0
mov $4,1
mov $5,$0
lpb $0
mov $0,0
mov $2,2
sub $5,2
add $3,$5
add $3,1
mov $6,$4
mov $7,$4
add $7,22
div $3,$7
lpe
sub $2,$6
add $2,$3
add $1,$2
lpe
mov $0,$1
|
Assembly/Phonebook.asm | Yuk1n0/Homework | 3 | 170332 | ;***********************定义数据段****************************
DATAS SEGMENT
MESSAGE DB 'PLEASE INPUT YOUR NAME:',13,10,'$'
MESSAGE1 DB 'PLEASE INPUT YOUR TELEPHONE NUMBER:',13,10,'$'
MESSAGE2 DB 'NAME TEL.',13,10,'$'
MESSAGE4 DB '*************************************',13,10,'$'
MESSAGE5 DB 'PLEASE SELECT THE OPERATION:',13,10,'$'
MESSAGE6 DB '1:INPUT 2:PRINT 3: SEARCH 4: EXIT',13,10,'$'
MESSAGE7 DB 'PLEASE INPUT THE NAME.',13,10,'$'
MESSAGE8 DB 'THERE IS NOT THE NAME.',13,10,'$'
MESSAGE9 DB 'YOU INPUT THE WRONG NUMBER.',13,10,'$'
MESSAGE10 DB '------------------------------------',13,10,'$'
MESSAGE3 DB 'YOU SHOULD INPUT SOME LETTERS.',13,10,'$'
MESSAGE11 DB 'YOU SHOULD INPUT A---Z OR a----z',13,10,'$'
MESSAGE12 DB 'YOU SHOULD INPUT 0---9',13,10,'$'
BIAOJI DW 0
MAXLEN DB 21
INBUFLEN DB ?
INBUF DB 21 DUP(20H)
MAXLEN1 DB 9
INBUFLEN1 DB ?
INBUF1 DB 9 DUP(20H)
OUTLINE DB 50 DUP(33 DUP(20H))
DATAS ENDS
;***********************定义代码段****************************
CODES SEGMENT
MAIN PROC FAR
ASSUME CS:CODES,DS:DATAS
START:
PUSH DS
SUB AX,AX
PUSH AX
MOV AX,DATAS
MOV DS,AX
MOV DI,0
MOV BL,0
;*******************接受输入姓名和电话号码*********************
FIRST:
CALL HUANHANG
CALL XINGHAO
MOV AH,9H
MOV DX,OFFSET MESSAGE
INT 21H
CALL XINGHAO
CALL INPUTNAME
CALL HUANHANG
CALL XUXIAN
CALL XINGHAO
MOV AH,9H
MOV DX,OFFSET MESSAGE1
INT 21H
CALL XINGHAO
CALL INPHONENUMBER
CALL HUANHANG
CALL XUXIAN
CALL XUANXIANG
;******************对电话号码按照姓名排序并且输出***************
SECOND:
CALL HUANHANG
CALL XUXIAN
MOV AH,9H
MOV DX,OFFSET MESSAGE2
INT 21H
CALL XUXIAN
CMP BL,1
JE ZHUANYI
CALL PAIXU
ZHUANYI:
CALL PRINTLINE
CALL HUANHANG
CALL XUANXIANG
;***********接受用户输入的姓名并且显示电话号码*******************
THIRD:
CALL HUANHANG
CALL SEARCH
CALL XUANXIANG
;*************************退出程序*****************************
FOUR:
MOV AH,4CH
INT 21H
MAIN ENDP
;*********************接受用户输入的姓名************************
INPUTNAME PROC NEAR
NEXTSTEP2:
CALL GETNAME
;********************检测是否输入了字符*************************
CMP INBUFLEN,0
JE ERROR1
JMP CHECKONE
ERROR1:
CALL HUANHANG
CALL XINGHAO
MOV AH,9H
MOV DX,OFFSET MESSAGE3
INT 21H
CALL XINGHAO
CALL HUANHANG
JMP NEXTSTEP2
;********************检测用输入的是否是字母*********************
CHECKONE:
MOV CH,0
MOV CL,INBUFLEN
MOV SI,0
LOOPP:
CMP INBUF[SI],41H
JB ERRORA
CMP INBUF[SI],5BH
JB NEXTSTEPL
CMP INBUF[SI],61H
JB ERRORA
CMP INBUF[SI],7BH
JB NEXTSTEPL
JMP ERRORA
NEXTSTEPL:
INC SI
LOOP LOOPP
MOV SI,0
JMP NEXTSTEP
ERRORA:
CALL HUANHANG
CALL XINGHAO
MOV AH,9H
MOV DX,OFFSET MESSAGE11
INT 21H
CALL XINGHAO
JMP NEXTSTEP2
;*******************把有效的名字送入INBUF中***********************
NEXTSTEP:
MOV CH,0
MOV CL,25
SUB CL,INBUFLEN
INC BL
ZHUANYINAME:
MOV BH,INBUF[SI]
MOV OUTLINE[DI],BH
INC DI
INC SI
DEC INBUFLEN
JNZ ZHUANYINAME
KONGGE:
MOV OUTLINE[DI],20H
INC DI
LOOP KONGGE
RET
INPUTNAME ENDP
;**************接受用户输入电话号码并且存入INBUF1中**************
GETNUMBER PROC NEAR
MOV SI,0
LEA DX,MAXLEN1
MOV AH,0CH
MOV AL,0AH
INT 21H
RET
GETNUMBER ENDP
;**************接受用户输入的姓名并且存入INBUF中*****************
GETNAME PROC NEAR
MOV SI,0
LEA DX,MAXLEN
MOV AH,0CH
MOV AL,0AH
INT 21H
RET
GETNAME ENDP
;*******************接受用户输入的电话号码***********************
INPHONENUMBER PROC NEAR
NEXTSTEP3:
CALL GETNUMBER
;*********************检测是否输入了字符************************
CMP INBUFLEN1,0
JE ERROR2
JMP CHECKTWO
ERROR2:
CALL HUANHANG
CALL XINGHAO
MOV AH,9H
MOV DX,OFFSET MESSAGE3
INT 21H
CALL XINGHAO
CALL HUANHANG
JMP NEXTSTEP3
;*********************检测是否输入的是数字**********************
CHECKTWO:
MOV CH,0
MOV CL,INBUFLEN1
MOV SI,0
LOOPP1:
CMP INBUF1[SI],30H
JB ERRORA1
CMP INBUF1[SI],3AH
JB NEXTSTEPL1
JMP ERRORA1
NEXTSTEPL1:
INC SI
LOOP LOOPP1
MOV SI,0
JMP NEXTSTEP1
ERRORA1:
CALL HUANHANG
CALL XINGHAO
MOV AH,9H
MOV DX,OFFSET MESSAGE12
INT 21H
CALL XINGHAO
JMP NEXTSTEP3
;********************把有效电话号码放进INBUF1中******************
NEXTSTEP1:
MOV CH,0
MOV CL,8
SUB CL,INBUFLEN1
ZHUANYIPHONE:
MOV BH,INBUF1[SI]
MOV OUTLINE[DI],BH
INC DI
INC SI
DEC INBUFLEN1
JNZ ZHUANYIPHONE
CMP CL,0
JE LASTNUMBER
KONGGE1:
MOV OUTLINE[DI],20H
INC DI
LOOP KONGGE1
LASTNUMBER:
RET
INPHONENUMBER ENDP
;********************把姓名及电话号码显示到屏幕上*******************
PRINTLINE PROC NEAR
PUSH BX
MOV SI,0
LOOP1:
MOV CX,33
SHUCHU:
MOV DL,OUTLINE[SI]
MOV AH,02H
INT 21H
INC SI
LOOP SHUCHU
CALL HUANHANG
CALL XUXIAN
DEC BL
JNZ LOOP1
POP BX
RET
PRINTLINE ENDP
;***********************回车并且换行过程***************************
HUANHANG PROC NEAR
MOV DL,0DH
MOV AH,02H
INT 21H
MOV DL,0AH
MOV AH,02H
INT 21H
RET
HUANHANG ENDP
;***********************用冒泡排序对名字进行排序********************
PAIXU PROC NEAR
PUSH BX
PUSH AX
PUSH DI
MOV BH,0
SORT1:
DEC BL
MOV CX,BX
PUSH CX
MOV DI,CX
MOV BIAOJI,0
SORT:
MOV CX,20
MOV SI,BIAOJI
LOOP3:
MOV AL,OUTLINE[SI]
CMP AL,OUTLINE[SI+33]
JB NEXT3
JA NEXT2
INC SI
LOOP LOOP3
JMP NEXT3
NEXT2:
CALL JIAOHUAN
NEXT3:
ADD BIAOJI,33
DEC DI
JNZ SORT
POP CX
LOOP SORT1
POP DI
POP AX
POP BX
RET
PAIXU ENDP
;*******************两个姓名及电话号码进行交换*******************
JIAOHUAN PROC NEAR
PUSH AX
PUSH CX
MOV CX, 33
MOV SI,BIAOJI
LOOP4:
MOV AL,OUTLINE[SI]
MOV AH,OUTLINE[SI+33]
MOV OUTLINE[SI+33],AL
MOV OUTLINE[SI],AH
INC SI
LOOP LOOP4
POP CX
POP AX
RET
JIAOHUAN ENDP
;***************查询一个名字并显示与其匹配的电话号码****************
SEARCH PROC NEAR
PUSH SI
PUSH DI
PUSH AX
PUSH BX
CALL XINGHAO
MOV AH,9H
MOV DX,OFFSET MESSAGE7
INT 21H
CALL XINGHAO
MOV BH,0
;**********************检测有几个号码重名***************************
XUNHUAN:
CALL GETNAME
CMP INBUFLEN,0
JE ERROR12
JMP CHECKONEAB
ERROR12:
CALL HUANHANG
CALL XINGHAO
MOV AH,9H
MOV DX,OFFSET MESSAGE3
INT 21H
CALL XINGHAO
CALL HUANHANG
JMP XUNHUAN
;**********************检测用输入的是否是字母********************
CHECKONEAB:
MOV CH,0
MOV CL,INBUFLEN
MOV SI,0
LOOPPAB:
CMP INBUF[SI],41H
JB ERRORAB
CMP INBUF[SI],5BH
JB NEXTSTEPLA
CMP INBUF[SI],61H
JB ERRORAB
CMP INBUF[SI],7BH
JB NEXTSTEPLA
JMP ERRORA
NEXTSTEPLA:
INC SI
LOOP LOOPPAB
MOV SI,0
JMP NEXTSTEPAB
ERRORAB:
CALL HUANHANG
CALL XINGHAO
MOV AH,9H
MOV DX,OFFSET MESSAGE11
INT 21H
CALL XINGHAO
JMP XUNHUAN
NEXTSTEPAB:
CALL HUANHANG
CALL XUXIAN
MOV AH,9H
MOV DX,OFFSET MESSAGE2
INT 21H
CALL XUXIAN
MOV BIAOJI,0
LOOPB:
MOV CX,20
MOV SI,0
MOV DI, BIAOJI
MOV CL,INBUFLEN
;************************比较有效的字母****************************
LOOPA:
MOV AL,INBUF[SI]
CMP AL,OUTLINE[DI]
JNE NEXTA
INC SI
INC DI
DEC CL
JNZ LOOPA
;************************其余的和空格比较*************************
MOV CX,20
SUB CL,INBUFLEN
LOOPM:
CMP OUTLINE[DI],20H
JNE NEXTA
INC DI
LOOP LOOPM
INC BH
MOV CX,33
MOV SI,BIAOJI
;**********************输出要查找的名字及电话号码******************
LOOPC:
MOV DL,OUTLINE[SI]
MOV AH,02H
INT 21H
INC SI
LOOP LOOPC
CALL HUANHANG
CALL XUXIAN
NEXTA:
ADD BIAOJI,33
DEC BL
JNZ LOOPB
;********************检测是否存在要查询的电话号码********************
CMP BH,0
JNE NEXTP
CALL HUANHANG
MOV AH,9H
MOV DX,OFFSET MESSAGE8
INT 21H
NEXTP:
POP BX
POP AX
POP DI
POP SI
RET
SEARCH ENDP
;***********************进行选择操作的过程***************************
XUANXIANG PROC NEAR
NEXTL:
CALL XINGHAO
MOV AH,9H
MOV DX,OFFSET MESSAGE5
INT 21H
MOV AH,9H
MOV DX,OFFSET MESSAGE6
INT 21H
CALL XINGHAO
MOV AH,01H
INT 21H
CMP AL,31H
JNE EXIT1
JMP FIRST
EXIT1:CMP AL,32H
JNE EXIT2
JMP SECOND
EXIT2:CMP AL,33H
JNE EXIT3
JMP THIRD
EXIT3:CMP AL,34H
JNE EXIT
JMP FOUR
EXIT: CALL HUANHANG
CALL XINGHAO
MOV AH,9H
MOV DX,OFFSET MESSAGE9
INT 21H
CALL XINGHAO
JMP NEXTL
RET
XUANXIANG ENDP
;******************************输出*********************************
XINGHAO PROC NEAR
MOV AH,9H
MOV DX,OFFSET MESSAGE4
INT 21H
RET
XINGHAO ENDP
;******************************输出*********************************
XUXIAN PROC NEAR
MOV AH,9H
MOV DX,OFFSET MESSAGE10
INT 21H
RET
XUXIAN ENDP
CODES ENDS
END START
|
commands/media/spotify/spotify-play-playlist.template.applescript | daviddzhou/script-commands | 3,305 | 1305 | <filename>commands/media/spotify/spotify-play-playlist.template.applescript
#!/usr/bin/osascript
# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title Play Track or Playlist
# @raycast.mode silent
# Optional parameters:
# @raycast.packageName Spotify
# @raycast.icon images/spotify-logo.png
# Documentation:
# @raycast.author <NAME>
# @raycast.authorURL https://github.com/thomaspaulmann
# @raycast.description Play playlist or track in Spotify.
# Customization:
# 1. Copy URI of track or playlist from Spotify, e.g. your discover weekly
# 2. Adjust title and description of command
property uri: ""
tell application "Spotify" to play track uri |
programs/oeis/158/A158485.asm | karttu/loda | 1 | 81161 | ; A158485: a(n) = 14*n^2 - 1.
; 13,55,125,223,349,503,685,895,1133,1399,1693,2015,2365,2743,3149,3583,4045,4535,5053,5599,6173,6775,7405,8063,8749,9463,10205,10975,11773,12599,13453,14335,15245,16183,17149,18143,19165,20215,21293,22399,23533,24695,25885,27103,28349,29623,30925,32255,33613,34999,36413,37855,39325,40823,42349,43903,45485,47095,48733,50399,52093,53815,55565,57343,59149,60983,62845,64735,66653,68599,70573,72575,74605,76663,78749,80863,83005,85175,87373,89599,91853,94135,96445,98783,101149,103543,105965,108415,110893,113399,115933,118495,121085,123703,126349,129023,131725,134455,137213,139999,142813,145655,148525,151423,154349,157303,160285,163295,166333,169399,172493,175615,178765,181943,185149,188383,191645,194935,198253,201599,204973,208375,211805,215263,218749,222263,225805,229375,232973,236599,240253,243935,247645,251383,255149,258943,262765,266615,270493,274399,278333,282295,286285,290303,294349,298423,302525,306655,310813,314999,319213,323455,327725,332023,336349,340703,345085,349495,353933,358399,362893,367415,371965,376543,381149,385783,390445,395135,399853,404599,409373,414175,419005,423863,428749,433663,438605,443575,448573,453599,458653,463735,468845,473983,479149,484343,489565,494815,500093,505399,510733,516095,521485,526903,532349,537823,543325,548855,554413,559999,565613,571255,576925,582623,588349,594103,599885,605695,611533,617399,623293,629215,635165,641143,647149,653183,659245,665335,671453,677599,683773,689975,696205,702463,708749,715063,721405,727775,734173,740599,747053,753535,760045,766583,773149,779743,786365,793015,799693,806399,813133,819895,826685,833503,840349,847223,854125,861055,868013,874999
mov $1,2
add $1,$0
mul $1,$0
mul $1,14
add $1,13
|
Irvine/Examples/ch10/Macro2.asm | alieonsido/ASM_TESTING | 0 | 23467 | <gh_stars>0
; Useful Macros (Macro2.ASM)
; This program demonstrates several useful macros:
; mGotoxy, mWrite, mWriteLn, mWriteStr, mReadStr,
; and mDumpMem.
INCLUDE Irvine32.inc
;-----------------------------------------------------
mWriteStr MACRO buffer
;
; Improved version of mWriteStr that checks for
; a blank argument.
;-----------------------------------------------------
IFB <buffer>
ECHO -----------------------------------------
ECHO * Error: parameter missing in mWriteStr
ECHO * (no code generated)
ECHO -----------------------------------------
EXITM
ENDIF
push edx
mov edx,OFFSET buffer
call WriteString
pop edx
ENDM
;-----------------------------------------------------
mWrite MACRO text
;
; No changes to this macro.
;-----------------------------------------------------
LOCAL string
.data ;; local data
string BYTE text,0 ;; define the string
.code
push edx
mov edx,OFFSET string
call Writestring
pop edx
ENDM
;-----------------------------------------------------
; This version supplies a default argument.
mWriteLn MACRO text := < " " >
;-----------------------------------------------------
mWrite text
call Crlf
ENDM
;-----------------------------------------------------
mGotoxyConst MACRO X:REQ, Y:REQ
;
; Set the cursor position
; This version checks the ranges of X and Y.
; are not used.
;------------------------------------------------------
LOCAL ERRS ;; local constant
ERRS = 0
IF (X LT 0) OR (X GT 79)
ECHO Warning: First argument to mGotoxy (X) is out of range.
ECHO ********************************************************
ERRS = 1
ENDIF
IF (Y LT 0) OR (Y GT 24)
ECHO Warning: Second argument to mGotoxy (Y) is out of range.
ECHO ********************************************************
ERRS = ERRS + 1
ENDIF
IF ERRS GT 0 ;; if errors found,
EXITM ;; exit the macro
ENDIF
push edx
mov dh,Y
mov dl,X
call Gotoxy
pop edx
ENDM
;------------------------------------------------------
mReadStr MACRO bufferPtr, maxChars
;
; Read from standard input into a buffer.
; EDX cannot be the second argument.
;------------------------------------------------------
IFIDNI <maxChars> , <EDX>
ECHO Warning: EDX cannot be second argument to mReadStr.
ECHO ***************************************************
EXITM
ENDIF
push ecx
push edx
mov edx,bufferPtr
mov ecx,maxChars
call ReadString
pop edx
pop ecx
ENDM
;---------------------------------------------------
ShowRegister MACRO regName
LOCAL tempStr
;
; Display a register's name and contents.
;---------------------------------------------------
.data
tempStr BYTE " ®Name=",0
.code
push eax
; Display the register name
push edx
mov edx,offset tempStr
call WriteString
pop edx
; Display the register contents
mov eax,regName
call WriteHex
pop eax
ENDM
.data
message BYTE "Hello there",0
buffer BYTE 50 DUP(?)
BadYValue TEXTEQU <Warning: Y-coordinate is !> 24>
ShowWarning MACRO message
mWrite "&message"
ENDM
count = 4
sumVal TEXTEQU %5 + count ; sumVal = 9
.code
main PROC
mGotoxyConst %5 * 10, %3 + 4
;ShowWarning %BadYValue
call Crlf
call Crlf
ShowRegister ECX
mReadStr OFFSET buffer,50 ; ok
mov edx,50
;mReadStr buffer,edx ; generates warning
mGotoxyConst 10,20
mWrite "Line one"
mWriteLn ; missing argument
mWriteLn "Line two"
mWrite <"Line three",0dh,0ah>
;mWriteStr ; missing argument
exit
main ENDP
END main |
ThirdParty/FreeRTOS/Source/portable/CCS/MSP430X/portext.asm | OpenNuvoton/M0519BSP | 8 | 92854 | <filename>ThirdParty/FreeRTOS/Source/portable/CCS/MSP430X/portext.asm
;
;/*
; FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.
; All rights reserved
;
;
; ***************************************************************************
; * *
; * FreeRTOS tutorial books are available in pdf and paperback. *
; * Complete, revised, and edited pdf reference manuals are also *
; * available. *
; * *
; * Purchasing FreeRTOS documentation will not only help you, by *
; * ensuring you get running as quickly as possible and with an *
; * in-depth knowledge of how to use FreeRTOS, it will also help *
; * the FreeRTOS project to continue with its mission of providing *
; * professional grade, cross platform, de facto standard solutions *
; * for microcontrollers - completely free of charge! *
; * *
; * >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
; * *
; * Thank you for using FreeRTOS, and thank you for your support! *
; * *
; ***************************************************************************
;
;
; This file is part of the FreeRTOS distribution.
;
; FreeRTOS is free software; you can redistribute it and/or modify it under
; the terms of the GNU General Public License (version 2) as published by the
; Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
; >>>NOTE<<< The modification to the GPL is included to allow you to
; distribute a combined work that includes FreeRTOS without being obliged to
; provide the source code for proprietary components outside of the FreeRTOS
; kernel. FreeRTOS is distributed in the hope that it will be useful, but
; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
; more details. You should have received a copy of the GNU General Public
; License and the FreeRTOS license exception along with FreeRTOS; if not it
; can be viewed here: http://www.freertos.org/a00114.html and also obtained
; by writing to <NAME>, contact details for whom are available on the
; FreeRTOS WEB site.
;
; 1 tab == 4 spaces!
;
; http://www.FreeRTOS.org - Documentation, latest information, license and
; contact details.
;
; http://www.SafeRTOS.com - A version that is certified for use in safety
; critical systems.
;
; http://www.OpenRTOS.com - Commercial support, development, porting,
; licensing and training services.
;*/
; * The definition of the "register test" tasks, as described at the top of
; * main.c
.include data_model.h
.global xTaskIncrementTick
.global vTaskSwitchContext
.global vPortSetupTimerInterrupt
.global pxCurrentTCB
.global usCriticalNesting
.def vPortPreemptiveTickISR
.def vPortCooperativeTickISR
.def vPortYield
.def xPortStartScheduler
;-----------------------------------------------------------
portSAVE_CONTEXT .macro
;Save the remaining registers.
pushm_x #12, r15
mov.w &usCriticalNesting, r14
push_x r14
mov_x &pxCurrentTCB, r12
mov_x sp, 0( r12 )
.endm
;-----------------------------------------------------------
portRESTORE_CONTEXT .macro
mov_x &pxCurrentTCB, r12
mov_x @r12, sp
pop_x r15
mov.w r15, &usCriticalNesting
popm_x #12, r15
pop.w sr
ret_x
.endm
;-----------------------------------------------------------
;*
;* The RTOS tick ISR.
;*
;* If the cooperative scheduler is in use this simply increments the tick
;* count.
;*
;* If the preemptive scheduler is in use a context switch can also occur.
;*/
.text
.align 2
vPortPreemptiveTickISR: .asmfunc
; The sr is not saved in portSAVE_CONTEXT() because vPortYield() needs
;to save it manually before it gets modified (interrupts get disabled).
push.w sr
portSAVE_CONTEXT
call_x #xTaskIncrementTick
call_x #vTaskSwitchContext
portRESTORE_CONTEXT
.endasmfunc
;-----------------------------------------------------------
.align 2
vPortCooperativeTickISR: .asmfunc
; The sr is not saved in portSAVE_CONTEXT() because vPortYield() needs
;to save it manually before it gets modified (interrupts get disabled).
push.w sr
portSAVE_CONTEXT
call_x #xTaskIncrementTick
portRESTORE_CONTEXT
.endasmfunc
;-----------------------------------------------------------
;
; Manual context switch called by the portYIELD() macro.
;
.align 2
vPortYield: .asmfunc
; The sr needs saving before it is modified.
push.w sr
; Now the SR is stacked we can disable interrupts.
dint
nop
; Save the context of the current task.
portSAVE_CONTEXT
; Select the next task to run.
call_x #vTaskSwitchContext
; Restore the context of the new task.
portRESTORE_CONTEXT
.endasmfunc
;-----------------------------------------------------------
;
; Start off the scheduler by initialising the RTOS tick timer, then restoring
; the context of the first task.
;
.align 2
xPortStartScheduler: .asmfunc
; Setup the hardware to generate the tick. Interrupts are disabled
; when this function is called.
call_x #vPortSetupTimerInterrupt
; Restore the context of the first task that is going to run.
portRESTORE_CONTEXT
.endasmfunc
;-----------------------------------------------------------
.end
|
llvm-gcc-4.2-2.9/gcc/ada/scans.ads | vidkidz/crossbridge | 1 | 27384 | ------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S C A N S --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2006, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
-- Boston, MA 02110-1301, USA. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- this unit does not by itself cause the resulting executable to be --
-- covered by the GNU General Public License. This exception does not --
-- however invalidate any other reasons why the executable file might be --
-- covered by the GNU Public License. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Types; use Types;
with Uintp; use Uintp;
with Urealp; use Urealp;
package Scans is
-- The scanner maintains a current state in the global variables defined
-- in this package. The call to the Scan routine advances this state to
-- the next token. The state is initialized by the call to one of the
-- initialization routines in Sinput.
-- The following type is used to identify token types returned by Scan.
-- The class column in this table indicates the token classes which
-- apply to the token, as defined by subsquent subtype declarations.
-- Note: Namet.Is_Keyword_Name depends on the fact that the first entry in
-- this type declaration is *not* for a reserved word. For details on why
-- there is this requirement, see Scans.Initialize_Ada_Keywords.
type Token_Type is (
-- Token name Token type Class(es)
Tok_Integer_Literal, -- numeric lit Literal, Lit_Or_Name
Tok_Real_Literal, -- numeric lit Literal, Lit_Or_Name
Tok_String_Literal, -- string lit Literal. Lit_Or_Name
Tok_Char_Literal, -- char lit Name, Literal. Lit_Or_Name
Tok_Operator_Symbol, -- op symbol Name, Literal, Lit_Or_Name, Desig
Tok_Identifier, -- identifer Name, Lit_Or_Name, Desig
Tok_Double_Asterisk, -- **
Tok_Ampersand, -- & Binary_Addop
Tok_Minus, -- - Binary_Addop, Unary_Addop
Tok_Plus, -- + Binary_Addop, Unary_Addop
Tok_Asterisk, -- * Mulop
Tok_Mod, -- MOD Mulop
Tok_Rem, -- REM Mulop
Tok_Slash, -- / Mulop
Tok_New, -- NEW
Tok_Abs, -- ABS
Tok_Others, -- OTHERS
Tok_Null, -- NULL
Tok_Dot, -- . Namext
Tok_Apostrophe, -- ' Namext
Tok_Left_Paren, -- ( Namext, Consk
Tok_Delta, -- DELTA Atkwd, Sterm, Consk
Tok_Digits, -- DIGITS Atkwd, Sterm, Consk
Tok_Range, -- RANGE Atkwd, Sterm, Consk
Tok_Right_Paren, -- ) Sterm
Tok_Comma, -- , Sterm
Tok_And, -- AND Logop, Sterm
Tok_Or, -- OR Logop, Sterm
Tok_Xor, -- XOR Logop, Sterm
Tok_Less, -- < Relop, Sterm
Tok_Equal, -- = Relop, Sterm
Tok_Greater, -- > Relop, Sterm
Tok_Not_Equal, -- /= Relop, Sterm
Tok_Greater_Equal, -- >= Relop, Sterm
Tok_Less_Equal, -- <= Relop, Sterm
Tok_In, -- IN Relop, Sterm
Tok_Not, -- NOT Relop, Sterm
Tok_Box, -- <> Relop, Eterm, Sterm
Tok_Colon_Equal, -- := Eterm, Sterm
Tok_Colon, -- : Eterm, Sterm
Tok_Greater_Greater, -- >> Eterm, Sterm
Tok_Abstract, -- ABSTRACT Eterm, Sterm
Tok_Access, -- ACCESS Eterm, Sterm
Tok_Aliased, -- ALIASED Eterm, Sterm
Tok_All, -- ALL Eterm, Sterm
Tok_Array, -- ARRAY Eterm, Sterm
Tok_At, -- AT Eterm, Sterm
Tok_Body, -- BODY Eterm, Sterm
Tok_Constant, -- CONSTANT Eterm, Sterm
Tok_Do, -- DO Eterm, Sterm
Tok_Is, -- IS Eterm, Sterm
Tok_Interface, -- INTERFACE Eterm, Sterm
Tok_Limited, -- LIMITED Eterm, Sterm
Tok_Of, -- OF Eterm, Sterm
Tok_Out, -- OUT Eterm, Sterm
Tok_Record, -- RECORD Eterm, Sterm
Tok_Renames, -- RENAMES Eterm, Sterm
Tok_Reverse, -- REVERSE Eterm, Sterm
Tok_Tagged, -- TAGGED Eterm, Sterm
Tok_Then, -- THEN Eterm, Sterm
Tok_Less_Less, -- << Eterm, Sterm, After_SM
Tok_Abort, -- ABORT Eterm, Sterm, After_SM
Tok_Accept, -- ACCEPT Eterm, Sterm, After_SM
Tok_Case, -- CASE Eterm, Sterm, After_SM
Tok_Delay, -- DELAY Eterm, Sterm, After_SM
Tok_Else, -- ELSE Eterm, Sterm, After_SM
Tok_Elsif, -- ELSIF Eterm, Sterm, After_SM
Tok_End, -- END Eterm, Sterm, After_SM
Tok_Exception, -- EXCEPTION Eterm, Sterm, After_SM
Tok_Exit, -- EXIT Eterm, Sterm, After_SM
Tok_Goto, -- GOTO Eterm, Sterm, After_SM
Tok_If, -- IF Eterm, Sterm, After_SM
Tok_Pragma, -- PRAGMA Eterm, Sterm, After_SM
Tok_Raise, -- RAISE Eterm, Sterm, After_SM
Tok_Requeue, -- REQUEUE Eterm, Sterm, After_SM
Tok_Return, -- RETURN Eterm, Sterm, After_SM
Tok_Select, -- SELECT Eterm, Sterm, After_SM
Tok_Terminate, -- TERMINATE Eterm, Sterm, After_SM
Tok_Until, -- UNTIL Eterm, Sterm, After_SM
Tok_When, -- WHEN Eterm, Sterm, After_SM
Tok_Begin, -- BEGIN Eterm, Sterm, After_SM, Labeled_Stmt
Tok_Declare, -- DECLARE Eterm, Sterm, After_SM, Labeled_Stmt
Tok_For, -- FOR Eterm, Sterm, After_SM, Labeled_Stmt
Tok_Loop, -- LOOP Eterm, Sterm, After_SM, Labeled_Stmt
Tok_While, -- WHILE Eterm, Sterm, After_SM, Labeled_Stmt
Tok_Entry, -- ENTRY Eterm, Sterm, Declk, Deckn, After_SM
Tok_Protected, -- PROTECTED Eterm, Sterm, Declk, Deckn, After_SM
Tok_Task, -- TASK Eterm, Sterm, Declk, Deckn, After_SM
Tok_Type, -- TYPE Eterm, Sterm, Declk, Deckn, After_SM
Tok_Subtype, -- SUBTYPE Eterm, Sterm, Declk, Deckn, After_SM
Tok_Overriding, -- OVERRIDING Eterm, Sterm, Declk, Declk, After_SM
Tok_Synchronized, -- SYNCHRONIZED Eterm, Sterm, Declk, Deckn, After_SM
Tok_Use, -- USE Eterm, Sterm, Declk, Deckn, After_SM
Tok_Function, -- FUNCTION Eterm, Sterm, Cunit, Declk, After_SM
Tok_Generic, -- GENERIC Eterm, Sterm, Cunit, Declk, After_SM
Tok_Package, -- PACKAGE Eterm, Sterm, Cunit, Declk, After_SM
Tok_Procedure, -- PROCEDURE Eterm, Sterm, Cunit, Declk, After_SM
Tok_Private, -- PRIVATE Eterm, Sterm, Cunit, After_SM
Tok_With, -- WITH Eterm, Sterm, Cunit, After_SM
Tok_Separate, -- SEPARATE Eterm, Sterm, Cunit, After_SM
Tok_EOF, -- End of file Eterm, Sterm, Cterm, After_SM
Tok_Semicolon, -- ; Eterm, Sterm, Cterm
Tok_Arrow, -- => Sterm, Cterm, Chtok
Tok_Vertical_Bar, -- | Cterm, Sterm, Chtok
Tok_Dot_Dot, -- .. Sterm, Chtok
Tok_Project,
Tok_Extends,
Tok_External,
-- These three entries represent keywords for the project file language
-- and can be returned only in the case of scanning project files.
Tok_Comment,
-- This entry is used when scanning project files (where it represents
-- an entire comment), and in preprocessing with the -C switch set
-- (where it represents just the "--" of a comment). For the project
-- file case, the text of the comment is stored in
Tok_End_Of_Line,
-- Represents an end of line. Not used during normal compilation scans
-- where end of line is ignored. Active for preprocessor scanning and
-- also when scanning project files (where it is neede because of ???)
Tok_Special,
-- Used only in preprocessor scanning (to represent one of the
-- characters '#', '$', '?', '@', '`', '\', '^', '~', or '_'. The
-- character value itself is stored in Scans.Special_Character.
No_Token);
-- No_Token is used for initializing Token values to indicate that
-- no value has been set yet.
-- Note: in the RM, operator symbol is a special case of string literal.
-- We distinguish at the lexical level in this compiler, since there are
-- many syntactic situations in which only an operator symbol is allowed.
-- The following subtype declarations group the token types into classes.
-- These are used for class tests in the parser.
subtype Token_Class_Numeric_Literal is
Token_Type range Tok_Integer_Literal .. Tok_Real_Literal;
-- Numeric literal
subtype Token_Class_Literal is
Token_Type range Tok_Integer_Literal .. Tok_Operator_Symbol;
-- Literal
subtype Token_Class_Lit_Or_Name is
Token_Type range Tok_Integer_Literal .. Tok_Identifier;
subtype Token_Class_Binary_Addop is
Token_Type range Tok_Ampersand .. Tok_Plus;
-- Binary adding operator (& + -)
subtype Token_Class_Unary_Addop is
Token_Type range Tok_Minus .. Tok_Plus;
-- Unary adding operator (+ -)
subtype Token_Class_Mulop is
Token_Type range Tok_Asterisk .. Tok_Slash;
-- Multiplying operator
subtype Token_Class_Logop is
Token_Type range Tok_And .. Tok_Xor;
-- Logical operator (and, or, xor)
subtype Token_Class_Relop is
Token_Type range Tok_Less .. Tok_Box;
-- Relational operator (= /= < <= > >= not, in plus <> to catch misuse
-- of Pascal style not equal operator).
subtype Token_Class_Name is
Token_Type range Tok_Char_Literal .. Tok_Identifier;
-- First token of name (4.1),
-- (identifier, char literal, operator symbol)
subtype Token_Class_Desig is
Token_Type range Tok_Operator_Symbol .. Tok_Identifier;
-- Token which can be a Designator (identifier, operator symbol)
subtype Token_Class_Namext is
Token_Type range Tok_Dot .. Tok_Left_Paren;
-- Name extension tokens. These are tokens which can appear immediately
-- after a name to extend it recursively (period, quote, left paren)
subtype Token_Class_Consk is
Token_Type range Tok_Left_Paren .. Tok_Range;
-- Keywords which can start constraint
-- (left paren, delta, digits, range)
subtype Token_Class_Eterm is
Token_Type range Tok_Colon_Equal .. Tok_Semicolon;
-- Expression terminators. These tokens can never appear within a simple
-- expression. This is used for error recovery purposes (if we encounter
-- an error in an expression, we simply scan to the next Eterm token).
subtype Token_Class_Sterm is
Token_Type range Tok_Delta .. Tok_Dot_Dot;
-- Simple_Expression terminators. A Simple_Expression must be followed
-- by a token in this class, or an error message is issued complaining
-- about a missing binary operator.
subtype Token_Class_Atkwd is
Token_Type range Tok_Delta .. Tok_Range;
-- Attribute keywords. This class includes keywords which can be used
-- as an Attribute_Designator, namely DELTA, DIGITS and RANGE
subtype Token_Class_Cterm is
Token_Type range Tok_EOF .. Tok_Vertical_Bar;
-- Choice terminators. These tokens terminate a choice. This is used for
-- error recovery purposes (if we encounter an error in a Choice, we
-- simply scan to the next Cterm token).
subtype Token_Class_Chtok is
Token_Type range Tok_Arrow .. Tok_Dot_Dot;
-- Choice tokens. These tokens signal a choice when used in an Aggregate
subtype Token_Class_Cunit is
Token_Type range Tok_Function .. Tok_Separate;
-- Tokens which can begin a compilation unit
subtype Token_Class_Declk is
Token_Type range Tok_Entry .. Tok_Procedure;
-- Keywords which start a declaration
subtype Token_Class_Deckn is
Token_Type range Tok_Entry .. Tok_Use;
-- Keywords which start a declaration but can't start a compilation unit
subtype Token_Class_After_SM is
Token_Type range Tok_Less_Less .. Tok_EOF;
-- Tokens which always, or almost always, appear after a semicolon. Used
-- in the Resync_Past_Semicolon routine to avoid gobbling up stuff when
-- a semicolon is missing. Of significance only for error recovery.
subtype Token_Class_Labeled_Stmt is
Token_Type range Tok_Begin .. Tok_While;
-- Tokens which start labeled statements
type Token_Flag_Array is array (Token_Type) of Boolean;
Is_Reserved_Keyword : constant Token_Flag_Array :=
Token_Flag_Array'
(Tok_Mod .. Tok_Rem => True,
Tok_New .. Tok_Null => True,
Tok_Delta .. Tok_Range => True,
Tok_And .. Tok_Xor => True,
Tok_In .. Tok_Not => True,
Tok_Abstract .. Tok_Then => True,
Tok_Abort .. Tok_Separate => True,
others => False);
-- Flag array used to test for reserved word
procedure Initialize_Ada_Keywords;
-- Set up Token_Type values in Names table entries for Ada reserved
-- words.
--------------------------
-- Scan State Variables --
--------------------------
-- Note: these variables can only be referenced during the parsing of a
-- file. Reference to any of them from Sem or the expander is wrong.
Scan_Ptr : Source_Ptr;
-- Current scan pointer location. After a call to Scan, this points
-- just past the end of the token just scanned.
Token : Token_Type;
-- Type of current token
Token_Ptr : Source_Ptr;
-- Pointer to first character of current token
Current_Line_Start : Source_Ptr;
-- Pointer to first character of line containing current token
Start_Column : Column_Number;
-- Starting column number (zero origin) of the first non-blank character
-- on the line containing the current token. This is used for error
-- recovery circuits which depend on looking at the column line up.
Checksum : Word;
-- Used to accumulate a CRC representing the tokens in the source
-- file being compiled. This CRC includes only program tokens, and
-- excludes comments.
First_Non_Blank_Location : Source_Ptr;
-- Location of first non-blank character on the line containing the
-- current token (i.e. the location of the character whose column number
-- is stored in Start_Column).
Token_Node : Node_Id := Empty;
-- Node table Id for the current token. This is set only if the current
-- token is one for which the scanner constructs a node (i.e. it is an
-- identifier, operator symbol, or literal. For other token types,
-- Token_Node is undefined.
Token_Name : Name_Id := No_Name;
-- For identifiers, this is set to the Name_Id of the identifier scanned.
-- For all other tokens, Token_Name is set to Error_Name. Note that it
-- would be possible for the caller to extract this information from
-- Token_Node. We set Token_Name separately for two reasons. First it
-- allows a quicker test for a specific identifier. Second, it allows
-- a version of the parser to be built that does not build tree nodes,
-- usable as a syntax checker.
Prev_Token : Token_Type := No_Token;
-- Type of previous token
Prev_Token_Ptr : Source_Ptr;
-- Pointer to first character of previous token
Version_To_Be_Found : Boolean;
-- This flag is True if the scanner is still looking for an RCS version
-- number in a comment. Normally it is initialized to False so that this
-- circuit is not activated. If the -dv switch is set, then this flag is
-- initialized to True, and then reset when the version number is found.
-- We do things this way to minimize the impact on comment scanning.
Character_Code : Char_Code;
-- Valid only when Token is Tok_Char_Literal
Real_Literal_Value : Ureal;
-- Valid only when Token is Tok_Real_Literal
Int_Literal_Value : Uint;
-- Valid only when Token = Tok_Integer_Literal;
String_Literal_Id : String_Id;
-- Id for currently scanned string value.
-- Valid only when Token = Tok_String_Literal or Tok_Operator_Symbol.
Wide_Character_Found : Boolean := False;
-- Set True if wide character found.
-- Valid only when Token = Tok_String_Literal.
Special_Character : Character;
-- Valid only when Token = Tok_Special. Returns one of the characters
-- '#', '$', '?', '@', '`', '\', '^', '~', or '_'.
--
-- Why only this set? What about wide characters???
Comment_Id : Name_Id := No_Name;
-- Valid only when Token = Tok_Comment. Store the string that follows
-- the "--" of a comment when scanning project files.
--
-- Is it really right for this to be a Name rather than a String, what
-- about the case of Wide_Wide_Characters???
--------------------------------------------------------
-- Procedures for Saving and Restoring the Scan State --
--------------------------------------------------------
-- The following procedures can be used to save and restore the entire
-- scan state. They are used in cases where it is necessary to backup
-- the scan during the parse.
type Saved_Scan_State is private;
-- Used for saving and restoring the scan state
procedure Save_Scan_State (Saved_State : out Saved_Scan_State);
pragma Inline (Save_Scan_State);
-- Saves the current scan state for possible later restoration. Note that
-- there is no harm in saving the state and then never restoring it.
procedure Restore_Scan_State (Saved_State : Saved_Scan_State);
pragma Inline (Restore_Scan_State);
-- Restores a scan state saved by a call to Save_Scan_State.
-- The saved scan state must refer to the current source file.
private
type Saved_Scan_State is record
Save_Scan_Ptr : Source_Ptr;
Save_Token : Token_Type;
Save_Token_Ptr : Source_Ptr;
Save_Current_Line_Start : Source_Ptr;
Save_Start_Column : Column_Number;
Save_Checksum : Word;
Save_First_Non_Blank_Location : Source_Ptr;
Save_Token_Node : Node_Id;
Save_Token_Name : Name_Id;
Save_Prev_Token : Token_Type;
Save_Prev_Token_Ptr : Source_Ptr;
end record;
end Scans;
|
Trash/test/Json.g4 | studentmain/AntlrVSIX | 67 | 2362 | grammar Json;
json: object
| array
;
object
: '{' pair (',' pair)* '}'
| '{' '}' // empty object
;
pair: STRING ':' value ;
array
: '[' value (',' value)* ']'
| '[' ']' // empty array
;
value
: STRING
| NUMBER
| object // indirect recursion
| array // indirec recursion
| 'true'
| 'false'
| 'null'
;
|
Transynther/x86/_processed/AVXALIGN/_zr_/i9-9900K_12_0xa0.log_21829_77.asm | ljhsiun2/medusa | 9 | 100874 | <reponame>ljhsiun2/medusa
.global s_prepare_buffers
s_prepare_buffers:
push %r13
push %r15
push %r9
push %rax
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_WT_ht+0x1d7fd, %rsi
lea addresses_WC_ht+0x1bed9, %rdi
nop
nop
sub %r9, %r9
mov $37, %rcx
rep movsq
nop
nop
nop
nop
add $25354, %rax
lea addresses_D_ht+0x9aad, %rdi
nop
nop
sub $53564, %rbp
mov (%rdi), %ax
nop
xor %rdi, %rdi
lea addresses_WT_ht+0x1678d, %rbp
nop
nop
nop
nop
nop
cmp $30371, %r13
movb (%rbp), %cl
nop
nop
nop
nop
cmp $36622, %r13
lea addresses_D_ht+0x2aad, %rsi
lea addresses_D_ht+0x1daed, %rdi
nop
nop
nop
nop
nop
sub %r13, %r13
mov $28, %rcx
rep movsl
nop
nop
nop
nop
sub $41394, %r9
lea addresses_A_ht+0x262d, %rdi
add $5673, %r13
movl $0x61626364, (%rdi)
nop
nop
nop
and %rbp, %rbp
lea addresses_normal_ht+0x5f5d, %rax
nop
nop
cmp %rdi, %rdi
mov (%rax), %r13w
nop
nop
cmp $23306, %rsi
lea addresses_WC_ht+0x1d0ad, %rsi
nop
nop
nop
nop
nop
and $9312, %rbp
movb $0x61, (%rsi)
cmp $14762, %r13
lea addresses_WC_ht+0xda8a, %r13
nop
xor $39747, %r9
mov (%r13), %eax
cmp $11721, %rsi
lea addresses_WT_ht+0x5c6d, %rax
nop
nop
nop
add $43991, %rsi
mov (%rax), %cx
nop
nop
nop
add %rax, %rax
lea addresses_WC_ht+0x6ead, %r9
nop
nop
and $4609, %rbp
movl $0x61626364, (%r9)
nop
cmp $2047, %rbp
lea addresses_A_ht+0x18cad, %rsi
lea addresses_D_ht+0x86ad, %rdi
nop
nop
cmp %r15, %r15
mov $25, %rcx
rep movsw
nop
nop
sub $54693, %rbp
lea addresses_D_ht+0x1c32d, %rcx
sub $33523, %rdi
mov (%rcx), %bp
nop
nop
nop
nop
nop
inc %r9
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r9
pop %r15
pop %r13
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r13
push %r14
push %r8
push %rbp
push %rbx
// Store
lea addresses_A+0x2893, %r14
nop
nop
nop
nop
cmp $31891, %r8
movl $0x51525354, (%r14)
nop
nop
nop
nop
cmp %r8, %r8
// Faulty Load
lea addresses_WC+0x1d2ad, %r8
nop
and $28723, %r14
movb (%r8), %bl
lea oracles, %r14
and $0xff, %rbx
shlq $12, %rbx
mov (%r14,%rbx,1), %rbx
pop %rbx
pop %rbp
pop %r8
pop %r14
pop %r13
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_WC', 'AVXalign': False, 'size': 2}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 1, 'type': 'addresses_A', 'AVXalign': False, 'size': 4}}
[Faulty Load]
{'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_WC', 'AVXalign': True, 'size': 1}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'same': False, 'congruent': 3, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 1, 'type': 'addresses_WC_ht'}}
{'src': {'NT': False, 'same': False, 'congruent': 11, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 2}, 'OP': 'LOAD'}
{'src': {'NT': False, 'same': True, 'congruent': 5, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 1}, 'OP': 'LOAD'}
{'src': {'same': False, 'congruent': 8, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'same': True, 'congruent': 6, 'type': 'addresses_D_ht'}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 7, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 4}}
{'src': {'NT': False, 'same': False, 'congruent': 2, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 2}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 9, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 1}}
{'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 4}, 'OP': 'LOAD'}
{'src': {'NT': False, 'same': True, 'congruent': 6, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 2}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'NT': False, 'same': True, 'congruent': 10, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 4}}
{'src': {'same': False, 'congruent': 9, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 6, 'type': 'addresses_D_ht'}}
{'src': {'NT': False, 'same': False, 'congruent': 7, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 2}, 'OP': 'LOAD'}
{'00': 21829}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
|
src/asf-converters-sizes.adb | jquorning/ada-asf | 12 | 29968 | <reponame>jquorning/ada-asf<gh_stars>10-100
-----------------------------------------------------------------------
-- asf-converters-sizes -- Size converter
-- Copyright (C) 2012 <NAME>
-- Written by <NAME> (<EMAIL>)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with Ada.Exceptions;
with Ada.Strings.Unbounded;
with Util.Locales;
with Util.Strings;
with Util.Properties.Bundles;
with ASF.Locales;
with ASF.Utils;
with ASF.Applications.Main;
package body ASF.Converters.Sizes is
ONE_KB : constant Long_Long_Integer := 1_024;
ONE_MB : constant Long_Long_Integer := ONE_KB * 1_024;
ONE_GB : constant Long_Long_Integer := ONE_MB * 1_024;
UNIT_GB : aliased constant String := "size_giga_bytes";
UNIT_MB : aliased constant String := "size_mega_bytes";
UNIT_KB : aliased constant String := "size_kilo_bytes";
UNIT_B : aliased constant String := "size_bytes";
-- ------------------------------
-- Convert the object value into a string. The object value is associated
-- with the specified component.
-- If the string cannot be converted, the Invalid_Conversion exception should be raised.
-- ------------------------------
function To_String (Convert : in Size_Converter;
Context : in ASF.Contexts.Faces.Faces_Context'Class;
Component : in ASF.Components.Base.UIComponent'Class;
Value : in Util.Beans.Objects.Object) return String is
pragma Unreferenced (Convert);
Bundle : ASF.Locales.Bundle;
Locale : constant Util.Locales.Locale := Context.Get_Locale;
begin
begin
ASF.Applications.Main.Load_Bundle (Context.Get_Application.all,
Name => "sizes",
Locale => Util.Locales.To_String (Locale),
Bundle => Bundle);
exception
when E : Util.Properties.Bundles.NO_BUNDLE =>
Component.Log_Error ("Cannot localize sizes: {0}",
Ada.Exceptions.Exception_Message (E));
end;
-- Convert the value as an integer here so that we can raise
-- the Invalid_Conversion exception.
declare
Size : constant Long_Long_Integer := Util.Beans.Objects.To_Long_Long_Integer (Value);
Val : Integer;
Values : ASF.Utils.Object_Array (1 .. 1);
Result : Ada.Strings.Unbounded.Unbounded_String;
Unit : Util.Strings.Name_Access;
begin
if Size >= ONE_GB then
Val := Integer ((Size + ONE_GB / 2) / ONE_GB);
Unit := UNIT_GB'Access;
elsif Size >= ONE_MB then
Val := Integer ((Size + ONE_MB / 2) / ONE_MB);
Unit := UNIT_MB'Access;
elsif Size >= ONE_KB then
Val := Integer ((Size + ONE_KB / 2) / ONE_KB);
Unit := UNIT_KB'Access;
else
Val := Integer (Size);
Unit := UNIT_B'Access;
end if;
Values (1) := Util.Beans.Objects.To_Object (Val);
ASF.Utils.Formats.Format (Bundle.Get (Unit.all), Values, Result);
return Ada.Strings.Unbounded.To_String (Result);
end;
exception
when E : others =>
raise ASF.Converters.Invalid_Conversion with Ada.Exceptions.Exception_Message (E);
end To_String;
-- ------------------------------
-- Convert the date string into an object for the specified component.
-- If the string cannot be converted, the Invalid_Conversion exception should be raised.
-- ------------------------------
function To_Object (Convert : in Size_Converter;
Context : in ASF.Contexts.Faces.Faces_Context'Class;
Component : in ASF.Components.Base.UIComponent'Class;
Value : in String) return Util.Beans.Objects.Object is
pragma Unreferenced (Convert, Context, Value);
begin
Component.Log_Error ("Conversion of string to a size is not implemented");
raise ASF.Converters.Invalid_Conversion with "Not implemented";
return Util.Beans.Objects.Null_Object;
end To_Object;
end ASF.Converters.Sizes;
|
src/Human/Nat.agda | MaisaMilena/JuiceMaker | 6 | 33 | <reponame>MaisaMilena/JuiceMaker
module Human.Nat where
open import Human.Bool
data Nat : Set where
zero : Nat
suc : Nat → Nat
{-# BUILTIN NATURAL Nat #-}
infix 4 _==_ _<_
infixl 6 _+_ _-_
infixl 7 _*_
-- add theses guys on infixl 7: _div_ _%_
_+_ : Nat → Nat → Nat
zero + m = m
suc n + m = suc (n + m)
{-# BUILTIN NATPLUS _+_ #-}
_-_ : Nat → Nat → Nat
n - zero = n
zero - suc m = zero
suc n - suc m = n - m
{-# BUILTIN NATMINUS _-_ #-}
_*_ : Nat → Nat → Nat
zero * m = zero
suc n * m = m + n * m
{-# BUILTIN NATTIMES _*_ #-}
_==_ : Nat → Nat → Bool
zero == zero = true
suc n == suc m = n == m
_ == _ = false
{-# BUILTIN NATEQUALS _==_ #-}
_<_ : Nat → Nat → Bool
_ < zero = false
zero < suc _ = true
suc n < suc m = n < m
{-# BUILTIN NATLESS _<_ #-}
div-helper : (k m n j : Nat) → Nat
div-helper k m zero j = k
div-helper k m (suc n) zero = div-helper (suc k) m n m
div-helper k m (suc n) (suc j) = div-helper k m n j
{-# BUILTIN NATDIVSUCAUX div-helper #-}
mod-helper : (k m n j : Nat) → Nat
mod-helper k m zero j = k
mod-helper k m (suc n) zero = mod-helper 0 m n m
mod-helper k m (suc n) (suc j) = mod-helper (suc k) m n j
{-# BUILTIN NATMODSUCAUX mod-helper #-}
|
source/mpfr.ads | ytomino/gmp-ada | 4 | 17936 | with GMP;
private with C.mpfr;
package MPFR is
pragma Preelaborate;
pragma Linker_Options ("-lmpfr");
function Version return String;
subtype Number_Base is GMP.Number_Base;
type Precision is mod 2 ** GMP.Exponent'Size;
type Rounding is (
To_Nearest_With_Ties_Away_From_Zero,
To_Nearest,
Towards_Zero,
Towards_Plus_Infinity,
Towards_Minus_Infinity,
Away_From_Zero,
Faithful);
function Default_Precision return Precision;
function Default_Rounding return Rounding;
private
pragma Compile_Time_Error (
Precision'Last /= Precision (C.mpfr.mpfr_uprec_t'Last),
"please adjust Precision as mpfr_uprec_t");
for Rounding use (
To_Nearest_With_Ties_Away_From_Zero =>
C.mpfr.mpfr_rnd_t'Enum_Rep (C.mpfr.MPFR_RNDNA),
To_Nearest =>
C.mpfr.mpfr_rnd_t'Enum_Rep (C.mpfr.MPFR_RNDN),
Towards_Zero =>
C.mpfr.mpfr_rnd_t'Enum_Rep (C.mpfr.MPFR_RNDZ),
Towards_Plus_Infinity =>
C.mpfr.mpfr_rnd_t'Enum_Rep (C.mpfr.MPFR_RNDU),
Towards_Minus_Infinity =>
C.mpfr.mpfr_rnd_t'Enum_Rep (C.mpfr.MPFR_RNDD),
Away_From_Zero =>
C.mpfr.mpfr_rnd_t'Enum_Rep (C.mpfr.MPFR_RNDA),
Faithful =>
C.mpfr.mpfr_rnd_t'Enum_Rep (C.mpfr.MPFR_RNDF));
end MPFR;
|
synth-unicity.agda | hazelgrove/hazelnut-dynamics-agda | 16 | 2171 | <reponame>hazelgrove/hazelnut-dynamics-agda
open import Prelude
open import core
open import contexts
module synth-unicity where
-- synthesis only produces equal types. note that there is no need for an
-- analagous theorem for analytic positions because we think of
-- the type as an input
synthunicity : {Γ : tctx} {e : hexp} {t t' : htyp} →
(Γ ⊢ e => t)
→ (Γ ⊢ e => t')
→ t == t'
synthunicity (SAsc _) (SAsc _) = refl
synthunicity {Γ = G} (SVar in1) (SVar in2) = ctxunicity {Γ = G} in1 in2
synthunicity (SAp _ D1 MAHole _) (SAp _ D2 MAHole y) = refl
synthunicity (SAp _ D1 MAHole _) (SAp _ D2 MAArr y) with synthunicity D1 D2
... | ()
synthunicity (SAp _ D1 MAArr _) (SAp _ D2 MAHole y) with synthunicity D1 D2
... | ()
synthunicity (SAp _ D1 MAArr _) (SAp _ D2 MAArr y) with synthunicity D1 D2
... | refl = refl
synthunicity SEHole SEHole = refl
synthunicity (SNEHole _ _) (SNEHole _ _) = refl
synthunicity SConst SConst = refl
synthunicity (SLam _ D1) (SLam _ D2) with synthunicity D1 D2
synthunicity (SLam x₁ D1) (SLam x₂ D2) | refl = refl
|
theorems/homotopy/Bouquet.agda | timjb/HoTT-Agda | 294 | 15921 | <gh_stars>100-1000
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
open import homotopy.FinWedge
module homotopy.Bouquet where
Rose : ∀ {i} (I : Type i) → Type i
Rose I = BigWedge {A = I} (λ _ → ⊙S¹)
Bouquet-family : ∀ {i} (I : Type i) (m : ℕ) → (I → Ptd₀)
Bouquet-family I m _ = ⊙Sphere m
Bouquet : ∀ {i} (I : Type i) (m : ℕ) → Type i
Bouquet I m = BigWedge (Bouquet-family I m)
⊙Bouquet : ∀ {i} (I : Type i) (m : ℕ) → Ptd i
⊙Bouquet I m = ⊙BigWedge (Bouquet-family I m)
BouquetLift-family : ∀ {i} (I : Type i) (m : ℕ) → (I → Ptd i)
BouquetLift-family {i} I m _ = ⊙Lift {j = i} (⊙Sphere m)
BouquetLift : ∀ {i} (I : Type i) (m : ℕ) → Type i
BouquetLift {i} I m = BigWedge (BouquetLift-family I m)
⊙BouquetLift : ∀ {i} (I : Type i) (m : ℕ) → Ptd i
⊙BouquetLift {i} I m = ⊙BigWedge (BouquetLift-family I m)
FinBouquetLift-family : ∀ {i} (I m : ℕ) → (Fin I → Ptd i)
FinBouquetLift-family {i} I m _ = ⊙Lift {j = i} (⊙Sphere m)
⊙FinBouquetLift : ∀ {i} (I m : ℕ) → Ptd i
⊙FinBouquetLift I m = ⊙FinWedge (FinBouquetLift-family I m)
FinBouquet-family : (I m : ℕ) → (Fin I → Ptd₀)
FinBouquet-family I m _ = ⊙Sphere m
FinBouquet : (I m : ℕ) → Type₀
FinBouquet I m = FinWedge (FinBouquet-family I m)
⊙FinBouquet : (I m : ℕ) → Ptd₀
⊙FinBouquet I m = ⊙FinWedge (FinBouquet-family I m)
|
data/jpred4/jp_batch_1613899824__Avxh73x/jp_batch_1613899824__Avxh73x.als | jonriege/predict-protein-structure | 0 | 5291 | <reponame>jonriege/predict-protein-structure
SILENT_MODE
BLOCK_FILE jp_batch_1613899824__Avxh73x.concise.blc
MAX_NSEQ 784
MAX_INPUT_LEN 786
OUTPUT_FILE jp_batch_1613899824__Avxh73x.concise.ps
PORTRAIT
POINTSIZE 8
IDENT_WIDTH 12
X_OFFSET 2
Y_OFFSET 2
DEFINE_FONT 0 Helvetica DEFAULT
DEFINE_FONT 1 Helvetica REL 0.75
DEFINE_FONT 7 Helvetica REL 0.6
DEFINE_FONT 3 Helvetica-Bold DEFAULT
DEFINE_FONT 4 Times-Bold DEFAULT
DEFINE_FONT 5 Helvetica-BoldOblique DEFAULT
#
DEFINE_COLOUR 3 1 0.62 0.67 # Turquiose
DEFINE_COLOUR 4 1 1 0 # Yellow
DEFINE_COLOUR 5 1 0 0 # Red
DEFINE_COLOUR 7 1 0 1 # Purple
DEFINE_COLOUR 8 0 0 1 # Blue
DEFINE_COLOUR 9 0 1 0 # Green
DEFINE_COLOUR 10 0.41 0.64 1.00 # Pale blue
DEFINE_COLOUR 11 0.41 0.82 0.67 # Pale green
DEFINE_COLOUR 50 0.69 0.18 0.37 # Pink (helix)
DEFINE_COLOUR 51 1.00 0.89 0.00 # Gold (strand)
NUMBER_INT 10
SETUP
#
# Highlight specific residues.
# Avoid highlighting Lupas 'C' predictions by
# limiting the highlighting to the alignments
Scol_CHARS C 1 1 108 773 4
Ccol_CHARS H ALL 5
Ccol_CHARS P ALL 8
SURROUND_CHARS LIV ALL
#
# Replace known structure types with whitespace
SUB_CHARS 1 774 108 783 H SPACE
SUB_CHARS 1 774 108 783 E SPACE
SUB_CHARS 1 774 108 783 - SPACE
STRAND 57 777 58
COLOUR_TEXT_REGION 57 777 58 777 51
STRAND 96 777 97
COLOUR_TEXT_REGION 96 777 97 777 51
HELIX 8 777 18
COLOUR_TEXT_REGION 8 777 18 777 50
HELIX 26 777 34
COLOUR_TEXT_REGION 26 777 34 777 50
HELIX 40 777 51
COLOUR_TEXT_REGION 40 777 51 777 50
HELIX 59 777 70
COLOUR_TEXT_REGION 59 777 70 777 50
HELIX 79 777 90
COLOUR_TEXT_REGION 79 777 90 777 50
HELIX 98 777 106
COLOUR_TEXT_REGION 98 777 106 777 50
STRAND 57 782 59
COLOUR_TEXT_REGION 57 782 59 782 51
STRAND 96 782 98
COLOUR_TEXT_REGION 96 782 98 782 51
HELIX 8 782 18
COLOUR_TEXT_REGION 8 782 18 782 50
HELIX 26 782 34
COLOUR_TEXT_REGION 26 782 34 782 50
HELIX 40 782 51
COLOUR_TEXT_REGION 40 782 51 782 50
HELIX 60 782 70
COLOUR_TEXT_REGION 60 782 70 782 50
HELIX 79 782 90
COLOUR_TEXT_REGION 79 782 90 782 50
HELIX 99 782 105
COLOUR_TEXT_REGION 99 782 105 782 50
HELIX 8 783 18
COLOUR_TEXT_REGION 8 783 18 783 50
HELIX 26 783 34
COLOUR_TEXT_REGION 26 783 34 783 50
HELIX 40 783 50
COLOUR_TEXT_REGION 40 783 50 783 50
HELIX 60 783 70
COLOUR_TEXT_REGION 60 783 70 783 50
HELIX 79 783 90
COLOUR_TEXT_REGION 79 783 90 783 50
HELIX 99 783 106
COLOUR_TEXT_REGION 99 783 106 783 50
|
Validation/pyFrame3DD-master/gcc-master/gcc/ada/lib-xref.adb | djamal2727/Main-Bearing-Analytical-Model | 0 | 204 | ------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- L I B . X R E F --
-- --
-- B o d y --
-- --
-- Copyright (C) 1998-2020, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING3. If not, go to --
-- http://www.gnu.org/licenses for a complete copy of the license. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Atree; use Atree;
with Csets; use Csets;
with Elists; use Elists;
with Errout; use Errout;
with Lib.Util; use Lib.Util;
with Nlists; use Nlists;
with Opt; use Opt;
with Restrict; use Restrict;
with Rident; use Rident;
with Sem; use Sem;
with Sem_Aux; use Sem_Aux;
with Sem_Prag; use Sem_Prag;
with Sem_Util; use Sem_Util;
with Sem_Warn; use Sem_Warn;
with Sinfo; use Sinfo;
with Sinput; use Sinput;
with Snames; use Snames;
with Stringt; use Stringt;
with Stand; use Stand;
with Table; use Table;
with GNAT.Heap_Sort_G;
with GNAT.HTable;
package body Lib.Xref is
------------------
-- Declarations --
------------------
package Deferred_References is new Table.Table (
Table_Component_Type => Deferred_Reference_Entry,
Table_Index_Type => Int,
Table_Low_Bound => 0,
Table_Initial => 512,
Table_Increment => 200,
Table_Name => "Name_Deferred_References");
-- The Xref table is used to record references. The Loc field is set
-- to No_Location for a definition entry.
subtype Xref_Entry_Number is Int;
type Xref_Key is record
-- These are the components of Xref_Entry that participate in hash
-- lookups.
Ent : Entity_Id;
-- Entity referenced (E parameter to Generate_Reference)
Loc : Source_Ptr;
-- Location of reference (Original_Location (Sloc field of N parameter
-- to Generate_Reference)). Set to No_Location for the case of a
-- defining occurrence.
Typ : Character;
-- Reference type (Typ param to Generate_Reference)
Eun : Unit_Number_Type;
-- Unit number corresponding to Ent
Lun : Unit_Number_Type;
-- Unit number corresponding to Loc. Value is undefined and not
-- referenced if Loc is set to No_Location.
-- The following components are only used for SPARK cross-references
Ref_Scope : Entity_Id;
-- Entity of the closest subprogram or package enclosing the reference
Ent_Scope : Entity_Id;
-- Entity of the closest subprogram or package enclosing the definition,
-- which should be located in the same file as the definition itself.
end record;
type Xref_Entry is record
Key : Xref_Key;
Ent_Scope_File : Unit_Number_Type;
-- File for entity Ent_Scope
Def : Source_Ptr;
-- Original source location for entity being referenced. Note that these
-- values are used only during the output process, they are not set when
-- the entries are originally built. This is because private entities
-- can be swapped when the initial call is made.
HTable_Next : Xref_Entry_Number;
-- For use only by Static_HTable
end record;
package Xrefs is new Table.Table (
Table_Component_Type => Xref_Entry,
Table_Index_Type => Xref_Entry_Number,
Table_Low_Bound => 1,
Table_Initial => Alloc.Xrefs_Initial,
Table_Increment => Alloc.Xrefs_Increment,
Table_Name => "Xrefs");
--------------
-- Xref_Set --
--------------
-- We keep a set of xref entries, in order to avoid inserting duplicate
-- entries into the above Xrefs table. An entry is in Xref_Set if and only
-- if it is in Xrefs.
Num_Buckets : constant := 2**16;
subtype Header_Num is Integer range 0 .. Num_Buckets - 1;
type Null_Type is null record;
pragma Unreferenced (Null_Type);
function Hash (F : Xref_Entry_Number) return Header_Num;
function Equal (F1, F2 : Xref_Entry_Number) return Boolean;
procedure HT_Set_Next (E : Xref_Entry_Number; Next : Xref_Entry_Number);
function HT_Next (E : Xref_Entry_Number) return Xref_Entry_Number;
function Get_Key (E : Xref_Entry_Number) return Xref_Entry_Number;
pragma Inline (Hash, Equal, HT_Set_Next, HT_Next, Get_Key);
package Xref_Set is new GNAT.HTable.Static_HTable (
Header_Num,
Element => Xref_Entry,
Elmt_Ptr => Xref_Entry_Number,
Null_Ptr => 0,
Set_Next => HT_Set_Next,
Next => HT_Next,
Key => Xref_Entry_Number,
Get_Key => Get_Key,
Hash => Hash,
Equal => Equal);
-----------------------------
-- SPARK Xrefs Information --
-----------------------------
package body SPARK_Specific is separate;
------------------------
-- Local Subprograms --
------------------------
procedure Add_Entry (Key : Xref_Key; Ent_Scope_File : Unit_Number_Type);
-- Add an entry to the tables of Xref_Entries, avoiding duplicates
procedure Generate_Prim_Op_References (Typ : Entity_Id);
-- For a tagged type, generate implicit references to its primitive
-- operations, for source navigation. This is done right before emitting
-- cross-reference information rather than at the freeze point of the type
-- in order to handle late bodies that are primitive operations.
function Lt (T1, T2 : Xref_Entry) return Boolean;
-- Order cross-references
---------------
-- Add_Entry --
---------------
procedure Add_Entry (Key : Xref_Key; Ent_Scope_File : Unit_Number_Type) is
begin
Xrefs.Increment_Last; -- tentative
Xrefs.Table (Xrefs.Last).Key := Key;
-- Set the entry in Xref_Set, and if newly set, keep the above
-- tentative increment.
if Xref_Set.Set_If_Not_Present (Xrefs.Last) then
Xrefs.Table (Xrefs.Last).Ent_Scope_File := Ent_Scope_File;
-- Leave Def and HTable_Next uninitialized
Set_Has_Xref_Entry (Key.Ent);
-- It was already in Xref_Set, so throw away the tentatively-added entry
else
Xrefs.Decrement_Last;
end if;
end Add_Entry;
---------------------
-- Defer_Reference --
---------------------
procedure Defer_Reference (Deferred_Reference : Deferred_Reference_Entry) is
begin
-- If Get_Ignore_Errors, then we are in Preanalyze_Without_Errors, and
-- we should not record cross references, because that will cause
-- duplicates when we call Analyze.
if not Get_Ignore_Errors then
Deferred_References.Append (Deferred_Reference);
end if;
end Defer_Reference;
-----------
-- Equal --
-----------
function Equal (F1, F2 : Xref_Entry_Number) return Boolean is
Result : constant Boolean :=
Xrefs.Table (F1).Key = Xrefs.Table (F2).Key;
begin
return Result;
end Equal;
-------------------------
-- Generate_Definition --
-------------------------
procedure Generate_Definition (E : Entity_Id) is
begin
pragma Assert (Nkind (E) in N_Entity);
-- Note that we do not test Xref_Entity_Letters here. It is too early
-- to do so, since we are often called before the entity is fully
-- constructed, so that the Ekind is still E_Void.
if Opt.Xref_Active
-- Definition must come from source
-- We make an exception for subprogram child units that have no spec.
-- For these we generate a subprogram declaration for library use,
-- and the corresponding entity does not come from source.
-- Nevertheless, all references will be attached to it and we have
-- to treat is as coming from user code.
and then (Comes_From_Source (E) or else Is_Child_Unit (E))
-- And must have a reasonable source location that is not
-- within an instance (all entities in instances are ignored)
and then Sloc (E) > No_Location
and then Instantiation_Location (Sloc (E)) = No_Location
-- And must be a non-internal name from the main source unit
and then In_Extended_Main_Source_Unit (E)
and then not Is_Internal_Name (Chars (E))
then
Add_Entry
((Ent => E,
Loc => No_Location,
Typ => ' ',
Eun => Get_Source_Unit (Original_Location (Sloc (E))),
Lun => No_Unit,
Ref_Scope => Empty,
Ent_Scope => Empty),
Ent_Scope_File => No_Unit);
if In_Inlined_Body then
Set_Referenced (E);
end if;
end if;
end Generate_Definition;
---------------------------------
-- Generate_Operator_Reference --
---------------------------------
procedure Generate_Operator_Reference
(N : Node_Id;
T : Entity_Id)
is
begin
if not In_Extended_Main_Source_Unit (N) then
return;
end if;
-- If the operator is not a Standard operator, then we generate a real
-- reference to the user defined operator.
if Sloc (Entity (N)) /= Standard_Location then
Generate_Reference (Entity (N), N);
-- A reference to an implicit inequality operator is also a reference
-- to the user-defined equality.
if Nkind (N) = N_Op_Ne
and then not Comes_From_Source (Entity (N))
and then Present (Corresponding_Equality (Entity (N)))
then
Generate_Reference (Corresponding_Equality (Entity (N)), N);
end if;
-- For the case of Standard operators, we mark the result type as
-- referenced. This ensures that in the case where we are using a
-- derived operator, we mark an entity of the unit that implicitly
-- defines this operator as used. Otherwise we may think that no entity
-- of the unit is used. The actual entity marked as referenced is the
-- first subtype, which is the relevant user defined entity.
-- Note: we only do this for operators that come from source. The
-- generated code sometimes reaches for entities that do not need to be
-- explicitly visible (for example, when we expand the code for
-- comparing two record objects, the fields of the record may not be
-- visible).
elsif Comes_From_Source (N) then
Set_Referenced (First_Subtype (T));
end if;
end Generate_Operator_Reference;
---------------------------------
-- Generate_Prim_Op_References --
---------------------------------
procedure Generate_Prim_Op_References (Typ : Entity_Id) is
Base_T : Entity_Id;
Prim : Elmt_Id;
Prim_List : Elist_Id;
begin
-- Handle subtypes of synchronized types
if Ekind (Typ) = E_Protected_Subtype
or else Ekind (Typ) = E_Task_Subtype
then
Base_T := Etype (Typ);
else
Base_T := Typ;
end if;
-- References to primitive operations are only relevant for tagged types
if not Is_Tagged_Type (Base_T)
or else Is_Class_Wide_Type (Base_T)
then
return;
end if;
-- Ada 2005 (AI-345): For synchronized types generate reference to the
-- wrapper that allow us to dispatch calls through their implemented
-- abstract interface types.
-- The check for Present here is to protect against previously reported
-- critical errors.
Prim_List := Primitive_Operations (Base_T);
if No (Prim_List) then
return;
end if;
Prim := First_Elmt (Prim_List);
while Present (Prim) loop
-- If the operation is derived, get the original for cross-reference
-- reference purposes (it is the original for which we want the xref
-- and for which the comes_from_source test must be performed).
Generate_Reference
(Typ, Ultimate_Alias (Node (Prim)), 'p', Set_Ref => False);
Next_Elmt (Prim);
end loop;
end Generate_Prim_Op_References;
------------------------
-- Generate_Reference --
------------------------
procedure Generate_Reference
(E : Entity_Id;
N : Node_Id;
Typ : Character := 'r';
Set_Ref : Boolean := True;
Force : Boolean := False)
is
Actual_Typ : Character := Typ;
Call : Node_Id;
Def : Source_Ptr;
Ent : Entity_Id;
Ent_Scope : Entity_Id;
Formal : Entity_Id;
Kind : Entity_Kind;
Nod : Node_Id;
Ref : Source_Ptr;
Ref_Scope : Entity_Id;
function Get_Through_Renamings (E : Entity_Id) return Entity_Id;
-- Get the enclosing entity through renamings, which may come from
-- source or from the translation of generic instantiations.
function Is_On_LHS (Node : Node_Id) return Boolean;
-- Used to check if a node is on the left hand side of an assignment.
-- The following cases are handled:
--
-- Variable Node is a direct descendant of left hand side of an
-- assignment statement.
--
-- Prefix Of an indexed or selected component that is present in
-- a subtree rooted by an assignment statement. There is
-- no restriction of nesting of components, thus cases
-- such as A.B (C).D are handled properly. However a prefix
-- of a dereference (either implicit or explicit) is never
-- considered as on a LHS.
--
-- Out param Same as above cases, but OUT parameter
function OK_To_Set_Referenced return Boolean;
-- Returns True if the Referenced flag can be set. There are a few
-- exceptions where we do not want to set this flag, see body for
-- details of these exceptional cases.
---------------------------
-- Get_Through_Renamings --
---------------------------
function Get_Through_Renamings (E : Entity_Id) return Entity_Id is
begin
case Ekind (E) is
-- For subprograms we just need to check once if they are have a
-- Renamed_Entity, because Renamed_Entity is set transitively.
when Subprogram_Kind =>
declare
Renamed : constant Entity_Id := Renamed_Entity (E);
begin
if Present (Renamed) then
return Renamed;
else
return E;
end if;
end;
-- For objects we need to repeatedly call Renamed_Object, because
-- it is not transitive.
when Object_Kind =>
declare
Obj : Entity_Id := E;
begin
loop
pragma Assert (Present (Obj));
declare
Renamed : constant Entity_Id := Renamed_Object (Obj);
begin
if Present (Renamed) then
Obj := Get_Enclosing_Object (Renamed);
-- The renamed expression denotes a non-object,
-- e.g. function call, slicing of a function call,
-- pointer dereference, etc.
if No (Obj) then
return Empty;
end if;
else
return Obj;
end if;
end;
end loop;
end;
when others =>
return E;
end case;
end Get_Through_Renamings;
---------------
-- Is_On_LHS --
---------------
-- ??? There are several routines here and there that perform a similar
-- (but subtly different) computation, which should be factored:
-- Sem_Util.Is_LHS
-- Sem_Util.May_Be_Lvalue
-- Sem_Util.Known_To_Be_Assigned
-- Exp_Ch2.Expand_Entry_Parameter.In_Assignment_Context
-- Exp_Smem.Is_Out_Actual
function Is_On_LHS (Node : Node_Id) return Boolean is
N : Node_Id;
P : Node_Id;
K : Node_Kind;
begin
-- Only identifiers are considered, is this necessary???
if Nkind (Node) /= N_Identifier then
return False;
end if;
-- Immediate return if appeared as OUT parameter
if Kind = E_Out_Parameter then
return True;
end if;
-- Search for assignment statement subtree root
N := Node;
loop
P := Parent (N);
K := Nkind (P);
if K = N_Assignment_Statement then
return Name (P) = N;
-- Check whether the parent is a component and the current node is
-- its prefix, but return False if the current node has an access
-- type, as in that case the selected or indexed component is an
-- implicit dereference, and the LHS is the designated object, not
-- the access object.
-- ??? case of a slice assignment?
elsif (K = N_Selected_Component or else K = N_Indexed_Component)
and then Prefix (P) = N
then
-- Check for access type. First a special test, In some cases
-- this is called too early (see comments in Find_Direct_Name),
-- at a point where the tree is not fully typed yet. In that
-- case we may lack an Etype for N, and we can't check the
-- Etype. For now, we always return False in such a case,
-- but this is clearly not right in all cases ???
if No (Etype (N)) then
return False;
elsif Is_Access_Type (Etype (N)) then
return False;
-- Access type case dealt with, keep going
else
N := P;
end if;
-- All other cases, definitely not on left side
else
return False;
end if;
end loop;
end Is_On_LHS;
---------------------------
-- OK_To_Set_Referenced --
---------------------------
function OK_To_Set_Referenced return Boolean is
P : Node_Id;
begin
-- A reference from a pragma Unreferenced or pragma Unmodified or
-- pragma Warnings does not cause the Referenced flag to be set.
-- This avoids silly warnings about things being referenced and
-- not assigned when the only reference is from the pragma.
if Nkind (N) = N_Identifier then
P := Parent (N);
if Nkind (P) = N_Pragma_Argument_Association then
P := Parent (P);
if Nkind (P) = N_Pragma then
if Pragma_Name_Unmapped (P) in Name_Warnings
| Name_Unmodified
| Name_Unreferenced
then
return False;
end if;
end if;
-- A reference to a formal in a named parameter association does
-- not make the formal referenced. Formals that are unused in the
-- subprogram body are properly flagged as such, even if calls
-- elsewhere use named notation.
elsif Nkind (P) = N_Parameter_Association
and then N = Selector_Name (P)
then
return False;
end if;
end if;
return True;
end OK_To_Set_Referenced;
-- Start of processing for Generate_Reference
begin
-- If Get_Ignore_Errors, then we are in Preanalyze_Without_Errors, and
-- we should not record cross references, because that will cause
-- duplicates when we call Analyze.
if Get_Ignore_Errors then
return;
end if;
-- May happen in case of severe errors
if Nkind (E) not in N_Entity then
return;
end if;
Find_Actual (N, Formal, Call);
if Present (Formal) then
Kind := Ekind (Formal);
else
Kind := E_Void;
end if;
-- Check for obsolescent reference to package ASCII. GNAT treats this
-- element of annex J specially since in practice, programs make a lot
-- of use of this feature, so we don't include it in the set of features
-- diagnosed when Warn_On_Obsolescent_Features mode is set. However we
-- are required to note it as a violation of the RM defined restriction.
if E = Standard_ASCII then
Check_Restriction (No_Obsolescent_Features, N);
end if;
-- Check for reference to entity marked with Is_Obsolescent
-- Note that we always allow obsolescent references in the compiler
-- itself and the run time, since we assume that we know what we are
-- doing in such cases. For example the calls in Ada.Characters.Handling
-- to its own obsolescent subprograms are just fine.
-- In any case we only generate warnings if we are in the extended main
-- source unit, and the entity itself is not in the extended main source
-- unit, since we assume the source unit itself knows what is going on
-- (and for sure we do not want silly warnings, e.g. on the end line of
-- an obsolescent procedure body).
if Is_Obsolescent (E)
and then not GNAT_Mode
and then not In_Extended_Main_Source_Unit (E)
and then In_Extended_Main_Source_Unit (N)
then
Check_Restriction (No_Obsolescent_Features, N);
if Warn_On_Obsolescent_Feature then
Output_Obsolescent_Entity_Warnings (N, E);
end if;
end if;
-- Warn if reference to Ada 2005 entity not in Ada 2005 mode. We only
-- detect real explicit references (modifications and references).
if Comes_From_Source (N)
and then Is_Ada_2005_Only (E)
and then Ada_Version < Ada_2005
and then Warn_On_Ada_2005_Compatibility
and then (Typ = 'm' or else Typ = 'r' or else Typ = 's')
then
Error_Msg_NE ("& is only defined in Ada 2005?y?", N, E);
end if;
-- Warn if reference to Ada 2012 entity not in Ada 2012 mode. We only
-- detect real explicit references (modifications and references).
if Comes_From_Source (N)
and then Is_Ada_2012_Only (E)
and then Ada_Version < Ada_2012
and then Warn_On_Ada_2012_Compatibility
and then (Typ = 'm' or else Typ = 'r')
then
Error_Msg_NE ("& is only defined in Ada 2012?y?", N, E);
end if;
-- Do not generate references if we are within a postcondition sub-
-- program, because the reference does not comes from source, and the
-- preanalysis of the aspect has already created an entry for the ALI
-- file at the proper source location.
if Chars (Current_Scope) = Name_uPostconditions then
return;
end if;
-- Never collect references if not in main source unit. However, we omit
-- this test if Typ is 'e' or 'k', since these entries are structural,
-- and it is useful to have them in units that reference packages as
-- well as units that define packages. We also omit the test for the
-- case of 'p' since we want to include inherited primitive operations
-- from other packages.
-- We also omit this test is this is a body reference for a subprogram
-- instantiation. In this case the reference is to the generic body,
-- which clearly need not be in the main unit containing the instance.
-- For the same reason we accept an implicit reference generated for
-- a default in an instance.
-- We also set the referenced flag in a generic package that is not in
-- then main source unit, when the variable is of a formal private type,
-- to warn in the instance if the corresponding type is not a fully
-- initialized type.
if not In_Extended_Main_Source_Unit (N) then
if Typ = 'e' or else
Typ = 'I' or else
Typ = 'p' or else
Typ = 'i' or else
Typ = 'k'
or else (Typ = 'b' and then Is_Generic_Instance (E))
-- Allow the generation of references to reads, writes and calls
-- in SPARK mode when the related context comes from an instance.
or else
(GNATprove_Mode
and then In_Extended_Main_Code_Unit (N)
and then (Typ = 'm' or else Typ = 'r' or else Typ = 's'))
then
null;
elsif In_Instance_Body
and then In_Extended_Main_Code_Unit (N)
and then Is_Generic_Type (Etype (E))
then
Set_Referenced (E);
return;
elsif Inside_A_Generic
and then Is_Generic_Type (Etype (E))
then
Set_Referenced (E);
return;
else
return;
end if;
end if;
-- For reference type p, the entity must be in main source unit
if Typ = 'p' and then not In_Extended_Main_Source_Unit (E) then
return;
end if;
-- Unless the reference is forced, we ignore references where the
-- reference itself does not come from source.
if not Force and then not Comes_From_Source (N) then
return;
end if;
-- Deal with setting entity as referenced, unless suppressed. Note that
-- we still do Set_Referenced on entities that do not come from source.
-- This situation arises when we have a source reference to a derived
-- operation, where the derived operation itself does not come from
-- source, but we still want to mark it as referenced, since we really
-- are referencing an entity in the corresponding package (this avoids
-- wrong complaints that the package contains no referenced entities).
if Set_Ref then
-- Assignable object appearing on left side of assignment or as
-- an out parameter.
if Is_Assignable (E)
and then Is_On_LHS (N)
and then Ekind (E) /= E_In_Out_Parameter
then
-- For objects that are renamings, just set as simply referenced
-- we do not try to do assignment type tracking in this case.
if Present (Renamed_Object (E)) then
Set_Referenced (E);
-- Out parameter case
elsif Kind = E_Out_Parameter then
-- If warning mode for all out parameters is set, or this is
-- the only warning parameter, then we want to mark this for
-- later warning logic by setting Referenced_As_Out_Parameter
if Warn_On_Modified_As_Out_Parameter (Formal) then
Set_Referenced_As_Out_Parameter (E, True);
Set_Referenced_As_LHS (E, False);
-- For OUT parameter not covered by the above cases, we simply
-- regard it as a normal reference (in this case we do not
-- want any of the warning machinery for out parameters).
else
Set_Referenced (E);
end if;
-- For the left hand of an assignment case, we do nothing here.
-- The processing for Analyze_Assignment_Statement will set the
-- Referenced_As_LHS flag.
else
null;
end if;
-- Check for a reference in a pragma that should not count as a
-- making the variable referenced for warning purposes.
elsif Is_Non_Significant_Pragma_Reference (N) then
null;
-- A reference in an attribute definition clause does not count as a
-- reference except for the case of Address. The reason that 'Address
-- is an exception is that it creates an alias through which the
-- variable may be referenced.
elsif Nkind (Parent (N)) = N_Attribute_Definition_Clause
and then Chars (Parent (N)) /= Name_Address
and then N = Name (Parent (N))
then
null;
-- Constant completion does not count as a reference
elsif Typ = 'c'
and then Ekind (E) = E_Constant
then
null;
-- Record representation clause does not count as a reference
elsif Nkind (N) = N_Identifier
and then Nkind (Parent (N)) = N_Record_Representation_Clause
then
null;
-- Discriminants do not need to produce a reference to record type
elsif Typ = 'd'
and then Nkind (Parent (N)) = N_Discriminant_Specification
then
null;
-- All other cases
else
-- Special processing for IN OUT parameters, where we have an
-- implicit assignment to a simple variable.
if Kind = E_In_Out_Parameter
and then Is_Assignable (E)
then
-- For sure this counts as a normal read reference
Set_Referenced (E);
Set_Last_Assignment (E, Empty);
-- We count it as being referenced as an out parameter if the
-- option is set to warn on all out parameters, except that we
-- have a special exclusion for an intrinsic subprogram, which
-- is most likely an instantiation of Unchecked_Deallocation
-- which we do not want to consider as an assignment since it
-- generates false positives. We also exclude the case of an
-- IN OUT parameter if the name of the procedure is Free,
-- since we suspect similar semantics.
if Warn_On_All_Unread_Out_Parameters
and then Is_Entity_Name (Name (Call))
and then not Is_Intrinsic_Subprogram (Entity (Name (Call)))
and then Chars (Name (Call)) /= Name_Free
then
Set_Referenced_As_Out_Parameter (E, True);
Set_Referenced_As_LHS (E, False);
end if;
-- Don't count a recursive reference within a subprogram as a
-- reference (that allows detection of a recursive subprogram
-- whose only references are recursive calls as unreferenced).
elsif Is_Subprogram (E)
and then E = Nearest_Dynamic_Scope (Current_Scope)
then
null;
-- Any other occurrence counts as referencing the entity
elsif OK_To_Set_Referenced then
Set_Referenced (E);
-- If variable, this is an OK reference after an assignment
-- so we can clear the Last_Assignment indication.
if Is_Assignable (E) then
Set_Last_Assignment (E, Empty);
end if;
end if;
end if;
-- Check for pragma Unreferenced given and reference is within
-- this source unit (occasion for possible warning to be issued).
-- Note that the entity may be marked as unreferenced by pragma
-- Unused.
if Has_Unreferenced (E)
and then In_Same_Extended_Unit (E, N)
then
-- A reference as a named parameter in a call does not count as a
-- violation of pragma Unreferenced for this purpose...
if Nkind (N) = N_Identifier
and then Nkind (Parent (N)) = N_Parameter_Association
and then Selector_Name (Parent (N)) = N
then
null;
-- ... Neither does a reference to a variable on the left side of
-- an assignment.
elsif Is_On_LHS (N) then
null;
-- Do not consider F'Result as a violation of pragma Unreferenced
-- since the attribute acts as an anonymous alias of the function
-- result and not as a real reference to the function.
elsif Ekind (E) in E_Function | E_Generic_Function
and then Is_Entity_Name (N)
and then Is_Attribute_Result (Parent (N))
then
null;
-- No warning if the reference is in a call that does not come
-- from source (e.g. a call to a controlled type primitive).
elsif not Comes_From_Source (Parent (N))
and then Nkind (Parent (N)) = N_Procedure_Call_Statement
then
null;
-- For entry formals, we want to place the warning message on the
-- corresponding entity in the accept statement. The current scope
-- is the body of the accept, so we find the formal whose name
-- matches that of the entry formal (there is no link between the
-- two entities, and the one in the accept statement is only used
-- for conformance checking).
elsif Ekind (Scope (E)) = E_Entry then
declare
BE : Entity_Id;
begin
BE := First_Entity (Current_Scope);
while Present (BE) loop
if Chars (BE) = Chars (E) then
if Has_Pragma_Unused (E) then
Error_Msg_NE -- CODEFIX
("??pragma Unused given for&!", N, BE);
else
Error_Msg_NE -- CODEFIX
("??pragma Unreferenced given for&!", N, BE);
end if;
exit;
end if;
Next_Entity (BE);
end loop;
end;
-- Here we issue the warning, since this is a real reference
elsif Has_Pragma_Unused (E) then
Error_Msg_NE -- CODEFIX
("??pragma Unused given for&!", N, E);
else
Error_Msg_NE -- CODEFIX
("??pragma Unreferenced given for&!", N, E);
end if;
end if;
-- If this is a subprogram instance, mark as well the internal
-- subprogram in the wrapper package, which may be a visible
-- compilation unit.
if Is_Overloadable (E)
and then Is_Generic_Instance (E)
and then Present (Alias (E))
then
Set_Referenced (Alias (E));
end if;
end if;
-- Generate reference if all conditions are met:
if
-- Cross referencing must be active
Opt.Xref_Active
-- The entity must be one for which we collect references
and then Xref_Entity_Letters (Ekind (E)) /= ' '
-- Both Sloc values must be set to something sensible
and then Sloc (E) > No_Location
and then Sloc (N) > No_Location
-- Ignore references from within an instance. The only exceptions to
-- this are default subprograms, for which we generate an implicit
-- reference and compilations in SPARK mode.
and then
(Instantiation_Location (Sloc (N)) = No_Location
or else Typ = 'i'
or else GNATprove_Mode)
-- Ignore dummy references
and then Typ /= ' '
then
if Nkind (N) in N_Identifier
| N_Defining_Identifier
| N_Defining_Operator_Symbol
| N_Operator_Symbol
| N_Defining_Character_Literal
| N_Op
or else (Nkind (N) = N_Character_Literal
and then Sloc (Entity (N)) /= Standard_Location)
then
Nod := N;
elsif Nkind (N) in N_Expanded_Name | N_Selected_Component then
Nod := Selector_Name (N);
else
return;
end if;
-- Normal case of source entity comes from source
if Comes_From_Source (E) then
Ent := E;
-- Because a declaration may be generated for a subprogram body
-- without declaration in GNATprove mode, for inlining, some
-- parameters may end up being marked as not coming from source
-- although they are. Take these into account specially.
elsif GNATprove_Mode and then Is_Formal (E) then
Ent := E;
-- Entity does not come from source, but is a derived subprogram and
-- the derived subprogram comes from source (after one or more
-- derivations) in which case the reference is to parent subprogram.
elsif Is_Overloadable (E)
and then Present (Alias (E))
then
Ent := Alias (E);
while not Comes_From_Source (Ent) loop
if No (Alias (Ent)) then
return;
end if;
Ent := Alias (Ent);
end loop;
-- The internally created defining entity for a child subprogram
-- that has no previous spec has valid references.
elsif Is_Overloadable (E)
and then Is_Child_Unit (E)
then
Ent := E;
-- Ditto for the formals of such a subprogram
elsif Is_Overloadable (Scope (E))
and then Is_Child_Unit (Scope (E))
then
Ent := E;
-- Record components of discriminated subtypes or derived types must
-- be treated as references to the original component.
elsif Ekind (E) = E_Component
and then Comes_From_Source (Original_Record_Component (E))
then
Ent := Original_Record_Component (E);
-- If this is an expanded reference to a discriminant, recover the
-- original discriminant, which gets the reference.
elsif Ekind (E) = E_In_Parameter
and then Present (Discriminal_Link (E))
then
Ent := Discriminal_Link (E);
Set_Referenced (Ent);
-- Ignore reference to any other entity that is not from source
else
return;
end if;
-- In SPARK mode, consider the underlying entity renamed instead of
-- the renaming, which is needed to compute a valid set of effects
-- (reads, writes) for the enclosing subprogram.
if GNATprove_Mode then
Ent := Get_Through_Renamings (Ent);
-- If no enclosing object, then it could be a reference to any
-- location not tracked individually, like heap-allocated data.
-- Conservatively approximate this possibility by generating a
-- dereference, and return.
if No (Ent) then
if Actual_Typ = 'w' then
SPARK_Specific.Generate_Dereference (Nod, 'r');
SPARK_Specific.Generate_Dereference (Nod, 'w');
else
SPARK_Specific.Generate_Dereference (Nod, 'r');
end if;
return;
end if;
end if;
-- Record reference to entity
if Actual_Typ = 'p'
and then Is_Subprogram (Nod)
and then Present (Overridden_Operation (Nod))
then
Actual_Typ := 'P';
end if;
-- Comment needed here for special SPARK code ???
if GNATprove_Mode then
-- Ignore references to an entity which is a Part_Of single
-- concurrent object. Ideally we would prefer to add it as a
-- reference to the corresponding concurrent type, but it is quite
-- difficult (as such references are not currently added even for)
-- reads/writes of private protected components) and not worth the
-- effort.
if Ekind (Ent) in E_Abstract_State | E_Constant | E_Variable
and then Present (Encapsulating_State (Ent))
and then Is_Single_Concurrent_Object (Encapsulating_State (Ent))
then
return;
end if;
Ref := Sloc (Nod);
Def := Sloc (Ent);
Ref_Scope :=
SPARK_Specific.Enclosing_Subprogram_Or_Library_Package (Nod);
Ent_Scope :=
SPARK_Specific.Enclosing_Subprogram_Or_Library_Package (Ent);
-- Since we are reaching through renamings in SPARK mode, we may
-- end up with standard constants. Ignore those.
if Sloc (Ent_Scope) <= Standard_Location
or else Def <= Standard_Location
then
return;
end if;
Add_Entry
((Ent => Ent,
Loc => Ref,
Typ => Actual_Typ,
Eun => Get_Top_Level_Code_Unit (Def),
Lun => Get_Top_Level_Code_Unit (Ref),
Ref_Scope => Ref_Scope,
Ent_Scope => Ent_Scope),
Ent_Scope_File => Get_Top_Level_Code_Unit (Ent));
else
Ref := Original_Location (Sloc (Nod));
Def := Original_Location (Sloc (Ent));
-- If this is an operator symbol, skip the initial quote for
-- navigation purposes. This is not done for the end label,
-- where we want the actual position after the closing quote.
if Typ = 't' then
null;
elsif Nkind (N) = N_Defining_Operator_Symbol
or else Nkind (Nod) = N_Operator_Symbol
then
Ref := Ref + 1;
end if;
Add_Entry
((Ent => Ent,
Loc => Ref,
Typ => Actual_Typ,
Eun => Get_Source_Unit (Def),
Lun => Get_Source_Unit (Ref),
Ref_Scope => Empty,
Ent_Scope => Empty),
Ent_Scope_File => No_Unit);
-- Generate reference to the first private entity
if Typ = 'e'
and then Comes_From_Source (E)
and then Nkind (Ent) = N_Defining_Identifier
and then (Is_Package_Or_Generic_Package (Ent)
or else Is_Concurrent_Type (Ent))
and then Present (First_Private_Entity (E))
and then In_Extended_Main_Source_Unit (N)
then
-- Handle case in which the full-view and partial-view of the
-- first private entity are swapped.
declare
First_Private : Entity_Id := First_Private_Entity (E);
begin
if Is_Private_Type (First_Private)
and then Present (Full_View (First_Private))
then
First_Private := Full_View (First_Private);
end if;
Add_Entry
((Ent => Ent,
Loc => Sloc (First_Private),
Typ => 'E',
Eun => Get_Source_Unit (Def),
Lun => Get_Source_Unit (Ref),
Ref_Scope => Empty,
Ent_Scope => Empty),
Ent_Scope_File => No_Unit);
end;
end if;
end if;
end if;
end Generate_Reference;
-----------------------------------
-- Generate_Reference_To_Formals --
-----------------------------------
procedure Generate_Reference_To_Formals (E : Entity_Id) is
Formal : Entity_Id;
begin
if Is_Generic_Subprogram (E) then
Formal := First_Entity (E);
while Present (Formal)
and then not Is_Formal (Formal)
loop
Next_Entity (Formal);
end loop;
elsif Ekind (E) in Access_Subprogram_Kind then
Formal := First_Formal (Designated_Type (E));
else
Formal := First_Formal (E);
end if;
while Present (Formal) loop
if Ekind (Formal) = E_In_Parameter then
if Nkind (Parameter_Type (Parent (Formal))) = N_Access_Definition
then
Generate_Reference (E, Formal, '^', False);
else
Generate_Reference (E, Formal, '>', False);
end if;
elsif Ekind (Formal) = E_In_Out_Parameter then
Generate_Reference (E, Formal, '=', False);
else
Generate_Reference (E, Formal, '<', False);
end if;
Next_Formal (Formal);
end loop;
end Generate_Reference_To_Formals;
-------------------------------------------
-- Generate_Reference_To_Generic_Formals --
-------------------------------------------
procedure Generate_Reference_To_Generic_Formals (E : Entity_Id) is
Formal : Entity_Id;
begin
Formal := First_Entity (E);
while Present (Formal) loop
if Comes_From_Source (Formal) then
Generate_Reference (E, Formal, 'z', False);
end if;
Next_Entity (Formal);
end loop;
end Generate_Reference_To_Generic_Formals;
-------------
-- Get_Key --
-------------
function Get_Key (E : Xref_Entry_Number) return Xref_Entry_Number is
begin
return E;
end Get_Key;
----------------------------
-- Has_Deferred_Reference --
----------------------------
function Has_Deferred_Reference (Ent : Entity_Id) return Boolean is
begin
for J in Deferred_References.First .. Deferred_References.Last loop
if Deferred_References.Table (J).E = Ent then
return True;
end if;
end loop;
return False;
end Has_Deferred_Reference;
----------
-- Hash --
----------
function Hash (F : Xref_Entry_Number) return Header_Num is
-- It is unlikely to have two references to the same entity at the same
-- source location, so the hash function depends only on the Ent and Loc
-- fields.
XE : Xref_Entry renames Xrefs.Table (F);
type M is mod 2**32;
H : constant M := M (XE.Key.Ent) + 2 ** 7 * M (abs XE.Key.Loc);
-- It would be more natural to write:
--
-- H : constant M := M'Mod (XE.Key.Ent) + 2**7 * M'Mod (XE.Key.Loc);
--
-- But we can't use M'Mod, because it prevents bootstrapping with older
-- compilers. Loc can be negative, so we do "abs" before converting.
-- One day this can be cleaned up ???
begin
return Header_Num (H mod Num_Buckets);
end Hash;
-----------------
-- HT_Set_Next --
-----------------
procedure HT_Set_Next (E : Xref_Entry_Number; Next : Xref_Entry_Number) is
begin
Xrefs.Table (E).HTable_Next := Next;
end HT_Set_Next;
-------------
-- HT_Next --
-------------
function HT_Next (E : Xref_Entry_Number) return Xref_Entry_Number is
begin
return Xrefs.Table (E).HTable_Next;
end HT_Next;
----------------
-- Initialize --
----------------
procedure Initialize is
begin
Xrefs.Init;
end Initialize;
--------
-- Lt --
--------
function Lt (T1, T2 : Xref_Entry) return Boolean is
begin
-- First test: if entity is in different unit, sort by unit
if T1.Key.Eun /= T2.Key.Eun then
return Dependency_Num (T1.Key.Eun) < Dependency_Num (T2.Key.Eun);
-- Second test: within same unit, sort by entity Sloc
elsif T1.Def /= T2.Def then
return T1.Def < T2.Def;
-- Third test: sort definitions ahead of references
elsif T1.Key.Loc = No_Location then
return True;
elsif T2.Key.Loc = No_Location then
return False;
-- Fourth test: for same entity, sort by reference location unit
elsif T1.Key.Lun /= T2.Key.Lun then
return Dependency_Num (T1.Key.Lun) < Dependency_Num (T2.Key.Lun);
-- Fifth test: order of location within referencing unit
elsif T1.Key.Loc /= T2.Key.Loc then
return T1.Key.Loc < T2.Key.Loc;
-- Finally, for two locations at the same address, we prefer
-- the one that does NOT have the type 'r' so that a modification
-- or extension takes preference, when there are more than one
-- reference at the same location. As a result, in the case of
-- entities that are in-out actuals, the read reference follows
-- the modify reference.
else
return T2.Key.Typ = 'r';
end if;
end Lt;
-----------------------
-- Output_References --
-----------------------
procedure Output_References is
procedure Get_Type_Reference
(Ent : Entity_Id;
Tref : out Entity_Id;
Left : out Character;
Right : out Character);
-- Given an Entity_Id Ent, determines whether a type reference is
-- required. If so, Tref is set to the entity for the type reference
-- and Left and Right are set to the left/right brackets to be output
-- for the reference. If no type reference is required, then Tref is
-- set to Empty, and Left/Right are set to space.
procedure Output_Import_Export_Info (Ent : Entity_Id);
-- Output language and external name information for an interfaced
-- entity, using the format <language, external_name>.
------------------------
-- Get_Type_Reference --
------------------------
procedure Get_Type_Reference
(Ent : Entity_Id;
Tref : out Entity_Id;
Left : out Character;
Right : out Character)
is
Sav : Entity_Id;
begin
-- See if we have a type reference
Tref := Ent;
Left := '{';
Right := '}';
loop
Sav := Tref;
-- Processing for types
if Is_Type (Tref) then
-- Case of base type
if Base_Type (Tref) = Tref then
-- If derived, then get first subtype
if Tref /= Etype (Tref) then
Tref := First_Subtype (Etype (Tref));
-- Set brackets for derived type, but don't override
-- pointer case since the fact that something is a
-- pointer is more important.
if Left /= '(' then
Left := '<';
Right := '>';
end if;
-- If the completion of a private type is itself a derived
-- type, we need the parent of the full view.
elsif Is_Private_Type (Tref)
and then Present (Full_View (Tref))
and then Etype (Full_View (Tref)) /= Full_View (Tref)
then
Tref := Etype (Full_View (Tref));
if Left /= '(' then
Left := '<';
Right := '>';
end if;
-- If non-derived pointer, get directly designated type.
-- If the type has a full view, all references are on the
-- partial view that is seen first.
elsif Is_Access_Type (Tref) then
Tref := Directly_Designated_Type (Tref);
Left := '(';
Right := ')';
elsif Is_Private_Type (Tref)
and then Present (Full_View (Tref))
then
if Is_Access_Type (Full_View (Tref)) then
Tref := Directly_Designated_Type (Full_View (Tref));
Left := '(';
Right := ')';
-- If the full view is an array type, we also retrieve
-- the corresponding component type, because the ali
-- entry already indicates that this is an array.
elsif Is_Array_Type (Full_View (Tref)) then
Tref := Component_Type (Full_View (Tref));
Left := '(';
Right := ')';
end if;
-- If non-derived array, get component type. Skip component
-- type for case of String or Wide_String, saves worthwhile
-- space.
elsif Is_Array_Type (Tref)
and then Tref /= Standard_String
and then Tref /= Standard_Wide_String
then
Tref := Component_Type (Tref);
Left := '(';
Right := ')';
-- For other non-derived base types, nothing
else
exit;
end if;
-- For a subtype, go to ancestor subtype
else
Tref := Ancestor_Subtype (Tref);
-- If no ancestor subtype, go to base type
if No (Tref) then
Tref := Base_Type (Sav);
end if;
end if;
-- For objects, functions, enum literals, just get type from
-- Etype field.
elsif Is_Object (Tref)
or else Ekind (Tref) = E_Enumeration_Literal
or else Ekind (Tref) = E_Function
or else Ekind (Tref) = E_Operator
then
Tref := Etype (Tref);
-- Another special case: an object of a classwide type
-- initialized with a tag-indeterminate call gets a subtype
-- of the classwide type during expansion. See if the original
-- type in the declaration is named, and return it instead
-- of going to the root type. The expression may be a class-
-- wide function call whose result is on the secondary stack,
-- which forces the declaration to be rewritten as a renaming,
-- so examine the source declaration.
if Ekind (Tref) = E_Class_Wide_Subtype then
declare
Decl : constant Node_Id := Original_Node (Parent (Ent));
begin
if Nkind (Decl) = N_Object_Declaration
and then Is_Entity_Name
(Original_Node (Object_Definition (Decl)))
then
Tref :=
Entity (Original_Node (Object_Definition (Decl)));
end if;
end;
-- For a function that returns a class-wide type, Tref is
-- already correct.
elsif Is_Overloadable (Ent)
and then Is_Class_Wide_Type (Tref)
then
return;
end if;
-- For anything else, exit
else
exit;
end if;
-- Exit if no type reference, or we are stuck in some loop trying
-- to find the type reference, or if the type is standard void
-- type (the latter is an implementation artifact that should not
-- show up in the generated cross-references).
exit when No (Tref)
or else Tref = Sav
or else Tref = Standard_Void_Type;
-- If we have a usable type reference, return, otherwise keep
-- looking for something useful (we are looking for something
-- that either comes from source or standard)
if Sloc (Tref) = Standard_Location
or else Comes_From_Source (Tref)
then
-- If the reference is a subtype created for a generic actual,
-- go actual directly, the inner subtype is not user visible.
if Nkind (Parent (Tref)) = N_Subtype_Declaration
and then not Comes_From_Source (Parent (Tref))
and then
(Is_Wrapper_Package (Scope (Tref))
or else Is_Generic_Instance (Scope (Tref)))
then
Tref := First_Subtype (Base_Type (Tref));
end if;
return;
end if;
end loop;
-- If we fall through the loop, no type reference
Tref := Empty;
Left := ' ';
Right := ' ';
end Get_Type_Reference;
-------------------------------
-- Output_Import_Export_Info --
-------------------------------
procedure Output_Import_Export_Info (Ent : Entity_Id) is
Language_Name : Name_Id;
Conv : constant Convention_Id := Convention (Ent);
begin
-- Generate language name from convention
if Conv = Convention_C or else Conv in Convention_C_Variadic then
Language_Name := Name_C;
elsif Conv = Convention_CPP then
Language_Name := Name_CPP;
elsif Conv = Convention_Ada then
Language_Name := Name_Ada;
else
-- For the moment we ignore all other cases ???
return;
end if;
Write_Info_Char ('<');
Get_Unqualified_Name_String (Language_Name);
for J in 1 .. Name_Len loop
Write_Info_Char (Name_Buffer (J));
end loop;
if Present (Interface_Name (Ent)) then
Write_Info_Char (',');
String_To_Name_Buffer (Strval (Interface_Name (Ent)));
for J in 1 .. Name_Len loop
Write_Info_Char (Name_Buffer (J));
end loop;
end if;
Write_Info_Char ('>');
end Output_Import_Export_Info;
-- Start of processing for Output_References
begin
-- First we add references to the primitive operations of tagged types
-- declared in the main unit.
Handle_Prim_Ops : declare
Ent : Entity_Id;
begin
for J in 1 .. Xrefs.Last loop
Ent := Xrefs.Table (J).Key.Ent;
if Is_Type (Ent)
and then Is_Tagged_Type (Ent)
and then Is_Base_Type (Ent)
and then In_Extended_Main_Source_Unit (Ent)
then
Generate_Prim_Op_References (Ent);
end if;
end loop;
end Handle_Prim_Ops;
-- Before we go ahead and output the references we have a problem
-- that needs dealing with. So far we have captured things that are
-- definitely referenced by the main unit, or defined in the main
-- unit. That's because we don't want to clutter up the ali file
-- for this unit with definition lines for entities in other units
-- that are not referenced.
-- But there is a glitch. We may reference an entity in another unit,
-- and it may have a type reference to an entity that is not directly
-- referenced in the main unit, which may mean that there is no xref
-- entry for this entity yet in the list of references.
-- If we don't do something about this, we will end with an orphan type
-- reference, i.e. it will point to an entity that does not appear
-- within the generated references in the ali file. That is not good for
-- tools using the xref information.
-- To fix this, we go through the references adding definition entries
-- for any unreferenced entities that can be referenced in a type
-- reference. There is a recursion problem here, and that is dealt with
-- by making sure that this traversal also traverses any entries that
-- get added by the traversal.
Handle_Orphan_Type_References : declare
J : Nat;
Tref : Entity_Id;
Ent : Entity_Id;
L, R : Character;
pragma Warnings (Off, L);
pragma Warnings (Off, R);
procedure New_Entry (E : Entity_Id);
-- Make an additional entry into the Xref table for a type entity
-- that is related to the current entity (parent, type ancestor,
-- progenitor, etc.).
----------------
-- New_Entry --
----------------
procedure New_Entry (E : Entity_Id) is
begin
pragma Assert (Present (E));
if not Has_Xref_Entry (Implementation_Base_Type (E))
and then Sloc (E) > No_Location
then
Add_Entry
((Ent => E,
Loc => No_Location,
Typ => Character'First,
Eun => Get_Source_Unit (Original_Location (Sloc (E))),
Lun => No_Unit,
Ref_Scope => Empty,
Ent_Scope => Empty),
Ent_Scope_File => No_Unit);
end if;
end New_Entry;
-- Start of processing for Handle_Orphan_Type_References
begin
-- Note that this is not a for loop for a very good reason. The
-- processing of items in the table can add new items to the table,
-- and they must be processed as well.
J := 1;
while J <= Xrefs.Last loop
Ent := Xrefs.Table (J).Key.Ent;
-- Do not generate reference information for an ignored Ghost
-- entity because neither the entity nor its references will
-- appear in the final tree.
if Is_Ignored_Ghost_Entity (Ent) then
goto Orphan_Continue;
end if;
Get_Type_Reference (Ent, Tref, L, R);
if Present (Tref)
and then not Has_Xref_Entry (Tref)
and then Sloc (Tref) > No_Location
then
New_Entry (Tref);
if Is_Record_Type (Ent)
and then Present (Interfaces (Ent))
then
-- Add an entry for each one of the given interfaces
-- implemented by type Ent.
declare
Elmt : Elmt_Id := First_Elmt (Interfaces (Ent));
begin
while Present (Elmt) loop
New_Entry (Node (Elmt));
Next_Elmt (Elmt);
end loop;
end;
end if;
end if;
-- Collect inherited primitive operations that may be declared in
-- another unit and have no visible reference in the current one.
if Is_Type (Ent)
and then Is_Tagged_Type (Ent)
and then Is_Derived_Type (Ent)
and then Is_Base_Type (Ent)
and then In_Extended_Main_Source_Unit (Ent)
then
declare
Op_List : constant Elist_Id := Primitive_Operations (Ent);
Op : Elmt_Id;
Prim : Entity_Id;
function Parent_Op (E : Entity_Id) return Entity_Id;
-- Find original operation, which may be inherited through
-- several derivations.
function Parent_Op (E : Entity_Id) return Entity_Id is
Orig_Op : constant Entity_Id := Alias (E);
begin
if No (Orig_Op) then
return Empty;
elsif not Comes_From_Source (E)
and then not Has_Xref_Entry (Orig_Op)
and then Comes_From_Source (Orig_Op)
then
return Orig_Op;
else
return Parent_Op (Orig_Op);
end if;
end Parent_Op;
begin
Op := First_Elmt (Op_List);
while Present (Op) loop
Prim := Parent_Op (Node (Op));
if Present (Prim) then
Add_Entry
((Ent => Prim,
Loc => No_Location,
Typ => Character'First,
Eun => Get_Source_Unit (Sloc (Prim)),
Lun => No_Unit,
Ref_Scope => Empty,
Ent_Scope => Empty),
Ent_Scope_File => No_Unit);
end if;
Next_Elmt (Op);
end loop;
end;
end if;
<<Orphan_Continue>>
J := J + 1;
end loop;
end Handle_Orphan_Type_References;
-- Now we have all the references, including those for any embedded type
-- references, so we can sort them, and output them.
Output_Refs : declare
Nrefs : constant Nat := Xrefs.Last;
-- Number of references in table
Rnums : array (0 .. Nrefs) of Nat;
-- This array contains numbers of references in the Xrefs table.
-- This list is sorted in output order. The extra 0'th entry is
-- convenient for the call to sort. When we sort the table, we
-- move the entries in Rnums around, but we do not move the
-- original table entries.
Curxu : Unit_Number_Type;
-- Current xref unit
Curru : Unit_Number_Type;
-- Current reference unit for one entity
Curent : Entity_Id;
-- Current entity
Curnam : String (1 .. Name_Buffer'Length);
Curlen : Natural;
-- Simple name and length of current entity
Curdef : Source_Ptr;
-- Original source location for current entity
Crloc : Source_Ptr;
-- Current reference location
Ctyp : Character;
-- Entity type character
Prevt : Character;
-- reference kind of previous reference
Tref : Entity_Id;
-- Type reference
Rref : Node_Id;
-- Renaming reference
Trunit : Unit_Number_Type;
-- Unit number for type reference
function Lt (Op1, Op2 : Natural) return Boolean;
-- Comparison function for Sort call
function Name_Change (X : Entity_Id) return Boolean;
-- Determines if entity X has a different simple name from Curent
procedure Move (From : Natural; To : Natural);
-- Move procedure for Sort call
package Sorting is new GNAT.Heap_Sort_G (Move, Lt);
--------
-- Lt --
--------
function Lt (Op1, Op2 : Natural) return Boolean is
T1 : Xref_Entry renames Xrefs.Table (Rnums (Nat (Op1)));
T2 : Xref_Entry renames Xrefs.Table (Rnums (Nat (Op2)));
begin
return Lt (T1, T2);
end Lt;
----------
-- Move --
----------
procedure Move (From : Natural; To : Natural) is
begin
Rnums (Nat (To)) := Rnums (Nat (From));
end Move;
-----------------
-- Name_Change --
-----------------
-- Why a string comparison here??? Why not compare Name_Id values???
function Name_Change (X : Entity_Id) return Boolean is
begin
Get_Unqualified_Name_String (Chars (X));
if Name_Len /= Curlen then
return True;
else
return Name_Buffer (1 .. Curlen) /= Curnam (1 .. Curlen);
end if;
end Name_Change;
-- Start of processing for Output_Refs
begin
-- Capture the definition Sloc values. We delay doing this till now,
-- since at the time the reference or definition is made, private
-- types may be swapped, and the Sloc value may be incorrect. We
-- also set up the pointer vector for the sort.
-- For user-defined operators we need to skip the initial quote and
-- point to the first character of the name, for navigation purposes.
for J in 1 .. Nrefs loop
declare
E : constant Entity_Id := Xrefs.Table (J).Key.Ent;
Loc : constant Source_Ptr := Original_Location (Sloc (E));
begin
Rnums (J) := J;
if Nkind (E) = N_Defining_Operator_Symbol then
Xrefs.Table (J).Def := Loc + 1;
else
Xrefs.Table (J).Def := Loc;
end if;
end;
end loop;
-- Sort the references
Sorting.Sort (Integer (Nrefs));
-- Initialize loop through references
Curxu := No_Unit;
Curent := Empty;
Curdef := No_Location;
Curru := No_Unit;
Crloc := No_Location;
Prevt := 'm';
-- Loop to output references
for Refno in 1 .. Nrefs loop
Output_One_Ref : declare
Ent : Entity_Id;
XE : Xref_Entry renames Xrefs.Table (Rnums (Refno));
-- The current entry to be accessed
Left : Character;
Right : Character;
-- Used for {} or <> or () for type reference
procedure Check_Type_Reference
(Ent : Entity_Id;
List_Interface : Boolean;
Is_Component : Boolean := False);
-- Find whether there is a meaningful type reference for
-- Ent, and display it accordingly. If List_Interface is
-- true, then Ent is a progenitor interface of the current
-- type entity being listed. In that case list it as is,
-- without looking for a type reference for it. Flag is also
-- used for index types of an array type, where the caller
-- supplies the intended type reference. Is_Component serves
-- the same purpose, to display the component type of a
-- derived array type, for which only the parent type has
-- ben displayed so far.
procedure Output_Instantiation_Refs (Loc : Source_Ptr);
-- Recursive procedure to output instantiation references for
-- the given source ptr in [file|line[...]] form. No output
-- if the given location is not a generic template reference.
procedure Output_Overridden_Op (Old_E : Entity_Id);
-- For a subprogram that is overriding, display information
-- about the inherited operation that it overrides.
--------------------------
-- Check_Type_Reference --
--------------------------
procedure Check_Type_Reference
(Ent : Entity_Id;
List_Interface : Boolean;
Is_Component : Boolean := False)
is
begin
if List_Interface then
-- This is a progenitor interface of the type for which
-- xref information is being generated.
Tref := Ent;
Left := '<';
Right := '>';
-- The following is not documented in lib-xref.ads ???
elsif Is_Component then
Tref := Ent;
Left := '(';
Right := ')';
else
Get_Type_Reference (Ent, Tref, Left, Right);
end if;
if Present (Tref) then
-- Case of standard entity, output name
if Sloc (Tref) = Standard_Location then
Write_Info_Char (Left);
Write_Info_Name (Chars (Tref));
Write_Info_Char (Right);
-- Case of source entity, output location
else
Write_Info_Char (Left);
Trunit := Get_Source_Unit (Sloc (Tref));
if Trunit /= Curxu then
Write_Info_Nat (Dependency_Num (Trunit));
Write_Info_Char ('|');
end if;
Write_Info_Nat
(Int (Get_Logical_Line_Number (Sloc (Tref))));
declare
Ent : Entity_Id;
Ctyp : Character;
begin
Ent := Tref;
Ctyp := Xref_Entity_Letters (Ekind (Ent));
if Ctyp = '+'
and then Present (Full_View (Ent))
then
Ent := Underlying_Type (Ent);
if Present (Ent) then
Ctyp := Xref_Entity_Letters (Ekind (Ent));
end if;
end if;
Write_Info_Char (Ctyp);
end;
Write_Info_Nat
(Int (Get_Column_Number (Sloc (Tref))));
-- If the type comes from an instantiation, add the
-- corresponding info.
Output_Instantiation_Refs (Sloc (Tref));
Write_Info_Char (Right);
end if;
end if;
end Check_Type_Reference;
-------------------------------
-- Output_Instantiation_Refs --
-------------------------------
procedure Output_Instantiation_Refs (Loc : Source_Ptr) is
Iloc : constant Source_Ptr := Instantiation_Location (Loc);
Lun : Unit_Number_Type;
Cu : constant Unit_Number_Type := Curru;
begin
-- Nothing to do if this is not an instantiation
if Iloc = No_Location then
return;
end if;
-- Output instantiation reference
Write_Info_Char ('[');
Lun := Get_Source_Unit (Iloc);
if Lun /= Curru then
Curru := Lun;
Write_Info_Nat (Dependency_Num (Curru));
Write_Info_Char ('|');
end if;
Write_Info_Nat (Int (Get_Logical_Line_Number (Iloc)));
-- Recursive call to get nested instantiations
Output_Instantiation_Refs (Iloc);
-- Output final ] after call to get proper nesting
Write_Info_Char (']');
Curru := Cu;
return;
end Output_Instantiation_Refs;
--------------------------
-- Output_Overridden_Op --
--------------------------
procedure Output_Overridden_Op (Old_E : Entity_Id) is
Op : Entity_Id;
begin
-- The overridden operation has an implicit declaration
-- at the point of derivation. What we want to display
-- is the original operation, which has the actual body
-- (or abstract declaration) that is being overridden.
-- The overridden operation is not always set, e.g. when
-- it is a predefined operator.
if No (Old_E) then
return;
-- Follow alias chain if one is present
elsif Present (Alias (Old_E)) then
-- The subprogram may have been implicitly inherited
-- through several levels of derivation, so find the
-- ultimate (source) ancestor.
Op := Ultimate_Alias (Old_E);
-- Normal case of no alias present. We omit generated
-- primitives like tagged equality, that have no source
-- representation.
else
Op := Old_E;
end if;
if Present (Op)
and then Sloc (Op) /= Standard_Location
and then Comes_From_Source (Op)
then
declare
Loc : constant Source_Ptr := Sloc (Op);
Par_Unit : constant Unit_Number_Type :=
Get_Source_Unit (Loc);
begin
Write_Info_Char ('<');
if Par_Unit /= Curxu then
Write_Info_Nat (Dependency_Num (Par_Unit));
Write_Info_Char ('|');
end if;
Write_Info_Nat (Int (Get_Logical_Line_Number (Loc)));
Write_Info_Char ('p');
Write_Info_Nat (Int (Get_Column_Number (Loc)));
Write_Info_Char ('>');
end;
end if;
end Output_Overridden_Op;
-- Start of processing for Output_One_Ref
begin
Ent := XE.Key.Ent;
-- Do not generate reference information for an ignored Ghost
-- entity because neither the entity nor its references will
-- appear in the final tree.
if Is_Ignored_Ghost_Entity (Ent) then
goto Continue;
end if;
Ctyp := Xref_Entity_Letters (Ekind (Ent));
-- Skip reference if it is the only reference to an entity,
-- and it is an END line reference, and the entity is not in
-- the current extended source. This prevents junk entries
-- consisting only of packages with END lines, where no
-- entity from the package is actually referenced.
if XE.Key.Typ = 'e'
and then Ent /= Curent
and then (Refno = Nrefs
or else
Ent /= Xrefs.Table (Rnums (Refno + 1)).Key.Ent)
and then not In_Extended_Main_Source_Unit (Ent)
then
goto Continue;
end if;
-- For private type, get full view type
if Ctyp = '+'
and then Present (Full_View (XE.Key.Ent))
then
Ent := Underlying_Type (Ent);
if Present (Ent) then
Ctyp := Xref_Entity_Letters (Ekind (Ent));
end if;
end if;
-- Special exception for Boolean
if Ctyp = 'E' and then Is_Boolean_Type (Ent) then
Ctyp := 'B';
end if;
-- For variable reference, get corresponding type
if Ctyp = '*' then
Ent := Etype (XE.Key.Ent);
Ctyp := Fold_Lower (Xref_Entity_Letters (Ekind (Ent)));
-- If variable is private type, get full view type
if Ctyp = '+'
and then Present (Full_View (Etype (XE.Key.Ent)))
then
Ent := Underlying_Type (Etype (XE.Key.Ent));
if Present (Ent) then
Ctyp := Fold_Lower (Xref_Entity_Letters (Ekind (Ent)));
end if;
elsif Is_Generic_Type (Ent) then
-- If the type of the entity is a generic private type,
-- there is no usable full view, so retain the indication
-- that this is an object.
Ctyp := '*';
end if;
-- Special handling for access parameters and objects and
-- components of an anonymous access type.
if Ekind (Etype (XE.Key.Ent)) in
E_Anonymous_Access_Type
| E_Anonymous_Access_Subprogram_Type
| E_Anonymous_Access_Protected_Subprogram_Type
then
if Is_Formal (XE.Key.Ent)
or else
Ekind (XE.Key.Ent) in
E_Variable | E_Constant | E_Component
then
Ctyp := 'p';
end if;
-- Special handling for Boolean
elsif Ctyp = 'e' and then Is_Boolean_Type (Ent) then
Ctyp := 'b';
end if;
end if;
-- Special handling for abstract types and operations
if Is_Overloadable (XE.Key.Ent)
and then Is_Abstract_Subprogram (XE.Key.Ent)
then
if Ctyp = 'U' then
Ctyp := 'x'; -- Abstract procedure
elsif Ctyp = 'V' then
Ctyp := 'y'; -- Abstract function
end if;
elsif Is_Type (XE.Key.Ent)
and then Is_Abstract_Type (XE.Key.Ent)
then
if Is_Interface (XE.Key.Ent) then
Ctyp := 'h';
elsif Ctyp = 'R' then
Ctyp := 'H'; -- Abstract type
end if;
end if;
-- Only output reference if interesting type of entity
if Ctyp = ' '
-- Suppress references to object definitions, used for local
-- references.
or else XE.Key.Typ = 'D'
or else XE.Key.Typ = 'I'
-- Suppress self references, except for bodies that act as
-- specs.
or else (XE.Key.Loc = XE.Def
and then
(XE.Key.Typ /= 'b'
or else not Is_Subprogram (XE.Key.Ent)))
-- Also suppress definitions of body formals (we only
-- treat these as references, and the references were
-- separately recorded).
or else (Is_Formal (XE.Key.Ent)
and then Present (Spec_Entity (XE.Key.Ent)))
then
null;
else
-- Start new Xref section if new xref unit
if XE.Key.Eun /= Curxu then
if Write_Info_Col > 1 then
Write_Info_EOL;
end if;
Curxu := XE.Key.Eun;
Write_Info_Initiate ('X');
Write_Info_Char (' ');
Write_Info_Nat (Dependency_Num (XE.Key.Eun));
Write_Info_Char (' ');
Write_Info_Name
(Reference_Name (Source_Index (XE.Key.Eun)));
end if;
-- Start new Entity line if new entity. Note that we
-- consider two entities the same if they have the same
-- name and source location. This causes entities in
-- instantiations to be treated as though they referred
-- to the template.
if No (Curent)
or else
(XE.Key.Ent /= Curent
and then
(Name_Change (XE.Key.Ent) or else XE.Def /= Curdef))
then
Curent := XE.Key.Ent;
Curdef := XE.Def;
Get_Unqualified_Name_String (Chars (XE.Key.Ent));
Curlen := Name_Len;
Curnam (1 .. Curlen) := Name_Buffer (1 .. Curlen);
if Write_Info_Col > 1 then
Write_Info_EOL;
end if;
-- Write column number information
Write_Info_Nat (Int (Get_Logical_Line_Number (XE.Def)));
Write_Info_Char (Ctyp);
Write_Info_Nat (Int (Get_Column_Number (XE.Def)));
-- Write level information
Write_Level_Info : declare
function Is_Visible_Generic_Entity
(E : Entity_Id) return Boolean;
-- Check whether E is declared in the visible part
-- of a generic package. For source navigation
-- purposes, treat this as a visible entity.
function Is_Private_Record_Component
(E : Entity_Id) return Boolean;
-- Check whether E is a non-inherited component of a
-- private extension. Even if the enclosing record is
-- public, we want to treat the component as private
-- for navigation purposes.
---------------------------------
-- Is_Private_Record_Component --
---------------------------------
function Is_Private_Record_Component
(E : Entity_Id) return Boolean
is
S : constant Entity_Id := Scope (E);
begin
return
Ekind (E) = E_Component
and then Nkind (Declaration_Node (S)) =
N_Private_Extension_Declaration
and then Original_Record_Component (E) = E;
end Is_Private_Record_Component;
-------------------------------
-- Is_Visible_Generic_Entity --
-------------------------------
function Is_Visible_Generic_Entity
(E : Entity_Id) return Boolean
is
Par : Node_Id;
begin
-- The Present check here is an error defense
if Present (Scope (E))
and then Ekind (Scope (E)) /= E_Generic_Package
then
return False;
end if;
Par := Parent (E);
while Present (Par) loop
if
Nkind (Par) = N_Generic_Package_Declaration
then
-- Entity is a generic formal
return False;
elsif
Nkind (Parent (Par)) = N_Package_Specification
then
return
Is_List_Member (Par)
and then List_Containing (Par) =
Visible_Declarations (Parent (Par));
else
Par := Parent (Par);
end if;
end loop;
return False;
end Is_Visible_Generic_Entity;
-- Start of processing for Write_Level_Info
begin
if Is_Hidden (Curent)
or else Is_Private_Record_Component (Curent)
then
Write_Info_Char (' ');
elsif
Is_Public (Curent)
or else Is_Visible_Generic_Entity (Curent)
then
Write_Info_Char ('*');
else
Write_Info_Char (' ');
end if;
end Write_Level_Info;
-- Output entity name. We use the occurrence from the
-- actual source program at the definition point.
declare
Ent_Name : constant String :=
Exact_Source_Name (Sloc (XE.Key.Ent));
begin
for C in Ent_Name'Range loop
Write_Info_Char (Ent_Name (C));
end loop;
end;
-- See if we have a renaming reference
if Is_Object (XE.Key.Ent)
and then Present (Renamed_Object (XE.Key.Ent))
then
Rref := Renamed_Object (XE.Key.Ent);
elsif Is_Overloadable (XE.Key.Ent)
and then Nkind (Parent (Declaration_Node (XE.Key.Ent)))
= N_Subprogram_Renaming_Declaration
then
Rref := Name (Parent (Declaration_Node (XE.Key.Ent)));
elsif Ekind (XE.Key.Ent) = E_Package
and then Nkind (Declaration_Node (XE.Key.Ent)) =
N_Package_Renaming_Declaration
then
Rref := Name (Declaration_Node (XE.Key.Ent));
else
Rref := Empty;
end if;
if Present (Rref) then
if Nkind (Rref) = N_Expanded_Name then
Rref := Selector_Name (Rref);
end if;
if Nkind (Rref) = N_Identifier
or else Nkind (Rref) = N_Operator_Symbol
then
null;
-- For renamed array components, use the array name
-- for the renamed entity, which reflect the fact that
-- in general the whole array is aliased.
elsif Nkind (Rref) = N_Indexed_Component then
if Nkind (Prefix (Rref)) = N_Identifier then
Rref := Prefix (Rref);
elsif Nkind (Prefix (Rref)) = N_Expanded_Name then
Rref := Selector_Name (Prefix (Rref));
else
Rref := Empty;
end if;
else
Rref := Empty;
end if;
end if;
-- Write out renaming reference if we have one
if Present (Rref) then
Write_Info_Char ('=');
Write_Info_Nat
(Int (Get_Logical_Line_Number (Sloc (Rref))));
Write_Info_Char (':');
Write_Info_Nat
(Int (Get_Column_Number (Sloc (Rref))));
end if;
-- Indicate that the entity is in the unit of the current
-- xref section.
Curru := Curxu;
-- Write out information about generic parent, if entity
-- is an instance.
if Is_Generic_Instance (XE.Key.Ent) then
declare
Gen_Par : constant Entity_Id :=
Generic_Parent
(Specification
(Unit_Declaration_Node
(XE.Key.Ent)));
Loc : constant Source_Ptr := Sloc (Gen_Par);
Gen_U : constant Unit_Number_Type :=
Get_Source_Unit (Loc);
begin
Write_Info_Char ('[');
if Curru /= Gen_U then
Write_Info_Nat (Dependency_Num (Gen_U));
Write_Info_Char ('|');
end if;
Write_Info_Nat
(Int (Get_Logical_Line_Number (Loc)));
Write_Info_Char (']');
end;
end if;
-- See if we have a type reference and if so output
Check_Type_Reference (XE.Key.Ent, False);
-- Additional information for types with progenitors,
-- including synchronized tagged types.
declare
Typ : constant Entity_Id := XE.Key.Ent;
Elmt : Elmt_Id;
begin
if Is_Record_Type (Typ)
and then Present (Interfaces (Typ))
then
Elmt := First_Elmt (Interfaces (Typ));
elsif Is_Concurrent_Type (Typ)
and then Present (Corresponding_Record_Type (Typ))
and then Present (
Interfaces (Corresponding_Record_Type (Typ)))
then
Elmt :=
First_Elmt (
Interfaces (Corresponding_Record_Type (Typ)));
else
Elmt := No_Elmt;
end if;
while Present (Elmt) loop
Check_Type_Reference (Node (Elmt), True);
Next_Elmt (Elmt);
end loop;
end;
-- For array types, list index types as well. (This is
-- not C, indexes have distinct types).
if Is_Array_Type (XE.Key.Ent) then
declare
A_Typ : constant Entity_Id := XE.Key.Ent;
Indx : Node_Id;
begin
-- If this is a derived array type, we have
-- output the parent type, so add the component
-- type now.
if Is_Derived_Type (A_Typ) then
Check_Type_Reference
(Component_Type (A_Typ), False, True);
end if;
-- Add references to index types.
Indx := First_Index (XE.Key.Ent);
while Present (Indx) loop
Check_Type_Reference
(First_Subtype (Etype (Indx)), True);
Next_Index (Indx);
end loop;
end;
end if;
-- If the entity is an overriding operation, write info
-- on operation that was overridden.
if Is_Subprogram (XE.Key.Ent)
and then Present (Overridden_Operation (XE.Key.Ent))
then
Output_Overridden_Op
(Overridden_Operation (XE.Key.Ent));
end if;
-- End of processing for entity output
Crloc := No_Location;
end if;
-- Output the reference if it is not as the same location
-- as the previous one, or it is a read-reference that
-- indicates that the entity is an in-out actual in a call.
if XE.Key.Loc /= No_Location
and then
(XE.Key.Loc /= Crloc
or else (Prevt = 'm' and then XE.Key.Typ = 'r'))
then
Crloc := XE.Key.Loc;
Prevt := XE.Key.Typ;
-- Start continuation if line full, else blank
if Write_Info_Col > 72 then
Write_Info_EOL;
Write_Info_Initiate ('.');
end if;
Write_Info_Char (' ');
-- Output file number if changed
if XE.Key.Lun /= Curru then
Curru := XE.Key.Lun;
Write_Info_Nat (Dependency_Num (Curru));
Write_Info_Char ('|');
end if;
Write_Info_Nat
(Int (Get_Logical_Line_Number (XE.Key.Loc)));
Write_Info_Char (XE.Key.Typ);
if Is_Overloadable (XE.Key.Ent) then
if (Is_Imported (XE.Key.Ent) and then XE.Key.Typ = 'b')
or else
(Is_Exported (XE.Key.Ent) and then XE.Key.Typ = 'i')
then
Output_Import_Export_Info (XE.Key.Ent);
end if;
end if;
Write_Info_Nat (Int (Get_Column_Number (XE.Key.Loc)));
Output_Instantiation_Refs (Sloc (XE.Key.Ent));
end if;
end if;
end Output_One_Ref;
<<Continue>>
null;
end loop;
Write_Info_EOL;
end Output_Refs;
end Output_References;
---------------------------------
-- Process_Deferred_References --
---------------------------------
procedure Process_Deferred_References is
begin
for J in Deferred_References.First .. Deferred_References.Last loop
declare
D : Deferred_Reference_Entry renames Deferred_References.Table (J);
begin
case Is_LHS (D.N) is
when Yes =>
Generate_Reference (D.E, D.N, 'm');
when No =>
Generate_Reference (D.E, D.N, 'r');
-- Not clear if Unknown can occur at this stage, but if it
-- does we will treat it as a normal reference.
when Unknown =>
Generate_Reference (D.E, D.N, 'r');
end case;
end;
end loop;
-- Clear processed entries from table
Deferred_References.Init;
end Process_Deferred_References;
-- Start of elaboration for Lib.Xref
begin
-- Reset is necessary because Elmt_Ptr does not default to Null_Ptr,
-- because it's not an access type.
Xref_Set.Reset;
end Lib.Xref;
|
Transynther/x86/_processed/US/_st_un_sm_/i9-9900K_12_0xa0_notsx.log_21829_1225.asm | ljhsiun2/medusa | 9 | 20952 | .global s_prepare_buffers
s_prepare_buffers:
push %r13
push %r15
push %r9
push %rbp
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_normal_ht+0x1e894, %rbx
nop
nop
nop
nop
cmp $51354, %r13
movb (%rbx), %r9b
xor %rdi, %rdi
lea addresses_D_ht+0xf2b4, %rdx
nop
nop
nop
add %rbx, %rbx
movb $0x61, (%rdx)
nop
nop
nop
nop
add $8805, %rbp
lea addresses_UC_ht+0x7094, %rbx
add $51935, %rdx
movl $0x61626364, (%rbx)
nop
add %rdx, %rdx
lea addresses_D_ht+0x11a94, %rbp
nop
nop
nop
nop
nop
sub $42179, %r15
mov (%rbp), %di
nop
nop
nop
sub $4426, %r9
lea addresses_normal_ht+0x7994, %rbp
nop
lfence
mov (%rbp), %r9d
add $33740, %r15
lea addresses_WC_ht+0xc27f, %rsi
lea addresses_WC_ht+0x204e, %rdi
nop
nop
cmp $2912, %rbx
mov $94, %rcx
rep movsb
nop
nop
cmp $59856, %r15
lea addresses_D_ht+0x1a094, %rsi
lea addresses_normal_ht+0x18ece, %rdi
nop
nop
nop
nop
sub $48209, %r9
mov $40, %rcx
rep movsq
nop
nop
nop
nop
add $29988, %rdi
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %r9
pop %r15
pop %r13
ret
.global s_faulty_load
s_faulty_load:
push %r14
push %r15
push %r8
push %r9
push %rbx
push %rdi
push %rdx
// Load
lea addresses_normal+0x57f4, %r14
nop
nop
nop
cmp %r15, %r15
vmovups (%r14), %ymm7
vextracti128 $0, %ymm7, %xmm7
vpextrq $1, %xmm7, %rbx
nop
nop
nop
cmp $15892, %r14
// Store
mov $0x514, %rbx
nop
nop
nop
inc %r8
mov $0x5152535455565758, %r15
movq %r15, (%rbx)
sub %rbx, %rbx
// Store
lea addresses_US+0x1c094, %rdi
nop
nop
cmp $781, %rdx
movl $0x51525354, (%rdi)
nop
nop
nop
nop
nop
add %rdx, %rdx
// Faulty Load
lea addresses_US+0x1c094, %r9
nop
cmp $59413, %r14
mov (%r9), %rdi
lea oracles, %r15
and $0xff, %rdi
shlq $12, %rdi
mov (%r15,%rdi,1), %rdi
pop %rdx
pop %rdi
pop %rbx
pop %r9
pop %r8
pop %r15
pop %r14
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_US', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_normal', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 4}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_P', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 6}}
{'OP': 'STOR', 'dst': {'type': 'addresses_US', 'AVXalign': False, 'size': 4, 'NT': False, 'same': True, 'congruent': 0}}
[Faulty Load]
{'src': {'type': 'addresses_US', 'AVXalign': False, 'size': 8, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 11}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 5}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 4, 'NT': True, 'same': False, 'congruent': 11}}
{'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 9}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_normal_ht', 'AVXalign': True, 'size': 4, 'NT': False, 'same': False, 'congruent': 7}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WC_ht', 'congruent': 0, 'same': True}, 'OP': 'REPM', 'dst': {'type': 'addresses_WC_ht', 'congruent': 0, 'same': False}}
{'src': {'type': 'addresses_D_ht', 'congruent': 10, 'same': True}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 1, 'same': False}}
{'54': 21826, '6d': 3}
54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54
*/
|
oeis/097/A097083.asm | neoneye/loda-programs | 11 | 246169 | <filename>oeis/097/A097083.asm
; A097083: Values of k such that there is exactly one permutation p of (1,2,3,...,k) such that i+p(i) is a Fibonacci number for 1<=i<=k.
; Submitted by <NAME>(s4)
; 1,2,3,5,9,15,24,39,64,104,168,272,441,714,1155,1869,3025,4895,7920,12815,20736,33552,54288,87840,142129,229970,372099,602069,974169,1576239,2550408,4126647,6677056,10803704,17480760,28284464,45765225,74049690,119814915,193864605,313679521,507544127,821223648,1328767775,2149991424,3478759200,5628750624,9107509824,14736260449,23843770274,38580030723,62423800997,101003831721,163427632719,264431464440,427859097159,692290561600,1120149658760,1812440220360,2932589879120,4745030099481,7677619978602
add $0,4
mov $2,1
lpb $0
sub $0,1
add $1,$4
div $1,2
mov $3,$2
add $2,$4
mov $4,$3
lpe
mov $0,$1
|
oeis/086/A086116.asm | neoneye/loda-programs | 11 | 91098 | <reponame>neoneye/loda-programs
; A086116: Numerator of mean deviation of a symmetrical binomial distribution on n elements.
; Submitted by <NAME>(s1)
; 1,1,3,3,15,15,35,35,315,315,693,693,3003,3003,6435,6435,109395,109395,230945,230945,969969,969969,2028117,2028117,16900975,16900975,35102025,35102025,145422675,145422675,300540195,300540195,9917826435
mov $1,1
mov $2,1
lpb $0
mov $3,$2
lpb $3
add $2,1
mov $4,$1
gcd $4,$2
div $1,$4
mov $3,$5
lpe
sub $0,2
add $2,1
mul $1,$2
lpe
mov $0,$1
|
antlr-basics/src/main/java/com/poc/chapter_05_part01/FunctionCall.g4 | cgonul/antlr-poc | 0 | 3588 | <filename>antlr-basics/src/main/java/com/poc/chapter_05_part01/FunctionCall.g4
grammar FunctionCall;
expr : '(' ID* (',' ID)* ')' ;
ID : [(a-z|1-9)]+ ;
WS : [ \t\r\n]+ -> skip ; |
programs/oeis/152/A152291.asm | karttu/loda | 1 | 88495 | <reponame>karttu/loda
; A152291: a(n) = (n+1)^floor((n-1)/2).
; 1,1,1,4,5,36,49,512,729,10000,14641,248832,371293,7529536,11390625,268435456,410338673,11019960576,16983563041,512000000000,794280046581,26559922791424,41426511213649,1521681143169024,2384185791015625
mov $1,1
mul $1,$0
add $1,1
mov $2,$0
sub $2,1
div $2,2
pow $1,$2
|
test/asset/agda-stdlib-1.0/Relation/Binary/Indexed/Heterogeneous/Core.agda | omega12345/agda-mode | 0 | 15433 | <filename>test/asset/agda-stdlib-1.0/Relation/Binary/Indexed/Heterogeneous/Core.agda
------------------------------------------------------------------------
-- The Agda standard library
--
-- Indexed binary relations
------------------------------------------------------------------------
-- This file contains some core definitions which are re-exported by
-- Relation.Binary.Indexed.Heterogeneous.
{-# OPTIONS --without-K --safe #-}
module Relation.Binary.Indexed.Heterogeneous.Core where
open import Level
import Relation.Binary.Core as B
import Relation.Binary.PropositionalEquality.Core as P
------------------------------------------------------------------------
-- Indexed binary relations
-- Heterogeneous types
IREL : ∀ {i₁ i₂ a₁ a₂} {I₁ : Set i₁} {I₂ : Set i₂} →
(I₁ → Set a₁) → (I₂ → Set a₂) → (ℓ : Level) → Set _
IREL A₁ A₂ ℓ = ∀ {i₁ i₂} → A₁ i₁ → A₂ i₂ → Set ℓ
-- Homogeneous types
IRel : ∀ {i a} {I : Set i} → (I → Set a) → (ℓ : Level) → Set _
IRel A ℓ = IREL A A ℓ
------------------------------------------------------------------------
-- Simple properties of indexed binary relations
Reflexive : ∀ {i a ℓ} {I : Set i} (A : I → Set a) → IRel A ℓ → Set _
Reflexive _ _∼_ = ∀ {i} → B.Reflexive (_∼_ {i})
Symmetric : ∀ {i a ℓ} {I : Set i} (A : I → Set a) → IRel A ℓ → Set _
Symmetric _ _∼_ = ∀ {i j} → B.Sym (_∼_ {i} {j}) _∼_
Transitive : ∀ {i a ℓ} {I : Set i} (A : I → Set a) → IRel A ℓ → Set _
Transitive _ _∼_ = ∀ {i j k} → B.Trans _∼_ (_∼_ {j}) (_∼_ {i} {k})
-- Generalised implication.
infixr 4 _=[_]⇒_
_=[_]⇒_ : ∀ {a b ℓ₁ ℓ₂} {A : Set a} {B : A → Set b} →
B.Rel A ℓ₁ → ((x : A) → B x) → IRel B ℓ₂ → Set _
P =[ f ]⇒ Q = ∀ {i j} → P i j → Q (f i) (f j)
|
alloy4fun_models/trashltl/models/9/HBgCzfKF5oNYvdof5.als | Kaixi26/org.alloytools.alloy | 0 | 1208 | <reponame>Kaixi26/org.alloytools.alloy
open main
pred idHBgCzfKF5oNYvdof5_prop10 {
always all p: File | always (p in Protected implies after p in Protected)
}
pred __repair { idHBgCzfKF5oNYvdof5_prop10 }
check __repair { idHBgCzfKF5oNYvdof5_prop10 <=> prop10o } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.