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