Atlas - gates.s
Home / ext / JunkDrawer / misc / vh Lines: 1 | Size: 4942 bytes [Download] [Show on GitHub] [Search similar files] [Raw] [Raw (proxy)][FILE BEGIN]1 .section __TEXT,__text,regular,pure_instructions 2 .build_version macos, 26, 0 sdk_version 26, 0 3 .globl _NOT ; -- Begin function NOT 4 .p2align 2 5_NOT: ; @NOT 6 .cfi_startproc 7; %bb.0: 8 sub sp, sp, #16 9 .cfi_def_cfa_offset 16 10 strb w0, [sp, #15] 11 ldrb w8, [sp, #15] 12 eor w8, w8, #0x1 13 and w0, w8, #0x1 14 add sp, sp, #16 15 ret 16 .cfi_endproc 17 ; -- End function 18 .globl _NAND ; -- Begin function NAND 19 .p2align 2 20_NAND: ; @NAND 21 .cfi_startproc 22; %bb.0: 23 sub sp, sp, #32 24 stp x29, x30, [sp, #16] ; 16-byte Folded Spill 25 add x29, sp, #16 26 .cfi_def_cfa w29, 16 27 .cfi_offset w30, -8 28 .cfi_offset w29, -16 29 sturb w0, [x29, #-1] 30 sturb w1, [x29, #-2] 31 ldurb w8, [x29, #-1] 32 and w8, w8, #0x1 33 ldurb w9, [x29, #-2] 34 and w9, w9, #0x1 35 ands w8, w8, w9 36 cset w0, ne 37 bl _NOT 38 ldp x29, x30, [sp, #16] ; 16-byte Folded Reload 39 add sp, sp, #32 40 ret 41 .cfi_endproc 42 ; -- End function 43 .globl _AND ; -- Begin function AND 44 .p2align 2 45_AND: ; @AND 46 .cfi_startproc 47; %bb.0: 48 sub sp, sp, #32 49 stp x29, x30, [sp, #16] ; 16-byte Folded Spill 50 add x29, sp, #16 51 .cfi_def_cfa w29, 16 52 .cfi_offset w30, -8 53 .cfi_offset w29, -16 54 sturb w0, [x29, #-1] 55 sturb w1, [x29, #-2] 56 ldurb w9, [x29, #-1] 57 ldurb w8, [x29, #-2] 58 and w0, w9, #0x1 59 and w1, w8, #0x1 60 bl _NAND 61 sturb w0, [x29, #-3] 62 ldurb w9, [x29, #-3] 63 ldurb w8, [x29, #-3] 64 and w0, w9, #0x1 65 and w1, w8, #0x1 66 bl _NAND 67 ldp x29, x30, [sp, #16] ; 16-byte Folded Reload 68 add sp, sp, #32 69 ret 70 .cfi_endproc 71 ; -- End function 72 .globl _OR ; -- Begin function OR 73 .p2align 2 74_OR: ; @OR 75 .cfi_startproc 76; %bb.0: 77 sub sp, sp, #32 78 stp x29, x30, [sp, #16] ; 16-byte Folded Spill 79 add x29, sp, #16 80 .cfi_def_cfa w29, 16 81 .cfi_offset w30, -8 82 .cfi_offset w29, -16 83 sturb w0, [x29, #-1] 84 sturb w1, [x29, #-2] 85 ldurb w9, [x29, #-1] 86 ldurb w8, [x29, #-1] 87 and w0, w9, #0x1 88 and w1, w8, #0x1 89 bl _NAND 90 str w0, [sp, #8] ; 4-byte Folded Spill 91 ldurb w9, [x29, #-2] 92 ldurb w8, [x29, #-2] 93 and w0, w9, #0x1 94 and w1, w8, #0x1 95 bl _NAND 96 mov x1, x0 97 ldr w0, [sp, #8] ; 4-byte Folded Reload 98 bl _NAND 99 ldp x29, x30, [sp, #16] ; 16-byte Folded Reload 100 add sp, sp, #32 101 ret 102 .cfi_endproc 103 ; -- End function 104 .globl _NOR ; -- Begin function NOR 105 .p2align 2 106_NOR: ; @NOR 107 .cfi_startproc 108; %bb.0: 109 sub sp, sp, #32 110 stp x29, x30, [sp, #16] ; 16-byte Folded Spill 111 add x29, sp, #16 112 .cfi_def_cfa w29, 16 113 .cfi_offset w30, -8 114 .cfi_offset w29, -16 115 sturb w0, [x29, #-1] 116 sturb w1, [x29, #-2] 117 ldurb w9, [x29, #-1] 118 ldurb w8, [x29, #-2] 119 and w0, w9, #0x1 120 and w1, w8, #0x1 121 bl _OR 122 bl _NOT 123 ldp x29, x30, [sp, #16] ; 16-byte Folded Reload 124 add sp, sp, #32 125 ret 126 .cfi_endproc 127 ; -- End function 128 .globl _XOR ; -- Begin function XOR 129 .p2align 2 130_XOR: ; @XOR 131 .cfi_startproc 132; %bb.0: 133 sub sp, sp, #32 134 stp x29, x30, [sp, #16] ; 16-byte Folded Spill 135 add x29, sp, #16 136 .cfi_def_cfa w29, 16 137 .cfi_offset w30, -8 138 .cfi_offset w29, -16 139 sturb w0, [x29, #-1] 140 sturb w1, [x29, #-2] 141 ldurb w9, [x29, #-1] 142 ldurb w8, [x29, #-2] 143 and w0, w9, #0x1 144 and w1, w8, #0x1 145 bl _NAND 146 sturb w0, [x29, #-3] 147 ldurb w9, [x29, #-1] 148 ldurb w8, [x29, #-3] 149 and w0, w9, #0x1 150 and w1, w8, #0x1 151 bl _NAND 152 sturb w0, [x29, #-4] 153 ldurb w9, [x29, #-2] 154 ldurb w8, [x29, #-3] 155 and w0, w9, #0x1 156 and w1, w8, #0x1 157 bl _NAND 158 sturb w0, [x29, #-5] 159 ldurb w9, [x29, #-4] 160 ldurb w8, [x29, #-5] 161 and w0, w9, #0x1 162 and w1, w8, #0x1 163 bl _NAND 164 ldp x29, x30, [sp, #16] ; 16-byte Folded Reload 165 add sp, sp, #32 166 ret 167 .cfi_endproc 168 ; -- End function 169 .globl _XNOR ; -- Begin function XNOR 170 .p2align 2 171_XNOR: ; @XNOR 172 .cfi_startproc 173; %bb.0: 174 sub sp, sp, #32 175 stp x29, x30, [sp, #16] ; 16-byte Folded Spill 176 add x29, sp, #16 177 .cfi_def_cfa w29, 16 178 .cfi_offset w30, -8 179 .cfi_offset w29, -16 180 sturb w0, [x29, #-1] 181 sturb w1, [x29, #-2] 182 ldurb w9, [x29, #-1] 183 ldurb w8, [x29, #-2] 184 and w0, w9, #0x1 185 and w1, w8, #0x1 186 bl _XOR 187 bl _NOT 188 ldp x29, x30, [sp, #16] ; 16-byte Folded Reload 189 add sp, sp, #32 190 ret 191 .cfi_endproc 192 ; -- End function 193 194 .globl _main 195_main: ; @main 196 .cfi_startproc 197; %bb.0: 198 mov w0, #0 ; =0x0 199 ret 200 .cfi_endproc 201.subsections_via_symbols[FILE END](C) 2025 0x4248 (C) 2025 4248 Media and 4248 Systems, All part of 0x4248 See LICENCE files for more information. Not all files are by 0x4248 always check Licencing.