content
stringlengths
5
1.04M
avg_line_length
float64
1.75
12.9k
max_line_length
int64
2
244k
alphanum_fraction
float64
0
0.98
licenses
sequence
repository_name
stringlengths
7
92
path
stringlengths
3
249
size
int64
5
1.04M
lang
stringclasses
2 values
; A020331: Numbers whose base-3 representation is the juxtaposition of two identical strings. ; 4,8,30,40,50,60,70,80,252,280,308,336,364,392,420,448,476,504,532,560,588,616,644,672,700,728,2214,2296,2378,2460,2542,2624,2706,2788,2870,2952,3034,3116,3198,3280,3362,3444,3526,3608,3690,3772,3854,3936,4018 mov $2,$0 add $0,1 mov $1,$0 lpb $0,1 add $0,3 div $0,3 sub $0,1 mul $1,3 lpe add $1,1 add $1,$2
27.4
210
0.705596
[ "Apache-2.0" ]
karttu/loda
programs/oeis/020/A020331.asm
411
Assembly
kernel: file format elf32-i386 Disassembly of section .text: 80100000 <multiboot_header>: 80100000: 02 b0 ad 1b 00 00 add 0x1bad(%eax),%dh 80100006: 00 00 add %al,(%eax) 80100008: fe 4f 52 decb 0x52(%edi) 8010000b: e4 0f in $0xf,%al 8010000c <entry>: # Entering xv6 on boot processor, with paging off. .globl entry entry: # Turn on page size extension for 4Mbyte pages movl %cr4, %eax 8010000c: 0f 20 e0 mov %cr4,%eax orl $(CR4_PSE), %eax 8010000f: 83 c8 10 or $0x10,%eax movl %eax, %cr4 80100012: 0f 22 e0 mov %eax,%cr4 # Set page directory movl $(V2P_WO(entrypgdir)), %eax 80100015: b8 00 a0 10 00 mov $0x10a000,%eax movl %eax, %cr3 8010001a: 0f 22 d8 mov %eax,%cr3 # Turn on paging. movl %cr0, %eax 8010001d: 0f 20 c0 mov %cr0,%eax orl $(CR0_PG|CR0_WP), %eax 80100020: 0d 00 00 01 80 or $0x80010000,%eax movl %eax, %cr0 80100025: 0f 22 c0 mov %eax,%cr0 # Set up the stack pointer. movl $(stack + KSTACKSIZE), %esp 80100028: bc 70 c6 10 80 mov $0x8010c670,%esp # Jump to main(), and switch to executing at # high addresses. The indirect call is needed because # the assembler produces a PC-relative instruction # for a direct jump. mov $main, %eax 8010002d: b8 f0 33 10 80 mov $0x801033f0,%eax jmp *%eax 80100032: ff e0 jmp *%eax 80100034 <binit>: struct buf head; } bcache; void binit(void) { 80100034: 55 push %ebp 80100035: 89 e5 mov %esp,%ebp 80100037: 83 ec 28 sub $0x28,%esp struct buf *b; initlock(&bcache.lock, "bcache"); 8010003a: c7 44 24 04 14 86 10 movl $0x80108614,0x4(%esp) 80100041: 80 80100042: c7 04 24 80 c6 10 80 movl $0x8010c680,(%esp) 80100049: e8 0c 4f 00 00 call 80104f5a <initlock> //PAGEBREAK! // Create linked list of buffers bcache.head.prev = &bcache.head; 8010004e: c7 05 b0 db 10 80 a4 movl $0x8010dba4,0x8010dbb0 80100055: db 10 80 bcache.head.next = &bcache.head; 80100058: c7 05 b4 db 10 80 a4 movl $0x8010dba4,0x8010dbb4 8010005f: db 10 80 for(b = bcache.buf; b < bcache.buf+NBUF; b++){ 80100062: c7 45 f4 b4 c6 10 80 movl $0x8010c6b4,-0xc(%ebp) 80100069: eb 3a jmp 801000a5 <binit+0x71> b->next = bcache.head.next; 8010006b: 8b 15 b4 db 10 80 mov 0x8010dbb4,%edx 80100071: 8b 45 f4 mov -0xc(%ebp),%eax 80100074: 89 50 10 mov %edx,0x10(%eax) b->prev = &bcache.head; 80100077: 8b 45 f4 mov -0xc(%ebp),%eax 8010007a: c7 40 0c a4 db 10 80 movl $0x8010dba4,0xc(%eax) b->dev = -1; 80100081: 8b 45 f4 mov -0xc(%ebp),%eax 80100084: c7 40 04 ff ff ff ff movl $0xffffffff,0x4(%eax) bcache.head.next->prev = b; 8010008b: a1 b4 db 10 80 mov 0x8010dbb4,%eax 80100090: 8b 55 f4 mov -0xc(%ebp),%edx 80100093: 89 50 0c mov %edx,0xc(%eax) bcache.head.next = b; 80100096: 8b 45 f4 mov -0xc(%ebp),%eax 80100099: a3 b4 db 10 80 mov %eax,0x8010dbb4 //PAGEBREAK! // Create linked list of buffers bcache.head.prev = &bcache.head; bcache.head.next = &bcache.head; for(b = bcache.buf; b < bcache.buf+NBUF; b++){ 8010009e: 81 45 f4 18 02 00 00 addl $0x218,-0xc(%ebp) 801000a5: b8 a4 db 10 80 mov $0x8010dba4,%eax 801000aa: 39 45 f4 cmp %eax,-0xc(%ebp) 801000ad: 72 bc jb 8010006b <binit+0x37> b->prev = &bcache.head; b->dev = -1; bcache.head.next->prev = b; bcache.head.next = b; } } 801000af: c9 leave 801000b0: c3 ret 801000b1 <bget>: // Look through buffer cache for sector on device dev. // If not found, allocate fresh block. // In either case, return B_BUSY buffer. static struct buf* bget(uint dev, uint sector) { 801000b1: 55 push %ebp 801000b2: 89 e5 mov %esp,%ebp 801000b4: 83 ec 28 sub $0x28,%esp struct buf *b; acquire(&bcache.lock); 801000b7: c7 04 24 80 c6 10 80 movl $0x8010c680,(%esp) 801000be: e8 b8 4e 00 00 call 80104f7b <acquire> loop: // Is the sector already cached? for(b = bcache.head.next; b != &bcache.head; b = b->next){ 801000c3: a1 b4 db 10 80 mov 0x8010dbb4,%eax 801000c8: 89 45 f4 mov %eax,-0xc(%ebp) 801000cb: eb 63 jmp 80100130 <bget+0x7f> if(b->dev == dev && b->sector == sector){ 801000cd: 8b 45 f4 mov -0xc(%ebp),%eax 801000d0: 8b 40 04 mov 0x4(%eax),%eax 801000d3: 3b 45 08 cmp 0x8(%ebp),%eax 801000d6: 75 4f jne 80100127 <bget+0x76> 801000d8: 8b 45 f4 mov -0xc(%ebp),%eax 801000db: 8b 40 08 mov 0x8(%eax),%eax 801000de: 3b 45 0c cmp 0xc(%ebp),%eax 801000e1: 75 44 jne 80100127 <bget+0x76> if(!(b->flags & B_BUSY)){ 801000e3: 8b 45 f4 mov -0xc(%ebp),%eax 801000e6: 8b 00 mov (%eax),%eax 801000e8: 83 e0 01 and $0x1,%eax 801000eb: 85 c0 test %eax,%eax 801000ed: 75 23 jne 80100112 <bget+0x61> b->flags |= B_BUSY; 801000ef: 8b 45 f4 mov -0xc(%ebp),%eax 801000f2: 8b 00 mov (%eax),%eax 801000f4: 89 c2 mov %eax,%edx 801000f6: 83 ca 01 or $0x1,%edx 801000f9: 8b 45 f4 mov -0xc(%ebp),%eax 801000fc: 89 10 mov %edx,(%eax) release(&bcache.lock); 801000fe: c7 04 24 80 c6 10 80 movl $0x8010c680,(%esp) 80100105: e8 d2 4e 00 00 call 80104fdc <release> return b; 8010010a: 8b 45 f4 mov -0xc(%ebp),%eax 8010010d: e9 93 00 00 00 jmp 801001a5 <bget+0xf4> } sleep(b, &bcache.lock); 80100112: c7 44 24 04 80 c6 10 movl $0x8010c680,0x4(%esp) 80100119: 80 8010011a: 8b 45 f4 mov -0xc(%ebp),%eax 8010011d: 89 04 24 mov %eax,(%esp) 80100120: e8 dd 4a 00 00 call 80104c02 <sleep> goto loop; 80100125: eb 9c jmp 801000c3 <bget+0x12> acquire(&bcache.lock); loop: // Is the sector already cached? for(b = bcache.head.next; b != &bcache.head; b = b->next){ 80100127: 8b 45 f4 mov -0xc(%ebp),%eax 8010012a: 8b 40 10 mov 0x10(%eax),%eax 8010012d: 89 45 f4 mov %eax,-0xc(%ebp) 80100130: 81 7d f4 a4 db 10 80 cmpl $0x8010dba4,-0xc(%ebp) 80100137: 75 94 jne 801000cd <bget+0x1c> goto loop; } } // Not cached; recycle some non-busy and clean buffer. for(b = bcache.head.prev; b != &bcache.head; b = b->prev){ 80100139: a1 b0 db 10 80 mov 0x8010dbb0,%eax 8010013e: 89 45 f4 mov %eax,-0xc(%ebp) 80100141: eb 4d jmp 80100190 <bget+0xdf> if((b->flags & B_BUSY) == 0 && (b->flags & B_DIRTY) == 0){ 80100143: 8b 45 f4 mov -0xc(%ebp),%eax 80100146: 8b 00 mov (%eax),%eax 80100148: 83 e0 01 and $0x1,%eax 8010014b: 85 c0 test %eax,%eax 8010014d: 75 38 jne 80100187 <bget+0xd6> 8010014f: 8b 45 f4 mov -0xc(%ebp),%eax 80100152: 8b 00 mov (%eax),%eax 80100154: 83 e0 04 and $0x4,%eax 80100157: 85 c0 test %eax,%eax 80100159: 75 2c jne 80100187 <bget+0xd6> b->dev = dev; 8010015b: 8b 45 f4 mov -0xc(%ebp),%eax 8010015e: 8b 55 08 mov 0x8(%ebp),%edx 80100161: 89 50 04 mov %edx,0x4(%eax) b->sector = sector; 80100164: 8b 45 f4 mov -0xc(%ebp),%eax 80100167: 8b 55 0c mov 0xc(%ebp),%edx 8010016a: 89 50 08 mov %edx,0x8(%eax) b->flags = B_BUSY; 8010016d: 8b 45 f4 mov -0xc(%ebp),%eax 80100170: c7 00 01 00 00 00 movl $0x1,(%eax) release(&bcache.lock); 80100176: c7 04 24 80 c6 10 80 movl $0x8010c680,(%esp) 8010017d: e8 5a 4e 00 00 call 80104fdc <release> return b; 80100182: 8b 45 f4 mov -0xc(%ebp),%eax 80100185: eb 1e jmp 801001a5 <bget+0xf4> goto loop; } } // Not cached; recycle some non-busy and clean buffer. for(b = bcache.head.prev; b != &bcache.head; b = b->prev){ 80100187: 8b 45 f4 mov -0xc(%ebp),%eax 8010018a: 8b 40 0c mov 0xc(%eax),%eax 8010018d: 89 45 f4 mov %eax,-0xc(%ebp) 80100190: 81 7d f4 a4 db 10 80 cmpl $0x8010dba4,-0xc(%ebp) 80100197: 75 aa jne 80100143 <bget+0x92> b->flags = B_BUSY; release(&bcache.lock); return b; } } panic("bget: no buffers"); 80100199: c7 04 24 1b 86 10 80 movl $0x8010861b,(%esp) 801001a0: e8 95 03 00 00 call 8010053a <panic> } 801001a5: c9 leave 801001a6: c3 ret 801001a7 <bread>: // Return a B_BUSY buf with the contents of the indicated disk sector. struct buf* bread(uint dev, uint sector) { 801001a7: 55 push %ebp 801001a8: 89 e5 mov %esp,%ebp 801001aa: 83 ec 28 sub $0x28,%esp struct buf *b; b = bget(dev, sector); 801001ad: 8b 45 0c mov 0xc(%ebp),%eax 801001b0: 89 44 24 04 mov %eax,0x4(%esp) 801001b4: 8b 45 08 mov 0x8(%ebp),%eax 801001b7: 89 04 24 mov %eax,(%esp) 801001ba: e8 f2 fe ff ff call 801000b1 <bget> 801001bf: 89 45 f4 mov %eax,-0xc(%ebp) if(!(b->flags & B_VALID)) 801001c2: 8b 45 f4 mov -0xc(%ebp),%eax 801001c5: 8b 00 mov (%eax),%eax 801001c7: 83 e0 02 and $0x2,%eax 801001ca: 85 c0 test %eax,%eax 801001cc: 75 0b jne 801001d9 <bread+0x32> iderw(b); 801001ce: 8b 45 f4 mov -0xc(%ebp),%eax 801001d1: 89 04 24 mov %eax,(%esp) 801001d4: e8 e5 25 00 00 call 801027be <iderw> return b; 801001d9: 8b 45 f4 mov -0xc(%ebp),%eax } 801001dc: c9 leave 801001dd: c3 ret 801001de <bwrite>: // Write b's contents to disk. Must be B_BUSY. void bwrite(struct buf *b) { 801001de: 55 push %ebp 801001df: 89 e5 mov %esp,%ebp 801001e1: 83 ec 18 sub $0x18,%esp if((b->flags & B_BUSY) == 0) 801001e4: 8b 45 08 mov 0x8(%ebp),%eax 801001e7: 8b 00 mov (%eax),%eax 801001e9: 83 e0 01 and $0x1,%eax 801001ec: 85 c0 test %eax,%eax 801001ee: 75 0c jne 801001fc <bwrite+0x1e> panic("bwrite"); 801001f0: c7 04 24 2c 86 10 80 movl $0x8010862c,(%esp) 801001f7: e8 3e 03 00 00 call 8010053a <panic> b->flags |= B_DIRTY; 801001fc: 8b 45 08 mov 0x8(%ebp),%eax 801001ff: 8b 00 mov (%eax),%eax 80100201: 89 c2 mov %eax,%edx 80100203: 83 ca 04 or $0x4,%edx 80100206: 8b 45 08 mov 0x8(%ebp),%eax 80100209: 89 10 mov %edx,(%eax) iderw(b); 8010020b: 8b 45 08 mov 0x8(%ebp),%eax 8010020e: 89 04 24 mov %eax,(%esp) 80100211: e8 a8 25 00 00 call 801027be <iderw> } 80100216: c9 leave 80100217: c3 ret 80100218 <brelse>: // Release a B_BUSY buffer. // Move to the head of the MRU list. void brelse(struct buf *b) { 80100218: 55 push %ebp 80100219: 89 e5 mov %esp,%ebp 8010021b: 83 ec 18 sub $0x18,%esp if((b->flags & B_BUSY) == 0) 8010021e: 8b 45 08 mov 0x8(%ebp),%eax 80100221: 8b 00 mov (%eax),%eax 80100223: 83 e0 01 and $0x1,%eax 80100226: 85 c0 test %eax,%eax 80100228: 75 0c jne 80100236 <brelse+0x1e> panic("brelse"); 8010022a: c7 04 24 33 86 10 80 movl $0x80108633,(%esp) 80100231: e8 04 03 00 00 call 8010053a <panic> acquire(&bcache.lock); 80100236: c7 04 24 80 c6 10 80 movl $0x8010c680,(%esp) 8010023d: e8 39 4d 00 00 call 80104f7b <acquire> b->next->prev = b->prev; 80100242: 8b 45 08 mov 0x8(%ebp),%eax 80100245: 8b 40 10 mov 0x10(%eax),%eax 80100248: 8b 55 08 mov 0x8(%ebp),%edx 8010024b: 8b 52 0c mov 0xc(%edx),%edx 8010024e: 89 50 0c mov %edx,0xc(%eax) b->prev->next = b->next; 80100251: 8b 45 08 mov 0x8(%ebp),%eax 80100254: 8b 40 0c mov 0xc(%eax),%eax 80100257: 8b 55 08 mov 0x8(%ebp),%edx 8010025a: 8b 52 10 mov 0x10(%edx),%edx 8010025d: 89 50 10 mov %edx,0x10(%eax) b->next = bcache.head.next; 80100260: 8b 15 b4 db 10 80 mov 0x8010dbb4,%edx 80100266: 8b 45 08 mov 0x8(%ebp),%eax 80100269: 89 50 10 mov %edx,0x10(%eax) b->prev = &bcache.head; 8010026c: 8b 45 08 mov 0x8(%ebp),%eax 8010026f: c7 40 0c a4 db 10 80 movl $0x8010dba4,0xc(%eax) bcache.head.next->prev = b; 80100276: a1 b4 db 10 80 mov 0x8010dbb4,%eax 8010027b: 8b 55 08 mov 0x8(%ebp),%edx 8010027e: 89 50 0c mov %edx,0xc(%eax) bcache.head.next = b; 80100281: 8b 45 08 mov 0x8(%ebp),%eax 80100284: a3 b4 db 10 80 mov %eax,0x8010dbb4 b->flags &= ~B_BUSY; 80100289: 8b 45 08 mov 0x8(%ebp),%eax 8010028c: 8b 00 mov (%eax),%eax 8010028e: 89 c2 mov %eax,%edx 80100290: 83 e2 fe and $0xfffffffe,%edx 80100293: 8b 45 08 mov 0x8(%ebp),%eax 80100296: 89 10 mov %edx,(%eax) wakeup(b); 80100298: 8b 45 08 mov 0x8(%ebp),%eax 8010029b: 89 04 24 mov %eax,(%esp) 8010029e: e8 a5 4a 00 00 call 80104d48 <wakeup> release(&bcache.lock); 801002a3: c7 04 24 80 c6 10 80 movl $0x8010c680,(%esp) 801002aa: e8 2d 4d 00 00 call 80104fdc <release> } 801002af: c9 leave 801002b0: c3 ret 801002b1: 00 00 add %al,(%eax) ... 801002b4 <inb>: // Routines to let C code use special x86 instructions. static inline uchar inb(ushort port) { 801002b4: 55 push %ebp 801002b5: 89 e5 mov %esp,%ebp 801002b7: 83 ec 14 sub $0x14,%esp 801002ba: 8b 45 08 mov 0x8(%ebp),%eax 801002bd: 66 89 45 ec mov %ax,-0x14(%ebp) uchar data; asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 801002c1: 0f b7 45 ec movzwl -0x14(%ebp),%eax 801002c5: 89 c2 mov %eax,%edx 801002c7: ec in (%dx),%al 801002c8: 88 45 ff mov %al,-0x1(%ebp) return data; 801002cb: 0f b6 45 ff movzbl -0x1(%ebp),%eax } 801002cf: c9 leave 801002d0: c3 ret 801002d1 <outb>: "memory", "cc"); } static inline void outb(ushort port, uchar data) { 801002d1: 55 push %ebp 801002d2: 89 e5 mov %esp,%ebp 801002d4: 83 ec 08 sub $0x8,%esp 801002d7: 8b 55 08 mov 0x8(%ebp),%edx 801002da: 8b 45 0c mov 0xc(%ebp),%eax 801002dd: 66 89 55 fc mov %dx,-0x4(%ebp) 801002e1: 88 45 f8 mov %al,-0x8(%ebp) asm volatile("out %0,%1" : : "a" (data), "d" (port)); 801002e4: 0f b6 45 f8 movzbl -0x8(%ebp),%eax 801002e8: 0f b7 55 fc movzwl -0x4(%ebp),%edx 801002ec: ee out %al,(%dx) } 801002ed: c9 leave 801002ee: c3 ret 801002ef <cli>: asm volatile("movw %0, %%gs" : : "r" (v)); } static inline void cli(void) { 801002ef: 55 push %ebp 801002f0: 89 e5 mov %esp,%ebp asm volatile("cli"); 801002f2: fa cli } 801002f3: 5d pop %ebp 801002f4: c3 ret 801002f5 <printint>: int locking; } cons; static void printint(int xx, int base, int sign) { 801002f5: 55 push %ebp 801002f6: 89 e5 mov %esp,%ebp 801002f8: 53 push %ebx 801002f9: 83 ec 44 sub $0x44,%esp static char digits[] = "0123456789abcdef"; char buf[16]; int i; uint x; if(sign && (sign = xx < 0)) 801002fc: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 80100300: 74 19 je 8010031b <printint+0x26> 80100302: 8b 45 08 mov 0x8(%ebp),%eax 80100305: c1 e8 1f shr $0x1f,%eax 80100308: 89 45 10 mov %eax,0x10(%ebp) 8010030b: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 8010030f: 74 0a je 8010031b <printint+0x26> x = -xx; 80100311: 8b 45 08 mov 0x8(%ebp),%eax 80100314: f7 d8 neg %eax 80100316: 89 45 f4 mov %eax,-0xc(%ebp) static char digits[] = "0123456789abcdef"; char buf[16]; int i; uint x; if(sign && (sign = xx < 0)) 80100319: eb 06 jmp 80100321 <printint+0x2c> x = -xx; else x = xx; 8010031b: 8b 45 08 mov 0x8(%ebp),%eax 8010031e: 89 45 f4 mov %eax,-0xc(%ebp) i = 0; 80100321: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) do{ buf[i++] = digits[x % base]; 80100328: 8b 4d f0 mov -0x10(%ebp),%ecx 8010032b: 8b 5d 0c mov 0xc(%ebp),%ebx 8010032e: 8b 45 f4 mov -0xc(%ebp),%eax 80100331: ba 00 00 00 00 mov $0x0,%edx 80100336: f7 f3 div %ebx 80100338: 89 d0 mov %edx,%eax 8010033a: 0f b6 80 04 90 10 80 movzbl -0x7fef6ffc(%eax),%eax 80100341: 88 44 0d e0 mov %al,-0x20(%ebp,%ecx,1) 80100345: 83 45 f0 01 addl $0x1,-0x10(%ebp) }while((x /= base) != 0); 80100349: 8b 45 0c mov 0xc(%ebp),%eax 8010034c: 89 45 d4 mov %eax,-0x2c(%ebp) 8010034f: 8b 45 f4 mov -0xc(%ebp),%eax 80100352: ba 00 00 00 00 mov $0x0,%edx 80100357: f7 75 d4 divl -0x2c(%ebp) 8010035a: 89 45 f4 mov %eax,-0xc(%ebp) 8010035d: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 80100361: 75 c5 jne 80100328 <printint+0x33> if(sign) 80100363: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 80100367: 74 21 je 8010038a <printint+0x95> buf[i++] = '-'; 80100369: 8b 45 f0 mov -0x10(%ebp),%eax 8010036c: c6 44 05 e0 2d movb $0x2d,-0x20(%ebp,%eax,1) 80100371: 83 45 f0 01 addl $0x1,-0x10(%ebp) while(--i >= 0) 80100375: eb 13 jmp 8010038a <printint+0x95> consputc(buf[i]); 80100377: 8b 45 f0 mov -0x10(%ebp),%eax 8010037a: 0f b6 44 05 e0 movzbl -0x20(%ebp,%eax,1),%eax 8010037f: 0f be c0 movsbl %al,%eax 80100382: 89 04 24 mov %eax,(%esp) 80100385: e8 c4 03 00 00 call 8010074e <consputc> }while((x /= base) != 0); if(sign) buf[i++] = '-'; while(--i >= 0) 8010038a: 83 6d f0 01 subl $0x1,-0x10(%ebp) 8010038e: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 80100392: 79 e3 jns 80100377 <printint+0x82> consputc(buf[i]); } 80100394: 83 c4 44 add $0x44,%esp 80100397: 5b pop %ebx 80100398: 5d pop %ebp 80100399: c3 ret 8010039a <cprintf>: //PAGEBREAK: 50 // Print to the console. only understands %d, %x, %p, %s. void cprintf(char *fmt, ...) { 8010039a: 55 push %ebp 8010039b: 89 e5 mov %esp,%ebp 8010039d: 83 ec 38 sub $0x38,%esp int i, c, locking; uint *argp; char *s; locking = cons.locking; 801003a0: a1 14 b6 10 80 mov 0x8010b614,%eax 801003a5: 89 45 ec mov %eax,-0x14(%ebp) if(locking) 801003a8: 83 7d ec 00 cmpl $0x0,-0x14(%ebp) 801003ac: 74 0c je 801003ba <cprintf+0x20> acquire(&cons.lock); 801003ae: c7 04 24 e0 b5 10 80 movl $0x8010b5e0,(%esp) 801003b5: e8 c1 4b 00 00 call 80104f7b <acquire> if (fmt == 0) 801003ba: 8b 45 08 mov 0x8(%ebp),%eax 801003bd: 85 c0 test %eax,%eax 801003bf: 75 0c jne 801003cd <cprintf+0x33> panic("null fmt"); 801003c1: c7 04 24 3a 86 10 80 movl $0x8010863a,(%esp) 801003c8: e8 6d 01 00 00 call 8010053a <panic> argp = (uint*)(void*)(&fmt + 1); 801003cd: 8d 45 08 lea 0x8(%ebp),%eax 801003d0: 83 c0 04 add $0x4,%eax 801003d3: 89 45 f0 mov %eax,-0x10(%ebp) for(i = 0; (c = fmt[i] & 0xff) != 0; i++){ 801003d6: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 801003dd: e9 20 01 00 00 jmp 80100502 <cprintf+0x168> if(c != '%'){ 801003e2: 83 7d e8 25 cmpl $0x25,-0x18(%ebp) 801003e6: 74 10 je 801003f8 <cprintf+0x5e> consputc(c); 801003e8: 8b 45 e8 mov -0x18(%ebp),%eax 801003eb: 89 04 24 mov %eax,(%esp) 801003ee: e8 5b 03 00 00 call 8010074e <consputc> continue; 801003f3: e9 06 01 00 00 jmp 801004fe <cprintf+0x164> } c = fmt[++i] & 0xff; 801003f8: 8b 55 08 mov 0x8(%ebp),%edx 801003fb: 83 45 e4 01 addl $0x1,-0x1c(%ebp) 801003ff: 8b 45 e4 mov -0x1c(%ebp),%eax 80100402: 8d 04 02 lea (%edx,%eax,1),%eax 80100405: 0f b6 00 movzbl (%eax),%eax 80100408: 0f be c0 movsbl %al,%eax 8010040b: 25 ff 00 00 00 and $0xff,%eax 80100410: 89 45 e8 mov %eax,-0x18(%ebp) if(c == 0) 80100413: 83 7d e8 00 cmpl $0x0,-0x18(%ebp) 80100417: 0f 84 08 01 00 00 je 80100525 <cprintf+0x18b> break; switch(c){ 8010041d: 8b 45 e8 mov -0x18(%ebp),%eax 80100420: 83 f8 70 cmp $0x70,%eax 80100423: 74 4d je 80100472 <cprintf+0xd8> 80100425: 83 f8 70 cmp $0x70,%eax 80100428: 7f 13 jg 8010043d <cprintf+0xa3> 8010042a: 83 f8 25 cmp $0x25,%eax 8010042d: 0f 84 a6 00 00 00 je 801004d9 <cprintf+0x13f> 80100433: 83 f8 64 cmp $0x64,%eax 80100436: 74 14 je 8010044c <cprintf+0xb2> 80100438: e9 aa 00 00 00 jmp 801004e7 <cprintf+0x14d> 8010043d: 83 f8 73 cmp $0x73,%eax 80100440: 74 53 je 80100495 <cprintf+0xfb> 80100442: 83 f8 78 cmp $0x78,%eax 80100445: 74 2b je 80100472 <cprintf+0xd8> 80100447: e9 9b 00 00 00 jmp 801004e7 <cprintf+0x14d> case 'd': printint(*argp++, 10, 1); 8010044c: 8b 45 f0 mov -0x10(%ebp),%eax 8010044f: 8b 00 mov (%eax),%eax 80100451: 83 45 f0 04 addl $0x4,-0x10(%ebp) 80100455: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp) 8010045c: 00 8010045d: c7 44 24 04 0a 00 00 movl $0xa,0x4(%esp) 80100464: 00 80100465: 89 04 24 mov %eax,(%esp) 80100468: e8 88 fe ff ff call 801002f5 <printint> break; 8010046d: e9 8c 00 00 00 jmp 801004fe <cprintf+0x164> case 'x': case 'p': printint(*argp++, 16, 0); 80100472: 8b 45 f0 mov -0x10(%ebp),%eax 80100475: 8b 00 mov (%eax),%eax 80100477: 83 45 f0 04 addl $0x4,-0x10(%ebp) 8010047b: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp) 80100482: 00 80100483: c7 44 24 04 10 00 00 movl $0x10,0x4(%esp) 8010048a: 00 8010048b: 89 04 24 mov %eax,(%esp) 8010048e: e8 62 fe ff ff call 801002f5 <printint> break; 80100493: eb 69 jmp 801004fe <cprintf+0x164> case 's': if((s = (char*)*argp++) == 0) 80100495: 8b 45 f0 mov -0x10(%ebp),%eax 80100498: 8b 00 mov (%eax),%eax 8010049a: 89 45 f4 mov %eax,-0xc(%ebp) 8010049d: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 801004a1: 0f 94 c0 sete %al 801004a4: 83 45 f0 04 addl $0x4,-0x10(%ebp) 801004a8: 84 c0 test %al,%al 801004aa: 74 20 je 801004cc <cprintf+0x132> s = "(null)"; 801004ac: c7 45 f4 43 86 10 80 movl $0x80108643,-0xc(%ebp) for(; *s; s++) 801004b3: eb 18 jmp 801004cd <cprintf+0x133> consputc(*s); 801004b5: 8b 45 f4 mov -0xc(%ebp),%eax 801004b8: 0f b6 00 movzbl (%eax),%eax 801004bb: 0f be c0 movsbl %al,%eax 801004be: 89 04 24 mov %eax,(%esp) 801004c1: e8 88 02 00 00 call 8010074e <consputc> printint(*argp++, 16, 0); break; case 's': if((s = (char*)*argp++) == 0) s = "(null)"; for(; *s; s++) 801004c6: 83 45 f4 01 addl $0x1,-0xc(%ebp) 801004ca: eb 01 jmp 801004cd <cprintf+0x133> 801004cc: 90 nop 801004cd: 8b 45 f4 mov -0xc(%ebp),%eax 801004d0: 0f b6 00 movzbl (%eax),%eax 801004d3: 84 c0 test %al,%al 801004d5: 75 de jne 801004b5 <cprintf+0x11b> consputc(*s); break; 801004d7: eb 25 jmp 801004fe <cprintf+0x164> case '%': consputc('%'); 801004d9: c7 04 24 25 00 00 00 movl $0x25,(%esp) 801004e0: e8 69 02 00 00 call 8010074e <consputc> break; 801004e5: eb 17 jmp 801004fe <cprintf+0x164> default: // Print unknown % sequence to draw attention. consputc('%'); 801004e7: c7 04 24 25 00 00 00 movl $0x25,(%esp) 801004ee: e8 5b 02 00 00 call 8010074e <consputc> consputc(c); 801004f3: 8b 45 e8 mov -0x18(%ebp),%eax 801004f6: 89 04 24 mov %eax,(%esp) 801004f9: e8 50 02 00 00 call 8010074e <consputc> if (fmt == 0) panic("null fmt"); argp = (uint*)(void*)(&fmt + 1); for(i = 0; (c = fmt[i] & 0xff) != 0; i++){ 801004fe: 83 45 e4 01 addl $0x1,-0x1c(%ebp) 80100502: 8b 55 08 mov 0x8(%ebp),%edx 80100505: 8b 45 e4 mov -0x1c(%ebp),%eax 80100508: 8d 04 02 lea (%edx,%eax,1),%eax 8010050b: 0f b6 00 movzbl (%eax),%eax 8010050e: 0f be c0 movsbl %al,%eax 80100511: 25 ff 00 00 00 and $0xff,%eax 80100516: 89 45 e8 mov %eax,-0x18(%ebp) 80100519: 83 7d e8 00 cmpl $0x0,-0x18(%ebp) 8010051d: 0f 85 bf fe ff ff jne 801003e2 <cprintf+0x48> 80100523: eb 01 jmp 80100526 <cprintf+0x18c> consputc(c); continue; } c = fmt[++i] & 0xff; if(c == 0) break; 80100525: 90 nop consputc(c); break; } } if(locking) 80100526: 83 7d ec 00 cmpl $0x0,-0x14(%ebp) 8010052a: 74 0c je 80100538 <cprintf+0x19e> release(&cons.lock); 8010052c: c7 04 24 e0 b5 10 80 movl $0x8010b5e0,(%esp) 80100533: e8 a4 4a 00 00 call 80104fdc <release> } 80100538: c9 leave 80100539: c3 ret 8010053a <panic>: void panic(char *s) { 8010053a: 55 push %ebp 8010053b: 89 e5 mov %esp,%ebp 8010053d: 83 ec 48 sub $0x48,%esp int i; uint pcs[10]; cli(); 80100540: e8 aa fd ff ff call 801002ef <cli> cons.locking = 0; 80100545: c7 05 14 b6 10 80 00 movl $0x0,0x8010b614 8010054c: 00 00 00 cprintf("cpu%d: panic: ", cpu->id); 8010054f: 65 a1 00 00 00 00 mov %gs:0x0,%eax 80100555: 0f b6 00 movzbl (%eax),%eax 80100558: 0f b6 c0 movzbl %al,%eax 8010055b: 89 44 24 04 mov %eax,0x4(%esp) 8010055f: c7 04 24 4a 86 10 80 movl $0x8010864a,(%esp) 80100566: e8 2f fe ff ff call 8010039a <cprintf> cprintf(s); 8010056b: 8b 45 08 mov 0x8(%ebp),%eax 8010056e: 89 04 24 mov %eax,(%esp) 80100571: e8 24 fe ff ff call 8010039a <cprintf> cprintf("\n"); 80100576: c7 04 24 59 86 10 80 movl $0x80108659,(%esp) 8010057d: e8 18 fe ff ff call 8010039a <cprintf> getcallerpcs(&s, pcs); 80100582: 8d 45 cc lea -0x34(%ebp),%eax 80100585: 89 44 24 04 mov %eax,0x4(%esp) 80100589: 8d 45 08 lea 0x8(%ebp),%eax 8010058c: 89 04 24 mov %eax,(%esp) 8010058f: e8 97 4a 00 00 call 8010502b <getcallerpcs> for(i=0; i<10; i++) 80100594: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) 8010059b: eb 1b jmp 801005b8 <panic+0x7e> cprintf(" %p", pcs[i]); 8010059d: 8b 45 f4 mov -0xc(%ebp),%eax 801005a0: 8b 44 85 cc mov -0x34(%ebp,%eax,4),%eax 801005a4: 89 44 24 04 mov %eax,0x4(%esp) 801005a8: c7 04 24 5b 86 10 80 movl $0x8010865b,(%esp) 801005af: e8 e6 fd ff ff call 8010039a <cprintf> cons.locking = 0; cprintf("cpu%d: panic: ", cpu->id); cprintf(s); cprintf("\n"); getcallerpcs(&s, pcs); for(i=0; i<10; i++) 801005b4: 83 45 f4 01 addl $0x1,-0xc(%ebp) 801005b8: 83 7d f4 09 cmpl $0x9,-0xc(%ebp) 801005bc: 7e df jle 8010059d <panic+0x63> cprintf(" %p", pcs[i]); panicked = 1; // freeze other CPU 801005be: c7 05 c0 b5 10 80 01 movl $0x1,0x8010b5c0 801005c5: 00 00 00 for(;;) ; 801005c8: eb fe jmp 801005c8 <panic+0x8e> 801005ca <cgaputc>: #define CRTPORT 0x3d4 static ushort *crt = (ushort*)P2V(0xb8000); // CGA memory static void cgaputc(int c) { 801005ca: 55 push %ebp 801005cb: 89 e5 mov %esp,%ebp 801005cd: 83 ec 28 sub $0x28,%esp int pos; // Cursor position: col + 80*row. outb(CRTPORT, 14); 801005d0: c7 44 24 04 0e 00 00 movl $0xe,0x4(%esp) 801005d7: 00 801005d8: c7 04 24 d4 03 00 00 movl $0x3d4,(%esp) 801005df: e8 ed fc ff ff call 801002d1 <outb> pos = inb(CRTPORT+1) << 8; 801005e4: c7 04 24 d5 03 00 00 movl $0x3d5,(%esp) 801005eb: e8 c4 fc ff ff call 801002b4 <inb> 801005f0: 0f b6 c0 movzbl %al,%eax 801005f3: c1 e0 08 shl $0x8,%eax 801005f6: 89 45 f4 mov %eax,-0xc(%ebp) outb(CRTPORT, 15); 801005f9: c7 44 24 04 0f 00 00 movl $0xf,0x4(%esp) 80100600: 00 80100601: c7 04 24 d4 03 00 00 movl $0x3d4,(%esp) 80100608: e8 c4 fc ff ff call 801002d1 <outb> pos |= inb(CRTPORT+1); 8010060d: c7 04 24 d5 03 00 00 movl $0x3d5,(%esp) 80100614: e8 9b fc ff ff call 801002b4 <inb> 80100619: 0f b6 c0 movzbl %al,%eax 8010061c: 09 45 f4 or %eax,-0xc(%ebp) if(c == '\n') 8010061f: 83 7d 08 0a cmpl $0xa,0x8(%ebp) 80100623: 75 30 jne 80100655 <cgaputc+0x8b> pos += 80 - pos%80; 80100625: 8b 4d f4 mov -0xc(%ebp),%ecx 80100628: ba 67 66 66 66 mov $0x66666667,%edx 8010062d: 89 c8 mov %ecx,%eax 8010062f: f7 ea imul %edx 80100631: c1 fa 05 sar $0x5,%edx 80100634: 89 c8 mov %ecx,%eax 80100636: c1 f8 1f sar $0x1f,%eax 80100639: 29 c2 sub %eax,%edx 8010063b: 89 d0 mov %edx,%eax 8010063d: c1 e0 02 shl $0x2,%eax 80100640: 01 d0 add %edx,%eax 80100642: c1 e0 04 shl $0x4,%eax 80100645: 89 ca mov %ecx,%edx 80100647: 29 c2 sub %eax,%edx 80100649: b8 50 00 00 00 mov $0x50,%eax 8010064e: 29 d0 sub %edx,%eax 80100650: 01 45 f4 add %eax,-0xc(%ebp) 80100653: eb 33 jmp 80100688 <cgaputc+0xbe> else if(c == BACKSPACE){ 80100655: 81 7d 08 00 01 00 00 cmpl $0x100,0x8(%ebp) 8010065c: 75 0c jne 8010066a <cgaputc+0xa0> if(pos > 0) --pos; 8010065e: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 80100662: 7e 24 jle 80100688 <cgaputc+0xbe> 80100664: 83 6d f4 01 subl $0x1,-0xc(%ebp) 80100668: eb 1e jmp 80100688 <cgaputc+0xbe> } else crt[pos++] = (c&0xff) | 0x0700; // black on white 8010066a: a1 00 90 10 80 mov 0x80109000,%eax 8010066f: 8b 55 f4 mov -0xc(%ebp),%edx 80100672: 01 d2 add %edx,%edx 80100674: 8d 14 10 lea (%eax,%edx,1),%edx 80100677: 8b 45 08 mov 0x8(%ebp),%eax 8010067a: 66 25 ff 00 and $0xff,%ax 8010067e: 80 cc 07 or $0x7,%ah 80100681: 66 89 02 mov %ax,(%edx) 80100684: 83 45 f4 01 addl $0x1,-0xc(%ebp) if((pos/80) >= 24){ // Scroll up. 80100688: 81 7d f4 7f 07 00 00 cmpl $0x77f,-0xc(%ebp) 8010068f: 7e 53 jle 801006e4 <cgaputc+0x11a> memmove(crt, crt+80, sizeof(crt[0])*23*80); 80100691: a1 00 90 10 80 mov 0x80109000,%eax 80100696: 8d 90 a0 00 00 00 lea 0xa0(%eax),%edx 8010069c: a1 00 90 10 80 mov 0x80109000,%eax 801006a1: c7 44 24 08 60 0e 00 movl $0xe60,0x8(%esp) 801006a8: 00 801006a9: 89 54 24 04 mov %edx,0x4(%esp) 801006ad: 89 04 24 mov %eax,(%esp) 801006b0: e8 e8 4b 00 00 call 8010529d <memmove> pos -= 80; 801006b5: 83 6d f4 50 subl $0x50,-0xc(%ebp) memset(crt+pos, 0, sizeof(crt[0])*(24*80 - pos)); 801006b9: b8 80 07 00 00 mov $0x780,%eax 801006be: 2b 45 f4 sub -0xc(%ebp),%eax 801006c1: 8d 14 00 lea (%eax,%eax,1),%edx 801006c4: a1 00 90 10 80 mov 0x80109000,%eax 801006c9: 8b 4d f4 mov -0xc(%ebp),%ecx 801006cc: 01 c9 add %ecx,%ecx 801006ce: 01 c8 add %ecx,%eax 801006d0: 89 54 24 08 mov %edx,0x8(%esp) 801006d4: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 801006db: 00 801006dc: 89 04 24 mov %eax,(%esp) 801006df: e8 e6 4a 00 00 call 801051ca <memset> } outb(CRTPORT, 14); 801006e4: c7 44 24 04 0e 00 00 movl $0xe,0x4(%esp) 801006eb: 00 801006ec: c7 04 24 d4 03 00 00 movl $0x3d4,(%esp) 801006f3: e8 d9 fb ff ff call 801002d1 <outb> outb(CRTPORT+1, pos>>8); 801006f8: 8b 45 f4 mov -0xc(%ebp),%eax 801006fb: c1 f8 08 sar $0x8,%eax 801006fe: 0f b6 c0 movzbl %al,%eax 80100701: 89 44 24 04 mov %eax,0x4(%esp) 80100705: c7 04 24 d5 03 00 00 movl $0x3d5,(%esp) 8010070c: e8 c0 fb ff ff call 801002d1 <outb> outb(CRTPORT, 15); 80100711: c7 44 24 04 0f 00 00 movl $0xf,0x4(%esp) 80100718: 00 80100719: c7 04 24 d4 03 00 00 movl $0x3d4,(%esp) 80100720: e8 ac fb ff ff call 801002d1 <outb> outb(CRTPORT+1, pos); 80100725: 8b 45 f4 mov -0xc(%ebp),%eax 80100728: 0f b6 c0 movzbl %al,%eax 8010072b: 89 44 24 04 mov %eax,0x4(%esp) 8010072f: c7 04 24 d5 03 00 00 movl $0x3d5,(%esp) 80100736: e8 96 fb ff ff call 801002d1 <outb> crt[pos] = ' ' | 0x0700; 8010073b: a1 00 90 10 80 mov 0x80109000,%eax 80100740: 8b 55 f4 mov -0xc(%ebp),%edx 80100743: 01 d2 add %edx,%edx 80100745: 01 d0 add %edx,%eax 80100747: 66 c7 00 20 07 movw $0x720,(%eax) } 8010074c: c9 leave 8010074d: c3 ret 8010074e <consputc>: void consputc(int c) { 8010074e: 55 push %ebp 8010074f: 89 e5 mov %esp,%ebp 80100751: 83 ec 18 sub $0x18,%esp if(panicked){ 80100754: a1 c0 b5 10 80 mov 0x8010b5c0,%eax 80100759: 85 c0 test %eax,%eax 8010075b: 74 07 je 80100764 <consputc+0x16> cli(); 8010075d: e8 8d fb ff ff call 801002ef <cli> for(;;) ; 80100762: eb fe jmp 80100762 <consputc+0x14> } if(c == BACKSPACE){ 80100764: 81 7d 08 00 01 00 00 cmpl $0x100,0x8(%ebp) 8010076b: 75 26 jne 80100793 <consputc+0x45> uartputc('\b'); uartputc(' '); uartputc('\b'); 8010076d: c7 04 24 08 00 00 00 movl $0x8,(%esp) 80100774: e8 eb 64 00 00 call 80106c64 <uartputc> 80100779: c7 04 24 20 00 00 00 movl $0x20,(%esp) 80100780: e8 df 64 00 00 call 80106c64 <uartputc> 80100785: c7 04 24 08 00 00 00 movl $0x8,(%esp) 8010078c: e8 d3 64 00 00 call 80106c64 <uartputc> 80100791: eb 0b jmp 8010079e <consputc+0x50> } else uartputc(c); 80100793: 8b 45 08 mov 0x8(%ebp),%eax 80100796: 89 04 24 mov %eax,(%esp) 80100799: e8 c6 64 00 00 call 80106c64 <uartputc> cgaputc(c); 8010079e: 8b 45 08 mov 0x8(%ebp),%eax 801007a1: 89 04 24 mov %eax,(%esp) 801007a4: e8 21 fe ff ff call 801005ca <cgaputc> } 801007a9: c9 leave 801007aa: c3 ret 801007ab <consoleintr>: #define C(x) ((x)-'@') // Control-x void consoleintr(int (*getc)(void)) { 801007ab: 55 push %ebp 801007ac: 89 e5 mov %esp,%ebp 801007ae: 83 ec 28 sub $0x28,%esp int c; acquire(&input.lock); 801007b1: c7 04 24 c0 dd 10 80 movl $0x8010ddc0,(%esp) 801007b8: e8 be 47 00 00 call 80104f7b <acquire> while((c = getc()) >= 0){ 801007bd: e9 3e 01 00 00 jmp 80100900 <consoleintr+0x155> switch(c){ 801007c2: 8b 45 f4 mov -0xc(%ebp),%eax 801007c5: 83 f8 10 cmp $0x10,%eax 801007c8: 74 1e je 801007e8 <consoleintr+0x3d> 801007ca: 83 f8 10 cmp $0x10,%eax 801007cd: 7f 0a jg 801007d9 <consoleintr+0x2e> 801007cf: 83 f8 08 cmp $0x8,%eax 801007d2: 74 68 je 8010083c <consoleintr+0x91> 801007d4: e9 94 00 00 00 jmp 8010086d <consoleintr+0xc2> 801007d9: 83 f8 15 cmp $0x15,%eax 801007dc: 74 2f je 8010080d <consoleintr+0x62> 801007de: 83 f8 7f cmp $0x7f,%eax 801007e1: 74 59 je 8010083c <consoleintr+0x91> 801007e3: e9 85 00 00 00 jmp 8010086d <consoleintr+0xc2> case C('P'): // Process listing. procdump(); 801007e8: e8 02 46 00 00 call 80104def <procdump> break; 801007ed: e9 0e 01 00 00 jmp 80100900 <consoleintr+0x155> case C('U'): // Kill line. while(input.e != input.w && input.buf[(input.e-1) % INPUT_BUF] != '\n'){ input.e--; 801007f2: a1 7c de 10 80 mov 0x8010de7c,%eax 801007f7: 83 e8 01 sub $0x1,%eax 801007fa: a3 7c de 10 80 mov %eax,0x8010de7c consputc(BACKSPACE); 801007ff: c7 04 24 00 01 00 00 movl $0x100,(%esp) 80100806: e8 43 ff ff ff call 8010074e <consputc> 8010080b: eb 01 jmp 8010080e <consoleintr+0x63> switch(c){ case C('P'): // Process listing. procdump(); break; case C('U'): // Kill line. while(input.e != input.w && 8010080d: 90 nop 8010080e: 8b 15 7c de 10 80 mov 0x8010de7c,%edx 80100814: a1 78 de 10 80 mov 0x8010de78,%eax 80100819: 39 c2 cmp %eax,%edx 8010081b: 0f 84 db 00 00 00 je 801008fc <consoleintr+0x151> input.buf[(input.e-1) % INPUT_BUF] != '\n'){ 80100821: a1 7c de 10 80 mov 0x8010de7c,%eax 80100826: 83 e8 01 sub $0x1,%eax 80100829: 83 e0 7f and $0x7f,%eax 8010082c: 0f b6 80 f4 dd 10 80 movzbl -0x7fef220c(%eax),%eax switch(c){ case C('P'): // Process listing. procdump(); break; case C('U'): // Kill line. while(input.e != input.w && 80100833: 3c 0a cmp $0xa,%al 80100835: 75 bb jne 801007f2 <consoleintr+0x47> input.buf[(input.e-1) % INPUT_BUF] != '\n'){ input.e--; consputc(BACKSPACE); } break; 80100837: e9 c4 00 00 00 jmp 80100900 <consoleintr+0x155> case C('H'): case '\x7f': // Backspace if(input.e != input.w){ 8010083c: 8b 15 7c de 10 80 mov 0x8010de7c,%edx 80100842: a1 78 de 10 80 mov 0x8010de78,%eax 80100847: 39 c2 cmp %eax,%edx 80100849: 0f 84 b0 00 00 00 je 801008ff <consoleintr+0x154> input.e--; 8010084f: a1 7c de 10 80 mov 0x8010de7c,%eax 80100854: 83 e8 01 sub $0x1,%eax 80100857: a3 7c de 10 80 mov %eax,0x8010de7c consputc(BACKSPACE); 8010085c: c7 04 24 00 01 00 00 movl $0x100,(%esp) 80100863: e8 e6 fe ff ff call 8010074e <consputc> } break; 80100868: e9 93 00 00 00 jmp 80100900 <consoleintr+0x155> default: if(c != 0 && input.e-input.r < INPUT_BUF){ 8010086d: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 80100871: 0f 84 89 00 00 00 je 80100900 <consoleintr+0x155> 80100877: 8b 15 7c de 10 80 mov 0x8010de7c,%edx 8010087d: a1 74 de 10 80 mov 0x8010de74,%eax 80100882: 89 d1 mov %edx,%ecx 80100884: 29 c1 sub %eax,%ecx 80100886: 89 c8 mov %ecx,%eax 80100888: 83 f8 7f cmp $0x7f,%eax 8010088b: 77 73 ja 80100900 <consoleintr+0x155> c = (c == '\r') ? '\n' : c; 8010088d: 83 7d f4 0d cmpl $0xd,-0xc(%ebp) 80100891: 74 05 je 80100898 <consoleintr+0xed> 80100893: 8b 45 f4 mov -0xc(%ebp),%eax 80100896: eb 05 jmp 8010089d <consoleintr+0xf2> 80100898: b8 0a 00 00 00 mov $0xa,%eax 8010089d: 89 45 f4 mov %eax,-0xc(%ebp) input.buf[input.e++ % INPUT_BUF] = c; 801008a0: a1 7c de 10 80 mov 0x8010de7c,%eax 801008a5: 89 c1 mov %eax,%ecx 801008a7: 83 e1 7f and $0x7f,%ecx 801008aa: 8b 55 f4 mov -0xc(%ebp),%edx 801008ad: 88 91 f4 dd 10 80 mov %dl,-0x7fef220c(%ecx) 801008b3: 83 c0 01 add $0x1,%eax 801008b6: a3 7c de 10 80 mov %eax,0x8010de7c consputc(c); 801008bb: 8b 45 f4 mov -0xc(%ebp),%eax 801008be: 89 04 24 mov %eax,(%esp) 801008c1: e8 88 fe ff ff call 8010074e <consputc> if(c == '\n' || c == C('D') || input.e == input.r+INPUT_BUF){ 801008c6: 83 7d f4 0a cmpl $0xa,-0xc(%ebp) 801008ca: 74 18 je 801008e4 <consoleintr+0x139> 801008cc: 83 7d f4 04 cmpl $0x4,-0xc(%ebp) 801008d0: 74 12 je 801008e4 <consoleintr+0x139> 801008d2: a1 7c de 10 80 mov 0x8010de7c,%eax 801008d7: 8b 15 74 de 10 80 mov 0x8010de74,%edx 801008dd: 83 ea 80 sub $0xffffff80,%edx 801008e0: 39 d0 cmp %edx,%eax 801008e2: 75 1c jne 80100900 <consoleintr+0x155> input.w = input.e; 801008e4: a1 7c de 10 80 mov 0x8010de7c,%eax 801008e9: a3 78 de 10 80 mov %eax,0x8010de78 wakeup(&input.r); 801008ee: c7 04 24 74 de 10 80 movl $0x8010de74,(%esp) 801008f5: e8 4e 44 00 00 call 80104d48 <wakeup> 801008fa: eb 04 jmp 80100900 <consoleintr+0x155> while(input.e != input.w && input.buf[(input.e-1) % INPUT_BUF] != '\n'){ input.e--; consputc(BACKSPACE); } break; 801008fc: 90 nop 801008fd: eb 01 jmp 80100900 <consoleintr+0x155> case C('H'): case '\x7f': // Backspace if(input.e != input.w){ input.e--; consputc(BACKSPACE); } break; 801008ff: 90 nop consoleintr(int (*getc)(void)) { int c; acquire(&input.lock); while((c = getc()) >= 0){ 80100900: 8b 45 08 mov 0x8(%ebp),%eax 80100903: ff d0 call *%eax 80100905: 89 45 f4 mov %eax,-0xc(%ebp) 80100908: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 8010090c: 0f 89 b0 fe ff ff jns 801007c2 <consoleintr+0x17> } } break; } } release(&input.lock); 80100912: c7 04 24 c0 dd 10 80 movl $0x8010ddc0,(%esp) 80100919: e8 be 46 00 00 call 80104fdc <release> } 8010091e: c9 leave 8010091f: c3 ret 80100920 <consoleread>: int consoleread(struct inode *ip, char *dst, int n) { 80100920: 55 push %ebp 80100921: 89 e5 mov %esp,%ebp 80100923: 83 ec 28 sub $0x28,%esp uint target; int c; iunlock(ip); 80100926: 8b 45 08 mov 0x8(%ebp),%eax 80100929: 89 04 24 mov %eax,(%esp) 8010092c: e8 9b 10 00 00 call 801019cc <iunlock> target = n; 80100931: 8b 45 10 mov 0x10(%ebp),%eax 80100934: 89 45 f0 mov %eax,-0x10(%ebp) acquire(&input.lock); 80100937: c7 04 24 c0 dd 10 80 movl $0x8010ddc0,(%esp) 8010093e: e8 38 46 00 00 call 80104f7b <acquire> while(n > 0){ 80100943: e9 a8 00 00 00 jmp 801009f0 <consoleread+0xd0> while(input.r == input.w){ if(proc->killed){ 80100948: 65 a1 04 00 00 00 mov %gs:0x4,%eax 8010094e: 8b 40 24 mov 0x24(%eax),%eax 80100951: 85 c0 test %eax,%eax 80100953: 74 21 je 80100976 <consoleread+0x56> release(&input.lock); 80100955: c7 04 24 c0 dd 10 80 movl $0x8010ddc0,(%esp) 8010095c: e8 7b 46 00 00 call 80104fdc <release> ilock(ip); 80100961: 8b 45 08 mov 0x8(%ebp),%eax 80100964: 89 04 24 mov %eax,(%esp) 80100967: e8 0f 0f 00 00 call 8010187b <ilock> return -1; 8010096c: b8 ff ff ff ff mov $0xffffffff,%eax 80100971: e9 a9 00 00 00 jmp 80100a1f <consoleread+0xff> } sleep(&input.r, &input.lock); 80100976: c7 44 24 04 c0 dd 10 movl $0x8010ddc0,0x4(%esp) 8010097d: 80 8010097e: c7 04 24 74 de 10 80 movl $0x8010de74,(%esp) 80100985: e8 78 42 00 00 call 80104c02 <sleep> 8010098a: eb 01 jmp 8010098d <consoleread+0x6d> iunlock(ip); target = n; acquire(&input.lock); while(n > 0){ while(input.r == input.w){ 8010098c: 90 nop 8010098d: 8b 15 74 de 10 80 mov 0x8010de74,%edx 80100993: a1 78 de 10 80 mov 0x8010de78,%eax 80100998: 39 c2 cmp %eax,%edx 8010099a: 74 ac je 80100948 <consoleread+0x28> ilock(ip); return -1; } sleep(&input.r, &input.lock); } c = input.buf[input.r++ % INPUT_BUF]; 8010099c: a1 74 de 10 80 mov 0x8010de74,%eax 801009a1: 89 c2 mov %eax,%edx 801009a3: 83 e2 7f and $0x7f,%edx 801009a6: 0f b6 92 f4 dd 10 80 movzbl -0x7fef220c(%edx),%edx 801009ad: 0f be d2 movsbl %dl,%edx 801009b0: 89 55 f4 mov %edx,-0xc(%ebp) 801009b3: 83 c0 01 add $0x1,%eax 801009b6: a3 74 de 10 80 mov %eax,0x8010de74 if(c == C('D')){ // EOF 801009bb: 83 7d f4 04 cmpl $0x4,-0xc(%ebp) 801009bf: 75 17 jne 801009d8 <consoleread+0xb8> if(n < target){ 801009c1: 8b 45 10 mov 0x10(%ebp),%eax 801009c4: 3b 45 f0 cmp -0x10(%ebp),%eax 801009c7: 73 2f jae 801009f8 <consoleread+0xd8> // Save ^D for next time, to make sure // caller gets a 0-byte result. input.r--; 801009c9: a1 74 de 10 80 mov 0x8010de74,%eax 801009ce: 83 e8 01 sub $0x1,%eax 801009d1: a3 74 de 10 80 mov %eax,0x8010de74 } break; 801009d6: eb 24 jmp 801009fc <consoleread+0xdc> } *dst++ = c; 801009d8: 8b 45 f4 mov -0xc(%ebp),%eax 801009db: 89 c2 mov %eax,%edx 801009dd: 8b 45 0c mov 0xc(%ebp),%eax 801009e0: 88 10 mov %dl,(%eax) 801009e2: 83 45 0c 01 addl $0x1,0xc(%ebp) --n; 801009e6: 83 6d 10 01 subl $0x1,0x10(%ebp) if(c == '\n') 801009ea: 83 7d f4 0a cmpl $0xa,-0xc(%ebp) 801009ee: 74 0b je 801009fb <consoleread+0xdb> int c; iunlock(ip); target = n; acquire(&input.lock); while(n > 0){ 801009f0: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 801009f4: 7f 96 jg 8010098c <consoleread+0x6c> 801009f6: eb 04 jmp 801009fc <consoleread+0xdc> if(n < target){ // Save ^D for next time, to make sure // caller gets a 0-byte result. input.r--; } break; 801009f8: 90 nop 801009f9: eb 01 jmp 801009fc <consoleread+0xdc> } *dst++ = c; --n; if(c == '\n') break; 801009fb: 90 nop } release(&input.lock); 801009fc: c7 04 24 c0 dd 10 80 movl $0x8010ddc0,(%esp) 80100a03: e8 d4 45 00 00 call 80104fdc <release> ilock(ip); 80100a08: 8b 45 08 mov 0x8(%ebp),%eax 80100a0b: 89 04 24 mov %eax,(%esp) 80100a0e: e8 68 0e 00 00 call 8010187b <ilock> return target - n; 80100a13: 8b 45 10 mov 0x10(%ebp),%eax 80100a16: 8b 55 f0 mov -0x10(%ebp),%edx 80100a19: 89 d1 mov %edx,%ecx 80100a1b: 29 c1 sub %eax,%ecx 80100a1d: 89 c8 mov %ecx,%eax } 80100a1f: c9 leave 80100a20: c3 ret 80100a21 <consolewrite>: int consolewrite(struct inode *ip, char *buf, int n) { 80100a21: 55 push %ebp 80100a22: 89 e5 mov %esp,%ebp 80100a24: 83 ec 28 sub $0x28,%esp int i; iunlock(ip); 80100a27: 8b 45 08 mov 0x8(%ebp),%eax 80100a2a: 89 04 24 mov %eax,(%esp) 80100a2d: e8 9a 0f 00 00 call 801019cc <iunlock> acquire(&cons.lock); 80100a32: c7 04 24 e0 b5 10 80 movl $0x8010b5e0,(%esp) 80100a39: e8 3d 45 00 00 call 80104f7b <acquire> for(i = 0; i < n; i++) 80100a3e: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) 80100a45: eb 1d jmp 80100a64 <consolewrite+0x43> consputc(buf[i] & 0xff); 80100a47: 8b 45 f4 mov -0xc(%ebp),%eax 80100a4a: 03 45 0c add 0xc(%ebp),%eax 80100a4d: 0f b6 00 movzbl (%eax),%eax 80100a50: 0f be c0 movsbl %al,%eax 80100a53: 25 ff 00 00 00 and $0xff,%eax 80100a58: 89 04 24 mov %eax,(%esp) 80100a5b: e8 ee fc ff ff call 8010074e <consputc> { int i; iunlock(ip); acquire(&cons.lock); for(i = 0; i < n; i++) 80100a60: 83 45 f4 01 addl $0x1,-0xc(%ebp) 80100a64: 8b 45 f4 mov -0xc(%ebp),%eax 80100a67: 3b 45 10 cmp 0x10(%ebp),%eax 80100a6a: 7c db jl 80100a47 <consolewrite+0x26> consputc(buf[i] & 0xff); release(&cons.lock); 80100a6c: c7 04 24 e0 b5 10 80 movl $0x8010b5e0,(%esp) 80100a73: e8 64 45 00 00 call 80104fdc <release> ilock(ip); 80100a78: 8b 45 08 mov 0x8(%ebp),%eax 80100a7b: 89 04 24 mov %eax,(%esp) 80100a7e: e8 f8 0d 00 00 call 8010187b <ilock> return n; 80100a83: 8b 45 10 mov 0x10(%ebp),%eax } 80100a86: c9 leave 80100a87: c3 ret 80100a88 <consoleinit>: void consoleinit(void) { 80100a88: 55 push %ebp 80100a89: 89 e5 mov %esp,%ebp 80100a8b: 83 ec 18 sub $0x18,%esp initlock(&cons.lock, "console"); 80100a8e: c7 44 24 04 5f 86 10 movl $0x8010865f,0x4(%esp) 80100a95: 80 80100a96: c7 04 24 e0 b5 10 80 movl $0x8010b5e0,(%esp) 80100a9d: e8 b8 44 00 00 call 80104f5a <initlock> initlock(&input.lock, "input"); 80100aa2: c7 44 24 04 67 86 10 movl $0x80108667,0x4(%esp) 80100aa9: 80 80100aaa: c7 04 24 c0 dd 10 80 movl $0x8010ddc0,(%esp) 80100ab1: e8 a4 44 00 00 call 80104f5a <initlock> devsw[CONSOLE].write = consolewrite; 80100ab6: c7 05 2c e8 10 80 21 movl $0x80100a21,0x8010e82c 80100abd: 0a 10 80 devsw[CONSOLE].read = consoleread; 80100ac0: c7 05 28 e8 10 80 20 movl $0x80100920,0x8010e828 80100ac7: 09 10 80 cons.locking = 1; 80100aca: c7 05 14 b6 10 80 01 movl $0x1,0x8010b614 80100ad1: 00 00 00 picenable(IRQ_KBD); 80100ad4: c7 04 24 01 00 00 00 movl $0x1,(%esp) 80100adb: e8 ad 2f 00 00 call 80103a8d <picenable> ioapicenable(IRQ_KBD, 0); 80100ae0: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80100ae7: 00 80100ae8: c7 04 24 01 00 00 00 movl $0x1,(%esp) 80100aef: e8 8a 1e 00 00 call 8010297e <ioapicenable> } 80100af4: c9 leave 80100af5: c3 ret ... 80100af8 <exec>: #include "x86.h" #include "elf.h" int exec(char *path, char **argv) { 80100af8: 55 push %ebp 80100af9: 89 e5 mov %esp,%ebp 80100afb: 81 ec 38 01 00 00 sub $0x138,%esp struct elfhdr elf; struct inode *ip; struct proghdr ph; pde_t *pgdir, *oldpgdir; if((ip = namei(path)) == 0) 80100b01: 8b 45 08 mov 0x8(%ebp),%eax 80100b04: 89 04 24 mov %eax,(%esp) 80100b07: e8 17 19 00 00 call 80102423 <namei> 80100b0c: 89 45 ec mov %eax,-0x14(%ebp) 80100b0f: 83 7d ec 00 cmpl $0x0,-0x14(%ebp) 80100b13: 75 0a jne 80100b1f <exec+0x27> return -1; 80100b15: b8 ff ff ff ff mov $0xffffffff,%eax 80100b1a: e9 e4 03 00 00 jmp 80100f03 <exec+0x40b> ilock(ip); 80100b1f: 8b 45 ec mov -0x14(%ebp),%eax 80100b22: 89 04 24 mov %eax,(%esp) 80100b25: e8 51 0d 00 00 call 8010187b <ilock> pgdir = 0; 80100b2a: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) // Check ELF header if(readi(ip, (char*)&elf, 0, sizeof(elf)) < sizeof(elf)) 80100b31: 8d 85 0c ff ff ff lea -0xf4(%ebp),%eax 80100b37: c7 44 24 0c 34 00 00 movl $0x34,0xc(%esp) 80100b3e: 00 80100b3f: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp) 80100b46: 00 80100b47: 89 44 24 04 mov %eax,0x4(%esp) 80100b4b: 8b 45 ec mov -0x14(%ebp),%eax 80100b4e: 89 04 24 mov %eax,(%esp) 80100b51: e8 1e 12 00 00 call 80101d74 <readi> 80100b56: 83 f8 33 cmp $0x33,%eax 80100b59: 0f 86 5e 03 00 00 jbe 80100ebd <exec+0x3c5> goto bad; if(elf.magic != ELF_MAGIC) 80100b5f: 8b 85 0c ff ff ff mov -0xf4(%ebp),%eax 80100b65: 3d 7f 45 4c 46 cmp $0x464c457f,%eax 80100b6a: 0f 85 50 03 00 00 jne 80100ec0 <exec+0x3c8> goto bad; if((pgdir = setupkvm()) == 0) 80100b70: e8 34 72 00 00 call 80107da9 <setupkvm> 80100b75: 89 45 f0 mov %eax,-0x10(%ebp) 80100b78: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 80100b7c: 0f 84 41 03 00 00 je 80100ec3 <exec+0x3cb> goto bad; // Load program into memory. sz = PGSIZE; 80100b82: c7 45 e4 00 10 00 00 movl $0x1000,-0x1c(%ebp) for(i=0, off=elf.phoff; i<elf.phnum; i++, off+=sizeof(ph)){ 80100b89: c7 45 d8 00 00 00 00 movl $0x0,-0x28(%ebp) 80100b90: 8b 85 28 ff ff ff mov -0xd8(%ebp),%eax 80100b96: 89 45 dc mov %eax,-0x24(%ebp) 80100b99: e9 ca 00 00 00 jmp 80100c68 <exec+0x170> if(readi(ip, (char*)&ph, off, sizeof(ph)) != sizeof(ph)) 80100b9e: 8b 55 dc mov -0x24(%ebp),%edx 80100ba1: 8d 85 ec fe ff ff lea -0x114(%ebp),%eax 80100ba7: c7 44 24 0c 20 00 00 movl $0x20,0xc(%esp) 80100bae: 00 80100baf: 89 54 24 08 mov %edx,0x8(%esp) 80100bb3: 89 44 24 04 mov %eax,0x4(%esp) 80100bb7: 8b 45 ec mov -0x14(%ebp),%eax 80100bba: 89 04 24 mov %eax,(%esp) 80100bbd: e8 b2 11 00 00 call 80101d74 <readi> 80100bc2: 83 f8 20 cmp $0x20,%eax 80100bc5: 0f 85 fb 02 00 00 jne 80100ec6 <exec+0x3ce> goto bad; if(ph.type != ELF_PROG_LOAD) 80100bcb: 8b 85 ec fe ff ff mov -0x114(%ebp),%eax 80100bd1: 83 f8 01 cmp $0x1,%eax 80100bd4: 0f 85 80 00 00 00 jne 80100c5a <exec+0x162> continue; if(ph.memsz < ph.filesz) 80100bda: 8b 95 00 ff ff ff mov -0x100(%ebp),%edx 80100be0: 8b 85 fc fe ff ff mov -0x104(%ebp),%eax 80100be6: 39 c2 cmp %eax,%edx 80100be8: 0f 82 db 02 00 00 jb 80100ec9 <exec+0x3d1> goto bad; if((sz = allocuvm(pgdir, sz, ph.vaddr + ph.memsz)) == 0) 80100bee: 8b 95 f4 fe ff ff mov -0x10c(%ebp),%edx 80100bf4: 8b 85 00 ff ff ff mov -0x100(%ebp),%eax 80100bfa: 8d 04 02 lea (%edx,%eax,1),%eax 80100bfd: 89 44 24 08 mov %eax,0x8(%esp) 80100c01: 8b 45 e4 mov -0x1c(%ebp),%eax 80100c04: 89 44 24 04 mov %eax,0x4(%esp) 80100c08: 8b 45 f0 mov -0x10(%ebp),%eax 80100c0b: 89 04 24 mov %eax,(%esp) 80100c0e: e8 6a 75 00 00 call 8010817d <allocuvm> 80100c13: 89 45 e4 mov %eax,-0x1c(%ebp) 80100c16: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 80100c1a: 0f 84 ac 02 00 00 je 80100ecc <exec+0x3d4> goto bad; if(loaduvm(pgdir, (char*)ph.vaddr, ip, ph.off, ph.filesz) < 0) 80100c20: 8b 8d fc fe ff ff mov -0x104(%ebp),%ecx 80100c26: 8b 95 f0 fe ff ff mov -0x110(%ebp),%edx 80100c2c: 8b 85 f4 fe ff ff mov -0x10c(%ebp),%eax 80100c32: 89 4c 24 10 mov %ecx,0x10(%esp) 80100c36: 89 54 24 0c mov %edx,0xc(%esp) 80100c3a: 8b 55 ec mov -0x14(%ebp),%edx 80100c3d: 89 54 24 08 mov %edx,0x8(%esp) 80100c41: 89 44 24 04 mov %eax,0x4(%esp) 80100c45: 8b 45 f0 mov -0x10(%ebp),%eax 80100c48: 89 04 24 mov %eax,(%esp) 80100c4b: e8 3d 74 00 00 call 8010808d <loaduvm> 80100c50: 85 c0 test %eax,%eax 80100c52: 0f 88 77 02 00 00 js 80100ecf <exec+0x3d7> 80100c58: eb 01 jmp 80100c5b <exec+0x163> sz = PGSIZE; for(i=0, off=elf.phoff; i<elf.phnum; i++, off+=sizeof(ph)){ if(readi(ip, (char*)&ph, off, sizeof(ph)) != sizeof(ph)) goto bad; if(ph.type != ELF_PROG_LOAD) continue; 80100c5a: 90 nop if((pgdir = setupkvm()) == 0) goto bad; // Load program into memory. sz = PGSIZE; for(i=0, off=elf.phoff; i<elf.phnum; i++, off+=sizeof(ph)){ 80100c5b: 83 45 d8 01 addl $0x1,-0x28(%ebp) 80100c5f: 8b 45 dc mov -0x24(%ebp),%eax 80100c62: 83 c0 20 add $0x20,%eax 80100c65: 89 45 dc mov %eax,-0x24(%ebp) 80100c68: 0f b7 85 38 ff ff ff movzwl -0xc8(%ebp),%eax 80100c6f: 0f b7 c0 movzwl %ax,%eax 80100c72: 3b 45 d8 cmp -0x28(%ebp),%eax 80100c75: 0f 8f 23 ff ff ff jg 80100b9e <exec+0xa6> if((sz = allocuvm(pgdir, sz, ph.vaddr + ph.memsz)) == 0) goto bad; if(loaduvm(pgdir, (char*)ph.vaddr, ip, ph.off, ph.filesz) < 0) goto bad; } iunlockput(ip); 80100c7b: 8b 45 ec mov -0x14(%ebp),%eax 80100c7e: 89 04 24 mov %eax,(%esp) 80100c81: e8 7c 0e 00 00 call 80101b02 <iunlockput> ip = 0; 80100c86: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp) // Allocate two pages at the next page boundary. // Make the first inaccessible. Use the second as the user stack. sz = PGROUNDUP(sz); 80100c8d: 8b 45 e4 mov -0x1c(%ebp),%eax 80100c90: 05 ff 0f 00 00 add $0xfff,%eax 80100c95: 25 00 f0 ff ff and $0xfffff000,%eax 80100c9a: 89 45 e4 mov %eax,-0x1c(%ebp) if((sz = allocuvm(pgdir, sz, sz + 2*PGSIZE)) == 0) 80100c9d: 8b 45 e4 mov -0x1c(%ebp),%eax 80100ca0: 05 00 20 00 00 add $0x2000,%eax 80100ca5: 89 44 24 08 mov %eax,0x8(%esp) 80100ca9: 8b 45 e4 mov -0x1c(%ebp),%eax 80100cac: 89 44 24 04 mov %eax,0x4(%esp) 80100cb0: 8b 45 f0 mov -0x10(%ebp),%eax 80100cb3: 89 04 24 mov %eax,(%esp) 80100cb6: e8 c2 74 00 00 call 8010817d <allocuvm> 80100cbb: 89 45 e4 mov %eax,-0x1c(%ebp) 80100cbe: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 80100cc2: 0f 84 0a 02 00 00 je 80100ed2 <exec+0x3da> goto bad; proc->pstack = (uint *)sz; 80100cc8: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80100cce: 8b 55 e4 mov -0x1c(%ebp),%edx 80100cd1: 89 50 7c mov %edx,0x7c(%eax) clearpteu(pgdir, (char*)(sz - 2*PGSIZE)); 80100cd4: 8b 45 e4 mov -0x1c(%ebp),%eax 80100cd7: 2d 00 20 00 00 sub $0x2000,%eax 80100cdc: 89 44 24 04 mov %eax,0x4(%esp) 80100ce0: 8b 45 f0 mov -0x10(%ebp),%eax 80100ce3: 89 04 24 mov %eax,(%esp) 80100ce6: e8 b6 76 00 00 call 801083a1 <clearpteu> sp = sz; 80100ceb: 8b 45 e4 mov -0x1c(%ebp),%eax 80100cee: 89 45 e8 mov %eax,-0x18(%ebp) // Push argument strings, prepare rest of stack in ustack. for(argc = 0; argv[argc]; argc++) { 80100cf1: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) 80100cf8: e9 81 00 00 00 jmp 80100d7e <exec+0x286> if(argc >= MAXARG) 80100cfd: 83 7d e0 1f cmpl $0x1f,-0x20(%ebp) 80100d01: 0f 87 ce 01 00 00 ja 80100ed5 <exec+0x3dd> goto bad; sp = (sp - (strlen(argv[argc]) + 1)) & ~3; 80100d07: 8b 45 e0 mov -0x20(%ebp),%eax 80100d0a: c1 e0 02 shl $0x2,%eax 80100d0d: 03 45 0c add 0xc(%ebp),%eax 80100d10: 8b 00 mov (%eax),%eax 80100d12: 89 04 24 mov %eax,(%esp) 80100d15: e8 31 47 00 00 call 8010544b <strlen> 80100d1a: f7 d0 not %eax 80100d1c: 03 45 e8 add -0x18(%ebp),%eax 80100d1f: 83 e0 fc and $0xfffffffc,%eax 80100d22: 89 45 e8 mov %eax,-0x18(%ebp) if(copyout(pgdir, sp, argv[argc], strlen(argv[argc]) + 1) < 0) 80100d25: 8b 45 e0 mov -0x20(%ebp),%eax 80100d28: c1 e0 02 shl $0x2,%eax 80100d2b: 03 45 0c add 0xc(%ebp),%eax 80100d2e: 8b 00 mov (%eax),%eax 80100d30: 89 04 24 mov %eax,(%esp) 80100d33: e8 13 47 00 00 call 8010544b <strlen> 80100d38: 83 c0 01 add $0x1,%eax 80100d3b: 89 c2 mov %eax,%edx 80100d3d: 8b 45 e0 mov -0x20(%ebp),%eax 80100d40: c1 e0 02 shl $0x2,%eax 80100d43: 03 45 0c add 0xc(%ebp),%eax 80100d46: 8b 00 mov (%eax),%eax 80100d48: 89 54 24 0c mov %edx,0xc(%esp) 80100d4c: 89 44 24 08 mov %eax,0x8(%esp) 80100d50: 8b 45 e8 mov -0x18(%ebp),%eax 80100d53: 89 44 24 04 mov %eax,0x4(%esp) 80100d57: 8b 45 f0 mov -0x10(%ebp),%eax 80100d5a: 89 04 24 mov %eax,(%esp) 80100d5d: e8 04 78 00 00 call 80108566 <copyout> 80100d62: 85 c0 test %eax,%eax 80100d64: 0f 88 6e 01 00 00 js 80100ed8 <exec+0x3e0> goto bad; ustack[3+argc] = sp; 80100d6a: 8b 45 e0 mov -0x20(%ebp),%eax 80100d6d: 8d 50 03 lea 0x3(%eax),%edx 80100d70: 8b 45 e8 mov -0x18(%ebp),%eax 80100d73: 89 84 95 40 ff ff ff mov %eax,-0xc0(%ebp,%edx,4) clearpteu(pgdir, (char*)(sz - 2*PGSIZE)); sp = sz; // Push argument strings, prepare rest of stack in ustack. for(argc = 0; argv[argc]; argc++) { 80100d7a: 83 45 e0 01 addl $0x1,-0x20(%ebp) 80100d7e: 8b 45 e0 mov -0x20(%ebp),%eax 80100d81: c1 e0 02 shl $0x2,%eax 80100d84: 03 45 0c add 0xc(%ebp),%eax 80100d87: 8b 00 mov (%eax),%eax 80100d89: 85 c0 test %eax,%eax 80100d8b: 0f 85 6c ff ff ff jne 80100cfd <exec+0x205> sp = (sp - (strlen(argv[argc]) + 1)) & ~3; if(copyout(pgdir, sp, argv[argc], strlen(argv[argc]) + 1) < 0) goto bad; ustack[3+argc] = sp; } ustack[3+argc] = 0; 80100d91: 8b 45 e0 mov -0x20(%ebp),%eax 80100d94: 83 c0 03 add $0x3,%eax 80100d97: c7 84 85 40 ff ff ff movl $0x0,-0xc0(%ebp,%eax,4) 80100d9e: 00 00 00 00 ustack[0] = 0xffffffff; // fake return PC 80100da2: c7 85 40 ff ff ff ff movl $0xffffffff,-0xc0(%ebp) 80100da9: ff ff ff ustack[1] = argc; 80100dac: 8b 45 e0 mov -0x20(%ebp),%eax 80100daf: 89 85 44 ff ff ff mov %eax,-0xbc(%ebp) ustack[2] = sp - (argc+1)*4; // argv pointer 80100db5: 8b 45 e0 mov -0x20(%ebp),%eax 80100db8: 83 c0 01 add $0x1,%eax 80100dbb: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx 80100dc2: 8b 45 e8 mov -0x18(%ebp),%eax 80100dc5: 29 d0 sub %edx,%eax 80100dc7: 89 85 48 ff ff ff mov %eax,-0xb8(%ebp) sp -= (3+argc+1) * 4; 80100dcd: 8b 45 e0 mov -0x20(%ebp),%eax 80100dd0: 83 c0 04 add $0x4,%eax 80100dd3: c1 e0 02 shl $0x2,%eax 80100dd6: 29 45 e8 sub %eax,-0x18(%ebp) if(copyout(pgdir, sp, ustack, (3+argc+1)*4) < 0) 80100dd9: 8b 45 e0 mov -0x20(%ebp),%eax 80100ddc: 83 c0 04 add $0x4,%eax 80100ddf: c1 e0 02 shl $0x2,%eax 80100de2: 89 44 24 0c mov %eax,0xc(%esp) 80100de6: 8d 85 40 ff ff ff lea -0xc0(%ebp),%eax 80100dec: 89 44 24 08 mov %eax,0x8(%esp) 80100df0: 8b 45 e8 mov -0x18(%ebp),%eax 80100df3: 89 44 24 04 mov %eax,0x4(%esp) 80100df7: 8b 45 f0 mov -0x10(%ebp),%eax 80100dfa: 89 04 24 mov %eax,(%esp) 80100dfd: e8 64 77 00 00 call 80108566 <copyout> 80100e02: 85 c0 test %eax,%eax 80100e04: 0f 88 d1 00 00 00 js 80100edb <exec+0x3e3> goto bad; // Save program name for debugging. for(last=s=path; *s; s++) 80100e0a: 8b 45 08 mov 0x8(%ebp),%eax 80100e0d: 89 45 d0 mov %eax,-0x30(%ebp) 80100e10: 8b 45 d0 mov -0x30(%ebp),%eax 80100e13: 89 45 d4 mov %eax,-0x2c(%ebp) 80100e16: eb 17 jmp 80100e2f <exec+0x337> if(*s == '/') 80100e18: 8b 45 d0 mov -0x30(%ebp),%eax 80100e1b: 0f b6 00 movzbl (%eax),%eax 80100e1e: 3c 2f cmp $0x2f,%al 80100e20: 75 09 jne 80100e2b <exec+0x333> last = s+1; 80100e22: 8b 45 d0 mov -0x30(%ebp),%eax 80100e25: 83 c0 01 add $0x1,%eax 80100e28: 89 45 d4 mov %eax,-0x2c(%ebp) sp -= (3+argc+1) * 4; if(copyout(pgdir, sp, ustack, (3+argc+1)*4) < 0) goto bad; // Save program name for debugging. for(last=s=path; *s; s++) 80100e2b: 83 45 d0 01 addl $0x1,-0x30(%ebp) 80100e2f: 8b 45 d0 mov -0x30(%ebp),%eax 80100e32: 0f b6 00 movzbl (%eax),%eax 80100e35: 84 c0 test %al,%al 80100e37: 75 df jne 80100e18 <exec+0x320> if(*s == '/') last = s+1; safestrcpy(proc->name, last, sizeof(proc->name)); 80100e39: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80100e3f: 8d 50 6c lea 0x6c(%eax),%edx 80100e42: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp) 80100e49: 00 80100e4a: 8b 45 d4 mov -0x2c(%ebp),%eax 80100e4d: 89 44 24 04 mov %eax,0x4(%esp) 80100e51: 89 14 24 mov %edx,(%esp) 80100e54: e8 a4 45 00 00 call 801053fd <safestrcpy> // Commit to the user image. oldpgdir = proc->pgdir; 80100e59: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80100e5f: 8b 40 04 mov 0x4(%eax),%eax 80100e62: 89 45 f4 mov %eax,-0xc(%ebp) proc->pgdir = pgdir; 80100e65: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80100e6b: 8b 55 f0 mov -0x10(%ebp),%edx 80100e6e: 89 50 04 mov %edx,0x4(%eax) proc->sz = sz; 80100e71: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80100e77: 8b 55 e4 mov -0x1c(%ebp),%edx 80100e7a: 89 10 mov %edx,(%eax) proc->tf->eip = elf.entry; // main 80100e7c: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80100e82: 8b 40 18 mov 0x18(%eax),%eax 80100e85: 8b 95 24 ff ff ff mov -0xdc(%ebp),%edx 80100e8b: 89 50 38 mov %edx,0x38(%eax) proc->tf->esp = sp; 80100e8e: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80100e94: 8b 40 18 mov 0x18(%eax),%eax 80100e97: 8b 55 e8 mov -0x18(%ebp),%edx 80100e9a: 89 50 44 mov %edx,0x44(%eax) switchuvm(proc); 80100e9d: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80100ea3: 89 04 24 mov %eax,(%esp) 80100ea6: e8 f0 6f 00 00 call 80107e9b <switchuvm> freevm(oldpgdir); 80100eab: 8b 45 f4 mov -0xc(%ebp),%eax 80100eae: 89 04 24 mov %eax,(%esp) 80100eb1: e8 5d 74 00 00 call 80108313 <freevm> return 0; 80100eb6: b8 00 00 00 00 mov $0x0,%eax 80100ebb: eb 46 jmp 80100f03 <exec+0x40b> ilock(ip); pgdir = 0; // Check ELF header if(readi(ip, (char*)&elf, 0, sizeof(elf)) < sizeof(elf)) goto bad; 80100ebd: 90 nop 80100ebe: eb 1c jmp 80100edc <exec+0x3e4> if(elf.magic != ELF_MAGIC) goto bad; 80100ec0: 90 nop 80100ec1: eb 19 jmp 80100edc <exec+0x3e4> if((pgdir = setupkvm()) == 0) goto bad; 80100ec3: 90 nop 80100ec4: eb 16 jmp 80100edc <exec+0x3e4> // Load program into memory. sz = PGSIZE; for(i=0, off=elf.phoff; i<elf.phnum; i++, off+=sizeof(ph)){ if(readi(ip, (char*)&ph, off, sizeof(ph)) != sizeof(ph)) goto bad; 80100ec6: 90 nop 80100ec7: eb 13 jmp 80100edc <exec+0x3e4> if(ph.type != ELF_PROG_LOAD) continue; if(ph.memsz < ph.filesz) goto bad; 80100ec9: 90 nop 80100eca: eb 10 jmp 80100edc <exec+0x3e4> if((sz = allocuvm(pgdir, sz, ph.vaddr + ph.memsz)) == 0) goto bad; 80100ecc: 90 nop 80100ecd: eb 0d jmp 80100edc <exec+0x3e4> if(loaduvm(pgdir, (char*)ph.vaddr, ip, ph.off, ph.filesz) < 0) goto bad; 80100ecf: 90 nop 80100ed0: eb 0a jmp 80100edc <exec+0x3e4> // Allocate two pages at the next page boundary. // Make the first inaccessible. Use the second as the user stack. sz = PGROUNDUP(sz); if((sz = allocuvm(pgdir, sz, sz + 2*PGSIZE)) == 0) goto bad; 80100ed2: 90 nop 80100ed3: eb 07 jmp 80100edc <exec+0x3e4> sp = sz; // Push argument strings, prepare rest of stack in ustack. for(argc = 0; argv[argc]; argc++) { if(argc >= MAXARG) goto bad; 80100ed5: 90 nop 80100ed6: eb 04 jmp 80100edc <exec+0x3e4> sp = (sp - (strlen(argv[argc]) + 1)) & ~3; if(copyout(pgdir, sp, argv[argc], strlen(argv[argc]) + 1) < 0) goto bad; 80100ed8: 90 nop 80100ed9: eb 01 jmp 80100edc <exec+0x3e4> ustack[1] = argc; ustack[2] = sp - (argc+1)*4; // argv pointer sp -= (3+argc+1) * 4; if(copyout(pgdir, sp, ustack, (3+argc+1)*4) < 0) goto bad; 80100edb: 90 nop switchuvm(proc); freevm(oldpgdir); return 0; bad: if(pgdir) 80100edc: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 80100ee0: 74 0b je 80100eed <exec+0x3f5> freevm(pgdir); 80100ee2: 8b 45 f0 mov -0x10(%ebp),%eax 80100ee5: 89 04 24 mov %eax,(%esp) 80100ee8: e8 26 74 00 00 call 80108313 <freevm> if(ip) 80100eed: 83 7d ec 00 cmpl $0x0,-0x14(%ebp) 80100ef1: 74 0b je 80100efe <exec+0x406> iunlockput(ip); 80100ef3: 8b 45 ec mov -0x14(%ebp),%eax 80100ef6: 89 04 24 mov %eax,(%esp) 80100ef9: e8 04 0c 00 00 call 80101b02 <iunlockput> return -1; 80100efe: b8 ff ff ff ff mov $0xffffffff,%eax } 80100f03: c9 leave 80100f04: c3 ret 80100f05: 00 00 add %al,(%eax) ... 80100f08 <fileinit>: struct file file[NFILE]; } ftable; void fileinit(void) { 80100f08: 55 push %ebp 80100f09: 89 e5 mov %esp,%ebp 80100f0b: 83 ec 18 sub $0x18,%esp initlock(&ftable.lock, "ftable"); 80100f0e: c7 44 24 04 6d 86 10 movl $0x8010866d,0x4(%esp) 80100f15: 80 80100f16: c7 04 24 80 de 10 80 movl $0x8010de80,(%esp) 80100f1d: e8 38 40 00 00 call 80104f5a <initlock> } 80100f22: c9 leave 80100f23: c3 ret 80100f24 <filealloc>: // Allocate a file structure. struct file* filealloc(void) { 80100f24: 55 push %ebp 80100f25: 89 e5 mov %esp,%ebp 80100f27: 83 ec 28 sub $0x28,%esp struct file *f; acquire(&ftable.lock); 80100f2a: c7 04 24 80 de 10 80 movl $0x8010de80,(%esp) 80100f31: e8 45 40 00 00 call 80104f7b <acquire> for(f = ftable.file; f < ftable.file + NFILE; f++){ 80100f36: c7 45 f4 b4 de 10 80 movl $0x8010deb4,-0xc(%ebp) 80100f3d: eb 29 jmp 80100f68 <filealloc+0x44> if(f->ref == 0){ 80100f3f: 8b 45 f4 mov -0xc(%ebp),%eax 80100f42: 8b 40 04 mov 0x4(%eax),%eax 80100f45: 85 c0 test %eax,%eax 80100f47: 75 1b jne 80100f64 <filealloc+0x40> f->ref = 1; 80100f49: 8b 45 f4 mov -0xc(%ebp),%eax 80100f4c: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax) release(&ftable.lock); 80100f53: c7 04 24 80 de 10 80 movl $0x8010de80,(%esp) 80100f5a: e8 7d 40 00 00 call 80104fdc <release> return f; 80100f5f: 8b 45 f4 mov -0xc(%ebp),%eax 80100f62: eb 1f jmp 80100f83 <filealloc+0x5f> filealloc(void) { struct file *f; acquire(&ftable.lock); for(f = ftable.file; f < ftable.file + NFILE; f++){ 80100f64: 83 45 f4 18 addl $0x18,-0xc(%ebp) 80100f68: b8 14 e8 10 80 mov $0x8010e814,%eax 80100f6d: 39 45 f4 cmp %eax,-0xc(%ebp) 80100f70: 72 cd jb 80100f3f <filealloc+0x1b> f->ref = 1; release(&ftable.lock); return f; } } release(&ftable.lock); 80100f72: c7 04 24 80 de 10 80 movl $0x8010de80,(%esp) 80100f79: e8 5e 40 00 00 call 80104fdc <release> return 0; 80100f7e: b8 00 00 00 00 mov $0x0,%eax } 80100f83: c9 leave 80100f84: c3 ret 80100f85 <filedup>: // Increment ref count for file f. struct file* filedup(struct file *f) { 80100f85: 55 push %ebp 80100f86: 89 e5 mov %esp,%ebp 80100f88: 83 ec 18 sub $0x18,%esp acquire(&ftable.lock); 80100f8b: c7 04 24 80 de 10 80 movl $0x8010de80,(%esp) 80100f92: e8 e4 3f 00 00 call 80104f7b <acquire> if(f->ref < 1) 80100f97: 8b 45 08 mov 0x8(%ebp),%eax 80100f9a: 8b 40 04 mov 0x4(%eax),%eax 80100f9d: 85 c0 test %eax,%eax 80100f9f: 7f 0c jg 80100fad <filedup+0x28> panic("filedup"); 80100fa1: c7 04 24 74 86 10 80 movl $0x80108674,(%esp) 80100fa8: e8 8d f5 ff ff call 8010053a <panic> f->ref++; 80100fad: 8b 45 08 mov 0x8(%ebp),%eax 80100fb0: 8b 40 04 mov 0x4(%eax),%eax 80100fb3: 8d 50 01 lea 0x1(%eax),%edx 80100fb6: 8b 45 08 mov 0x8(%ebp),%eax 80100fb9: 89 50 04 mov %edx,0x4(%eax) release(&ftable.lock); 80100fbc: c7 04 24 80 de 10 80 movl $0x8010de80,(%esp) 80100fc3: e8 14 40 00 00 call 80104fdc <release> return f; 80100fc8: 8b 45 08 mov 0x8(%ebp),%eax } 80100fcb: c9 leave 80100fcc: c3 ret 80100fcd <fileclose>: // Close file f. (Decrement ref count, close when reaches 0.) void fileclose(struct file *f) { 80100fcd: 55 push %ebp 80100fce: 89 e5 mov %esp,%ebp 80100fd0: 83 ec 38 sub $0x38,%esp struct file ff; acquire(&ftable.lock); 80100fd3: c7 04 24 80 de 10 80 movl $0x8010de80,(%esp) 80100fda: e8 9c 3f 00 00 call 80104f7b <acquire> if(f->ref < 1) 80100fdf: 8b 45 08 mov 0x8(%ebp),%eax 80100fe2: 8b 40 04 mov 0x4(%eax),%eax 80100fe5: 85 c0 test %eax,%eax 80100fe7: 7f 0c jg 80100ff5 <fileclose+0x28> panic("fileclose"); 80100fe9: c7 04 24 7c 86 10 80 movl $0x8010867c,(%esp) 80100ff0: e8 45 f5 ff ff call 8010053a <panic> if(--f->ref > 0){ 80100ff5: 8b 45 08 mov 0x8(%ebp),%eax 80100ff8: 8b 40 04 mov 0x4(%eax),%eax 80100ffb: 8d 50 ff lea -0x1(%eax),%edx 80100ffe: 8b 45 08 mov 0x8(%ebp),%eax 80101001: 89 50 04 mov %edx,0x4(%eax) 80101004: 8b 45 08 mov 0x8(%ebp),%eax 80101007: 8b 40 04 mov 0x4(%eax),%eax 8010100a: 85 c0 test %eax,%eax 8010100c: 7e 11 jle 8010101f <fileclose+0x52> release(&ftable.lock); 8010100e: c7 04 24 80 de 10 80 movl $0x8010de80,(%esp) 80101015: e8 c2 3f 00 00 call 80104fdc <release> return; 8010101a: e9 82 00 00 00 jmp 801010a1 <fileclose+0xd4> } ff = *f; 8010101f: 8b 45 08 mov 0x8(%ebp),%eax 80101022: 8b 10 mov (%eax),%edx 80101024: 89 55 e0 mov %edx,-0x20(%ebp) 80101027: 8b 50 04 mov 0x4(%eax),%edx 8010102a: 89 55 e4 mov %edx,-0x1c(%ebp) 8010102d: 8b 50 08 mov 0x8(%eax),%edx 80101030: 89 55 e8 mov %edx,-0x18(%ebp) 80101033: 8b 50 0c mov 0xc(%eax),%edx 80101036: 89 55 ec mov %edx,-0x14(%ebp) 80101039: 8b 50 10 mov 0x10(%eax),%edx 8010103c: 89 55 f0 mov %edx,-0x10(%ebp) 8010103f: 8b 40 14 mov 0x14(%eax),%eax 80101042: 89 45 f4 mov %eax,-0xc(%ebp) f->ref = 0; 80101045: 8b 45 08 mov 0x8(%ebp),%eax 80101048: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) f->type = FD_NONE; 8010104f: 8b 45 08 mov 0x8(%ebp),%eax 80101052: c7 00 00 00 00 00 movl $0x0,(%eax) release(&ftable.lock); 80101058: c7 04 24 80 de 10 80 movl $0x8010de80,(%esp) 8010105f: e8 78 3f 00 00 call 80104fdc <release> if(ff.type == FD_PIPE) 80101064: 8b 45 e0 mov -0x20(%ebp),%eax 80101067: 83 f8 01 cmp $0x1,%eax 8010106a: 75 18 jne 80101084 <fileclose+0xb7> pipeclose(ff.pipe, ff.writable); 8010106c: 0f b6 45 e9 movzbl -0x17(%ebp),%eax 80101070: 0f be d0 movsbl %al,%edx 80101073: 8b 45 ec mov -0x14(%ebp),%eax 80101076: 89 54 24 04 mov %edx,0x4(%esp) 8010107a: 89 04 24 mov %eax,(%esp) 8010107d: e8 c5 2c 00 00 call 80103d47 <pipeclose> 80101082: eb 1d jmp 801010a1 <fileclose+0xd4> else if(ff.type == FD_INODE){ 80101084: 8b 45 e0 mov -0x20(%ebp),%eax 80101087: 83 f8 02 cmp $0x2,%eax 8010108a: 75 15 jne 801010a1 <fileclose+0xd4> begin_trans(); 8010108c: e8 81 21 00 00 call 80103212 <begin_trans> iput(ff.ip); 80101091: 8b 45 f0 mov -0x10(%ebp),%eax 80101094: 89 04 24 mov %eax,(%esp) 80101097: e8 95 09 00 00 call 80101a31 <iput> commit_trans(); 8010109c: e8 ba 21 00 00 call 8010325b <commit_trans> } } 801010a1: c9 leave 801010a2: c3 ret 801010a3 <filestat>: // Get metadata about file f. int filestat(struct file *f, struct stat *st) { 801010a3: 55 push %ebp 801010a4: 89 e5 mov %esp,%ebp 801010a6: 83 ec 18 sub $0x18,%esp if(f->type == FD_INODE){ 801010a9: 8b 45 08 mov 0x8(%ebp),%eax 801010ac: 8b 00 mov (%eax),%eax 801010ae: 83 f8 02 cmp $0x2,%eax 801010b1: 75 38 jne 801010eb <filestat+0x48> ilock(f->ip); 801010b3: 8b 45 08 mov 0x8(%ebp),%eax 801010b6: 8b 40 10 mov 0x10(%eax),%eax 801010b9: 89 04 24 mov %eax,(%esp) 801010bc: e8 ba 07 00 00 call 8010187b <ilock> stati(f->ip, st); 801010c1: 8b 45 08 mov 0x8(%ebp),%eax 801010c4: 8b 40 10 mov 0x10(%eax),%eax 801010c7: 8b 55 0c mov 0xc(%ebp),%edx 801010ca: 89 54 24 04 mov %edx,0x4(%esp) 801010ce: 89 04 24 mov %eax,(%esp) 801010d1: e8 59 0c 00 00 call 80101d2f <stati> iunlock(f->ip); 801010d6: 8b 45 08 mov 0x8(%ebp),%eax 801010d9: 8b 40 10 mov 0x10(%eax),%eax 801010dc: 89 04 24 mov %eax,(%esp) 801010df: e8 e8 08 00 00 call 801019cc <iunlock> return 0; 801010e4: b8 00 00 00 00 mov $0x0,%eax 801010e9: eb 05 jmp 801010f0 <filestat+0x4d> } return -1; 801010eb: b8 ff ff ff ff mov $0xffffffff,%eax } 801010f0: c9 leave 801010f1: c3 ret 801010f2 <fileread>: // Read from file f. int fileread(struct file *f, char *addr, int n) { 801010f2: 55 push %ebp 801010f3: 89 e5 mov %esp,%ebp 801010f5: 83 ec 28 sub $0x28,%esp int r; if(f->readable == 0) 801010f8: 8b 45 08 mov 0x8(%ebp),%eax 801010fb: 0f b6 40 08 movzbl 0x8(%eax),%eax 801010ff: 84 c0 test %al,%al 80101101: 75 0a jne 8010110d <fileread+0x1b> return -1; 80101103: b8 ff ff ff ff mov $0xffffffff,%eax 80101108: e9 9f 00 00 00 jmp 801011ac <fileread+0xba> if(f->type == FD_PIPE) 8010110d: 8b 45 08 mov 0x8(%ebp),%eax 80101110: 8b 00 mov (%eax),%eax 80101112: 83 f8 01 cmp $0x1,%eax 80101115: 75 1e jne 80101135 <fileread+0x43> return piperead(f->pipe, addr, n); 80101117: 8b 45 08 mov 0x8(%ebp),%eax 8010111a: 8b 40 0c mov 0xc(%eax),%eax 8010111d: 8b 55 10 mov 0x10(%ebp),%edx 80101120: 89 54 24 08 mov %edx,0x8(%esp) 80101124: 8b 55 0c mov 0xc(%ebp),%edx 80101127: 89 54 24 04 mov %edx,0x4(%esp) 8010112b: 89 04 24 mov %eax,(%esp) 8010112e: e8 96 2d 00 00 call 80103ec9 <piperead> 80101133: eb 77 jmp 801011ac <fileread+0xba> if(f->type == FD_INODE){ 80101135: 8b 45 08 mov 0x8(%ebp),%eax 80101138: 8b 00 mov (%eax),%eax 8010113a: 83 f8 02 cmp $0x2,%eax 8010113d: 75 61 jne 801011a0 <fileread+0xae> ilock(f->ip); 8010113f: 8b 45 08 mov 0x8(%ebp),%eax 80101142: 8b 40 10 mov 0x10(%eax),%eax 80101145: 89 04 24 mov %eax,(%esp) 80101148: e8 2e 07 00 00 call 8010187b <ilock> if((r = readi(f->ip, addr, f->off, n)) > 0) 8010114d: 8b 4d 10 mov 0x10(%ebp),%ecx 80101150: 8b 45 08 mov 0x8(%ebp),%eax 80101153: 8b 50 14 mov 0x14(%eax),%edx 80101156: 8b 45 08 mov 0x8(%ebp),%eax 80101159: 8b 40 10 mov 0x10(%eax),%eax 8010115c: 89 4c 24 0c mov %ecx,0xc(%esp) 80101160: 89 54 24 08 mov %edx,0x8(%esp) 80101164: 8b 55 0c mov 0xc(%ebp),%edx 80101167: 89 54 24 04 mov %edx,0x4(%esp) 8010116b: 89 04 24 mov %eax,(%esp) 8010116e: e8 01 0c 00 00 call 80101d74 <readi> 80101173: 89 45 f4 mov %eax,-0xc(%ebp) 80101176: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 8010117a: 7e 11 jle 8010118d <fileread+0x9b> f->off += r; 8010117c: 8b 45 08 mov 0x8(%ebp),%eax 8010117f: 8b 50 14 mov 0x14(%eax),%edx 80101182: 8b 45 f4 mov -0xc(%ebp),%eax 80101185: 01 c2 add %eax,%edx 80101187: 8b 45 08 mov 0x8(%ebp),%eax 8010118a: 89 50 14 mov %edx,0x14(%eax) iunlock(f->ip); 8010118d: 8b 45 08 mov 0x8(%ebp),%eax 80101190: 8b 40 10 mov 0x10(%eax),%eax 80101193: 89 04 24 mov %eax,(%esp) 80101196: e8 31 08 00 00 call 801019cc <iunlock> return r; 8010119b: 8b 45 f4 mov -0xc(%ebp),%eax 8010119e: eb 0c jmp 801011ac <fileread+0xba> } panic("fileread"); 801011a0: c7 04 24 86 86 10 80 movl $0x80108686,(%esp) 801011a7: e8 8e f3 ff ff call 8010053a <panic> } 801011ac: c9 leave 801011ad: c3 ret 801011ae <filewrite>: //PAGEBREAK! // Write to file f. int filewrite(struct file *f, char *addr, int n) { 801011ae: 55 push %ebp 801011af: 89 e5 mov %esp,%ebp 801011b1: 53 push %ebx 801011b2: 83 ec 24 sub $0x24,%esp int r; if(f->writable == 0) 801011b5: 8b 45 08 mov 0x8(%ebp),%eax 801011b8: 0f b6 40 09 movzbl 0x9(%eax),%eax 801011bc: 84 c0 test %al,%al 801011be: 75 0a jne 801011ca <filewrite+0x1c> return -1; 801011c0: b8 ff ff ff ff mov $0xffffffff,%eax 801011c5: e9 23 01 00 00 jmp 801012ed <filewrite+0x13f> if(f->type == FD_PIPE) 801011ca: 8b 45 08 mov 0x8(%ebp),%eax 801011cd: 8b 00 mov (%eax),%eax 801011cf: 83 f8 01 cmp $0x1,%eax 801011d2: 75 21 jne 801011f5 <filewrite+0x47> return pipewrite(f->pipe, addr, n); 801011d4: 8b 45 08 mov 0x8(%ebp),%eax 801011d7: 8b 40 0c mov 0xc(%eax),%eax 801011da: 8b 55 10 mov 0x10(%ebp),%edx 801011dd: 89 54 24 08 mov %edx,0x8(%esp) 801011e1: 8b 55 0c mov 0xc(%ebp),%edx 801011e4: 89 54 24 04 mov %edx,0x4(%esp) 801011e8: 89 04 24 mov %eax,(%esp) 801011eb: e8 e9 2b 00 00 call 80103dd9 <pipewrite> 801011f0: e9 f8 00 00 00 jmp 801012ed <filewrite+0x13f> if(f->type == FD_INODE){ 801011f5: 8b 45 08 mov 0x8(%ebp),%eax 801011f8: 8b 00 mov (%eax),%eax 801011fa: 83 f8 02 cmp $0x2,%eax 801011fd: 0f 85 de 00 00 00 jne 801012e1 <filewrite+0x133> // the maximum log transaction size, including // i-node, indirect block, allocation blocks, // and 2 blocks of slop for non-aligned writes. // this really belongs lower down, since writei() // might be writing a device like the console. int max = ((LOGSIZE-1-1-2) / 2) * 512; 80101203: c7 45 ec 00 06 00 00 movl $0x600,-0x14(%ebp) int i = 0; 8010120a: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) while(i < n){ 80101211: e9 a8 00 00 00 jmp 801012be <filewrite+0x110> int n1 = n - i; 80101216: 8b 45 f0 mov -0x10(%ebp),%eax 80101219: 8b 55 10 mov 0x10(%ebp),%edx 8010121c: 89 d1 mov %edx,%ecx 8010121e: 29 c1 sub %eax,%ecx 80101220: 89 c8 mov %ecx,%eax 80101222: 89 45 f4 mov %eax,-0xc(%ebp) if(n1 > max) 80101225: 8b 45 f4 mov -0xc(%ebp),%eax 80101228: 3b 45 ec cmp -0x14(%ebp),%eax 8010122b: 7e 06 jle 80101233 <filewrite+0x85> n1 = max; 8010122d: 8b 45 ec mov -0x14(%ebp),%eax 80101230: 89 45 f4 mov %eax,-0xc(%ebp) begin_trans(); 80101233: e8 da 1f 00 00 call 80103212 <begin_trans> ilock(f->ip); 80101238: 8b 45 08 mov 0x8(%ebp),%eax 8010123b: 8b 40 10 mov 0x10(%eax),%eax 8010123e: 89 04 24 mov %eax,(%esp) 80101241: e8 35 06 00 00 call 8010187b <ilock> if ((r = writei(f->ip, addr + i, f->off, n1)) > 0) 80101246: 8b 5d f4 mov -0xc(%ebp),%ebx 80101249: 8b 45 08 mov 0x8(%ebp),%eax 8010124c: 8b 48 14 mov 0x14(%eax),%ecx 8010124f: 8b 45 f0 mov -0x10(%ebp),%eax 80101252: 89 c2 mov %eax,%edx 80101254: 03 55 0c add 0xc(%ebp),%edx 80101257: 8b 45 08 mov 0x8(%ebp),%eax 8010125a: 8b 40 10 mov 0x10(%eax),%eax 8010125d: 89 5c 24 0c mov %ebx,0xc(%esp) 80101261: 89 4c 24 08 mov %ecx,0x8(%esp) 80101265: 89 54 24 04 mov %edx,0x4(%esp) 80101269: 89 04 24 mov %eax,(%esp) 8010126c: e8 6f 0c 00 00 call 80101ee0 <writei> 80101271: 89 45 e8 mov %eax,-0x18(%ebp) 80101274: 83 7d e8 00 cmpl $0x0,-0x18(%ebp) 80101278: 7e 11 jle 8010128b <filewrite+0xdd> f->off += r; 8010127a: 8b 45 08 mov 0x8(%ebp),%eax 8010127d: 8b 50 14 mov 0x14(%eax),%edx 80101280: 8b 45 e8 mov -0x18(%ebp),%eax 80101283: 01 c2 add %eax,%edx 80101285: 8b 45 08 mov 0x8(%ebp),%eax 80101288: 89 50 14 mov %edx,0x14(%eax) iunlock(f->ip); 8010128b: 8b 45 08 mov 0x8(%ebp),%eax 8010128e: 8b 40 10 mov 0x10(%eax),%eax 80101291: 89 04 24 mov %eax,(%esp) 80101294: e8 33 07 00 00 call 801019cc <iunlock> commit_trans(); 80101299: e8 bd 1f 00 00 call 8010325b <commit_trans> if(r < 0) 8010129e: 83 7d e8 00 cmpl $0x0,-0x18(%ebp) 801012a2: 78 28 js 801012cc <filewrite+0x11e> break; if(r != n1) 801012a4: 8b 45 e8 mov -0x18(%ebp),%eax 801012a7: 3b 45 f4 cmp -0xc(%ebp),%eax 801012aa: 74 0c je 801012b8 <filewrite+0x10a> panic("short filewrite"); 801012ac: c7 04 24 8f 86 10 80 movl $0x8010868f,(%esp) 801012b3: e8 82 f2 ff ff call 8010053a <panic> i += r; 801012b8: 8b 45 e8 mov -0x18(%ebp),%eax 801012bb: 01 45 f0 add %eax,-0x10(%ebp) // and 2 blocks of slop for non-aligned writes. // this really belongs lower down, since writei() // might be writing a device like the console. int max = ((LOGSIZE-1-1-2) / 2) * 512; int i = 0; while(i < n){ 801012be: 8b 45 f0 mov -0x10(%ebp),%eax 801012c1: 3b 45 10 cmp 0x10(%ebp),%eax 801012c4: 0f 8c 4c ff ff ff jl 80101216 <filewrite+0x68> 801012ca: eb 01 jmp 801012cd <filewrite+0x11f> f->off += r; iunlock(f->ip); commit_trans(); if(r < 0) break; 801012cc: 90 nop if(r != n1) panic("short filewrite"); i += r; } return i == n ? n : -1; 801012cd: 8b 45 f0 mov -0x10(%ebp),%eax 801012d0: 3b 45 10 cmp 0x10(%ebp),%eax 801012d3: 75 05 jne 801012da <filewrite+0x12c> 801012d5: 8b 45 10 mov 0x10(%ebp),%eax 801012d8: eb 05 jmp 801012df <filewrite+0x131> 801012da: b8 ff ff ff ff mov $0xffffffff,%eax 801012df: eb 0c jmp 801012ed <filewrite+0x13f> } panic("filewrite"); 801012e1: c7 04 24 9f 86 10 80 movl $0x8010869f,(%esp) 801012e8: e8 4d f2 ff ff call 8010053a <panic> } 801012ed: 83 c4 24 add $0x24,%esp 801012f0: 5b pop %ebx 801012f1: 5d pop %ebp 801012f2: c3 ret ... 801012f4 <readsb>: static void itrunc(struct inode*); // Read the super block. void readsb(int dev, struct superblock *sb) { 801012f4: 55 push %ebp 801012f5: 89 e5 mov %esp,%ebp 801012f7: 83 ec 28 sub $0x28,%esp struct buf *bp; bp = bread(dev, 1); 801012fa: 8b 45 08 mov 0x8(%ebp),%eax 801012fd: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp) 80101304: 00 80101305: 89 04 24 mov %eax,(%esp) 80101308: e8 9a ee ff ff call 801001a7 <bread> 8010130d: 89 45 f4 mov %eax,-0xc(%ebp) memmove(sb, bp->data, sizeof(*sb)); 80101310: 8b 45 f4 mov -0xc(%ebp),%eax 80101313: 83 c0 18 add $0x18,%eax 80101316: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp) 8010131d: 00 8010131e: 89 44 24 04 mov %eax,0x4(%esp) 80101322: 8b 45 0c mov 0xc(%ebp),%eax 80101325: 89 04 24 mov %eax,(%esp) 80101328: e8 70 3f 00 00 call 8010529d <memmove> brelse(bp); 8010132d: 8b 45 f4 mov -0xc(%ebp),%eax 80101330: 89 04 24 mov %eax,(%esp) 80101333: e8 e0 ee ff ff call 80100218 <brelse> } 80101338: c9 leave 80101339: c3 ret 8010133a <bzero>: // Zero a block. static void bzero(int dev, int bno) { 8010133a: 55 push %ebp 8010133b: 89 e5 mov %esp,%ebp 8010133d: 83 ec 28 sub $0x28,%esp struct buf *bp; bp = bread(dev, bno); 80101340: 8b 55 0c mov 0xc(%ebp),%edx 80101343: 8b 45 08 mov 0x8(%ebp),%eax 80101346: 89 54 24 04 mov %edx,0x4(%esp) 8010134a: 89 04 24 mov %eax,(%esp) 8010134d: e8 55 ee ff ff call 801001a7 <bread> 80101352: 89 45 f4 mov %eax,-0xc(%ebp) memset(bp->data, 0, BSIZE); 80101355: 8b 45 f4 mov -0xc(%ebp),%eax 80101358: 83 c0 18 add $0x18,%eax 8010135b: c7 44 24 08 00 02 00 movl $0x200,0x8(%esp) 80101362: 00 80101363: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 8010136a: 00 8010136b: 89 04 24 mov %eax,(%esp) 8010136e: e8 57 3e 00 00 call 801051ca <memset> log_write(bp); 80101373: 8b 45 f4 mov -0xc(%ebp),%eax 80101376: 89 04 24 mov %eax,(%esp) 80101379: e8 35 1f 00 00 call 801032b3 <log_write> brelse(bp); 8010137e: 8b 45 f4 mov -0xc(%ebp),%eax 80101381: 89 04 24 mov %eax,(%esp) 80101384: e8 8f ee ff ff call 80100218 <brelse> } 80101389: c9 leave 8010138a: c3 ret 8010138b <balloc>: // Blocks. // Allocate a zeroed disk block. static uint balloc(uint dev) { 8010138b: 55 push %ebp 8010138c: 89 e5 mov %esp,%ebp 8010138e: 53 push %ebx 8010138f: 83 ec 34 sub $0x34,%esp int b, bi, m; struct buf *bp; struct superblock sb; bp = 0; 80101392: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) readsb(dev, &sb); 80101399: 8b 45 08 mov 0x8(%ebp),%eax 8010139c: 8d 55 d8 lea -0x28(%ebp),%edx 8010139f: 89 54 24 04 mov %edx,0x4(%esp) 801013a3: 89 04 24 mov %eax,(%esp) 801013a6: e8 49 ff ff ff call 801012f4 <readsb> for(b = 0; b < sb.size; b += BPB){ 801013ab: c7 45 e8 00 00 00 00 movl $0x0,-0x18(%ebp) 801013b2: e9 15 01 00 00 jmp 801014cc <balloc+0x141> bp = bread(dev, BBLOCK(b, sb.ninodes)); 801013b7: 8b 45 e8 mov -0x18(%ebp),%eax 801013ba: 8d 90 ff 0f 00 00 lea 0xfff(%eax),%edx 801013c0: 85 c0 test %eax,%eax 801013c2: 0f 48 c2 cmovs %edx,%eax 801013c5: c1 f8 0c sar $0xc,%eax 801013c8: 8b 55 e0 mov -0x20(%ebp),%edx 801013cb: c1 ea 03 shr $0x3,%edx 801013ce: 01 d0 add %edx,%eax 801013d0: 83 c0 03 add $0x3,%eax 801013d3: 89 44 24 04 mov %eax,0x4(%esp) 801013d7: 8b 45 08 mov 0x8(%ebp),%eax 801013da: 89 04 24 mov %eax,(%esp) 801013dd: e8 c5 ed ff ff call 801001a7 <bread> 801013e2: 89 45 f4 mov %eax,-0xc(%ebp) for(bi = 0; bi < BPB && b + bi < sb.size; bi++){ 801013e5: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp) 801013ec: e9 aa 00 00 00 jmp 8010149b <balloc+0x110> m = 1 << (bi % 8); 801013f1: 8b 45 ec mov -0x14(%ebp),%eax 801013f4: 89 c2 mov %eax,%edx 801013f6: c1 fa 1f sar $0x1f,%edx 801013f9: c1 ea 1d shr $0x1d,%edx 801013fc: 01 d0 add %edx,%eax 801013fe: 83 e0 07 and $0x7,%eax 80101401: 29 d0 sub %edx,%eax 80101403: ba 01 00 00 00 mov $0x1,%edx 80101408: 89 d3 mov %edx,%ebx 8010140a: 89 c1 mov %eax,%ecx 8010140c: d3 e3 shl %cl,%ebx 8010140e: 89 d8 mov %ebx,%eax 80101410: 89 45 f0 mov %eax,-0x10(%ebp) if((bp->data[bi/8] & m) == 0){ // Is block free? 80101413: 8b 45 ec mov -0x14(%ebp),%eax 80101416: 8d 50 07 lea 0x7(%eax),%edx 80101419: 85 c0 test %eax,%eax 8010141b: 0f 48 c2 cmovs %edx,%eax 8010141e: c1 f8 03 sar $0x3,%eax 80101421: 8b 55 f4 mov -0xc(%ebp),%edx 80101424: 0f b6 44 02 18 movzbl 0x18(%edx,%eax,1),%eax 80101429: 0f b6 c0 movzbl %al,%eax 8010142c: 23 45 f0 and -0x10(%ebp),%eax 8010142f: 85 c0 test %eax,%eax 80101431: 75 64 jne 80101497 <balloc+0x10c> bp->data[bi/8] |= m; // Mark block in use. 80101433: 8b 45 ec mov -0x14(%ebp),%eax 80101436: 8d 50 07 lea 0x7(%eax),%edx 80101439: 85 c0 test %eax,%eax 8010143b: 0f 48 c2 cmovs %edx,%eax 8010143e: c1 f8 03 sar $0x3,%eax 80101441: 89 c2 mov %eax,%edx 80101443: 8b 4d f4 mov -0xc(%ebp),%ecx 80101446: 0f b6 44 01 18 movzbl 0x18(%ecx,%eax,1),%eax 8010144b: 89 c1 mov %eax,%ecx 8010144d: 8b 45 f0 mov -0x10(%ebp),%eax 80101450: 09 c8 or %ecx,%eax 80101452: 89 c1 mov %eax,%ecx 80101454: 8b 45 f4 mov -0xc(%ebp),%eax 80101457: 88 4c 10 18 mov %cl,0x18(%eax,%edx,1) log_write(bp); 8010145b: 8b 45 f4 mov -0xc(%ebp),%eax 8010145e: 89 04 24 mov %eax,(%esp) 80101461: e8 4d 1e 00 00 call 801032b3 <log_write> brelse(bp); 80101466: 8b 45 f4 mov -0xc(%ebp),%eax 80101469: 89 04 24 mov %eax,(%esp) 8010146c: e8 a7 ed ff ff call 80100218 <brelse> bzero(dev, b + bi); 80101471: 8b 45 ec mov -0x14(%ebp),%eax 80101474: 8b 55 e8 mov -0x18(%ebp),%edx 80101477: 01 c2 add %eax,%edx 80101479: 8b 45 08 mov 0x8(%ebp),%eax 8010147c: 89 54 24 04 mov %edx,0x4(%esp) 80101480: 89 04 24 mov %eax,(%esp) 80101483: e8 b2 fe ff ff call 8010133a <bzero> return b + bi; 80101488: 8b 45 ec mov -0x14(%ebp),%eax 8010148b: 8b 55 e8 mov -0x18(%ebp),%edx 8010148e: 8d 04 02 lea (%edx,%eax,1),%eax } } brelse(bp); } panic("balloc: out of blocks"); } 80101491: 83 c4 34 add $0x34,%esp 80101494: 5b pop %ebx 80101495: 5d pop %ebp 80101496: c3 ret bp = 0; readsb(dev, &sb); for(b = 0; b < sb.size; b += BPB){ bp = bread(dev, BBLOCK(b, sb.ninodes)); for(bi = 0; bi < BPB && b + bi < sb.size; bi++){ 80101497: 83 45 ec 01 addl $0x1,-0x14(%ebp) 8010149b: 81 7d ec ff 0f 00 00 cmpl $0xfff,-0x14(%ebp) 801014a2: 7f 16 jg 801014ba <balloc+0x12f> 801014a4: 8b 45 ec mov -0x14(%ebp),%eax 801014a7: 8b 55 e8 mov -0x18(%ebp),%edx 801014aa: 8d 04 02 lea (%edx,%eax,1),%eax 801014ad: 89 c2 mov %eax,%edx 801014af: 8b 45 d8 mov -0x28(%ebp),%eax 801014b2: 39 c2 cmp %eax,%edx 801014b4: 0f 82 37 ff ff ff jb 801013f1 <balloc+0x66> brelse(bp); bzero(dev, b + bi); return b + bi; } } brelse(bp); 801014ba: 8b 45 f4 mov -0xc(%ebp),%eax 801014bd: 89 04 24 mov %eax,(%esp) 801014c0: e8 53 ed ff ff call 80100218 <brelse> struct buf *bp; struct superblock sb; bp = 0; readsb(dev, &sb); for(b = 0; b < sb.size; b += BPB){ 801014c5: 81 45 e8 00 10 00 00 addl $0x1000,-0x18(%ebp) 801014cc: 8b 55 e8 mov -0x18(%ebp),%edx 801014cf: 8b 45 d8 mov -0x28(%ebp),%eax 801014d2: 39 c2 cmp %eax,%edx 801014d4: 0f 82 dd fe ff ff jb 801013b7 <balloc+0x2c> return b + bi; } } brelse(bp); } panic("balloc: out of blocks"); 801014da: c7 04 24 a9 86 10 80 movl $0x801086a9,(%esp) 801014e1: e8 54 f0 ff ff call 8010053a <panic> 801014e6 <bfree>: } // Free a disk block. static void bfree(int dev, uint b) { 801014e6: 55 push %ebp 801014e7: 89 e5 mov %esp,%ebp 801014e9: 53 push %ebx 801014ea: 83 ec 34 sub $0x34,%esp struct buf *bp; struct superblock sb; int bi, m; readsb(dev, &sb); 801014ed: 8d 45 dc lea -0x24(%ebp),%eax 801014f0: 89 44 24 04 mov %eax,0x4(%esp) 801014f4: 8b 45 08 mov 0x8(%ebp),%eax 801014f7: 89 04 24 mov %eax,(%esp) 801014fa: e8 f5 fd ff ff call 801012f4 <readsb> bp = bread(dev, BBLOCK(b, sb.ninodes)); 801014ff: 8b 45 0c mov 0xc(%ebp),%eax 80101502: 89 c2 mov %eax,%edx 80101504: c1 ea 0c shr $0xc,%edx 80101507: 8b 45 e4 mov -0x1c(%ebp),%eax 8010150a: c1 e8 03 shr $0x3,%eax 8010150d: 8d 04 02 lea (%edx,%eax,1),%eax 80101510: 8d 50 03 lea 0x3(%eax),%edx 80101513: 8b 45 08 mov 0x8(%ebp),%eax 80101516: 89 54 24 04 mov %edx,0x4(%esp) 8010151a: 89 04 24 mov %eax,(%esp) 8010151d: e8 85 ec ff ff call 801001a7 <bread> 80101522: 89 45 ec mov %eax,-0x14(%ebp) bi = b % BPB; 80101525: 8b 45 0c mov 0xc(%ebp),%eax 80101528: 25 ff 0f 00 00 and $0xfff,%eax 8010152d: 89 45 f0 mov %eax,-0x10(%ebp) m = 1 << (bi % 8); 80101530: 8b 45 f0 mov -0x10(%ebp),%eax 80101533: 89 c2 mov %eax,%edx 80101535: c1 fa 1f sar $0x1f,%edx 80101538: c1 ea 1d shr $0x1d,%edx 8010153b: 01 d0 add %edx,%eax 8010153d: 83 e0 07 and $0x7,%eax 80101540: 29 d0 sub %edx,%eax 80101542: ba 01 00 00 00 mov $0x1,%edx 80101547: 89 d3 mov %edx,%ebx 80101549: 89 c1 mov %eax,%ecx 8010154b: d3 e3 shl %cl,%ebx 8010154d: 89 d8 mov %ebx,%eax 8010154f: 89 45 f4 mov %eax,-0xc(%ebp) if((bp->data[bi/8] & m) == 0) 80101552: 8b 45 f0 mov -0x10(%ebp),%eax 80101555: 8d 50 07 lea 0x7(%eax),%edx 80101558: 85 c0 test %eax,%eax 8010155a: 0f 48 c2 cmovs %edx,%eax 8010155d: c1 f8 03 sar $0x3,%eax 80101560: 8b 55 ec mov -0x14(%ebp),%edx 80101563: 0f b6 44 02 18 movzbl 0x18(%edx,%eax,1),%eax 80101568: 0f b6 c0 movzbl %al,%eax 8010156b: 23 45 f4 and -0xc(%ebp),%eax 8010156e: 85 c0 test %eax,%eax 80101570: 75 0c jne 8010157e <bfree+0x98> panic("freeing free block"); 80101572: c7 04 24 bf 86 10 80 movl $0x801086bf,(%esp) 80101579: e8 bc ef ff ff call 8010053a <panic> bp->data[bi/8] &= ~m; 8010157e: 8b 45 f0 mov -0x10(%ebp),%eax 80101581: 8d 50 07 lea 0x7(%eax),%edx 80101584: 85 c0 test %eax,%eax 80101586: 0f 48 c2 cmovs %edx,%eax 80101589: c1 f8 03 sar $0x3,%eax 8010158c: 89 c2 mov %eax,%edx 8010158e: 8b 4d ec mov -0x14(%ebp),%ecx 80101591: 0f b6 44 01 18 movzbl 0x18(%ecx,%eax,1),%eax 80101596: 8b 4d f4 mov -0xc(%ebp),%ecx 80101599: f7 d1 not %ecx 8010159b: 21 c8 and %ecx,%eax 8010159d: 89 c1 mov %eax,%ecx 8010159f: 8b 45 ec mov -0x14(%ebp),%eax 801015a2: 88 4c 10 18 mov %cl,0x18(%eax,%edx,1) log_write(bp); 801015a6: 8b 45 ec mov -0x14(%ebp),%eax 801015a9: 89 04 24 mov %eax,(%esp) 801015ac: e8 02 1d 00 00 call 801032b3 <log_write> brelse(bp); 801015b1: 8b 45 ec mov -0x14(%ebp),%eax 801015b4: 89 04 24 mov %eax,(%esp) 801015b7: e8 5c ec ff ff call 80100218 <brelse> } 801015bc: 83 c4 34 add $0x34,%esp 801015bf: 5b pop %ebx 801015c0: 5d pop %ebp 801015c1: c3 ret 801015c2 <iinit>: struct inode inode[NINODE]; } icache; void iinit(void) { 801015c2: 55 push %ebp 801015c3: 89 e5 mov %esp,%ebp 801015c5: 83 ec 18 sub $0x18,%esp initlock(&icache.lock, "icache"); 801015c8: c7 44 24 04 d2 86 10 movl $0x801086d2,0x4(%esp) 801015cf: 80 801015d0: c7 04 24 80 e8 10 80 movl $0x8010e880,(%esp) 801015d7: e8 7e 39 00 00 call 80104f5a <initlock> } 801015dc: c9 leave 801015dd: c3 ret 801015de <ialloc>: //PAGEBREAK! // Allocate a new inode with the given type on device dev. // A free inode has a type of zero. struct inode* ialloc(uint dev, short type) { 801015de: 55 push %ebp 801015df: 89 e5 mov %esp,%ebp 801015e1: 83 ec 48 sub $0x48,%esp 801015e4: 8b 45 0c mov 0xc(%ebp),%eax 801015e7: 66 89 45 d4 mov %ax,-0x2c(%ebp) int inum; struct buf *bp; struct dinode *dip; struct superblock sb; readsb(dev, &sb); 801015eb: 8b 45 08 mov 0x8(%ebp),%eax 801015ee: 8d 55 dc lea -0x24(%ebp),%edx 801015f1: 89 54 24 04 mov %edx,0x4(%esp) 801015f5: 89 04 24 mov %eax,(%esp) 801015f8: e8 f7 fc ff ff call 801012f4 <readsb> for(inum = 1; inum < sb.ninodes; inum++){ 801015fd: c7 45 ec 01 00 00 00 movl $0x1,-0x14(%ebp) 80101604: e9 98 00 00 00 jmp 801016a1 <ialloc+0xc3> bp = bread(dev, IBLOCK(inum)); 80101609: 8b 45 ec mov -0x14(%ebp),%eax 8010160c: c1 e8 03 shr $0x3,%eax 8010160f: 83 c0 02 add $0x2,%eax 80101612: 89 44 24 04 mov %eax,0x4(%esp) 80101616: 8b 45 08 mov 0x8(%ebp),%eax 80101619: 89 04 24 mov %eax,(%esp) 8010161c: e8 86 eb ff ff call 801001a7 <bread> 80101621: 89 45 f0 mov %eax,-0x10(%ebp) dip = (struct dinode*)bp->data + inum%IPB; 80101624: 8b 45 f0 mov -0x10(%ebp),%eax 80101627: 83 c0 18 add $0x18,%eax 8010162a: 8b 55 ec mov -0x14(%ebp),%edx 8010162d: 83 e2 07 and $0x7,%edx 80101630: c1 e2 06 shl $0x6,%edx 80101633: 01 d0 add %edx,%eax 80101635: 89 45 f4 mov %eax,-0xc(%ebp) if(dip->type == 0){ // a free inode 80101638: 8b 45 f4 mov -0xc(%ebp),%eax 8010163b: 0f b7 00 movzwl (%eax),%eax 8010163e: 66 85 c0 test %ax,%ax 80101641: 75 4f jne 80101692 <ialloc+0xb4> memset(dip, 0, sizeof(*dip)); 80101643: c7 44 24 08 40 00 00 movl $0x40,0x8(%esp) 8010164a: 00 8010164b: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80101652: 00 80101653: 8b 45 f4 mov -0xc(%ebp),%eax 80101656: 89 04 24 mov %eax,(%esp) 80101659: e8 6c 3b 00 00 call 801051ca <memset> dip->type = type; 8010165e: 8b 45 f4 mov -0xc(%ebp),%eax 80101661: 0f b7 55 d4 movzwl -0x2c(%ebp),%edx 80101665: 66 89 10 mov %dx,(%eax) log_write(bp); // mark it allocated on the disk 80101668: 8b 45 f0 mov -0x10(%ebp),%eax 8010166b: 89 04 24 mov %eax,(%esp) 8010166e: e8 40 1c 00 00 call 801032b3 <log_write> brelse(bp); 80101673: 8b 45 f0 mov -0x10(%ebp),%eax 80101676: 89 04 24 mov %eax,(%esp) 80101679: e8 9a eb ff ff call 80100218 <brelse> return iget(dev, inum); 8010167e: 8b 45 ec mov -0x14(%ebp),%eax 80101681: 89 44 24 04 mov %eax,0x4(%esp) 80101685: 8b 45 08 mov 0x8(%ebp),%eax 80101688: 89 04 24 mov %eax,(%esp) 8010168b: e8 e6 00 00 00 call 80101776 <iget> } brelse(bp); } panic("ialloc: no inodes"); } 80101690: c9 leave 80101691: c3 ret dip->type = type; log_write(bp); // mark it allocated on the disk brelse(bp); return iget(dev, inum); } brelse(bp); 80101692: 8b 45 f0 mov -0x10(%ebp),%eax 80101695: 89 04 24 mov %eax,(%esp) 80101698: e8 7b eb ff ff call 80100218 <brelse> struct dinode *dip; struct superblock sb; readsb(dev, &sb); for(inum = 1; inum < sb.ninodes; inum++){ 8010169d: 83 45 ec 01 addl $0x1,-0x14(%ebp) 801016a1: 8b 55 ec mov -0x14(%ebp),%edx 801016a4: 8b 45 e4 mov -0x1c(%ebp),%eax 801016a7: 39 c2 cmp %eax,%edx 801016a9: 0f 82 5a ff ff ff jb 80101609 <ialloc+0x2b> brelse(bp); return iget(dev, inum); } brelse(bp); } panic("ialloc: no inodes"); 801016af: c7 04 24 d9 86 10 80 movl $0x801086d9,(%esp) 801016b6: e8 7f ee ff ff call 8010053a <panic> 801016bb <iupdate>: } // Copy a modified in-memory inode to disk. void iupdate(struct inode *ip) { 801016bb: 55 push %ebp 801016bc: 89 e5 mov %esp,%ebp 801016be: 83 ec 28 sub $0x28,%esp struct buf *bp; struct dinode *dip; bp = bread(ip->dev, IBLOCK(ip->inum)); 801016c1: 8b 45 08 mov 0x8(%ebp),%eax 801016c4: 8b 40 04 mov 0x4(%eax),%eax 801016c7: c1 e8 03 shr $0x3,%eax 801016ca: 8d 50 02 lea 0x2(%eax),%edx 801016cd: 8b 45 08 mov 0x8(%ebp),%eax 801016d0: 8b 00 mov (%eax),%eax 801016d2: 89 54 24 04 mov %edx,0x4(%esp) 801016d6: 89 04 24 mov %eax,(%esp) 801016d9: e8 c9 ea ff ff call 801001a7 <bread> 801016de: 89 45 f0 mov %eax,-0x10(%ebp) dip = (struct dinode*)bp->data + ip->inum%IPB; 801016e1: 8b 45 f0 mov -0x10(%ebp),%eax 801016e4: 83 c0 18 add $0x18,%eax 801016e7: 89 c2 mov %eax,%edx 801016e9: 8b 45 08 mov 0x8(%ebp),%eax 801016ec: 8b 40 04 mov 0x4(%eax),%eax 801016ef: 83 e0 07 and $0x7,%eax 801016f2: c1 e0 06 shl $0x6,%eax 801016f5: 8d 04 02 lea (%edx,%eax,1),%eax 801016f8: 89 45 f4 mov %eax,-0xc(%ebp) dip->type = ip->type; 801016fb: 8b 45 08 mov 0x8(%ebp),%eax 801016fe: 0f b7 50 10 movzwl 0x10(%eax),%edx 80101702: 8b 45 f4 mov -0xc(%ebp),%eax 80101705: 66 89 10 mov %dx,(%eax) dip->major = ip->major; 80101708: 8b 45 08 mov 0x8(%ebp),%eax 8010170b: 0f b7 50 12 movzwl 0x12(%eax),%edx 8010170f: 8b 45 f4 mov -0xc(%ebp),%eax 80101712: 66 89 50 02 mov %dx,0x2(%eax) dip->minor = ip->minor; 80101716: 8b 45 08 mov 0x8(%ebp),%eax 80101719: 0f b7 50 14 movzwl 0x14(%eax),%edx 8010171d: 8b 45 f4 mov -0xc(%ebp),%eax 80101720: 66 89 50 04 mov %dx,0x4(%eax) dip->nlink = ip->nlink; 80101724: 8b 45 08 mov 0x8(%ebp),%eax 80101727: 0f b7 50 16 movzwl 0x16(%eax),%edx 8010172b: 8b 45 f4 mov -0xc(%ebp),%eax 8010172e: 66 89 50 06 mov %dx,0x6(%eax) dip->size = ip->size; 80101732: 8b 45 08 mov 0x8(%ebp),%eax 80101735: 8b 50 18 mov 0x18(%eax),%edx 80101738: 8b 45 f4 mov -0xc(%ebp),%eax 8010173b: 89 50 08 mov %edx,0x8(%eax) memmove(dip->addrs, ip->addrs, sizeof(ip->addrs)); 8010173e: 8b 45 08 mov 0x8(%ebp),%eax 80101741: 8d 50 1c lea 0x1c(%eax),%edx 80101744: 8b 45 f4 mov -0xc(%ebp),%eax 80101747: 83 c0 0c add $0xc,%eax 8010174a: c7 44 24 08 34 00 00 movl $0x34,0x8(%esp) 80101751: 00 80101752: 89 54 24 04 mov %edx,0x4(%esp) 80101756: 89 04 24 mov %eax,(%esp) 80101759: e8 3f 3b 00 00 call 8010529d <memmove> log_write(bp); 8010175e: 8b 45 f0 mov -0x10(%ebp),%eax 80101761: 89 04 24 mov %eax,(%esp) 80101764: e8 4a 1b 00 00 call 801032b3 <log_write> brelse(bp); 80101769: 8b 45 f0 mov -0x10(%ebp),%eax 8010176c: 89 04 24 mov %eax,(%esp) 8010176f: e8 a4 ea ff ff call 80100218 <brelse> } 80101774: c9 leave 80101775: c3 ret 80101776 <iget>: // Find the inode with number inum on device dev // and return the in-memory copy. Does not lock // the inode and does not read it from disk. static struct inode* iget(uint dev, uint inum) { 80101776: 55 push %ebp 80101777: 89 e5 mov %esp,%ebp 80101779: 83 ec 28 sub $0x28,%esp struct inode *ip, *empty; acquire(&icache.lock); 8010177c: c7 04 24 80 e8 10 80 movl $0x8010e880,(%esp) 80101783: e8 f3 37 00 00 call 80104f7b <acquire> // Is the inode already cached? empty = 0; 80101788: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) for(ip = &icache.inode[0]; ip < &icache.inode[NINODE]; ip++){ 8010178f: c7 45 f0 b4 e8 10 80 movl $0x8010e8b4,-0x10(%ebp) 80101796: eb 59 jmp 801017f1 <iget+0x7b> if(ip->ref > 0 && ip->dev == dev && ip->inum == inum){ 80101798: 8b 45 f0 mov -0x10(%ebp),%eax 8010179b: 8b 40 08 mov 0x8(%eax),%eax 8010179e: 85 c0 test %eax,%eax 801017a0: 7e 35 jle 801017d7 <iget+0x61> 801017a2: 8b 45 f0 mov -0x10(%ebp),%eax 801017a5: 8b 00 mov (%eax),%eax 801017a7: 3b 45 08 cmp 0x8(%ebp),%eax 801017aa: 75 2b jne 801017d7 <iget+0x61> 801017ac: 8b 45 f0 mov -0x10(%ebp),%eax 801017af: 8b 40 04 mov 0x4(%eax),%eax 801017b2: 3b 45 0c cmp 0xc(%ebp),%eax 801017b5: 75 20 jne 801017d7 <iget+0x61> ip->ref++; 801017b7: 8b 45 f0 mov -0x10(%ebp),%eax 801017ba: 8b 40 08 mov 0x8(%eax),%eax 801017bd: 8d 50 01 lea 0x1(%eax),%edx 801017c0: 8b 45 f0 mov -0x10(%ebp),%eax 801017c3: 89 50 08 mov %edx,0x8(%eax) release(&icache.lock); 801017c6: c7 04 24 80 e8 10 80 movl $0x8010e880,(%esp) 801017cd: e8 0a 38 00 00 call 80104fdc <release> return ip; 801017d2: 8b 45 f0 mov -0x10(%ebp),%eax 801017d5: eb 70 jmp 80101847 <iget+0xd1> } if(empty == 0 && ip->ref == 0) // Remember empty slot. 801017d7: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 801017db: 75 10 jne 801017ed <iget+0x77> 801017dd: 8b 45 f0 mov -0x10(%ebp),%eax 801017e0: 8b 40 08 mov 0x8(%eax),%eax 801017e3: 85 c0 test %eax,%eax 801017e5: 75 06 jne 801017ed <iget+0x77> empty = ip; 801017e7: 8b 45 f0 mov -0x10(%ebp),%eax 801017ea: 89 45 f4 mov %eax,-0xc(%ebp) acquire(&icache.lock); // Is the inode already cached? empty = 0; for(ip = &icache.inode[0]; ip < &icache.inode[NINODE]; ip++){ 801017ed: 83 45 f0 50 addl $0x50,-0x10(%ebp) 801017f1: b8 54 f8 10 80 mov $0x8010f854,%eax 801017f6: 39 45 f0 cmp %eax,-0x10(%ebp) 801017f9: 72 9d jb 80101798 <iget+0x22> if(empty == 0 && ip->ref == 0) // Remember empty slot. empty = ip; } // Recycle an inode cache entry. if(empty == 0) 801017fb: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 801017ff: 75 0c jne 8010180d <iget+0x97> panic("iget: no inodes"); 80101801: c7 04 24 eb 86 10 80 movl $0x801086eb,(%esp) 80101808: e8 2d ed ff ff call 8010053a <panic> ip = empty; 8010180d: 8b 45 f4 mov -0xc(%ebp),%eax 80101810: 89 45 f0 mov %eax,-0x10(%ebp) ip->dev = dev; 80101813: 8b 45 f0 mov -0x10(%ebp),%eax 80101816: 8b 55 08 mov 0x8(%ebp),%edx 80101819: 89 10 mov %edx,(%eax) ip->inum = inum; 8010181b: 8b 45 f0 mov -0x10(%ebp),%eax 8010181e: 8b 55 0c mov 0xc(%ebp),%edx 80101821: 89 50 04 mov %edx,0x4(%eax) ip->ref = 1; 80101824: 8b 45 f0 mov -0x10(%ebp),%eax 80101827: c7 40 08 01 00 00 00 movl $0x1,0x8(%eax) ip->flags = 0; 8010182e: 8b 45 f0 mov -0x10(%ebp),%eax 80101831: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) release(&icache.lock); 80101838: c7 04 24 80 e8 10 80 movl $0x8010e880,(%esp) 8010183f: e8 98 37 00 00 call 80104fdc <release> return ip; 80101844: 8b 45 f0 mov -0x10(%ebp),%eax } 80101847: c9 leave 80101848: c3 ret 80101849 <idup>: // Increment reference count for ip. // Returns ip to enable ip = idup(ip1) idiom. struct inode* idup(struct inode *ip) { 80101849: 55 push %ebp 8010184a: 89 e5 mov %esp,%ebp 8010184c: 83 ec 18 sub $0x18,%esp acquire(&icache.lock); 8010184f: c7 04 24 80 e8 10 80 movl $0x8010e880,(%esp) 80101856: e8 20 37 00 00 call 80104f7b <acquire> ip->ref++; 8010185b: 8b 45 08 mov 0x8(%ebp),%eax 8010185e: 8b 40 08 mov 0x8(%eax),%eax 80101861: 8d 50 01 lea 0x1(%eax),%edx 80101864: 8b 45 08 mov 0x8(%ebp),%eax 80101867: 89 50 08 mov %edx,0x8(%eax) release(&icache.lock); 8010186a: c7 04 24 80 e8 10 80 movl $0x8010e880,(%esp) 80101871: e8 66 37 00 00 call 80104fdc <release> return ip; 80101876: 8b 45 08 mov 0x8(%ebp),%eax } 80101879: c9 leave 8010187a: c3 ret 8010187b <ilock>: // Lock the given inode. // Reads the inode from disk if necessary. void ilock(struct inode *ip) { 8010187b: 55 push %ebp 8010187c: 89 e5 mov %esp,%ebp 8010187e: 83 ec 28 sub $0x28,%esp struct buf *bp; struct dinode *dip; if(ip == 0 || ip->ref < 1) 80101881: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 80101885: 74 0a je 80101891 <ilock+0x16> 80101887: 8b 45 08 mov 0x8(%ebp),%eax 8010188a: 8b 40 08 mov 0x8(%eax),%eax 8010188d: 85 c0 test %eax,%eax 8010188f: 7f 0c jg 8010189d <ilock+0x22> panic("ilock"); 80101891: c7 04 24 fb 86 10 80 movl $0x801086fb,(%esp) 80101898: e8 9d ec ff ff call 8010053a <panic> acquire(&icache.lock); 8010189d: c7 04 24 80 e8 10 80 movl $0x8010e880,(%esp) 801018a4: e8 d2 36 00 00 call 80104f7b <acquire> while(ip->flags & I_BUSY) 801018a9: eb 13 jmp 801018be <ilock+0x43> sleep(ip, &icache.lock); 801018ab: c7 44 24 04 80 e8 10 movl $0x8010e880,0x4(%esp) 801018b2: 80 801018b3: 8b 45 08 mov 0x8(%ebp),%eax 801018b6: 89 04 24 mov %eax,(%esp) 801018b9: e8 44 33 00 00 call 80104c02 <sleep> if(ip == 0 || ip->ref < 1) panic("ilock"); acquire(&icache.lock); while(ip->flags & I_BUSY) 801018be: 8b 45 08 mov 0x8(%ebp),%eax 801018c1: 8b 40 0c mov 0xc(%eax),%eax 801018c4: 83 e0 01 and $0x1,%eax 801018c7: 84 c0 test %al,%al 801018c9: 75 e0 jne 801018ab <ilock+0x30> sleep(ip, &icache.lock); ip->flags |= I_BUSY; 801018cb: 8b 45 08 mov 0x8(%ebp),%eax 801018ce: 8b 40 0c mov 0xc(%eax),%eax 801018d1: 89 c2 mov %eax,%edx 801018d3: 83 ca 01 or $0x1,%edx 801018d6: 8b 45 08 mov 0x8(%ebp),%eax 801018d9: 89 50 0c mov %edx,0xc(%eax) release(&icache.lock); 801018dc: c7 04 24 80 e8 10 80 movl $0x8010e880,(%esp) 801018e3: e8 f4 36 00 00 call 80104fdc <release> if(!(ip->flags & I_VALID)){ 801018e8: 8b 45 08 mov 0x8(%ebp),%eax 801018eb: 8b 40 0c mov 0xc(%eax),%eax 801018ee: 83 e0 02 and $0x2,%eax 801018f1: 85 c0 test %eax,%eax 801018f3: 0f 85 d1 00 00 00 jne 801019ca <ilock+0x14f> bp = bread(ip->dev, IBLOCK(ip->inum)); 801018f9: 8b 45 08 mov 0x8(%ebp),%eax 801018fc: 8b 40 04 mov 0x4(%eax),%eax 801018ff: c1 e8 03 shr $0x3,%eax 80101902: 8d 50 02 lea 0x2(%eax),%edx 80101905: 8b 45 08 mov 0x8(%ebp),%eax 80101908: 8b 00 mov (%eax),%eax 8010190a: 89 54 24 04 mov %edx,0x4(%esp) 8010190e: 89 04 24 mov %eax,(%esp) 80101911: e8 91 e8 ff ff call 801001a7 <bread> 80101916: 89 45 f0 mov %eax,-0x10(%ebp) dip = (struct dinode*)bp->data + ip->inum%IPB; 80101919: 8b 45 f0 mov -0x10(%ebp),%eax 8010191c: 83 c0 18 add $0x18,%eax 8010191f: 89 c2 mov %eax,%edx 80101921: 8b 45 08 mov 0x8(%ebp),%eax 80101924: 8b 40 04 mov 0x4(%eax),%eax 80101927: 83 e0 07 and $0x7,%eax 8010192a: c1 e0 06 shl $0x6,%eax 8010192d: 8d 04 02 lea (%edx,%eax,1),%eax 80101930: 89 45 f4 mov %eax,-0xc(%ebp) ip->type = dip->type; 80101933: 8b 45 f4 mov -0xc(%ebp),%eax 80101936: 0f b7 10 movzwl (%eax),%edx 80101939: 8b 45 08 mov 0x8(%ebp),%eax 8010193c: 66 89 50 10 mov %dx,0x10(%eax) ip->major = dip->major; 80101940: 8b 45 f4 mov -0xc(%ebp),%eax 80101943: 0f b7 50 02 movzwl 0x2(%eax),%edx 80101947: 8b 45 08 mov 0x8(%ebp),%eax 8010194a: 66 89 50 12 mov %dx,0x12(%eax) ip->minor = dip->minor; 8010194e: 8b 45 f4 mov -0xc(%ebp),%eax 80101951: 0f b7 50 04 movzwl 0x4(%eax),%edx 80101955: 8b 45 08 mov 0x8(%ebp),%eax 80101958: 66 89 50 14 mov %dx,0x14(%eax) ip->nlink = dip->nlink; 8010195c: 8b 45 f4 mov -0xc(%ebp),%eax 8010195f: 0f b7 50 06 movzwl 0x6(%eax),%edx 80101963: 8b 45 08 mov 0x8(%ebp),%eax 80101966: 66 89 50 16 mov %dx,0x16(%eax) ip->size = dip->size; 8010196a: 8b 45 f4 mov -0xc(%ebp),%eax 8010196d: 8b 50 08 mov 0x8(%eax),%edx 80101970: 8b 45 08 mov 0x8(%ebp),%eax 80101973: 89 50 18 mov %edx,0x18(%eax) memmove(ip->addrs, dip->addrs, sizeof(ip->addrs)); 80101976: 8b 45 f4 mov -0xc(%ebp),%eax 80101979: 8d 50 0c lea 0xc(%eax),%edx 8010197c: 8b 45 08 mov 0x8(%ebp),%eax 8010197f: 83 c0 1c add $0x1c,%eax 80101982: c7 44 24 08 34 00 00 movl $0x34,0x8(%esp) 80101989: 00 8010198a: 89 54 24 04 mov %edx,0x4(%esp) 8010198e: 89 04 24 mov %eax,(%esp) 80101991: e8 07 39 00 00 call 8010529d <memmove> brelse(bp); 80101996: 8b 45 f0 mov -0x10(%ebp),%eax 80101999: 89 04 24 mov %eax,(%esp) 8010199c: e8 77 e8 ff ff call 80100218 <brelse> ip->flags |= I_VALID; 801019a1: 8b 45 08 mov 0x8(%ebp),%eax 801019a4: 8b 40 0c mov 0xc(%eax),%eax 801019a7: 89 c2 mov %eax,%edx 801019a9: 83 ca 02 or $0x2,%edx 801019ac: 8b 45 08 mov 0x8(%ebp),%eax 801019af: 89 50 0c mov %edx,0xc(%eax) if(ip->type == 0) 801019b2: 8b 45 08 mov 0x8(%ebp),%eax 801019b5: 0f b7 40 10 movzwl 0x10(%eax),%eax 801019b9: 66 85 c0 test %ax,%ax 801019bc: 75 0c jne 801019ca <ilock+0x14f> panic("ilock: no type"); 801019be: c7 04 24 01 87 10 80 movl $0x80108701,(%esp) 801019c5: e8 70 eb ff ff call 8010053a <panic> } } 801019ca: c9 leave 801019cb: c3 ret 801019cc <iunlock>: // Unlock the given inode. void iunlock(struct inode *ip) { 801019cc: 55 push %ebp 801019cd: 89 e5 mov %esp,%ebp 801019cf: 83 ec 18 sub $0x18,%esp if(ip == 0 || !(ip->flags & I_BUSY) || ip->ref < 1) 801019d2: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 801019d6: 74 17 je 801019ef <iunlock+0x23> 801019d8: 8b 45 08 mov 0x8(%ebp),%eax 801019db: 8b 40 0c mov 0xc(%eax),%eax 801019de: 83 e0 01 and $0x1,%eax 801019e1: 85 c0 test %eax,%eax 801019e3: 74 0a je 801019ef <iunlock+0x23> 801019e5: 8b 45 08 mov 0x8(%ebp),%eax 801019e8: 8b 40 08 mov 0x8(%eax),%eax 801019eb: 85 c0 test %eax,%eax 801019ed: 7f 0c jg 801019fb <iunlock+0x2f> panic("iunlock"); 801019ef: c7 04 24 10 87 10 80 movl $0x80108710,(%esp) 801019f6: e8 3f eb ff ff call 8010053a <panic> acquire(&icache.lock); 801019fb: c7 04 24 80 e8 10 80 movl $0x8010e880,(%esp) 80101a02: e8 74 35 00 00 call 80104f7b <acquire> ip->flags &= ~I_BUSY; 80101a07: 8b 45 08 mov 0x8(%ebp),%eax 80101a0a: 8b 40 0c mov 0xc(%eax),%eax 80101a0d: 89 c2 mov %eax,%edx 80101a0f: 83 e2 fe and $0xfffffffe,%edx 80101a12: 8b 45 08 mov 0x8(%ebp),%eax 80101a15: 89 50 0c mov %edx,0xc(%eax) wakeup(ip); 80101a18: 8b 45 08 mov 0x8(%ebp),%eax 80101a1b: 89 04 24 mov %eax,(%esp) 80101a1e: e8 25 33 00 00 call 80104d48 <wakeup> release(&icache.lock); 80101a23: c7 04 24 80 e8 10 80 movl $0x8010e880,(%esp) 80101a2a: e8 ad 35 00 00 call 80104fdc <release> } 80101a2f: c9 leave 80101a30: c3 ret 80101a31 <iput>: // be recycled. // If that was the last reference and the inode has no links // to it, free the inode (and its content) on disk. void iput(struct inode *ip) { 80101a31: 55 push %ebp 80101a32: 89 e5 mov %esp,%ebp 80101a34: 83 ec 18 sub $0x18,%esp acquire(&icache.lock); 80101a37: c7 04 24 80 e8 10 80 movl $0x8010e880,(%esp) 80101a3e: e8 38 35 00 00 call 80104f7b <acquire> if(ip->ref == 1 && (ip->flags & I_VALID) && ip->nlink == 0){ 80101a43: 8b 45 08 mov 0x8(%ebp),%eax 80101a46: 8b 40 08 mov 0x8(%eax),%eax 80101a49: 83 f8 01 cmp $0x1,%eax 80101a4c: 0f 85 93 00 00 00 jne 80101ae5 <iput+0xb4> 80101a52: 8b 45 08 mov 0x8(%ebp),%eax 80101a55: 8b 40 0c mov 0xc(%eax),%eax 80101a58: 83 e0 02 and $0x2,%eax 80101a5b: 85 c0 test %eax,%eax 80101a5d: 0f 84 82 00 00 00 je 80101ae5 <iput+0xb4> 80101a63: 8b 45 08 mov 0x8(%ebp),%eax 80101a66: 0f b7 40 16 movzwl 0x16(%eax),%eax 80101a6a: 66 85 c0 test %ax,%ax 80101a6d: 75 76 jne 80101ae5 <iput+0xb4> // inode has no links: truncate and free inode. if(ip->flags & I_BUSY) 80101a6f: 8b 45 08 mov 0x8(%ebp),%eax 80101a72: 8b 40 0c mov 0xc(%eax),%eax 80101a75: 83 e0 01 and $0x1,%eax 80101a78: 84 c0 test %al,%al 80101a7a: 74 0c je 80101a88 <iput+0x57> panic("iput busy"); 80101a7c: c7 04 24 18 87 10 80 movl $0x80108718,(%esp) 80101a83: e8 b2 ea ff ff call 8010053a <panic> ip->flags |= I_BUSY; 80101a88: 8b 45 08 mov 0x8(%ebp),%eax 80101a8b: 8b 40 0c mov 0xc(%eax),%eax 80101a8e: 89 c2 mov %eax,%edx 80101a90: 83 ca 01 or $0x1,%edx 80101a93: 8b 45 08 mov 0x8(%ebp),%eax 80101a96: 89 50 0c mov %edx,0xc(%eax) release(&icache.lock); 80101a99: c7 04 24 80 e8 10 80 movl $0x8010e880,(%esp) 80101aa0: e8 37 35 00 00 call 80104fdc <release> itrunc(ip); 80101aa5: 8b 45 08 mov 0x8(%ebp),%eax 80101aa8: 89 04 24 mov %eax,(%esp) 80101aab: e8 72 01 00 00 call 80101c22 <itrunc> ip->type = 0; 80101ab0: 8b 45 08 mov 0x8(%ebp),%eax 80101ab3: 66 c7 40 10 00 00 movw $0x0,0x10(%eax) iupdate(ip); 80101ab9: 8b 45 08 mov 0x8(%ebp),%eax 80101abc: 89 04 24 mov %eax,(%esp) 80101abf: e8 f7 fb ff ff call 801016bb <iupdate> acquire(&icache.lock); 80101ac4: c7 04 24 80 e8 10 80 movl $0x8010e880,(%esp) 80101acb: e8 ab 34 00 00 call 80104f7b <acquire> ip->flags = 0; 80101ad0: 8b 45 08 mov 0x8(%ebp),%eax 80101ad3: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) wakeup(ip); 80101ada: 8b 45 08 mov 0x8(%ebp),%eax 80101add: 89 04 24 mov %eax,(%esp) 80101ae0: e8 63 32 00 00 call 80104d48 <wakeup> } ip->ref--; 80101ae5: 8b 45 08 mov 0x8(%ebp),%eax 80101ae8: 8b 40 08 mov 0x8(%eax),%eax 80101aeb: 8d 50 ff lea -0x1(%eax),%edx 80101aee: 8b 45 08 mov 0x8(%ebp),%eax 80101af1: 89 50 08 mov %edx,0x8(%eax) release(&icache.lock); 80101af4: c7 04 24 80 e8 10 80 movl $0x8010e880,(%esp) 80101afb: e8 dc 34 00 00 call 80104fdc <release> } 80101b00: c9 leave 80101b01: c3 ret 80101b02 <iunlockput>: // Common idiom: unlock, then put. void iunlockput(struct inode *ip) { 80101b02: 55 push %ebp 80101b03: 89 e5 mov %esp,%ebp 80101b05: 83 ec 18 sub $0x18,%esp iunlock(ip); 80101b08: 8b 45 08 mov 0x8(%ebp),%eax 80101b0b: 89 04 24 mov %eax,(%esp) 80101b0e: e8 b9 fe ff ff call 801019cc <iunlock> iput(ip); 80101b13: 8b 45 08 mov 0x8(%ebp),%eax 80101b16: 89 04 24 mov %eax,(%esp) 80101b19: e8 13 ff ff ff call 80101a31 <iput> } 80101b1e: c9 leave 80101b1f: c3 ret 80101b20 <bmap>: // Return the disk block address of the nth block in inode ip. // If there is no such block, bmap allocates one. static uint bmap(struct inode *ip, uint bn) { 80101b20: 55 push %ebp 80101b21: 89 e5 mov %esp,%ebp 80101b23: 53 push %ebx 80101b24: 83 ec 24 sub $0x24,%esp uint addr, *a; struct buf *bp; if(bn < NDIRECT){ 80101b27: 83 7d 0c 0b cmpl $0xb,0xc(%ebp) 80101b2b: 77 3e ja 80101b6b <bmap+0x4b> if((addr = ip->addrs[bn]) == 0) 80101b2d: 8b 55 0c mov 0xc(%ebp),%edx 80101b30: 8b 45 08 mov 0x8(%ebp),%eax 80101b33: 83 c2 04 add $0x4,%edx 80101b36: 8b 44 90 0c mov 0xc(%eax,%edx,4),%eax 80101b3a: 89 45 ec mov %eax,-0x14(%ebp) 80101b3d: 83 7d ec 00 cmpl $0x0,-0x14(%ebp) 80101b41: 75 20 jne 80101b63 <bmap+0x43> ip->addrs[bn] = addr = balloc(ip->dev); 80101b43: 8b 5d 0c mov 0xc(%ebp),%ebx 80101b46: 8b 45 08 mov 0x8(%ebp),%eax 80101b49: 8b 00 mov (%eax),%eax 80101b4b: 89 04 24 mov %eax,(%esp) 80101b4e: e8 38 f8 ff ff call 8010138b <balloc> 80101b53: 89 45 ec mov %eax,-0x14(%ebp) 80101b56: 8b 45 08 mov 0x8(%ebp),%eax 80101b59: 8d 4b 04 lea 0x4(%ebx),%ecx 80101b5c: 8b 55 ec mov -0x14(%ebp),%edx 80101b5f: 89 54 88 0c mov %edx,0xc(%eax,%ecx,4) return addr; 80101b63: 8b 45 ec mov -0x14(%ebp),%eax 80101b66: e9 b1 00 00 00 jmp 80101c1c <bmap+0xfc> } bn -= NDIRECT; 80101b6b: 83 6d 0c 0c subl $0xc,0xc(%ebp) if(bn < NINDIRECT){ 80101b6f: 83 7d 0c 7f cmpl $0x7f,0xc(%ebp) 80101b73: 0f 87 97 00 00 00 ja 80101c10 <bmap+0xf0> // Load indirect block, allocating if necessary. if((addr = ip->addrs[NDIRECT]) == 0) 80101b79: 8b 45 08 mov 0x8(%ebp),%eax 80101b7c: 8b 40 4c mov 0x4c(%eax),%eax 80101b7f: 89 45 ec mov %eax,-0x14(%ebp) 80101b82: 83 7d ec 00 cmpl $0x0,-0x14(%ebp) 80101b86: 75 19 jne 80101ba1 <bmap+0x81> ip->addrs[NDIRECT] = addr = balloc(ip->dev); 80101b88: 8b 45 08 mov 0x8(%ebp),%eax 80101b8b: 8b 00 mov (%eax),%eax 80101b8d: 89 04 24 mov %eax,(%esp) 80101b90: e8 f6 f7 ff ff call 8010138b <balloc> 80101b95: 89 45 ec mov %eax,-0x14(%ebp) 80101b98: 8b 45 08 mov 0x8(%ebp),%eax 80101b9b: 8b 55 ec mov -0x14(%ebp),%edx 80101b9e: 89 50 4c mov %edx,0x4c(%eax) bp = bread(ip->dev, addr); 80101ba1: 8b 45 08 mov 0x8(%ebp),%eax 80101ba4: 8b 00 mov (%eax),%eax 80101ba6: 8b 55 ec mov -0x14(%ebp),%edx 80101ba9: 89 54 24 04 mov %edx,0x4(%esp) 80101bad: 89 04 24 mov %eax,(%esp) 80101bb0: e8 f2 e5 ff ff call 801001a7 <bread> 80101bb5: 89 45 f4 mov %eax,-0xc(%ebp) a = (uint*)bp->data; 80101bb8: 8b 45 f4 mov -0xc(%ebp),%eax 80101bbb: 83 c0 18 add $0x18,%eax 80101bbe: 89 45 f0 mov %eax,-0x10(%ebp) if((addr = a[bn]) == 0){ 80101bc1: 8b 45 0c mov 0xc(%ebp),%eax 80101bc4: c1 e0 02 shl $0x2,%eax 80101bc7: 03 45 f0 add -0x10(%ebp),%eax 80101bca: 8b 00 mov (%eax),%eax 80101bcc: 89 45 ec mov %eax,-0x14(%ebp) 80101bcf: 83 7d ec 00 cmpl $0x0,-0x14(%ebp) 80101bd3: 75 2b jne 80101c00 <bmap+0xe0> a[bn] = addr = balloc(ip->dev); 80101bd5: 8b 45 0c mov 0xc(%ebp),%eax 80101bd8: c1 e0 02 shl $0x2,%eax 80101bdb: 89 c3 mov %eax,%ebx 80101bdd: 03 5d f0 add -0x10(%ebp),%ebx 80101be0: 8b 45 08 mov 0x8(%ebp),%eax 80101be3: 8b 00 mov (%eax),%eax 80101be5: 89 04 24 mov %eax,(%esp) 80101be8: e8 9e f7 ff ff call 8010138b <balloc> 80101bed: 89 45 ec mov %eax,-0x14(%ebp) 80101bf0: 8b 45 ec mov -0x14(%ebp),%eax 80101bf3: 89 03 mov %eax,(%ebx) log_write(bp); 80101bf5: 8b 45 f4 mov -0xc(%ebp),%eax 80101bf8: 89 04 24 mov %eax,(%esp) 80101bfb: e8 b3 16 00 00 call 801032b3 <log_write> } brelse(bp); 80101c00: 8b 45 f4 mov -0xc(%ebp),%eax 80101c03: 89 04 24 mov %eax,(%esp) 80101c06: e8 0d e6 ff ff call 80100218 <brelse> return addr; 80101c0b: 8b 45 ec mov -0x14(%ebp),%eax 80101c0e: eb 0c jmp 80101c1c <bmap+0xfc> } panic("bmap: out of range"); 80101c10: c7 04 24 22 87 10 80 movl $0x80108722,(%esp) 80101c17: e8 1e e9 ff ff call 8010053a <panic> } 80101c1c: 83 c4 24 add $0x24,%esp 80101c1f: 5b pop %ebx 80101c20: 5d pop %ebp 80101c21: c3 ret 80101c22 <itrunc>: // to it (no directory entries referring to it) // and has no in-memory reference to it (is // not an open file or current directory). static void itrunc(struct inode *ip) { 80101c22: 55 push %ebp 80101c23: 89 e5 mov %esp,%ebp 80101c25: 83 ec 28 sub $0x28,%esp int i, j; struct buf *bp; uint *a; for(i = 0; i < NDIRECT; i++){ 80101c28: c7 45 e8 00 00 00 00 movl $0x0,-0x18(%ebp) 80101c2f: eb 44 jmp 80101c75 <itrunc+0x53> if(ip->addrs[i]){ 80101c31: 8b 55 e8 mov -0x18(%ebp),%edx 80101c34: 8b 45 08 mov 0x8(%ebp),%eax 80101c37: 83 c2 04 add $0x4,%edx 80101c3a: 8b 44 90 0c mov 0xc(%eax,%edx,4),%eax 80101c3e: 85 c0 test %eax,%eax 80101c40: 74 2f je 80101c71 <itrunc+0x4f> bfree(ip->dev, ip->addrs[i]); 80101c42: 8b 55 e8 mov -0x18(%ebp),%edx 80101c45: 8b 45 08 mov 0x8(%ebp),%eax 80101c48: 83 c2 04 add $0x4,%edx 80101c4b: 8b 54 90 0c mov 0xc(%eax,%edx,4),%edx 80101c4f: 8b 45 08 mov 0x8(%ebp),%eax 80101c52: 8b 00 mov (%eax),%eax 80101c54: 89 54 24 04 mov %edx,0x4(%esp) 80101c58: 89 04 24 mov %eax,(%esp) 80101c5b: e8 86 f8 ff ff call 801014e6 <bfree> ip->addrs[i] = 0; 80101c60: 8b 55 e8 mov -0x18(%ebp),%edx 80101c63: 8b 45 08 mov 0x8(%ebp),%eax 80101c66: 83 c2 04 add $0x4,%edx 80101c69: c7 44 90 0c 00 00 00 movl $0x0,0xc(%eax,%edx,4) 80101c70: 00 { int i, j; struct buf *bp; uint *a; for(i = 0; i < NDIRECT; i++){ 80101c71: 83 45 e8 01 addl $0x1,-0x18(%ebp) 80101c75: 83 7d e8 0b cmpl $0xb,-0x18(%ebp) 80101c79: 7e b6 jle 80101c31 <itrunc+0xf> bfree(ip->dev, ip->addrs[i]); ip->addrs[i] = 0; } } if(ip->addrs[NDIRECT]){ 80101c7b: 8b 45 08 mov 0x8(%ebp),%eax 80101c7e: 8b 40 4c mov 0x4c(%eax),%eax 80101c81: 85 c0 test %eax,%eax 80101c83: 0f 84 8f 00 00 00 je 80101d18 <itrunc+0xf6> bp = bread(ip->dev, ip->addrs[NDIRECT]); 80101c89: 8b 45 08 mov 0x8(%ebp),%eax 80101c8c: 8b 50 4c mov 0x4c(%eax),%edx 80101c8f: 8b 45 08 mov 0x8(%ebp),%eax 80101c92: 8b 00 mov (%eax),%eax 80101c94: 89 54 24 04 mov %edx,0x4(%esp) 80101c98: 89 04 24 mov %eax,(%esp) 80101c9b: e8 07 e5 ff ff call 801001a7 <bread> 80101ca0: 89 45 f0 mov %eax,-0x10(%ebp) a = (uint*)bp->data; 80101ca3: 8b 45 f0 mov -0x10(%ebp),%eax 80101ca6: 83 c0 18 add $0x18,%eax 80101ca9: 89 45 f4 mov %eax,-0xc(%ebp) for(j = 0; j < NINDIRECT; j++){ 80101cac: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp) 80101cb3: eb 2f jmp 80101ce4 <itrunc+0xc2> if(a[j]) 80101cb5: 8b 45 ec mov -0x14(%ebp),%eax 80101cb8: c1 e0 02 shl $0x2,%eax 80101cbb: 03 45 f4 add -0xc(%ebp),%eax 80101cbe: 8b 00 mov (%eax),%eax 80101cc0: 85 c0 test %eax,%eax 80101cc2: 74 1c je 80101ce0 <itrunc+0xbe> bfree(ip->dev, a[j]); 80101cc4: 8b 45 ec mov -0x14(%ebp),%eax 80101cc7: c1 e0 02 shl $0x2,%eax 80101cca: 03 45 f4 add -0xc(%ebp),%eax 80101ccd: 8b 10 mov (%eax),%edx 80101ccf: 8b 45 08 mov 0x8(%ebp),%eax 80101cd2: 8b 00 mov (%eax),%eax 80101cd4: 89 54 24 04 mov %edx,0x4(%esp) 80101cd8: 89 04 24 mov %eax,(%esp) 80101cdb: e8 06 f8 ff ff call 801014e6 <bfree> } if(ip->addrs[NDIRECT]){ bp = bread(ip->dev, ip->addrs[NDIRECT]); a = (uint*)bp->data; for(j = 0; j < NINDIRECT; j++){ 80101ce0: 83 45 ec 01 addl $0x1,-0x14(%ebp) 80101ce4: 8b 45 ec mov -0x14(%ebp),%eax 80101ce7: 83 f8 7f cmp $0x7f,%eax 80101cea: 76 c9 jbe 80101cb5 <itrunc+0x93> if(a[j]) bfree(ip->dev, a[j]); } brelse(bp); 80101cec: 8b 45 f0 mov -0x10(%ebp),%eax 80101cef: 89 04 24 mov %eax,(%esp) 80101cf2: e8 21 e5 ff ff call 80100218 <brelse> bfree(ip->dev, ip->addrs[NDIRECT]); 80101cf7: 8b 45 08 mov 0x8(%ebp),%eax 80101cfa: 8b 50 4c mov 0x4c(%eax),%edx 80101cfd: 8b 45 08 mov 0x8(%ebp),%eax 80101d00: 8b 00 mov (%eax),%eax 80101d02: 89 54 24 04 mov %edx,0x4(%esp) 80101d06: 89 04 24 mov %eax,(%esp) 80101d09: e8 d8 f7 ff ff call 801014e6 <bfree> ip->addrs[NDIRECT] = 0; 80101d0e: 8b 45 08 mov 0x8(%ebp),%eax 80101d11: c7 40 4c 00 00 00 00 movl $0x0,0x4c(%eax) } ip->size = 0; 80101d18: 8b 45 08 mov 0x8(%ebp),%eax 80101d1b: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) iupdate(ip); 80101d22: 8b 45 08 mov 0x8(%ebp),%eax 80101d25: 89 04 24 mov %eax,(%esp) 80101d28: e8 8e f9 ff ff call 801016bb <iupdate> } 80101d2d: c9 leave 80101d2e: c3 ret 80101d2f <stati>: // Copy stat information from inode. void stati(struct inode *ip, struct stat *st) { 80101d2f: 55 push %ebp 80101d30: 89 e5 mov %esp,%ebp st->dev = ip->dev; 80101d32: 8b 45 08 mov 0x8(%ebp),%eax 80101d35: 8b 00 mov (%eax),%eax 80101d37: 89 c2 mov %eax,%edx 80101d39: 8b 45 0c mov 0xc(%ebp),%eax 80101d3c: 89 50 04 mov %edx,0x4(%eax) st->ino = ip->inum; 80101d3f: 8b 45 08 mov 0x8(%ebp),%eax 80101d42: 8b 50 04 mov 0x4(%eax),%edx 80101d45: 8b 45 0c mov 0xc(%ebp),%eax 80101d48: 89 50 08 mov %edx,0x8(%eax) st->type = ip->type; 80101d4b: 8b 45 08 mov 0x8(%ebp),%eax 80101d4e: 0f b7 50 10 movzwl 0x10(%eax),%edx 80101d52: 8b 45 0c mov 0xc(%ebp),%eax 80101d55: 66 89 10 mov %dx,(%eax) st->nlink = ip->nlink; 80101d58: 8b 45 08 mov 0x8(%ebp),%eax 80101d5b: 0f b7 50 16 movzwl 0x16(%eax),%edx 80101d5f: 8b 45 0c mov 0xc(%ebp),%eax 80101d62: 66 89 50 0c mov %dx,0xc(%eax) st->size = ip->size; 80101d66: 8b 45 08 mov 0x8(%ebp),%eax 80101d69: 8b 50 18 mov 0x18(%eax),%edx 80101d6c: 8b 45 0c mov 0xc(%ebp),%eax 80101d6f: 89 50 10 mov %edx,0x10(%eax) } 80101d72: 5d pop %ebp 80101d73: c3 ret 80101d74 <readi>: //PAGEBREAK! // Read data from inode. int readi(struct inode *ip, char *dst, uint off, uint n) { 80101d74: 55 push %ebp 80101d75: 89 e5 mov %esp,%ebp 80101d77: 53 push %ebx 80101d78: 83 ec 24 sub $0x24,%esp uint tot, m; struct buf *bp; if(ip->type == T_DEV){ 80101d7b: 8b 45 08 mov 0x8(%ebp),%eax 80101d7e: 0f b7 40 10 movzwl 0x10(%eax),%eax 80101d82: 66 83 f8 03 cmp $0x3,%ax 80101d86: 75 60 jne 80101de8 <readi+0x74> if(ip->major < 0 || ip->major >= NDEV || !devsw[ip->major].read) 80101d88: 8b 45 08 mov 0x8(%ebp),%eax 80101d8b: 0f b7 40 12 movzwl 0x12(%eax),%eax 80101d8f: 66 85 c0 test %ax,%ax 80101d92: 78 20 js 80101db4 <readi+0x40> 80101d94: 8b 45 08 mov 0x8(%ebp),%eax 80101d97: 0f b7 40 12 movzwl 0x12(%eax),%eax 80101d9b: 66 83 f8 09 cmp $0x9,%ax 80101d9f: 7f 13 jg 80101db4 <readi+0x40> 80101da1: 8b 45 08 mov 0x8(%ebp),%eax 80101da4: 0f b7 40 12 movzwl 0x12(%eax),%eax 80101da8: 98 cwtl 80101da9: 8b 04 c5 20 e8 10 80 mov -0x7fef17e0(,%eax,8),%eax 80101db0: 85 c0 test %eax,%eax 80101db2: 75 0a jne 80101dbe <readi+0x4a> return -1; 80101db4: b8 ff ff ff ff mov $0xffffffff,%eax 80101db9: e9 1c 01 00 00 jmp 80101eda <readi+0x166> return devsw[ip->major].read(ip, dst, n); 80101dbe: 8b 45 08 mov 0x8(%ebp),%eax 80101dc1: 0f b7 40 12 movzwl 0x12(%eax),%eax 80101dc5: 98 cwtl 80101dc6: 8b 14 c5 20 e8 10 80 mov -0x7fef17e0(,%eax,8),%edx 80101dcd: 8b 45 14 mov 0x14(%ebp),%eax 80101dd0: 89 44 24 08 mov %eax,0x8(%esp) 80101dd4: 8b 45 0c mov 0xc(%ebp),%eax 80101dd7: 89 44 24 04 mov %eax,0x4(%esp) 80101ddb: 8b 45 08 mov 0x8(%ebp),%eax 80101dde: 89 04 24 mov %eax,(%esp) 80101de1: ff d2 call *%edx 80101de3: e9 f2 00 00 00 jmp 80101eda <readi+0x166> } if(off > ip->size || off + n < off) 80101de8: 8b 45 08 mov 0x8(%ebp),%eax 80101deb: 8b 40 18 mov 0x18(%eax),%eax 80101dee: 3b 45 10 cmp 0x10(%ebp),%eax 80101df1: 72 0e jb 80101e01 <readi+0x8d> 80101df3: 8b 45 14 mov 0x14(%ebp),%eax 80101df6: 8b 55 10 mov 0x10(%ebp),%edx 80101df9: 8d 04 02 lea (%edx,%eax,1),%eax 80101dfc: 3b 45 10 cmp 0x10(%ebp),%eax 80101dff: 73 0a jae 80101e0b <readi+0x97> return -1; 80101e01: b8 ff ff ff ff mov $0xffffffff,%eax 80101e06: e9 cf 00 00 00 jmp 80101eda <readi+0x166> if(off + n > ip->size) 80101e0b: 8b 45 14 mov 0x14(%ebp),%eax 80101e0e: 8b 55 10 mov 0x10(%ebp),%edx 80101e11: 01 c2 add %eax,%edx 80101e13: 8b 45 08 mov 0x8(%ebp),%eax 80101e16: 8b 40 18 mov 0x18(%eax),%eax 80101e19: 39 c2 cmp %eax,%edx 80101e1b: 76 0c jbe 80101e29 <readi+0xb5> n = ip->size - off; 80101e1d: 8b 45 08 mov 0x8(%ebp),%eax 80101e20: 8b 40 18 mov 0x18(%eax),%eax 80101e23: 2b 45 10 sub 0x10(%ebp),%eax 80101e26: 89 45 14 mov %eax,0x14(%ebp) for(tot=0; tot<n; tot+=m, off+=m, dst+=m){ 80101e29: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp) 80101e30: e9 96 00 00 00 jmp 80101ecb <readi+0x157> bp = bread(ip->dev, bmap(ip, off/BSIZE)); 80101e35: 8b 45 10 mov 0x10(%ebp),%eax 80101e38: c1 e8 09 shr $0x9,%eax 80101e3b: 89 44 24 04 mov %eax,0x4(%esp) 80101e3f: 8b 45 08 mov 0x8(%ebp),%eax 80101e42: 89 04 24 mov %eax,(%esp) 80101e45: e8 d6 fc ff ff call 80101b20 <bmap> 80101e4a: 8b 55 08 mov 0x8(%ebp),%edx 80101e4d: 8b 12 mov (%edx),%edx 80101e4f: 89 44 24 04 mov %eax,0x4(%esp) 80101e53: 89 14 24 mov %edx,(%esp) 80101e56: e8 4c e3 ff ff call 801001a7 <bread> 80101e5b: 89 45 f4 mov %eax,-0xc(%ebp) m = min(n - tot, BSIZE - off%BSIZE); 80101e5e: 8b 45 10 mov 0x10(%ebp),%eax 80101e61: 89 c2 mov %eax,%edx 80101e63: 81 e2 ff 01 00 00 and $0x1ff,%edx 80101e69: b8 00 02 00 00 mov $0x200,%eax 80101e6e: 89 c1 mov %eax,%ecx 80101e70: 29 d1 sub %edx,%ecx 80101e72: 89 ca mov %ecx,%edx 80101e74: 8b 45 ec mov -0x14(%ebp),%eax 80101e77: 8b 4d 14 mov 0x14(%ebp),%ecx 80101e7a: 89 cb mov %ecx,%ebx 80101e7c: 29 c3 sub %eax,%ebx 80101e7e: 89 d8 mov %ebx,%eax 80101e80: 39 c2 cmp %eax,%edx 80101e82: 0f 46 c2 cmovbe %edx,%eax 80101e85: 89 45 f0 mov %eax,-0x10(%ebp) memmove(dst, bp->data + off%BSIZE, m); 80101e88: 8b 45 f4 mov -0xc(%ebp),%eax 80101e8b: 8d 50 18 lea 0x18(%eax),%edx 80101e8e: 8b 45 10 mov 0x10(%ebp),%eax 80101e91: 25 ff 01 00 00 and $0x1ff,%eax 80101e96: 01 c2 add %eax,%edx 80101e98: 8b 45 f0 mov -0x10(%ebp),%eax 80101e9b: 89 44 24 08 mov %eax,0x8(%esp) 80101e9f: 89 54 24 04 mov %edx,0x4(%esp) 80101ea3: 8b 45 0c mov 0xc(%ebp),%eax 80101ea6: 89 04 24 mov %eax,(%esp) 80101ea9: e8 ef 33 00 00 call 8010529d <memmove> brelse(bp); 80101eae: 8b 45 f4 mov -0xc(%ebp),%eax 80101eb1: 89 04 24 mov %eax,(%esp) 80101eb4: e8 5f e3 ff ff call 80100218 <brelse> if(off > ip->size || off + n < off) return -1; if(off + n > ip->size) n = ip->size - off; for(tot=0; tot<n; tot+=m, off+=m, dst+=m){ 80101eb9: 8b 45 f0 mov -0x10(%ebp),%eax 80101ebc: 01 45 ec add %eax,-0x14(%ebp) 80101ebf: 8b 45 f0 mov -0x10(%ebp),%eax 80101ec2: 01 45 10 add %eax,0x10(%ebp) 80101ec5: 8b 45 f0 mov -0x10(%ebp),%eax 80101ec8: 01 45 0c add %eax,0xc(%ebp) 80101ecb: 8b 45 ec mov -0x14(%ebp),%eax 80101ece: 3b 45 14 cmp 0x14(%ebp),%eax 80101ed1: 0f 82 5e ff ff ff jb 80101e35 <readi+0xc1> bp = bread(ip->dev, bmap(ip, off/BSIZE)); m = min(n - tot, BSIZE - off%BSIZE); memmove(dst, bp->data + off%BSIZE, m); brelse(bp); } return n; 80101ed7: 8b 45 14 mov 0x14(%ebp),%eax } 80101eda: 83 c4 24 add $0x24,%esp 80101edd: 5b pop %ebx 80101ede: 5d pop %ebp 80101edf: c3 ret 80101ee0 <writei>: // PAGEBREAK! // Write data to inode. int writei(struct inode *ip, char *src, uint off, uint n) { 80101ee0: 55 push %ebp 80101ee1: 89 e5 mov %esp,%ebp 80101ee3: 53 push %ebx 80101ee4: 83 ec 24 sub $0x24,%esp uint tot, m; struct buf *bp; if(ip->type == T_DEV){ 80101ee7: 8b 45 08 mov 0x8(%ebp),%eax 80101eea: 0f b7 40 10 movzwl 0x10(%eax),%eax 80101eee: 66 83 f8 03 cmp $0x3,%ax 80101ef2: 75 60 jne 80101f54 <writei+0x74> if(ip->major < 0 || ip->major >= NDEV || !devsw[ip->major].write) 80101ef4: 8b 45 08 mov 0x8(%ebp),%eax 80101ef7: 0f b7 40 12 movzwl 0x12(%eax),%eax 80101efb: 66 85 c0 test %ax,%ax 80101efe: 78 20 js 80101f20 <writei+0x40> 80101f00: 8b 45 08 mov 0x8(%ebp),%eax 80101f03: 0f b7 40 12 movzwl 0x12(%eax),%eax 80101f07: 66 83 f8 09 cmp $0x9,%ax 80101f0b: 7f 13 jg 80101f20 <writei+0x40> 80101f0d: 8b 45 08 mov 0x8(%ebp),%eax 80101f10: 0f b7 40 12 movzwl 0x12(%eax),%eax 80101f14: 98 cwtl 80101f15: 8b 04 c5 24 e8 10 80 mov -0x7fef17dc(,%eax,8),%eax 80101f1c: 85 c0 test %eax,%eax 80101f1e: 75 0a jne 80101f2a <writei+0x4a> return -1; 80101f20: b8 ff ff ff ff mov $0xffffffff,%eax 80101f25: e9 48 01 00 00 jmp 80102072 <writei+0x192> return devsw[ip->major].write(ip, src, n); 80101f2a: 8b 45 08 mov 0x8(%ebp),%eax 80101f2d: 0f b7 40 12 movzwl 0x12(%eax),%eax 80101f31: 98 cwtl 80101f32: 8b 14 c5 24 e8 10 80 mov -0x7fef17dc(,%eax,8),%edx 80101f39: 8b 45 14 mov 0x14(%ebp),%eax 80101f3c: 89 44 24 08 mov %eax,0x8(%esp) 80101f40: 8b 45 0c mov 0xc(%ebp),%eax 80101f43: 89 44 24 04 mov %eax,0x4(%esp) 80101f47: 8b 45 08 mov 0x8(%ebp),%eax 80101f4a: 89 04 24 mov %eax,(%esp) 80101f4d: ff d2 call *%edx 80101f4f: e9 1e 01 00 00 jmp 80102072 <writei+0x192> } if(off > ip->size || off + n < off) 80101f54: 8b 45 08 mov 0x8(%ebp),%eax 80101f57: 8b 40 18 mov 0x18(%eax),%eax 80101f5a: 3b 45 10 cmp 0x10(%ebp),%eax 80101f5d: 72 0e jb 80101f6d <writei+0x8d> 80101f5f: 8b 45 14 mov 0x14(%ebp),%eax 80101f62: 8b 55 10 mov 0x10(%ebp),%edx 80101f65: 8d 04 02 lea (%edx,%eax,1),%eax 80101f68: 3b 45 10 cmp 0x10(%ebp),%eax 80101f6b: 73 0a jae 80101f77 <writei+0x97> return -1; 80101f6d: b8 ff ff ff ff mov $0xffffffff,%eax 80101f72: e9 fb 00 00 00 jmp 80102072 <writei+0x192> if(off + n > MAXFILE*BSIZE) 80101f77: 8b 45 14 mov 0x14(%ebp),%eax 80101f7a: 8b 55 10 mov 0x10(%ebp),%edx 80101f7d: 8d 04 02 lea (%edx,%eax,1),%eax 80101f80: 3d 00 18 01 00 cmp $0x11800,%eax 80101f85: 76 0a jbe 80101f91 <writei+0xb1> return -1; 80101f87: b8 ff ff ff ff mov $0xffffffff,%eax 80101f8c: e9 e1 00 00 00 jmp 80102072 <writei+0x192> for(tot=0; tot<n; tot+=m, off+=m, src+=m){ 80101f91: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp) 80101f98: e9 a1 00 00 00 jmp 8010203e <writei+0x15e> bp = bread(ip->dev, bmap(ip, off/BSIZE)); 80101f9d: 8b 45 10 mov 0x10(%ebp),%eax 80101fa0: c1 e8 09 shr $0x9,%eax 80101fa3: 89 44 24 04 mov %eax,0x4(%esp) 80101fa7: 8b 45 08 mov 0x8(%ebp),%eax 80101faa: 89 04 24 mov %eax,(%esp) 80101fad: e8 6e fb ff ff call 80101b20 <bmap> 80101fb2: 8b 55 08 mov 0x8(%ebp),%edx 80101fb5: 8b 12 mov (%edx),%edx 80101fb7: 89 44 24 04 mov %eax,0x4(%esp) 80101fbb: 89 14 24 mov %edx,(%esp) 80101fbe: e8 e4 e1 ff ff call 801001a7 <bread> 80101fc3: 89 45 f4 mov %eax,-0xc(%ebp) m = min(n - tot, BSIZE - off%BSIZE); 80101fc6: 8b 45 10 mov 0x10(%ebp),%eax 80101fc9: 89 c2 mov %eax,%edx 80101fcb: 81 e2 ff 01 00 00 and $0x1ff,%edx 80101fd1: b8 00 02 00 00 mov $0x200,%eax 80101fd6: 89 c1 mov %eax,%ecx 80101fd8: 29 d1 sub %edx,%ecx 80101fda: 89 ca mov %ecx,%edx 80101fdc: 8b 45 ec mov -0x14(%ebp),%eax 80101fdf: 8b 4d 14 mov 0x14(%ebp),%ecx 80101fe2: 89 cb mov %ecx,%ebx 80101fe4: 29 c3 sub %eax,%ebx 80101fe6: 89 d8 mov %ebx,%eax 80101fe8: 39 c2 cmp %eax,%edx 80101fea: 0f 46 c2 cmovbe %edx,%eax 80101fed: 89 45 f0 mov %eax,-0x10(%ebp) memmove(bp->data + off%BSIZE, src, m); 80101ff0: 8b 45 f4 mov -0xc(%ebp),%eax 80101ff3: 8d 50 18 lea 0x18(%eax),%edx 80101ff6: 8b 45 10 mov 0x10(%ebp),%eax 80101ff9: 25 ff 01 00 00 and $0x1ff,%eax 80101ffe: 01 c2 add %eax,%edx 80102000: 8b 45 f0 mov -0x10(%ebp),%eax 80102003: 89 44 24 08 mov %eax,0x8(%esp) 80102007: 8b 45 0c mov 0xc(%ebp),%eax 8010200a: 89 44 24 04 mov %eax,0x4(%esp) 8010200e: 89 14 24 mov %edx,(%esp) 80102011: e8 87 32 00 00 call 8010529d <memmove> log_write(bp); 80102016: 8b 45 f4 mov -0xc(%ebp),%eax 80102019: 89 04 24 mov %eax,(%esp) 8010201c: e8 92 12 00 00 call 801032b3 <log_write> brelse(bp); 80102021: 8b 45 f4 mov -0xc(%ebp),%eax 80102024: 89 04 24 mov %eax,(%esp) 80102027: e8 ec e1 ff ff call 80100218 <brelse> if(off > ip->size || off + n < off) return -1; if(off + n > MAXFILE*BSIZE) return -1; for(tot=0; tot<n; tot+=m, off+=m, src+=m){ 8010202c: 8b 45 f0 mov -0x10(%ebp),%eax 8010202f: 01 45 ec add %eax,-0x14(%ebp) 80102032: 8b 45 f0 mov -0x10(%ebp),%eax 80102035: 01 45 10 add %eax,0x10(%ebp) 80102038: 8b 45 f0 mov -0x10(%ebp),%eax 8010203b: 01 45 0c add %eax,0xc(%ebp) 8010203e: 8b 45 ec mov -0x14(%ebp),%eax 80102041: 3b 45 14 cmp 0x14(%ebp),%eax 80102044: 0f 82 53 ff ff ff jb 80101f9d <writei+0xbd> memmove(bp->data + off%BSIZE, src, m); log_write(bp); brelse(bp); } if(n > 0 && off > ip->size){ 8010204a: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 8010204e: 74 1f je 8010206f <writei+0x18f> 80102050: 8b 45 08 mov 0x8(%ebp),%eax 80102053: 8b 40 18 mov 0x18(%eax),%eax 80102056: 3b 45 10 cmp 0x10(%ebp),%eax 80102059: 73 14 jae 8010206f <writei+0x18f> ip->size = off; 8010205b: 8b 45 08 mov 0x8(%ebp),%eax 8010205e: 8b 55 10 mov 0x10(%ebp),%edx 80102061: 89 50 18 mov %edx,0x18(%eax) iupdate(ip); 80102064: 8b 45 08 mov 0x8(%ebp),%eax 80102067: 89 04 24 mov %eax,(%esp) 8010206a: e8 4c f6 ff ff call 801016bb <iupdate> } return n; 8010206f: 8b 45 14 mov 0x14(%ebp),%eax } 80102072: 83 c4 24 add $0x24,%esp 80102075: 5b pop %ebx 80102076: 5d pop %ebp 80102077: c3 ret 80102078 <namecmp>: //PAGEBREAK! // Directories int namecmp(const char *s, const char *t) { 80102078: 55 push %ebp 80102079: 89 e5 mov %esp,%ebp 8010207b: 83 ec 18 sub $0x18,%esp return strncmp(s, t, DIRSIZ); 8010207e: c7 44 24 08 0e 00 00 movl $0xe,0x8(%esp) 80102085: 00 80102086: 8b 45 0c mov 0xc(%ebp),%eax 80102089: 89 44 24 04 mov %eax,0x4(%esp) 8010208d: 8b 45 08 mov 0x8(%ebp),%eax 80102090: 89 04 24 mov %eax,(%esp) 80102093: e8 ad 32 00 00 call 80105345 <strncmp> } 80102098: c9 leave 80102099: c3 ret 8010209a <dirlookup>: // Look for a directory entry in a directory. // If found, set *poff to byte offset of entry. struct inode* dirlookup(struct inode *dp, char *name, uint *poff) { 8010209a: 55 push %ebp 8010209b: 89 e5 mov %esp,%ebp 8010209d: 83 ec 38 sub $0x38,%esp uint off, inum; struct dirent de; if(dp->type != T_DIR) 801020a0: 8b 45 08 mov 0x8(%ebp),%eax 801020a3: 0f b7 40 10 movzwl 0x10(%eax),%eax 801020a7: 66 83 f8 01 cmp $0x1,%ax 801020ab: 74 0c je 801020b9 <dirlookup+0x1f> panic("dirlookup not DIR"); 801020ad: c7 04 24 35 87 10 80 movl $0x80108735,(%esp) 801020b4: e8 81 e4 ff ff call 8010053a <panic> for(off = 0; off < dp->size; off += sizeof(de)){ 801020b9: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) 801020c0: e9 87 00 00 00 jmp 8010214c <dirlookup+0xb2> if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de)) 801020c5: 8d 45 e0 lea -0x20(%ebp),%eax 801020c8: c7 44 24 0c 10 00 00 movl $0x10,0xc(%esp) 801020cf: 00 801020d0: 8b 55 f0 mov -0x10(%ebp),%edx 801020d3: 89 54 24 08 mov %edx,0x8(%esp) 801020d7: 89 44 24 04 mov %eax,0x4(%esp) 801020db: 8b 45 08 mov 0x8(%ebp),%eax 801020de: 89 04 24 mov %eax,(%esp) 801020e1: e8 8e fc ff ff call 80101d74 <readi> 801020e6: 83 f8 10 cmp $0x10,%eax 801020e9: 74 0c je 801020f7 <dirlookup+0x5d> panic("dirlink read"); 801020eb: c7 04 24 47 87 10 80 movl $0x80108747,(%esp) 801020f2: e8 43 e4 ff ff call 8010053a <panic> if(de.inum == 0) 801020f7: 0f b7 45 e0 movzwl -0x20(%ebp),%eax 801020fb: 66 85 c0 test %ax,%ax 801020fe: 74 47 je 80102147 <dirlookup+0xad> continue; if(namecmp(name, de.name) == 0){ 80102100: 8d 45 e0 lea -0x20(%ebp),%eax 80102103: 83 c0 02 add $0x2,%eax 80102106: 89 44 24 04 mov %eax,0x4(%esp) 8010210a: 8b 45 0c mov 0xc(%ebp),%eax 8010210d: 89 04 24 mov %eax,(%esp) 80102110: e8 63 ff ff ff call 80102078 <namecmp> 80102115: 85 c0 test %eax,%eax 80102117: 75 2f jne 80102148 <dirlookup+0xae> // entry matches path element if(poff) 80102119: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 8010211d: 74 08 je 80102127 <dirlookup+0x8d> *poff = off; 8010211f: 8b 45 10 mov 0x10(%ebp),%eax 80102122: 8b 55 f0 mov -0x10(%ebp),%edx 80102125: 89 10 mov %edx,(%eax) inum = de.inum; 80102127: 0f b7 45 e0 movzwl -0x20(%ebp),%eax 8010212b: 0f b7 c0 movzwl %ax,%eax 8010212e: 89 45 f4 mov %eax,-0xc(%ebp) return iget(dp->dev, inum); 80102131: 8b 45 08 mov 0x8(%ebp),%eax 80102134: 8b 00 mov (%eax),%eax 80102136: 8b 55 f4 mov -0xc(%ebp),%edx 80102139: 89 54 24 04 mov %edx,0x4(%esp) 8010213d: 89 04 24 mov %eax,(%esp) 80102140: e8 31 f6 ff ff call 80101776 <iget> 80102145: eb 19 jmp 80102160 <dirlookup+0xc6> for(off = 0; off < dp->size; off += sizeof(de)){ if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de)) panic("dirlink read"); if(de.inum == 0) continue; 80102147: 90 nop struct dirent de; if(dp->type != T_DIR) panic("dirlookup not DIR"); for(off = 0; off < dp->size; off += sizeof(de)){ 80102148: 83 45 f0 10 addl $0x10,-0x10(%ebp) 8010214c: 8b 45 08 mov 0x8(%ebp),%eax 8010214f: 8b 40 18 mov 0x18(%eax),%eax 80102152: 3b 45 f0 cmp -0x10(%ebp),%eax 80102155: 0f 87 6a ff ff ff ja 801020c5 <dirlookup+0x2b> inum = de.inum; return iget(dp->dev, inum); } } return 0; 8010215b: b8 00 00 00 00 mov $0x0,%eax } 80102160: c9 leave 80102161: c3 ret 80102162 <dirlink>: // Write a new directory entry (name, inum) into the directory dp. int dirlink(struct inode *dp, char *name, uint inum) { 80102162: 55 push %ebp 80102163: 89 e5 mov %esp,%ebp 80102165: 83 ec 38 sub $0x38,%esp int off; struct dirent de; struct inode *ip; // Check that name is not present. if((ip = dirlookup(dp, name, 0)) != 0){ 80102168: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp) 8010216f: 00 80102170: 8b 45 0c mov 0xc(%ebp),%eax 80102173: 89 44 24 04 mov %eax,0x4(%esp) 80102177: 8b 45 08 mov 0x8(%ebp),%eax 8010217a: 89 04 24 mov %eax,(%esp) 8010217d: e8 18 ff ff ff call 8010209a <dirlookup> 80102182: 89 45 f4 mov %eax,-0xc(%ebp) 80102185: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 80102189: 74 15 je 801021a0 <dirlink+0x3e> iput(ip); 8010218b: 8b 45 f4 mov -0xc(%ebp),%eax 8010218e: 89 04 24 mov %eax,(%esp) 80102191: e8 9b f8 ff ff call 80101a31 <iput> return -1; 80102196: b8 ff ff ff ff mov $0xffffffff,%eax 8010219b: e9 b8 00 00 00 jmp 80102258 <dirlink+0xf6> } // Look for an empty dirent. for(off = 0; off < dp->size; off += sizeof(de)){ 801021a0: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) 801021a7: eb 44 jmp 801021ed <dirlink+0x8b> if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de)) 801021a9: 8b 55 f0 mov -0x10(%ebp),%edx 801021ac: 8d 45 e0 lea -0x20(%ebp),%eax 801021af: c7 44 24 0c 10 00 00 movl $0x10,0xc(%esp) 801021b6: 00 801021b7: 89 54 24 08 mov %edx,0x8(%esp) 801021bb: 89 44 24 04 mov %eax,0x4(%esp) 801021bf: 8b 45 08 mov 0x8(%ebp),%eax 801021c2: 89 04 24 mov %eax,(%esp) 801021c5: e8 aa fb ff ff call 80101d74 <readi> 801021ca: 83 f8 10 cmp $0x10,%eax 801021cd: 74 0c je 801021db <dirlink+0x79> panic("dirlink read"); 801021cf: c7 04 24 47 87 10 80 movl $0x80108747,(%esp) 801021d6: e8 5f e3 ff ff call 8010053a <panic> if(de.inum == 0) 801021db: 0f b7 45 e0 movzwl -0x20(%ebp),%eax 801021df: 66 85 c0 test %ax,%ax 801021e2: 74 18 je 801021fc <dirlink+0x9a> iput(ip); return -1; } // Look for an empty dirent. for(off = 0; off < dp->size; off += sizeof(de)){ 801021e4: 8b 45 f0 mov -0x10(%ebp),%eax 801021e7: 83 c0 10 add $0x10,%eax 801021ea: 89 45 f0 mov %eax,-0x10(%ebp) 801021ed: 8b 55 f0 mov -0x10(%ebp),%edx 801021f0: 8b 45 08 mov 0x8(%ebp),%eax 801021f3: 8b 40 18 mov 0x18(%eax),%eax 801021f6: 39 c2 cmp %eax,%edx 801021f8: 72 af jb 801021a9 <dirlink+0x47> 801021fa: eb 01 jmp 801021fd <dirlink+0x9b> if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de)) panic("dirlink read"); if(de.inum == 0) break; 801021fc: 90 nop } strncpy(de.name, name, DIRSIZ); 801021fd: c7 44 24 08 0e 00 00 movl $0xe,0x8(%esp) 80102204: 00 80102205: 8b 45 0c mov 0xc(%ebp),%eax 80102208: 89 44 24 04 mov %eax,0x4(%esp) 8010220c: 8d 45 e0 lea -0x20(%ebp),%eax 8010220f: 83 c0 02 add $0x2,%eax 80102212: 89 04 24 mov %eax,(%esp) 80102215: e8 83 31 00 00 call 8010539d <strncpy> de.inum = inum; 8010221a: 8b 45 10 mov 0x10(%ebp),%eax 8010221d: 66 89 45 e0 mov %ax,-0x20(%ebp) if(writei(dp, (char*)&de, off, sizeof(de)) != sizeof(de)) 80102221: 8b 55 f0 mov -0x10(%ebp),%edx 80102224: 8d 45 e0 lea -0x20(%ebp),%eax 80102227: c7 44 24 0c 10 00 00 movl $0x10,0xc(%esp) 8010222e: 00 8010222f: 89 54 24 08 mov %edx,0x8(%esp) 80102233: 89 44 24 04 mov %eax,0x4(%esp) 80102237: 8b 45 08 mov 0x8(%ebp),%eax 8010223a: 89 04 24 mov %eax,(%esp) 8010223d: e8 9e fc ff ff call 80101ee0 <writei> 80102242: 83 f8 10 cmp $0x10,%eax 80102245: 74 0c je 80102253 <dirlink+0xf1> panic("dirlink"); 80102247: c7 04 24 54 87 10 80 movl $0x80108754,(%esp) 8010224e: e8 e7 e2 ff ff call 8010053a <panic> return 0; 80102253: b8 00 00 00 00 mov $0x0,%eax } 80102258: c9 leave 80102259: c3 ret 8010225a <skipelem>: // skipelem("a", name) = "", setting name = "a" // skipelem("", name) = skipelem("////", name) = 0 // static char* skipelem(char *path, char *name) { 8010225a: 55 push %ebp 8010225b: 89 e5 mov %esp,%ebp 8010225d: 83 ec 28 sub $0x28,%esp char *s; int len; while(*path == '/') 80102260: eb 04 jmp 80102266 <skipelem+0xc> path++; 80102262: 83 45 08 01 addl $0x1,0x8(%ebp) skipelem(char *path, char *name) { char *s; int len; while(*path == '/') 80102266: 8b 45 08 mov 0x8(%ebp),%eax 80102269: 0f b6 00 movzbl (%eax),%eax 8010226c: 3c 2f cmp $0x2f,%al 8010226e: 74 f2 je 80102262 <skipelem+0x8> path++; if(*path == 0) 80102270: 8b 45 08 mov 0x8(%ebp),%eax 80102273: 0f b6 00 movzbl (%eax),%eax 80102276: 84 c0 test %al,%al 80102278: 75 0a jne 80102284 <skipelem+0x2a> return 0; 8010227a: b8 00 00 00 00 mov $0x0,%eax 8010227f: e9 86 00 00 00 jmp 8010230a <skipelem+0xb0> s = path; 80102284: 8b 45 08 mov 0x8(%ebp),%eax 80102287: 89 45 f0 mov %eax,-0x10(%ebp) while(*path != '/' && *path != 0) 8010228a: eb 04 jmp 80102290 <skipelem+0x36> path++; 8010228c: 83 45 08 01 addl $0x1,0x8(%ebp) while(*path == '/') path++; if(*path == 0) return 0; s = path; while(*path != '/' && *path != 0) 80102290: 8b 45 08 mov 0x8(%ebp),%eax 80102293: 0f b6 00 movzbl (%eax),%eax 80102296: 3c 2f cmp $0x2f,%al 80102298: 74 0a je 801022a4 <skipelem+0x4a> 8010229a: 8b 45 08 mov 0x8(%ebp),%eax 8010229d: 0f b6 00 movzbl (%eax),%eax 801022a0: 84 c0 test %al,%al 801022a2: 75 e8 jne 8010228c <skipelem+0x32> path++; len = path - s; 801022a4: 8b 55 08 mov 0x8(%ebp),%edx 801022a7: 8b 45 f0 mov -0x10(%ebp),%eax 801022aa: 89 d1 mov %edx,%ecx 801022ac: 29 c1 sub %eax,%ecx 801022ae: 89 c8 mov %ecx,%eax 801022b0: 89 45 f4 mov %eax,-0xc(%ebp) if(len >= DIRSIZ) 801022b3: 83 7d f4 0d cmpl $0xd,-0xc(%ebp) 801022b7: 7e 1c jle 801022d5 <skipelem+0x7b> memmove(name, s, DIRSIZ); 801022b9: c7 44 24 08 0e 00 00 movl $0xe,0x8(%esp) 801022c0: 00 801022c1: 8b 45 f0 mov -0x10(%ebp),%eax 801022c4: 89 44 24 04 mov %eax,0x4(%esp) 801022c8: 8b 45 0c mov 0xc(%ebp),%eax 801022cb: 89 04 24 mov %eax,(%esp) 801022ce: e8 ca 2f 00 00 call 8010529d <memmove> else { memmove(name, s, len); name[len] = 0; } while(*path == '/') 801022d3: eb 28 jmp 801022fd <skipelem+0xa3> path++; len = path - s; if(len >= DIRSIZ) memmove(name, s, DIRSIZ); else { memmove(name, s, len); 801022d5: 8b 45 f4 mov -0xc(%ebp),%eax 801022d8: 89 44 24 08 mov %eax,0x8(%esp) 801022dc: 8b 45 f0 mov -0x10(%ebp),%eax 801022df: 89 44 24 04 mov %eax,0x4(%esp) 801022e3: 8b 45 0c mov 0xc(%ebp),%eax 801022e6: 89 04 24 mov %eax,(%esp) 801022e9: e8 af 2f 00 00 call 8010529d <memmove> name[len] = 0; 801022ee: 8b 45 f4 mov -0xc(%ebp),%eax 801022f1: 03 45 0c add 0xc(%ebp),%eax 801022f4: c6 00 00 movb $0x0,(%eax) } while(*path == '/') 801022f7: eb 04 jmp 801022fd <skipelem+0xa3> path++; 801022f9: 83 45 08 01 addl $0x1,0x8(%ebp) memmove(name, s, DIRSIZ); else { memmove(name, s, len); name[len] = 0; } while(*path == '/') 801022fd: 8b 45 08 mov 0x8(%ebp),%eax 80102300: 0f b6 00 movzbl (%eax),%eax 80102303: 3c 2f cmp $0x2f,%al 80102305: 74 f2 je 801022f9 <skipelem+0x9f> path++; return path; 80102307: 8b 45 08 mov 0x8(%ebp),%eax } 8010230a: c9 leave 8010230b: c3 ret 8010230c <namex>: // Look up and return the inode for a path name. // If parent != 0, return the inode for the parent and copy the final // path element into name, which must have room for DIRSIZ bytes. static struct inode* namex(char *path, int nameiparent, char *name) { 8010230c: 55 push %ebp 8010230d: 89 e5 mov %esp,%ebp 8010230f: 83 ec 28 sub $0x28,%esp struct inode *ip, *next; if(*path == '/') 80102312: 8b 45 08 mov 0x8(%ebp),%eax 80102315: 0f b6 00 movzbl (%eax),%eax 80102318: 3c 2f cmp $0x2f,%al 8010231a: 75 1c jne 80102338 <namex+0x2c> ip = iget(ROOTDEV, ROOTINO); 8010231c: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp) 80102323: 00 80102324: c7 04 24 01 00 00 00 movl $0x1,(%esp) 8010232b: e8 46 f4 ff ff call 80101776 <iget> 80102330: 89 45 f0 mov %eax,-0x10(%ebp) else ip = idup(proc->cwd); while((path = skipelem(path, name)) != 0){ 80102333: e9 af 00 00 00 jmp 801023e7 <namex+0xdb> struct inode *ip, *next; if(*path == '/') ip = iget(ROOTDEV, ROOTINO); else ip = idup(proc->cwd); 80102338: 65 a1 04 00 00 00 mov %gs:0x4,%eax 8010233e: 8b 40 68 mov 0x68(%eax),%eax 80102341: 89 04 24 mov %eax,(%esp) 80102344: e8 00 f5 ff ff call 80101849 <idup> 80102349: 89 45 f0 mov %eax,-0x10(%ebp) while((path = skipelem(path, name)) != 0){ 8010234c: e9 96 00 00 00 jmp 801023e7 <namex+0xdb> ilock(ip); 80102351: 8b 45 f0 mov -0x10(%ebp),%eax 80102354: 89 04 24 mov %eax,(%esp) 80102357: e8 1f f5 ff ff call 8010187b <ilock> if(ip->type != T_DIR){ 8010235c: 8b 45 f0 mov -0x10(%ebp),%eax 8010235f: 0f b7 40 10 movzwl 0x10(%eax),%eax 80102363: 66 83 f8 01 cmp $0x1,%ax 80102367: 74 15 je 8010237e <namex+0x72> iunlockput(ip); 80102369: 8b 45 f0 mov -0x10(%ebp),%eax 8010236c: 89 04 24 mov %eax,(%esp) 8010236f: e8 8e f7 ff ff call 80101b02 <iunlockput> return 0; 80102374: b8 00 00 00 00 mov $0x0,%eax 80102379: e9 a3 00 00 00 jmp 80102421 <namex+0x115> } if(nameiparent && *path == '\0'){ 8010237e: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 80102382: 74 1d je 801023a1 <namex+0x95> 80102384: 8b 45 08 mov 0x8(%ebp),%eax 80102387: 0f b6 00 movzbl (%eax),%eax 8010238a: 84 c0 test %al,%al 8010238c: 75 13 jne 801023a1 <namex+0x95> // Stop one level early. iunlock(ip); 8010238e: 8b 45 f0 mov -0x10(%ebp),%eax 80102391: 89 04 24 mov %eax,(%esp) 80102394: e8 33 f6 ff ff call 801019cc <iunlock> return ip; 80102399: 8b 45 f0 mov -0x10(%ebp),%eax 8010239c: e9 80 00 00 00 jmp 80102421 <namex+0x115> } if((next = dirlookup(ip, name, 0)) == 0){ 801023a1: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp) 801023a8: 00 801023a9: 8b 45 10 mov 0x10(%ebp),%eax 801023ac: 89 44 24 04 mov %eax,0x4(%esp) 801023b0: 8b 45 f0 mov -0x10(%ebp),%eax 801023b3: 89 04 24 mov %eax,(%esp) 801023b6: e8 df fc ff ff call 8010209a <dirlookup> 801023bb: 89 45 f4 mov %eax,-0xc(%ebp) 801023be: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 801023c2: 75 12 jne 801023d6 <namex+0xca> iunlockput(ip); 801023c4: 8b 45 f0 mov -0x10(%ebp),%eax 801023c7: 89 04 24 mov %eax,(%esp) 801023ca: e8 33 f7 ff ff call 80101b02 <iunlockput> return 0; 801023cf: b8 00 00 00 00 mov $0x0,%eax 801023d4: eb 4b jmp 80102421 <namex+0x115> } iunlockput(ip); 801023d6: 8b 45 f0 mov -0x10(%ebp),%eax 801023d9: 89 04 24 mov %eax,(%esp) 801023dc: e8 21 f7 ff ff call 80101b02 <iunlockput> ip = next; 801023e1: 8b 45 f4 mov -0xc(%ebp),%eax 801023e4: 89 45 f0 mov %eax,-0x10(%ebp) if(*path == '/') ip = iget(ROOTDEV, ROOTINO); else ip = idup(proc->cwd); while((path = skipelem(path, name)) != 0){ 801023e7: 8b 45 10 mov 0x10(%ebp),%eax 801023ea: 89 44 24 04 mov %eax,0x4(%esp) 801023ee: 8b 45 08 mov 0x8(%ebp),%eax 801023f1: 89 04 24 mov %eax,(%esp) 801023f4: e8 61 fe ff ff call 8010225a <skipelem> 801023f9: 89 45 08 mov %eax,0x8(%ebp) 801023fc: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 80102400: 0f 85 4b ff ff ff jne 80102351 <namex+0x45> return 0; } iunlockput(ip); ip = next; } if(nameiparent){ 80102406: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 8010240a: 74 12 je 8010241e <namex+0x112> iput(ip); 8010240c: 8b 45 f0 mov -0x10(%ebp),%eax 8010240f: 89 04 24 mov %eax,(%esp) 80102412: e8 1a f6 ff ff call 80101a31 <iput> return 0; 80102417: b8 00 00 00 00 mov $0x0,%eax 8010241c: eb 03 jmp 80102421 <namex+0x115> } return ip; 8010241e: 8b 45 f0 mov -0x10(%ebp),%eax } 80102421: c9 leave 80102422: c3 ret 80102423 <namei>: struct inode* namei(char *path) { 80102423: 55 push %ebp 80102424: 89 e5 mov %esp,%ebp 80102426: 83 ec 28 sub $0x28,%esp char name[DIRSIZ]; return namex(path, 0, name); 80102429: 8d 45 ea lea -0x16(%ebp),%eax 8010242c: 89 44 24 08 mov %eax,0x8(%esp) 80102430: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80102437: 00 80102438: 8b 45 08 mov 0x8(%ebp),%eax 8010243b: 89 04 24 mov %eax,(%esp) 8010243e: e8 c9 fe ff ff call 8010230c <namex> } 80102443: c9 leave 80102444: c3 ret 80102445 <nameiparent>: struct inode* nameiparent(char *path, char *name) { 80102445: 55 push %ebp 80102446: 89 e5 mov %esp,%ebp 80102448: 83 ec 18 sub $0x18,%esp return namex(path, 1, name); 8010244b: 8b 45 0c mov 0xc(%ebp),%eax 8010244e: 89 44 24 08 mov %eax,0x8(%esp) 80102452: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp) 80102459: 00 8010245a: 8b 45 08 mov 0x8(%ebp),%eax 8010245d: 89 04 24 mov %eax,(%esp) 80102460: e8 a7 fe ff ff call 8010230c <namex> } 80102465: c9 leave 80102466: c3 ret ... 80102468 <inb>: // Routines to let C code use special x86 instructions. static inline uchar inb(ushort port) { 80102468: 55 push %ebp 80102469: 89 e5 mov %esp,%ebp 8010246b: 83 ec 14 sub $0x14,%esp 8010246e: 8b 45 08 mov 0x8(%ebp),%eax 80102471: 66 89 45 ec mov %ax,-0x14(%ebp) uchar data; asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 80102475: 0f b7 45 ec movzwl -0x14(%ebp),%eax 80102479: 89 c2 mov %eax,%edx 8010247b: ec in (%dx),%al 8010247c: 88 45 ff mov %al,-0x1(%ebp) return data; 8010247f: 0f b6 45 ff movzbl -0x1(%ebp),%eax } 80102483: c9 leave 80102484: c3 ret 80102485 <insl>: static inline void insl(int port, void *addr, int cnt) { 80102485: 55 push %ebp 80102486: 89 e5 mov %esp,%ebp 80102488: 57 push %edi 80102489: 53 push %ebx asm volatile("cld; rep insl" : 8010248a: 8b 55 08 mov 0x8(%ebp),%edx 8010248d: 8b 4d 0c mov 0xc(%ebp),%ecx 80102490: 8b 45 10 mov 0x10(%ebp),%eax 80102493: 89 cb mov %ecx,%ebx 80102495: 89 df mov %ebx,%edi 80102497: 89 c1 mov %eax,%ecx 80102499: fc cld 8010249a: f3 6d rep insl (%dx),%es:(%edi) 8010249c: 89 c8 mov %ecx,%eax 8010249e: 89 fb mov %edi,%ebx 801024a0: 89 5d 0c mov %ebx,0xc(%ebp) 801024a3: 89 45 10 mov %eax,0x10(%ebp) "=D" (addr), "=c" (cnt) : "d" (port), "0" (addr), "1" (cnt) : "memory", "cc"); } 801024a6: 5b pop %ebx 801024a7: 5f pop %edi 801024a8: 5d pop %ebp 801024a9: c3 ret 801024aa <outb>: static inline void outb(ushort port, uchar data) { 801024aa: 55 push %ebp 801024ab: 89 e5 mov %esp,%ebp 801024ad: 83 ec 08 sub $0x8,%esp 801024b0: 8b 55 08 mov 0x8(%ebp),%edx 801024b3: 8b 45 0c mov 0xc(%ebp),%eax 801024b6: 66 89 55 fc mov %dx,-0x4(%ebp) 801024ba: 88 45 f8 mov %al,-0x8(%ebp) asm volatile("out %0,%1" : : "a" (data), "d" (port)); 801024bd: 0f b6 45 f8 movzbl -0x8(%ebp),%eax 801024c1: 0f b7 55 fc movzwl -0x4(%ebp),%edx 801024c5: ee out %al,(%dx) } 801024c6: c9 leave 801024c7: c3 ret 801024c8 <outsl>: asm volatile("out %0,%1" : : "a" (data), "d" (port)); } static inline void outsl(int port, const void *addr, int cnt) { 801024c8: 55 push %ebp 801024c9: 89 e5 mov %esp,%ebp 801024cb: 56 push %esi 801024cc: 53 push %ebx asm volatile("cld; rep outsl" : 801024cd: 8b 55 08 mov 0x8(%ebp),%edx 801024d0: 8b 4d 0c mov 0xc(%ebp),%ecx 801024d3: 8b 45 10 mov 0x10(%ebp),%eax 801024d6: 89 cb mov %ecx,%ebx 801024d8: 89 de mov %ebx,%esi 801024da: 89 c1 mov %eax,%ecx 801024dc: fc cld 801024dd: f3 6f rep outsl %ds:(%esi),(%dx) 801024df: 89 c8 mov %ecx,%eax 801024e1: 89 f3 mov %esi,%ebx 801024e3: 89 5d 0c mov %ebx,0xc(%ebp) 801024e6: 89 45 10 mov %eax,0x10(%ebp) "=S" (addr), "=c" (cnt) : "d" (port), "0" (addr), "1" (cnt) : "cc"); } 801024e9: 5b pop %ebx 801024ea: 5e pop %esi 801024eb: 5d pop %ebp 801024ec: c3 ret 801024ed <idewait>: static void idestart(struct buf*); // Wait for IDE disk to become ready. static int idewait(int checkerr) { 801024ed: 55 push %ebp 801024ee: 89 e5 mov %esp,%ebp 801024f0: 83 ec 14 sub $0x14,%esp int r; while(((r = inb(0x1f7)) & (IDE_BSY|IDE_DRDY)) != IDE_DRDY) 801024f3: c7 04 24 f7 01 00 00 movl $0x1f7,(%esp) 801024fa: e8 69 ff ff ff call 80102468 <inb> 801024ff: 0f b6 c0 movzbl %al,%eax 80102502: 89 45 fc mov %eax,-0x4(%ebp) 80102505: 8b 45 fc mov -0x4(%ebp),%eax 80102508: 25 c0 00 00 00 and $0xc0,%eax 8010250d: 83 f8 40 cmp $0x40,%eax 80102510: 75 e1 jne 801024f3 <idewait+0x6> ; if(checkerr && (r & (IDE_DF|IDE_ERR)) != 0) 80102512: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 80102516: 74 11 je 80102529 <idewait+0x3c> 80102518: 8b 45 fc mov -0x4(%ebp),%eax 8010251b: 83 e0 21 and $0x21,%eax 8010251e: 85 c0 test %eax,%eax 80102520: 74 07 je 80102529 <idewait+0x3c> return -1; 80102522: b8 ff ff ff ff mov $0xffffffff,%eax 80102527: eb 05 jmp 8010252e <idewait+0x41> return 0; 80102529: b8 00 00 00 00 mov $0x0,%eax } 8010252e: c9 leave 8010252f: c3 ret 80102530 <ideinit>: void ideinit(void) { 80102530: 55 push %ebp 80102531: 89 e5 mov %esp,%ebp 80102533: 83 ec 28 sub $0x28,%esp int i; initlock(&idelock, "ide"); 80102536: c7 44 24 04 5c 87 10 movl $0x8010875c,0x4(%esp) 8010253d: 80 8010253e: c7 04 24 20 b6 10 80 movl $0x8010b620,(%esp) 80102545: e8 10 2a 00 00 call 80104f5a <initlock> picenable(IRQ_IDE); 8010254a: c7 04 24 0e 00 00 00 movl $0xe,(%esp) 80102551: e8 37 15 00 00 call 80103a8d <picenable> ioapicenable(IRQ_IDE, ncpu - 1); 80102556: a1 20 ff 10 80 mov 0x8010ff20,%eax 8010255b: 83 e8 01 sub $0x1,%eax 8010255e: 89 44 24 04 mov %eax,0x4(%esp) 80102562: c7 04 24 0e 00 00 00 movl $0xe,(%esp) 80102569: e8 10 04 00 00 call 8010297e <ioapicenable> idewait(0); 8010256e: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80102575: e8 73 ff ff ff call 801024ed <idewait> // Check if disk 1 is present outb(0x1f6, 0xe0 | (1<<4)); 8010257a: c7 44 24 04 f0 00 00 movl $0xf0,0x4(%esp) 80102581: 00 80102582: c7 04 24 f6 01 00 00 movl $0x1f6,(%esp) 80102589: e8 1c ff ff ff call 801024aa <outb> for(i=0; i<1000; i++){ 8010258e: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) 80102595: eb 20 jmp 801025b7 <ideinit+0x87> if(inb(0x1f7) != 0){ 80102597: c7 04 24 f7 01 00 00 movl $0x1f7,(%esp) 8010259e: e8 c5 fe ff ff call 80102468 <inb> 801025a3: 84 c0 test %al,%al 801025a5: 74 0c je 801025b3 <ideinit+0x83> havedisk1 = 1; 801025a7: c7 05 58 b6 10 80 01 movl $0x1,0x8010b658 801025ae: 00 00 00 break; 801025b1: eb 0d jmp 801025c0 <ideinit+0x90> ioapicenable(IRQ_IDE, ncpu - 1); idewait(0); // Check if disk 1 is present outb(0x1f6, 0xe0 | (1<<4)); for(i=0; i<1000; i++){ 801025b3: 83 45 f4 01 addl $0x1,-0xc(%ebp) 801025b7: 81 7d f4 e7 03 00 00 cmpl $0x3e7,-0xc(%ebp) 801025be: 7e d7 jle 80102597 <ideinit+0x67> break; } } // Switch back to disk 0. outb(0x1f6, 0xe0 | (0<<4)); 801025c0: c7 44 24 04 e0 00 00 movl $0xe0,0x4(%esp) 801025c7: 00 801025c8: c7 04 24 f6 01 00 00 movl $0x1f6,(%esp) 801025cf: e8 d6 fe ff ff call 801024aa <outb> } 801025d4: c9 leave 801025d5: c3 ret 801025d6 <idestart>: // Start the request for b. Caller must hold idelock. static void idestart(struct buf *b) { 801025d6: 55 push %ebp 801025d7: 89 e5 mov %esp,%ebp 801025d9: 83 ec 18 sub $0x18,%esp if(b == 0) 801025dc: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 801025e0: 75 0c jne 801025ee <idestart+0x18> panic("idestart"); 801025e2: c7 04 24 60 87 10 80 movl $0x80108760,(%esp) 801025e9: e8 4c df ff ff call 8010053a <panic> idewait(0); 801025ee: c7 04 24 00 00 00 00 movl $0x0,(%esp) 801025f5: e8 f3 fe ff ff call 801024ed <idewait> outb(0x3f6, 0); // generate interrupt 801025fa: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80102601: 00 80102602: c7 04 24 f6 03 00 00 movl $0x3f6,(%esp) 80102609: e8 9c fe ff ff call 801024aa <outb> outb(0x1f2, 1); // number of sectors 8010260e: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp) 80102615: 00 80102616: c7 04 24 f2 01 00 00 movl $0x1f2,(%esp) 8010261d: e8 88 fe ff ff call 801024aa <outb> outb(0x1f3, b->sector & 0xff); 80102622: 8b 45 08 mov 0x8(%ebp),%eax 80102625: 8b 40 08 mov 0x8(%eax),%eax 80102628: 0f b6 c0 movzbl %al,%eax 8010262b: 89 44 24 04 mov %eax,0x4(%esp) 8010262f: c7 04 24 f3 01 00 00 movl $0x1f3,(%esp) 80102636: e8 6f fe ff ff call 801024aa <outb> outb(0x1f4, (b->sector >> 8) & 0xff); 8010263b: 8b 45 08 mov 0x8(%ebp),%eax 8010263e: 8b 40 08 mov 0x8(%eax),%eax 80102641: c1 e8 08 shr $0x8,%eax 80102644: 0f b6 c0 movzbl %al,%eax 80102647: 89 44 24 04 mov %eax,0x4(%esp) 8010264b: c7 04 24 f4 01 00 00 movl $0x1f4,(%esp) 80102652: e8 53 fe ff ff call 801024aa <outb> outb(0x1f5, (b->sector >> 16) & 0xff); 80102657: 8b 45 08 mov 0x8(%ebp),%eax 8010265a: 8b 40 08 mov 0x8(%eax),%eax 8010265d: c1 e8 10 shr $0x10,%eax 80102660: 0f b6 c0 movzbl %al,%eax 80102663: 89 44 24 04 mov %eax,0x4(%esp) 80102667: c7 04 24 f5 01 00 00 movl $0x1f5,(%esp) 8010266e: e8 37 fe ff ff call 801024aa <outb> outb(0x1f6, 0xe0 | ((b->dev&1)<<4) | ((b->sector>>24)&0x0f)); 80102673: 8b 45 08 mov 0x8(%ebp),%eax 80102676: 8b 40 04 mov 0x4(%eax),%eax 80102679: 83 e0 01 and $0x1,%eax 8010267c: 89 c2 mov %eax,%edx 8010267e: c1 e2 04 shl $0x4,%edx 80102681: 8b 45 08 mov 0x8(%ebp),%eax 80102684: 8b 40 08 mov 0x8(%eax),%eax 80102687: c1 e8 18 shr $0x18,%eax 8010268a: 83 e0 0f and $0xf,%eax 8010268d: 09 d0 or %edx,%eax 8010268f: 83 c8 e0 or $0xffffffe0,%eax 80102692: 0f b6 c0 movzbl %al,%eax 80102695: 89 44 24 04 mov %eax,0x4(%esp) 80102699: c7 04 24 f6 01 00 00 movl $0x1f6,(%esp) 801026a0: e8 05 fe ff ff call 801024aa <outb> if(b->flags & B_DIRTY){ 801026a5: 8b 45 08 mov 0x8(%ebp),%eax 801026a8: 8b 00 mov (%eax),%eax 801026aa: 83 e0 04 and $0x4,%eax 801026ad: 85 c0 test %eax,%eax 801026af: 74 34 je 801026e5 <idestart+0x10f> outb(0x1f7, IDE_CMD_WRITE); 801026b1: c7 44 24 04 30 00 00 movl $0x30,0x4(%esp) 801026b8: 00 801026b9: c7 04 24 f7 01 00 00 movl $0x1f7,(%esp) 801026c0: e8 e5 fd ff ff call 801024aa <outb> outsl(0x1f0, b->data, 512/4); 801026c5: 8b 45 08 mov 0x8(%ebp),%eax 801026c8: 83 c0 18 add $0x18,%eax 801026cb: c7 44 24 08 80 00 00 movl $0x80,0x8(%esp) 801026d2: 00 801026d3: 89 44 24 04 mov %eax,0x4(%esp) 801026d7: c7 04 24 f0 01 00 00 movl $0x1f0,(%esp) 801026de: e8 e5 fd ff ff call 801024c8 <outsl> 801026e3: eb 14 jmp 801026f9 <idestart+0x123> } else { outb(0x1f7, IDE_CMD_READ); 801026e5: c7 44 24 04 20 00 00 movl $0x20,0x4(%esp) 801026ec: 00 801026ed: c7 04 24 f7 01 00 00 movl $0x1f7,(%esp) 801026f4: e8 b1 fd ff ff call 801024aa <outb> } } 801026f9: c9 leave 801026fa: c3 ret 801026fb <ideintr>: // Interrupt handler. void ideintr(void) { 801026fb: 55 push %ebp 801026fc: 89 e5 mov %esp,%ebp 801026fe: 83 ec 28 sub $0x28,%esp struct buf *b; // First queued buffer is the active request. acquire(&idelock); 80102701: c7 04 24 20 b6 10 80 movl $0x8010b620,(%esp) 80102708: e8 6e 28 00 00 call 80104f7b <acquire> if((b = idequeue) == 0){ 8010270d: a1 54 b6 10 80 mov 0x8010b654,%eax 80102712: 89 45 f4 mov %eax,-0xc(%ebp) 80102715: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 80102719: 75 11 jne 8010272c <ideintr+0x31> release(&idelock); 8010271b: c7 04 24 20 b6 10 80 movl $0x8010b620,(%esp) 80102722: e8 b5 28 00 00 call 80104fdc <release> // cprintf("spurious IDE interrupt\n"); return; 80102727: e9 90 00 00 00 jmp 801027bc <ideintr+0xc1> } idequeue = b->qnext; 8010272c: 8b 45 f4 mov -0xc(%ebp),%eax 8010272f: 8b 40 14 mov 0x14(%eax),%eax 80102732: a3 54 b6 10 80 mov %eax,0x8010b654 // Read data if needed. if(!(b->flags & B_DIRTY) && idewait(1) >= 0) 80102737: 8b 45 f4 mov -0xc(%ebp),%eax 8010273a: 8b 00 mov (%eax),%eax 8010273c: 83 e0 04 and $0x4,%eax 8010273f: 85 c0 test %eax,%eax 80102741: 75 2e jne 80102771 <ideintr+0x76> 80102743: c7 04 24 01 00 00 00 movl $0x1,(%esp) 8010274a: e8 9e fd ff ff call 801024ed <idewait> 8010274f: 85 c0 test %eax,%eax 80102751: 78 1e js 80102771 <ideintr+0x76> insl(0x1f0, b->data, 512/4); 80102753: 8b 45 f4 mov -0xc(%ebp),%eax 80102756: 83 c0 18 add $0x18,%eax 80102759: c7 44 24 08 80 00 00 movl $0x80,0x8(%esp) 80102760: 00 80102761: 89 44 24 04 mov %eax,0x4(%esp) 80102765: c7 04 24 f0 01 00 00 movl $0x1f0,(%esp) 8010276c: e8 14 fd ff ff call 80102485 <insl> // Wake process waiting for this buf. b->flags |= B_VALID; 80102771: 8b 45 f4 mov -0xc(%ebp),%eax 80102774: 8b 00 mov (%eax),%eax 80102776: 89 c2 mov %eax,%edx 80102778: 83 ca 02 or $0x2,%edx 8010277b: 8b 45 f4 mov -0xc(%ebp),%eax 8010277e: 89 10 mov %edx,(%eax) b->flags &= ~B_DIRTY; 80102780: 8b 45 f4 mov -0xc(%ebp),%eax 80102783: 8b 00 mov (%eax),%eax 80102785: 89 c2 mov %eax,%edx 80102787: 83 e2 fb and $0xfffffffb,%edx 8010278a: 8b 45 f4 mov -0xc(%ebp),%eax 8010278d: 89 10 mov %edx,(%eax) wakeup(b); 8010278f: 8b 45 f4 mov -0xc(%ebp),%eax 80102792: 89 04 24 mov %eax,(%esp) 80102795: e8 ae 25 00 00 call 80104d48 <wakeup> // Start disk on next buf in queue. if(idequeue != 0) 8010279a: a1 54 b6 10 80 mov 0x8010b654,%eax 8010279f: 85 c0 test %eax,%eax 801027a1: 74 0d je 801027b0 <ideintr+0xb5> idestart(idequeue); 801027a3: a1 54 b6 10 80 mov 0x8010b654,%eax 801027a8: 89 04 24 mov %eax,(%esp) 801027ab: e8 26 fe ff ff call 801025d6 <idestart> release(&idelock); 801027b0: c7 04 24 20 b6 10 80 movl $0x8010b620,(%esp) 801027b7: e8 20 28 00 00 call 80104fdc <release> } 801027bc: c9 leave 801027bd: c3 ret 801027be <iderw>: // Sync buf with disk. // If B_DIRTY is set, write buf to disk, clear B_DIRTY, set B_VALID. // Else if B_VALID is not set, read buf from disk, set B_VALID. void iderw(struct buf *b) { 801027be: 55 push %ebp 801027bf: 89 e5 mov %esp,%ebp 801027c1: 83 ec 28 sub $0x28,%esp struct buf **pp; if(!(b->flags & B_BUSY)) 801027c4: 8b 45 08 mov 0x8(%ebp),%eax 801027c7: 8b 00 mov (%eax),%eax 801027c9: 83 e0 01 and $0x1,%eax 801027cc: 85 c0 test %eax,%eax 801027ce: 75 0c jne 801027dc <iderw+0x1e> panic("iderw: buf not busy"); 801027d0: c7 04 24 69 87 10 80 movl $0x80108769,(%esp) 801027d7: e8 5e dd ff ff call 8010053a <panic> if((b->flags & (B_VALID|B_DIRTY)) == B_VALID) 801027dc: 8b 45 08 mov 0x8(%ebp),%eax 801027df: 8b 00 mov (%eax),%eax 801027e1: 83 e0 06 and $0x6,%eax 801027e4: 83 f8 02 cmp $0x2,%eax 801027e7: 75 0c jne 801027f5 <iderw+0x37> panic("iderw: nothing to do"); 801027e9: c7 04 24 7d 87 10 80 movl $0x8010877d,(%esp) 801027f0: e8 45 dd ff ff call 8010053a <panic> if(b->dev != 0 && !havedisk1) 801027f5: 8b 45 08 mov 0x8(%ebp),%eax 801027f8: 8b 40 04 mov 0x4(%eax),%eax 801027fb: 85 c0 test %eax,%eax 801027fd: 74 15 je 80102814 <iderw+0x56> 801027ff: a1 58 b6 10 80 mov 0x8010b658,%eax 80102804: 85 c0 test %eax,%eax 80102806: 75 0c jne 80102814 <iderw+0x56> panic("iderw: ide disk 1 not present"); 80102808: c7 04 24 92 87 10 80 movl $0x80108792,(%esp) 8010280f: e8 26 dd ff ff call 8010053a <panic> acquire(&idelock); //DOC:acquire-lock 80102814: c7 04 24 20 b6 10 80 movl $0x8010b620,(%esp) 8010281b: e8 5b 27 00 00 call 80104f7b <acquire> // Append b to idequeue. b->qnext = 0; 80102820: 8b 45 08 mov 0x8(%ebp),%eax 80102823: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) for(pp=&idequeue; *pp; pp=&(*pp)->qnext) //DOC:insert-queue 8010282a: c7 45 f4 54 b6 10 80 movl $0x8010b654,-0xc(%ebp) 80102831: eb 0b jmp 8010283e <iderw+0x80> 80102833: 8b 45 f4 mov -0xc(%ebp),%eax 80102836: 8b 00 mov (%eax),%eax 80102838: 83 c0 14 add $0x14,%eax 8010283b: 89 45 f4 mov %eax,-0xc(%ebp) 8010283e: 8b 45 f4 mov -0xc(%ebp),%eax 80102841: 8b 00 mov (%eax),%eax 80102843: 85 c0 test %eax,%eax 80102845: 75 ec jne 80102833 <iderw+0x75> ; *pp = b; 80102847: 8b 45 f4 mov -0xc(%ebp),%eax 8010284a: 8b 55 08 mov 0x8(%ebp),%edx 8010284d: 89 10 mov %edx,(%eax) // Start disk if necessary. if(idequeue == b) 8010284f: a1 54 b6 10 80 mov 0x8010b654,%eax 80102854: 3b 45 08 cmp 0x8(%ebp),%eax 80102857: 75 22 jne 8010287b <iderw+0xbd> idestart(b); 80102859: 8b 45 08 mov 0x8(%ebp),%eax 8010285c: 89 04 24 mov %eax,(%esp) 8010285f: e8 72 fd ff ff call 801025d6 <idestart> // Wait for request to finish. while((b->flags & (B_VALID|B_DIRTY)) != B_VALID){ 80102864: eb 16 jmp 8010287c <iderw+0xbe> sleep(b, &idelock); 80102866: c7 44 24 04 20 b6 10 movl $0x8010b620,0x4(%esp) 8010286d: 80 8010286e: 8b 45 08 mov 0x8(%ebp),%eax 80102871: 89 04 24 mov %eax,(%esp) 80102874: e8 89 23 00 00 call 80104c02 <sleep> 80102879: eb 01 jmp 8010287c <iderw+0xbe> // Start disk if necessary. if(idequeue == b) idestart(b); // Wait for request to finish. while((b->flags & (B_VALID|B_DIRTY)) != B_VALID){ 8010287b: 90 nop 8010287c: 8b 45 08 mov 0x8(%ebp),%eax 8010287f: 8b 00 mov (%eax),%eax 80102881: 83 e0 06 and $0x6,%eax 80102884: 83 f8 02 cmp $0x2,%eax 80102887: 75 dd jne 80102866 <iderw+0xa8> sleep(b, &idelock); } release(&idelock); 80102889: c7 04 24 20 b6 10 80 movl $0x8010b620,(%esp) 80102890: e8 47 27 00 00 call 80104fdc <release> } 80102895: c9 leave 80102896: c3 ret ... 80102898 <ioapicread>: uint data; }; static uint ioapicread(int reg) { 80102898: 55 push %ebp 80102899: 89 e5 mov %esp,%ebp ioapic->reg = reg; 8010289b: a1 54 f8 10 80 mov 0x8010f854,%eax 801028a0: 8b 55 08 mov 0x8(%ebp),%edx 801028a3: 89 10 mov %edx,(%eax) return ioapic->data; 801028a5: a1 54 f8 10 80 mov 0x8010f854,%eax 801028aa: 8b 40 10 mov 0x10(%eax),%eax } 801028ad: 5d pop %ebp 801028ae: c3 ret 801028af <ioapicwrite>: static void ioapicwrite(int reg, uint data) { 801028af: 55 push %ebp 801028b0: 89 e5 mov %esp,%ebp ioapic->reg = reg; 801028b2: a1 54 f8 10 80 mov 0x8010f854,%eax 801028b7: 8b 55 08 mov 0x8(%ebp),%edx 801028ba: 89 10 mov %edx,(%eax) ioapic->data = data; 801028bc: a1 54 f8 10 80 mov 0x8010f854,%eax 801028c1: 8b 55 0c mov 0xc(%ebp),%edx 801028c4: 89 50 10 mov %edx,0x10(%eax) } 801028c7: 5d pop %ebp 801028c8: c3 ret 801028c9 <ioapicinit>: void ioapicinit(void) { 801028c9: 55 push %ebp 801028ca: 89 e5 mov %esp,%ebp 801028cc: 83 ec 28 sub $0x28,%esp int i, id, maxintr; if(!ismp) 801028cf: a1 24 f9 10 80 mov 0x8010f924,%eax 801028d4: 85 c0 test %eax,%eax 801028d6: 0f 84 9f 00 00 00 je 8010297b <ioapicinit+0xb2> return; ioapic = (volatile struct ioapic*)IOAPIC; 801028dc: c7 05 54 f8 10 80 00 movl $0xfec00000,0x8010f854 801028e3: 00 c0 fe maxintr = (ioapicread(REG_VER) >> 16) & 0xFF; 801028e6: c7 04 24 01 00 00 00 movl $0x1,(%esp) 801028ed: e8 a6 ff ff ff call 80102898 <ioapicread> 801028f2: c1 e8 10 shr $0x10,%eax 801028f5: 25 ff 00 00 00 and $0xff,%eax 801028fa: 89 45 f4 mov %eax,-0xc(%ebp) id = ioapicread(REG_ID) >> 24; 801028fd: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80102904: e8 8f ff ff ff call 80102898 <ioapicread> 80102909: c1 e8 18 shr $0x18,%eax 8010290c: 89 45 f0 mov %eax,-0x10(%ebp) if(id != ioapicid) 8010290f: 0f b6 05 20 f9 10 80 movzbl 0x8010f920,%eax 80102916: 0f b6 c0 movzbl %al,%eax 80102919: 3b 45 f0 cmp -0x10(%ebp),%eax 8010291c: 74 0c je 8010292a <ioapicinit+0x61> cprintf("ioapicinit: id isn't equal to ioapicid; not a MP\n"); 8010291e: c7 04 24 b0 87 10 80 movl $0x801087b0,(%esp) 80102925: e8 70 da ff ff call 8010039a <cprintf> // Mark all interrupts edge-triggered, active high, disabled, // and not routed to any CPUs. for(i = 0; i <= maxintr; i++){ 8010292a: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp) 80102931: eb 3e jmp 80102971 <ioapicinit+0xa8> ioapicwrite(REG_TABLE+2*i, INT_DISABLED | (T_IRQ0 + i)); 80102933: 8b 45 ec mov -0x14(%ebp),%eax 80102936: 83 c0 20 add $0x20,%eax 80102939: 0d 00 00 01 00 or $0x10000,%eax 8010293e: 8b 55 ec mov -0x14(%ebp),%edx 80102941: 83 c2 08 add $0x8,%edx 80102944: 01 d2 add %edx,%edx 80102946: 89 44 24 04 mov %eax,0x4(%esp) 8010294a: 89 14 24 mov %edx,(%esp) 8010294d: e8 5d ff ff ff call 801028af <ioapicwrite> ioapicwrite(REG_TABLE+2*i+1, 0); 80102952: 8b 45 ec mov -0x14(%ebp),%eax 80102955: 83 c0 08 add $0x8,%eax 80102958: 01 c0 add %eax,%eax 8010295a: 83 c0 01 add $0x1,%eax 8010295d: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80102964: 00 80102965: 89 04 24 mov %eax,(%esp) 80102968: e8 42 ff ff ff call 801028af <ioapicwrite> if(id != ioapicid) cprintf("ioapicinit: id isn't equal to ioapicid; not a MP\n"); // Mark all interrupts edge-triggered, active high, disabled, // and not routed to any CPUs. for(i = 0; i <= maxintr; i++){ 8010296d: 83 45 ec 01 addl $0x1,-0x14(%ebp) 80102971: 8b 45 ec mov -0x14(%ebp),%eax 80102974: 3b 45 f4 cmp -0xc(%ebp),%eax 80102977: 7e ba jle 80102933 <ioapicinit+0x6a> 80102979: eb 01 jmp 8010297c <ioapicinit+0xb3> ioapicinit(void) { int i, id, maxintr; if(!ismp) return; 8010297b: 90 nop // and not routed to any CPUs. for(i = 0; i <= maxintr; i++){ ioapicwrite(REG_TABLE+2*i, INT_DISABLED | (T_IRQ0 + i)); ioapicwrite(REG_TABLE+2*i+1, 0); } } 8010297c: c9 leave 8010297d: c3 ret 8010297e <ioapicenable>: void ioapicenable(int irq, int cpunum) { 8010297e: 55 push %ebp 8010297f: 89 e5 mov %esp,%ebp 80102981: 83 ec 08 sub $0x8,%esp if(!ismp) 80102984: a1 24 f9 10 80 mov 0x8010f924,%eax 80102989: 85 c0 test %eax,%eax 8010298b: 74 39 je 801029c6 <ioapicenable+0x48> return; // Mark interrupt edge-triggered, active high, // enabled, and routed to the given cpunum, // which happens to be that cpu's APIC ID. ioapicwrite(REG_TABLE+2*irq, T_IRQ0 + irq); 8010298d: 8b 45 08 mov 0x8(%ebp),%eax 80102990: 83 c0 20 add $0x20,%eax 80102993: 8b 55 08 mov 0x8(%ebp),%edx 80102996: 83 c2 08 add $0x8,%edx 80102999: 01 d2 add %edx,%edx 8010299b: 89 44 24 04 mov %eax,0x4(%esp) 8010299f: 89 14 24 mov %edx,(%esp) 801029a2: e8 08 ff ff ff call 801028af <ioapicwrite> ioapicwrite(REG_TABLE+2*irq+1, cpunum << 24); 801029a7: 8b 45 0c mov 0xc(%ebp),%eax 801029aa: c1 e0 18 shl $0x18,%eax 801029ad: 8b 55 08 mov 0x8(%ebp),%edx 801029b0: 83 c2 08 add $0x8,%edx 801029b3: 01 d2 add %edx,%edx 801029b5: 83 c2 01 add $0x1,%edx 801029b8: 89 44 24 04 mov %eax,0x4(%esp) 801029bc: 89 14 24 mov %edx,(%esp) 801029bf: e8 eb fe ff ff call 801028af <ioapicwrite> 801029c4: eb 01 jmp 801029c7 <ioapicenable+0x49> void ioapicenable(int irq, int cpunum) { if(!ismp) return; 801029c6: 90 nop // Mark interrupt edge-triggered, active high, // enabled, and routed to the given cpunum, // which happens to be that cpu's APIC ID. ioapicwrite(REG_TABLE+2*irq, T_IRQ0 + irq); ioapicwrite(REG_TABLE+2*irq+1, cpunum << 24); } 801029c7: c9 leave 801029c8: c3 ret 801029c9: 00 00 add %al,(%eax) ... 801029cc <v2p>: #define KERNBASE 0x80000000 // First kernel virtual address #define KERNLINK (KERNBASE+EXTMEM) // Address where kernel is linked #ifndef __ASSEMBLER__ static inline uint v2p(void *a) { return ((uint) (a)) - KERNBASE; } 801029cc: 55 push %ebp 801029cd: 89 e5 mov %esp,%ebp 801029cf: 8b 45 08 mov 0x8(%ebp),%eax 801029d2: 2d 00 00 00 80 sub $0x80000000,%eax 801029d7: 5d pop %ebp 801029d8: c3 ret 801029d9 <kinit1>: // the pages mapped by entrypgdir on free list. // 2. main() calls kinit2() with the rest of the physical pages // after installing a full page table that maps them on all cores. void kinit1(void *vstart, void *vend) { 801029d9: 55 push %ebp 801029da: 89 e5 mov %esp,%ebp 801029dc: 83 ec 18 sub $0x18,%esp initlock(&kmem.lock, "kmem"); 801029df: c7 44 24 04 e2 87 10 movl $0x801087e2,0x4(%esp) 801029e6: 80 801029e7: c7 04 24 60 f8 10 80 movl $0x8010f860,(%esp) 801029ee: e8 67 25 00 00 call 80104f5a <initlock> kmem.use_lock = 0; 801029f3: c7 05 94 f8 10 80 00 movl $0x0,0x8010f894 801029fa: 00 00 00 freerange(vstart, vend); 801029fd: 8b 45 0c mov 0xc(%ebp),%eax 80102a00: 89 44 24 04 mov %eax,0x4(%esp) 80102a04: 8b 45 08 mov 0x8(%ebp),%eax 80102a07: 89 04 24 mov %eax,(%esp) 80102a0a: e8 26 00 00 00 call 80102a35 <freerange> } 80102a0f: c9 leave 80102a10: c3 ret 80102a11 <kinit2>: void kinit2(void *vstart, void *vend) { 80102a11: 55 push %ebp 80102a12: 89 e5 mov %esp,%ebp 80102a14: 83 ec 18 sub $0x18,%esp freerange(vstart, vend); 80102a17: 8b 45 0c mov 0xc(%ebp),%eax 80102a1a: 89 44 24 04 mov %eax,0x4(%esp) 80102a1e: 8b 45 08 mov 0x8(%ebp),%eax 80102a21: 89 04 24 mov %eax,(%esp) 80102a24: e8 0c 00 00 00 call 80102a35 <freerange> kmem.use_lock = 1; 80102a29: c7 05 94 f8 10 80 01 movl $0x1,0x8010f894 80102a30: 00 00 00 } 80102a33: c9 leave 80102a34: c3 ret 80102a35 <freerange>: void freerange(void *vstart, void *vend) { 80102a35: 55 push %ebp 80102a36: 89 e5 mov %esp,%ebp 80102a38: 83 ec 28 sub $0x28,%esp char *p; p = (char*)PGROUNDUP((uint)vstart); 80102a3b: 8b 45 08 mov 0x8(%ebp),%eax 80102a3e: 05 ff 0f 00 00 add $0xfff,%eax 80102a43: 25 00 f0 ff ff and $0xfffff000,%eax 80102a48: 89 45 f4 mov %eax,-0xc(%ebp) for(; p + PGSIZE <= (char*)vend; p += PGSIZE) 80102a4b: eb 12 jmp 80102a5f <freerange+0x2a> kfree(p); 80102a4d: 8b 45 f4 mov -0xc(%ebp),%eax 80102a50: 89 04 24 mov %eax,(%esp) 80102a53: e8 19 00 00 00 call 80102a71 <kfree> void freerange(void *vstart, void *vend) { char *p; p = (char*)PGROUNDUP((uint)vstart); for(; p + PGSIZE <= (char*)vend; p += PGSIZE) 80102a58: 81 45 f4 00 10 00 00 addl $0x1000,-0xc(%ebp) 80102a5f: 8b 45 f4 mov -0xc(%ebp),%eax 80102a62: 8d 90 00 10 00 00 lea 0x1000(%eax),%edx 80102a68: 8b 45 0c mov 0xc(%ebp),%eax 80102a6b: 39 c2 cmp %eax,%edx 80102a6d: 76 de jbe 80102a4d <freerange+0x18> kfree(p); } 80102a6f: c9 leave 80102a70: c3 ret 80102a71 <kfree>: // which normally should have been returned by a // call to kalloc(). (The exception is when // initializing the allocator; see kinit above.) void kfree(char *v) { 80102a71: 55 push %ebp 80102a72: 89 e5 mov %esp,%ebp 80102a74: 83 ec 28 sub $0x28,%esp struct run *r; if((uint)v % PGSIZE || v < end || v2p(v) >= PHYSTOP) 80102a77: 8b 45 08 mov 0x8(%ebp),%eax 80102a7a: 25 ff 0f 00 00 and $0xfff,%eax 80102a7f: 85 c0 test %eax,%eax 80102a81: 75 1b jne 80102a9e <kfree+0x2d> 80102a83: 81 7d 08 1c 29 11 80 cmpl $0x8011291c,0x8(%ebp) 80102a8a: 72 12 jb 80102a9e <kfree+0x2d> 80102a8c: 8b 45 08 mov 0x8(%ebp),%eax 80102a8f: 89 04 24 mov %eax,(%esp) 80102a92: e8 35 ff ff ff call 801029cc <v2p> 80102a97: 3d ff ff ff 0d cmp $0xdffffff,%eax 80102a9c: 76 0c jbe 80102aaa <kfree+0x39> panic("kfree"); 80102a9e: c7 04 24 e7 87 10 80 movl $0x801087e7,(%esp) 80102aa5: e8 90 da ff ff call 8010053a <panic> // Fill with junk to catch dangling refs. memset(v, 1, PGSIZE); 80102aaa: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 80102ab1: 00 80102ab2: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp) 80102ab9: 00 80102aba: 8b 45 08 mov 0x8(%ebp),%eax 80102abd: 89 04 24 mov %eax,(%esp) 80102ac0: e8 05 27 00 00 call 801051ca <memset> if(kmem.use_lock) 80102ac5: a1 94 f8 10 80 mov 0x8010f894,%eax 80102aca: 85 c0 test %eax,%eax 80102acc: 74 0c je 80102ada <kfree+0x69> acquire(&kmem.lock); 80102ace: c7 04 24 60 f8 10 80 movl $0x8010f860,(%esp) 80102ad5: e8 a1 24 00 00 call 80104f7b <acquire> r = (struct run*)v; 80102ada: 8b 45 08 mov 0x8(%ebp),%eax 80102add: 89 45 f4 mov %eax,-0xc(%ebp) r->next = kmem.freelist; 80102ae0: 8b 15 98 f8 10 80 mov 0x8010f898,%edx 80102ae6: 8b 45 f4 mov -0xc(%ebp),%eax 80102ae9: 89 10 mov %edx,(%eax) kmem.freelist = r; 80102aeb: 8b 45 f4 mov -0xc(%ebp),%eax 80102aee: a3 98 f8 10 80 mov %eax,0x8010f898 if(kmem.use_lock) 80102af3: a1 94 f8 10 80 mov 0x8010f894,%eax 80102af8: 85 c0 test %eax,%eax 80102afa: 74 0c je 80102b08 <kfree+0x97> release(&kmem.lock); 80102afc: c7 04 24 60 f8 10 80 movl $0x8010f860,(%esp) 80102b03: e8 d4 24 00 00 call 80104fdc <release> } 80102b08: c9 leave 80102b09: c3 ret 80102b0a <kalloc>: // Allocate one 4096-byte page of physical memory. // Returns a pointer that the kernel can use. // Returns 0 if the memory cannot be allocated. char* kalloc(void) { 80102b0a: 55 push %ebp 80102b0b: 89 e5 mov %esp,%ebp 80102b0d: 83 ec 28 sub $0x28,%esp struct run *r; if(kmem.use_lock) 80102b10: a1 94 f8 10 80 mov 0x8010f894,%eax 80102b15: 85 c0 test %eax,%eax 80102b17: 74 0c je 80102b25 <kalloc+0x1b> acquire(&kmem.lock); 80102b19: c7 04 24 60 f8 10 80 movl $0x8010f860,(%esp) 80102b20: e8 56 24 00 00 call 80104f7b <acquire> r = kmem.freelist; 80102b25: a1 98 f8 10 80 mov 0x8010f898,%eax 80102b2a: 89 45 f4 mov %eax,-0xc(%ebp) if(r) 80102b2d: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 80102b31: 74 0a je 80102b3d <kalloc+0x33> kmem.freelist = r->next; 80102b33: 8b 45 f4 mov -0xc(%ebp),%eax 80102b36: 8b 00 mov (%eax),%eax 80102b38: a3 98 f8 10 80 mov %eax,0x8010f898 if(kmem.use_lock) 80102b3d: a1 94 f8 10 80 mov 0x8010f894,%eax 80102b42: 85 c0 test %eax,%eax 80102b44: 74 0c je 80102b52 <kalloc+0x48> release(&kmem.lock); 80102b46: c7 04 24 60 f8 10 80 movl $0x8010f860,(%esp) 80102b4d: e8 8a 24 00 00 call 80104fdc <release> return (char*)r; 80102b52: 8b 45 f4 mov -0xc(%ebp),%eax } 80102b55: c9 leave 80102b56: c3 ret ... 80102b58 <inb>: // Routines to let C code use special x86 instructions. static inline uchar inb(ushort port) { 80102b58: 55 push %ebp 80102b59: 89 e5 mov %esp,%ebp 80102b5b: 83 ec 14 sub $0x14,%esp 80102b5e: 8b 45 08 mov 0x8(%ebp),%eax 80102b61: 66 89 45 ec mov %ax,-0x14(%ebp) uchar data; asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 80102b65: 0f b7 45 ec movzwl -0x14(%ebp),%eax 80102b69: 89 c2 mov %eax,%edx 80102b6b: ec in (%dx),%al 80102b6c: 88 45 ff mov %al,-0x1(%ebp) return data; 80102b6f: 0f b6 45 ff movzbl -0x1(%ebp),%eax } 80102b73: c9 leave 80102b74: c3 ret 80102b75 <kbdgetc>: #include "defs.h" #include "kbd.h" int kbdgetc(void) { 80102b75: 55 push %ebp 80102b76: 89 e5 mov %esp,%ebp 80102b78: 83 ec 14 sub $0x14,%esp static uchar *charcode[4] = { normalmap, shiftmap, ctlmap, ctlmap }; uint st, data, c; st = inb(KBSTATP); 80102b7b: c7 04 24 64 00 00 00 movl $0x64,(%esp) 80102b82: e8 d1 ff ff ff call 80102b58 <inb> 80102b87: 0f b6 c0 movzbl %al,%eax 80102b8a: 89 45 f4 mov %eax,-0xc(%ebp) if((st & KBS_DIB) == 0) 80102b8d: 8b 45 f4 mov -0xc(%ebp),%eax 80102b90: 83 e0 01 and $0x1,%eax 80102b93: 85 c0 test %eax,%eax 80102b95: 75 0a jne 80102ba1 <kbdgetc+0x2c> return -1; 80102b97: b8 ff ff ff ff mov $0xffffffff,%eax 80102b9c: e9 20 01 00 00 jmp 80102cc1 <kbdgetc+0x14c> data = inb(KBDATAP); 80102ba1: c7 04 24 60 00 00 00 movl $0x60,(%esp) 80102ba8: e8 ab ff ff ff call 80102b58 <inb> 80102bad: 0f b6 c0 movzbl %al,%eax 80102bb0: 89 45 f8 mov %eax,-0x8(%ebp) if(data == 0xE0){ 80102bb3: 81 7d f8 e0 00 00 00 cmpl $0xe0,-0x8(%ebp) 80102bba: 75 17 jne 80102bd3 <kbdgetc+0x5e> shift |= E0ESC; 80102bbc: a1 5c b6 10 80 mov 0x8010b65c,%eax 80102bc1: 83 c8 40 or $0x40,%eax 80102bc4: a3 5c b6 10 80 mov %eax,0x8010b65c return 0; 80102bc9: b8 00 00 00 00 mov $0x0,%eax 80102bce: e9 ee 00 00 00 jmp 80102cc1 <kbdgetc+0x14c> } else if(data & 0x80){ 80102bd3: 8b 45 f8 mov -0x8(%ebp),%eax 80102bd6: 25 80 00 00 00 and $0x80,%eax 80102bdb: 85 c0 test %eax,%eax 80102bdd: 74 44 je 80102c23 <kbdgetc+0xae> // Key released data = (shift & E0ESC ? data : data & 0x7F); 80102bdf: a1 5c b6 10 80 mov 0x8010b65c,%eax 80102be4: 83 e0 40 and $0x40,%eax 80102be7: 85 c0 test %eax,%eax 80102be9: 75 08 jne 80102bf3 <kbdgetc+0x7e> 80102beb: 8b 45 f8 mov -0x8(%ebp),%eax 80102bee: 83 e0 7f and $0x7f,%eax 80102bf1: eb 03 jmp 80102bf6 <kbdgetc+0x81> 80102bf3: 8b 45 f8 mov -0x8(%ebp),%eax 80102bf6: 89 45 f8 mov %eax,-0x8(%ebp) shift &= ~(shiftcode[data] | E0ESC); 80102bf9: 8b 45 f8 mov -0x8(%ebp),%eax 80102bfc: 0f b6 80 20 90 10 80 movzbl -0x7fef6fe0(%eax),%eax 80102c03: 83 c8 40 or $0x40,%eax 80102c06: 0f b6 c0 movzbl %al,%eax 80102c09: f7 d0 not %eax 80102c0b: 89 c2 mov %eax,%edx 80102c0d: a1 5c b6 10 80 mov 0x8010b65c,%eax 80102c12: 21 d0 and %edx,%eax 80102c14: a3 5c b6 10 80 mov %eax,0x8010b65c return 0; 80102c19: b8 00 00 00 00 mov $0x0,%eax 80102c1e: e9 9e 00 00 00 jmp 80102cc1 <kbdgetc+0x14c> } else if(shift & E0ESC){ 80102c23: a1 5c b6 10 80 mov 0x8010b65c,%eax 80102c28: 83 e0 40 and $0x40,%eax 80102c2b: 85 c0 test %eax,%eax 80102c2d: 74 14 je 80102c43 <kbdgetc+0xce> // Last character was an E0 escape; or with 0x80 data |= 0x80; 80102c2f: 81 4d f8 80 00 00 00 orl $0x80,-0x8(%ebp) shift &= ~E0ESC; 80102c36: a1 5c b6 10 80 mov 0x8010b65c,%eax 80102c3b: 83 e0 bf and $0xffffffbf,%eax 80102c3e: a3 5c b6 10 80 mov %eax,0x8010b65c } shift |= shiftcode[data]; 80102c43: 8b 45 f8 mov -0x8(%ebp),%eax 80102c46: 0f b6 80 20 90 10 80 movzbl -0x7fef6fe0(%eax),%eax 80102c4d: 0f b6 d0 movzbl %al,%edx 80102c50: a1 5c b6 10 80 mov 0x8010b65c,%eax 80102c55: 09 d0 or %edx,%eax 80102c57: a3 5c b6 10 80 mov %eax,0x8010b65c shift ^= togglecode[data]; 80102c5c: 8b 45 f8 mov -0x8(%ebp),%eax 80102c5f: 0f b6 80 20 91 10 80 movzbl -0x7fef6ee0(%eax),%eax 80102c66: 0f b6 d0 movzbl %al,%edx 80102c69: a1 5c b6 10 80 mov 0x8010b65c,%eax 80102c6e: 31 d0 xor %edx,%eax 80102c70: a3 5c b6 10 80 mov %eax,0x8010b65c c = charcode[shift & (CTL | SHIFT)][data]; 80102c75: a1 5c b6 10 80 mov 0x8010b65c,%eax 80102c7a: 83 e0 03 and $0x3,%eax 80102c7d: 8b 04 85 20 95 10 80 mov -0x7fef6ae0(,%eax,4),%eax 80102c84: 03 45 f8 add -0x8(%ebp),%eax 80102c87: 0f b6 00 movzbl (%eax),%eax 80102c8a: 0f b6 c0 movzbl %al,%eax 80102c8d: 89 45 fc mov %eax,-0x4(%ebp) if(shift & CAPSLOCK){ 80102c90: a1 5c b6 10 80 mov 0x8010b65c,%eax 80102c95: 83 e0 08 and $0x8,%eax 80102c98: 85 c0 test %eax,%eax 80102c9a: 74 22 je 80102cbe <kbdgetc+0x149> if('a' <= c && c <= 'z') 80102c9c: 83 7d fc 60 cmpl $0x60,-0x4(%ebp) 80102ca0: 76 0c jbe 80102cae <kbdgetc+0x139> 80102ca2: 83 7d fc 7a cmpl $0x7a,-0x4(%ebp) 80102ca6: 77 06 ja 80102cae <kbdgetc+0x139> c += 'A' - 'a'; 80102ca8: 83 6d fc 20 subl $0x20,-0x4(%ebp) shift |= shiftcode[data]; shift ^= togglecode[data]; c = charcode[shift & (CTL | SHIFT)][data]; if(shift & CAPSLOCK){ if('a' <= c && c <= 'z') 80102cac: eb 10 jmp 80102cbe <kbdgetc+0x149> c += 'A' - 'a'; else if('A' <= c && c <= 'Z') 80102cae: 83 7d fc 40 cmpl $0x40,-0x4(%ebp) 80102cb2: 76 0a jbe 80102cbe <kbdgetc+0x149> 80102cb4: 83 7d fc 5a cmpl $0x5a,-0x4(%ebp) 80102cb8: 77 04 ja 80102cbe <kbdgetc+0x149> c += 'a' - 'A'; 80102cba: 83 45 fc 20 addl $0x20,-0x4(%ebp) } return c; 80102cbe: 8b 45 fc mov -0x4(%ebp),%eax } 80102cc1: c9 leave 80102cc2: c3 ret 80102cc3 <kbdintr>: void kbdintr(void) { 80102cc3: 55 push %ebp 80102cc4: 89 e5 mov %esp,%ebp 80102cc6: 83 ec 18 sub $0x18,%esp consoleintr(kbdgetc); 80102cc9: c7 04 24 75 2b 10 80 movl $0x80102b75,(%esp) 80102cd0: e8 d6 da ff ff call 801007ab <consoleintr> } 80102cd5: c9 leave 80102cd6: c3 ret ... 80102cd8 <outb>: "memory", "cc"); } static inline void outb(ushort port, uchar data) { 80102cd8: 55 push %ebp 80102cd9: 89 e5 mov %esp,%ebp 80102cdb: 83 ec 08 sub $0x8,%esp 80102cde: 8b 55 08 mov 0x8(%ebp),%edx 80102ce1: 8b 45 0c mov 0xc(%ebp),%eax 80102ce4: 66 89 55 fc mov %dx,-0x4(%ebp) 80102ce8: 88 45 f8 mov %al,-0x8(%ebp) asm volatile("out %0,%1" : : "a" (data), "d" (port)); 80102ceb: 0f b6 45 f8 movzbl -0x8(%ebp),%eax 80102cef: 0f b7 55 fc movzwl -0x4(%ebp),%edx 80102cf3: ee out %al,(%dx) } 80102cf4: c9 leave 80102cf5: c3 ret 80102cf6 <readeflags>: asm volatile("ltr %0" : : "r" (sel)); } static inline uint readeflags(void) { 80102cf6: 55 push %ebp 80102cf7: 89 e5 mov %esp,%ebp 80102cf9: 83 ec 10 sub $0x10,%esp uint eflags; asm volatile("pushfl; popl %0" : "=r" (eflags)); 80102cfc: 9c pushf 80102cfd: 58 pop %eax 80102cfe: 89 45 fc mov %eax,-0x4(%ebp) return eflags; 80102d01: 8b 45 fc mov -0x4(%ebp),%eax } 80102d04: c9 leave 80102d05: c3 ret 80102d06 <lapicw>: volatile uint *lapic; // Initialized in mp.c static void lapicw(int index, int value) { 80102d06: 55 push %ebp 80102d07: 89 e5 mov %esp,%ebp lapic[index] = value; 80102d09: a1 9c f8 10 80 mov 0x8010f89c,%eax 80102d0e: 8b 55 08 mov 0x8(%ebp),%edx 80102d11: c1 e2 02 shl $0x2,%edx 80102d14: 8d 14 10 lea (%eax,%edx,1),%edx 80102d17: 8b 45 0c mov 0xc(%ebp),%eax 80102d1a: 89 02 mov %eax,(%edx) lapic[ID]; // wait for write to finish, by reading 80102d1c: a1 9c f8 10 80 mov 0x8010f89c,%eax 80102d21: 83 c0 20 add $0x20,%eax 80102d24: 8b 00 mov (%eax),%eax } 80102d26: 5d pop %ebp 80102d27: c3 ret 80102d28 <lapicinit>: //PAGEBREAK! void lapicinit(void) { 80102d28: 55 push %ebp 80102d29: 89 e5 mov %esp,%ebp 80102d2b: 83 ec 08 sub $0x8,%esp if(!lapic) 80102d2e: a1 9c f8 10 80 mov 0x8010f89c,%eax 80102d33: 85 c0 test %eax,%eax 80102d35: 0f 84 46 01 00 00 je 80102e81 <lapicinit+0x159> return; // Enable local APIC; set spurious interrupt vector. lapicw(SVR, ENABLE | (T_IRQ0 + IRQ_SPURIOUS)); 80102d3b: c7 44 24 04 3f 01 00 movl $0x13f,0x4(%esp) 80102d42: 00 80102d43: c7 04 24 3c 00 00 00 movl $0x3c,(%esp) 80102d4a: e8 b7 ff ff ff call 80102d06 <lapicw> // The timer repeatedly counts down at bus frequency // from lapic[TICR] and then issues an interrupt. // If xv6 cared more about precise timekeeping, // TICR would be calibrated using an external time source. lapicw(TDCR, X1); 80102d4f: c7 44 24 04 0b 00 00 movl $0xb,0x4(%esp) 80102d56: 00 80102d57: c7 04 24 f8 00 00 00 movl $0xf8,(%esp) 80102d5e: e8 a3 ff ff ff call 80102d06 <lapicw> lapicw(TIMER, PERIODIC | (T_IRQ0 + IRQ_TIMER)); 80102d63: c7 44 24 04 20 00 02 movl $0x20020,0x4(%esp) 80102d6a: 00 80102d6b: c7 04 24 c8 00 00 00 movl $0xc8,(%esp) 80102d72: e8 8f ff ff ff call 80102d06 <lapicw> lapicw(TICR, 10000000); 80102d77: c7 44 24 04 80 96 98 movl $0x989680,0x4(%esp) 80102d7e: 00 80102d7f: c7 04 24 e0 00 00 00 movl $0xe0,(%esp) 80102d86: e8 7b ff ff ff call 80102d06 <lapicw> // Disable logical interrupt lines. lapicw(LINT0, MASKED); 80102d8b: c7 44 24 04 00 00 01 movl $0x10000,0x4(%esp) 80102d92: 00 80102d93: c7 04 24 d4 00 00 00 movl $0xd4,(%esp) 80102d9a: e8 67 ff ff ff call 80102d06 <lapicw> lapicw(LINT1, MASKED); 80102d9f: c7 44 24 04 00 00 01 movl $0x10000,0x4(%esp) 80102da6: 00 80102da7: c7 04 24 d8 00 00 00 movl $0xd8,(%esp) 80102dae: e8 53 ff ff ff call 80102d06 <lapicw> // Disable performance counter overflow interrupts // on machines that provide that interrupt entry. if(((lapic[VER]>>16) & 0xFF) >= 4) 80102db3: a1 9c f8 10 80 mov 0x8010f89c,%eax 80102db8: 83 c0 30 add $0x30,%eax 80102dbb: 8b 00 mov (%eax),%eax 80102dbd: c1 e8 10 shr $0x10,%eax 80102dc0: 25 ff 00 00 00 and $0xff,%eax 80102dc5: 83 f8 03 cmp $0x3,%eax 80102dc8: 76 14 jbe 80102dde <lapicinit+0xb6> lapicw(PCINT, MASKED); 80102dca: c7 44 24 04 00 00 01 movl $0x10000,0x4(%esp) 80102dd1: 00 80102dd2: c7 04 24 d0 00 00 00 movl $0xd0,(%esp) 80102dd9: e8 28 ff ff ff call 80102d06 <lapicw> // Map error interrupt to IRQ_ERROR. lapicw(ERROR, T_IRQ0 + IRQ_ERROR); 80102dde: c7 44 24 04 33 00 00 movl $0x33,0x4(%esp) 80102de5: 00 80102de6: c7 04 24 dc 00 00 00 movl $0xdc,(%esp) 80102ded: e8 14 ff ff ff call 80102d06 <lapicw> // Clear error status register (requires back-to-back writes). lapicw(ESR, 0); 80102df2: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80102df9: 00 80102dfa: c7 04 24 a0 00 00 00 movl $0xa0,(%esp) 80102e01: e8 00 ff ff ff call 80102d06 <lapicw> lapicw(ESR, 0); 80102e06: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80102e0d: 00 80102e0e: c7 04 24 a0 00 00 00 movl $0xa0,(%esp) 80102e15: e8 ec fe ff ff call 80102d06 <lapicw> // Ack any outstanding interrupts. lapicw(EOI, 0); 80102e1a: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80102e21: 00 80102e22: c7 04 24 2c 00 00 00 movl $0x2c,(%esp) 80102e29: e8 d8 fe ff ff call 80102d06 <lapicw> // Send an Init Level De-Assert to synchronise arbitration ID's. lapicw(ICRHI, 0); 80102e2e: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80102e35: 00 80102e36: c7 04 24 c4 00 00 00 movl $0xc4,(%esp) 80102e3d: e8 c4 fe ff ff call 80102d06 <lapicw> lapicw(ICRLO, BCAST | INIT | LEVEL); 80102e42: c7 44 24 04 00 85 08 movl $0x88500,0x4(%esp) 80102e49: 00 80102e4a: c7 04 24 c0 00 00 00 movl $0xc0,(%esp) 80102e51: e8 b0 fe ff ff call 80102d06 <lapicw> while(lapic[ICRLO] & DELIVS) 80102e56: a1 9c f8 10 80 mov 0x8010f89c,%eax 80102e5b: 05 00 03 00 00 add $0x300,%eax 80102e60: 8b 00 mov (%eax),%eax 80102e62: 25 00 10 00 00 and $0x1000,%eax 80102e67: 85 c0 test %eax,%eax 80102e69: 75 eb jne 80102e56 <lapicinit+0x12e> ; // Enable interrupts on the APIC (but not on the processor). lapicw(TPR, 0); 80102e6b: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80102e72: 00 80102e73: c7 04 24 20 00 00 00 movl $0x20,(%esp) 80102e7a: e8 87 fe ff ff call 80102d06 <lapicw> 80102e7f: eb 01 jmp 80102e82 <lapicinit+0x15a> void lapicinit(void) { if(!lapic) return; 80102e81: 90 nop while(lapic[ICRLO] & DELIVS) ; // Enable interrupts on the APIC (but not on the processor). lapicw(TPR, 0); } 80102e82: c9 leave 80102e83: c3 ret 80102e84 <cpunum>: int cpunum(void) { 80102e84: 55 push %ebp 80102e85: 89 e5 mov %esp,%ebp 80102e87: 83 ec 18 sub $0x18,%esp // Cannot call cpu when interrupts are enabled: // result not guaranteed to last long enough to be used! // Would prefer to panic but even printing is chancy here: // almost everything, including cprintf and panic, calls cpu, // often indirectly through acquire and release. if(readeflags()&FL_IF){ 80102e8a: e8 67 fe ff ff call 80102cf6 <readeflags> 80102e8f: 25 00 02 00 00 and $0x200,%eax 80102e94: 85 c0 test %eax,%eax 80102e96: 74 29 je 80102ec1 <cpunum+0x3d> static int n; if(n++ == 0) 80102e98: a1 60 b6 10 80 mov 0x8010b660,%eax 80102e9d: 85 c0 test %eax,%eax 80102e9f: 0f 94 c2 sete %dl 80102ea2: 83 c0 01 add $0x1,%eax 80102ea5: a3 60 b6 10 80 mov %eax,0x8010b660 80102eaa: 84 d2 test %dl,%dl 80102eac: 74 13 je 80102ec1 <cpunum+0x3d> cprintf("cpu called from %x with interrupts enabled\n", 80102eae: 8b 45 04 mov 0x4(%ebp),%eax 80102eb1: 89 44 24 04 mov %eax,0x4(%esp) 80102eb5: c7 04 24 f0 87 10 80 movl $0x801087f0,(%esp) 80102ebc: e8 d9 d4 ff ff call 8010039a <cprintf> __builtin_return_address(0)); } if(lapic) 80102ec1: a1 9c f8 10 80 mov 0x8010f89c,%eax 80102ec6: 85 c0 test %eax,%eax 80102ec8: 74 0f je 80102ed9 <cpunum+0x55> return lapic[ID]>>24; 80102eca: a1 9c f8 10 80 mov 0x8010f89c,%eax 80102ecf: 83 c0 20 add $0x20,%eax 80102ed2: 8b 00 mov (%eax),%eax 80102ed4: c1 e8 18 shr $0x18,%eax 80102ed7: eb 05 jmp 80102ede <cpunum+0x5a> return 0; 80102ed9: b8 00 00 00 00 mov $0x0,%eax } 80102ede: c9 leave 80102edf: c3 ret 80102ee0 <lapiceoi>: // Acknowledge interrupt. void lapiceoi(void) { 80102ee0: 55 push %ebp 80102ee1: 89 e5 mov %esp,%ebp 80102ee3: 83 ec 08 sub $0x8,%esp if(lapic) 80102ee6: a1 9c f8 10 80 mov 0x8010f89c,%eax 80102eeb: 85 c0 test %eax,%eax 80102eed: 74 14 je 80102f03 <lapiceoi+0x23> lapicw(EOI, 0); 80102eef: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80102ef6: 00 80102ef7: c7 04 24 2c 00 00 00 movl $0x2c,(%esp) 80102efe: e8 03 fe ff ff call 80102d06 <lapicw> } 80102f03: c9 leave 80102f04: c3 ret 80102f05 <microdelay>: // Spin for a given number of microseconds. // On real hardware would want to tune this dynamically. void microdelay(int us) { 80102f05: 55 push %ebp 80102f06: 89 e5 mov %esp,%ebp } 80102f08: 5d pop %ebp 80102f09: c3 ret 80102f0a <lapicstartap>: // Start additional processor running entry code at addr. // See Appendix B of MultiProcessor Specification. void lapicstartap(uchar apicid, uint addr) { 80102f0a: 55 push %ebp 80102f0b: 89 e5 mov %esp,%ebp 80102f0d: 83 ec 1c sub $0x1c,%esp 80102f10: 8b 45 08 mov 0x8(%ebp),%eax 80102f13: 88 45 ec mov %al,-0x14(%ebp) ushort *wrv; // "The BSP must initialize CMOS shutdown code to 0AH // and the warm reset vector (DWORD based at 40:67) to point at // the AP startup code prior to the [universal startup algorithm]." outb(IO_RTC, 0xF); // offset 0xF is shutdown code 80102f16: c7 44 24 04 0f 00 00 movl $0xf,0x4(%esp) 80102f1d: 00 80102f1e: c7 04 24 70 00 00 00 movl $0x70,(%esp) 80102f25: e8 ae fd ff ff call 80102cd8 <outb> outb(IO_RTC+1, 0x0A); 80102f2a: c7 44 24 04 0a 00 00 movl $0xa,0x4(%esp) 80102f31: 00 80102f32: c7 04 24 71 00 00 00 movl $0x71,(%esp) 80102f39: e8 9a fd ff ff call 80102cd8 <outb> wrv = (ushort*)P2V((0x40<<4 | 0x67)); // Warm reset vector 80102f3e: c7 45 fc 67 04 00 80 movl $0x80000467,-0x4(%ebp) wrv[0] = 0; 80102f45: 8b 45 fc mov -0x4(%ebp),%eax 80102f48: 66 c7 00 00 00 movw $0x0,(%eax) wrv[1] = addr >> 4; 80102f4d: 8b 45 fc mov -0x4(%ebp),%eax 80102f50: 8d 50 02 lea 0x2(%eax),%edx 80102f53: 8b 45 0c mov 0xc(%ebp),%eax 80102f56: c1 e8 04 shr $0x4,%eax 80102f59: 66 89 02 mov %ax,(%edx) // "Universal startup algorithm." // Send INIT (level-triggered) interrupt to reset other CPU. lapicw(ICRHI, apicid<<24); 80102f5c: 0f b6 45 ec movzbl -0x14(%ebp),%eax 80102f60: c1 e0 18 shl $0x18,%eax 80102f63: 89 44 24 04 mov %eax,0x4(%esp) 80102f67: c7 04 24 c4 00 00 00 movl $0xc4,(%esp) 80102f6e: e8 93 fd ff ff call 80102d06 <lapicw> lapicw(ICRLO, INIT | LEVEL | ASSERT); 80102f73: c7 44 24 04 00 c5 00 movl $0xc500,0x4(%esp) 80102f7a: 00 80102f7b: c7 04 24 c0 00 00 00 movl $0xc0,(%esp) 80102f82: e8 7f fd ff ff call 80102d06 <lapicw> microdelay(200); 80102f87: c7 04 24 c8 00 00 00 movl $0xc8,(%esp) 80102f8e: e8 72 ff ff ff call 80102f05 <microdelay> lapicw(ICRLO, INIT | LEVEL); 80102f93: c7 44 24 04 00 85 00 movl $0x8500,0x4(%esp) 80102f9a: 00 80102f9b: c7 04 24 c0 00 00 00 movl $0xc0,(%esp) 80102fa2: e8 5f fd ff ff call 80102d06 <lapicw> microdelay(100); // should be 10ms, but too slow in Bochs! 80102fa7: c7 04 24 64 00 00 00 movl $0x64,(%esp) 80102fae: e8 52 ff ff ff call 80102f05 <microdelay> // Send startup IPI (twice!) to enter code. // Regular hardware is supposed to only accept a STARTUP // when it is in the halted state due to an INIT. So the second // should be ignored, but it is part of the official Intel algorithm. // Bochs complains about the second one. Too bad for Bochs. for(i = 0; i < 2; i++){ 80102fb3: c7 45 f8 00 00 00 00 movl $0x0,-0x8(%ebp) 80102fba: eb 40 jmp 80102ffc <lapicstartap+0xf2> lapicw(ICRHI, apicid<<24); 80102fbc: 0f b6 45 ec movzbl -0x14(%ebp),%eax 80102fc0: c1 e0 18 shl $0x18,%eax 80102fc3: 89 44 24 04 mov %eax,0x4(%esp) 80102fc7: c7 04 24 c4 00 00 00 movl $0xc4,(%esp) 80102fce: e8 33 fd ff ff call 80102d06 <lapicw> lapicw(ICRLO, STARTUP | (addr>>12)); 80102fd3: 8b 45 0c mov 0xc(%ebp),%eax 80102fd6: c1 e8 0c shr $0xc,%eax 80102fd9: 80 cc 06 or $0x6,%ah 80102fdc: 89 44 24 04 mov %eax,0x4(%esp) 80102fe0: c7 04 24 c0 00 00 00 movl $0xc0,(%esp) 80102fe7: e8 1a fd ff ff call 80102d06 <lapicw> microdelay(200); 80102fec: c7 04 24 c8 00 00 00 movl $0xc8,(%esp) 80102ff3: e8 0d ff ff ff call 80102f05 <microdelay> // Send startup IPI (twice!) to enter code. // Regular hardware is supposed to only accept a STARTUP // when it is in the halted state due to an INIT. So the second // should be ignored, but it is part of the official Intel algorithm. // Bochs complains about the second one. Too bad for Bochs. for(i = 0; i < 2; i++){ 80102ff8: 83 45 f8 01 addl $0x1,-0x8(%ebp) 80102ffc: 83 7d f8 01 cmpl $0x1,-0x8(%ebp) 80103000: 7e ba jle 80102fbc <lapicstartap+0xb2> lapicw(ICRHI, apicid<<24); lapicw(ICRLO, STARTUP | (addr>>12)); microdelay(200); } } 80103002: c9 leave 80103003: c3 ret 80103004 <initlog>: static void recover_from_log(void); void initlog(void) { 80103004: 55 push %ebp 80103005: 89 e5 mov %esp,%ebp 80103007: 83 ec 28 sub $0x28,%esp if (sizeof(struct logheader) >= BSIZE) 8010300a: 90 nop panic("initlog: too big logheader"); struct superblock sb; initlock(&log.lock, "log"); 8010300b: c7 44 24 04 1c 88 10 movl $0x8010881c,0x4(%esp) 80103012: 80 80103013: c7 04 24 a0 f8 10 80 movl $0x8010f8a0,(%esp) 8010301a: e8 3b 1f 00 00 call 80104f5a <initlock> readsb(ROOTDEV, &sb); 8010301f: 8d 45 e8 lea -0x18(%ebp),%eax 80103022: 89 44 24 04 mov %eax,0x4(%esp) 80103026: c7 04 24 01 00 00 00 movl $0x1,(%esp) 8010302d: e8 c2 e2 ff ff call 801012f4 <readsb> log.start = sb.size - sb.nlog; 80103032: 8b 55 e8 mov -0x18(%ebp),%edx 80103035: 8b 45 f4 mov -0xc(%ebp),%eax 80103038: 89 d1 mov %edx,%ecx 8010303a: 29 c1 sub %eax,%ecx 8010303c: 89 c8 mov %ecx,%eax 8010303e: a3 d4 f8 10 80 mov %eax,0x8010f8d4 log.size = sb.nlog; 80103043: 8b 45 f4 mov -0xc(%ebp),%eax 80103046: a3 d8 f8 10 80 mov %eax,0x8010f8d8 log.dev = ROOTDEV; 8010304b: c7 05 e0 f8 10 80 01 movl $0x1,0x8010f8e0 80103052: 00 00 00 recover_from_log(); 80103055: e8 97 01 00 00 call 801031f1 <recover_from_log> } 8010305a: c9 leave 8010305b: c3 ret 8010305c <install_trans>: // Copy committed blocks from log to their home location static void install_trans(void) { 8010305c: 55 push %ebp 8010305d: 89 e5 mov %esp,%ebp 8010305f: 83 ec 28 sub $0x28,%esp int tail; for (tail = 0; tail < log.lh.n; tail++) { 80103062: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp) 80103069: e9 89 00 00 00 jmp 801030f7 <install_trans+0x9b> struct buf *lbuf = bread(log.dev, log.start+tail+1); // read log block 8010306e: a1 d4 f8 10 80 mov 0x8010f8d4,%eax 80103073: 03 45 ec add -0x14(%ebp),%eax 80103076: 83 c0 01 add $0x1,%eax 80103079: 89 c2 mov %eax,%edx 8010307b: a1 e0 f8 10 80 mov 0x8010f8e0,%eax 80103080: 89 54 24 04 mov %edx,0x4(%esp) 80103084: 89 04 24 mov %eax,(%esp) 80103087: e8 1b d1 ff ff call 801001a7 <bread> 8010308c: 89 45 f0 mov %eax,-0x10(%ebp) struct buf *dbuf = bread(log.dev, log.lh.sector[tail]); // read dst 8010308f: 8b 45 ec mov -0x14(%ebp),%eax 80103092: 83 c0 10 add $0x10,%eax 80103095: 8b 04 85 a8 f8 10 80 mov -0x7fef0758(,%eax,4),%eax 8010309c: 89 c2 mov %eax,%edx 8010309e: a1 e0 f8 10 80 mov 0x8010f8e0,%eax 801030a3: 89 54 24 04 mov %edx,0x4(%esp) 801030a7: 89 04 24 mov %eax,(%esp) 801030aa: e8 f8 d0 ff ff call 801001a7 <bread> 801030af: 89 45 f4 mov %eax,-0xc(%ebp) memmove(dbuf->data, lbuf->data, BSIZE); // copy block to dst 801030b2: 8b 45 f0 mov -0x10(%ebp),%eax 801030b5: 8d 50 18 lea 0x18(%eax),%edx 801030b8: 8b 45 f4 mov -0xc(%ebp),%eax 801030bb: 83 c0 18 add $0x18,%eax 801030be: c7 44 24 08 00 02 00 movl $0x200,0x8(%esp) 801030c5: 00 801030c6: 89 54 24 04 mov %edx,0x4(%esp) 801030ca: 89 04 24 mov %eax,(%esp) 801030cd: e8 cb 21 00 00 call 8010529d <memmove> bwrite(dbuf); // write dst to disk 801030d2: 8b 45 f4 mov -0xc(%ebp),%eax 801030d5: 89 04 24 mov %eax,(%esp) 801030d8: e8 01 d1 ff ff call 801001de <bwrite> brelse(lbuf); 801030dd: 8b 45 f0 mov -0x10(%ebp),%eax 801030e0: 89 04 24 mov %eax,(%esp) 801030e3: e8 30 d1 ff ff call 80100218 <brelse> brelse(dbuf); 801030e8: 8b 45 f4 mov -0xc(%ebp),%eax 801030eb: 89 04 24 mov %eax,(%esp) 801030ee: e8 25 d1 ff ff call 80100218 <brelse> static void install_trans(void) { int tail; for (tail = 0; tail < log.lh.n; tail++) { 801030f3: 83 45 ec 01 addl $0x1,-0x14(%ebp) 801030f7: a1 e4 f8 10 80 mov 0x8010f8e4,%eax 801030fc: 3b 45 ec cmp -0x14(%ebp),%eax 801030ff: 0f 8f 69 ff ff ff jg 8010306e <install_trans+0x12> memmove(dbuf->data, lbuf->data, BSIZE); // copy block to dst bwrite(dbuf); // write dst to disk brelse(lbuf); brelse(dbuf); } } 80103105: c9 leave 80103106: c3 ret 80103107 <read_head>: // Read the log header from disk into the in-memory log header static void read_head(void) { 80103107: 55 push %ebp 80103108: 89 e5 mov %esp,%ebp 8010310a: 83 ec 28 sub $0x28,%esp struct buf *buf = bread(log.dev, log.start); 8010310d: a1 d4 f8 10 80 mov 0x8010f8d4,%eax 80103112: 89 c2 mov %eax,%edx 80103114: a1 e0 f8 10 80 mov 0x8010f8e0,%eax 80103119: 89 54 24 04 mov %edx,0x4(%esp) 8010311d: 89 04 24 mov %eax,(%esp) 80103120: e8 82 d0 ff ff call 801001a7 <bread> 80103125: 89 45 ec mov %eax,-0x14(%ebp) struct logheader *lh = (struct logheader *) (buf->data); 80103128: 8b 45 ec mov -0x14(%ebp),%eax 8010312b: 83 c0 18 add $0x18,%eax 8010312e: 89 45 f0 mov %eax,-0x10(%ebp) int i; log.lh.n = lh->n; 80103131: 8b 45 f0 mov -0x10(%ebp),%eax 80103134: 8b 00 mov (%eax),%eax 80103136: a3 e4 f8 10 80 mov %eax,0x8010f8e4 for (i = 0; i < log.lh.n; i++) { 8010313b: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) 80103142: eb 1b jmp 8010315f <read_head+0x58> log.lh.sector[i] = lh->sector[i]; 80103144: 8b 4d f4 mov -0xc(%ebp),%ecx 80103147: 8b 55 f4 mov -0xc(%ebp),%edx 8010314a: 8b 45 f0 mov -0x10(%ebp),%eax 8010314d: 8b 44 90 04 mov 0x4(%eax,%edx,4),%eax 80103151: 8d 51 10 lea 0x10(%ecx),%edx 80103154: 89 04 95 a8 f8 10 80 mov %eax,-0x7fef0758(,%edx,4) { struct buf *buf = bread(log.dev, log.start); struct logheader *lh = (struct logheader *) (buf->data); int i; log.lh.n = lh->n; for (i = 0; i < log.lh.n; i++) { 8010315b: 83 45 f4 01 addl $0x1,-0xc(%ebp) 8010315f: a1 e4 f8 10 80 mov 0x8010f8e4,%eax 80103164: 3b 45 f4 cmp -0xc(%ebp),%eax 80103167: 7f db jg 80103144 <read_head+0x3d> log.lh.sector[i] = lh->sector[i]; } brelse(buf); 80103169: 8b 45 ec mov -0x14(%ebp),%eax 8010316c: 89 04 24 mov %eax,(%esp) 8010316f: e8 a4 d0 ff ff call 80100218 <brelse> } 80103174: c9 leave 80103175: c3 ret 80103176 <write_head>: // Write in-memory log header to disk. // This is the true point at which the // current transaction commits. static void write_head(void) { 80103176: 55 push %ebp 80103177: 89 e5 mov %esp,%ebp 80103179: 83 ec 28 sub $0x28,%esp struct buf *buf = bread(log.dev, log.start); 8010317c: a1 d4 f8 10 80 mov 0x8010f8d4,%eax 80103181: 89 c2 mov %eax,%edx 80103183: a1 e0 f8 10 80 mov 0x8010f8e0,%eax 80103188: 89 54 24 04 mov %edx,0x4(%esp) 8010318c: 89 04 24 mov %eax,(%esp) 8010318f: e8 13 d0 ff ff call 801001a7 <bread> 80103194: 89 45 ec mov %eax,-0x14(%ebp) struct logheader *hb = (struct logheader *) (buf->data); 80103197: 8b 45 ec mov -0x14(%ebp),%eax 8010319a: 83 c0 18 add $0x18,%eax 8010319d: 89 45 f0 mov %eax,-0x10(%ebp) int i; hb->n = log.lh.n; 801031a0: 8b 15 e4 f8 10 80 mov 0x8010f8e4,%edx 801031a6: 8b 45 f0 mov -0x10(%ebp),%eax 801031a9: 89 10 mov %edx,(%eax) for (i = 0; i < log.lh.n; i++) { 801031ab: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) 801031b2: eb 1b jmp 801031cf <write_head+0x59> hb->sector[i] = log.lh.sector[i]; 801031b4: 8b 55 f4 mov -0xc(%ebp),%edx 801031b7: 8b 45 f4 mov -0xc(%ebp),%eax 801031ba: 83 c0 10 add $0x10,%eax 801031bd: 8b 0c 85 a8 f8 10 80 mov -0x7fef0758(,%eax,4),%ecx 801031c4: 8b 45 f0 mov -0x10(%ebp),%eax 801031c7: 89 4c 90 04 mov %ecx,0x4(%eax,%edx,4) { struct buf *buf = bread(log.dev, log.start); struct logheader *hb = (struct logheader *) (buf->data); int i; hb->n = log.lh.n; for (i = 0; i < log.lh.n; i++) { 801031cb: 83 45 f4 01 addl $0x1,-0xc(%ebp) 801031cf: a1 e4 f8 10 80 mov 0x8010f8e4,%eax 801031d4: 3b 45 f4 cmp -0xc(%ebp),%eax 801031d7: 7f db jg 801031b4 <write_head+0x3e> hb->sector[i] = log.lh.sector[i]; } bwrite(buf); 801031d9: 8b 45 ec mov -0x14(%ebp),%eax 801031dc: 89 04 24 mov %eax,(%esp) 801031df: e8 fa cf ff ff call 801001de <bwrite> brelse(buf); 801031e4: 8b 45 ec mov -0x14(%ebp),%eax 801031e7: 89 04 24 mov %eax,(%esp) 801031ea: e8 29 d0 ff ff call 80100218 <brelse> } 801031ef: c9 leave 801031f0: c3 ret 801031f1 <recover_from_log>: static void recover_from_log(void) { 801031f1: 55 push %ebp 801031f2: 89 e5 mov %esp,%ebp 801031f4: 83 ec 08 sub $0x8,%esp read_head(); 801031f7: e8 0b ff ff ff call 80103107 <read_head> install_trans(); // if committed, copy from log to disk 801031fc: e8 5b fe ff ff call 8010305c <install_trans> log.lh.n = 0; 80103201: c7 05 e4 f8 10 80 00 movl $0x0,0x8010f8e4 80103208: 00 00 00 write_head(); // clear the log 8010320b: e8 66 ff ff ff call 80103176 <write_head> } 80103210: c9 leave 80103211: c3 ret 80103212 <begin_trans>: void begin_trans(void) { 80103212: 55 push %ebp 80103213: 89 e5 mov %esp,%ebp 80103215: 83 ec 18 sub $0x18,%esp acquire(&log.lock); 80103218: c7 04 24 a0 f8 10 80 movl $0x8010f8a0,(%esp) 8010321f: e8 57 1d 00 00 call 80104f7b <acquire> while (log.busy) { 80103224: eb 14 jmp 8010323a <begin_trans+0x28> sleep(&log, &log.lock); 80103226: c7 44 24 04 a0 f8 10 movl $0x8010f8a0,0x4(%esp) 8010322d: 80 8010322e: c7 04 24 a0 f8 10 80 movl $0x8010f8a0,(%esp) 80103235: e8 c8 19 00 00 call 80104c02 <sleep> void begin_trans(void) { acquire(&log.lock); while (log.busy) { 8010323a: a1 dc f8 10 80 mov 0x8010f8dc,%eax 8010323f: 85 c0 test %eax,%eax 80103241: 75 e3 jne 80103226 <begin_trans+0x14> sleep(&log, &log.lock); } log.busy = 1; 80103243: c7 05 dc f8 10 80 01 movl $0x1,0x8010f8dc 8010324a: 00 00 00 release(&log.lock); 8010324d: c7 04 24 a0 f8 10 80 movl $0x8010f8a0,(%esp) 80103254: e8 83 1d 00 00 call 80104fdc <release> } 80103259: c9 leave 8010325a: c3 ret 8010325b <commit_trans>: void commit_trans(void) { 8010325b: 55 push %ebp 8010325c: 89 e5 mov %esp,%ebp 8010325e: 83 ec 18 sub $0x18,%esp if (log.lh.n > 0) { 80103261: a1 e4 f8 10 80 mov 0x8010f8e4,%eax 80103266: 85 c0 test %eax,%eax 80103268: 7e 19 jle 80103283 <commit_trans+0x28> write_head(); // Write header to disk -- the real commit 8010326a: e8 07 ff ff ff call 80103176 <write_head> install_trans(); // Now install writes to home locations 8010326f: e8 e8 fd ff ff call 8010305c <install_trans> log.lh.n = 0; 80103274: c7 05 e4 f8 10 80 00 movl $0x0,0x8010f8e4 8010327b: 00 00 00 write_head(); // Erase the transaction from the log 8010327e: e8 f3 fe ff ff call 80103176 <write_head> } acquire(&log.lock); 80103283: c7 04 24 a0 f8 10 80 movl $0x8010f8a0,(%esp) 8010328a: e8 ec 1c 00 00 call 80104f7b <acquire> log.busy = 0; 8010328f: c7 05 dc f8 10 80 00 movl $0x0,0x8010f8dc 80103296: 00 00 00 wakeup(&log); 80103299: c7 04 24 a0 f8 10 80 movl $0x8010f8a0,(%esp) 801032a0: e8 a3 1a 00 00 call 80104d48 <wakeup> release(&log.lock); 801032a5: c7 04 24 a0 f8 10 80 movl $0x8010f8a0,(%esp) 801032ac: e8 2b 1d 00 00 call 80104fdc <release> } 801032b1: c9 leave 801032b2: c3 ret 801032b3 <log_write>: // modify bp->data[] // log_write(bp) // brelse(bp) void log_write(struct buf *b) { 801032b3: 55 push %ebp 801032b4: 89 e5 mov %esp,%ebp 801032b6: 83 ec 28 sub $0x28,%esp int i; if (log.lh.n >= LOGSIZE || log.lh.n >= log.size - 1) 801032b9: a1 e4 f8 10 80 mov 0x8010f8e4,%eax 801032be: 83 f8 09 cmp $0x9,%eax 801032c1: 7f 12 jg 801032d5 <log_write+0x22> 801032c3: a1 e4 f8 10 80 mov 0x8010f8e4,%eax 801032c8: 8b 15 d8 f8 10 80 mov 0x8010f8d8,%edx 801032ce: 83 ea 01 sub $0x1,%edx 801032d1: 39 d0 cmp %edx,%eax 801032d3: 7c 0c jl 801032e1 <log_write+0x2e> panic("too big a transaction"); 801032d5: c7 04 24 20 88 10 80 movl $0x80108820,(%esp) 801032dc: e8 59 d2 ff ff call 8010053a <panic> if (!log.busy) 801032e1: a1 dc f8 10 80 mov 0x8010f8dc,%eax 801032e6: 85 c0 test %eax,%eax 801032e8: 75 0c jne 801032f6 <log_write+0x43> panic("write outside of trans"); 801032ea: c7 04 24 36 88 10 80 movl $0x80108836,(%esp) 801032f1: e8 44 d2 ff ff call 8010053a <panic> for (i = 0; i < log.lh.n; i++) { 801032f6: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) 801032fd: eb 1d jmp 8010331c <log_write+0x69> if (log.lh.sector[i] == b->sector) // log absorbtion? 801032ff: 8b 45 f0 mov -0x10(%ebp),%eax 80103302: 83 c0 10 add $0x10,%eax 80103305: 8b 04 85 a8 f8 10 80 mov -0x7fef0758(,%eax,4),%eax 8010330c: 89 c2 mov %eax,%edx 8010330e: 8b 45 08 mov 0x8(%ebp),%eax 80103311: 8b 40 08 mov 0x8(%eax),%eax 80103314: 39 c2 cmp %eax,%edx 80103316: 74 10 je 80103328 <log_write+0x75> if (log.lh.n >= LOGSIZE || log.lh.n >= log.size - 1) panic("too big a transaction"); if (!log.busy) panic("write outside of trans"); for (i = 0; i < log.lh.n; i++) { 80103318: 83 45 f0 01 addl $0x1,-0x10(%ebp) 8010331c: a1 e4 f8 10 80 mov 0x8010f8e4,%eax 80103321: 3b 45 f0 cmp -0x10(%ebp),%eax 80103324: 7f d9 jg 801032ff <log_write+0x4c> 80103326: eb 01 jmp 80103329 <log_write+0x76> if (log.lh.sector[i] == b->sector) // log absorbtion? break; 80103328: 90 nop } log.lh.sector[i] = b->sector; 80103329: 8b 55 f0 mov -0x10(%ebp),%edx 8010332c: 8b 45 08 mov 0x8(%ebp),%eax 8010332f: 8b 40 08 mov 0x8(%eax),%eax 80103332: 83 c2 10 add $0x10,%edx 80103335: 89 04 95 a8 f8 10 80 mov %eax,-0x7fef0758(,%edx,4) struct buf *lbuf = bread(b->dev, log.start+i+1); 8010333c: a1 d4 f8 10 80 mov 0x8010f8d4,%eax 80103341: 03 45 f0 add -0x10(%ebp),%eax 80103344: 83 c0 01 add $0x1,%eax 80103347: 89 c2 mov %eax,%edx 80103349: 8b 45 08 mov 0x8(%ebp),%eax 8010334c: 8b 40 04 mov 0x4(%eax),%eax 8010334f: 89 54 24 04 mov %edx,0x4(%esp) 80103353: 89 04 24 mov %eax,(%esp) 80103356: e8 4c ce ff ff call 801001a7 <bread> 8010335b: 89 45 f4 mov %eax,-0xc(%ebp) memmove(lbuf->data, b->data, BSIZE); 8010335e: 8b 45 08 mov 0x8(%ebp),%eax 80103361: 8d 50 18 lea 0x18(%eax),%edx 80103364: 8b 45 f4 mov -0xc(%ebp),%eax 80103367: 83 c0 18 add $0x18,%eax 8010336a: c7 44 24 08 00 02 00 movl $0x200,0x8(%esp) 80103371: 00 80103372: 89 54 24 04 mov %edx,0x4(%esp) 80103376: 89 04 24 mov %eax,(%esp) 80103379: e8 1f 1f 00 00 call 8010529d <memmove> bwrite(lbuf); 8010337e: 8b 45 f4 mov -0xc(%ebp),%eax 80103381: 89 04 24 mov %eax,(%esp) 80103384: e8 55 ce ff ff call 801001de <bwrite> brelse(lbuf); 80103389: 8b 45 f4 mov -0xc(%ebp),%eax 8010338c: 89 04 24 mov %eax,(%esp) 8010338f: e8 84 ce ff ff call 80100218 <brelse> if (i == log.lh.n) 80103394: a1 e4 f8 10 80 mov 0x8010f8e4,%eax 80103399: 3b 45 f0 cmp -0x10(%ebp),%eax 8010339c: 75 0d jne 801033ab <log_write+0xf8> log.lh.n++; 8010339e: a1 e4 f8 10 80 mov 0x8010f8e4,%eax 801033a3: 83 c0 01 add $0x1,%eax 801033a6: a3 e4 f8 10 80 mov %eax,0x8010f8e4 b->flags |= B_DIRTY; // XXX prevent eviction 801033ab: 8b 45 08 mov 0x8(%ebp),%eax 801033ae: 8b 00 mov (%eax),%eax 801033b0: 89 c2 mov %eax,%edx 801033b2: 83 ca 04 or $0x4,%edx 801033b5: 8b 45 08 mov 0x8(%ebp),%eax 801033b8: 89 10 mov %edx,(%eax) } 801033ba: c9 leave 801033bb: c3 ret 801033bc <v2p>: 801033bc: 55 push %ebp 801033bd: 89 e5 mov %esp,%ebp 801033bf: 8b 45 08 mov 0x8(%ebp),%eax 801033c2: 2d 00 00 00 80 sub $0x80000000,%eax 801033c7: 5d pop %ebp 801033c8: c3 ret 801033c9 <p2v>: static inline void *p2v(uint a) { return (void *) ((a) + KERNBASE); } 801033c9: 55 push %ebp 801033ca: 89 e5 mov %esp,%ebp 801033cc: 8b 45 08 mov 0x8(%ebp),%eax 801033cf: 2d 00 00 00 80 sub $0x80000000,%eax 801033d4: 5d pop %ebp 801033d5: c3 ret 801033d6 <xchg>: asm volatile("sti"); } static inline uint xchg(volatile uint *addr, uint newval) { 801033d6: 55 push %ebp 801033d7: 89 e5 mov %esp,%ebp 801033d9: 83 ec 10 sub $0x10,%esp uint result; // The + in "+m" denotes a read-modify-write operand. asm volatile("lock; xchgl %0, %1" : 801033dc: 8b 55 08 mov 0x8(%ebp),%edx 801033df: 8b 45 0c mov 0xc(%ebp),%eax 801033e2: 8b 4d 08 mov 0x8(%ebp),%ecx 801033e5: f0 87 02 lock xchg %eax,(%edx) 801033e8: 89 45 fc mov %eax,-0x4(%ebp) "+m" (*addr), "=a" (result) : "1" (newval) : "cc"); return result; 801033eb: 8b 45 fc mov -0x4(%ebp),%eax } 801033ee: c9 leave 801033ef: c3 ret 801033f0 <main>: // Bootstrap processor starts running C code here. // Allocate a real stack and switch to it, first // doing some setup required for memory allocator to work. int main(void) { 801033f0: 55 push %ebp 801033f1: 89 e5 mov %esp,%ebp 801033f3: 83 e4 f0 and $0xfffffff0,%esp 801033f6: 83 ec 10 sub $0x10,%esp kinit1(end, P2V(4*1024*1024)); // phys page allocator 801033f9: c7 44 24 04 00 00 40 movl $0x80400000,0x4(%esp) 80103400: 80 80103401: c7 04 24 1c 29 11 80 movl $0x8011291c,(%esp) 80103408: e8 cc f5 ff ff call 801029d9 <kinit1> kvmalloc(); // kernel page table 8010340d: e8 55 4a 00 00 call 80107e67 <kvmalloc> mpinit(); // collect info about this machine 80103412: e8 45 04 00 00 call 8010385c <mpinit> lapicinit(); 80103417: e8 0c f9 ff ff call 80102d28 <lapicinit> seginit(); // set up segments 8010341c: e8 e8 43 00 00 call 80107809 <seginit> cprintf("\ncpu%d: starting xv6\n\n", cpu->id); 80103421: 65 a1 00 00 00 00 mov %gs:0x0,%eax 80103427: 0f b6 00 movzbl (%eax),%eax 8010342a: 0f b6 c0 movzbl %al,%eax 8010342d: 89 44 24 04 mov %eax,0x4(%esp) 80103431: c7 04 24 4d 88 10 80 movl $0x8010884d,(%esp) 80103438: e8 5d cf ff ff call 8010039a <cprintf> picinit(); // interrupt controller 8010343d: e8 80 06 00 00 call 80103ac2 <picinit> ioapicinit(); // another interrupt controller 80103442: e8 82 f4 ff ff call 801028c9 <ioapicinit> consoleinit(); // I/O devices & their interrupts 80103447: e8 3c d6 ff ff call 80100a88 <consoleinit> uartinit(); // serial port 8010344c: e8 02 37 00 00 call 80106b53 <uartinit> pinit(); // process table 80103451: e8 03 0c 00 00 call 80104059 <pinit> tvinit(); // trap vectors 80103456: e8 ab 32 00 00 call 80106706 <tvinit> binit(); // buffer cache 8010345b: e8 d4 cb ff ff call 80100034 <binit> fileinit(); // file table 80103460: e8 a3 da ff ff call 80100f08 <fileinit> iinit(); // inode cache 80103465: e8 58 e1 ff ff call 801015c2 <iinit> ideinit(); // disk 8010346a: e8 c1 f0 ff ff call 80102530 <ideinit> if(!ismp) 8010346f: a1 24 f9 10 80 mov 0x8010f924,%eax 80103474: 85 c0 test %eax,%eax 80103476: 75 05 jne 8010347d <main+0x8d> timerinit(); // uniprocessor timer 80103478: e8 d1 31 00 00 call 8010664e <timerinit> startothers(); // start other processors 8010347d: e8 7f 00 00 00 call 80103501 <startothers> kinit2(P2V(4*1024*1024), P2V(PHYSTOP)); // must come after startothers() 80103482: c7 44 24 04 00 00 00 movl $0x8e000000,0x4(%esp) 80103489: 8e 8010348a: c7 04 24 00 00 40 80 movl $0x80400000,(%esp) 80103491: e8 7b f5 ff ff call 80102a11 <kinit2> userinit(); // first user process 80103496: e8 dd 0c 00 00 call 80104178 <userinit> // Finish setting up this processor in mpmain. mpmain(); 8010349b: e8 1a 00 00 00 call 801034ba <mpmain> 801034a0 <mpenter>: } // Other CPUs jump here from entryother.S. static void mpenter(void) { 801034a0: 55 push %ebp 801034a1: 89 e5 mov %esp,%ebp 801034a3: 83 ec 08 sub $0x8,%esp switchkvm(); 801034a6: e8 d3 49 00 00 call 80107e7e <switchkvm> seginit(); 801034ab: e8 59 43 00 00 call 80107809 <seginit> lapicinit(); 801034b0: e8 73 f8 ff ff call 80102d28 <lapicinit> mpmain(); 801034b5: e8 00 00 00 00 call 801034ba <mpmain> 801034ba <mpmain>: } // Common CPU setup code. static void mpmain(void) { 801034ba: 55 push %ebp 801034bb: 89 e5 mov %esp,%ebp 801034bd: 83 ec 18 sub $0x18,%esp cprintf("cpu%d: starting\n", cpu->id); 801034c0: 65 a1 00 00 00 00 mov %gs:0x0,%eax 801034c6: 0f b6 00 movzbl (%eax),%eax 801034c9: 0f b6 c0 movzbl %al,%eax 801034cc: 89 44 24 04 mov %eax,0x4(%esp) 801034d0: c7 04 24 64 88 10 80 movl $0x80108864,(%esp) 801034d7: e8 be ce ff ff call 8010039a <cprintf> idtinit(); // load idt register 801034dc: e8 95 33 00 00 call 80106876 <idtinit> xchg(&cpu->started, 1); // tell startothers() we're up 801034e1: 65 a1 00 00 00 00 mov %gs:0x0,%eax 801034e7: 05 a8 00 00 00 add $0xa8,%eax 801034ec: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp) 801034f3: 00 801034f4: 89 04 24 mov %eax,(%esp) 801034f7: e8 da fe ff ff call 801033d6 <xchg> scheduler(); // start running processes 801034fc: e8 da 14 00 00 call 801049db <scheduler> 80103501 <startothers>: pde_t entrypgdir[]; // For entry.S // Start the non-boot (AP) processors. static void startothers(void) { 80103501: 55 push %ebp 80103502: 89 e5 mov %esp,%ebp 80103504: 53 push %ebx 80103505: 83 ec 24 sub $0x24,%esp char *stack; // Write entry code to unused memory at 0x7000. // The linker has placed the image of entryother.S in // _binary_entryother_start. code = p2v(0x7000); 80103508: c7 04 24 00 70 00 00 movl $0x7000,(%esp) 8010350f: e8 b5 fe ff ff call 801033c9 <p2v> 80103514: 89 45 ec mov %eax,-0x14(%ebp) memmove(code, _binary_entryother_start, (uint)_binary_entryother_size); 80103517: b8 8a 00 00 00 mov $0x8a,%eax 8010351c: 89 44 24 08 mov %eax,0x8(%esp) 80103520: c7 44 24 04 2c b5 10 movl $0x8010b52c,0x4(%esp) 80103527: 80 80103528: 8b 45 ec mov -0x14(%ebp),%eax 8010352b: 89 04 24 mov %eax,(%esp) 8010352e: e8 6a 1d 00 00 call 8010529d <memmove> for(c = cpus; c < cpus+ncpu; c++){ 80103533: c7 45 f0 40 f9 10 80 movl $0x8010f940,-0x10(%ebp) 8010353a: e9 85 00 00 00 jmp 801035c4 <startothers+0xc3> if(c == cpus+cpunum()) // We've started already. 8010353f: e8 40 f9 ff ff call 80102e84 <cpunum> 80103544: 69 c0 bc 00 00 00 imul $0xbc,%eax,%eax 8010354a: 05 40 f9 10 80 add $0x8010f940,%eax 8010354f: 3b 45 f0 cmp -0x10(%ebp),%eax 80103552: 74 68 je 801035bc <startothers+0xbb> continue; // Tell entryother.S what stack to use, where to enter, and what // pgdir to use. We cannot use kpgdir yet, because the AP processor // is running in low memory, so we use entrypgdir for the APs too. stack = kalloc(); 80103554: e8 b1 f5 ff ff call 80102b0a <kalloc> 80103559: 89 45 f4 mov %eax,-0xc(%ebp) *(void**)(code-4) = stack + KSTACKSIZE; 8010355c: 8b 45 ec mov -0x14(%ebp),%eax 8010355f: 83 e8 04 sub $0x4,%eax 80103562: 8b 55 f4 mov -0xc(%ebp),%edx 80103565: 81 c2 00 10 00 00 add $0x1000,%edx 8010356b: 89 10 mov %edx,(%eax) *(void**)(code-8) = mpenter; 8010356d: 8b 45 ec mov -0x14(%ebp),%eax 80103570: 83 e8 08 sub $0x8,%eax 80103573: c7 00 a0 34 10 80 movl $0x801034a0,(%eax) *(int**)(code-12) = (void *) v2p(entrypgdir); 80103579: 8b 45 ec mov -0x14(%ebp),%eax 8010357c: 8d 58 f4 lea -0xc(%eax),%ebx 8010357f: c7 04 24 00 a0 10 80 movl $0x8010a000,(%esp) 80103586: e8 31 fe ff ff call 801033bc <v2p> 8010358b: 89 03 mov %eax,(%ebx) lapicstartap(c->id, v2p(code)); 8010358d: 8b 45 ec mov -0x14(%ebp),%eax 80103590: 89 04 24 mov %eax,(%esp) 80103593: e8 24 fe ff ff call 801033bc <v2p> 80103598: 8b 55 f0 mov -0x10(%ebp),%edx 8010359b: 0f b6 12 movzbl (%edx),%edx 8010359e: 0f b6 d2 movzbl %dl,%edx 801035a1: 89 44 24 04 mov %eax,0x4(%esp) 801035a5: 89 14 24 mov %edx,(%esp) 801035a8: e8 5d f9 ff ff call 80102f0a <lapicstartap> // wait for cpu to finish mpmain() while(c->started == 0) 801035ad: 8b 45 f0 mov -0x10(%ebp),%eax 801035b0: 8b 80 a8 00 00 00 mov 0xa8(%eax),%eax 801035b6: 85 c0 test %eax,%eax 801035b8: 74 f3 je 801035ad <startothers+0xac> 801035ba: eb 01 jmp 801035bd <startothers+0xbc> code = p2v(0x7000); memmove(code, _binary_entryother_start, (uint)_binary_entryother_size); for(c = cpus; c < cpus+ncpu; c++){ if(c == cpus+cpunum()) // We've started already. continue; 801035bc: 90 nop // The linker has placed the image of entryother.S in // _binary_entryother_start. code = p2v(0x7000); memmove(code, _binary_entryother_start, (uint)_binary_entryother_size); for(c = cpus; c < cpus+ncpu; c++){ 801035bd: 81 45 f0 bc 00 00 00 addl $0xbc,-0x10(%ebp) 801035c4: a1 20 ff 10 80 mov 0x8010ff20,%eax 801035c9: 69 c0 bc 00 00 00 imul $0xbc,%eax,%eax 801035cf: 05 40 f9 10 80 add $0x8010f940,%eax 801035d4: 3b 45 f0 cmp -0x10(%ebp),%eax 801035d7: 0f 87 62 ff ff ff ja 8010353f <startothers+0x3e> // wait for cpu to finish mpmain() while(c->started == 0) ; } } 801035dd: 83 c4 24 add $0x24,%esp 801035e0: 5b pop %ebx 801035e1: 5d pop %ebp 801035e2: c3 ret ... 801035e4 <p2v>: 801035e4: 55 push %ebp 801035e5: 89 e5 mov %esp,%ebp 801035e7: 8b 45 08 mov 0x8(%ebp),%eax 801035ea: 2d 00 00 00 80 sub $0x80000000,%eax 801035ef: 5d pop %ebp 801035f0: c3 ret 801035f1 <inb>: // Routines to let C code use special x86 instructions. static inline uchar inb(ushort port) { 801035f1: 55 push %ebp 801035f2: 89 e5 mov %esp,%ebp 801035f4: 83 ec 14 sub $0x14,%esp 801035f7: 8b 45 08 mov 0x8(%ebp),%eax 801035fa: 66 89 45 ec mov %ax,-0x14(%ebp) uchar data; asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 801035fe: 0f b7 45 ec movzwl -0x14(%ebp),%eax 80103602: 89 c2 mov %eax,%edx 80103604: ec in (%dx),%al 80103605: 88 45 ff mov %al,-0x1(%ebp) return data; 80103608: 0f b6 45 ff movzbl -0x1(%ebp),%eax } 8010360c: c9 leave 8010360d: c3 ret 8010360e <outb>: "memory", "cc"); } static inline void outb(ushort port, uchar data) { 8010360e: 55 push %ebp 8010360f: 89 e5 mov %esp,%ebp 80103611: 83 ec 08 sub $0x8,%esp 80103614: 8b 55 08 mov 0x8(%ebp),%edx 80103617: 8b 45 0c mov 0xc(%ebp),%eax 8010361a: 66 89 55 fc mov %dx,-0x4(%ebp) 8010361e: 88 45 f8 mov %al,-0x8(%ebp) asm volatile("out %0,%1" : : "a" (data), "d" (port)); 80103621: 0f b6 45 f8 movzbl -0x8(%ebp),%eax 80103625: 0f b7 55 fc movzwl -0x4(%ebp),%edx 80103629: ee out %al,(%dx) } 8010362a: c9 leave 8010362b: c3 ret 8010362c <mpbcpu>: int ncpu; uchar ioapicid; int mpbcpu(void) { 8010362c: 55 push %ebp 8010362d: 89 e5 mov %esp,%ebp return bcpu-cpus; 8010362f: a1 64 b6 10 80 mov 0x8010b664,%eax 80103634: 89 c2 mov %eax,%edx 80103636: b8 40 f9 10 80 mov $0x8010f940,%eax 8010363b: 89 d1 mov %edx,%ecx 8010363d: 29 c1 sub %eax,%ecx 8010363f: 89 c8 mov %ecx,%eax 80103641: c1 f8 02 sar $0x2,%eax 80103644: 69 c0 cf 46 7d 67 imul $0x677d46cf,%eax,%eax } 8010364a: 5d pop %ebp 8010364b: c3 ret 8010364c <sum>: static uchar sum(uchar *addr, int len) { 8010364c: 55 push %ebp 8010364d: 89 e5 mov %esp,%ebp 8010364f: 83 ec 10 sub $0x10,%esp int i, sum; sum = 0; 80103652: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp) for(i=0; i<len; i++) 80103659: c7 45 f8 00 00 00 00 movl $0x0,-0x8(%ebp) 80103660: eb 13 jmp 80103675 <sum+0x29> sum += addr[i]; 80103662: 8b 45 f8 mov -0x8(%ebp),%eax 80103665: 03 45 08 add 0x8(%ebp),%eax 80103668: 0f b6 00 movzbl (%eax),%eax 8010366b: 0f b6 c0 movzbl %al,%eax 8010366e: 01 45 fc add %eax,-0x4(%ebp) sum(uchar *addr, int len) { int i, sum; sum = 0; for(i=0; i<len; i++) 80103671: 83 45 f8 01 addl $0x1,-0x8(%ebp) 80103675: 8b 45 f8 mov -0x8(%ebp),%eax 80103678: 3b 45 0c cmp 0xc(%ebp),%eax 8010367b: 7c e5 jl 80103662 <sum+0x16> sum += addr[i]; return sum; 8010367d: 8b 45 fc mov -0x4(%ebp),%eax } 80103680: c9 leave 80103681: c3 ret 80103682 <mpsearch1>: // Look for an MP structure in the len bytes at addr. static struct mp* mpsearch1(uint a, int len) { 80103682: 55 push %ebp 80103683: 89 e5 mov %esp,%ebp 80103685: 83 ec 28 sub $0x28,%esp uchar *e, *p, *addr; addr = p2v(a); 80103688: 8b 45 08 mov 0x8(%ebp),%eax 8010368b: 89 04 24 mov %eax,(%esp) 8010368e: e8 51 ff ff ff call 801035e4 <p2v> 80103693: 89 45 f4 mov %eax,-0xc(%ebp) e = addr+len; 80103696: 8b 45 0c mov 0xc(%ebp),%eax 80103699: 03 45 f4 add -0xc(%ebp),%eax 8010369c: 89 45 ec mov %eax,-0x14(%ebp) for(p = addr; p < e; p += sizeof(struct mp)) 8010369f: 8b 45 f4 mov -0xc(%ebp),%eax 801036a2: 89 45 f0 mov %eax,-0x10(%ebp) 801036a5: eb 3f jmp 801036e6 <mpsearch1+0x64> if(memcmp(p, "_MP_", 4) == 0 && sum(p, sizeof(struct mp)) == 0) 801036a7: c7 44 24 08 04 00 00 movl $0x4,0x8(%esp) 801036ae: 00 801036af: c7 44 24 04 78 88 10 movl $0x80108878,0x4(%esp) 801036b6: 80 801036b7: 8b 45 f0 mov -0x10(%ebp),%eax 801036ba: 89 04 24 mov %eax,(%esp) 801036bd: e8 7f 1b 00 00 call 80105241 <memcmp> 801036c2: 85 c0 test %eax,%eax 801036c4: 75 1c jne 801036e2 <mpsearch1+0x60> 801036c6: c7 44 24 04 10 00 00 movl $0x10,0x4(%esp) 801036cd: 00 801036ce: 8b 45 f0 mov -0x10(%ebp),%eax 801036d1: 89 04 24 mov %eax,(%esp) 801036d4: e8 73 ff ff ff call 8010364c <sum> 801036d9: 84 c0 test %al,%al 801036db: 75 05 jne 801036e2 <mpsearch1+0x60> return (struct mp*)p; 801036dd: 8b 45 f0 mov -0x10(%ebp),%eax 801036e0: eb 11 jmp 801036f3 <mpsearch1+0x71> { uchar *e, *p, *addr; addr = p2v(a); e = addr+len; for(p = addr; p < e; p += sizeof(struct mp)) 801036e2: 83 45 f0 10 addl $0x10,-0x10(%ebp) 801036e6: 8b 45 f0 mov -0x10(%ebp),%eax 801036e9: 3b 45 ec cmp -0x14(%ebp),%eax 801036ec: 72 b9 jb 801036a7 <mpsearch1+0x25> if(memcmp(p, "_MP_", 4) == 0 && sum(p, sizeof(struct mp)) == 0) return (struct mp*)p; return 0; 801036ee: b8 00 00 00 00 mov $0x0,%eax } 801036f3: c9 leave 801036f4: c3 ret 801036f5 <mpsearch>: // 1) in the first KB of the EBDA; // 2) in the last KB of system base memory; // 3) in the BIOS ROM between 0xE0000 and 0xFFFFF. static struct mp* mpsearch(void) { 801036f5: 55 push %ebp 801036f6: 89 e5 mov %esp,%ebp 801036f8: 83 ec 28 sub $0x28,%esp uchar *bda; uint p; struct mp *mp; bda = (uchar *) P2V(0x400); 801036fb: c7 45 ec 00 04 00 80 movl $0x80000400,-0x14(%ebp) if((p = ((bda[0x0F]<<8)| bda[0x0E]) << 4)){ 80103702: 8b 45 ec mov -0x14(%ebp),%eax 80103705: 83 c0 0f add $0xf,%eax 80103708: 0f b6 00 movzbl (%eax),%eax 8010370b: 0f b6 c0 movzbl %al,%eax 8010370e: 89 c2 mov %eax,%edx 80103710: c1 e2 08 shl $0x8,%edx 80103713: 8b 45 ec mov -0x14(%ebp),%eax 80103716: 83 c0 0e add $0xe,%eax 80103719: 0f b6 00 movzbl (%eax),%eax 8010371c: 0f b6 c0 movzbl %al,%eax 8010371f: 09 d0 or %edx,%eax 80103721: c1 e0 04 shl $0x4,%eax 80103724: 89 45 f0 mov %eax,-0x10(%ebp) 80103727: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 8010372b: 74 21 je 8010374e <mpsearch+0x59> if((mp = mpsearch1(p, 1024))) 8010372d: c7 44 24 04 00 04 00 movl $0x400,0x4(%esp) 80103734: 00 80103735: 8b 45 f0 mov -0x10(%ebp),%eax 80103738: 89 04 24 mov %eax,(%esp) 8010373b: e8 42 ff ff ff call 80103682 <mpsearch1> 80103740: 89 45 f4 mov %eax,-0xc(%ebp) 80103743: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 80103747: 74 50 je 80103799 <mpsearch+0xa4> return mp; 80103749: 8b 45 f4 mov -0xc(%ebp),%eax 8010374c: eb 5f jmp 801037ad <mpsearch+0xb8> } else { p = ((bda[0x14]<<8)|bda[0x13])*1024; 8010374e: 8b 45 ec mov -0x14(%ebp),%eax 80103751: 83 c0 14 add $0x14,%eax 80103754: 0f b6 00 movzbl (%eax),%eax 80103757: 0f b6 c0 movzbl %al,%eax 8010375a: 89 c2 mov %eax,%edx 8010375c: c1 e2 08 shl $0x8,%edx 8010375f: 8b 45 ec mov -0x14(%ebp),%eax 80103762: 83 c0 13 add $0x13,%eax 80103765: 0f b6 00 movzbl (%eax),%eax 80103768: 0f b6 c0 movzbl %al,%eax 8010376b: 09 d0 or %edx,%eax 8010376d: c1 e0 0a shl $0xa,%eax 80103770: 89 45 f0 mov %eax,-0x10(%ebp) if((mp = mpsearch1(p-1024, 1024))) 80103773: 8b 45 f0 mov -0x10(%ebp),%eax 80103776: 2d 00 04 00 00 sub $0x400,%eax 8010377b: c7 44 24 04 00 04 00 movl $0x400,0x4(%esp) 80103782: 00 80103783: 89 04 24 mov %eax,(%esp) 80103786: e8 f7 fe ff ff call 80103682 <mpsearch1> 8010378b: 89 45 f4 mov %eax,-0xc(%ebp) 8010378e: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 80103792: 74 05 je 80103799 <mpsearch+0xa4> return mp; 80103794: 8b 45 f4 mov -0xc(%ebp),%eax 80103797: eb 14 jmp 801037ad <mpsearch+0xb8> } return mpsearch1(0xF0000, 0x10000); 80103799: c7 44 24 04 00 00 01 movl $0x10000,0x4(%esp) 801037a0: 00 801037a1: c7 04 24 00 00 0f 00 movl $0xf0000,(%esp) 801037a8: e8 d5 fe ff ff call 80103682 <mpsearch1> } 801037ad: c9 leave 801037ae: c3 ret 801037af <mpconfig>: // Check for correct signature, calculate the checksum and, // if correct, check the version. // To do: check extended table checksum. static struct mpconf* mpconfig(struct mp **pmp) { 801037af: 55 push %ebp 801037b0: 89 e5 mov %esp,%ebp 801037b2: 83 ec 28 sub $0x28,%esp struct mpconf *conf; struct mp *mp; if((mp = mpsearch()) == 0 || mp->physaddr == 0) 801037b5: e8 3b ff ff ff call 801036f5 <mpsearch> 801037ba: 89 45 f4 mov %eax,-0xc(%ebp) 801037bd: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 801037c1: 74 0a je 801037cd <mpconfig+0x1e> 801037c3: 8b 45 f4 mov -0xc(%ebp),%eax 801037c6: 8b 40 04 mov 0x4(%eax),%eax 801037c9: 85 c0 test %eax,%eax 801037cb: 75 0a jne 801037d7 <mpconfig+0x28> return 0; 801037cd: b8 00 00 00 00 mov $0x0,%eax 801037d2: e9 83 00 00 00 jmp 8010385a <mpconfig+0xab> conf = (struct mpconf*) p2v((uint) mp->physaddr); 801037d7: 8b 45 f4 mov -0xc(%ebp),%eax 801037da: 8b 40 04 mov 0x4(%eax),%eax 801037dd: 89 04 24 mov %eax,(%esp) 801037e0: e8 ff fd ff ff call 801035e4 <p2v> 801037e5: 89 45 f0 mov %eax,-0x10(%ebp) if(memcmp(conf, "PCMP", 4) != 0) 801037e8: c7 44 24 08 04 00 00 movl $0x4,0x8(%esp) 801037ef: 00 801037f0: c7 44 24 04 7d 88 10 movl $0x8010887d,0x4(%esp) 801037f7: 80 801037f8: 8b 45 f0 mov -0x10(%ebp),%eax 801037fb: 89 04 24 mov %eax,(%esp) 801037fe: e8 3e 1a 00 00 call 80105241 <memcmp> 80103803: 85 c0 test %eax,%eax 80103805: 74 07 je 8010380e <mpconfig+0x5f> return 0; 80103807: b8 00 00 00 00 mov $0x0,%eax 8010380c: eb 4c jmp 8010385a <mpconfig+0xab> if(conf->version != 1 && conf->version != 4) 8010380e: 8b 45 f0 mov -0x10(%ebp),%eax 80103811: 0f b6 40 06 movzbl 0x6(%eax),%eax 80103815: 3c 01 cmp $0x1,%al 80103817: 74 12 je 8010382b <mpconfig+0x7c> 80103819: 8b 45 f0 mov -0x10(%ebp),%eax 8010381c: 0f b6 40 06 movzbl 0x6(%eax),%eax 80103820: 3c 04 cmp $0x4,%al 80103822: 74 07 je 8010382b <mpconfig+0x7c> return 0; 80103824: b8 00 00 00 00 mov $0x0,%eax 80103829: eb 2f jmp 8010385a <mpconfig+0xab> if(sum((uchar*)conf, conf->length) != 0) 8010382b: 8b 45 f0 mov -0x10(%ebp),%eax 8010382e: 0f b7 40 04 movzwl 0x4(%eax),%eax 80103832: 0f b7 d0 movzwl %ax,%edx 80103835: 8b 45 f0 mov -0x10(%ebp),%eax 80103838: 89 54 24 04 mov %edx,0x4(%esp) 8010383c: 89 04 24 mov %eax,(%esp) 8010383f: e8 08 fe ff ff call 8010364c <sum> 80103844: 84 c0 test %al,%al 80103846: 74 07 je 8010384f <mpconfig+0xa0> return 0; 80103848: b8 00 00 00 00 mov $0x0,%eax 8010384d: eb 0b jmp 8010385a <mpconfig+0xab> *pmp = mp; 8010384f: 8b 45 08 mov 0x8(%ebp),%eax 80103852: 8b 55 f4 mov -0xc(%ebp),%edx 80103855: 89 10 mov %edx,(%eax) return conf; 80103857: 8b 45 f0 mov -0x10(%ebp),%eax } 8010385a: c9 leave 8010385b: c3 ret 8010385c <mpinit>: void mpinit(void) { 8010385c: 55 push %ebp 8010385d: 89 e5 mov %esp,%ebp 8010385f: 83 ec 38 sub $0x38,%esp struct mp *mp; struct mpconf *conf; struct mpproc *proc; struct mpioapic *ioapic; bcpu = &cpus[0]; 80103862: c7 05 64 b6 10 80 40 movl $0x8010f940,0x8010b664 80103869: f9 10 80 if((conf = mpconfig(&mp)) == 0) 8010386c: 8d 45 e0 lea -0x20(%ebp),%eax 8010386f: 89 04 24 mov %eax,(%esp) 80103872: e8 38 ff ff ff call 801037af <mpconfig> 80103877: 89 45 ec mov %eax,-0x14(%ebp) 8010387a: 83 7d ec 00 cmpl $0x0,-0x14(%ebp) 8010387e: 0f 84 9d 01 00 00 je 80103a21 <mpinit+0x1c5> return; ismp = 1; 80103884: c7 05 24 f9 10 80 01 movl $0x1,0x8010f924 8010388b: 00 00 00 lapic = (uint*)conf->lapicaddr; 8010388e: 8b 45 ec mov -0x14(%ebp),%eax 80103891: 8b 40 24 mov 0x24(%eax),%eax 80103894: a3 9c f8 10 80 mov %eax,0x8010f89c for(p=(uchar*)(conf+1), e=(uchar*)conf+conf->length; p<e; ){ 80103899: 8b 45 ec mov -0x14(%ebp),%eax 8010389c: 83 c0 2c add $0x2c,%eax 8010389f: 89 45 e4 mov %eax,-0x1c(%ebp) 801038a2: 8b 55 ec mov -0x14(%ebp),%edx 801038a5: 8b 45 ec mov -0x14(%ebp),%eax 801038a8: 0f b7 40 04 movzwl 0x4(%eax),%eax 801038ac: 0f b7 c0 movzwl %ax,%eax 801038af: 8d 04 02 lea (%edx,%eax,1),%eax 801038b2: 89 45 e8 mov %eax,-0x18(%ebp) 801038b5: e9 f2 00 00 00 jmp 801039ac <mpinit+0x150> switch(*p){ 801038ba: 8b 45 e4 mov -0x1c(%ebp),%eax 801038bd: 0f b6 00 movzbl (%eax),%eax 801038c0: 0f b6 c0 movzbl %al,%eax 801038c3: 83 f8 04 cmp $0x4,%eax 801038c6: 0f 87 bd 00 00 00 ja 80103989 <mpinit+0x12d> 801038cc: 8b 04 85 c0 88 10 80 mov -0x7fef7740(,%eax,4),%eax 801038d3: ff e0 jmp *%eax case MPPROC: proc = (struct mpproc*)p; 801038d5: 8b 45 e4 mov -0x1c(%ebp),%eax 801038d8: 89 45 f0 mov %eax,-0x10(%ebp) if(ncpu != proc->apicid){ 801038db: 8b 45 f0 mov -0x10(%ebp),%eax 801038de: 0f b6 40 01 movzbl 0x1(%eax),%eax 801038e2: 0f b6 d0 movzbl %al,%edx 801038e5: a1 20 ff 10 80 mov 0x8010ff20,%eax 801038ea: 39 c2 cmp %eax,%edx 801038ec: 74 2d je 8010391b <mpinit+0xbf> cprintf("mpinit: ncpu=%d apicid=%d\n", ncpu, proc->apicid); 801038ee: 8b 45 f0 mov -0x10(%ebp),%eax 801038f1: 0f b6 40 01 movzbl 0x1(%eax),%eax 801038f5: 0f b6 d0 movzbl %al,%edx 801038f8: a1 20 ff 10 80 mov 0x8010ff20,%eax 801038fd: 89 54 24 08 mov %edx,0x8(%esp) 80103901: 89 44 24 04 mov %eax,0x4(%esp) 80103905: c7 04 24 82 88 10 80 movl $0x80108882,(%esp) 8010390c: e8 89 ca ff ff call 8010039a <cprintf> ismp = 0; 80103911: c7 05 24 f9 10 80 00 movl $0x0,0x8010f924 80103918: 00 00 00 } if(proc->flags & MPBOOT) 8010391b: 8b 45 f0 mov -0x10(%ebp),%eax 8010391e: 0f b6 40 03 movzbl 0x3(%eax),%eax 80103922: 0f b6 c0 movzbl %al,%eax 80103925: 83 e0 02 and $0x2,%eax 80103928: 85 c0 test %eax,%eax 8010392a: 74 15 je 80103941 <mpinit+0xe5> bcpu = &cpus[ncpu]; 8010392c: a1 20 ff 10 80 mov 0x8010ff20,%eax 80103931: 69 c0 bc 00 00 00 imul $0xbc,%eax,%eax 80103937: 05 40 f9 10 80 add $0x8010f940,%eax 8010393c: a3 64 b6 10 80 mov %eax,0x8010b664 cpus[ncpu].id = ncpu; 80103941: a1 20 ff 10 80 mov 0x8010ff20,%eax 80103946: 8b 15 20 ff 10 80 mov 0x8010ff20,%edx 8010394c: 69 c0 bc 00 00 00 imul $0xbc,%eax,%eax 80103952: 88 90 40 f9 10 80 mov %dl,-0x7fef06c0(%eax) ncpu++; 80103958: a1 20 ff 10 80 mov 0x8010ff20,%eax 8010395d: 83 c0 01 add $0x1,%eax 80103960: a3 20 ff 10 80 mov %eax,0x8010ff20 p += sizeof(struct mpproc); 80103965: 83 45 e4 14 addl $0x14,-0x1c(%ebp) continue; 80103969: eb 41 jmp 801039ac <mpinit+0x150> case MPIOAPIC: ioapic = (struct mpioapic*)p; 8010396b: 8b 45 e4 mov -0x1c(%ebp),%eax 8010396e: 89 45 f4 mov %eax,-0xc(%ebp) ioapicid = ioapic->apicno; 80103971: 8b 45 f4 mov -0xc(%ebp),%eax 80103974: 0f b6 40 01 movzbl 0x1(%eax),%eax 80103978: a2 20 f9 10 80 mov %al,0x8010f920 p += sizeof(struct mpioapic); 8010397d: 83 45 e4 08 addl $0x8,-0x1c(%ebp) continue; 80103981: eb 29 jmp 801039ac <mpinit+0x150> case MPBUS: case MPIOINTR: case MPLINTR: p += 8; 80103983: 83 45 e4 08 addl $0x8,-0x1c(%ebp) continue; 80103987: eb 23 jmp 801039ac <mpinit+0x150> default: cprintf("mpinit: unknown config type %x\n", *p); 80103989: 8b 45 e4 mov -0x1c(%ebp),%eax 8010398c: 0f b6 00 movzbl (%eax),%eax 8010398f: 0f b6 c0 movzbl %al,%eax 80103992: 89 44 24 04 mov %eax,0x4(%esp) 80103996: c7 04 24 a0 88 10 80 movl $0x801088a0,(%esp) 8010399d: e8 f8 c9 ff ff call 8010039a <cprintf> ismp = 0; 801039a2: c7 05 24 f9 10 80 00 movl $0x0,0x8010f924 801039a9: 00 00 00 bcpu = &cpus[0]; if((conf = mpconfig(&mp)) == 0) return; ismp = 1; lapic = (uint*)conf->lapicaddr; for(p=(uchar*)(conf+1), e=(uchar*)conf+conf->length; p<e; ){ 801039ac: 8b 45 e4 mov -0x1c(%ebp),%eax 801039af: 3b 45 e8 cmp -0x18(%ebp),%eax 801039b2: 0f 82 02 ff ff ff jb 801038ba <mpinit+0x5e> default: cprintf("mpinit: unknown config type %x\n", *p); ismp = 0; } } if(!ismp){ 801039b8: a1 24 f9 10 80 mov 0x8010f924,%eax 801039bd: 85 c0 test %eax,%eax 801039bf: 75 1d jne 801039de <mpinit+0x182> // Didn't like what we found; fall back to no MP. ncpu = 1; 801039c1: c7 05 20 ff 10 80 01 movl $0x1,0x8010ff20 801039c8: 00 00 00 lapic = 0; 801039cb: c7 05 9c f8 10 80 00 movl $0x0,0x8010f89c 801039d2: 00 00 00 ioapicid = 0; 801039d5: c6 05 20 f9 10 80 00 movb $0x0,0x8010f920 return; 801039dc: eb 44 jmp 80103a22 <mpinit+0x1c6> } if(mp->imcrp){ 801039de: 8b 45 e0 mov -0x20(%ebp),%eax 801039e1: 0f b6 40 0c movzbl 0xc(%eax),%eax 801039e5: 84 c0 test %al,%al 801039e7: 74 39 je 80103a22 <mpinit+0x1c6> // Bochs doesn't support IMCR, so this doesn't run on Bochs. // But it would on real hardware. outb(0x22, 0x70); // Select IMCR 801039e9: c7 44 24 04 70 00 00 movl $0x70,0x4(%esp) 801039f0: 00 801039f1: c7 04 24 22 00 00 00 movl $0x22,(%esp) 801039f8: e8 11 fc ff ff call 8010360e <outb> outb(0x23, inb(0x23) | 1); // Mask external interrupts. 801039fd: c7 04 24 23 00 00 00 movl $0x23,(%esp) 80103a04: e8 e8 fb ff ff call 801035f1 <inb> 80103a09: 83 c8 01 or $0x1,%eax 80103a0c: 0f b6 c0 movzbl %al,%eax 80103a0f: 89 44 24 04 mov %eax,0x4(%esp) 80103a13: c7 04 24 23 00 00 00 movl $0x23,(%esp) 80103a1a: e8 ef fb ff ff call 8010360e <outb> 80103a1f: eb 01 jmp 80103a22 <mpinit+0x1c6> struct mpproc *proc; struct mpioapic *ioapic; bcpu = &cpus[0]; if((conf = mpconfig(&mp)) == 0) return; 80103a21: 90 nop // Bochs doesn't support IMCR, so this doesn't run on Bochs. // But it would on real hardware. outb(0x22, 0x70); // Select IMCR outb(0x23, inb(0x23) | 1); // Mask external interrupts. } } 80103a22: c9 leave 80103a23: c3 ret 80103a24 <outb>: "memory", "cc"); } static inline void outb(ushort port, uchar data) { 80103a24: 55 push %ebp 80103a25: 89 e5 mov %esp,%ebp 80103a27: 83 ec 08 sub $0x8,%esp 80103a2a: 8b 55 08 mov 0x8(%ebp),%edx 80103a2d: 8b 45 0c mov 0xc(%ebp),%eax 80103a30: 66 89 55 fc mov %dx,-0x4(%ebp) 80103a34: 88 45 f8 mov %al,-0x8(%ebp) asm volatile("out %0,%1" : : "a" (data), "d" (port)); 80103a37: 0f b6 45 f8 movzbl -0x8(%ebp),%eax 80103a3b: 0f b7 55 fc movzwl -0x4(%ebp),%edx 80103a3f: ee out %al,(%dx) } 80103a40: c9 leave 80103a41: c3 ret 80103a42 <picsetmask>: // Initial IRQ mask has interrupt 2 enabled (for slave 8259A). static ushort irqmask = 0xFFFF & ~(1<<IRQ_SLAVE); static void picsetmask(ushort mask) { 80103a42: 55 push %ebp 80103a43: 89 e5 mov %esp,%ebp 80103a45: 83 ec 0c sub $0xc,%esp 80103a48: 8b 45 08 mov 0x8(%ebp),%eax 80103a4b: 66 89 45 fc mov %ax,-0x4(%ebp) irqmask = mask; 80103a4f: 0f b7 45 fc movzwl -0x4(%ebp),%eax 80103a53: 66 a3 00 b0 10 80 mov %ax,0x8010b000 outb(IO_PIC1+1, mask); 80103a59: 0f b7 45 fc movzwl -0x4(%ebp),%eax 80103a5d: 0f b6 c0 movzbl %al,%eax 80103a60: 89 44 24 04 mov %eax,0x4(%esp) 80103a64: c7 04 24 21 00 00 00 movl $0x21,(%esp) 80103a6b: e8 b4 ff ff ff call 80103a24 <outb> outb(IO_PIC2+1, mask >> 8); 80103a70: 0f b7 45 fc movzwl -0x4(%ebp),%eax 80103a74: 66 c1 e8 08 shr $0x8,%ax 80103a78: 0f b6 c0 movzbl %al,%eax 80103a7b: 89 44 24 04 mov %eax,0x4(%esp) 80103a7f: c7 04 24 a1 00 00 00 movl $0xa1,(%esp) 80103a86: e8 99 ff ff ff call 80103a24 <outb> } 80103a8b: c9 leave 80103a8c: c3 ret 80103a8d <picenable>: void picenable(int irq) { 80103a8d: 55 push %ebp 80103a8e: 89 e5 mov %esp,%ebp 80103a90: 53 push %ebx 80103a91: 83 ec 04 sub $0x4,%esp picsetmask(irqmask & ~(1<<irq)); 80103a94: 8b 45 08 mov 0x8(%ebp),%eax 80103a97: ba 01 00 00 00 mov $0x1,%edx 80103a9c: 89 d3 mov %edx,%ebx 80103a9e: 89 c1 mov %eax,%ecx 80103aa0: d3 e3 shl %cl,%ebx 80103aa2: 89 d8 mov %ebx,%eax 80103aa4: 89 c2 mov %eax,%edx 80103aa6: f7 d2 not %edx 80103aa8: 0f b7 05 00 b0 10 80 movzwl 0x8010b000,%eax 80103aaf: 21 d0 and %edx,%eax 80103ab1: 0f b7 c0 movzwl %ax,%eax 80103ab4: 89 04 24 mov %eax,(%esp) 80103ab7: e8 86 ff ff ff call 80103a42 <picsetmask> } 80103abc: 83 c4 04 add $0x4,%esp 80103abf: 5b pop %ebx 80103ac0: 5d pop %ebp 80103ac1: c3 ret 80103ac2 <picinit>: // Initialize the 8259A interrupt controllers. void picinit(void) { 80103ac2: 55 push %ebp 80103ac3: 89 e5 mov %esp,%ebp 80103ac5: 83 ec 08 sub $0x8,%esp // mask all interrupts outb(IO_PIC1+1, 0xFF); 80103ac8: c7 44 24 04 ff 00 00 movl $0xff,0x4(%esp) 80103acf: 00 80103ad0: c7 04 24 21 00 00 00 movl $0x21,(%esp) 80103ad7: e8 48 ff ff ff call 80103a24 <outb> outb(IO_PIC2+1, 0xFF); 80103adc: c7 44 24 04 ff 00 00 movl $0xff,0x4(%esp) 80103ae3: 00 80103ae4: c7 04 24 a1 00 00 00 movl $0xa1,(%esp) 80103aeb: e8 34 ff ff ff call 80103a24 <outb> // ICW1: 0001g0hi // g: 0 = edge triggering, 1 = level triggering // h: 0 = cascaded PICs, 1 = master only // i: 0 = no ICW4, 1 = ICW4 required outb(IO_PIC1, 0x11); 80103af0: c7 44 24 04 11 00 00 movl $0x11,0x4(%esp) 80103af7: 00 80103af8: c7 04 24 20 00 00 00 movl $0x20,(%esp) 80103aff: e8 20 ff ff ff call 80103a24 <outb> // ICW2: Vector offset outb(IO_PIC1+1, T_IRQ0); 80103b04: c7 44 24 04 20 00 00 movl $0x20,0x4(%esp) 80103b0b: 00 80103b0c: c7 04 24 21 00 00 00 movl $0x21,(%esp) 80103b13: e8 0c ff ff ff call 80103a24 <outb> // ICW3: (master PIC) bit mask of IR lines connected to slaves // (slave PIC) 3-bit # of slave's connection to master outb(IO_PIC1+1, 1<<IRQ_SLAVE); 80103b18: c7 44 24 04 04 00 00 movl $0x4,0x4(%esp) 80103b1f: 00 80103b20: c7 04 24 21 00 00 00 movl $0x21,(%esp) 80103b27: e8 f8 fe ff ff call 80103a24 <outb> // m: 0 = slave PIC, 1 = master PIC // (ignored when b is 0, as the master/slave role // can be hardwired). // a: 1 = Automatic EOI mode // p: 0 = MCS-80/85 mode, 1 = intel x86 mode outb(IO_PIC1+1, 0x3); 80103b2c: c7 44 24 04 03 00 00 movl $0x3,0x4(%esp) 80103b33: 00 80103b34: c7 04 24 21 00 00 00 movl $0x21,(%esp) 80103b3b: e8 e4 fe ff ff call 80103a24 <outb> // Set up slave (8259A-2) outb(IO_PIC2, 0x11); // ICW1 80103b40: c7 44 24 04 11 00 00 movl $0x11,0x4(%esp) 80103b47: 00 80103b48: c7 04 24 a0 00 00 00 movl $0xa0,(%esp) 80103b4f: e8 d0 fe ff ff call 80103a24 <outb> outb(IO_PIC2+1, T_IRQ0 + 8); // ICW2 80103b54: c7 44 24 04 28 00 00 movl $0x28,0x4(%esp) 80103b5b: 00 80103b5c: c7 04 24 a1 00 00 00 movl $0xa1,(%esp) 80103b63: e8 bc fe ff ff call 80103a24 <outb> outb(IO_PIC2+1, IRQ_SLAVE); // ICW3 80103b68: c7 44 24 04 02 00 00 movl $0x2,0x4(%esp) 80103b6f: 00 80103b70: c7 04 24 a1 00 00 00 movl $0xa1,(%esp) 80103b77: e8 a8 fe ff ff call 80103a24 <outb> // NB Automatic EOI mode doesn't tend to work on the slave. // Linux source code says it's "to be investigated". outb(IO_PIC2+1, 0x3); // ICW4 80103b7c: c7 44 24 04 03 00 00 movl $0x3,0x4(%esp) 80103b83: 00 80103b84: c7 04 24 a1 00 00 00 movl $0xa1,(%esp) 80103b8b: e8 94 fe ff ff call 80103a24 <outb> // OCW3: 0ef01prs // ef: 0x = NOP, 10 = clear specific mask, 11 = set specific mask // p: 0 = no polling, 1 = polling mode // rs: 0x = NOP, 10 = read IRR, 11 = read ISR outb(IO_PIC1, 0x68); // clear specific mask 80103b90: c7 44 24 04 68 00 00 movl $0x68,0x4(%esp) 80103b97: 00 80103b98: c7 04 24 20 00 00 00 movl $0x20,(%esp) 80103b9f: e8 80 fe ff ff call 80103a24 <outb> outb(IO_PIC1, 0x0a); // read IRR by default 80103ba4: c7 44 24 04 0a 00 00 movl $0xa,0x4(%esp) 80103bab: 00 80103bac: c7 04 24 20 00 00 00 movl $0x20,(%esp) 80103bb3: e8 6c fe ff ff call 80103a24 <outb> outb(IO_PIC2, 0x68); // OCW3 80103bb8: c7 44 24 04 68 00 00 movl $0x68,0x4(%esp) 80103bbf: 00 80103bc0: c7 04 24 a0 00 00 00 movl $0xa0,(%esp) 80103bc7: e8 58 fe ff ff call 80103a24 <outb> outb(IO_PIC2, 0x0a); // OCW3 80103bcc: c7 44 24 04 0a 00 00 movl $0xa,0x4(%esp) 80103bd3: 00 80103bd4: c7 04 24 a0 00 00 00 movl $0xa0,(%esp) 80103bdb: e8 44 fe ff ff call 80103a24 <outb> if(irqmask != 0xFFFF) 80103be0: 0f b7 05 00 b0 10 80 movzwl 0x8010b000,%eax 80103be7: 66 83 f8 ff cmp $0xffffffff,%ax 80103beb: 74 12 je 80103bff <picinit+0x13d> picsetmask(irqmask); 80103bed: 0f b7 05 00 b0 10 80 movzwl 0x8010b000,%eax 80103bf4: 0f b7 c0 movzwl %ax,%eax 80103bf7: 89 04 24 mov %eax,(%esp) 80103bfa: e8 43 fe ff ff call 80103a42 <picsetmask> } 80103bff: c9 leave 80103c00: c3 ret 80103c01: 00 00 add %al,(%eax) ... 80103c04 <pipealloc>: int writeopen; // write fd is still open }; int pipealloc(struct file **f0, struct file **f1) { 80103c04: 55 push %ebp 80103c05: 89 e5 mov %esp,%ebp 80103c07: 83 ec 28 sub $0x28,%esp struct pipe *p; p = 0; 80103c0a: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) *f0 = *f1 = 0; 80103c11: 8b 45 0c mov 0xc(%ebp),%eax 80103c14: c7 00 00 00 00 00 movl $0x0,(%eax) 80103c1a: 8b 45 0c mov 0xc(%ebp),%eax 80103c1d: 8b 10 mov (%eax),%edx 80103c1f: 8b 45 08 mov 0x8(%ebp),%eax 80103c22: 89 10 mov %edx,(%eax) if((*f0 = filealloc()) == 0 || (*f1 = filealloc()) == 0) 80103c24: e8 fb d2 ff ff call 80100f24 <filealloc> 80103c29: 8b 55 08 mov 0x8(%ebp),%edx 80103c2c: 89 02 mov %eax,(%edx) 80103c2e: 8b 45 08 mov 0x8(%ebp),%eax 80103c31: 8b 00 mov (%eax),%eax 80103c33: 85 c0 test %eax,%eax 80103c35: 0f 84 c8 00 00 00 je 80103d03 <pipealloc+0xff> 80103c3b: e8 e4 d2 ff ff call 80100f24 <filealloc> 80103c40: 8b 55 0c mov 0xc(%ebp),%edx 80103c43: 89 02 mov %eax,(%edx) 80103c45: 8b 45 0c mov 0xc(%ebp),%eax 80103c48: 8b 00 mov (%eax),%eax 80103c4a: 85 c0 test %eax,%eax 80103c4c: 0f 84 b1 00 00 00 je 80103d03 <pipealloc+0xff> goto bad; if((p = (struct pipe*)kalloc()) == 0) 80103c52: e8 b3 ee ff ff call 80102b0a <kalloc> 80103c57: 89 45 f4 mov %eax,-0xc(%ebp) 80103c5a: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 80103c5e: 0f 84 9e 00 00 00 je 80103d02 <pipealloc+0xfe> goto bad; p->readopen = 1; 80103c64: 8b 45 f4 mov -0xc(%ebp),%eax 80103c67: c7 80 3c 02 00 00 01 movl $0x1,0x23c(%eax) 80103c6e: 00 00 00 p->writeopen = 1; 80103c71: 8b 45 f4 mov -0xc(%ebp),%eax 80103c74: c7 80 40 02 00 00 01 movl $0x1,0x240(%eax) 80103c7b: 00 00 00 p->nwrite = 0; 80103c7e: 8b 45 f4 mov -0xc(%ebp),%eax 80103c81: c7 80 38 02 00 00 00 movl $0x0,0x238(%eax) 80103c88: 00 00 00 p->nread = 0; 80103c8b: 8b 45 f4 mov -0xc(%ebp),%eax 80103c8e: c7 80 34 02 00 00 00 movl $0x0,0x234(%eax) 80103c95: 00 00 00 initlock(&p->lock, "pipe"); 80103c98: 8b 45 f4 mov -0xc(%ebp),%eax 80103c9b: c7 44 24 04 d4 88 10 movl $0x801088d4,0x4(%esp) 80103ca2: 80 80103ca3: 89 04 24 mov %eax,(%esp) 80103ca6: e8 af 12 00 00 call 80104f5a <initlock> (*f0)->type = FD_PIPE; 80103cab: 8b 45 08 mov 0x8(%ebp),%eax 80103cae: 8b 00 mov (%eax),%eax 80103cb0: c7 00 01 00 00 00 movl $0x1,(%eax) (*f0)->readable = 1; 80103cb6: 8b 45 08 mov 0x8(%ebp),%eax 80103cb9: 8b 00 mov (%eax),%eax 80103cbb: c6 40 08 01 movb $0x1,0x8(%eax) (*f0)->writable = 0; 80103cbf: 8b 45 08 mov 0x8(%ebp),%eax 80103cc2: 8b 00 mov (%eax),%eax 80103cc4: c6 40 09 00 movb $0x0,0x9(%eax) (*f0)->pipe = p; 80103cc8: 8b 45 08 mov 0x8(%ebp),%eax 80103ccb: 8b 00 mov (%eax),%eax 80103ccd: 8b 55 f4 mov -0xc(%ebp),%edx 80103cd0: 89 50 0c mov %edx,0xc(%eax) (*f1)->type = FD_PIPE; 80103cd3: 8b 45 0c mov 0xc(%ebp),%eax 80103cd6: 8b 00 mov (%eax),%eax 80103cd8: c7 00 01 00 00 00 movl $0x1,(%eax) (*f1)->readable = 0; 80103cde: 8b 45 0c mov 0xc(%ebp),%eax 80103ce1: 8b 00 mov (%eax),%eax 80103ce3: c6 40 08 00 movb $0x0,0x8(%eax) (*f1)->writable = 1; 80103ce7: 8b 45 0c mov 0xc(%ebp),%eax 80103cea: 8b 00 mov (%eax),%eax 80103cec: c6 40 09 01 movb $0x1,0x9(%eax) (*f1)->pipe = p; 80103cf0: 8b 45 0c mov 0xc(%ebp),%eax 80103cf3: 8b 00 mov (%eax),%eax 80103cf5: 8b 55 f4 mov -0xc(%ebp),%edx 80103cf8: 89 50 0c mov %edx,0xc(%eax) return 0; 80103cfb: b8 00 00 00 00 mov $0x0,%eax 80103d00: eb 43 jmp 80103d45 <pipealloc+0x141> p = 0; *f0 = *f1 = 0; if((*f0 = filealloc()) == 0 || (*f1 = filealloc()) == 0) goto bad; if((p = (struct pipe*)kalloc()) == 0) goto bad; 80103d02: 90 nop (*f1)->pipe = p; return 0; //PAGEBREAK: 20 bad: if(p) 80103d03: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 80103d07: 74 0b je 80103d14 <pipealloc+0x110> kfree((char*)p); 80103d09: 8b 45 f4 mov -0xc(%ebp),%eax 80103d0c: 89 04 24 mov %eax,(%esp) 80103d0f: e8 5d ed ff ff call 80102a71 <kfree> if(*f0) 80103d14: 8b 45 08 mov 0x8(%ebp),%eax 80103d17: 8b 00 mov (%eax),%eax 80103d19: 85 c0 test %eax,%eax 80103d1b: 74 0d je 80103d2a <pipealloc+0x126> fileclose(*f0); 80103d1d: 8b 45 08 mov 0x8(%ebp),%eax 80103d20: 8b 00 mov (%eax),%eax 80103d22: 89 04 24 mov %eax,(%esp) 80103d25: e8 a3 d2 ff ff call 80100fcd <fileclose> if(*f1) 80103d2a: 8b 45 0c mov 0xc(%ebp),%eax 80103d2d: 8b 00 mov (%eax),%eax 80103d2f: 85 c0 test %eax,%eax 80103d31: 74 0d je 80103d40 <pipealloc+0x13c> fileclose(*f1); 80103d33: 8b 45 0c mov 0xc(%ebp),%eax 80103d36: 8b 00 mov (%eax),%eax 80103d38: 89 04 24 mov %eax,(%esp) 80103d3b: e8 8d d2 ff ff call 80100fcd <fileclose> return -1; 80103d40: b8 ff ff ff ff mov $0xffffffff,%eax } 80103d45: c9 leave 80103d46: c3 ret 80103d47 <pipeclose>: void pipeclose(struct pipe *p, int writable) { 80103d47: 55 push %ebp 80103d48: 89 e5 mov %esp,%ebp 80103d4a: 83 ec 18 sub $0x18,%esp acquire(&p->lock); 80103d4d: 8b 45 08 mov 0x8(%ebp),%eax 80103d50: 89 04 24 mov %eax,(%esp) 80103d53: e8 23 12 00 00 call 80104f7b <acquire> if(writable){ 80103d58: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 80103d5c: 74 1f je 80103d7d <pipeclose+0x36> p->writeopen = 0; 80103d5e: 8b 45 08 mov 0x8(%ebp),%eax 80103d61: c7 80 40 02 00 00 00 movl $0x0,0x240(%eax) 80103d68: 00 00 00 wakeup(&p->nread); 80103d6b: 8b 45 08 mov 0x8(%ebp),%eax 80103d6e: 05 34 02 00 00 add $0x234,%eax 80103d73: 89 04 24 mov %eax,(%esp) 80103d76: e8 cd 0f 00 00 call 80104d48 <wakeup> 80103d7b: eb 1d jmp 80103d9a <pipeclose+0x53> } else { p->readopen = 0; 80103d7d: 8b 45 08 mov 0x8(%ebp),%eax 80103d80: c7 80 3c 02 00 00 00 movl $0x0,0x23c(%eax) 80103d87: 00 00 00 wakeup(&p->nwrite); 80103d8a: 8b 45 08 mov 0x8(%ebp),%eax 80103d8d: 05 38 02 00 00 add $0x238,%eax 80103d92: 89 04 24 mov %eax,(%esp) 80103d95: e8 ae 0f 00 00 call 80104d48 <wakeup> } if(p->readopen == 0 && p->writeopen == 0){ 80103d9a: 8b 45 08 mov 0x8(%ebp),%eax 80103d9d: 8b 80 3c 02 00 00 mov 0x23c(%eax),%eax 80103da3: 85 c0 test %eax,%eax 80103da5: 75 25 jne 80103dcc <pipeclose+0x85> 80103da7: 8b 45 08 mov 0x8(%ebp),%eax 80103daa: 8b 80 40 02 00 00 mov 0x240(%eax),%eax 80103db0: 85 c0 test %eax,%eax 80103db2: 75 18 jne 80103dcc <pipeclose+0x85> release(&p->lock); 80103db4: 8b 45 08 mov 0x8(%ebp),%eax 80103db7: 89 04 24 mov %eax,(%esp) 80103dba: e8 1d 12 00 00 call 80104fdc <release> kfree((char*)p); 80103dbf: 8b 45 08 mov 0x8(%ebp),%eax 80103dc2: 89 04 24 mov %eax,(%esp) 80103dc5: e8 a7 ec ff ff call 80102a71 <kfree> wakeup(&p->nread); } else { p->readopen = 0; wakeup(&p->nwrite); } if(p->readopen == 0 && p->writeopen == 0){ 80103dca: eb 0b jmp 80103dd7 <pipeclose+0x90> release(&p->lock); kfree((char*)p); } else release(&p->lock); 80103dcc: 8b 45 08 mov 0x8(%ebp),%eax 80103dcf: 89 04 24 mov %eax,(%esp) 80103dd2: e8 05 12 00 00 call 80104fdc <release> } 80103dd7: c9 leave 80103dd8: c3 ret 80103dd9 <pipewrite>: //PAGEBREAK: 40 int pipewrite(struct pipe *p, char *addr, int n) { 80103dd9: 55 push %ebp 80103dda: 89 e5 mov %esp,%ebp 80103ddc: 53 push %ebx 80103ddd: 83 ec 24 sub $0x24,%esp int i; acquire(&p->lock); 80103de0: 8b 45 08 mov 0x8(%ebp),%eax 80103de3: 89 04 24 mov %eax,(%esp) 80103de6: e8 90 11 00 00 call 80104f7b <acquire> for(i = 0; i < n; i++){ 80103deb: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) 80103df2: e9 a6 00 00 00 jmp 80103e9d <pipewrite+0xc4> while(p->nwrite == p->nread + PIPESIZE){ //DOC: pipewrite-full if(p->readopen == 0 || proc->killed){ 80103df7: 8b 45 08 mov 0x8(%ebp),%eax 80103dfa: 8b 80 3c 02 00 00 mov 0x23c(%eax),%eax 80103e00: 85 c0 test %eax,%eax 80103e02: 74 0d je 80103e11 <pipewrite+0x38> 80103e04: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80103e0a: 8b 40 24 mov 0x24(%eax),%eax 80103e0d: 85 c0 test %eax,%eax 80103e0f: 74 15 je 80103e26 <pipewrite+0x4d> release(&p->lock); 80103e11: 8b 45 08 mov 0x8(%ebp),%eax 80103e14: 89 04 24 mov %eax,(%esp) 80103e17: e8 c0 11 00 00 call 80104fdc <release> return -1; 80103e1c: b8 ff ff ff ff mov $0xffffffff,%eax 80103e21: e9 9d 00 00 00 jmp 80103ec3 <pipewrite+0xea> } wakeup(&p->nread); 80103e26: 8b 45 08 mov 0x8(%ebp),%eax 80103e29: 05 34 02 00 00 add $0x234,%eax 80103e2e: 89 04 24 mov %eax,(%esp) 80103e31: e8 12 0f 00 00 call 80104d48 <wakeup> sleep(&p->nwrite, &p->lock); //DOC: pipewrite-sleep 80103e36: 8b 45 08 mov 0x8(%ebp),%eax 80103e39: 8b 55 08 mov 0x8(%ebp),%edx 80103e3c: 81 c2 38 02 00 00 add $0x238,%edx 80103e42: 89 44 24 04 mov %eax,0x4(%esp) 80103e46: 89 14 24 mov %edx,(%esp) 80103e49: e8 b4 0d 00 00 call 80104c02 <sleep> 80103e4e: eb 01 jmp 80103e51 <pipewrite+0x78> { int i; acquire(&p->lock); for(i = 0; i < n; i++){ while(p->nwrite == p->nread + PIPESIZE){ //DOC: pipewrite-full 80103e50: 90 nop 80103e51: 8b 45 08 mov 0x8(%ebp),%eax 80103e54: 8b 90 38 02 00 00 mov 0x238(%eax),%edx 80103e5a: 8b 45 08 mov 0x8(%ebp),%eax 80103e5d: 8b 80 34 02 00 00 mov 0x234(%eax),%eax 80103e63: 05 00 02 00 00 add $0x200,%eax 80103e68: 39 c2 cmp %eax,%edx 80103e6a: 74 8b je 80103df7 <pipewrite+0x1e> return -1; } wakeup(&p->nread); sleep(&p->nwrite, &p->lock); //DOC: pipewrite-sleep } p->data[p->nwrite++ % PIPESIZE] = addr[i]; 80103e6c: 8b 45 08 mov 0x8(%ebp),%eax 80103e6f: 8b 80 38 02 00 00 mov 0x238(%eax),%eax 80103e75: 89 c3 mov %eax,%ebx 80103e77: 81 e3 ff 01 00 00 and $0x1ff,%ebx 80103e7d: 8b 55 f4 mov -0xc(%ebp),%edx 80103e80: 03 55 0c add 0xc(%ebp),%edx 80103e83: 0f b6 0a movzbl (%edx),%ecx 80103e86: 8b 55 08 mov 0x8(%ebp),%edx 80103e89: 88 4c 1a 34 mov %cl,0x34(%edx,%ebx,1) 80103e8d: 8d 50 01 lea 0x1(%eax),%edx 80103e90: 8b 45 08 mov 0x8(%ebp),%eax 80103e93: 89 90 38 02 00 00 mov %edx,0x238(%eax) pipewrite(struct pipe *p, char *addr, int n) { int i; acquire(&p->lock); for(i = 0; i < n; i++){ 80103e99: 83 45 f4 01 addl $0x1,-0xc(%ebp) 80103e9d: 8b 45 f4 mov -0xc(%ebp),%eax 80103ea0: 3b 45 10 cmp 0x10(%ebp),%eax 80103ea3: 7c ab jl 80103e50 <pipewrite+0x77> wakeup(&p->nread); sleep(&p->nwrite, &p->lock); //DOC: pipewrite-sleep } p->data[p->nwrite++ % PIPESIZE] = addr[i]; } wakeup(&p->nread); //DOC: pipewrite-wakeup1 80103ea5: 8b 45 08 mov 0x8(%ebp),%eax 80103ea8: 05 34 02 00 00 add $0x234,%eax 80103ead: 89 04 24 mov %eax,(%esp) 80103eb0: e8 93 0e 00 00 call 80104d48 <wakeup> release(&p->lock); 80103eb5: 8b 45 08 mov 0x8(%ebp),%eax 80103eb8: 89 04 24 mov %eax,(%esp) 80103ebb: e8 1c 11 00 00 call 80104fdc <release> return n; 80103ec0: 8b 45 10 mov 0x10(%ebp),%eax } 80103ec3: 83 c4 24 add $0x24,%esp 80103ec6: 5b pop %ebx 80103ec7: 5d pop %ebp 80103ec8: c3 ret 80103ec9 <piperead>: int piperead(struct pipe *p, char *addr, int n) { 80103ec9: 55 push %ebp 80103eca: 89 e5 mov %esp,%ebp 80103ecc: 53 push %ebx 80103ecd: 83 ec 24 sub $0x24,%esp int i; acquire(&p->lock); 80103ed0: 8b 45 08 mov 0x8(%ebp),%eax 80103ed3: 89 04 24 mov %eax,(%esp) 80103ed6: e8 a0 10 00 00 call 80104f7b <acquire> while(p->nread == p->nwrite && p->writeopen){ //DOC: pipe-empty 80103edb: eb 3a jmp 80103f17 <piperead+0x4e> if(proc->killed){ 80103edd: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80103ee3: 8b 40 24 mov 0x24(%eax),%eax 80103ee6: 85 c0 test %eax,%eax 80103ee8: 74 15 je 80103eff <piperead+0x36> release(&p->lock); 80103eea: 8b 45 08 mov 0x8(%ebp),%eax 80103eed: 89 04 24 mov %eax,(%esp) 80103ef0: e8 e7 10 00 00 call 80104fdc <release> return -1; 80103ef5: b8 ff ff ff ff mov $0xffffffff,%eax 80103efa: e9 b6 00 00 00 jmp 80103fb5 <piperead+0xec> } sleep(&p->nread, &p->lock); //DOC: piperead-sleep 80103eff: 8b 45 08 mov 0x8(%ebp),%eax 80103f02: 8b 55 08 mov 0x8(%ebp),%edx 80103f05: 81 c2 34 02 00 00 add $0x234,%edx 80103f0b: 89 44 24 04 mov %eax,0x4(%esp) 80103f0f: 89 14 24 mov %edx,(%esp) 80103f12: e8 eb 0c 00 00 call 80104c02 <sleep> piperead(struct pipe *p, char *addr, int n) { int i; acquire(&p->lock); while(p->nread == p->nwrite && p->writeopen){ //DOC: pipe-empty 80103f17: 8b 45 08 mov 0x8(%ebp),%eax 80103f1a: 8b 90 34 02 00 00 mov 0x234(%eax),%edx 80103f20: 8b 45 08 mov 0x8(%ebp),%eax 80103f23: 8b 80 38 02 00 00 mov 0x238(%eax),%eax 80103f29: 39 c2 cmp %eax,%edx 80103f2b: 75 0d jne 80103f3a <piperead+0x71> 80103f2d: 8b 45 08 mov 0x8(%ebp),%eax 80103f30: 8b 80 40 02 00 00 mov 0x240(%eax),%eax 80103f36: 85 c0 test %eax,%eax 80103f38: 75 a3 jne 80103edd <piperead+0x14> release(&p->lock); return -1; } sleep(&p->nread, &p->lock); //DOC: piperead-sleep } for(i = 0; i < n; i++){ //DOC: piperead-copy 80103f3a: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) 80103f41: eb 49 jmp 80103f8c <piperead+0xc3> if(p->nread == p->nwrite) 80103f43: 8b 45 08 mov 0x8(%ebp),%eax 80103f46: 8b 90 34 02 00 00 mov 0x234(%eax),%edx 80103f4c: 8b 45 08 mov 0x8(%ebp),%eax 80103f4f: 8b 80 38 02 00 00 mov 0x238(%eax),%eax 80103f55: 39 c2 cmp %eax,%edx 80103f57: 74 3d je 80103f96 <piperead+0xcd> break; addr[i] = p->data[p->nread++ % PIPESIZE]; 80103f59: 8b 45 f4 mov -0xc(%ebp),%eax 80103f5c: 89 c2 mov %eax,%edx 80103f5e: 03 55 0c add 0xc(%ebp),%edx 80103f61: 8b 45 08 mov 0x8(%ebp),%eax 80103f64: 8b 80 34 02 00 00 mov 0x234(%eax),%eax 80103f6a: 89 c3 mov %eax,%ebx 80103f6c: 81 e3 ff 01 00 00 and $0x1ff,%ebx 80103f72: 8b 4d 08 mov 0x8(%ebp),%ecx 80103f75: 0f b6 4c 19 34 movzbl 0x34(%ecx,%ebx,1),%ecx 80103f7a: 88 0a mov %cl,(%edx) 80103f7c: 8d 50 01 lea 0x1(%eax),%edx 80103f7f: 8b 45 08 mov 0x8(%ebp),%eax 80103f82: 89 90 34 02 00 00 mov %edx,0x234(%eax) release(&p->lock); return -1; } sleep(&p->nread, &p->lock); //DOC: piperead-sleep } for(i = 0; i < n; i++){ //DOC: piperead-copy 80103f88: 83 45 f4 01 addl $0x1,-0xc(%ebp) 80103f8c: 8b 45 f4 mov -0xc(%ebp),%eax 80103f8f: 3b 45 10 cmp 0x10(%ebp),%eax 80103f92: 7c af jl 80103f43 <piperead+0x7a> 80103f94: eb 01 jmp 80103f97 <piperead+0xce> if(p->nread == p->nwrite) break; 80103f96: 90 nop addr[i] = p->data[p->nread++ % PIPESIZE]; } wakeup(&p->nwrite); //DOC: piperead-wakeup 80103f97: 8b 45 08 mov 0x8(%ebp),%eax 80103f9a: 05 38 02 00 00 add $0x238,%eax 80103f9f: 89 04 24 mov %eax,(%esp) 80103fa2: e8 a1 0d 00 00 call 80104d48 <wakeup> release(&p->lock); 80103fa7: 8b 45 08 mov 0x8(%ebp),%eax 80103faa: 89 04 24 mov %eax,(%esp) 80103fad: e8 2a 10 00 00 call 80104fdc <release> return i; 80103fb2: 8b 45 f4 mov -0xc(%ebp),%eax } 80103fb5: 83 c4 24 add $0x24,%esp 80103fb8: 5b pop %ebx 80103fb9: 5d pop %ebp 80103fba: c3 ret ... 80103fbc <readeflags>: asm volatile("ltr %0" : : "r" (sel)); } static inline uint readeflags(void) { 80103fbc: 55 push %ebp 80103fbd: 89 e5 mov %esp,%ebp 80103fbf: 83 ec 10 sub $0x10,%esp uint eflags; asm volatile("pushfl; popl %0" : "=r" (eflags)); 80103fc2: 9c pushf 80103fc3: 58 pop %eax 80103fc4: 89 45 fc mov %eax,-0x4(%ebp) return eflags; 80103fc7: 8b 45 fc mov -0x4(%ebp),%eax } 80103fca: c9 leave 80103fcb: c3 ret 80103fcc <sti>: asm volatile("cli"); } static inline void sti(void) { 80103fcc: 55 push %ebp 80103fcd: 89 e5 mov %esp,%ebp asm volatile("sti"); 80103fcf: fb sti } 80103fd0: 5d pop %ebp 80103fd1: c3 ret 80103fd2 <memcop>: static void wakeup1(void *chan); void* memcop(void *dst, void *src, uint n) { 80103fd2: 55 push %ebp 80103fd3: 89 e5 mov %esp,%ebp 80103fd5: 83 ec 10 sub $0x10,%esp const char *s; char *d; s = src; 80103fd8: 8b 45 0c mov 0xc(%ebp),%eax 80103fdb: 89 45 f8 mov %eax,-0x8(%ebp) d = dst; 80103fde: 8b 45 08 mov 0x8(%ebp),%eax 80103fe1: 89 45 fc mov %eax,-0x4(%ebp) if(s < d && s + n > d){ 80103fe4: 8b 45 f8 mov -0x8(%ebp),%eax 80103fe7: 3b 45 fc cmp -0x4(%ebp),%eax 80103fea: 73 55 jae 80104041 <memcop+0x6f> 80103fec: 8b 45 10 mov 0x10(%ebp),%eax 80103fef: 8b 55 f8 mov -0x8(%ebp),%edx 80103ff2: 8d 04 02 lea (%edx,%eax,1),%eax 80103ff5: 3b 45 fc cmp -0x4(%ebp),%eax 80103ff8: 76 4a jbe 80104044 <memcop+0x72> s += n; 80103ffa: 8b 45 10 mov 0x10(%ebp),%eax 80103ffd: 01 45 f8 add %eax,-0x8(%ebp) d += n; 80104000: 8b 45 10 mov 0x10(%ebp),%eax 80104003: 01 45 fc add %eax,-0x4(%ebp) while(n-- > 0) 80104006: eb 13 jmp 8010401b <memcop+0x49> *--d = *--s; 80104008: 83 6d fc 01 subl $0x1,-0x4(%ebp) 8010400c: 83 6d f8 01 subl $0x1,-0x8(%ebp) 80104010: 8b 45 f8 mov -0x8(%ebp),%eax 80104013: 0f b6 10 movzbl (%eax),%edx 80104016: 8b 45 fc mov -0x4(%ebp),%eax 80104019: 88 10 mov %dl,(%eax) s = src; d = dst; if(s < d && s + n > d){ s += n; d += n; while(n-- > 0) 8010401b: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 8010401f: 0f 95 c0 setne %al 80104022: 83 6d 10 01 subl $0x1,0x10(%ebp) 80104026: 84 c0 test %al,%al 80104028: 75 de jne 80104008 <memcop+0x36> const char *s; char *d; s = src; d = dst; if(s < d && s + n > d){ 8010402a: eb 28 jmp 80104054 <memcop+0x82> d += n; while(n-- > 0) *--d = *--s; } else while(n-- > 0) *d++ = *s++; 8010402c: 8b 45 f8 mov -0x8(%ebp),%eax 8010402f: 0f b6 10 movzbl (%eax),%edx 80104032: 8b 45 fc mov -0x4(%ebp),%eax 80104035: 88 10 mov %dl,(%eax) 80104037: 83 45 fc 01 addl $0x1,-0x4(%ebp) 8010403b: 83 45 f8 01 addl $0x1,-0x8(%ebp) 8010403f: eb 04 jmp 80104045 <memcop+0x73> s += n; d += n; while(n-- > 0) *--d = *--s; } else while(n-- > 0) 80104041: 90 nop 80104042: eb 01 jmp 80104045 <memcop+0x73> 80104044: 90 nop 80104045: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 80104049: 0f 95 c0 setne %al 8010404c: 83 6d 10 01 subl $0x1,0x10(%ebp) 80104050: 84 c0 test %al,%al 80104052: 75 d8 jne 8010402c <memcop+0x5a> *d++ = *s++; return dst; 80104054: 8b 45 08 mov 0x8(%ebp),%eax } 80104057: c9 leave 80104058: c3 ret 80104059 <pinit>: void pinit(void) { 80104059: 55 push %ebp 8010405a: 89 e5 mov %esp,%ebp 8010405c: 83 ec 18 sub $0x18,%esp initlock(&ptable.lock, "ptable"); 8010405f: c7 44 24 04 dc 88 10 movl $0x801088dc,0x4(%esp) 80104066: 80 80104067: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 8010406e: e8 e7 0e 00 00 call 80104f5a <initlock> } 80104073: c9 leave 80104074: c3 ret 80104075 <allocproc>: // If found, change state to EMBRYO and initialize // state required to run in the kernel. // Otherwise return 0. static struct proc* allocproc(void) { 80104075: 55 push %ebp 80104076: 89 e5 mov %esp,%ebp 80104078: 83 ec 28 sub $0x28,%esp struct proc *p; char *sp; acquire(&ptable.lock); 8010407b: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 80104082: e8 f4 0e 00 00 call 80104f7b <acquire> for(p = ptable.proc; p < &ptable.proc[NPROC]; p++) 80104087: c7 45 f0 74 ff 10 80 movl $0x8010ff74,-0x10(%ebp) 8010408e: eb 11 jmp 801040a1 <allocproc+0x2c> if(p->state == UNUSED) 80104090: 8b 45 f0 mov -0x10(%ebp),%eax 80104093: 8b 40 0c mov 0xc(%eax),%eax 80104096: 85 c0 test %eax,%eax 80104098: 74 27 je 801040c1 <allocproc+0x4c> { struct proc *p; char *sp; acquire(&ptable.lock); for(p = ptable.proc; p < &ptable.proc[NPROC]; p++) 8010409a: 81 45 f0 84 00 00 00 addl $0x84,-0x10(%ebp) 801040a1: b8 74 20 11 80 mov $0x80112074,%eax 801040a6: 39 45 f0 cmp %eax,-0x10(%ebp) 801040a9: 72 e5 jb 80104090 <allocproc+0x1b> if(p->state == UNUSED) goto found; release(&ptable.lock); 801040ab: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 801040b2: e8 25 0f 00 00 call 80104fdc <release> return 0; 801040b7: b8 00 00 00 00 mov $0x0,%eax 801040bc: e9 b5 00 00 00 jmp 80104176 <allocproc+0x101> char *sp; acquire(&ptable.lock); for(p = ptable.proc; p < &ptable.proc[NPROC]; p++) if(p->state == UNUSED) goto found; 801040c1: 90 nop release(&ptable.lock); return 0; found: p->state = EMBRYO; 801040c2: 8b 45 f0 mov -0x10(%ebp),%eax 801040c5: c7 40 0c 01 00 00 00 movl $0x1,0xc(%eax) p->pid = nextpid++; 801040cc: a1 04 b0 10 80 mov 0x8010b004,%eax 801040d1: 8b 55 f0 mov -0x10(%ebp),%edx 801040d4: 89 42 10 mov %eax,0x10(%edx) 801040d7: 83 c0 01 add $0x1,%eax 801040da: a3 04 b0 10 80 mov %eax,0x8010b004 release(&ptable.lock); 801040df: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 801040e6: e8 f1 0e 00 00 call 80104fdc <release> // Allocate kernel stack. if((p->kstack = kalloc()) == 0){ 801040eb: e8 1a ea ff ff call 80102b0a <kalloc> 801040f0: 8b 55 f0 mov -0x10(%ebp),%edx 801040f3: 89 42 08 mov %eax,0x8(%edx) 801040f6: 8b 45 f0 mov -0x10(%ebp),%eax 801040f9: 8b 40 08 mov 0x8(%eax),%eax 801040fc: 85 c0 test %eax,%eax 801040fe: 75 11 jne 80104111 <allocproc+0x9c> p->state = UNUSED; 80104100: 8b 45 f0 mov -0x10(%ebp),%eax 80104103: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) return 0; 8010410a: b8 00 00 00 00 mov $0x0,%eax 8010410f: eb 65 jmp 80104176 <allocproc+0x101> } sp = p->kstack + KSTACKSIZE; 80104111: 8b 45 f0 mov -0x10(%ebp),%eax 80104114: 8b 40 08 mov 0x8(%eax),%eax 80104117: 05 00 10 00 00 add $0x1000,%eax 8010411c: 89 45 f4 mov %eax,-0xc(%ebp) // Leave room for trap frame. sp -= sizeof *p->tf; 8010411f: 83 6d f4 4c subl $0x4c,-0xc(%ebp) p->tf = (struct trapframe*)sp; 80104123: 8b 55 f4 mov -0xc(%ebp),%edx 80104126: 8b 45 f0 mov -0x10(%ebp),%eax 80104129: 89 50 18 mov %edx,0x18(%eax) // Set up new context to start executing at forkret, // which returns to trapret. sp -= 4; 8010412c: 83 6d f4 04 subl $0x4,-0xc(%ebp) *(uint*)sp = (uint)trapret; 80104130: 8b 45 f4 mov -0xc(%ebp),%eax 80104133: ba c0 66 10 80 mov $0x801066c0,%edx 80104138: 89 10 mov %edx,(%eax) sp -= sizeof *p->context; 8010413a: 83 6d f4 14 subl $0x14,-0xc(%ebp) p->context = (struct context*)sp; 8010413e: 8b 55 f4 mov -0xc(%ebp),%edx 80104141: 8b 45 f0 mov -0x10(%ebp),%eax 80104144: 89 50 1c mov %edx,0x1c(%eax) memset(p->context, 0, sizeof *p->context); 80104147: 8b 45 f0 mov -0x10(%ebp),%eax 8010414a: 8b 40 1c mov 0x1c(%eax),%eax 8010414d: c7 44 24 08 14 00 00 movl $0x14,0x8(%esp) 80104154: 00 80104155: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 8010415c: 00 8010415d: 89 04 24 mov %eax,(%esp) 80104160: e8 65 10 00 00 call 801051ca <memset> p->context->eip = (uint)forkret; 80104165: 8b 45 f0 mov -0x10(%ebp),%eax 80104168: 8b 40 1c mov 0x1c(%eax),%eax 8010416b: ba d6 4b 10 80 mov $0x80104bd6,%edx 80104170: 89 50 10 mov %edx,0x10(%eax) return p; 80104173: 8b 45 f0 mov -0x10(%ebp),%eax } 80104176: c9 leave 80104177: c3 ret 80104178 <userinit>: //PAGEBREAK: 32 // Set up first user process. void userinit(void) { 80104178: 55 push %ebp 80104179: 89 e5 mov %esp,%ebp 8010417b: 83 ec 28 sub $0x28,%esp struct proc *p; extern char _binary_initcode_start[], _binary_initcode_size[]; p = allocproc(); 8010417e: e8 f2 fe ff ff call 80104075 <allocproc> 80104183: 89 45 f4 mov %eax,-0xc(%ebp) initproc = p; 80104186: 8b 45 f4 mov -0xc(%ebp),%eax 80104189: a3 68 b6 10 80 mov %eax,0x8010b668 if((p->pgdir = setupkvm()) == 0) 8010418e: e8 16 3c 00 00 call 80107da9 <setupkvm> 80104193: 8b 55 f4 mov -0xc(%ebp),%edx 80104196: 89 42 04 mov %eax,0x4(%edx) 80104199: 8b 45 f4 mov -0xc(%ebp),%eax 8010419c: 8b 40 04 mov 0x4(%eax),%eax 8010419f: 85 c0 test %eax,%eax 801041a1: 75 0c jne 801041af <userinit+0x37> panic("userinit: out of memory?"); 801041a3: c7 04 24 e3 88 10 80 movl $0x801088e3,(%esp) 801041aa: e8 8b c3 ff ff call 8010053a <panic> inituvm(p->pgdir, _binary_initcode_start, (int)_binary_initcode_size); 801041af: ba 2c 00 00 00 mov $0x2c,%edx 801041b4: 8b 45 f4 mov -0xc(%ebp),%eax 801041b7: 8b 40 04 mov 0x4(%eax),%eax 801041ba: 89 54 24 08 mov %edx,0x8(%esp) 801041be: c7 44 24 04 00 b5 10 movl $0x8010b500,0x4(%esp) 801041c5: 80 801041c6: 89 04 24 mov %eax,(%esp) 801041c9: e8 34 3e 00 00 call 80108002 <inituvm> p->sz = PGSIZE; 801041ce: 8b 45 f4 mov -0xc(%ebp),%eax 801041d1: c7 00 00 10 00 00 movl $0x1000,(%eax) memset(p->tf, 0, sizeof(*p->tf)); 801041d7: 8b 45 f4 mov -0xc(%ebp),%eax 801041da: 8b 40 18 mov 0x18(%eax),%eax 801041dd: c7 44 24 08 4c 00 00 movl $0x4c,0x8(%esp) 801041e4: 00 801041e5: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 801041ec: 00 801041ed: 89 04 24 mov %eax,(%esp) 801041f0: e8 d5 0f 00 00 call 801051ca <memset> p->tf->cs = (SEG_UCODE << 3) | DPL_USER; 801041f5: 8b 45 f4 mov -0xc(%ebp),%eax 801041f8: 8b 40 18 mov 0x18(%eax),%eax 801041fb: 66 c7 40 3c 23 00 movw $0x23,0x3c(%eax) p->tf->ds = (SEG_UDATA << 3) | DPL_USER; 80104201: 8b 45 f4 mov -0xc(%ebp),%eax 80104204: 8b 40 18 mov 0x18(%eax),%eax 80104207: 66 c7 40 2c 2b 00 movw $0x2b,0x2c(%eax) p->tf->es = p->tf->ds; 8010420d: 8b 45 f4 mov -0xc(%ebp),%eax 80104210: 8b 40 18 mov 0x18(%eax),%eax 80104213: 8b 55 f4 mov -0xc(%ebp),%edx 80104216: 8b 52 18 mov 0x18(%edx),%edx 80104219: 0f b7 52 2c movzwl 0x2c(%edx),%edx 8010421d: 66 89 50 28 mov %dx,0x28(%eax) p->tf->ss = p->tf->ds; 80104221: 8b 45 f4 mov -0xc(%ebp),%eax 80104224: 8b 40 18 mov 0x18(%eax),%eax 80104227: 8b 55 f4 mov -0xc(%ebp),%edx 8010422a: 8b 52 18 mov 0x18(%edx),%edx 8010422d: 0f b7 52 2c movzwl 0x2c(%edx),%edx 80104231: 66 89 50 48 mov %dx,0x48(%eax) p->tf->eflags = FL_IF; 80104235: 8b 45 f4 mov -0xc(%ebp),%eax 80104238: 8b 40 18 mov 0x18(%eax),%eax 8010423b: c7 40 40 00 02 00 00 movl $0x200,0x40(%eax) p->tf->esp = PGSIZE; 80104242: 8b 45 f4 mov -0xc(%ebp),%eax 80104245: 8b 40 18 mov 0x18(%eax),%eax 80104248: c7 40 44 00 10 00 00 movl $0x1000,0x44(%eax) p->tf->eip = 0; // beginning of initcode.S 8010424f: 8b 45 f4 mov -0xc(%ebp),%eax 80104252: 8b 40 18 mov 0x18(%eax),%eax 80104255: c7 40 38 00 00 00 00 movl $0x0,0x38(%eax) safestrcpy(p->name, "initcode", sizeof(p->name)); 8010425c: 8b 45 f4 mov -0xc(%ebp),%eax 8010425f: 83 c0 6c add $0x6c,%eax 80104262: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp) 80104269: 00 8010426a: c7 44 24 04 fc 88 10 movl $0x801088fc,0x4(%esp) 80104271: 80 80104272: 89 04 24 mov %eax,(%esp) 80104275: e8 83 11 00 00 call 801053fd <safestrcpy> p->cwd = namei("/"); 8010427a: c7 04 24 05 89 10 80 movl $0x80108905,(%esp) 80104281: e8 9d e1 ff ff call 80102423 <namei> 80104286: 8b 55 f4 mov -0xc(%ebp),%edx 80104289: 89 42 68 mov %eax,0x68(%edx) p->state = RUNNABLE; 8010428c: 8b 45 f4 mov -0xc(%ebp),%eax 8010428f: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax) } 80104296: c9 leave 80104297: c3 ret 80104298 <growproc>: // Grow current process's memory by n bytes. // Return 0 on success, -1 on failure. int growproc(int n) { 80104298: 55 push %ebp 80104299: 89 e5 mov %esp,%ebp 8010429b: 83 ec 28 sub $0x28,%esp uint sz; sz = proc->sz; 8010429e: 65 a1 04 00 00 00 mov %gs:0x4,%eax 801042a4: 8b 00 mov (%eax),%eax 801042a6: 89 45 f4 mov %eax,-0xc(%ebp) if(n > 0){ 801042a9: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 801042ad: 7e 34 jle 801042e3 <growproc+0x4b> if((sz = allocuvm(proc->pgdir, sz, sz + n)) == 0) 801042af: 8b 45 08 mov 0x8(%ebp),%eax 801042b2: 89 c2 mov %eax,%edx 801042b4: 03 55 f4 add -0xc(%ebp),%edx 801042b7: 65 a1 04 00 00 00 mov %gs:0x4,%eax 801042bd: 8b 40 04 mov 0x4(%eax),%eax 801042c0: 89 54 24 08 mov %edx,0x8(%esp) 801042c4: 8b 55 f4 mov -0xc(%ebp),%edx 801042c7: 89 54 24 04 mov %edx,0x4(%esp) 801042cb: 89 04 24 mov %eax,(%esp) 801042ce: e8 aa 3e 00 00 call 8010817d <allocuvm> 801042d3: 89 45 f4 mov %eax,-0xc(%ebp) 801042d6: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 801042da: 75 41 jne 8010431d <growproc+0x85> return -1; 801042dc: b8 ff ff ff ff mov $0xffffffff,%eax 801042e1: eb 58 jmp 8010433b <growproc+0xa3> } else if(n < 0){ 801042e3: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 801042e7: 79 34 jns 8010431d <growproc+0x85> if((sz = deallocuvm(proc->pgdir, sz, sz + n)) == 0) 801042e9: 8b 45 08 mov 0x8(%ebp),%eax 801042ec: 89 c2 mov %eax,%edx 801042ee: 03 55 f4 add -0xc(%ebp),%edx 801042f1: 65 a1 04 00 00 00 mov %gs:0x4,%eax 801042f7: 8b 40 04 mov 0x4(%eax),%eax 801042fa: 89 54 24 08 mov %edx,0x8(%esp) 801042fe: 8b 55 f4 mov -0xc(%ebp),%edx 80104301: 89 54 24 04 mov %edx,0x4(%esp) 80104305: 89 04 24 mov %eax,(%esp) 80104308: e8 4a 3f 00 00 call 80108257 <deallocuvm> 8010430d: 89 45 f4 mov %eax,-0xc(%ebp) 80104310: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 80104314: 75 07 jne 8010431d <growproc+0x85> return -1; 80104316: b8 ff ff ff ff mov $0xffffffff,%eax 8010431b: eb 1e jmp 8010433b <growproc+0xa3> } proc->sz = sz; 8010431d: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80104323: 8b 55 f4 mov -0xc(%ebp),%edx 80104326: 89 10 mov %edx,(%eax) switchuvm(proc); 80104328: 65 a1 04 00 00 00 mov %gs:0x4,%eax 8010432e: 89 04 24 mov %eax,(%esp) 80104331: e8 65 3b 00 00 call 80107e9b <switchuvm> return 0; 80104336: b8 00 00 00 00 mov $0x0,%eax } 8010433b: c9 leave 8010433c: c3 ret 8010433d <fork>: // Create a new process copying p as the parent. // Sets up stack to return as if from system call. // Caller must set state of returned proc to RUNNABLE. int fork(void) { 8010433d: 55 push %ebp 8010433e: 89 e5 mov %esp,%ebp 80104340: 57 push %edi 80104341: 56 push %esi 80104342: 53 push %ebx 80104343: 83 ec 2c sub $0x2c,%esp int i, pid; struct proc *np; // Allocate process. if((np = allocproc()) == 0) 80104346: e8 2a fd ff ff call 80104075 <allocproc> 8010434b: 89 45 e4 mov %eax,-0x1c(%ebp) 8010434e: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 80104352: 75 0a jne 8010435e <fork+0x21> return -1; 80104354: b8 ff ff ff ff mov $0xffffffff,%eax 80104359: e9 47 01 00 00 jmp 801044a5 <fork+0x168> // Copy process state from p. if((np->pgdir = copyuvm(proc->pgdir, proc->sz)) == 0){ 8010435e: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80104364: 8b 10 mov (%eax),%edx 80104366: 65 a1 04 00 00 00 mov %gs:0x4,%eax 8010436c: 8b 40 04 mov 0x4(%eax),%eax 8010436f: 89 54 24 04 mov %edx,0x4(%esp) 80104373: 89 04 24 mov %eax,(%esp) 80104376: e8 6c 40 00 00 call 801083e7 <copyuvm> 8010437b: 8b 55 e4 mov -0x1c(%ebp),%edx 8010437e: 89 42 04 mov %eax,0x4(%edx) 80104381: 8b 45 e4 mov -0x1c(%ebp),%eax 80104384: 8b 40 04 mov 0x4(%eax),%eax 80104387: 85 c0 test %eax,%eax 80104389: 75 2c jne 801043b7 <fork+0x7a> kfree(np->kstack); 8010438b: 8b 45 e4 mov -0x1c(%ebp),%eax 8010438e: 8b 40 08 mov 0x8(%eax),%eax 80104391: 89 04 24 mov %eax,(%esp) 80104394: e8 d8 e6 ff ff call 80102a71 <kfree> np->kstack = 0; 80104399: 8b 45 e4 mov -0x1c(%ebp),%eax 8010439c: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) np->state = UNUSED; 801043a3: 8b 45 e4 mov -0x1c(%ebp),%eax 801043a6: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) return -1; 801043ad: b8 ff ff ff ff mov $0xffffffff,%eax 801043b2: e9 ee 00 00 00 jmp 801044a5 <fork+0x168> } np->sz = proc->sz; 801043b7: 65 a1 04 00 00 00 mov %gs:0x4,%eax 801043bd: 8b 10 mov (%eax),%edx 801043bf: 8b 45 e4 mov -0x1c(%ebp),%eax 801043c2: 89 10 mov %edx,(%eax) np->parent = proc; 801043c4: 65 8b 15 04 00 00 00 mov %gs:0x4,%edx 801043cb: 8b 45 e4 mov -0x1c(%ebp),%eax 801043ce: 89 50 14 mov %edx,0x14(%eax) *np->tf = *proc->tf; 801043d1: 8b 45 e4 mov -0x1c(%ebp),%eax 801043d4: 8b 50 18 mov 0x18(%eax),%edx 801043d7: 65 a1 04 00 00 00 mov %gs:0x4,%eax 801043dd: 8b 40 18 mov 0x18(%eax),%eax 801043e0: 89 c3 mov %eax,%ebx 801043e2: b8 13 00 00 00 mov $0x13,%eax 801043e7: 89 d7 mov %edx,%edi 801043e9: 89 de mov %ebx,%esi 801043eb: 89 c1 mov %eax,%ecx 801043ed: f3 a5 rep movsl %ds:(%esi),%es:(%edi) np->isthread = 0; 801043ef: 8b 45 e4 mov -0x1c(%ebp),%eax 801043f2: c7 80 80 00 00 00 00 movl $0x0,0x80(%eax) 801043f9: 00 00 00 // Clear %eax so that fork returns 0 in the child. np->tf->eax = 0; 801043fc: 8b 45 e4 mov -0x1c(%ebp),%eax 801043ff: 8b 40 18 mov 0x18(%eax),%eax 80104402: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) for(i = 0; i < NOFILE; i++) 80104409: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) 80104410: eb 3d jmp 8010444f <fork+0x112> if(proc->ofile[i]) 80104412: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80104418: 8b 55 dc mov -0x24(%ebp),%edx 8010441b: 83 c2 08 add $0x8,%edx 8010441e: 8b 44 90 08 mov 0x8(%eax,%edx,4),%eax 80104422: 85 c0 test %eax,%eax 80104424: 74 25 je 8010444b <fork+0x10e> np->ofile[i] = filedup(proc->ofile[i]); 80104426: 8b 5d dc mov -0x24(%ebp),%ebx 80104429: 65 a1 04 00 00 00 mov %gs:0x4,%eax 8010442f: 8b 55 dc mov -0x24(%ebp),%edx 80104432: 83 c2 08 add $0x8,%edx 80104435: 8b 44 90 08 mov 0x8(%eax,%edx,4),%eax 80104439: 89 04 24 mov %eax,(%esp) 8010443c: e8 44 cb ff ff call 80100f85 <filedup> 80104441: 8b 55 e4 mov -0x1c(%ebp),%edx 80104444: 8d 4b 08 lea 0x8(%ebx),%ecx 80104447: 89 44 8a 08 mov %eax,0x8(%edx,%ecx,4) np->isthread = 0; // Clear %eax so that fork returns 0 in the child. np->tf->eax = 0; for(i = 0; i < NOFILE; i++) 8010444b: 83 45 dc 01 addl $0x1,-0x24(%ebp) 8010444f: 83 7d dc 0f cmpl $0xf,-0x24(%ebp) 80104453: 7e bd jle 80104412 <fork+0xd5> if(proc->ofile[i]) np->ofile[i] = filedup(proc->ofile[i]); np->cwd = idup(proc->cwd); 80104455: 65 a1 04 00 00 00 mov %gs:0x4,%eax 8010445b: 8b 40 68 mov 0x68(%eax),%eax 8010445e: 89 04 24 mov %eax,(%esp) 80104461: e8 e3 d3 ff ff call 80101849 <idup> 80104466: 8b 55 e4 mov -0x1c(%ebp),%edx 80104469: 89 42 68 mov %eax,0x68(%edx) pid = np->pid; 8010446c: 8b 45 e4 mov -0x1c(%ebp),%eax 8010446f: 8b 40 10 mov 0x10(%eax),%eax 80104472: 89 45 e0 mov %eax,-0x20(%ebp) np->state = RUNNABLE; 80104475: 8b 45 e4 mov -0x1c(%ebp),%eax 80104478: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax) safestrcpy(np->name, proc->name, sizeof(proc->name)); 8010447f: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80104485: 8d 50 6c lea 0x6c(%eax),%edx 80104488: 8b 45 e4 mov -0x1c(%ebp),%eax 8010448b: 83 c0 6c add $0x6c,%eax 8010448e: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp) 80104495: 00 80104496: 89 54 24 04 mov %edx,0x4(%esp) 8010449a: 89 04 24 mov %eax,(%esp) 8010449d: e8 5b 0f 00 00 call 801053fd <safestrcpy> return pid; 801044a2: 8b 45 e0 mov -0x20(%ebp),%eax } 801044a5: 83 c4 2c add $0x2c,%esp 801044a8: 5b pop %ebx 801044a9: 5e pop %esi 801044aa: 5f pop %edi 801044ab: 5d pop %ebp 801044ac: c3 ret 801044ad <clone>: //creat a new process but used parent pgdir. int clone(int stack, int size, int routine, int arg){ 801044ad: 55 push %ebp 801044ae: 89 e5 mov %esp,%ebp 801044b0: 57 push %edi 801044b1: 56 push %esi 801044b2: 53 push %ebx 801044b3: 81 ec bc 00 00 00 sub $0xbc,%esp int i, pid; struct proc *np; //cprintf("in clone\n"); // Allocate process. if((np = allocproc()) == 0) 801044b9: e8 b7 fb ff ff call 80104075 <allocproc> 801044be: 89 45 dc mov %eax,-0x24(%ebp) 801044c1: 83 7d dc 00 cmpl $0x0,-0x24(%ebp) 801044c5: 75 0a jne 801044d1 <clone+0x24> return -1; 801044c7: b8 ff ff ff ff mov $0xffffffff,%eax 801044cc: e9 f4 01 00 00 jmp 801046c5 <clone+0x218> if((stack % PGSIZE) != 0 || stack == 0 || routine == 0) 801044d1: 8b 45 08 mov 0x8(%ebp),%eax 801044d4: 25 ff 0f 00 00 and $0xfff,%eax 801044d9: 85 c0 test %eax,%eax 801044db: 75 0c jne 801044e9 <clone+0x3c> 801044dd: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 801044e1: 74 06 je 801044e9 <clone+0x3c> 801044e3: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 801044e7: 75 0a jne 801044f3 <clone+0x46> return -1; 801044e9: b8 ff ff ff ff mov $0xffffffff,%eax 801044ee: e9 d2 01 00 00 jmp 801046c5 <clone+0x218> np->pgdir = proc->pgdir; 801044f3: 65 a1 04 00 00 00 mov %gs:0x4,%eax 801044f9: 8b 50 04 mov 0x4(%eax),%edx 801044fc: 8b 45 dc mov -0x24(%ebp),%eax 801044ff: 89 50 04 mov %edx,0x4(%eax) np->sz = proc->sz; 80104502: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80104508: 8b 10 mov (%eax),%edx 8010450a: 8b 45 dc mov -0x24(%ebp),%eax 8010450d: 89 10 mov %edx,(%eax) np->parent = proc; 8010450f: 65 8b 15 04 00 00 00 mov %gs:0x4,%edx 80104516: 8b 45 dc mov -0x24(%ebp),%eax 80104519: 89 50 14 mov %edx,0x14(%eax) *np->tf = *proc->tf; 8010451c: 8b 45 dc mov -0x24(%ebp),%eax 8010451f: 8b 50 18 mov 0x18(%eax),%edx 80104522: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80104528: 8b 40 18 mov 0x18(%eax),%eax 8010452b: 89 c3 mov %eax,%ebx 8010452d: b8 13 00 00 00 mov $0x13,%eax 80104532: 89 d7 mov %edx,%edi 80104534: 89 de mov %ebx,%esi 80104536: 89 c1 mov %eax,%ecx 80104538: f3 a5 rep movsl %ds:(%esi),%es:(%edi) np->isthread = 1; 8010453a: 8b 45 dc mov -0x24(%ebp),%eax 8010453d: c7 80 80 00 00 00 01 movl $0x1,0x80(%eax) 80104544: 00 00 00 pid = np->pid; 80104547: 8b 45 dc mov -0x24(%ebp),%eax 8010454a: 8b 40 10 mov 0x10(%eax),%eax 8010454d: 89 45 d8 mov %eax,-0x28(%ebp) struct proc *pp; pp = proc; 80104550: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80104556: 89 45 e0 mov %eax,-0x20(%ebp) while(pp->isthread == 1){ 80104559: eb 09 jmp 80104564 <clone+0xb7> pp = pp->parent; 8010455b: 8b 45 e0 mov -0x20(%ebp),%eax 8010455e: 8b 40 14 mov 0x14(%eax),%eax 80104561: 89 45 e0 mov %eax,-0x20(%ebp) np->isthread = 1; pid = np->pid; struct proc *pp; pp = proc; while(pp->isthread == 1){ 80104564: 8b 45 e0 mov -0x20(%ebp),%eax 80104567: 8b 80 80 00 00 00 mov 0x80(%eax),%eax 8010456d: 83 f8 01 cmp $0x1,%eax 80104570: 74 e9 je 8010455b <clone+0xae> pp = pp->parent; } np->parent = pp; 80104572: 8b 45 dc mov -0x24(%ebp),%eax 80104575: 8b 55 e0 mov -0x20(%ebp),%edx 80104578: 89 50 14 mov %edx,0x14(%eax) //need to be modified as point to the same address //*np->ofile = *proc->ofile; for(i = 0; i < NOFILE; i++) 8010457b: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) 80104582: eb 3d jmp 801045c1 <clone+0x114> if(proc->ofile[i]) 80104584: 65 a1 04 00 00 00 mov %gs:0x4,%eax 8010458a: 8b 55 d4 mov -0x2c(%ebp),%edx 8010458d: 83 c2 08 add $0x8,%edx 80104590: 8b 44 90 08 mov 0x8(%eax,%edx,4),%eax 80104594: 85 c0 test %eax,%eax 80104596: 74 25 je 801045bd <clone+0x110> np->ofile[i] = filedup(proc->ofile[i]); 80104598: 8b 5d d4 mov -0x2c(%ebp),%ebx 8010459b: 65 a1 04 00 00 00 mov %gs:0x4,%eax 801045a1: 8b 55 d4 mov -0x2c(%ebp),%edx 801045a4: 83 c2 08 add $0x8,%edx 801045a7: 8b 44 90 08 mov 0x8(%eax,%edx,4),%eax 801045ab: 89 04 24 mov %eax,(%esp) 801045ae: e8 d2 c9 ff ff call 80100f85 <filedup> 801045b3: 8b 55 dc mov -0x24(%ebp),%edx 801045b6: 8d 4b 08 lea 0x8(%ebx),%ecx 801045b9: 89 44 8a 08 mov %eax,0x8(%edx,%ecx,4) pp = pp->parent; } np->parent = pp; //need to be modified as point to the same address //*np->ofile = *proc->ofile; for(i = 0; i < NOFILE; i++) 801045bd: 83 45 d4 01 addl $0x1,-0x2c(%ebp) 801045c1: 83 7d d4 0f cmpl $0xf,-0x2c(%ebp) 801045c5: 7e bd jle 80104584 <clone+0xd7> if(proc->ofile[i]) np->ofile[i] = filedup(proc->ofile[i]); // Clear %eax so that fork returns 0 in the child. np->tf->eax = 0; 801045c7: 8b 45 dc mov -0x24(%ebp),%eax 801045ca: 8b 40 18 mov 0x18(%eax),%eax 801045cd: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) uint ustack[MAXARG]; uint sp = stack + PGSIZE; 801045d4: 8b 45 08 mov 0x8(%ebp),%eax 801045d7: 05 00 10 00 00 add $0x1000,%eax 801045dc: 89 45 e4 mov %eax,-0x1c(%ebp) // //modify here <<<<< np->tf->ebp = sp; 801045df: 8b 45 dc mov -0x24(%ebp),%eax 801045e2: 8b 40 18 mov 0x18(%eax),%eax 801045e5: 8b 55 e4 mov -0x1c(%ebp),%edx 801045e8: 89 50 08 mov %edx,0x8(%eax) ustack[0] = 0xffffffff; 801045eb: c7 85 54 ff ff ff ff movl $0xffffffff,-0xac(%ebp) 801045f2: ff ff ff ustack[1] = arg; 801045f5: 8b 45 14 mov 0x14(%ebp),%eax 801045f8: 89 85 58 ff ff ff mov %eax,-0xa8(%ebp) sp -= 8; 801045fe: 83 6d e4 08 subl $0x8,-0x1c(%ebp) if(copyout(np->pgdir,sp,ustack,8)<0){ 80104602: 8b 45 dc mov -0x24(%ebp),%eax 80104605: 8b 40 04 mov 0x4(%eax),%eax 80104608: c7 44 24 0c 08 00 00 movl $0x8,0xc(%esp) 8010460f: 00 80104610: 8d 95 54 ff ff ff lea -0xac(%ebp),%edx 80104616: 89 54 24 08 mov %edx,0x8(%esp) 8010461a: 8b 55 e4 mov -0x1c(%ebp),%edx 8010461d: 89 54 24 04 mov %edx,0x4(%esp) 80104621: 89 04 24 mov %eax,(%esp) 80104624: e8 3d 3f 00 00 call 80108566 <copyout> 80104629: 85 c0 test %eax,%eax 8010462b: 79 16 jns 80104643 <clone+0x196> cprintf("push arg fails\n"); 8010462d: c7 04 24 07 89 10 80 movl $0x80108907,(%esp) 80104634: e8 61 bd ff ff call 8010039a <cprintf> return -1; 80104639: b8 ff ff ff ff mov $0xffffffff,%eax 8010463e: e9 82 00 00 00 jmp 801046c5 <clone+0x218> } np->tf->eip = routine; 80104643: 8b 45 dc mov -0x24(%ebp),%eax 80104646: 8b 40 18 mov 0x18(%eax),%eax 80104649: 8b 55 10 mov 0x10(%ebp),%edx 8010464c: 89 50 38 mov %edx,0x38(%eax) np->tf->esp = sp; 8010464f: 8b 45 dc mov -0x24(%ebp),%eax 80104652: 8b 40 18 mov 0x18(%eax),%eax 80104655: 8b 55 e4 mov -0x1c(%ebp),%edx 80104658: 89 50 44 mov %edx,0x44(%eax) np->cwd = idup(proc->cwd); 8010465b: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80104661: 8b 40 68 mov 0x68(%eax),%eax 80104664: 89 04 24 mov %eax,(%esp) 80104667: e8 dd d1 ff ff call 80101849 <idup> 8010466c: 8b 55 dc mov -0x24(%ebp),%edx 8010466f: 89 42 68 mov %eax,0x68(%edx) switchuvm(np); 80104672: 8b 45 dc mov -0x24(%ebp),%eax 80104675: 89 04 24 mov %eax,(%esp) 80104678: e8 1e 38 00 00 call 80107e9b <switchuvm> acquire(&ptable.lock); 8010467d: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 80104684: e8 f2 08 00 00 call 80104f7b <acquire> np->state = RUNNABLE; 80104689: 8b 45 dc mov -0x24(%ebp),%eax 8010468c: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax) release(&ptable.lock); 80104693: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 8010469a: e8 3d 09 00 00 call 80104fdc <release> safestrcpy(np->name, proc->name, sizeof(proc->name)); 8010469f: 65 a1 04 00 00 00 mov %gs:0x4,%eax 801046a5: 8d 50 6c lea 0x6c(%eax),%edx 801046a8: 8b 45 dc mov -0x24(%ebp),%eax 801046ab: 83 c0 6c add $0x6c,%eax 801046ae: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp) 801046b5: 00 801046b6: 89 54 24 04 mov %edx,0x4(%esp) 801046ba: 89 04 24 mov %eax,(%esp) 801046bd: e8 3b 0d 00 00 call 801053fd <safestrcpy> return pid; 801046c2: 8b 45 d8 mov -0x28(%ebp),%eax } 801046c5: 81 c4 bc 00 00 00 add $0xbc,%esp 801046cb: 5b pop %ebx 801046cc: 5e pop %esi 801046cd: 5f pop %edi 801046ce: 5d pop %ebp 801046cf: c3 ret 801046d0 <exit>: // Exit the current process. Does not return. // An exited process remains in the zombie state // until its parent calls wait() to find out it exited. void exit(void) { 801046d0: 55 push %ebp 801046d1: 89 e5 mov %esp,%ebp 801046d3: 83 ec 28 sub $0x28,%esp struct proc *p; int fd; if(proc == initproc) 801046d6: 65 8b 15 04 00 00 00 mov %gs:0x4,%edx 801046dd: a1 68 b6 10 80 mov 0x8010b668,%eax 801046e2: 39 c2 cmp %eax,%edx 801046e4: 75 0c jne 801046f2 <exit+0x22> panic("init exiting"); 801046e6: c7 04 24 17 89 10 80 movl $0x80108917,(%esp) 801046ed: e8 48 be ff ff call 8010053a <panic> // Close all open files. for(fd = 0; fd < NOFILE; fd++){ 801046f2: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) 801046f9: eb 44 jmp 8010473f <exit+0x6f> if(proc->ofile[fd]){ 801046fb: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80104701: 8b 55 f4 mov -0xc(%ebp),%edx 80104704: 83 c2 08 add $0x8,%edx 80104707: 8b 44 90 08 mov 0x8(%eax,%edx,4),%eax 8010470b: 85 c0 test %eax,%eax 8010470d: 74 2c je 8010473b <exit+0x6b> fileclose(proc->ofile[fd]); 8010470f: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80104715: 8b 55 f4 mov -0xc(%ebp),%edx 80104718: 83 c2 08 add $0x8,%edx 8010471b: 8b 44 90 08 mov 0x8(%eax,%edx,4),%eax 8010471f: 89 04 24 mov %eax,(%esp) 80104722: e8 a6 c8 ff ff call 80100fcd <fileclose> proc->ofile[fd] = 0; 80104727: 65 a1 04 00 00 00 mov %gs:0x4,%eax 8010472d: 8b 55 f4 mov -0xc(%ebp),%edx 80104730: 83 c2 08 add $0x8,%edx 80104733: c7 44 90 08 00 00 00 movl $0x0,0x8(%eax,%edx,4) 8010473a: 00 if(proc == initproc) panic("init exiting"); // Close all open files. for(fd = 0; fd < NOFILE; fd++){ 8010473b: 83 45 f4 01 addl $0x1,-0xc(%ebp) 8010473f: 83 7d f4 0f cmpl $0xf,-0xc(%ebp) 80104743: 7e b6 jle 801046fb <exit+0x2b> fileclose(proc->ofile[fd]); proc->ofile[fd] = 0; } } iput(proc->cwd); 80104745: 65 a1 04 00 00 00 mov %gs:0x4,%eax 8010474b: 8b 40 68 mov 0x68(%eax),%eax 8010474e: 89 04 24 mov %eax,(%esp) 80104751: e8 db d2 ff ff call 80101a31 <iput> proc->cwd = 0; 80104756: 65 a1 04 00 00 00 mov %gs:0x4,%eax 8010475c: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax) acquire(&ptable.lock); 80104763: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 8010476a: e8 0c 08 00 00 call 80104f7b <acquire> // Parent might be sleeping in wait(). wakeup1(proc->parent); 8010476f: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80104775: 8b 40 14 mov 0x14(%eax),%eax 80104778: 89 04 24 mov %eax,(%esp) 8010477b: e8 1d 05 00 00 call 80104c9d <wakeup1> // Pass abandoned children to init. for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 80104780: c7 45 f0 74 ff 10 80 movl $0x8010ff74,-0x10(%ebp) 80104787: eb 3b jmp 801047c4 <exit+0xf4> if(p->parent == proc){ 80104789: 8b 45 f0 mov -0x10(%ebp),%eax 8010478c: 8b 50 14 mov 0x14(%eax),%edx 8010478f: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80104795: 39 c2 cmp %eax,%edx 80104797: 75 24 jne 801047bd <exit+0xed> p->parent = initproc; 80104799: 8b 15 68 b6 10 80 mov 0x8010b668,%edx 8010479f: 8b 45 f0 mov -0x10(%ebp),%eax 801047a2: 89 50 14 mov %edx,0x14(%eax) if(p->state == ZOMBIE) 801047a5: 8b 45 f0 mov -0x10(%ebp),%eax 801047a8: 8b 40 0c mov 0xc(%eax),%eax 801047ab: 83 f8 05 cmp $0x5,%eax 801047ae: 75 0d jne 801047bd <exit+0xed> wakeup1(initproc); 801047b0: a1 68 b6 10 80 mov 0x8010b668,%eax 801047b5: 89 04 24 mov %eax,(%esp) 801047b8: e8 e0 04 00 00 call 80104c9d <wakeup1> // Parent might be sleeping in wait(). wakeup1(proc->parent); // Pass abandoned children to init. for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 801047bd: 81 45 f0 84 00 00 00 addl $0x84,-0x10(%ebp) 801047c4: b8 74 20 11 80 mov $0x80112074,%eax 801047c9: 39 45 f0 cmp %eax,-0x10(%ebp) 801047cc: 72 bb jb 80104789 <exit+0xb9> wakeup1(initproc); } } // Jump into the scheduler, never to return. proc->state = ZOMBIE; 801047ce: 65 a1 04 00 00 00 mov %gs:0x4,%eax 801047d4: c7 40 0c 05 00 00 00 movl $0x5,0xc(%eax) sched(); 801047db: e8 98 02 00 00 call 80104a78 <sched> panic("zombie exit"); 801047e0: c7 04 24 24 89 10 80 movl $0x80108924,(%esp) 801047e7: e8 4e bd ff ff call 8010053a <panic> 801047ec <texit>: } void texit(void) { 801047ec: 55 push %ebp 801047ed: 89 e5 mov %esp,%ebp 801047ef: 83 ec 28 sub $0x28,%esp // struct proc *p; int fd; if(proc == initproc) 801047f2: 65 8b 15 04 00 00 00 mov %gs:0x4,%edx 801047f9: a1 68 b6 10 80 mov 0x8010b668,%eax 801047fe: 39 c2 cmp %eax,%edx 80104800: 75 0c jne 8010480e <texit+0x22> panic("init exiting"); 80104802: c7 04 24 17 89 10 80 movl $0x80108917,(%esp) 80104809: e8 2c bd ff ff call 8010053a <panic> // Close all open files. for(fd = 0; fd < NOFILE; fd++){ 8010480e: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) 80104815: eb 44 jmp 8010485b <texit+0x6f> if(proc->ofile[fd]){ 80104817: 65 a1 04 00 00 00 mov %gs:0x4,%eax 8010481d: 8b 55 f4 mov -0xc(%ebp),%edx 80104820: 83 c2 08 add $0x8,%edx 80104823: 8b 44 90 08 mov 0x8(%eax,%edx,4),%eax 80104827: 85 c0 test %eax,%eax 80104829: 74 2c je 80104857 <texit+0x6b> fileclose(proc->ofile[fd]); 8010482b: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80104831: 8b 55 f4 mov -0xc(%ebp),%edx 80104834: 83 c2 08 add $0x8,%edx 80104837: 8b 44 90 08 mov 0x8(%eax,%edx,4),%eax 8010483b: 89 04 24 mov %eax,(%esp) 8010483e: e8 8a c7 ff ff call 80100fcd <fileclose> proc->ofile[fd] = 0; 80104843: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80104849: 8b 55 f4 mov -0xc(%ebp),%edx 8010484c: 83 c2 08 add $0x8,%edx 8010484f: c7 44 90 08 00 00 00 movl $0x0,0x8(%eax,%edx,4) 80104856: 00 if(proc == initproc) panic("init exiting"); // Close all open files. for(fd = 0; fd < NOFILE; fd++){ 80104857: 83 45 f4 01 addl $0x1,-0xc(%ebp) 8010485b: 83 7d f4 0f cmpl $0xf,-0xc(%ebp) 8010485f: 7e b6 jle 80104817 <texit+0x2b> if(proc->ofile[fd]){ fileclose(proc->ofile[fd]); proc->ofile[fd] = 0; } } iput(proc->cwd); 80104861: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80104867: 8b 40 68 mov 0x68(%eax),%eax 8010486a: 89 04 24 mov %eax,(%esp) 8010486d: e8 bf d1 ff ff call 80101a31 <iput> proc->cwd = 0; 80104872: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80104878: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax) acquire(&ptable.lock); 8010487f: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 80104886: e8 f0 06 00 00 call 80104f7b <acquire> // Parent might be sleeping in wait(). wakeup1(proc->parent); 8010488b: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80104891: 8b 40 14 mov 0x14(%eax),%eax 80104894: 89 04 24 mov %eax,(%esp) 80104897: e8 01 04 00 00 call 80104c9d <wakeup1> // if(p->state == ZOMBIE) // wakeup1(initproc); // } // } // Jump into the scheduler, never to return. proc->state = ZOMBIE; 8010489c: 65 a1 04 00 00 00 mov %gs:0x4,%eax 801048a2: c7 40 0c 05 00 00 00 movl $0x5,0xc(%eax) sched(); 801048a9: e8 ca 01 00 00 call 80104a78 <sched> panic("zombie exit"); 801048ae: c7 04 24 24 89 10 80 movl $0x80108924,(%esp) 801048b5: e8 80 bc ff ff call 8010053a <panic> 801048ba <wait>: } // Wait for a child process to exit and return its pid. // Return -1 if this process has no children. int wait(void) { 801048ba: 55 push %ebp 801048bb: 89 e5 mov %esp,%ebp 801048bd: 83 ec 28 sub $0x28,%esp struct proc *p; int havekids, pid; acquire(&ptable.lock); 801048c0: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 801048c7: e8 af 06 00 00 call 80104f7b <acquire> for(;;){ // Scan through table looking for zombie children. havekids = 0; 801048cc: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 801048d3: c7 45 ec 74 ff 10 80 movl $0x8010ff74,-0x14(%ebp) 801048da: e9 ab 00 00 00 jmp 8010498a <wait+0xd0> // if(p->parent != proc && p->isthread ==1) if(p->parent != proc) 801048df: 8b 45 ec mov -0x14(%ebp),%eax 801048e2: 8b 50 14 mov 0x14(%eax),%edx 801048e5: 65 a1 04 00 00 00 mov %gs:0x4,%eax 801048eb: 39 c2 cmp %eax,%edx 801048ed: 0f 85 8f 00 00 00 jne 80104982 <wait+0xc8> continue; havekids = 1; 801048f3: c7 45 f0 01 00 00 00 movl $0x1,-0x10(%ebp) if(p->state == ZOMBIE){ 801048fa: 8b 45 ec mov -0x14(%ebp),%eax 801048fd: 8b 40 0c mov 0xc(%eax),%eax 80104900: 83 f8 05 cmp $0x5,%eax 80104903: 75 7e jne 80104983 <wait+0xc9> // Found one. pid = p->pid; 80104905: 8b 45 ec mov -0x14(%ebp),%eax 80104908: 8b 40 10 mov 0x10(%eax),%eax 8010490b: 89 45 f4 mov %eax,-0xc(%ebp) kfree(p->kstack); 8010490e: 8b 45 ec mov -0x14(%ebp),%eax 80104911: 8b 40 08 mov 0x8(%eax),%eax 80104914: 89 04 24 mov %eax,(%esp) 80104917: e8 55 e1 ff ff call 80102a71 <kfree> p->kstack = 0; 8010491c: 8b 45 ec mov -0x14(%ebp),%eax 8010491f: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) if(p->isthread != 1){ 80104926: 8b 45 ec mov -0x14(%ebp),%eax 80104929: 8b 80 80 00 00 00 mov 0x80(%eax),%eax 8010492f: 83 f8 01 cmp $0x1,%eax 80104932: 74 0e je 80104942 <wait+0x88> freevm(p->pgdir); 80104934: 8b 45 ec mov -0x14(%ebp),%eax 80104937: 8b 40 04 mov 0x4(%eax),%eax 8010493a: 89 04 24 mov %eax,(%esp) 8010493d: e8 d1 39 00 00 call 80108313 <freevm> } p->state = UNUSED; 80104942: 8b 45 ec mov -0x14(%ebp),%eax 80104945: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) p->pid = 0; 8010494c: 8b 45 ec mov -0x14(%ebp),%eax 8010494f: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) p->parent = 0; 80104956: 8b 45 ec mov -0x14(%ebp),%eax 80104959: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) p->name[0] = 0; 80104960: 8b 45 ec mov -0x14(%ebp),%eax 80104963: c6 40 6c 00 movb $0x0,0x6c(%eax) p->killed = 0; 80104967: 8b 45 ec mov -0x14(%ebp),%eax 8010496a: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) release(&ptable.lock); 80104971: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 80104978: e8 5f 06 00 00 call 80104fdc <release> return pid; 8010497d: 8b 45 f4 mov -0xc(%ebp),%eax 80104980: eb 57 jmp 801049d9 <wait+0x11f> // Scan through table looking for zombie children. havekids = 0; for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ // if(p->parent != proc && p->isthread ==1) if(p->parent != proc) continue; 80104982: 90 nop acquire(&ptable.lock); for(;;){ // Scan through table looking for zombie children. havekids = 0; for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 80104983: 81 45 ec 84 00 00 00 addl $0x84,-0x14(%ebp) 8010498a: b8 74 20 11 80 mov $0x80112074,%eax 8010498f: 39 45 ec cmp %eax,-0x14(%ebp) 80104992: 0f 82 47 ff ff ff jb 801048df <wait+0x25> return pid; } } // No point waiting if we don't have any children. if(!havekids || proc->killed){ 80104998: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 8010499c: 74 0d je 801049ab <wait+0xf1> 8010499e: 65 a1 04 00 00 00 mov %gs:0x4,%eax 801049a4: 8b 40 24 mov 0x24(%eax),%eax 801049a7: 85 c0 test %eax,%eax 801049a9: 74 13 je 801049be <wait+0x104> release(&ptable.lock); 801049ab: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 801049b2: e8 25 06 00 00 call 80104fdc <release> return -1; 801049b7: b8 ff ff ff ff mov $0xffffffff,%eax 801049bc: eb 1b jmp 801049d9 <wait+0x11f> } // Wait for children to exit. (See wakeup1 call in proc_exit.) sleep(proc, &ptable.lock); //DOC: wait-sleep 801049be: 65 a1 04 00 00 00 mov %gs:0x4,%eax 801049c4: c7 44 24 04 40 ff 10 movl $0x8010ff40,0x4(%esp) 801049cb: 80 801049cc: 89 04 24 mov %eax,(%esp) 801049cf: e8 2e 02 00 00 call 80104c02 <sleep> } 801049d4: e9 f3 fe ff ff jmp 801048cc <wait+0x12> } 801049d9: c9 leave 801049da: c3 ret 801049db <scheduler>: // - swtch to start running that process // - eventually that process transfers control // via swtch back to the scheduler. void scheduler(void) { 801049db: 55 push %ebp 801049dc: 89 e5 mov %esp,%ebp 801049de: 83 ec 28 sub $0x28,%esp struct proc *p; for(;;){ // Enable interrupts on this processor. sti(); 801049e1: e8 e6 f5 ff ff call 80103fcc <sti> // Loop over process table looking for process to run. acquire(&ptable.lock); 801049e6: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 801049ed: e8 89 05 00 00 call 80104f7b <acquire> for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 801049f2: c7 45 f4 74 ff 10 80 movl $0x8010ff74,-0xc(%ebp) 801049f9: eb 62 jmp 80104a5d <scheduler+0x82> if(p->state != RUNNABLE) 801049fb: 8b 45 f4 mov -0xc(%ebp),%eax 801049fe: 8b 40 0c mov 0xc(%eax),%eax 80104a01: 83 f8 03 cmp $0x3,%eax 80104a04: 75 4f jne 80104a55 <scheduler+0x7a> continue; // Switch to chosen process. It is the process's job // to release ptable.lock and then reacquire it // before jumping back to us. proc = p; 80104a06: 8b 45 f4 mov -0xc(%ebp),%eax 80104a09: 65 a3 04 00 00 00 mov %eax,%gs:0x4 switchuvm(p); 80104a0f: 8b 45 f4 mov -0xc(%ebp),%eax 80104a12: 89 04 24 mov %eax,(%esp) 80104a15: e8 81 34 00 00 call 80107e9b <switchuvm> p->state = RUNNING; 80104a1a: 8b 45 f4 mov -0xc(%ebp),%eax 80104a1d: c7 40 0c 04 00 00 00 movl $0x4,0xc(%eax) swtch(&cpu->scheduler, proc->context); 80104a24: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80104a2a: 8b 40 1c mov 0x1c(%eax),%eax 80104a2d: 65 8b 15 00 00 00 00 mov %gs:0x0,%edx 80104a34: 83 c2 04 add $0x4,%edx 80104a37: 89 44 24 04 mov %eax,0x4(%esp) 80104a3b: 89 14 24 mov %edx,(%esp) 80104a3e: e8 2d 0a 00 00 call 80105470 <swtch> switchkvm(); 80104a43: e8 36 34 00 00 call 80107e7e <switchkvm> // Process is done running for now. // It should have changed its p->state before coming back. proc = 0; 80104a48: 65 c7 05 04 00 00 00 movl $0x0,%gs:0x4 80104a4f: 00 00 00 00 80104a53: eb 01 jmp 80104a56 <scheduler+0x7b> // Loop over process table looking for process to run. acquire(&ptable.lock); for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ if(p->state != RUNNABLE) continue; 80104a55: 90 nop // Enable interrupts on this processor. sti(); // Loop over process table looking for process to run. acquire(&ptable.lock); for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 80104a56: 81 45 f4 84 00 00 00 addl $0x84,-0xc(%ebp) 80104a5d: b8 74 20 11 80 mov $0x80112074,%eax 80104a62: 39 45 f4 cmp %eax,-0xc(%ebp) 80104a65: 72 94 jb 801049fb <scheduler+0x20> // Process is done running for now. // It should have changed its p->state before coming back. proc = 0; } release(&ptable.lock); 80104a67: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 80104a6e: e8 69 05 00 00 call 80104fdc <release> } 80104a73: e9 69 ff ff ff jmp 801049e1 <scheduler+0x6> 80104a78 <sched>: // Enter scheduler. Must hold only ptable.lock // and have changed proc->state. void sched(void) { 80104a78: 55 push %ebp 80104a79: 89 e5 mov %esp,%ebp 80104a7b: 83 ec 28 sub $0x28,%esp int intena; if(!holding(&ptable.lock)) 80104a7e: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 80104a85: e8 10 06 00 00 call 8010509a <holding> 80104a8a: 85 c0 test %eax,%eax 80104a8c: 75 0c jne 80104a9a <sched+0x22> panic("sched ptable.lock"); 80104a8e: c7 04 24 30 89 10 80 movl $0x80108930,(%esp) 80104a95: e8 a0 ba ff ff call 8010053a <panic> if(cpu->ncli != 1){ 80104a9a: 65 a1 00 00 00 00 mov %gs:0x0,%eax 80104aa0: 8b 80 ac 00 00 00 mov 0xac(%eax),%eax 80104aa6: 83 f8 01 cmp $0x1,%eax 80104aa9: 74 35 je 80104ae0 <sched+0x68> cprintf("current proc %d\n cpu->ncli %d\n",proc->pid,cpu->ncli); 80104aab: 65 a1 00 00 00 00 mov %gs:0x0,%eax 80104ab1: 8b 90 ac 00 00 00 mov 0xac(%eax),%edx 80104ab7: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80104abd: 8b 40 10 mov 0x10(%eax),%eax 80104ac0: 89 54 24 08 mov %edx,0x8(%esp) 80104ac4: 89 44 24 04 mov %eax,0x4(%esp) 80104ac8: c7 04 24 44 89 10 80 movl $0x80108944,(%esp) 80104acf: e8 c6 b8 ff ff call 8010039a <cprintf> panic("sched locks"); 80104ad4: c7 04 24 63 89 10 80 movl $0x80108963,(%esp) 80104adb: e8 5a ba ff ff call 8010053a <panic> } if(proc->state == RUNNING) 80104ae0: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80104ae6: 8b 40 0c mov 0xc(%eax),%eax 80104ae9: 83 f8 04 cmp $0x4,%eax 80104aec: 75 0c jne 80104afa <sched+0x82> panic("sched running"); 80104aee: c7 04 24 6f 89 10 80 movl $0x8010896f,(%esp) 80104af5: e8 40 ba ff ff call 8010053a <panic> if(readeflags()&FL_IF) 80104afa: e8 bd f4 ff ff call 80103fbc <readeflags> 80104aff: 25 00 02 00 00 and $0x200,%eax 80104b04: 85 c0 test %eax,%eax 80104b06: 74 0c je 80104b14 <sched+0x9c> panic("sched interruptible"); 80104b08: c7 04 24 7d 89 10 80 movl $0x8010897d,(%esp) 80104b0f: e8 26 ba ff ff call 8010053a <panic> intena = cpu->intena; 80104b14: 65 a1 00 00 00 00 mov %gs:0x0,%eax 80104b1a: 8b 80 b0 00 00 00 mov 0xb0(%eax),%eax 80104b20: 89 45 f4 mov %eax,-0xc(%ebp) swtch(&proc->context, cpu->scheduler); 80104b23: 65 a1 00 00 00 00 mov %gs:0x0,%eax 80104b29: 8b 40 04 mov 0x4(%eax),%eax 80104b2c: 65 8b 15 04 00 00 00 mov %gs:0x4,%edx 80104b33: 83 c2 1c add $0x1c,%edx 80104b36: 89 44 24 04 mov %eax,0x4(%esp) 80104b3a: 89 14 24 mov %edx,(%esp) 80104b3d: e8 2e 09 00 00 call 80105470 <swtch> cpu->intena = intena; 80104b42: 65 a1 00 00 00 00 mov %gs:0x0,%eax 80104b48: 8b 55 f4 mov -0xc(%ebp),%edx 80104b4b: 89 90 b0 00 00 00 mov %edx,0xb0(%eax) } 80104b51: c9 leave 80104b52: c3 ret 80104b53 <yield>: // Give up the CPU for one scheduling round. void yield(void) { 80104b53: 55 push %ebp 80104b54: 89 e5 mov %esp,%ebp 80104b56: 83 ec 18 sub $0x18,%esp acquire(&ptable.lock); //DOC: yieldlock 80104b59: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 80104b60: e8 16 04 00 00 call 80104f7b <acquire> proc->state = RUNNABLE; 80104b65: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80104b6b: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax) sched(); 80104b72: e8 01 ff ff ff call 80104a78 <sched> release(&ptable.lock); 80104b77: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 80104b7e: e8 59 04 00 00 call 80104fdc <release> } 80104b83: c9 leave 80104b84: c3 ret 80104b85 <thread_yield>: void thread_yield(void) { 80104b85: 55 push %ebp 80104b86: 89 e5 mov %esp,%ebp 80104b88: 83 ec 18 sub $0x18,%esp acquire(&ptable.lock); //DOC: yieldlock 80104b8b: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 80104b92: e8 e4 03 00 00 call 80104f7b <acquire> if (proc->isthread == 1) 80104b97: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80104b9d: 8b 80 80 00 00 00 mov 0x80(%eax),%eax 80104ba3: 83 f8 01 cmp $0x1,%eax 80104ba6: 75 14 jne 80104bbc <thread_yield+0x37> { proc->state = RUNNABLE; 80104ba8: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80104bae: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax) sched(); 80104bb5: e8 be fe ff ff call 80104a78 <sched> 80104bba: eb 0c jmp 80104bc8 <thread_yield+0x43> } else { cprintf("Not a thread!\n"); 80104bbc: c7 04 24 91 89 10 80 movl $0x80108991,(%esp) 80104bc3: e8 d2 b7 ff ff call 8010039a <cprintf> } release(&ptable.lock); 80104bc8: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 80104bcf: e8 08 04 00 00 call 80104fdc <release> } 80104bd4: c9 leave 80104bd5: c3 ret 80104bd6 <forkret>: // A fork child's very first scheduling by scheduler() // will swtch here. "Return" to user space. void forkret(void) { 80104bd6: 55 push %ebp 80104bd7: 89 e5 mov %esp,%ebp 80104bd9: 83 ec 18 sub $0x18,%esp static int first = 1; // Still holding ptable.lock from scheduler. release(&ptable.lock); 80104bdc: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 80104be3: e8 f4 03 00 00 call 80104fdc <release> if (first) { 80104be8: a1 20 b0 10 80 mov 0x8010b020,%eax 80104bed: 85 c0 test %eax,%eax 80104bef: 74 0f je 80104c00 <forkret+0x2a> // Some initialization functions must be run in the context // of a regular process (e.g., they call sleep), and thus cannot // be run from main(). first = 0; 80104bf1: c7 05 20 b0 10 80 00 movl $0x0,0x8010b020 80104bf8: 00 00 00 initlog(); 80104bfb: e8 04 e4 ff ff call 80103004 <initlog> } // Return to "caller", actually trapret (see allocproc). } 80104c00: c9 leave 80104c01: c3 ret 80104c02 <sleep>: // Atomically release lock and sleep on chan. // Reacquires lock when awakened. void sleep(void *chan, struct spinlock *lk) { 80104c02: 55 push %ebp 80104c03: 89 e5 mov %esp,%ebp 80104c05: 83 ec 18 sub $0x18,%esp if(proc == 0) 80104c08: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80104c0e: 85 c0 test %eax,%eax 80104c10: 75 0c jne 80104c1e <sleep+0x1c> panic("sleep"); 80104c12: c7 04 24 a0 89 10 80 movl $0x801089a0,(%esp) 80104c19: e8 1c b9 ff ff call 8010053a <panic> if(lk == 0) 80104c1e: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 80104c22: 75 0c jne 80104c30 <sleep+0x2e> panic("sleep without lk"); 80104c24: c7 04 24 a6 89 10 80 movl $0x801089a6,(%esp) 80104c2b: e8 0a b9 ff ff call 8010053a <panic> // change p->state and then call sched. // Once we hold ptable.lock, we can be // guaranteed that we won't miss any wakeup // (wakeup runs with ptable.lock locked), // so it's okay to release lk. if(lk != &ptable.lock){ //DOC: sleeplock0 80104c30: 81 7d 0c 40 ff 10 80 cmpl $0x8010ff40,0xc(%ebp) 80104c37: 74 17 je 80104c50 <sleep+0x4e> acquire(&ptable.lock); //DOC: sleeplock1 80104c39: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 80104c40: e8 36 03 00 00 call 80104f7b <acquire> release(lk); 80104c45: 8b 45 0c mov 0xc(%ebp),%eax 80104c48: 89 04 24 mov %eax,(%esp) 80104c4b: e8 8c 03 00 00 call 80104fdc <release> } // Go to sleep. proc->chan = chan; 80104c50: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80104c56: 8b 55 08 mov 0x8(%ebp),%edx 80104c59: 89 50 20 mov %edx,0x20(%eax) proc->state = SLEEPING; 80104c5c: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80104c62: c7 40 0c 02 00 00 00 movl $0x2,0xc(%eax) sched(); 80104c69: e8 0a fe ff ff call 80104a78 <sched> // Tidy up. proc->chan = 0; 80104c6e: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80104c74: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) // Reacquire original lock. if(lk != &ptable.lock){ //DOC: sleeplock2 80104c7b: 81 7d 0c 40 ff 10 80 cmpl $0x8010ff40,0xc(%ebp) 80104c82: 74 17 je 80104c9b <sleep+0x99> release(&ptable.lock); 80104c84: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 80104c8b: e8 4c 03 00 00 call 80104fdc <release> acquire(lk); 80104c90: 8b 45 0c mov 0xc(%ebp),%eax 80104c93: 89 04 24 mov %eax,(%esp) 80104c96: e8 e0 02 00 00 call 80104f7b <acquire> } } 80104c9b: c9 leave 80104c9c: c3 ret 80104c9d <wakeup1>: //PAGEBREAK! // Wake up all processes sleeping on chan. // The ptable lock must be held. static void wakeup1(void *chan) { 80104c9d: 55 push %ebp 80104c9e: 89 e5 mov %esp,%ebp 80104ca0: 83 ec 10 sub $0x10,%esp struct proc *p; for(p = ptable.proc; p < &ptable.proc[NPROC]; p++) 80104ca3: c7 45 fc 74 ff 10 80 movl $0x8010ff74,-0x4(%ebp) 80104caa: eb 27 jmp 80104cd3 <wakeup1+0x36> if(p->state == SLEEPING && p->chan == chan) 80104cac: 8b 45 fc mov -0x4(%ebp),%eax 80104caf: 8b 40 0c mov 0xc(%eax),%eax 80104cb2: 83 f8 02 cmp $0x2,%eax 80104cb5: 75 15 jne 80104ccc <wakeup1+0x2f> 80104cb7: 8b 45 fc mov -0x4(%ebp),%eax 80104cba: 8b 40 20 mov 0x20(%eax),%eax 80104cbd: 3b 45 08 cmp 0x8(%ebp),%eax 80104cc0: 75 0a jne 80104ccc <wakeup1+0x2f> p->state = RUNNABLE; 80104cc2: 8b 45 fc mov -0x4(%ebp),%eax 80104cc5: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax) static void wakeup1(void *chan) { struct proc *p; for(p = ptable.proc; p < &ptable.proc[NPROC]; p++) 80104ccc: 81 45 fc 84 00 00 00 addl $0x84,-0x4(%ebp) 80104cd3: b8 74 20 11 80 mov $0x80112074,%eax 80104cd8: 39 45 fc cmp %eax,-0x4(%ebp) 80104cdb: 72 cf jb 80104cac <wakeup1+0xf> if(p->state == SLEEPING && p->chan == chan) p->state = RUNNABLE; } 80104cdd: c9 leave 80104cde: c3 ret 80104cdf <twakeup>: void twakeup(int tid){ 80104cdf: 55 push %ebp 80104ce0: 89 e5 mov %esp,%ebp 80104ce2: 83 ec 28 sub $0x28,%esp struct proc *p; acquire(&ptable.lock); 80104ce5: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 80104cec: e8 8a 02 00 00 call 80104f7b <acquire> for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 80104cf1: c7 45 f4 74 ff 10 80 movl $0x8010ff74,-0xc(%ebp) 80104cf8: eb 36 jmp 80104d30 <twakeup+0x51> if(p->state == SLEEPING && p->pid == tid && p->isthread == 1){ 80104cfa: 8b 45 f4 mov -0xc(%ebp),%eax 80104cfd: 8b 40 0c mov 0xc(%eax),%eax 80104d00: 83 f8 02 cmp $0x2,%eax 80104d03: 75 24 jne 80104d29 <twakeup+0x4a> 80104d05: 8b 45 f4 mov -0xc(%ebp),%eax 80104d08: 8b 40 10 mov 0x10(%eax),%eax 80104d0b: 3b 45 08 cmp 0x8(%ebp),%eax 80104d0e: 75 19 jne 80104d29 <twakeup+0x4a> 80104d10: 8b 45 f4 mov -0xc(%ebp),%eax 80104d13: 8b 80 80 00 00 00 mov 0x80(%eax),%eax 80104d19: 83 f8 01 cmp $0x1,%eax 80104d1c: 75 0b jne 80104d29 <twakeup+0x4a> wakeup1(p); 80104d1e: 8b 45 f4 mov -0xc(%ebp),%eax 80104d21: 89 04 24 mov %eax,(%esp) 80104d24: e8 74 ff ff ff call 80104c9d <wakeup1> void twakeup(int tid){ struct proc *p; acquire(&ptable.lock); for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 80104d29: 81 45 f4 84 00 00 00 addl $0x84,-0xc(%ebp) 80104d30: b8 74 20 11 80 mov $0x80112074,%eax 80104d35: 39 45 f4 cmp %eax,-0xc(%ebp) 80104d38: 72 c0 jb 80104cfa <twakeup+0x1b> if(p->state == SLEEPING && p->pid == tid && p->isthread == 1){ wakeup1(p); } } release(&ptable.lock); 80104d3a: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 80104d41: e8 96 02 00 00 call 80104fdc <release> } 80104d46: c9 leave 80104d47: c3 ret 80104d48 <wakeup>: // Wake up all processes sleeping on chan. void wakeup(void *chan) { 80104d48: 55 push %ebp 80104d49: 89 e5 mov %esp,%ebp 80104d4b: 83 ec 18 sub $0x18,%esp acquire(&ptable.lock); 80104d4e: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 80104d55: e8 21 02 00 00 call 80104f7b <acquire> wakeup1(chan); 80104d5a: 8b 45 08 mov 0x8(%ebp),%eax 80104d5d: 89 04 24 mov %eax,(%esp) 80104d60: e8 38 ff ff ff call 80104c9d <wakeup1> release(&ptable.lock); 80104d65: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 80104d6c: e8 6b 02 00 00 call 80104fdc <release> } 80104d71: c9 leave 80104d72: c3 ret 80104d73 <kill>: // Kill the process with the given pid. // Process won't exit until it returns // to user space (see trap in trap.c). int kill(int pid) { 80104d73: 55 push %ebp 80104d74: 89 e5 mov %esp,%ebp 80104d76: 83 ec 28 sub $0x28,%esp struct proc *p; acquire(&ptable.lock); 80104d79: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 80104d80: e8 f6 01 00 00 call 80104f7b <acquire> for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 80104d85: c7 45 f4 74 ff 10 80 movl $0x8010ff74,-0xc(%ebp) 80104d8c: eb 44 jmp 80104dd2 <kill+0x5f> if(p->pid == pid){ 80104d8e: 8b 45 f4 mov -0xc(%ebp),%eax 80104d91: 8b 40 10 mov 0x10(%eax),%eax 80104d94: 3b 45 08 cmp 0x8(%ebp),%eax 80104d97: 75 32 jne 80104dcb <kill+0x58> p->killed = 1; 80104d99: 8b 45 f4 mov -0xc(%ebp),%eax 80104d9c: c7 40 24 01 00 00 00 movl $0x1,0x24(%eax) // Wake process from sleep if necessary. if(p->state == SLEEPING) 80104da3: 8b 45 f4 mov -0xc(%ebp),%eax 80104da6: 8b 40 0c mov 0xc(%eax),%eax 80104da9: 83 f8 02 cmp $0x2,%eax 80104dac: 75 0a jne 80104db8 <kill+0x45> p->state = RUNNABLE; 80104dae: 8b 45 f4 mov -0xc(%ebp),%eax 80104db1: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax) release(&ptable.lock); 80104db8: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 80104dbf: e8 18 02 00 00 call 80104fdc <release> return 0; 80104dc4: b8 00 00 00 00 mov $0x0,%eax 80104dc9: eb 22 jmp 80104ded <kill+0x7a> kill(int pid) { struct proc *p; acquire(&ptable.lock); for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 80104dcb: 81 45 f4 84 00 00 00 addl $0x84,-0xc(%ebp) 80104dd2: b8 74 20 11 80 mov $0x80112074,%eax 80104dd7: 39 45 f4 cmp %eax,-0xc(%ebp) 80104dda: 72 b2 jb 80104d8e <kill+0x1b> p->state = RUNNABLE; release(&ptable.lock); return 0; } } release(&ptable.lock); 80104ddc: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 80104de3: e8 f4 01 00 00 call 80104fdc <release> return -1; 80104de8: b8 ff ff ff ff mov $0xffffffff,%eax } 80104ded: c9 leave 80104dee: c3 ret 80104def <procdump>: // Print a process listing to console. For debugging. // Runs when user types ^P on console. // No lock to avoid wedging a stuck machine further. void procdump(void) { 80104def: 55 push %ebp 80104df0: 89 e5 mov %esp,%ebp 80104df2: 83 ec 58 sub $0x58,%esp int i; struct proc *p; char *state; uint pc[10]; for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 80104df5: c7 45 f0 74 ff 10 80 movl $0x8010ff74,-0x10(%ebp) 80104dfc: e9 db 00 00 00 jmp 80104edc <procdump+0xed> if(p->state == UNUSED) 80104e01: 8b 45 f0 mov -0x10(%ebp),%eax 80104e04: 8b 40 0c mov 0xc(%eax),%eax 80104e07: 85 c0 test %eax,%eax 80104e09: 0f 84 c5 00 00 00 je 80104ed4 <procdump+0xe5> continue; if(p->state >= 0 && p->state < NELEM(states) && states[p->state]) 80104e0f: 8b 45 f0 mov -0x10(%ebp),%eax 80104e12: 8b 40 0c mov 0xc(%eax),%eax 80104e15: 83 f8 05 cmp $0x5,%eax 80104e18: 77 23 ja 80104e3d <procdump+0x4e> 80104e1a: 8b 45 f0 mov -0x10(%ebp),%eax 80104e1d: 8b 40 0c mov 0xc(%eax),%eax 80104e20: 8b 04 85 08 b0 10 80 mov -0x7fef4ff8(,%eax,4),%eax 80104e27: 85 c0 test %eax,%eax 80104e29: 74 12 je 80104e3d <procdump+0x4e> state = states[p->state]; 80104e2b: 8b 45 f0 mov -0x10(%ebp),%eax 80104e2e: 8b 40 0c mov 0xc(%eax),%eax 80104e31: 8b 04 85 08 b0 10 80 mov -0x7fef4ff8(,%eax,4),%eax 80104e38: 89 45 f4 mov %eax,-0xc(%ebp) uint pc[10]; for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ if(p->state == UNUSED) continue; if(p->state >= 0 && p->state < NELEM(states) && states[p->state]) 80104e3b: eb 07 jmp 80104e44 <procdump+0x55> state = states[p->state]; else state = "???"; 80104e3d: c7 45 f4 b7 89 10 80 movl $0x801089b7,-0xc(%ebp) cprintf("%d %s %s", p->pid, state, p->name); 80104e44: 8b 45 f0 mov -0x10(%ebp),%eax 80104e47: 8d 50 6c lea 0x6c(%eax),%edx 80104e4a: 8b 45 f0 mov -0x10(%ebp),%eax 80104e4d: 8b 40 10 mov 0x10(%eax),%eax 80104e50: 89 54 24 0c mov %edx,0xc(%esp) 80104e54: 8b 55 f4 mov -0xc(%ebp),%edx 80104e57: 89 54 24 08 mov %edx,0x8(%esp) 80104e5b: 89 44 24 04 mov %eax,0x4(%esp) 80104e5f: c7 04 24 bb 89 10 80 movl $0x801089bb,(%esp) 80104e66: e8 2f b5 ff ff call 8010039a <cprintf> if(p->state == SLEEPING){ 80104e6b: 8b 45 f0 mov -0x10(%ebp),%eax 80104e6e: 8b 40 0c mov 0xc(%eax),%eax 80104e71: 83 f8 02 cmp $0x2,%eax 80104e74: 75 50 jne 80104ec6 <procdump+0xd7> getcallerpcs((uint*)p->context->ebp+2, pc); 80104e76: 8b 45 f0 mov -0x10(%ebp),%eax 80104e79: 8b 40 1c mov 0x1c(%eax),%eax 80104e7c: 8b 40 0c mov 0xc(%eax),%eax 80104e7f: 83 c0 08 add $0x8,%eax 80104e82: 8d 55 c4 lea -0x3c(%ebp),%edx 80104e85: 89 54 24 04 mov %edx,0x4(%esp) 80104e89: 89 04 24 mov %eax,(%esp) 80104e8c: e8 9a 01 00 00 call 8010502b <getcallerpcs> for(i=0; i<10 && pc[i] != 0; i++) 80104e91: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp) 80104e98: eb 1b jmp 80104eb5 <procdump+0xc6> cprintf(" %p", pc[i]); 80104e9a: 8b 45 ec mov -0x14(%ebp),%eax 80104e9d: 8b 44 85 c4 mov -0x3c(%ebp,%eax,4),%eax 80104ea1: 89 44 24 04 mov %eax,0x4(%esp) 80104ea5: c7 04 24 c4 89 10 80 movl $0x801089c4,(%esp) 80104eac: e8 e9 b4 ff ff call 8010039a <cprintf> else state = "???"; cprintf("%d %s %s", p->pid, state, p->name); if(p->state == SLEEPING){ getcallerpcs((uint*)p->context->ebp+2, pc); for(i=0; i<10 && pc[i] != 0; i++) 80104eb1: 83 45 ec 01 addl $0x1,-0x14(%ebp) 80104eb5: 83 7d ec 09 cmpl $0x9,-0x14(%ebp) 80104eb9: 7f 0b jg 80104ec6 <procdump+0xd7> 80104ebb: 8b 45 ec mov -0x14(%ebp),%eax 80104ebe: 8b 44 85 c4 mov -0x3c(%ebp,%eax,4),%eax 80104ec2: 85 c0 test %eax,%eax 80104ec4: 75 d4 jne 80104e9a <procdump+0xab> cprintf(" %p", pc[i]); } cprintf("\n"); 80104ec6: c7 04 24 c8 89 10 80 movl $0x801089c8,(%esp) 80104ecd: e8 c8 b4 ff ff call 8010039a <cprintf> 80104ed2: eb 01 jmp 80104ed5 <procdump+0xe6> char *state; uint pc[10]; for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ if(p->state == UNUSED) continue; 80104ed4: 90 nop int i; struct proc *p; char *state; uint pc[10]; for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 80104ed5: 81 45 f0 84 00 00 00 addl $0x84,-0x10(%ebp) 80104edc: b8 74 20 11 80 mov $0x80112074,%eax 80104ee1: 39 45 f0 cmp %eax,-0x10(%ebp) 80104ee4: 0f 82 17 ff ff ff jb 80104e01 <procdump+0x12> for(i=0; i<10 && pc[i] != 0; i++) cprintf(" %p", pc[i]); } cprintf("\n"); } } 80104eea: c9 leave 80104eeb: c3 ret 80104eec <tsleep>: void tsleep(void){ 80104eec: 55 push %ebp 80104eed: 89 e5 mov %esp,%ebp 80104eef: 83 ec 18 sub $0x18,%esp acquire(&ptable.lock); 80104ef2: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 80104ef9: e8 7d 00 00 00 call 80104f7b <acquire> sleep(proc, &ptable.lock); 80104efe: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80104f04: c7 44 24 04 40 ff 10 movl $0x8010ff40,0x4(%esp) 80104f0b: 80 80104f0c: 89 04 24 mov %eax,(%esp) 80104f0f: e8 ee fc ff ff call 80104c02 <sleep> release(&ptable.lock); 80104f14: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 80104f1b: e8 bc 00 00 00 call 80104fdc <release> } 80104f20: c9 leave 80104f21: c3 ret ... 80104f24 <readeflags>: asm volatile("ltr %0" : : "r" (sel)); } static inline uint readeflags(void) { 80104f24: 55 push %ebp 80104f25: 89 e5 mov %esp,%ebp 80104f27: 83 ec 10 sub $0x10,%esp uint eflags; asm volatile("pushfl; popl %0" : "=r" (eflags)); 80104f2a: 9c pushf 80104f2b: 58 pop %eax 80104f2c: 89 45 fc mov %eax,-0x4(%ebp) return eflags; 80104f2f: 8b 45 fc mov -0x4(%ebp),%eax } 80104f32: c9 leave 80104f33: c3 ret 80104f34 <cli>: asm volatile("movw %0, %%gs" : : "r" (v)); } static inline void cli(void) { 80104f34: 55 push %ebp 80104f35: 89 e5 mov %esp,%ebp asm volatile("cli"); 80104f37: fa cli } 80104f38: 5d pop %ebp 80104f39: c3 ret 80104f3a <sti>: static inline void sti(void) { 80104f3a: 55 push %ebp 80104f3b: 89 e5 mov %esp,%ebp asm volatile("sti"); 80104f3d: fb sti } 80104f3e: 5d pop %ebp 80104f3f: c3 ret 80104f40 <xchg>: static inline uint xchg(volatile uint *addr, uint newval) { 80104f40: 55 push %ebp 80104f41: 89 e5 mov %esp,%ebp 80104f43: 83 ec 10 sub $0x10,%esp uint result; // The + in "+m" denotes a read-modify-write operand. asm volatile("lock; xchgl %0, %1" : 80104f46: 8b 55 08 mov 0x8(%ebp),%edx 80104f49: 8b 45 0c mov 0xc(%ebp),%eax 80104f4c: 8b 4d 08 mov 0x8(%ebp),%ecx 80104f4f: f0 87 02 lock xchg %eax,(%edx) 80104f52: 89 45 fc mov %eax,-0x4(%ebp) "+m" (*addr), "=a" (result) : "1" (newval) : "cc"); return result; 80104f55: 8b 45 fc mov -0x4(%ebp),%eax } 80104f58: c9 leave 80104f59: c3 ret 80104f5a <initlock>: #include "proc.h" #include "spinlock.h" void initlock(struct spinlock *lk, char *name) { 80104f5a: 55 push %ebp 80104f5b: 89 e5 mov %esp,%ebp lk->name = name; 80104f5d: 8b 45 08 mov 0x8(%ebp),%eax 80104f60: 8b 55 0c mov 0xc(%ebp),%edx 80104f63: 89 50 04 mov %edx,0x4(%eax) lk->locked = 0; 80104f66: 8b 45 08 mov 0x8(%ebp),%eax 80104f69: c7 00 00 00 00 00 movl $0x0,(%eax) lk->cpu = 0; 80104f6f: 8b 45 08 mov 0x8(%ebp),%eax 80104f72: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) } 80104f79: 5d pop %ebp 80104f7a: c3 ret 80104f7b <acquire>: // Loops (spins) until the lock is acquired. // Holding a lock for a long time may cause // other CPUs to waste time spinning to acquire it. void acquire(struct spinlock *lk) { 80104f7b: 55 push %ebp 80104f7c: 89 e5 mov %esp,%ebp 80104f7e: 83 ec 18 sub $0x18,%esp pushcli(); // disable interrupts to avoid deadlock. 80104f81: e8 3e 01 00 00 call 801050c4 <pushcli> if(holding(lk)) 80104f86: 8b 45 08 mov 0x8(%ebp),%eax 80104f89: 89 04 24 mov %eax,(%esp) 80104f8c: e8 09 01 00 00 call 8010509a <holding> 80104f91: 85 c0 test %eax,%eax 80104f93: 74 0c je 80104fa1 <acquire+0x26> panic("acquire"); 80104f95: c7 04 24 f4 89 10 80 movl $0x801089f4,(%esp) 80104f9c: e8 99 b5 ff ff call 8010053a <panic> // The xchg is atomic. // It also serializes, so that reads after acquire are not // reordered before it. while(xchg(&lk->locked, 1) != 0) 80104fa1: 8b 45 08 mov 0x8(%ebp),%eax 80104fa4: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp) 80104fab: 00 80104fac: 89 04 24 mov %eax,(%esp) 80104faf: e8 8c ff ff ff call 80104f40 <xchg> 80104fb4: 85 c0 test %eax,%eax 80104fb6: 75 e9 jne 80104fa1 <acquire+0x26> ; // Record info about lock acquisition for debugging. lk->cpu = cpu; 80104fb8: 8b 45 08 mov 0x8(%ebp),%eax 80104fbb: 65 8b 15 00 00 00 00 mov %gs:0x0,%edx 80104fc2: 89 50 08 mov %edx,0x8(%eax) getcallerpcs(&lk, lk->pcs); 80104fc5: 8b 45 08 mov 0x8(%ebp),%eax 80104fc8: 83 c0 0c add $0xc,%eax 80104fcb: 89 44 24 04 mov %eax,0x4(%esp) 80104fcf: 8d 45 08 lea 0x8(%ebp),%eax 80104fd2: 89 04 24 mov %eax,(%esp) 80104fd5: e8 51 00 00 00 call 8010502b <getcallerpcs> } 80104fda: c9 leave 80104fdb: c3 ret 80104fdc <release>: // Release the lock. void release(struct spinlock *lk) { 80104fdc: 55 push %ebp 80104fdd: 89 e5 mov %esp,%ebp 80104fdf: 83 ec 18 sub $0x18,%esp if(!holding(lk)) 80104fe2: 8b 45 08 mov 0x8(%ebp),%eax 80104fe5: 89 04 24 mov %eax,(%esp) 80104fe8: e8 ad 00 00 00 call 8010509a <holding> 80104fed: 85 c0 test %eax,%eax 80104fef: 75 0c jne 80104ffd <release+0x21> panic("release"); 80104ff1: c7 04 24 fc 89 10 80 movl $0x801089fc,(%esp) 80104ff8: e8 3d b5 ff ff call 8010053a <panic> lk->pcs[0] = 0; 80104ffd: 8b 45 08 mov 0x8(%ebp),%eax 80105000: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) lk->cpu = 0; 80105007: 8b 45 08 mov 0x8(%ebp),%eax 8010500a: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) // But the 2007 Intel 64 Architecture Memory Ordering White // Paper says that Intel 64 and IA-32 will not move a load // after a store. So lock->locked = 0 would work here. // The xchg being asm volatile ensures gcc emits it after // the above assignments (and after the critical section). xchg(&lk->locked, 0); 80105011: 8b 45 08 mov 0x8(%ebp),%eax 80105014: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 8010501b: 00 8010501c: 89 04 24 mov %eax,(%esp) 8010501f: e8 1c ff ff ff call 80104f40 <xchg> popcli(); 80105024: e8 e3 00 00 00 call 8010510c <popcli> } 80105029: c9 leave 8010502a: c3 ret 8010502b <getcallerpcs>: // Record the current call stack in pcs[] by following the %ebp chain. void getcallerpcs(void *v, uint pcs[]) { 8010502b: 55 push %ebp 8010502c: 89 e5 mov %esp,%ebp 8010502e: 83 ec 10 sub $0x10,%esp uint *ebp; int i; ebp = (uint*)v - 2; 80105031: 8b 45 08 mov 0x8(%ebp),%eax 80105034: 83 e8 08 sub $0x8,%eax 80105037: 89 45 f8 mov %eax,-0x8(%ebp) for(i = 0; i < 10; i++){ 8010503a: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp) 80105041: eb 34 jmp 80105077 <getcallerpcs+0x4c> if(ebp == 0 || ebp < (uint*)KERNBASE || ebp == (uint*)0xffffffff) 80105043: 83 7d f8 00 cmpl $0x0,-0x8(%ebp) 80105047: 74 49 je 80105092 <getcallerpcs+0x67> 80105049: 81 7d f8 ff ff ff 7f cmpl $0x7fffffff,-0x8(%ebp) 80105050: 76 40 jbe 80105092 <getcallerpcs+0x67> 80105052: 83 7d f8 ff cmpl $0xffffffff,-0x8(%ebp) 80105056: 74 3a je 80105092 <getcallerpcs+0x67> break; pcs[i] = ebp[1]; // saved %eip 80105058: 8b 45 fc mov -0x4(%ebp),%eax 8010505b: c1 e0 02 shl $0x2,%eax 8010505e: 03 45 0c add 0xc(%ebp),%eax 80105061: 8b 55 f8 mov -0x8(%ebp),%edx 80105064: 83 c2 04 add $0x4,%edx 80105067: 8b 12 mov (%edx),%edx 80105069: 89 10 mov %edx,(%eax) ebp = (uint*)ebp[0]; // saved %ebp 8010506b: 8b 45 f8 mov -0x8(%ebp),%eax 8010506e: 8b 00 mov (%eax),%eax 80105070: 89 45 f8 mov %eax,-0x8(%ebp) { uint *ebp; int i; ebp = (uint*)v - 2; for(i = 0; i < 10; i++){ 80105073: 83 45 fc 01 addl $0x1,-0x4(%ebp) 80105077: 83 7d fc 09 cmpl $0x9,-0x4(%ebp) 8010507b: 7e c6 jle 80105043 <getcallerpcs+0x18> if(ebp == 0 || ebp < (uint*)KERNBASE || ebp == (uint*)0xffffffff) break; pcs[i] = ebp[1]; // saved %eip ebp = (uint*)ebp[0]; // saved %ebp } for(; i < 10; i++) 8010507d: eb 13 jmp 80105092 <getcallerpcs+0x67> pcs[i] = 0; 8010507f: 8b 45 fc mov -0x4(%ebp),%eax 80105082: c1 e0 02 shl $0x2,%eax 80105085: 03 45 0c add 0xc(%ebp),%eax 80105088: c7 00 00 00 00 00 movl $0x0,(%eax) if(ebp == 0 || ebp < (uint*)KERNBASE || ebp == (uint*)0xffffffff) break; pcs[i] = ebp[1]; // saved %eip ebp = (uint*)ebp[0]; // saved %ebp } for(; i < 10; i++) 8010508e: 83 45 fc 01 addl $0x1,-0x4(%ebp) 80105092: 83 7d fc 09 cmpl $0x9,-0x4(%ebp) 80105096: 7e e7 jle 8010507f <getcallerpcs+0x54> pcs[i] = 0; } 80105098: c9 leave 80105099: c3 ret 8010509a <holding>: // Check whether this cpu is holding the lock. int holding(struct spinlock *lock) { 8010509a: 55 push %ebp 8010509b: 89 e5 mov %esp,%ebp return lock->locked && lock->cpu == cpu; 8010509d: 8b 45 08 mov 0x8(%ebp),%eax 801050a0: 8b 00 mov (%eax),%eax 801050a2: 85 c0 test %eax,%eax 801050a4: 74 17 je 801050bd <holding+0x23> 801050a6: 8b 45 08 mov 0x8(%ebp),%eax 801050a9: 8b 50 08 mov 0x8(%eax),%edx 801050ac: 65 a1 00 00 00 00 mov %gs:0x0,%eax 801050b2: 39 c2 cmp %eax,%edx 801050b4: 75 07 jne 801050bd <holding+0x23> 801050b6: b8 01 00 00 00 mov $0x1,%eax 801050bb: eb 05 jmp 801050c2 <holding+0x28> 801050bd: b8 00 00 00 00 mov $0x0,%eax } 801050c2: 5d pop %ebp 801050c3: c3 ret 801050c4 <pushcli>: // it takes two popcli to undo two pushcli. Also, if interrupts // are off, then pushcli, popcli leaves them off. void pushcli(void) { 801050c4: 55 push %ebp 801050c5: 89 e5 mov %esp,%ebp 801050c7: 83 ec 10 sub $0x10,%esp int eflags; eflags = readeflags(); 801050ca: e8 55 fe ff ff call 80104f24 <readeflags> 801050cf: 89 45 fc mov %eax,-0x4(%ebp) cli(); 801050d2: e8 5d fe ff ff call 80104f34 <cli> if(cpu->ncli++ == 0) 801050d7: 65 a1 00 00 00 00 mov %gs:0x0,%eax 801050dd: 8b 90 ac 00 00 00 mov 0xac(%eax),%edx 801050e3: 85 d2 test %edx,%edx 801050e5: 0f 94 c1 sete %cl 801050e8: 83 c2 01 add $0x1,%edx 801050eb: 89 90 ac 00 00 00 mov %edx,0xac(%eax) 801050f1: 84 c9 test %cl,%cl 801050f3: 74 15 je 8010510a <pushcli+0x46> cpu->intena = eflags & FL_IF; 801050f5: 65 a1 00 00 00 00 mov %gs:0x0,%eax 801050fb: 8b 55 fc mov -0x4(%ebp),%edx 801050fe: 81 e2 00 02 00 00 and $0x200,%edx 80105104: 89 90 b0 00 00 00 mov %edx,0xb0(%eax) } 8010510a: c9 leave 8010510b: c3 ret 8010510c <popcli>: void popcli(void) { 8010510c: 55 push %ebp 8010510d: 89 e5 mov %esp,%ebp 8010510f: 83 ec 18 sub $0x18,%esp if(readeflags()&FL_IF) 80105112: e8 0d fe ff ff call 80104f24 <readeflags> 80105117: 25 00 02 00 00 and $0x200,%eax 8010511c: 85 c0 test %eax,%eax 8010511e: 74 0c je 8010512c <popcli+0x20> panic("popcli - interruptible"); 80105120: c7 04 24 04 8a 10 80 movl $0x80108a04,(%esp) 80105127: e8 0e b4 ff ff call 8010053a <panic> if(--cpu->ncli < 0) 8010512c: 65 a1 00 00 00 00 mov %gs:0x0,%eax 80105132: 8b 90 ac 00 00 00 mov 0xac(%eax),%edx 80105138: 83 ea 01 sub $0x1,%edx 8010513b: 89 90 ac 00 00 00 mov %edx,0xac(%eax) 80105141: 8b 80 ac 00 00 00 mov 0xac(%eax),%eax 80105147: 85 c0 test %eax,%eax 80105149: 79 0c jns 80105157 <popcli+0x4b> panic("popcli"); 8010514b: c7 04 24 1b 8a 10 80 movl $0x80108a1b,(%esp) 80105152: e8 e3 b3 ff ff call 8010053a <panic> if(cpu->ncli == 0 && cpu->intena) 80105157: 65 a1 00 00 00 00 mov %gs:0x0,%eax 8010515d: 8b 80 ac 00 00 00 mov 0xac(%eax),%eax 80105163: 85 c0 test %eax,%eax 80105165: 75 15 jne 8010517c <popcli+0x70> 80105167: 65 a1 00 00 00 00 mov %gs:0x0,%eax 8010516d: 8b 80 b0 00 00 00 mov 0xb0(%eax),%eax 80105173: 85 c0 test %eax,%eax 80105175: 74 05 je 8010517c <popcli+0x70> sti(); 80105177: e8 be fd ff ff call 80104f3a <sti> } 8010517c: c9 leave 8010517d: c3 ret ... 80105180 <stosb>: "cc"); } static inline void stosb(void *addr, int data, int cnt) { 80105180: 55 push %ebp 80105181: 89 e5 mov %esp,%ebp 80105183: 57 push %edi 80105184: 53 push %ebx asm volatile("cld; rep stosb" : 80105185: 8b 4d 08 mov 0x8(%ebp),%ecx 80105188: 8b 55 10 mov 0x10(%ebp),%edx 8010518b: 8b 45 0c mov 0xc(%ebp),%eax 8010518e: 89 cb mov %ecx,%ebx 80105190: 89 df mov %ebx,%edi 80105192: 89 d1 mov %edx,%ecx 80105194: fc cld 80105195: f3 aa rep stos %al,%es:(%edi) 80105197: 89 ca mov %ecx,%edx 80105199: 89 fb mov %edi,%ebx 8010519b: 89 5d 08 mov %ebx,0x8(%ebp) 8010519e: 89 55 10 mov %edx,0x10(%ebp) "=D" (addr), "=c" (cnt) : "0" (addr), "1" (cnt), "a" (data) : "memory", "cc"); } 801051a1: 5b pop %ebx 801051a2: 5f pop %edi 801051a3: 5d pop %ebp 801051a4: c3 ret 801051a5 <stosl>: static inline void stosl(void *addr, int data, int cnt) { 801051a5: 55 push %ebp 801051a6: 89 e5 mov %esp,%ebp 801051a8: 57 push %edi 801051a9: 53 push %ebx asm volatile("cld; rep stosl" : 801051aa: 8b 4d 08 mov 0x8(%ebp),%ecx 801051ad: 8b 55 10 mov 0x10(%ebp),%edx 801051b0: 8b 45 0c mov 0xc(%ebp),%eax 801051b3: 89 cb mov %ecx,%ebx 801051b5: 89 df mov %ebx,%edi 801051b7: 89 d1 mov %edx,%ecx 801051b9: fc cld 801051ba: f3 ab rep stos %eax,%es:(%edi) 801051bc: 89 ca mov %ecx,%edx 801051be: 89 fb mov %edi,%ebx 801051c0: 89 5d 08 mov %ebx,0x8(%ebp) 801051c3: 89 55 10 mov %edx,0x10(%ebp) "=D" (addr), "=c" (cnt) : "0" (addr), "1" (cnt), "a" (data) : "memory", "cc"); } 801051c6: 5b pop %ebx 801051c7: 5f pop %edi 801051c8: 5d pop %ebp 801051c9: c3 ret 801051ca <memset>: #include "types.h" #include "x86.h" void* memset(void *dst, int c, uint n) { 801051ca: 55 push %ebp 801051cb: 89 e5 mov %esp,%ebp 801051cd: 83 ec 0c sub $0xc,%esp if ((int)dst%4 == 0 && n%4 == 0){ 801051d0: 8b 45 08 mov 0x8(%ebp),%eax 801051d3: 83 e0 03 and $0x3,%eax 801051d6: 85 c0 test %eax,%eax 801051d8: 75 49 jne 80105223 <memset+0x59> 801051da: 8b 45 10 mov 0x10(%ebp),%eax 801051dd: 83 e0 03 and $0x3,%eax 801051e0: 85 c0 test %eax,%eax 801051e2: 75 3f jne 80105223 <memset+0x59> c &= 0xFF; 801051e4: 81 65 0c ff 00 00 00 andl $0xff,0xc(%ebp) stosl(dst, (c<<24)|(c<<16)|(c<<8)|c, n/4); 801051eb: 8b 45 10 mov 0x10(%ebp),%eax 801051ee: c1 e8 02 shr $0x2,%eax 801051f1: 89 c2 mov %eax,%edx 801051f3: 8b 45 0c mov 0xc(%ebp),%eax 801051f6: 89 c1 mov %eax,%ecx 801051f8: c1 e1 18 shl $0x18,%ecx 801051fb: 8b 45 0c mov 0xc(%ebp),%eax 801051fe: c1 e0 10 shl $0x10,%eax 80105201: 09 c1 or %eax,%ecx 80105203: 8b 45 0c mov 0xc(%ebp),%eax 80105206: c1 e0 08 shl $0x8,%eax 80105209: 09 c8 or %ecx,%eax 8010520b: 0b 45 0c or 0xc(%ebp),%eax 8010520e: 89 54 24 08 mov %edx,0x8(%esp) 80105212: 89 44 24 04 mov %eax,0x4(%esp) 80105216: 8b 45 08 mov 0x8(%ebp),%eax 80105219: 89 04 24 mov %eax,(%esp) 8010521c: e8 84 ff ff ff call 801051a5 <stosl> #include "x86.h" void* memset(void *dst, int c, uint n) { if ((int)dst%4 == 0 && n%4 == 0){ 80105221: eb 19 jmp 8010523c <memset+0x72> c &= 0xFF; stosl(dst, (c<<24)|(c<<16)|(c<<8)|c, n/4); } else stosb(dst, c, n); 80105223: 8b 45 10 mov 0x10(%ebp),%eax 80105226: 89 44 24 08 mov %eax,0x8(%esp) 8010522a: 8b 45 0c mov 0xc(%ebp),%eax 8010522d: 89 44 24 04 mov %eax,0x4(%esp) 80105231: 8b 45 08 mov 0x8(%ebp),%eax 80105234: 89 04 24 mov %eax,(%esp) 80105237: e8 44 ff ff ff call 80105180 <stosb> return dst; 8010523c: 8b 45 08 mov 0x8(%ebp),%eax } 8010523f: c9 leave 80105240: c3 ret 80105241 <memcmp>: int memcmp(const void *v1, const void *v2, uint n) { 80105241: 55 push %ebp 80105242: 89 e5 mov %esp,%ebp 80105244: 83 ec 10 sub $0x10,%esp const uchar *s1, *s2; s1 = v1; 80105247: 8b 45 08 mov 0x8(%ebp),%eax 8010524a: 89 45 f8 mov %eax,-0x8(%ebp) s2 = v2; 8010524d: 8b 45 0c mov 0xc(%ebp),%eax 80105250: 89 45 fc mov %eax,-0x4(%ebp) while(n-- > 0){ 80105253: eb 32 jmp 80105287 <memcmp+0x46> if(*s1 != *s2) 80105255: 8b 45 f8 mov -0x8(%ebp),%eax 80105258: 0f b6 10 movzbl (%eax),%edx 8010525b: 8b 45 fc mov -0x4(%ebp),%eax 8010525e: 0f b6 00 movzbl (%eax),%eax 80105261: 38 c2 cmp %al,%dl 80105263: 74 1a je 8010527f <memcmp+0x3e> return *s1 - *s2; 80105265: 8b 45 f8 mov -0x8(%ebp),%eax 80105268: 0f b6 00 movzbl (%eax),%eax 8010526b: 0f b6 d0 movzbl %al,%edx 8010526e: 8b 45 fc mov -0x4(%ebp),%eax 80105271: 0f b6 00 movzbl (%eax),%eax 80105274: 0f b6 c0 movzbl %al,%eax 80105277: 89 d1 mov %edx,%ecx 80105279: 29 c1 sub %eax,%ecx 8010527b: 89 c8 mov %ecx,%eax 8010527d: eb 1c jmp 8010529b <memcmp+0x5a> s1++, s2++; 8010527f: 83 45 f8 01 addl $0x1,-0x8(%ebp) 80105283: 83 45 fc 01 addl $0x1,-0x4(%ebp) { const uchar *s1, *s2; s1 = v1; s2 = v2; while(n-- > 0){ 80105287: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 8010528b: 0f 95 c0 setne %al 8010528e: 83 6d 10 01 subl $0x1,0x10(%ebp) 80105292: 84 c0 test %al,%al 80105294: 75 bf jne 80105255 <memcmp+0x14> if(*s1 != *s2) return *s1 - *s2; s1++, s2++; } return 0; 80105296: b8 00 00 00 00 mov $0x0,%eax } 8010529b: c9 leave 8010529c: c3 ret 8010529d <memmove>: void* memmove(void *dst, const void *src, uint n) { 8010529d: 55 push %ebp 8010529e: 89 e5 mov %esp,%ebp 801052a0: 83 ec 10 sub $0x10,%esp const char *s; char *d; s = src; 801052a3: 8b 45 0c mov 0xc(%ebp),%eax 801052a6: 89 45 f8 mov %eax,-0x8(%ebp) d = dst; 801052a9: 8b 45 08 mov 0x8(%ebp),%eax 801052ac: 89 45 fc mov %eax,-0x4(%ebp) if(s < d && s + n > d){ 801052af: 8b 45 f8 mov -0x8(%ebp),%eax 801052b2: 3b 45 fc cmp -0x4(%ebp),%eax 801052b5: 73 55 jae 8010530c <memmove+0x6f> 801052b7: 8b 45 10 mov 0x10(%ebp),%eax 801052ba: 8b 55 f8 mov -0x8(%ebp),%edx 801052bd: 8d 04 02 lea (%edx,%eax,1),%eax 801052c0: 3b 45 fc cmp -0x4(%ebp),%eax 801052c3: 76 4a jbe 8010530f <memmove+0x72> s += n; 801052c5: 8b 45 10 mov 0x10(%ebp),%eax 801052c8: 01 45 f8 add %eax,-0x8(%ebp) d += n; 801052cb: 8b 45 10 mov 0x10(%ebp),%eax 801052ce: 01 45 fc add %eax,-0x4(%ebp) while(n-- > 0) 801052d1: eb 13 jmp 801052e6 <memmove+0x49> *--d = *--s; 801052d3: 83 6d fc 01 subl $0x1,-0x4(%ebp) 801052d7: 83 6d f8 01 subl $0x1,-0x8(%ebp) 801052db: 8b 45 f8 mov -0x8(%ebp),%eax 801052de: 0f b6 10 movzbl (%eax),%edx 801052e1: 8b 45 fc mov -0x4(%ebp),%eax 801052e4: 88 10 mov %dl,(%eax) s = src; d = dst; if(s < d && s + n > d){ s += n; d += n; while(n-- > 0) 801052e6: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 801052ea: 0f 95 c0 setne %al 801052ed: 83 6d 10 01 subl $0x1,0x10(%ebp) 801052f1: 84 c0 test %al,%al 801052f3: 75 de jne 801052d3 <memmove+0x36> const char *s; char *d; s = src; d = dst; if(s < d && s + n > d){ 801052f5: eb 28 jmp 8010531f <memmove+0x82> d += n; while(n-- > 0) *--d = *--s; } else while(n-- > 0) *d++ = *s++; 801052f7: 8b 45 f8 mov -0x8(%ebp),%eax 801052fa: 0f b6 10 movzbl (%eax),%edx 801052fd: 8b 45 fc mov -0x4(%ebp),%eax 80105300: 88 10 mov %dl,(%eax) 80105302: 83 45 fc 01 addl $0x1,-0x4(%ebp) 80105306: 83 45 f8 01 addl $0x1,-0x8(%ebp) 8010530a: eb 04 jmp 80105310 <memmove+0x73> s += n; d += n; while(n-- > 0) *--d = *--s; } else while(n-- > 0) 8010530c: 90 nop 8010530d: eb 01 jmp 80105310 <memmove+0x73> 8010530f: 90 nop 80105310: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 80105314: 0f 95 c0 setne %al 80105317: 83 6d 10 01 subl $0x1,0x10(%ebp) 8010531b: 84 c0 test %al,%al 8010531d: 75 d8 jne 801052f7 <memmove+0x5a> *d++ = *s++; return dst; 8010531f: 8b 45 08 mov 0x8(%ebp),%eax } 80105322: c9 leave 80105323: c3 ret 80105324 <memcpy>: // memcpy exists to placate GCC. Use memmove. void* memcpy(void *dst, const void *src, uint n) { 80105324: 55 push %ebp 80105325: 89 e5 mov %esp,%ebp 80105327: 83 ec 0c sub $0xc,%esp return memmove(dst, src, n); 8010532a: 8b 45 10 mov 0x10(%ebp),%eax 8010532d: 89 44 24 08 mov %eax,0x8(%esp) 80105331: 8b 45 0c mov 0xc(%ebp),%eax 80105334: 89 44 24 04 mov %eax,0x4(%esp) 80105338: 8b 45 08 mov 0x8(%ebp),%eax 8010533b: 89 04 24 mov %eax,(%esp) 8010533e: e8 5a ff ff ff call 8010529d <memmove> } 80105343: c9 leave 80105344: c3 ret 80105345 <strncmp>: int strncmp(const char *p, const char *q, uint n) { 80105345: 55 push %ebp 80105346: 89 e5 mov %esp,%ebp while(n > 0 && *p && *p == *q) 80105348: eb 0c jmp 80105356 <strncmp+0x11> n--, p++, q++; 8010534a: 83 6d 10 01 subl $0x1,0x10(%ebp) 8010534e: 83 45 08 01 addl $0x1,0x8(%ebp) 80105352: 83 45 0c 01 addl $0x1,0xc(%ebp) } int strncmp(const char *p, const char *q, uint n) { while(n > 0 && *p && *p == *q) 80105356: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 8010535a: 74 1a je 80105376 <strncmp+0x31> 8010535c: 8b 45 08 mov 0x8(%ebp),%eax 8010535f: 0f b6 00 movzbl (%eax),%eax 80105362: 84 c0 test %al,%al 80105364: 74 10 je 80105376 <strncmp+0x31> 80105366: 8b 45 08 mov 0x8(%ebp),%eax 80105369: 0f b6 10 movzbl (%eax),%edx 8010536c: 8b 45 0c mov 0xc(%ebp),%eax 8010536f: 0f b6 00 movzbl (%eax),%eax 80105372: 38 c2 cmp %al,%dl 80105374: 74 d4 je 8010534a <strncmp+0x5> n--, p++, q++; if(n == 0) 80105376: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 8010537a: 75 07 jne 80105383 <strncmp+0x3e> return 0; 8010537c: b8 00 00 00 00 mov $0x0,%eax 80105381: eb 18 jmp 8010539b <strncmp+0x56> return (uchar)*p - (uchar)*q; 80105383: 8b 45 08 mov 0x8(%ebp),%eax 80105386: 0f b6 00 movzbl (%eax),%eax 80105389: 0f b6 d0 movzbl %al,%edx 8010538c: 8b 45 0c mov 0xc(%ebp),%eax 8010538f: 0f b6 00 movzbl (%eax),%eax 80105392: 0f b6 c0 movzbl %al,%eax 80105395: 89 d1 mov %edx,%ecx 80105397: 29 c1 sub %eax,%ecx 80105399: 89 c8 mov %ecx,%eax } 8010539b: 5d pop %ebp 8010539c: c3 ret 8010539d <strncpy>: char* strncpy(char *s, const char *t, int n) { 8010539d: 55 push %ebp 8010539e: 89 e5 mov %esp,%ebp 801053a0: 83 ec 10 sub $0x10,%esp char *os; os = s; 801053a3: 8b 45 08 mov 0x8(%ebp),%eax 801053a6: 89 45 fc mov %eax,-0x4(%ebp) while(n-- > 0 && (*s++ = *t++) != 0) 801053a9: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 801053ad: 0f 9f c0 setg %al 801053b0: 83 6d 10 01 subl $0x1,0x10(%ebp) 801053b4: 84 c0 test %al,%al 801053b6: 74 30 je 801053e8 <strncpy+0x4b> 801053b8: 8b 45 0c mov 0xc(%ebp),%eax 801053bb: 0f b6 10 movzbl (%eax),%edx 801053be: 8b 45 08 mov 0x8(%ebp),%eax 801053c1: 88 10 mov %dl,(%eax) 801053c3: 8b 45 08 mov 0x8(%ebp),%eax 801053c6: 0f b6 00 movzbl (%eax),%eax 801053c9: 84 c0 test %al,%al 801053cb: 0f 95 c0 setne %al 801053ce: 83 45 08 01 addl $0x1,0x8(%ebp) 801053d2: 83 45 0c 01 addl $0x1,0xc(%ebp) 801053d6: 84 c0 test %al,%al 801053d8: 75 cf jne 801053a9 <strncpy+0xc> ; while(n-- > 0) 801053da: eb 0d jmp 801053e9 <strncpy+0x4c> *s++ = 0; 801053dc: 8b 45 08 mov 0x8(%ebp),%eax 801053df: c6 00 00 movb $0x0,(%eax) 801053e2: 83 45 08 01 addl $0x1,0x8(%ebp) 801053e6: eb 01 jmp 801053e9 <strncpy+0x4c> char *os; os = s; while(n-- > 0 && (*s++ = *t++) != 0) ; while(n-- > 0) 801053e8: 90 nop 801053e9: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 801053ed: 0f 9f c0 setg %al 801053f0: 83 6d 10 01 subl $0x1,0x10(%ebp) 801053f4: 84 c0 test %al,%al 801053f6: 75 e4 jne 801053dc <strncpy+0x3f> *s++ = 0; return os; 801053f8: 8b 45 fc mov -0x4(%ebp),%eax } 801053fb: c9 leave 801053fc: c3 ret 801053fd <safestrcpy>: // Like strncpy but guaranteed to NUL-terminate. char* safestrcpy(char *s, const char *t, int n) { 801053fd: 55 push %ebp 801053fe: 89 e5 mov %esp,%ebp 80105400: 83 ec 10 sub $0x10,%esp char *os; os = s; 80105403: 8b 45 08 mov 0x8(%ebp),%eax 80105406: 89 45 fc mov %eax,-0x4(%ebp) if(n <= 0) 80105409: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 8010540d: 7f 05 jg 80105414 <safestrcpy+0x17> return os; 8010540f: 8b 45 fc mov -0x4(%ebp),%eax 80105412: eb 35 jmp 80105449 <safestrcpy+0x4c> while(--n > 0 && (*s++ = *t++) != 0) 80105414: 83 6d 10 01 subl $0x1,0x10(%ebp) 80105418: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 8010541c: 7e 22 jle 80105440 <safestrcpy+0x43> 8010541e: 8b 45 0c mov 0xc(%ebp),%eax 80105421: 0f b6 10 movzbl (%eax),%edx 80105424: 8b 45 08 mov 0x8(%ebp),%eax 80105427: 88 10 mov %dl,(%eax) 80105429: 8b 45 08 mov 0x8(%ebp),%eax 8010542c: 0f b6 00 movzbl (%eax),%eax 8010542f: 84 c0 test %al,%al 80105431: 0f 95 c0 setne %al 80105434: 83 45 08 01 addl $0x1,0x8(%ebp) 80105438: 83 45 0c 01 addl $0x1,0xc(%ebp) 8010543c: 84 c0 test %al,%al 8010543e: 75 d4 jne 80105414 <safestrcpy+0x17> ; *s = 0; 80105440: 8b 45 08 mov 0x8(%ebp),%eax 80105443: c6 00 00 movb $0x0,(%eax) return os; 80105446: 8b 45 fc mov -0x4(%ebp),%eax } 80105449: c9 leave 8010544a: c3 ret 8010544b <strlen>: int strlen(const char *s) { 8010544b: 55 push %ebp 8010544c: 89 e5 mov %esp,%ebp 8010544e: 83 ec 10 sub $0x10,%esp int n; for(n = 0; s[n]; n++) 80105451: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp) 80105458: eb 04 jmp 8010545e <strlen+0x13> 8010545a: 83 45 fc 01 addl $0x1,-0x4(%ebp) 8010545e: 8b 45 fc mov -0x4(%ebp),%eax 80105461: 03 45 08 add 0x8(%ebp),%eax 80105464: 0f b6 00 movzbl (%eax),%eax 80105467: 84 c0 test %al,%al 80105469: 75 ef jne 8010545a <strlen+0xf> ; return n; 8010546b: 8b 45 fc mov -0x4(%ebp),%eax } 8010546e: c9 leave 8010546f: c3 ret 80105470 <swtch>: # Save current register context in old # and then load register context from new. .globl swtch swtch: movl 4(%esp), %eax 80105470: 8b 44 24 04 mov 0x4(%esp),%eax movl 8(%esp), %edx 80105474: 8b 54 24 08 mov 0x8(%esp),%edx # Save old callee-save registers pushl %ebp 80105478: 55 push %ebp pushl %ebx 80105479: 53 push %ebx pushl %esi 8010547a: 56 push %esi pushl %edi 8010547b: 57 push %edi # Switch stacks movl %esp, (%eax) 8010547c: 89 20 mov %esp,(%eax) movl %edx, %esp 8010547e: 89 d4 mov %edx,%esp # Load new callee-save registers popl %edi 80105480: 5f pop %edi popl %esi 80105481: 5e pop %esi popl %ebx 80105482: 5b pop %ebx popl %ebp 80105483: 5d pop %ebp ret 80105484: c3 ret 80105485: 00 00 add %al,(%eax) ... 80105488 <fetchint>: // to a saved program counter, and then the first argument. // Fetch the int at addr from the current process. int fetchint(uint addr, int *ip) { 80105488: 55 push %ebp 80105489: 89 e5 mov %esp,%ebp if(addr >= proc->sz || addr+4 > proc->sz) 8010548b: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80105491: 8b 00 mov (%eax),%eax 80105493: 3b 45 08 cmp 0x8(%ebp),%eax 80105496: 76 12 jbe 801054aa <fetchint+0x22> 80105498: 8b 45 08 mov 0x8(%ebp),%eax 8010549b: 8d 50 04 lea 0x4(%eax),%edx 8010549e: 65 a1 04 00 00 00 mov %gs:0x4,%eax 801054a4: 8b 00 mov (%eax),%eax 801054a6: 39 c2 cmp %eax,%edx 801054a8: 76 07 jbe 801054b1 <fetchint+0x29> return -1; 801054aa: b8 ff ff ff ff mov $0xffffffff,%eax 801054af: eb 0f jmp 801054c0 <fetchint+0x38> *ip = *(int*)(addr); 801054b1: 8b 45 08 mov 0x8(%ebp),%eax 801054b4: 8b 10 mov (%eax),%edx 801054b6: 8b 45 0c mov 0xc(%ebp),%eax 801054b9: 89 10 mov %edx,(%eax) return 0; 801054bb: b8 00 00 00 00 mov $0x0,%eax } 801054c0: 5d pop %ebp 801054c1: c3 ret 801054c2 <fetchstr>: // Fetch the nul-terminated string at addr from the current process. // Doesn't actually copy the string - just sets *pp to point at it. // Returns length of string, not including nul. int fetchstr(uint addr, char **pp) { 801054c2: 55 push %ebp 801054c3: 89 e5 mov %esp,%ebp 801054c5: 83 ec 10 sub $0x10,%esp char *s, *ep; if(addr >= proc->sz) 801054c8: 65 a1 04 00 00 00 mov %gs:0x4,%eax 801054ce: 8b 00 mov (%eax),%eax 801054d0: 3b 45 08 cmp 0x8(%ebp),%eax 801054d3: 77 07 ja 801054dc <fetchstr+0x1a> return -1; 801054d5: b8 ff ff ff ff mov $0xffffffff,%eax 801054da: eb 48 jmp 80105524 <fetchstr+0x62> *pp = (char*)addr; 801054dc: 8b 55 08 mov 0x8(%ebp),%edx 801054df: 8b 45 0c mov 0xc(%ebp),%eax 801054e2: 89 10 mov %edx,(%eax) ep = (char*)proc->sz; 801054e4: 65 a1 04 00 00 00 mov %gs:0x4,%eax 801054ea: 8b 00 mov (%eax),%eax 801054ec: 89 45 fc mov %eax,-0x4(%ebp) for(s = *pp; s < ep; s++) 801054ef: 8b 45 0c mov 0xc(%ebp),%eax 801054f2: 8b 00 mov (%eax),%eax 801054f4: 89 45 f8 mov %eax,-0x8(%ebp) 801054f7: eb 1e jmp 80105517 <fetchstr+0x55> if(*s == 0) 801054f9: 8b 45 f8 mov -0x8(%ebp),%eax 801054fc: 0f b6 00 movzbl (%eax),%eax 801054ff: 84 c0 test %al,%al 80105501: 75 10 jne 80105513 <fetchstr+0x51> return s - *pp; 80105503: 8b 55 f8 mov -0x8(%ebp),%edx 80105506: 8b 45 0c mov 0xc(%ebp),%eax 80105509: 8b 00 mov (%eax),%eax 8010550b: 89 d1 mov %edx,%ecx 8010550d: 29 c1 sub %eax,%ecx 8010550f: 89 c8 mov %ecx,%eax 80105511: eb 11 jmp 80105524 <fetchstr+0x62> if(addr >= proc->sz) return -1; *pp = (char*)addr; ep = (char*)proc->sz; for(s = *pp; s < ep; s++) 80105513: 83 45 f8 01 addl $0x1,-0x8(%ebp) 80105517: 8b 45 f8 mov -0x8(%ebp),%eax 8010551a: 3b 45 fc cmp -0x4(%ebp),%eax 8010551d: 72 da jb 801054f9 <fetchstr+0x37> if(*s == 0) return s - *pp; return -1; 8010551f: b8 ff ff ff ff mov $0xffffffff,%eax } 80105524: c9 leave 80105525: c3 ret 80105526 <argint>: // Fetch the nth 32-bit system call argument. int argint(int n, int *ip) { 80105526: 55 push %ebp 80105527: 89 e5 mov %esp,%ebp 80105529: 83 ec 08 sub $0x8,%esp return fetchint(proc->tf->esp + 4 + 4*n, ip); 8010552c: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80105532: 8b 40 18 mov 0x18(%eax),%eax 80105535: 8b 50 44 mov 0x44(%eax),%edx 80105538: 8b 45 08 mov 0x8(%ebp),%eax 8010553b: c1 e0 02 shl $0x2,%eax 8010553e: 8d 04 02 lea (%edx,%eax,1),%eax 80105541: 8d 50 04 lea 0x4(%eax),%edx 80105544: 8b 45 0c mov 0xc(%ebp),%eax 80105547: 89 44 24 04 mov %eax,0x4(%esp) 8010554b: 89 14 24 mov %edx,(%esp) 8010554e: e8 35 ff ff ff call 80105488 <fetchint> } 80105553: c9 leave 80105554: c3 ret 80105555 <argptr>: // Fetch the nth word-sized system call argument as a pointer // to a block of memory of size n bytes. Check that the pointer // lies within the process address space. int argptr(int n, char **pp, int size) { 80105555: 55 push %ebp 80105556: 89 e5 mov %esp,%ebp 80105558: 83 ec 18 sub $0x18,%esp int i; if(argint(n, &i) < 0) 8010555b: 8d 45 fc lea -0x4(%ebp),%eax 8010555e: 89 44 24 04 mov %eax,0x4(%esp) 80105562: 8b 45 08 mov 0x8(%ebp),%eax 80105565: 89 04 24 mov %eax,(%esp) 80105568: e8 b9 ff ff ff call 80105526 <argint> 8010556d: 85 c0 test %eax,%eax 8010556f: 79 07 jns 80105578 <argptr+0x23> return -1; 80105571: b8 ff ff ff ff mov $0xffffffff,%eax 80105576: eb 3d jmp 801055b5 <argptr+0x60> if((uint)i >= proc->sz || (uint)i+size > proc->sz) 80105578: 8b 45 fc mov -0x4(%ebp),%eax 8010557b: 89 c2 mov %eax,%edx 8010557d: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80105583: 8b 00 mov (%eax),%eax 80105585: 39 c2 cmp %eax,%edx 80105587: 73 16 jae 8010559f <argptr+0x4a> 80105589: 8b 45 fc mov -0x4(%ebp),%eax 8010558c: 89 c2 mov %eax,%edx 8010558e: 8b 45 10 mov 0x10(%ebp),%eax 80105591: 01 c2 add %eax,%edx 80105593: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80105599: 8b 00 mov (%eax),%eax 8010559b: 39 c2 cmp %eax,%edx 8010559d: 76 07 jbe 801055a6 <argptr+0x51> return -1; 8010559f: b8 ff ff ff ff mov $0xffffffff,%eax 801055a4: eb 0f jmp 801055b5 <argptr+0x60> *pp = (char*)i; 801055a6: 8b 45 fc mov -0x4(%ebp),%eax 801055a9: 89 c2 mov %eax,%edx 801055ab: 8b 45 0c mov 0xc(%ebp),%eax 801055ae: 89 10 mov %edx,(%eax) return 0; 801055b0: b8 00 00 00 00 mov $0x0,%eax } 801055b5: c9 leave 801055b6: c3 ret 801055b7 <argstr>: // Check that the pointer is valid and the string is nul-terminated. // (There is no shared writable memory, so the string can't change // between this check and being used by the kernel.) int argstr(int n, char **pp) { 801055b7: 55 push %ebp 801055b8: 89 e5 mov %esp,%ebp 801055ba: 83 ec 18 sub $0x18,%esp int addr; if(argint(n, &addr) < 0) 801055bd: 8d 45 fc lea -0x4(%ebp),%eax 801055c0: 89 44 24 04 mov %eax,0x4(%esp) 801055c4: 8b 45 08 mov 0x8(%ebp),%eax 801055c7: 89 04 24 mov %eax,(%esp) 801055ca: e8 57 ff ff ff call 80105526 <argint> 801055cf: 85 c0 test %eax,%eax 801055d1: 79 07 jns 801055da <argstr+0x23> return -1; 801055d3: b8 ff ff ff ff mov $0xffffffff,%eax 801055d8: eb 12 jmp 801055ec <argstr+0x35> return fetchstr(addr, pp); 801055da: 8b 45 fc mov -0x4(%ebp),%eax 801055dd: 8b 55 0c mov 0xc(%ebp),%edx 801055e0: 89 54 24 04 mov %edx,0x4(%esp) 801055e4: 89 04 24 mov %eax,(%esp) 801055e7: e8 d6 fe ff ff call 801054c2 <fetchstr> } 801055ec: c9 leave 801055ed: c3 ret 801055ee <syscall>: [SYS_twakeup] sys_twakeup, }; void syscall(void) { 801055ee: 55 push %ebp 801055ef: 89 e5 mov %esp,%ebp 801055f1: 53 push %ebx 801055f2: 83 ec 24 sub $0x24,%esp int num; num = proc->tf->eax; 801055f5: 65 a1 04 00 00 00 mov %gs:0x4,%eax 801055fb: 8b 40 18 mov 0x18(%eax),%eax 801055fe: 8b 40 1c mov 0x1c(%eax),%eax 80105601: 89 45 f4 mov %eax,-0xc(%ebp) if(num > 0 && num < NELEM(syscalls) && syscalls[num]) { 80105604: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 80105608: 7e 30 jle 8010563a <syscall+0x4c> 8010560a: 8b 45 f4 mov -0xc(%ebp),%eax 8010560d: 83 f8 19 cmp $0x19,%eax 80105610: 77 28 ja 8010563a <syscall+0x4c> 80105612: 8b 45 f4 mov -0xc(%ebp),%eax 80105615: 8b 04 85 40 b0 10 80 mov -0x7fef4fc0(,%eax,4),%eax 8010561c: 85 c0 test %eax,%eax 8010561e: 74 1a je 8010563a <syscall+0x4c> proc->tf->eax = syscalls[num](); 80105620: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80105626: 8b 58 18 mov 0x18(%eax),%ebx 80105629: 8b 45 f4 mov -0xc(%ebp),%eax 8010562c: 8b 04 85 40 b0 10 80 mov -0x7fef4fc0(,%eax,4),%eax 80105633: ff d0 call *%eax 80105635: 89 43 1c mov %eax,0x1c(%ebx) syscall(void) { int num; num = proc->tf->eax; if(num > 0 && num < NELEM(syscalls) && syscalls[num]) { 80105638: eb 3d jmp 80105677 <syscall+0x89> proc->tf->eax = syscalls[num](); } else { cprintf("%d %s: unknown sys call %d\n", proc->pid, proc->name, num); 8010563a: 65 a1 04 00 00 00 mov %gs:0x4,%eax num = proc->tf->eax; if(num > 0 && num < NELEM(syscalls) && syscalls[num]) { proc->tf->eax = syscalls[num](); } else { cprintf("%d %s: unknown sys call %d\n", 80105640: 8d 48 6c lea 0x6c(%eax),%ecx proc->pid, proc->name, num); 80105643: 65 a1 04 00 00 00 mov %gs:0x4,%eax num = proc->tf->eax; if(num > 0 && num < NELEM(syscalls) && syscalls[num]) { proc->tf->eax = syscalls[num](); } else { cprintf("%d %s: unknown sys call %d\n", 80105649: 8b 40 10 mov 0x10(%eax),%eax 8010564c: 8b 55 f4 mov -0xc(%ebp),%edx 8010564f: 89 54 24 0c mov %edx,0xc(%esp) 80105653: 89 4c 24 08 mov %ecx,0x8(%esp) 80105657: 89 44 24 04 mov %eax,0x4(%esp) 8010565b: c7 04 24 22 8a 10 80 movl $0x80108a22,(%esp) 80105662: e8 33 ad ff ff call 8010039a <cprintf> proc->pid, proc->name, num); proc->tf->eax = -1; 80105667: 65 a1 04 00 00 00 mov %gs:0x4,%eax 8010566d: 8b 40 18 mov 0x18(%eax),%eax 80105670: c7 40 1c ff ff ff ff movl $0xffffffff,0x1c(%eax) } } 80105677: 83 c4 24 add $0x24,%esp 8010567a: 5b pop %ebx 8010567b: 5d pop %ebp 8010567c: c3 ret 8010567d: 00 00 add %al,(%eax) ... 80105680 <argfd>: // Fetch the nth word-sized system call argument as a file descriptor // and return both the descriptor and the corresponding struct file. static int argfd(int n, int *pfd, struct file **pf) { 80105680: 55 push %ebp 80105681: 89 e5 mov %esp,%ebp 80105683: 83 ec 28 sub $0x28,%esp int fd; struct file *f; if(argint(n, &fd) < 0) 80105686: 8d 45 f0 lea -0x10(%ebp),%eax 80105689: 89 44 24 04 mov %eax,0x4(%esp) 8010568d: 8b 45 08 mov 0x8(%ebp),%eax 80105690: 89 04 24 mov %eax,(%esp) 80105693: e8 8e fe ff ff call 80105526 <argint> 80105698: 85 c0 test %eax,%eax 8010569a: 79 07 jns 801056a3 <argfd+0x23> return -1; 8010569c: b8 ff ff ff ff mov $0xffffffff,%eax 801056a1: eb 50 jmp 801056f3 <argfd+0x73> if(fd < 0 || fd >= NOFILE || (f=proc->ofile[fd]) == 0) 801056a3: 8b 45 f0 mov -0x10(%ebp),%eax 801056a6: 85 c0 test %eax,%eax 801056a8: 78 21 js 801056cb <argfd+0x4b> 801056aa: 8b 45 f0 mov -0x10(%ebp),%eax 801056ad: 83 f8 0f cmp $0xf,%eax 801056b0: 7f 19 jg 801056cb <argfd+0x4b> 801056b2: 65 a1 04 00 00 00 mov %gs:0x4,%eax 801056b8: 8b 55 f0 mov -0x10(%ebp),%edx 801056bb: 83 c2 08 add $0x8,%edx 801056be: 8b 44 90 08 mov 0x8(%eax,%edx,4),%eax 801056c2: 89 45 f4 mov %eax,-0xc(%ebp) 801056c5: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 801056c9: 75 07 jne 801056d2 <argfd+0x52> return -1; 801056cb: b8 ff ff ff ff mov $0xffffffff,%eax 801056d0: eb 21 jmp 801056f3 <argfd+0x73> if(pfd) 801056d2: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 801056d6: 74 08 je 801056e0 <argfd+0x60> *pfd = fd; 801056d8: 8b 55 f0 mov -0x10(%ebp),%edx 801056db: 8b 45 0c mov 0xc(%ebp),%eax 801056de: 89 10 mov %edx,(%eax) if(pf) 801056e0: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 801056e4: 74 08 je 801056ee <argfd+0x6e> *pf = f; 801056e6: 8b 45 10 mov 0x10(%ebp),%eax 801056e9: 8b 55 f4 mov -0xc(%ebp),%edx 801056ec: 89 10 mov %edx,(%eax) return 0; 801056ee: b8 00 00 00 00 mov $0x0,%eax } 801056f3: c9 leave 801056f4: c3 ret 801056f5 <fdalloc>: // Allocate a file descriptor for the given file. // Takes over file reference from caller on success. static int fdalloc(struct file *f) { 801056f5: 55 push %ebp 801056f6: 89 e5 mov %esp,%ebp 801056f8: 83 ec 10 sub $0x10,%esp int fd; for(fd = 0; fd < NOFILE; fd++){ 801056fb: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp) 80105702: eb 30 jmp 80105734 <fdalloc+0x3f> if(proc->ofile[fd] == 0){ 80105704: 65 a1 04 00 00 00 mov %gs:0x4,%eax 8010570a: 8b 55 fc mov -0x4(%ebp),%edx 8010570d: 83 c2 08 add $0x8,%edx 80105710: 8b 44 90 08 mov 0x8(%eax,%edx,4),%eax 80105714: 85 c0 test %eax,%eax 80105716: 75 18 jne 80105730 <fdalloc+0x3b> proc->ofile[fd] = f; 80105718: 65 a1 04 00 00 00 mov %gs:0x4,%eax 8010571e: 8b 55 fc mov -0x4(%ebp),%edx 80105721: 8d 4a 08 lea 0x8(%edx),%ecx 80105724: 8b 55 08 mov 0x8(%ebp),%edx 80105727: 89 54 88 08 mov %edx,0x8(%eax,%ecx,4) return fd; 8010572b: 8b 45 fc mov -0x4(%ebp),%eax 8010572e: eb 0f jmp 8010573f <fdalloc+0x4a> static int fdalloc(struct file *f) { int fd; for(fd = 0; fd < NOFILE; fd++){ 80105730: 83 45 fc 01 addl $0x1,-0x4(%ebp) 80105734: 83 7d fc 0f cmpl $0xf,-0x4(%ebp) 80105738: 7e ca jle 80105704 <fdalloc+0xf> if(proc->ofile[fd] == 0){ proc->ofile[fd] = f; return fd; } } return -1; 8010573a: b8 ff ff ff ff mov $0xffffffff,%eax } 8010573f: c9 leave 80105740: c3 ret 80105741 <sys_dup>: int sys_dup(void) { 80105741: 55 push %ebp 80105742: 89 e5 mov %esp,%ebp 80105744: 83 ec 28 sub $0x28,%esp struct file *f; int fd; if(argfd(0, 0, &f) < 0) 80105747: 8d 45 f0 lea -0x10(%ebp),%eax 8010574a: 89 44 24 08 mov %eax,0x8(%esp) 8010574e: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80105755: 00 80105756: c7 04 24 00 00 00 00 movl $0x0,(%esp) 8010575d: e8 1e ff ff ff call 80105680 <argfd> 80105762: 85 c0 test %eax,%eax 80105764: 79 07 jns 8010576d <sys_dup+0x2c> return -1; 80105766: b8 ff ff ff ff mov $0xffffffff,%eax 8010576b: eb 29 jmp 80105796 <sys_dup+0x55> if((fd=fdalloc(f)) < 0) 8010576d: 8b 45 f0 mov -0x10(%ebp),%eax 80105770: 89 04 24 mov %eax,(%esp) 80105773: e8 7d ff ff ff call 801056f5 <fdalloc> 80105778: 89 45 f4 mov %eax,-0xc(%ebp) 8010577b: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 8010577f: 79 07 jns 80105788 <sys_dup+0x47> return -1; 80105781: b8 ff ff ff ff mov $0xffffffff,%eax 80105786: eb 0e jmp 80105796 <sys_dup+0x55> filedup(f); 80105788: 8b 45 f0 mov -0x10(%ebp),%eax 8010578b: 89 04 24 mov %eax,(%esp) 8010578e: e8 f2 b7 ff ff call 80100f85 <filedup> return fd; 80105793: 8b 45 f4 mov -0xc(%ebp),%eax } 80105796: c9 leave 80105797: c3 ret 80105798 <sys_read>: int sys_read(void) { 80105798: 55 push %ebp 80105799: 89 e5 mov %esp,%ebp 8010579b: 83 ec 28 sub $0x28,%esp struct file *f; int n; char *p; if(argfd(0, 0, &f) < 0 || argint(2, &n) < 0 || argptr(1, &p, n) < 0) 8010579e: 8d 45 f4 lea -0xc(%ebp),%eax 801057a1: 89 44 24 08 mov %eax,0x8(%esp) 801057a5: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 801057ac: 00 801057ad: c7 04 24 00 00 00 00 movl $0x0,(%esp) 801057b4: e8 c7 fe ff ff call 80105680 <argfd> 801057b9: 85 c0 test %eax,%eax 801057bb: 78 35 js 801057f2 <sys_read+0x5a> 801057bd: 8d 45 f0 lea -0x10(%ebp),%eax 801057c0: 89 44 24 04 mov %eax,0x4(%esp) 801057c4: c7 04 24 02 00 00 00 movl $0x2,(%esp) 801057cb: e8 56 fd ff ff call 80105526 <argint> 801057d0: 85 c0 test %eax,%eax 801057d2: 78 1e js 801057f2 <sys_read+0x5a> 801057d4: 8b 45 f0 mov -0x10(%ebp),%eax 801057d7: 89 44 24 08 mov %eax,0x8(%esp) 801057db: 8d 45 ec lea -0x14(%ebp),%eax 801057de: 89 44 24 04 mov %eax,0x4(%esp) 801057e2: c7 04 24 01 00 00 00 movl $0x1,(%esp) 801057e9: e8 67 fd ff ff call 80105555 <argptr> 801057ee: 85 c0 test %eax,%eax 801057f0: 79 07 jns 801057f9 <sys_read+0x61> return -1; 801057f2: b8 ff ff ff ff mov $0xffffffff,%eax 801057f7: eb 19 jmp 80105812 <sys_read+0x7a> return fileread(f, p, n); 801057f9: 8b 4d f0 mov -0x10(%ebp),%ecx 801057fc: 8b 55 ec mov -0x14(%ebp),%edx 801057ff: 8b 45 f4 mov -0xc(%ebp),%eax 80105802: 89 4c 24 08 mov %ecx,0x8(%esp) 80105806: 89 54 24 04 mov %edx,0x4(%esp) 8010580a: 89 04 24 mov %eax,(%esp) 8010580d: e8 e0 b8 ff ff call 801010f2 <fileread> } 80105812: c9 leave 80105813: c3 ret 80105814 <sys_write>: int sys_write(void) { 80105814: 55 push %ebp 80105815: 89 e5 mov %esp,%ebp 80105817: 83 ec 28 sub $0x28,%esp struct file *f; int n; char *p; if(argfd(0, 0, &f) < 0 || argint(2, &n) < 0 || argptr(1, &p, n) < 0) 8010581a: 8d 45 f4 lea -0xc(%ebp),%eax 8010581d: 89 44 24 08 mov %eax,0x8(%esp) 80105821: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80105828: 00 80105829: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80105830: e8 4b fe ff ff call 80105680 <argfd> 80105835: 85 c0 test %eax,%eax 80105837: 78 35 js 8010586e <sys_write+0x5a> 80105839: 8d 45 f0 lea -0x10(%ebp),%eax 8010583c: 89 44 24 04 mov %eax,0x4(%esp) 80105840: c7 04 24 02 00 00 00 movl $0x2,(%esp) 80105847: e8 da fc ff ff call 80105526 <argint> 8010584c: 85 c0 test %eax,%eax 8010584e: 78 1e js 8010586e <sys_write+0x5a> 80105850: 8b 45 f0 mov -0x10(%ebp),%eax 80105853: 89 44 24 08 mov %eax,0x8(%esp) 80105857: 8d 45 ec lea -0x14(%ebp),%eax 8010585a: 89 44 24 04 mov %eax,0x4(%esp) 8010585e: c7 04 24 01 00 00 00 movl $0x1,(%esp) 80105865: e8 eb fc ff ff call 80105555 <argptr> 8010586a: 85 c0 test %eax,%eax 8010586c: 79 07 jns 80105875 <sys_write+0x61> return -1; 8010586e: b8 ff ff ff ff mov $0xffffffff,%eax 80105873: eb 19 jmp 8010588e <sys_write+0x7a> return filewrite(f, p, n); 80105875: 8b 4d f0 mov -0x10(%ebp),%ecx 80105878: 8b 55 ec mov -0x14(%ebp),%edx 8010587b: 8b 45 f4 mov -0xc(%ebp),%eax 8010587e: 89 4c 24 08 mov %ecx,0x8(%esp) 80105882: 89 54 24 04 mov %edx,0x4(%esp) 80105886: 89 04 24 mov %eax,(%esp) 80105889: e8 20 b9 ff ff call 801011ae <filewrite> } 8010588e: c9 leave 8010588f: c3 ret 80105890 <sys_close>: int sys_close(void) { 80105890: 55 push %ebp 80105891: 89 e5 mov %esp,%ebp 80105893: 83 ec 28 sub $0x28,%esp int fd; struct file *f; if(argfd(0, &fd, &f) < 0) 80105896: 8d 45 f0 lea -0x10(%ebp),%eax 80105899: 89 44 24 08 mov %eax,0x8(%esp) 8010589d: 8d 45 f4 lea -0xc(%ebp),%eax 801058a0: 89 44 24 04 mov %eax,0x4(%esp) 801058a4: c7 04 24 00 00 00 00 movl $0x0,(%esp) 801058ab: e8 d0 fd ff ff call 80105680 <argfd> 801058b0: 85 c0 test %eax,%eax 801058b2: 79 07 jns 801058bb <sys_close+0x2b> return -1; 801058b4: b8 ff ff ff ff mov $0xffffffff,%eax 801058b9: eb 24 jmp 801058df <sys_close+0x4f> proc->ofile[fd] = 0; 801058bb: 65 a1 04 00 00 00 mov %gs:0x4,%eax 801058c1: 8b 55 f4 mov -0xc(%ebp),%edx 801058c4: 83 c2 08 add $0x8,%edx 801058c7: c7 44 90 08 00 00 00 movl $0x0,0x8(%eax,%edx,4) 801058ce: 00 fileclose(f); 801058cf: 8b 45 f0 mov -0x10(%ebp),%eax 801058d2: 89 04 24 mov %eax,(%esp) 801058d5: e8 f3 b6 ff ff call 80100fcd <fileclose> return 0; 801058da: b8 00 00 00 00 mov $0x0,%eax } 801058df: c9 leave 801058e0: c3 ret 801058e1 <sys_fstat>: int sys_fstat(void) { 801058e1: 55 push %ebp 801058e2: 89 e5 mov %esp,%ebp 801058e4: 83 ec 28 sub $0x28,%esp struct file *f; struct stat *st; if(argfd(0, 0, &f) < 0 || argptr(1, (void*)&st, sizeof(*st)) < 0) 801058e7: 8d 45 f4 lea -0xc(%ebp),%eax 801058ea: 89 44 24 08 mov %eax,0x8(%esp) 801058ee: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 801058f5: 00 801058f6: c7 04 24 00 00 00 00 movl $0x0,(%esp) 801058fd: e8 7e fd ff ff call 80105680 <argfd> 80105902: 85 c0 test %eax,%eax 80105904: 78 1f js 80105925 <sys_fstat+0x44> 80105906: 8d 45 f0 lea -0x10(%ebp),%eax 80105909: c7 44 24 08 14 00 00 movl $0x14,0x8(%esp) 80105910: 00 80105911: 89 44 24 04 mov %eax,0x4(%esp) 80105915: c7 04 24 01 00 00 00 movl $0x1,(%esp) 8010591c: e8 34 fc ff ff call 80105555 <argptr> 80105921: 85 c0 test %eax,%eax 80105923: 79 07 jns 8010592c <sys_fstat+0x4b> return -1; 80105925: b8 ff ff ff ff mov $0xffffffff,%eax 8010592a: eb 12 jmp 8010593e <sys_fstat+0x5d> return filestat(f, st); 8010592c: 8b 55 f0 mov -0x10(%ebp),%edx 8010592f: 8b 45 f4 mov -0xc(%ebp),%eax 80105932: 89 54 24 04 mov %edx,0x4(%esp) 80105936: 89 04 24 mov %eax,(%esp) 80105939: e8 65 b7 ff ff call 801010a3 <filestat> } 8010593e: c9 leave 8010593f: c3 ret 80105940 <sys_link>: // Create the path new as a link to the same inode as old. int sys_link(void) { 80105940: 55 push %ebp 80105941: 89 e5 mov %esp,%ebp 80105943: 83 ec 38 sub $0x38,%esp char name[DIRSIZ], *new, *old; struct inode *dp, *ip; if(argstr(0, &old) < 0 || argstr(1, &new) < 0) 80105946: 8d 45 d8 lea -0x28(%ebp),%eax 80105949: 89 44 24 04 mov %eax,0x4(%esp) 8010594d: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80105954: e8 5e fc ff ff call 801055b7 <argstr> 80105959: 85 c0 test %eax,%eax 8010595b: 78 17 js 80105974 <sys_link+0x34> 8010595d: 8d 45 dc lea -0x24(%ebp),%eax 80105960: 89 44 24 04 mov %eax,0x4(%esp) 80105964: c7 04 24 01 00 00 00 movl $0x1,(%esp) 8010596b: e8 47 fc ff ff call 801055b7 <argstr> 80105970: 85 c0 test %eax,%eax 80105972: 79 0a jns 8010597e <sys_link+0x3e> return -1; 80105974: b8 ff ff ff ff mov $0xffffffff,%eax 80105979: e9 3c 01 00 00 jmp 80105aba <sys_link+0x17a> if((ip = namei(old)) == 0) 8010597e: 8b 45 d8 mov -0x28(%ebp),%eax 80105981: 89 04 24 mov %eax,(%esp) 80105984: e8 9a ca ff ff call 80102423 <namei> 80105989: 89 45 f4 mov %eax,-0xc(%ebp) 8010598c: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 80105990: 75 0a jne 8010599c <sys_link+0x5c> return -1; 80105992: b8 ff ff ff ff mov $0xffffffff,%eax 80105997: e9 1e 01 00 00 jmp 80105aba <sys_link+0x17a> begin_trans(); 8010599c: e8 71 d8 ff ff call 80103212 <begin_trans> ilock(ip); 801059a1: 8b 45 f4 mov -0xc(%ebp),%eax 801059a4: 89 04 24 mov %eax,(%esp) 801059a7: e8 cf be ff ff call 8010187b <ilock> if(ip->type == T_DIR){ 801059ac: 8b 45 f4 mov -0xc(%ebp),%eax 801059af: 0f b7 40 10 movzwl 0x10(%eax),%eax 801059b3: 66 83 f8 01 cmp $0x1,%ax 801059b7: 75 1a jne 801059d3 <sys_link+0x93> iunlockput(ip); 801059b9: 8b 45 f4 mov -0xc(%ebp),%eax 801059bc: 89 04 24 mov %eax,(%esp) 801059bf: e8 3e c1 ff ff call 80101b02 <iunlockput> commit_trans(); 801059c4: e8 92 d8 ff ff call 8010325b <commit_trans> return -1; 801059c9: b8 ff ff ff ff mov $0xffffffff,%eax 801059ce: e9 e7 00 00 00 jmp 80105aba <sys_link+0x17a> } ip->nlink++; 801059d3: 8b 45 f4 mov -0xc(%ebp),%eax 801059d6: 0f b7 40 16 movzwl 0x16(%eax),%eax 801059da: 8d 50 01 lea 0x1(%eax),%edx 801059dd: 8b 45 f4 mov -0xc(%ebp),%eax 801059e0: 66 89 50 16 mov %dx,0x16(%eax) iupdate(ip); 801059e4: 8b 45 f4 mov -0xc(%ebp),%eax 801059e7: 89 04 24 mov %eax,(%esp) 801059ea: e8 cc bc ff ff call 801016bb <iupdate> iunlock(ip); 801059ef: 8b 45 f4 mov -0xc(%ebp),%eax 801059f2: 89 04 24 mov %eax,(%esp) 801059f5: e8 d2 bf ff ff call 801019cc <iunlock> if((dp = nameiparent(new, name)) == 0) 801059fa: 8b 45 dc mov -0x24(%ebp),%eax 801059fd: 8d 55 e2 lea -0x1e(%ebp),%edx 80105a00: 89 54 24 04 mov %edx,0x4(%esp) 80105a04: 89 04 24 mov %eax,(%esp) 80105a07: e8 39 ca ff ff call 80102445 <nameiparent> 80105a0c: 89 45 f0 mov %eax,-0x10(%ebp) 80105a0f: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 80105a13: 74 68 je 80105a7d <sys_link+0x13d> goto bad; ilock(dp); 80105a15: 8b 45 f0 mov -0x10(%ebp),%eax 80105a18: 89 04 24 mov %eax,(%esp) 80105a1b: e8 5b be ff ff call 8010187b <ilock> if(dp->dev != ip->dev || dirlink(dp, name, ip->inum) < 0){ 80105a20: 8b 45 f0 mov -0x10(%ebp),%eax 80105a23: 8b 10 mov (%eax),%edx 80105a25: 8b 45 f4 mov -0xc(%ebp),%eax 80105a28: 8b 00 mov (%eax),%eax 80105a2a: 39 c2 cmp %eax,%edx 80105a2c: 75 20 jne 80105a4e <sys_link+0x10e> 80105a2e: 8b 45 f4 mov -0xc(%ebp),%eax 80105a31: 8b 40 04 mov 0x4(%eax),%eax 80105a34: 89 44 24 08 mov %eax,0x8(%esp) 80105a38: 8d 45 e2 lea -0x1e(%ebp),%eax 80105a3b: 89 44 24 04 mov %eax,0x4(%esp) 80105a3f: 8b 45 f0 mov -0x10(%ebp),%eax 80105a42: 89 04 24 mov %eax,(%esp) 80105a45: e8 18 c7 ff ff call 80102162 <dirlink> 80105a4a: 85 c0 test %eax,%eax 80105a4c: 79 0d jns 80105a5b <sys_link+0x11b> iunlockput(dp); 80105a4e: 8b 45 f0 mov -0x10(%ebp),%eax 80105a51: 89 04 24 mov %eax,(%esp) 80105a54: e8 a9 c0 ff ff call 80101b02 <iunlockput> goto bad; 80105a59: eb 23 jmp 80105a7e <sys_link+0x13e> } iunlockput(dp); 80105a5b: 8b 45 f0 mov -0x10(%ebp),%eax 80105a5e: 89 04 24 mov %eax,(%esp) 80105a61: e8 9c c0 ff ff call 80101b02 <iunlockput> iput(ip); 80105a66: 8b 45 f4 mov -0xc(%ebp),%eax 80105a69: 89 04 24 mov %eax,(%esp) 80105a6c: e8 c0 bf ff ff call 80101a31 <iput> commit_trans(); 80105a71: e8 e5 d7 ff ff call 8010325b <commit_trans> return 0; 80105a76: b8 00 00 00 00 mov $0x0,%eax 80105a7b: eb 3d jmp 80105aba <sys_link+0x17a> ip->nlink++; iupdate(ip); iunlock(ip); if((dp = nameiparent(new, name)) == 0) goto bad; 80105a7d: 90 nop commit_trans(); return 0; bad: ilock(ip); 80105a7e: 8b 45 f4 mov -0xc(%ebp),%eax 80105a81: 89 04 24 mov %eax,(%esp) 80105a84: e8 f2 bd ff ff call 8010187b <ilock> ip->nlink--; 80105a89: 8b 45 f4 mov -0xc(%ebp),%eax 80105a8c: 0f b7 40 16 movzwl 0x16(%eax),%eax 80105a90: 8d 50 ff lea -0x1(%eax),%edx 80105a93: 8b 45 f4 mov -0xc(%ebp),%eax 80105a96: 66 89 50 16 mov %dx,0x16(%eax) iupdate(ip); 80105a9a: 8b 45 f4 mov -0xc(%ebp),%eax 80105a9d: 89 04 24 mov %eax,(%esp) 80105aa0: e8 16 bc ff ff call 801016bb <iupdate> iunlockput(ip); 80105aa5: 8b 45 f4 mov -0xc(%ebp),%eax 80105aa8: 89 04 24 mov %eax,(%esp) 80105aab: e8 52 c0 ff ff call 80101b02 <iunlockput> commit_trans(); 80105ab0: e8 a6 d7 ff ff call 8010325b <commit_trans> return -1; 80105ab5: b8 ff ff ff ff mov $0xffffffff,%eax } 80105aba: c9 leave 80105abb: c3 ret 80105abc <isdirempty>: // Is the directory dp empty except for "." and ".." ? static int isdirempty(struct inode *dp) { 80105abc: 55 push %ebp 80105abd: 89 e5 mov %esp,%ebp 80105abf: 83 ec 38 sub $0x38,%esp int off; struct dirent de; for(off=2*sizeof(de); off<dp->size; off+=sizeof(de)){ 80105ac2: c7 45 f4 20 00 00 00 movl $0x20,-0xc(%ebp) 80105ac9: eb 4b jmp 80105b16 <isdirempty+0x5a> if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de)) 80105acb: 8b 55 f4 mov -0xc(%ebp),%edx 80105ace: 8d 45 e4 lea -0x1c(%ebp),%eax 80105ad1: c7 44 24 0c 10 00 00 movl $0x10,0xc(%esp) 80105ad8: 00 80105ad9: 89 54 24 08 mov %edx,0x8(%esp) 80105add: 89 44 24 04 mov %eax,0x4(%esp) 80105ae1: 8b 45 08 mov 0x8(%ebp),%eax 80105ae4: 89 04 24 mov %eax,(%esp) 80105ae7: e8 88 c2 ff ff call 80101d74 <readi> 80105aec: 83 f8 10 cmp $0x10,%eax 80105aef: 74 0c je 80105afd <isdirempty+0x41> panic("isdirempty: readi"); 80105af1: c7 04 24 3e 8a 10 80 movl $0x80108a3e,(%esp) 80105af8: e8 3d aa ff ff call 8010053a <panic> if(de.inum != 0) 80105afd: 0f b7 45 e4 movzwl -0x1c(%ebp),%eax 80105b01: 66 85 c0 test %ax,%ax 80105b04: 74 07 je 80105b0d <isdirempty+0x51> return 0; 80105b06: b8 00 00 00 00 mov $0x0,%eax 80105b0b: eb 1b jmp 80105b28 <isdirempty+0x6c> isdirempty(struct inode *dp) { int off; struct dirent de; for(off=2*sizeof(de); off<dp->size; off+=sizeof(de)){ 80105b0d: 8b 45 f4 mov -0xc(%ebp),%eax 80105b10: 83 c0 10 add $0x10,%eax 80105b13: 89 45 f4 mov %eax,-0xc(%ebp) 80105b16: 8b 55 f4 mov -0xc(%ebp),%edx 80105b19: 8b 45 08 mov 0x8(%ebp),%eax 80105b1c: 8b 40 18 mov 0x18(%eax),%eax 80105b1f: 39 c2 cmp %eax,%edx 80105b21: 72 a8 jb 80105acb <isdirempty+0xf> if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de)) panic("isdirempty: readi"); if(de.inum != 0) return 0; } return 1; 80105b23: b8 01 00 00 00 mov $0x1,%eax } 80105b28: c9 leave 80105b29: c3 ret 80105b2a <sys_unlink>: //PAGEBREAK! int sys_unlink(void) { 80105b2a: 55 push %ebp 80105b2b: 89 e5 mov %esp,%ebp 80105b2d: 83 ec 48 sub $0x48,%esp struct inode *ip, *dp; struct dirent de; char name[DIRSIZ], *path; uint off; if(argstr(0, &path) < 0) 80105b30: 8d 45 cc lea -0x34(%ebp),%eax 80105b33: 89 44 24 04 mov %eax,0x4(%esp) 80105b37: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80105b3e: e8 74 fa ff ff call 801055b7 <argstr> 80105b43: 85 c0 test %eax,%eax 80105b45: 79 0a jns 80105b51 <sys_unlink+0x27> return -1; 80105b47: b8 ff ff ff ff mov $0xffffffff,%eax 80105b4c: e9 aa 01 00 00 jmp 80105cfb <sys_unlink+0x1d1> if((dp = nameiparent(path, name)) == 0) 80105b51: 8b 45 cc mov -0x34(%ebp),%eax 80105b54: 8d 55 d2 lea -0x2e(%ebp),%edx 80105b57: 89 54 24 04 mov %edx,0x4(%esp) 80105b5b: 89 04 24 mov %eax,(%esp) 80105b5e: e8 e2 c8 ff ff call 80102445 <nameiparent> 80105b63: 89 45 f4 mov %eax,-0xc(%ebp) 80105b66: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 80105b6a: 75 0a jne 80105b76 <sys_unlink+0x4c> return -1; 80105b6c: b8 ff ff ff ff mov $0xffffffff,%eax 80105b71: e9 85 01 00 00 jmp 80105cfb <sys_unlink+0x1d1> begin_trans(); 80105b76: e8 97 d6 ff ff call 80103212 <begin_trans> ilock(dp); 80105b7b: 8b 45 f4 mov -0xc(%ebp),%eax 80105b7e: 89 04 24 mov %eax,(%esp) 80105b81: e8 f5 bc ff ff call 8010187b <ilock> // Cannot unlink "." or "..". if(namecmp(name, ".") == 0 || namecmp(name, "..") == 0) 80105b86: c7 44 24 04 50 8a 10 movl $0x80108a50,0x4(%esp) 80105b8d: 80 80105b8e: 8d 45 d2 lea -0x2e(%ebp),%eax 80105b91: 89 04 24 mov %eax,(%esp) 80105b94: e8 df c4 ff ff call 80102078 <namecmp> 80105b99: 85 c0 test %eax,%eax 80105b9b: 0f 84 45 01 00 00 je 80105ce6 <sys_unlink+0x1bc> 80105ba1: c7 44 24 04 52 8a 10 movl $0x80108a52,0x4(%esp) 80105ba8: 80 80105ba9: 8d 45 d2 lea -0x2e(%ebp),%eax 80105bac: 89 04 24 mov %eax,(%esp) 80105baf: e8 c4 c4 ff ff call 80102078 <namecmp> 80105bb4: 85 c0 test %eax,%eax 80105bb6: 0f 84 2a 01 00 00 je 80105ce6 <sys_unlink+0x1bc> goto bad; if((ip = dirlookup(dp, name, &off)) == 0) 80105bbc: 8d 45 c8 lea -0x38(%ebp),%eax 80105bbf: 89 44 24 08 mov %eax,0x8(%esp) 80105bc3: 8d 45 d2 lea -0x2e(%ebp),%eax 80105bc6: 89 44 24 04 mov %eax,0x4(%esp) 80105bca: 8b 45 f4 mov -0xc(%ebp),%eax 80105bcd: 89 04 24 mov %eax,(%esp) 80105bd0: e8 c5 c4 ff ff call 8010209a <dirlookup> 80105bd5: 89 45 f0 mov %eax,-0x10(%ebp) 80105bd8: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 80105bdc: 0f 84 03 01 00 00 je 80105ce5 <sys_unlink+0x1bb> goto bad; ilock(ip); 80105be2: 8b 45 f0 mov -0x10(%ebp),%eax 80105be5: 89 04 24 mov %eax,(%esp) 80105be8: e8 8e bc ff ff call 8010187b <ilock> if(ip->nlink < 1) 80105bed: 8b 45 f0 mov -0x10(%ebp),%eax 80105bf0: 0f b7 40 16 movzwl 0x16(%eax),%eax 80105bf4: 66 85 c0 test %ax,%ax 80105bf7: 7f 0c jg 80105c05 <sys_unlink+0xdb> panic("unlink: nlink < 1"); 80105bf9: c7 04 24 55 8a 10 80 movl $0x80108a55,(%esp) 80105c00: e8 35 a9 ff ff call 8010053a <panic> if(ip->type == T_DIR && !isdirempty(ip)){ 80105c05: 8b 45 f0 mov -0x10(%ebp),%eax 80105c08: 0f b7 40 10 movzwl 0x10(%eax),%eax 80105c0c: 66 83 f8 01 cmp $0x1,%ax 80105c10: 75 1f jne 80105c31 <sys_unlink+0x107> 80105c12: 8b 45 f0 mov -0x10(%ebp),%eax 80105c15: 89 04 24 mov %eax,(%esp) 80105c18: e8 9f fe ff ff call 80105abc <isdirempty> 80105c1d: 85 c0 test %eax,%eax 80105c1f: 75 10 jne 80105c31 <sys_unlink+0x107> iunlockput(ip); 80105c21: 8b 45 f0 mov -0x10(%ebp),%eax 80105c24: 89 04 24 mov %eax,(%esp) 80105c27: e8 d6 be ff ff call 80101b02 <iunlockput> goto bad; 80105c2c: e9 b5 00 00 00 jmp 80105ce6 <sys_unlink+0x1bc> } memset(&de, 0, sizeof(de)); 80105c31: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp) 80105c38: 00 80105c39: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80105c40: 00 80105c41: 8d 45 e0 lea -0x20(%ebp),%eax 80105c44: 89 04 24 mov %eax,(%esp) 80105c47: e8 7e f5 ff ff call 801051ca <memset> if(writei(dp, (char*)&de, off, sizeof(de)) != sizeof(de)) 80105c4c: 8b 55 c8 mov -0x38(%ebp),%edx 80105c4f: 8d 45 e0 lea -0x20(%ebp),%eax 80105c52: c7 44 24 0c 10 00 00 movl $0x10,0xc(%esp) 80105c59: 00 80105c5a: 89 54 24 08 mov %edx,0x8(%esp) 80105c5e: 89 44 24 04 mov %eax,0x4(%esp) 80105c62: 8b 45 f4 mov -0xc(%ebp),%eax 80105c65: 89 04 24 mov %eax,(%esp) 80105c68: e8 73 c2 ff ff call 80101ee0 <writei> 80105c6d: 83 f8 10 cmp $0x10,%eax 80105c70: 74 0c je 80105c7e <sys_unlink+0x154> panic("unlink: writei"); 80105c72: c7 04 24 67 8a 10 80 movl $0x80108a67,(%esp) 80105c79: e8 bc a8 ff ff call 8010053a <panic> if(ip->type == T_DIR){ 80105c7e: 8b 45 f0 mov -0x10(%ebp),%eax 80105c81: 0f b7 40 10 movzwl 0x10(%eax),%eax 80105c85: 66 83 f8 01 cmp $0x1,%ax 80105c89: 75 1c jne 80105ca7 <sys_unlink+0x17d> dp->nlink--; 80105c8b: 8b 45 f4 mov -0xc(%ebp),%eax 80105c8e: 0f b7 40 16 movzwl 0x16(%eax),%eax 80105c92: 8d 50 ff lea -0x1(%eax),%edx 80105c95: 8b 45 f4 mov -0xc(%ebp),%eax 80105c98: 66 89 50 16 mov %dx,0x16(%eax) iupdate(dp); 80105c9c: 8b 45 f4 mov -0xc(%ebp),%eax 80105c9f: 89 04 24 mov %eax,(%esp) 80105ca2: e8 14 ba ff ff call 801016bb <iupdate> } iunlockput(dp); 80105ca7: 8b 45 f4 mov -0xc(%ebp),%eax 80105caa: 89 04 24 mov %eax,(%esp) 80105cad: e8 50 be ff ff call 80101b02 <iunlockput> ip->nlink--; 80105cb2: 8b 45 f0 mov -0x10(%ebp),%eax 80105cb5: 0f b7 40 16 movzwl 0x16(%eax),%eax 80105cb9: 8d 50 ff lea -0x1(%eax),%edx 80105cbc: 8b 45 f0 mov -0x10(%ebp),%eax 80105cbf: 66 89 50 16 mov %dx,0x16(%eax) iupdate(ip); 80105cc3: 8b 45 f0 mov -0x10(%ebp),%eax 80105cc6: 89 04 24 mov %eax,(%esp) 80105cc9: e8 ed b9 ff ff call 801016bb <iupdate> iunlockput(ip); 80105cce: 8b 45 f0 mov -0x10(%ebp),%eax 80105cd1: 89 04 24 mov %eax,(%esp) 80105cd4: e8 29 be ff ff call 80101b02 <iunlockput> commit_trans(); 80105cd9: e8 7d d5 ff ff call 8010325b <commit_trans> return 0; 80105cde: b8 00 00 00 00 mov $0x0,%eax 80105ce3: eb 16 jmp 80105cfb <sys_unlink+0x1d1> // Cannot unlink "." or "..". if(namecmp(name, ".") == 0 || namecmp(name, "..") == 0) goto bad; if((ip = dirlookup(dp, name, &off)) == 0) goto bad; 80105ce5: 90 nop commit_trans(); return 0; bad: iunlockput(dp); 80105ce6: 8b 45 f4 mov -0xc(%ebp),%eax 80105ce9: 89 04 24 mov %eax,(%esp) 80105cec: e8 11 be ff ff call 80101b02 <iunlockput> commit_trans(); 80105cf1: e8 65 d5 ff ff call 8010325b <commit_trans> return -1; 80105cf6: b8 ff ff ff ff mov $0xffffffff,%eax } 80105cfb: c9 leave 80105cfc: c3 ret 80105cfd <create>: static struct inode* create(char *path, short type, short major, short minor) { 80105cfd: 55 push %ebp 80105cfe: 89 e5 mov %esp,%ebp 80105d00: 83 ec 48 sub $0x48,%esp 80105d03: 8b 4d 0c mov 0xc(%ebp),%ecx 80105d06: 8b 55 10 mov 0x10(%ebp),%edx 80105d09: 8b 45 14 mov 0x14(%ebp),%eax 80105d0c: 66 89 4d d4 mov %cx,-0x2c(%ebp) 80105d10: 66 89 55 d0 mov %dx,-0x30(%ebp) 80105d14: 66 89 45 cc mov %ax,-0x34(%ebp) uint off; struct inode *ip, *dp; char name[DIRSIZ]; if((dp = nameiparent(path, name)) == 0) 80105d18: 8d 45 de lea -0x22(%ebp),%eax 80105d1b: 89 44 24 04 mov %eax,0x4(%esp) 80105d1f: 8b 45 08 mov 0x8(%ebp),%eax 80105d22: 89 04 24 mov %eax,(%esp) 80105d25: e8 1b c7 ff ff call 80102445 <nameiparent> 80105d2a: 89 45 f4 mov %eax,-0xc(%ebp) 80105d2d: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 80105d31: 75 0a jne 80105d3d <create+0x40> return 0; 80105d33: b8 00 00 00 00 mov $0x0,%eax 80105d38: e9 7e 01 00 00 jmp 80105ebb <create+0x1be> ilock(dp); 80105d3d: 8b 45 f4 mov -0xc(%ebp),%eax 80105d40: 89 04 24 mov %eax,(%esp) 80105d43: e8 33 bb ff ff call 8010187b <ilock> if((ip = dirlookup(dp, name, &off)) != 0){ 80105d48: 8d 45 ec lea -0x14(%ebp),%eax 80105d4b: 89 44 24 08 mov %eax,0x8(%esp) 80105d4f: 8d 45 de lea -0x22(%ebp),%eax 80105d52: 89 44 24 04 mov %eax,0x4(%esp) 80105d56: 8b 45 f4 mov -0xc(%ebp),%eax 80105d59: 89 04 24 mov %eax,(%esp) 80105d5c: e8 39 c3 ff ff call 8010209a <dirlookup> 80105d61: 89 45 f0 mov %eax,-0x10(%ebp) 80105d64: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 80105d68: 74 47 je 80105db1 <create+0xb4> iunlockput(dp); 80105d6a: 8b 45 f4 mov -0xc(%ebp),%eax 80105d6d: 89 04 24 mov %eax,(%esp) 80105d70: e8 8d bd ff ff call 80101b02 <iunlockput> ilock(ip); 80105d75: 8b 45 f0 mov -0x10(%ebp),%eax 80105d78: 89 04 24 mov %eax,(%esp) 80105d7b: e8 fb ba ff ff call 8010187b <ilock> if(type == T_FILE && ip->type == T_FILE) 80105d80: 66 83 7d d4 02 cmpw $0x2,-0x2c(%ebp) 80105d85: 75 15 jne 80105d9c <create+0x9f> 80105d87: 8b 45 f0 mov -0x10(%ebp),%eax 80105d8a: 0f b7 40 10 movzwl 0x10(%eax),%eax 80105d8e: 66 83 f8 02 cmp $0x2,%ax 80105d92: 75 08 jne 80105d9c <create+0x9f> return ip; 80105d94: 8b 45 f0 mov -0x10(%ebp),%eax 80105d97: e9 1f 01 00 00 jmp 80105ebb <create+0x1be> iunlockput(ip); 80105d9c: 8b 45 f0 mov -0x10(%ebp),%eax 80105d9f: 89 04 24 mov %eax,(%esp) 80105da2: e8 5b bd ff ff call 80101b02 <iunlockput> return 0; 80105da7: b8 00 00 00 00 mov $0x0,%eax 80105dac: e9 0a 01 00 00 jmp 80105ebb <create+0x1be> } if((ip = ialloc(dp->dev, type)) == 0) 80105db1: 0f bf 55 d4 movswl -0x2c(%ebp),%edx 80105db5: 8b 45 f4 mov -0xc(%ebp),%eax 80105db8: 8b 00 mov (%eax),%eax 80105dba: 89 54 24 04 mov %edx,0x4(%esp) 80105dbe: 89 04 24 mov %eax,(%esp) 80105dc1: e8 18 b8 ff ff call 801015de <ialloc> 80105dc6: 89 45 f0 mov %eax,-0x10(%ebp) 80105dc9: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 80105dcd: 75 0c jne 80105ddb <create+0xde> panic("create: ialloc"); 80105dcf: c7 04 24 76 8a 10 80 movl $0x80108a76,(%esp) 80105dd6: e8 5f a7 ff ff call 8010053a <panic> ilock(ip); 80105ddb: 8b 45 f0 mov -0x10(%ebp),%eax 80105dde: 89 04 24 mov %eax,(%esp) 80105de1: e8 95 ba ff ff call 8010187b <ilock> ip->major = major; 80105de6: 8b 45 f0 mov -0x10(%ebp),%eax 80105de9: 0f b7 55 d0 movzwl -0x30(%ebp),%edx 80105ded: 66 89 50 12 mov %dx,0x12(%eax) ip->minor = minor; 80105df1: 8b 45 f0 mov -0x10(%ebp),%eax 80105df4: 0f b7 55 cc movzwl -0x34(%ebp),%edx 80105df8: 66 89 50 14 mov %dx,0x14(%eax) ip->nlink = 1; 80105dfc: 8b 45 f0 mov -0x10(%ebp),%eax 80105dff: 66 c7 40 16 01 00 movw $0x1,0x16(%eax) iupdate(ip); 80105e05: 8b 45 f0 mov -0x10(%ebp),%eax 80105e08: 89 04 24 mov %eax,(%esp) 80105e0b: e8 ab b8 ff ff call 801016bb <iupdate> if(type == T_DIR){ // Create . and .. entries. 80105e10: 66 83 7d d4 01 cmpw $0x1,-0x2c(%ebp) 80105e15: 75 6a jne 80105e81 <create+0x184> dp->nlink++; // for ".." 80105e17: 8b 45 f4 mov -0xc(%ebp),%eax 80105e1a: 0f b7 40 16 movzwl 0x16(%eax),%eax 80105e1e: 8d 50 01 lea 0x1(%eax),%edx 80105e21: 8b 45 f4 mov -0xc(%ebp),%eax 80105e24: 66 89 50 16 mov %dx,0x16(%eax) iupdate(dp); 80105e28: 8b 45 f4 mov -0xc(%ebp),%eax 80105e2b: 89 04 24 mov %eax,(%esp) 80105e2e: e8 88 b8 ff ff call 801016bb <iupdate> // No ip->nlink++ for ".": avoid cyclic ref count. if(dirlink(ip, ".", ip->inum) < 0 || dirlink(ip, "..", dp->inum) < 0) 80105e33: 8b 45 f0 mov -0x10(%ebp),%eax 80105e36: 8b 40 04 mov 0x4(%eax),%eax 80105e39: 89 44 24 08 mov %eax,0x8(%esp) 80105e3d: c7 44 24 04 50 8a 10 movl $0x80108a50,0x4(%esp) 80105e44: 80 80105e45: 8b 45 f0 mov -0x10(%ebp),%eax 80105e48: 89 04 24 mov %eax,(%esp) 80105e4b: e8 12 c3 ff ff call 80102162 <dirlink> 80105e50: 85 c0 test %eax,%eax 80105e52: 78 21 js 80105e75 <create+0x178> 80105e54: 8b 45 f4 mov -0xc(%ebp),%eax 80105e57: 8b 40 04 mov 0x4(%eax),%eax 80105e5a: 89 44 24 08 mov %eax,0x8(%esp) 80105e5e: c7 44 24 04 52 8a 10 movl $0x80108a52,0x4(%esp) 80105e65: 80 80105e66: 8b 45 f0 mov -0x10(%ebp),%eax 80105e69: 89 04 24 mov %eax,(%esp) 80105e6c: e8 f1 c2 ff ff call 80102162 <dirlink> 80105e71: 85 c0 test %eax,%eax 80105e73: 79 0c jns 80105e81 <create+0x184> panic("create dots"); 80105e75: c7 04 24 85 8a 10 80 movl $0x80108a85,(%esp) 80105e7c: e8 b9 a6 ff ff call 8010053a <panic> } if(dirlink(dp, name, ip->inum) < 0) 80105e81: 8b 45 f0 mov -0x10(%ebp),%eax 80105e84: 8b 40 04 mov 0x4(%eax),%eax 80105e87: 89 44 24 08 mov %eax,0x8(%esp) 80105e8b: 8d 45 de lea -0x22(%ebp),%eax 80105e8e: 89 44 24 04 mov %eax,0x4(%esp) 80105e92: 8b 45 f4 mov -0xc(%ebp),%eax 80105e95: 89 04 24 mov %eax,(%esp) 80105e98: e8 c5 c2 ff ff call 80102162 <dirlink> 80105e9d: 85 c0 test %eax,%eax 80105e9f: 79 0c jns 80105ead <create+0x1b0> panic("create: dirlink"); 80105ea1: c7 04 24 91 8a 10 80 movl $0x80108a91,(%esp) 80105ea8: e8 8d a6 ff ff call 8010053a <panic> iunlockput(dp); 80105ead: 8b 45 f4 mov -0xc(%ebp),%eax 80105eb0: 89 04 24 mov %eax,(%esp) 80105eb3: e8 4a bc ff ff call 80101b02 <iunlockput> return ip; 80105eb8: 8b 45 f0 mov -0x10(%ebp),%eax } 80105ebb: c9 leave 80105ebc: c3 ret 80105ebd <sys_open>: int sys_open(void) { 80105ebd: 55 push %ebp 80105ebe: 89 e5 mov %esp,%ebp 80105ec0: 83 ec 38 sub $0x38,%esp char *path; int fd, omode; struct file *f; struct inode *ip; if(argstr(0, &path) < 0 || argint(1, &omode) < 0) 80105ec3: 8d 45 e8 lea -0x18(%ebp),%eax 80105ec6: 89 44 24 04 mov %eax,0x4(%esp) 80105eca: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80105ed1: e8 e1 f6 ff ff call 801055b7 <argstr> 80105ed6: 85 c0 test %eax,%eax 80105ed8: 78 17 js 80105ef1 <sys_open+0x34> 80105eda: 8d 45 e4 lea -0x1c(%ebp),%eax 80105edd: 89 44 24 04 mov %eax,0x4(%esp) 80105ee1: c7 04 24 01 00 00 00 movl $0x1,(%esp) 80105ee8: e8 39 f6 ff ff call 80105526 <argint> 80105eed: 85 c0 test %eax,%eax 80105eef: 79 0a jns 80105efb <sys_open+0x3e> return -1; 80105ef1: b8 ff ff ff ff mov $0xffffffff,%eax 80105ef6: e9 46 01 00 00 jmp 80106041 <sys_open+0x184> if(omode & O_CREATE){ 80105efb: 8b 45 e4 mov -0x1c(%ebp),%eax 80105efe: 25 00 02 00 00 and $0x200,%eax 80105f03: 85 c0 test %eax,%eax 80105f05: 74 40 je 80105f47 <sys_open+0x8a> begin_trans(); 80105f07: e8 06 d3 ff ff call 80103212 <begin_trans> ip = create(path, T_FILE, 0, 0); 80105f0c: 8b 45 e8 mov -0x18(%ebp),%eax 80105f0f: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp) 80105f16: 00 80105f17: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp) 80105f1e: 00 80105f1f: c7 44 24 04 02 00 00 movl $0x2,0x4(%esp) 80105f26: 00 80105f27: 89 04 24 mov %eax,(%esp) 80105f2a: e8 ce fd ff ff call 80105cfd <create> 80105f2f: 89 45 f4 mov %eax,-0xc(%ebp) commit_trans(); 80105f32: e8 24 d3 ff ff call 8010325b <commit_trans> if(ip == 0) 80105f37: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 80105f3b: 75 5c jne 80105f99 <sys_open+0xdc> return -1; 80105f3d: b8 ff ff ff ff mov $0xffffffff,%eax 80105f42: e9 fa 00 00 00 jmp 80106041 <sys_open+0x184> } else { if((ip = namei(path)) == 0) 80105f47: 8b 45 e8 mov -0x18(%ebp),%eax 80105f4a: 89 04 24 mov %eax,(%esp) 80105f4d: e8 d1 c4 ff ff call 80102423 <namei> 80105f52: 89 45 f4 mov %eax,-0xc(%ebp) 80105f55: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 80105f59: 75 0a jne 80105f65 <sys_open+0xa8> return -1; 80105f5b: b8 ff ff ff ff mov $0xffffffff,%eax 80105f60: e9 dc 00 00 00 jmp 80106041 <sys_open+0x184> ilock(ip); 80105f65: 8b 45 f4 mov -0xc(%ebp),%eax 80105f68: 89 04 24 mov %eax,(%esp) 80105f6b: e8 0b b9 ff ff call 8010187b <ilock> if(ip->type == T_DIR && omode != O_RDONLY){ 80105f70: 8b 45 f4 mov -0xc(%ebp),%eax 80105f73: 0f b7 40 10 movzwl 0x10(%eax),%eax 80105f77: 66 83 f8 01 cmp $0x1,%ax 80105f7b: 75 1c jne 80105f99 <sys_open+0xdc> 80105f7d: 8b 45 e4 mov -0x1c(%ebp),%eax 80105f80: 85 c0 test %eax,%eax 80105f82: 74 15 je 80105f99 <sys_open+0xdc> iunlockput(ip); 80105f84: 8b 45 f4 mov -0xc(%ebp),%eax 80105f87: 89 04 24 mov %eax,(%esp) 80105f8a: e8 73 bb ff ff call 80101b02 <iunlockput> return -1; 80105f8f: b8 ff ff ff ff mov $0xffffffff,%eax 80105f94: e9 a8 00 00 00 jmp 80106041 <sys_open+0x184> } } if((f = filealloc()) == 0 || (fd = fdalloc(f)) < 0){ 80105f99: e8 86 af ff ff call 80100f24 <filealloc> 80105f9e: 89 45 f0 mov %eax,-0x10(%ebp) 80105fa1: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 80105fa5: 74 14 je 80105fbb <sys_open+0xfe> 80105fa7: 8b 45 f0 mov -0x10(%ebp),%eax 80105faa: 89 04 24 mov %eax,(%esp) 80105fad: e8 43 f7 ff ff call 801056f5 <fdalloc> 80105fb2: 89 45 ec mov %eax,-0x14(%ebp) 80105fb5: 83 7d ec 00 cmpl $0x0,-0x14(%ebp) 80105fb9: 79 23 jns 80105fde <sys_open+0x121> if(f) 80105fbb: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 80105fbf: 74 0b je 80105fcc <sys_open+0x10f> fileclose(f); 80105fc1: 8b 45 f0 mov -0x10(%ebp),%eax 80105fc4: 89 04 24 mov %eax,(%esp) 80105fc7: e8 01 b0 ff ff call 80100fcd <fileclose> iunlockput(ip); 80105fcc: 8b 45 f4 mov -0xc(%ebp),%eax 80105fcf: 89 04 24 mov %eax,(%esp) 80105fd2: e8 2b bb ff ff call 80101b02 <iunlockput> return -1; 80105fd7: b8 ff ff ff ff mov $0xffffffff,%eax 80105fdc: eb 63 jmp 80106041 <sys_open+0x184> } iunlock(ip); 80105fde: 8b 45 f4 mov -0xc(%ebp),%eax 80105fe1: 89 04 24 mov %eax,(%esp) 80105fe4: e8 e3 b9 ff ff call 801019cc <iunlock> f->type = FD_INODE; 80105fe9: 8b 45 f0 mov -0x10(%ebp),%eax 80105fec: c7 00 02 00 00 00 movl $0x2,(%eax) f->ip = ip; 80105ff2: 8b 45 f0 mov -0x10(%ebp),%eax 80105ff5: 8b 55 f4 mov -0xc(%ebp),%edx 80105ff8: 89 50 10 mov %edx,0x10(%eax) f->off = 0; 80105ffb: 8b 45 f0 mov -0x10(%ebp),%eax 80105ffe: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) f->readable = !(omode & O_WRONLY); 80106005: 8b 45 e4 mov -0x1c(%ebp),%eax 80106008: 83 e0 01 and $0x1,%eax 8010600b: 85 c0 test %eax,%eax 8010600d: 0f 94 c2 sete %dl 80106010: 8b 45 f0 mov -0x10(%ebp),%eax 80106013: 88 50 08 mov %dl,0x8(%eax) f->writable = (omode & O_WRONLY) || (omode & O_RDWR); 80106016: 8b 45 e4 mov -0x1c(%ebp),%eax 80106019: 83 e0 01 and $0x1,%eax 8010601c: 84 c0 test %al,%al 8010601e: 75 0a jne 8010602a <sys_open+0x16d> 80106020: 8b 45 e4 mov -0x1c(%ebp),%eax 80106023: 83 e0 02 and $0x2,%eax 80106026: 85 c0 test %eax,%eax 80106028: 74 07 je 80106031 <sys_open+0x174> 8010602a: b8 01 00 00 00 mov $0x1,%eax 8010602f: eb 05 jmp 80106036 <sys_open+0x179> 80106031: b8 00 00 00 00 mov $0x0,%eax 80106036: 89 c2 mov %eax,%edx 80106038: 8b 45 f0 mov -0x10(%ebp),%eax 8010603b: 88 50 09 mov %dl,0x9(%eax) return fd; 8010603e: 8b 45 ec mov -0x14(%ebp),%eax } 80106041: c9 leave 80106042: c3 ret 80106043 <sys_mkdir>: int sys_mkdir(void) { 80106043: 55 push %ebp 80106044: 89 e5 mov %esp,%ebp 80106046: 83 ec 28 sub $0x28,%esp char *path; struct inode *ip; begin_trans(); 80106049: e8 c4 d1 ff ff call 80103212 <begin_trans> if(argstr(0, &path) < 0 || (ip = create(path, T_DIR, 0, 0)) == 0){ 8010604e: 8d 45 f0 lea -0x10(%ebp),%eax 80106051: 89 44 24 04 mov %eax,0x4(%esp) 80106055: c7 04 24 00 00 00 00 movl $0x0,(%esp) 8010605c: e8 56 f5 ff ff call 801055b7 <argstr> 80106061: 85 c0 test %eax,%eax 80106063: 78 2c js 80106091 <sys_mkdir+0x4e> 80106065: 8b 45 f0 mov -0x10(%ebp),%eax 80106068: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp) 8010606f: 00 80106070: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp) 80106077: 00 80106078: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp) 8010607f: 00 80106080: 89 04 24 mov %eax,(%esp) 80106083: e8 75 fc ff ff call 80105cfd <create> 80106088: 89 45 f4 mov %eax,-0xc(%ebp) 8010608b: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 8010608f: 75 0c jne 8010609d <sys_mkdir+0x5a> commit_trans(); 80106091: e8 c5 d1 ff ff call 8010325b <commit_trans> return -1; 80106096: b8 ff ff ff ff mov $0xffffffff,%eax 8010609b: eb 15 jmp 801060b2 <sys_mkdir+0x6f> } iunlockput(ip); 8010609d: 8b 45 f4 mov -0xc(%ebp),%eax 801060a0: 89 04 24 mov %eax,(%esp) 801060a3: e8 5a ba ff ff call 80101b02 <iunlockput> commit_trans(); 801060a8: e8 ae d1 ff ff call 8010325b <commit_trans> return 0; 801060ad: b8 00 00 00 00 mov $0x0,%eax } 801060b2: c9 leave 801060b3: c3 ret 801060b4 <sys_mknod>: int sys_mknod(void) { 801060b4: 55 push %ebp 801060b5: 89 e5 mov %esp,%ebp 801060b7: 83 ec 38 sub $0x38,%esp struct inode *ip; char *path; int len; int major, minor; begin_trans(); 801060ba: e8 53 d1 ff ff call 80103212 <begin_trans> if((len=argstr(0, &path)) < 0 || 801060bf: 8d 45 ec lea -0x14(%ebp),%eax 801060c2: 89 44 24 04 mov %eax,0x4(%esp) 801060c6: c7 04 24 00 00 00 00 movl $0x0,(%esp) 801060cd: e8 e5 f4 ff ff call 801055b7 <argstr> 801060d2: 89 45 f4 mov %eax,-0xc(%ebp) 801060d5: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 801060d9: 78 5e js 80106139 <sys_mknod+0x85> argint(1, &major) < 0 || 801060db: 8d 45 e8 lea -0x18(%ebp),%eax 801060de: 89 44 24 04 mov %eax,0x4(%esp) 801060e2: c7 04 24 01 00 00 00 movl $0x1,(%esp) 801060e9: e8 38 f4 ff ff call 80105526 <argint> char *path; int len; int major, minor; begin_trans(); if((len=argstr(0, &path)) < 0 || 801060ee: 85 c0 test %eax,%eax 801060f0: 78 47 js 80106139 <sys_mknod+0x85> argint(1, &major) < 0 || argint(2, &minor) < 0 || 801060f2: 8d 45 e4 lea -0x1c(%ebp),%eax 801060f5: 89 44 24 04 mov %eax,0x4(%esp) 801060f9: c7 04 24 02 00 00 00 movl $0x2,(%esp) 80106100: e8 21 f4 ff ff call 80105526 <argint> char *path; int len; int major, minor; begin_trans(); if((len=argstr(0, &path)) < 0 || 80106105: 85 c0 test %eax,%eax 80106107: 78 30 js 80106139 <sys_mknod+0x85> argint(1, &major) < 0 || argint(2, &minor) < 0 || (ip = create(path, T_DEV, major, minor)) == 0){ 80106109: 8b 45 e4 mov -0x1c(%ebp),%eax 8010610c: 0f bf c8 movswl %ax,%ecx 8010610f: 8b 45 e8 mov -0x18(%ebp),%eax 80106112: 0f bf d0 movswl %ax,%edx 80106115: 8b 45 ec mov -0x14(%ebp),%eax 80106118: 89 4c 24 0c mov %ecx,0xc(%esp) 8010611c: 89 54 24 08 mov %edx,0x8(%esp) 80106120: c7 44 24 04 03 00 00 movl $0x3,0x4(%esp) 80106127: 00 80106128: 89 04 24 mov %eax,(%esp) 8010612b: e8 cd fb ff ff call 80105cfd <create> char *path; int len; int major, minor; begin_trans(); if((len=argstr(0, &path)) < 0 || 80106130: 89 45 f0 mov %eax,-0x10(%ebp) 80106133: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 80106137: 75 0c jne 80106145 <sys_mknod+0x91> argint(1, &major) < 0 || argint(2, &minor) < 0 || (ip = create(path, T_DEV, major, minor)) == 0){ commit_trans(); 80106139: e8 1d d1 ff ff call 8010325b <commit_trans> return -1; 8010613e: b8 ff ff ff ff mov $0xffffffff,%eax 80106143: eb 15 jmp 8010615a <sys_mknod+0xa6> } iunlockput(ip); 80106145: 8b 45 f0 mov -0x10(%ebp),%eax 80106148: 89 04 24 mov %eax,(%esp) 8010614b: e8 b2 b9 ff ff call 80101b02 <iunlockput> commit_trans(); 80106150: e8 06 d1 ff ff call 8010325b <commit_trans> return 0; 80106155: b8 00 00 00 00 mov $0x0,%eax } 8010615a: c9 leave 8010615b: c3 ret 8010615c <sys_chdir>: int sys_chdir(void) { 8010615c: 55 push %ebp 8010615d: 89 e5 mov %esp,%ebp 8010615f: 83 ec 28 sub $0x28,%esp char *path; struct inode *ip; if(argstr(0, &path) < 0 || (ip = namei(path)) == 0) 80106162: 8d 45 f0 lea -0x10(%ebp),%eax 80106165: 89 44 24 04 mov %eax,0x4(%esp) 80106169: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80106170: e8 42 f4 ff ff call 801055b7 <argstr> 80106175: 85 c0 test %eax,%eax 80106177: 78 14 js 8010618d <sys_chdir+0x31> 80106179: 8b 45 f0 mov -0x10(%ebp),%eax 8010617c: 89 04 24 mov %eax,(%esp) 8010617f: e8 9f c2 ff ff call 80102423 <namei> 80106184: 89 45 f4 mov %eax,-0xc(%ebp) 80106187: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 8010618b: 75 07 jne 80106194 <sys_chdir+0x38> return -1; 8010618d: b8 ff ff ff ff mov $0xffffffff,%eax 80106192: eb 57 jmp 801061eb <sys_chdir+0x8f> ilock(ip); 80106194: 8b 45 f4 mov -0xc(%ebp),%eax 80106197: 89 04 24 mov %eax,(%esp) 8010619a: e8 dc b6 ff ff call 8010187b <ilock> if(ip->type != T_DIR){ 8010619f: 8b 45 f4 mov -0xc(%ebp),%eax 801061a2: 0f b7 40 10 movzwl 0x10(%eax),%eax 801061a6: 66 83 f8 01 cmp $0x1,%ax 801061aa: 74 12 je 801061be <sys_chdir+0x62> iunlockput(ip); 801061ac: 8b 45 f4 mov -0xc(%ebp),%eax 801061af: 89 04 24 mov %eax,(%esp) 801061b2: e8 4b b9 ff ff call 80101b02 <iunlockput> return -1; 801061b7: b8 ff ff ff ff mov $0xffffffff,%eax 801061bc: eb 2d jmp 801061eb <sys_chdir+0x8f> } iunlock(ip); 801061be: 8b 45 f4 mov -0xc(%ebp),%eax 801061c1: 89 04 24 mov %eax,(%esp) 801061c4: e8 03 b8 ff ff call 801019cc <iunlock> iput(proc->cwd); 801061c9: 65 a1 04 00 00 00 mov %gs:0x4,%eax 801061cf: 8b 40 68 mov 0x68(%eax),%eax 801061d2: 89 04 24 mov %eax,(%esp) 801061d5: e8 57 b8 ff ff call 80101a31 <iput> proc->cwd = ip; 801061da: 65 a1 04 00 00 00 mov %gs:0x4,%eax 801061e0: 8b 55 f4 mov -0xc(%ebp),%edx 801061e3: 89 50 68 mov %edx,0x68(%eax) return 0; 801061e6: b8 00 00 00 00 mov $0x0,%eax } 801061eb: c9 leave 801061ec: c3 ret 801061ed <sys_exec>: int sys_exec(void) { 801061ed: 55 push %ebp 801061ee: 89 e5 mov %esp,%ebp 801061f0: 81 ec a8 00 00 00 sub $0xa8,%esp char *path, *argv[MAXARG]; int i; uint uargv, uarg; if(argstr(0, &path) < 0 || argint(1, (int*)&uargv) < 0){ 801061f6: 8d 45 f0 lea -0x10(%ebp),%eax 801061f9: 89 44 24 04 mov %eax,0x4(%esp) 801061fd: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80106204: e8 ae f3 ff ff call 801055b7 <argstr> 80106209: 85 c0 test %eax,%eax 8010620b: 78 1a js 80106227 <sys_exec+0x3a> 8010620d: 8d 85 6c ff ff ff lea -0x94(%ebp),%eax 80106213: 89 44 24 04 mov %eax,0x4(%esp) 80106217: c7 04 24 01 00 00 00 movl $0x1,(%esp) 8010621e: e8 03 f3 ff ff call 80105526 <argint> 80106223: 85 c0 test %eax,%eax 80106225: 79 0a jns 80106231 <sys_exec+0x44> return -1; 80106227: b8 ff ff ff ff mov $0xffffffff,%eax 8010622c: e9 cd 00 00 00 jmp 801062fe <sys_exec+0x111> } memset(argv, 0, sizeof(argv)); 80106231: c7 44 24 08 80 00 00 movl $0x80,0x8(%esp) 80106238: 00 80106239: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80106240: 00 80106241: 8d 85 70 ff ff ff lea -0x90(%ebp),%eax 80106247: 89 04 24 mov %eax,(%esp) 8010624a: e8 7b ef ff ff call 801051ca <memset> for(i=0;; i++){ 8010624f: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) if(i >= NELEM(argv)) 80106256: 8b 45 f4 mov -0xc(%ebp),%eax 80106259: 83 f8 1f cmp $0x1f,%eax 8010625c: 76 0a jbe 80106268 <sys_exec+0x7b> return -1; 8010625e: b8 ff ff ff ff mov $0xffffffff,%eax 80106263: e9 96 00 00 00 jmp 801062fe <sys_exec+0x111> if(fetchint(uargv+4*i, (int*)&uarg) < 0) 80106268: 8d 85 68 ff ff ff lea -0x98(%ebp),%eax 8010626e: 8b 55 f4 mov -0xc(%ebp),%edx 80106271: c1 e2 02 shl $0x2,%edx 80106274: 89 d1 mov %edx,%ecx 80106276: 8b 95 6c ff ff ff mov -0x94(%ebp),%edx 8010627c: 8d 14 11 lea (%ecx,%edx,1),%edx 8010627f: 89 44 24 04 mov %eax,0x4(%esp) 80106283: 89 14 24 mov %edx,(%esp) 80106286: e8 fd f1 ff ff call 80105488 <fetchint> 8010628b: 85 c0 test %eax,%eax 8010628d: 79 07 jns 80106296 <sys_exec+0xa9> return -1; 8010628f: b8 ff ff ff ff mov $0xffffffff,%eax 80106294: eb 68 jmp 801062fe <sys_exec+0x111> if(uarg == 0){ 80106296: 8b 85 68 ff ff ff mov -0x98(%ebp),%eax 8010629c: 85 c0 test %eax,%eax 8010629e: 75 26 jne 801062c6 <sys_exec+0xd9> argv[i] = 0; 801062a0: 8b 45 f4 mov -0xc(%ebp),%eax 801062a3: c7 84 85 70 ff ff ff movl $0x0,-0x90(%ebp,%eax,4) 801062aa: 00 00 00 00 break; 801062ae: 90 nop } if(fetchstr(uarg, &argv[i]) < 0) return -1; } return exec(path, argv); 801062af: 8b 45 f0 mov -0x10(%ebp),%eax 801062b2: 8d 95 70 ff ff ff lea -0x90(%ebp),%edx 801062b8: 89 54 24 04 mov %edx,0x4(%esp) 801062bc: 89 04 24 mov %eax,(%esp) 801062bf: e8 34 a8 ff ff call 80100af8 <exec> 801062c4: eb 38 jmp 801062fe <sys_exec+0x111> return -1; if(uarg == 0){ argv[i] = 0; break; } if(fetchstr(uarg, &argv[i]) < 0) 801062c6: 8b 45 f4 mov -0xc(%ebp),%eax 801062c9: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx 801062d0: 8d 85 70 ff ff ff lea -0x90(%ebp),%eax 801062d6: 01 d0 add %edx,%eax 801062d8: 8b 95 68 ff ff ff mov -0x98(%ebp),%edx 801062de: 89 44 24 04 mov %eax,0x4(%esp) 801062e2: 89 14 24 mov %edx,(%esp) 801062e5: e8 d8 f1 ff ff call 801054c2 <fetchstr> 801062ea: 85 c0 test %eax,%eax 801062ec: 79 07 jns 801062f5 <sys_exec+0x108> return -1; 801062ee: b8 ff ff ff ff mov $0xffffffff,%eax 801062f3: eb 09 jmp 801062fe <sys_exec+0x111> if(argstr(0, &path) < 0 || argint(1, (int*)&uargv) < 0){ return -1; } memset(argv, 0, sizeof(argv)); for(i=0;; i++){ 801062f5: 83 45 f4 01 addl $0x1,-0xc(%ebp) argv[i] = 0; break; } if(fetchstr(uarg, &argv[i]) < 0) return -1; } 801062f9: e9 58 ff ff ff jmp 80106256 <sys_exec+0x69> return exec(path, argv); } 801062fe: c9 leave 801062ff: c3 ret 80106300 <sys_pipe>: int sys_pipe(void) { 80106300: 55 push %ebp 80106301: 89 e5 mov %esp,%ebp 80106303: 83 ec 38 sub $0x38,%esp int *fd; struct file *rf, *wf; int fd0, fd1; if(argptr(0, (void*)&fd, 2*sizeof(fd[0])) < 0) 80106306: 8d 45 ec lea -0x14(%ebp),%eax 80106309: c7 44 24 08 08 00 00 movl $0x8,0x8(%esp) 80106310: 00 80106311: 89 44 24 04 mov %eax,0x4(%esp) 80106315: c7 04 24 00 00 00 00 movl $0x0,(%esp) 8010631c: e8 34 f2 ff ff call 80105555 <argptr> 80106321: 85 c0 test %eax,%eax 80106323: 79 0a jns 8010632f <sys_pipe+0x2f> return -1; 80106325: b8 ff ff ff ff mov $0xffffffff,%eax 8010632a: e9 9b 00 00 00 jmp 801063ca <sys_pipe+0xca> if(pipealloc(&rf, &wf) < 0) 8010632f: 8d 45 e4 lea -0x1c(%ebp),%eax 80106332: 89 44 24 04 mov %eax,0x4(%esp) 80106336: 8d 45 e8 lea -0x18(%ebp),%eax 80106339: 89 04 24 mov %eax,(%esp) 8010633c: e8 c3 d8 ff ff call 80103c04 <pipealloc> 80106341: 85 c0 test %eax,%eax 80106343: 79 07 jns 8010634c <sys_pipe+0x4c> return -1; 80106345: b8 ff ff ff ff mov $0xffffffff,%eax 8010634a: eb 7e jmp 801063ca <sys_pipe+0xca> fd0 = -1; 8010634c: c7 45 f0 ff ff ff ff movl $0xffffffff,-0x10(%ebp) if((fd0 = fdalloc(rf)) < 0 || (fd1 = fdalloc(wf)) < 0){ 80106353: 8b 45 e8 mov -0x18(%ebp),%eax 80106356: 89 04 24 mov %eax,(%esp) 80106359: e8 97 f3 ff ff call 801056f5 <fdalloc> 8010635e: 89 45 f0 mov %eax,-0x10(%ebp) 80106361: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 80106365: 78 14 js 8010637b <sys_pipe+0x7b> 80106367: 8b 45 e4 mov -0x1c(%ebp),%eax 8010636a: 89 04 24 mov %eax,(%esp) 8010636d: e8 83 f3 ff ff call 801056f5 <fdalloc> 80106372: 89 45 f4 mov %eax,-0xc(%ebp) 80106375: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 80106379: 79 37 jns 801063b2 <sys_pipe+0xb2> if(fd0 >= 0) 8010637b: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 8010637f: 78 14 js 80106395 <sys_pipe+0x95> proc->ofile[fd0] = 0; 80106381: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80106387: 8b 55 f0 mov -0x10(%ebp),%edx 8010638a: 83 c2 08 add $0x8,%edx 8010638d: c7 44 90 08 00 00 00 movl $0x0,0x8(%eax,%edx,4) 80106394: 00 fileclose(rf); 80106395: 8b 45 e8 mov -0x18(%ebp),%eax 80106398: 89 04 24 mov %eax,(%esp) 8010639b: e8 2d ac ff ff call 80100fcd <fileclose> fileclose(wf); 801063a0: 8b 45 e4 mov -0x1c(%ebp),%eax 801063a3: 89 04 24 mov %eax,(%esp) 801063a6: e8 22 ac ff ff call 80100fcd <fileclose> return -1; 801063ab: b8 ff ff ff ff mov $0xffffffff,%eax 801063b0: eb 18 jmp 801063ca <sys_pipe+0xca> } fd[0] = fd0; 801063b2: 8b 45 ec mov -0x14(%ebp),%eax 801063b5: 8b 55 f0 mov -0x10(%ebp),%edx 801063b8: 89 10 mov %edx,(%eax) fd[1] = fd1; 801063ba: 8b 45 ec mov -0x14(%ebp),%eax 801063bd: 8d 50 04 lea 0x4(%eax),%edx 801063c0: 8b 45 f4 mov -0xc(%ebp),%eax 801063c3: 89 02 mov %eax,(%edx) return 0; 801063c5: b8 00 00 00 00 mov $0x0,%eax } 801063ca: c9 leave 801063cb: c3 ret 801063cc <sys_fork>: #include "mmu.h" #include "proc.h" int sys_fork(void) { 801063cc: 55 push %ebp 801063cd: 89 e5 mov %esp,%ebp 801063cf: 83 ec 08 sub $0x8,%esp return fork(); 801063d2: e8 66 df ff ff call 8010433d <fork> } 801063d7: c9 leave 801063d8: c3 ret 801063d9 <sys_clone>: int sys_clone(){ 801063d9: 55 push %ebp 801063da: 89 e5 mov %esp,%ebp 801063dc: 53 push %ebx 801063dd: 83 ec 24 sub $0x24,%esp int stack; int size; int routine; int arg; if(argint(1,&size) < 0 || size <=0 || argint(0,&stack) <0 || 801063e0: 8d 45 f0 lea -0x10(%ebp),%eax 801063e3: 89 44 24 04 mov %eax,0x4(%esp) 801063e7: c7 04 24 01 00 00 00 movl $0x1,(%esp) 801063ee: e8 33 f1 ff ff call 80105526 <argint> 801063f3: 85 c0 test %eax,%eax 801063f5: 78 4c js 80106443 <sys_clone+0x6a> 801063f7: 8b 45 f0 mov -0x10(%ebp),%eax 801063fa: 85 c0 test %eax,%eax 801063fc: 7e 45 jle 80106443 <sys_clone+0x6a> 801063fe: 8d 45 f4 lea -0xc(%ebp),%eax 80106401: 89 44 24 04 mov %eax,0x4(%esp) 80106405: c7 04 24 00 00 00 00 movl $0x0,(%esp) 8010640c: e8 15 f1 ff ff call 80105526 <argint> 80106411: 85 c0 test %eax,%eax 80106413: 78 2e js 80106443 <sys_clone+0x6a> argint(2,&routine) < 0 || argint(3,&arg)<0){ 80106415: 8d 45 ec lea -0x14(%ebp),%eax 80106418: 89 44 24 04 mov %eax,0x4(%esp) 8010641c: c7 04 24 02 00 00 00 movl $0x2,(%esp) 80106423: e8 fe f0 ff ff call 80105526 <argint> int stack; int size; int routine; int arg; if(argint(1,&size) < 0 || size <=0 || argint(0,&stack) <0 || 80106428: 85 c0 test %eax,%eax 8010642a: 78 17 js 80106443 <sys_clone+0x6a> argint(2,&routine) < 0 || argint(3,&arg)<0){ 8010642c: 8d 45 e8 lea -0x18(%ebp),%eax 8010642f: 89 44 24 04 mov %eax,0x4(%esp) 80106433: c7 04 24 03 00 00 00 movl $0x3,(%esp) 8010643a: e8 e7 f0 ff ff call 80105526 <argint> int stack; int size; int routine; int arg; if(argint(1,&size) < 0 || size <=0 || argint(0,&stack) <0 || 8010643f: 85 c0 test %eax,%eax 80106441: 79 07 jns 8010644a <sys_clone+0x71> argint(2,&routine) < 0 || argint(3,&arg)<0){ return -1; 80106443: b8 ff ff ff ff mov $0xffffffff,%eax 80106448: eb 20 jmp 8010646a <sys_clone+0x91> } return clone(stack,size,routine,arg); 8010644a: 8b 5d e8 mov -0x18(%ebp),%ebx 8010644d: 8b 4d ec mov -0x14(%ebp),%ecx 80106450: 8b 55 f0 mov -0x10(%ebp),%edx 80106453: 8b 45 f4 mov -0xc(%ebp),%eax 80106456: 89 5c 24 0c mov %ebx,0xc(%esp) 8010645a: 89 4c 24 08 mov %ecx,0x8(%esp) 8010645e: 89 54 24 04 mov %edx,0x4(%esp) 80106462: 89 04 24 mov %eax,(%esp) 80106465: e8 43 e0 ff ff call 801044ad <clone> } 8010646a: 83 c4 24 add $0x24,%esp 8010646d: 5b pop %ebx 8010646e: 5d pop %ebp 8010646f: c3 ret 80106470 <sys_exit>: int sys_exit(void) { 80106470: 55 push %ebp 80106471: 89 e5 mov %esp,%ebp 80106473: 83 ec 08 sub $0x8,%esp exit(); 80106476: e8 55 e2 ff ff call 801046d0 <exit> return 0; // not reached 8010647b: b8 00 00 00 00 mov $0x0,%eax } 80106480: c9 leave 80106481: c3 ret 80106482 <sys_texit>: int sys_texit(void) { 80106482: 55 push %ebp 80106483: 89 e5 mov %esp,%ebp 80106485: 83 ec 08 sub $0x8,%esp texit(); 80106488: e8 5f e3 ff ff call 801047ec <texit> return 0; 8010648d: b8 00 00 00 00 mov $0x0,%eax } 80106492: c9 leave 80106493: c3 ret 80106494 <sys_wait>: int sys_wait(void) { 80106494: 55 push %ebp 80106495: 89 e5 mov %esp,%ebp 80106497: 83 ec 08 sub $0x8,%esp return wait(); 8010649a: e8 1b e4 ff ff call 801048ba <wait> } 8010649f: c9 leave 801064a0: c3 ret 801064a1 <sys_kill>: int sys_kill(void) { 801064a1: 55 push %ebp 801064a2: 89 e5 mov %esp,%ebp 801064a4: 83 ec 28 sub $0x28,%esp int pid; if(argint(0, &pid) < 0) 801064a7: 8d 45 f4 lea -0xc(%ebp),%eax 801064aa: 89 44 24 04 mov %eax,0x4(%esp) 801064ae: c7 04 24 00 00 00 00 movl $0x0,(%esp) 801064b5: e8 6c f0 ff ff call 80105526 <argint> 801064ba: 85 c0 test %eax,%eax 801064bc: 79 07 jns 801064c5 <sys_kill+0x24> return -1; 801064be: b8 ff ff ff ff mov $0xffffffff,%eax 801064c3: eb 0b jmp 801064d0 <sys_kill+0x2f> return kill(pid); 801064c5: 8b 45 f4 mov -0xc(%ebp),%eax 801064c8: 89 04 24 mov %eax,(%esp) 801064cb: e8 a3 e8 ff ff call 80104d73 <kill> } 801064d0: c9 leave 801064d1: c3 ret 801064d2 <sys_getpid>: int sys_getpid(void) { 801064d2: 55 push %ebp 801064d3: 89 e5 mov %esp,%ebp return proc->pid; 801064d5: 65 a1 04 00 00 00 mov %gs:0x4,%eax 801064db: 8b 40 10 mov 0x10(%eax),%eax } 801064de: 5d pop %ebp 801064df: c3 ret 801064e0 <sys_sbrk>: int sys_sbrk(void) { 801064e0: 55 push %ebp 801064e1: 89 e5 mov %esp,%ebp 801064e3: 83 ec 28 sub $0x28,%esp int addr; int n; if(argint(0, &n) < 0) 801064e6: 8d 45 f0 lea -0x10(%ebp),%eax 801064e9: 89 44 24 04 mov %eax,0x4(%esp) 801064ed: c7 04 24 00 00 00 00 movl $0x0,(%esp) 801064f4: e8 2d f0 ff ff call 80105526 <argint> 801064f9: 85 c0 test %eax,%eax 801064fb: 79 07 jns 80106504 <sys_sbrk+0x24> return -1; 801064fd: b8 ff ff ff ff mov $0xffffffff,%eax 80106502: eb 24 jmp 80106528 <sys_sbrk+0x48> addr = proc->sz; 80106504: 65 a1 04 00 00 00 mov %gs:0x4,%eax 8010650a: 8b 00 mov (%eax),%eax 8010650c: 89 45 f4 mov %eax,-0xc(%ebp) if(growproc(n) < 0) 8010650f: 8b 45 f0 mov -0x10(%ebp),%eax 80106512: 89 04 24 mov %eax,(%esp) 80106515: e8 7e dd ff ff call 80104298 <growproc> 8010651a: 85 c0 test %eax,%eax 8010651c: 79 07 jns 80106525 <sys_sbrk+0x45> return -1; 8010651e: b8 ff ff ff ff mov $0xffffffff,%eax 80106523: eb 03 jmp 80106528 <sys_sbrk+0x48> return addr; 80106525: 8b 45 f4 mov -0xc(%ebp),%eax } 80106528: c9 leave 80106529: c3 ret 8010652a <sys_sleep>: int sys_sleep(void) { 8010652a: 55 push %ebp 8010652b: 89 e5 mov %esp,%ebp 8010652d: 83 ec 28 sub $0x28,%esp int n; uint ticks0; if(argint(0, &n) < 0) 80106530: 8d 45 f0 lea -0x10(%ebp),%eax 80106533: 89 44 24 04 mov %eax,0x4(%esp) 80106537: c7 04 24 00 00 00 00 movl $0x0,(%esp) 8010653e: e8 e3 ef ff ff call 80105526 <argint> 80106543: 85 c0 test %eax,%eax 80106545: 79 07 jns 8010654e <sys_sleep+0x24> return -1; 80106547: b8 ff ff ff ff mov $0xffffffff,%eax 8010654c: eb 6c jmp 801065ba <sys_sleep+0x90> acquire(&tickslock); 8010654e: c7 04 24 80 20 11 80 movl $0x80112080,(%esp) 80106555: e8 21 ea ff ff call 80104f7b <acquire> ticks0 = ticks; 8010655a: a1 c0 28 11 80 mov 0x801128c0,%eax 8010655f: 89 45 f4 mov %eax,-0xc(%ebp) while(ticks - ticks0 < n){ 80106562: eb 34 jmp 80106598 <sys_sleep+0x6e> if(proc->killed){ 80106564: 65 a1 04 00 00 00 mov %gs:0x4,%eax 8010656a: 8b 40 24 mov 0x24(%eax),%eax 8010656d: 85 c0 test %eax,%eax 8010656f: 74 13 je 80106584 <sys_sleep+0x5a> release(&tickslock); 80106571: c7 04 24 80 20 11 80 movl $0x80112080,(%esp) 80106578: e8 5f ea ff ff call 80104fdc <release> return -1; 8010657d: b8 ff ff ff ff mov $0xffffffff,%eax 80106582: eb 36 jmp 801065ba <sys_sleep+0x90> } sleep(&ticks, &tickslock); 80106584: c7 44 24 04 80 20 11 movl $0x80112080,0x4(%esp) 8010658b: 80 8010658c: c7 04 24 c0 28 11 80 movl $0x801128c0,(%esp) 80106593: e8 6a e6 ff ff call 80104c02 <sleep> if(argint(0, &n) < 0) return -1; acquire(&tickslock); ticks0 = ticks; while(ticks - ticks0 < n){ 80106598: a1 c0 28 11 80 mov 0x801128c0,%eax 8010659d: 89 c2 mov %eax,%edx 8010659f: 2b 55 f4 sub -0xc(%ebp),%edx 801065a2: 8b 45 f0 mov -0x10(%ebp),%eax 801065a5: 39 c2 cmp %eax,%edx 801065a7: 72 bb jb 80106564 <sys_sleep+0x3a> release(&tickslock); return -1; } sleep(&ticks, &tickslock); } release(&tickslock); 801065a9: c7 04 24 80 20 11 80 movl $0x80112080,(%esp) 801065b0: e8 27 ea ff ff call 80104fdc <release> return 0; 801065b5: b8 00 00 00 00 mov $0x0,%eax } 801065ba: c9 leave 801065bb: c3 ret 801065bc <sys_uptime>: // return how many clock tick interrupts have occurred // since start. int sys_uptime(void) { 801065bc: 55 push %ebp 801065bd: 89 e5 mov %esp,%ebp 801065bf: 83 ec 28 sub $0x28,%esp uint xticks; acquire(&tickslock); 801065c2: c7 04 24 80 20 11 80 movl $0x80112080,(%esp) 801065c9: e8 ad e9 ff ff call 80104f7b <acquire> xticks = ticks; 801065ce: a1 c0 28 11 80 mov 0x801128c0,%eax 801065d3: 89 45 f4 mov %eax,-0xc(%ebp) release(&tickslock); 801065d6: c7 04 24 80 20 11 80 movl $0x80112080,(%esp) 801065dd: e8 fa e9 ff ff call 80104fdc <release> return xticks; 801065e2: 8b 45 f4 mov -0xc(%ebp),%eax } 801065e5: c9 leave 801065e6: c3 ret 801065e7 <sys_tsleep>: int sys_tsleep(void) { 801065e7: 55 push %ebp 801065e8: 89 e5 mov %esp,%ebp 801065ea: 83 ec 08 sub $0x8,%esp tsleep(); 801065ed: e8 fa e8 ff ff call 80104eec <tsleep> return 0; 801065f2: b8 00 00 00 00 mov $0x0,%eax } 801065f7: c9 leave 801065f8: c3 ret 801065f9 <sys_twakeup>: int sys_twakeup(void) { 801065f9: 55 push %ebp 801065fa: 89 e5 mov %esp,%ebp 801065fc: 83 ec 28 sub $0x28,%esp int tid; if(argint(0,&tid) < 0){ 801065ff: 8d 45 f4 lea -0xc(%ebp),%eax 80106602: 89 44 24 04 mov %eax,0x4(%esp) 80106606: c7 04 24 00 00 00 00 movl $0x0,(%esp) 8010660d: e8 14 ef ff ff call 80105526 <argint> 80106612: 85 c0 test %eax,%eax 80106614: 79 07 jns 8010661d <sys_twakeup+0x24> return -1; 80106616: b8 ff ff ff ff mov $0xffffffff,%eax 8010661b: eb 10 jmp 8010662d <sys_twakeup+0x34> } twakeup(tid); 8010661d: 8b 45 f4 mov -0xc(%ebp),%eax 80106620: 89 04 24 mov %eax,(%esp) 80106623: e8 b7 e6 ff ff call 80104cdf <twakeup> return 0; 80106628: b8 00 00 00 00 mov $0x0,%eax } 8010662d: c9 leave 8010662e: c3 ret ... 80106630 <outb>: "memory", "cc"); } static inline void outb(ushort port, uchar data) { 80106630: 55 push %ebp 80106631: 89 e5 mov %esp,%ebp 80106633: 83 ec 08 sub $0x8,%esp 80106636: 8b 55 08 mov 0x8(%ebp),%edx 80106639: 8b 45 0c mov 0xc(%ebp),%eax 8010663c: 66 89 55 fc mov %dx,-0x4(%ebp) 80106640: 88 45 f8 mov %al,-0x8(%ebp) asm volatile("out %0,%1" : : "a" (data), "d" (port)); 80106643: 0f b6 45 f8 movzbl -0x8(%ebp),%eax 80106647: 0f b7 55 fc movzwl -0x4(%ebp),%edx 8010664b: ee out %al,(%dx) } 8010664c: c9 leave 8010664d: c3 ret 8010664e <timerinit>: #define TIMER_RATEGEN 0x04 // mode 2, rate generator #define TIMER_16BIT 0x30 // r/w counter 16 bits, LSB first void timerinit(void) { 8010664e: 55 push %ebp 8010664f: 89 e5 mov %esp,%ebp 80106651: 83 ec 18 sub $0x18,%esp // Interrupt 100 times/sec. outb(TIMER_MODE, TIMER_SEL0 | TIMER_RATEGEN | TIMER_16BIT); 80106654: c7 44 24 04 34 00 00 movl $0x34,0x4(%esp) 8010665b: 00 8010665c: c7 04 24 43 00 00 00 movl $0x43,(%esp) 80106663: e8 c8 ff ff ff call 80106630 <outb> outb(IO_TIMER1, TIMER_DIV(100) % 256); 80106668: c7 44 24 04 9c 00 00 movl $0x9c,0x4(%esp) 8010666f: 00 80106670: c7 04 24 40 00 00 00 movl $0x40,(%esp) 80106677: e8 b4 ff ff ff call 80106630 <outb> outb(IO_TIMER1, TIMER_DIV(100) / 256); 8010667c: c7 44 24 04 2e 00 00 movl $0x2e,0x4(%esp) 80106683: 00 80106684: c7 04 24 40 00 00 00 movl $0x40,(%esp) 8010668b: e8 a0 ff ff ff call 80106630 <outb> picenable(IRQ_TIMER); 80106690: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80106697: e8 f1 d3 ff ff call 80103a8d <picenable> } 8010669c: c9 leave 8010669d: c3 ret ... 801066a0 <alltraps>: # vectors.S sends all traps here. .globl alltraps alltraps: # Build trap frame. pushl %ds 801066a0: 1e push %ds pushl %es 801066a1: 06 push %es pushl %fs 801066a2: 0f a0 push %fs pushl %gs 801066a4: 0f a8 push %gs pushal 801066a6: 60 pusha # Set up data and per-cpu segments. movw $(SEG_KDATA<<3), %ax 801066a7: 66 b8 10 00 mov $0x10,%ax movw %ax, %ds 801066ab: 8e d8 mov %eax,%ds movw %ax, %es 801066ad: 8e c0 mov %eax,%es movw $(SEG_KCPU<<3), %ax 801066af: 66 b8 18 00 mov $0x18,%ax movw %ax, %fs 801066b3: 8e e0 mov %eax,%fs movw %ax, %gs 801066b5: 8e e8 mov %eax,%gs # Call trap(tf), where tf=%esp pushl %esp 801066b7: 54 push %esp call trap 801066b8: e8 d5 01 00 00 call 80106892 <trap> addl $4, %esp 801066bd: 83 c4 04 add $0x4,%esp 801066c0 <trapret>: # Return falls through to trapret... .globl trapret trapret: popal 801066c0: 61 popa popl %gs 801066c1: 0f a9 pop %gs popl %fs 801066c3: 0f a1 pop %fs popl %es 801066c5: 07 pop %es popl %ds 801066c6: 1f pop %ds addl $0x8, %esp # trapno and errcode 801066c7: 83 c4 08 add $0x8,%esp iret 801066ca: cf iret ... 801066cc <lidt>: struct gatedesc; static inline void lidt(struct gatedesc *p, int size) { 801066cc: 55 push %ebp 801066cd: 89 e5 mov %esp,%ebp 801066cf: 83 ec 10 sub $0x10,%esp volatile ushort pd[3]; pd[0] = size-1; 801066d2: 8b 45 0c mov 0xc(%ebp),%eax 801066d5: 83 e8 01 sub $0x1,%eax 801066d8: 66 89 45 fa mov %ax,-0x6(%ebp) pd[1] = (uint)p; 801066dc: 8b 45 08 mov 0x8(%ebp),%eax 801066df: 66 89 45 fc mov %ax,-0x4(%ebp) pd[2] = (uint)p >> 16; 801066e3: 8b 45 08 mov 0x8(%ebp),%eax 801066e6: c1 e8 10 shr $0x10,%eax 801066e9: 66 89 45 fe mov %ax,-0x2(%ebp) asm volatile("lidt (%0)" : : "r" (pd)); 801066ed: 8d 45 fa lea -0x6(%ebp),%eax 801066f0: 0f 01 18 lidtl (%eax) } 801066f3: c9 leave 801066f4: c3 ret 801066f5 <rcr2>: return result; } static inline uint rcr2(void) { 801066f5: 55 push %ebp 801066f6: 89 e5 mov %esp,%ebp 801066f8: 83 ec 10 sub $0x10,%esp uint val; asm volatile("movl %%cr2,%0" : "=r" (val)); 801066fb: 0f 20 d0 mov %cr2,%eax 801066fe: 89 45 fc mov %eax,-0x4(%ebp) return val; 80106701: 8b 45 fc mov -0x4(%ebp),%eax } 80106704: c9 leave 80106705: c3 ret 80106706 <tvinit>: struct spinlock tickslock; uint ticks; void tvinit(void) { 80106706: 55 push %ebp 80106707: 89 e5 mov %esp,%ebp 80106709: 83 ec 28 sub $0x28,%esp int i; for(i = 0; i < 256; i++) 8010670c: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) 80106713: e9 bf 00 00 00 jmp 801067d7 <tvinit+0xd1> SETGATE(idt[i], 0, SEG_KCODE<<3, vectors[i], 0); 80106718: 8b 45 f4 mov -0xc(%ebp),%eax 8010671b: 8b 55 f4 mov -0xc(%ebp),%edx 8010671e: 8b 14 95 a8 b0 10 80 mov -0x7fef4f58(,%edx,4),%edx 80106725: 66 89 14 c5 c0 20 11 mov %dx,-0x7feedf40(,%eax,8) 8010672c: 80 8010672d: 8b 45 f4 mov -0xc(%ebp),%eax 80106730: 66 c7 04 c5 c2 20 11 movw $0x8,-0x7feedf3e(,%eax,8) 80106737: 80 08 00 8010673a: 8b 45 f4 mov -0xc(%ebp),%eax 8010673d: 0f b6 14 c5 c4 20 11 movzbl -0x7feedf3c(,%eax,8),%edx 80106744: 80 80106745: 83 e2 e0 and $0xffffffe0,%edx 80106748: 88 14 c5 c4 20 11 80 mov %dl,-0x7feedf3c(,%eax,8) 8010674f: 8b 45 f4 mov -0xc(%ebp),%eax 80106752: 0f b6 14 c5 c4 20 11 movzbl -0x7feedf3c(,%eax,8),%edx 80106759: 80 8010675a: 83 e2 1f and $0x1f,%edx 8010675d: 88 14 c5 c4 20 11 80 mov %dl,-0x7feedf3c(,%eax,8) 80106764: 8b 45 f4 mov -0xc(%ebp),%eax 80106767: 0f b6 14 c5 c5 20 11 movzbl -0x7feedf3b(,%eax,8),%edx 8010676e: 80 8010676f: 83 e2 f0 and $0xfffffff0,%edx 80106772: 83 ca 0e or $0xe,%edx 80106775: 88 14 c5 c5 20 11 80 mov %dl,-0x7feedf3b(,%eax,8) 8010677c: 8b 45 f4 mov -0xc(%ebp),%eax 8010677f: 0f b6 14 c5 c5 20 11 movzbl -0x7feedf3b(,%eax,8),%edx 80106786: 80 80106787: 83 e2 ef and $0xffffffef,%edx 8010678a: 88 14 c5 c5 20 11 80 mov %dl,-0x7feedf3b(,%eax,8) 80106791: 8b 45 f4 mov -0xc(%ebp),%eax 80106794: 0f b6 14 c5 c5 20 11 movzbl -0x7feedf3b(,%eax,8),%edx 8010679b: 80 8010679c: 83 e2 9f and $0xffffff9f,%edx 8010679f: 88 14 c5 c5 20 11 80 mov %dl,-0x7feedf3b(,%eax,8) 801067a6: 8b 45 f4 mov -0xc(%ebp),%eax 801067a9: 0f b6 14 c5 c5 20 11 movzbl -0x7feedf3b(,%eax,8),%edx 801067b0: 80 801067b1: 83 ca 80 or $0xffffff80,%edx 801067b4: 88 14 c5 c5 20 11 80 mov %dl,-0x7feedf3b(,%eax,8) 801067bb: 8b 45 f4 mov -0xc(%ebp),%eax 801067be: 8b 55 f4 mov -0xc(%ebp),%edx 801067c1: 8b 14 95 a8 b0 10 80 mov -0x7fef4f58(,%edx,4),%edx 801067c8: c1 ea 10 shr $0x10,%edx 801067cb: 66 89 14 c5 c6 20 11 mov %dx,-0x7feedf3a(,%eax,8) 801067d2: 80 void tvinit(void) { int i; for(i = 0; i < 256; i++) 801067d3: 83 45 f4 01 addl $0x1,-0xc(%ebp) 801067d7: 81 7d f4 ff 00 00 00 cmpl $0xff,-0xc(%ebp) 801067de: 0f 8e 34 ff ff ff jle 80106718 <tvinit+0x12> SETGATE(idt[i], 0, SEG_KCODE<<3, vectors[i], 0); SETGATE(idt[T_SYSCALL], 1, SEG_KCODE<<3, vectors[T_SYSCALL], DPL_USER); 801067e4: a1 a8 b1 10 80 mov 0x8010b1a8,%eax 801067e9: 66 a3 c0 22 11 80 mov %ax,0x801122c0 801067ef: 66 c7 05 c2 22 11 80 movw $0x8,0x801122c2 801067f6: 08 00 801067f8: 0f b6 05 c4 22 11 80 movzbl 0x801122c4,%eax 801067ff: 83 e0 e0 and $0xffffffe0,%eax 80106802: a2 c4 22 11 80 mov %al,0x801122c4 80106807: 0f b6 05 c4 22 11 80 movzbl 0x801122c4,%eax 8010680e: 83 e0 1f and $0x1f,%eax 80106811: a2 c4 22 11 80 mov %al,0x801122c4 80106816: 0f b6 05 c5 22 11 80 movzbl 0x801122c5,%eax 8010681d: 83 c8 0f or $0xf,%eax 80106820: a2 c5 22 11 80 mov %al,0x801122c5 80106825: 0f b6 05 c5 22 11 80 movzbl 0x801122c5,%eax 8010682c: 83 e0 ef and $0xffffffef,%eax 8010682f: a2 c5 22 11 80 mov %al,0x801122c5 80106834: 0f b6 05 c5 22 11 80 movzbl 0x801122c5,%eax 8010683b: 83 c8 60 or $0x60,%eax 8010683e: a2 c5 22 11 80 mov %al,0x801122c5 80106843: 0f b6 05 c5 22 11 80 movzbl 0x801122c5,%eax 8010684a: 83 c8 80 or $0xffffff80,%eax 8010684d: a2 c5 22 11 80 mov %al,0x801122c5 80106852: a1 a8 b1 10 80 mov 0x8010b1a8,%eax 80106857: c1 e8 10 shr $0x10,%eax 8010685a: 66 a3 c6 22 11 80 mov %ax,0x801122c6 initlock(&tickslock, "time"); 80106860: c7 44 24 04 a4 8a 10 movl $0x80108aa4,0x4(%esp) 80106867: 80 80106868: c7 04 24 80 20 11 80 movl $0x80112080,(%esp) 8010686f: e8 e6 e6 ff ff call 80104f5a <initlock> } 80106874: c9 leave 80106875: c3 ret 80106876 <idtinit>: void idtinit(void) { 80106876: 55 push %ebp 80106877: 89 e5 mov %esp,%ebp 80106879: 83 ec 08 sub $0x8,%esp lidt(idt, sizeof(idt)); 8010687c: c7 44 24 04 00 08 00 movl $0x800,0x4(%esp) 80106883: 00 80106884: c7 04 24 c0 20 11 80 movl $0x801120c0,(%esp) 8010688b: e8 3c fe ff ff call 801066cc <lidt> } 80106890: c9 leave 80106891: c3 ret 80106892 <trap>: //PAGEBREAK: 41 void trap(struct trapframe *tf) { 80106892: 55 push %ebp 80106893: 89 e5 mov %esp,%ebp 80106895: 57 push %edi 80106896: 56 push %esi 80106897: 53 push %ebx 80106898: 83 ec 3c sub $0x3c,%esp if(tf->trapno == T_SYSCALL){ 8010689b: 8b 45 08 mov 0x8(%ebp),%eax 8010689e: 8b 40 30 mov 0x30(%eax),%eax 801068a1: 83 f8 40 cmp $0x40,%eax 801068a4: 75 3e jne 801068e4 <trap+0x52> if(proc->killed) 801068a6: 65 a1 04 00 00 00 mov %gs:0x4,%eax 801068ac: 8b 40 24 mov 0x24(%eax),%eax 801068af: 85 c0 test %eax,%eax 801068b1: 74 05 je 801068b8 <trap+0x26> exit(); 801068b3: e8 18 de ff ff call 801046d0 <exit> proc->tf = tf; 801068b8: 65 a1 04 00 00 00 mov %gs:0x4,%eax 801068be: 8b 55 08 mov 0x8(%ebp),%edx 801068c1: 89 50 18 mov %edx,0x18(%eax) syscall(); 801068c4: e8 25 ed ff ff call 801055ee <syscall> if(proc->killed) 801068c9: 65 a1 04 00 00 00 mov %gs:0x4,%eax 801068cf: 8b 40 24 mov 0x24(%eax),%eax 801068d2: 85 c0 test %eax,%eax 801068d4: 0f 84 34 02 00 00 je 80106b0e <trap+0x27c> exit(); 801068da: e8 f1 dd ff ff call 801046d0 <exit> return; 801068df: e9 2b 02 00 00 jmp 80106b0f <trap+0x27d> } switch(tf->trapno){ 801068e4: 8b 45 08 mov 0x8(%ebp),%eax 801068e7: 8b 40 30 mov 0x30(%eax),%eax 801068ea: 83 e8 20 sub $0x20,%eax 801068ed: 83 f8 1f cmp $0x1f,%eax 801068f0: 0f 87 bc 00 00 00 ja 801069b2 <trap+0x120> 801068f6: 8b 04 85 4c 8b 10 80 mov -0x7fef74b4(,%eax,4),%eax 801068fd: ff e0 jmp *%eax case T_IRQ0 + IRQ_TIMER: if(cpu->id == 0){ 801068ff: 65 a1 00 00 00 00 mov %gs:0x0,%eax 80106905: 0f b6 00 movzbl (%eax),%eax 80106908: 84 c0 test %al,%al 8010690a: 75 31 jne 8010693d <trap+0xab> acquire(&tickslock); 8010690c: c7 04 24 80 20 11 80 movl $0x80112080,(%esp) 80106913: e8 63 e6 ff ff call 80104f7b <acquire> ticks++; 80106918: a1 c0 28 11 80 mov 0x801128c0,%eax 8010691d: 83 c0 01 add $0x1,%eax 80106920: a3 c0 28 11 80 mov %eax,0x801128c0 wakeup(&ticks); 80106925: c7 04 24 c0 28 11 80 movl $0x801128c0,(%esp) 8010692c: e8 17 e4 ff ff call 80104d48 <wakeup> release(&tickslock); 80106931: c7 04 24 80 20 11 80 movl $0x80112080,(%esp) 80106938: e8 9f e6 ff ff call 80104fdc <release> } lapiceoi(); 8010693d: e8 9e c5 ff ff call 80102ee0 <lapiceoi> break; 80106942: e9 41 01 00 00 jmp 80106a88 <trap+0x1f6> case T_IRQ0 + IRQ_IDE: ideintr(); 80106947: e8 af bd ff ff call 801026fb <ideintr> lapiceoi(); 8010694c: e8 8f c5 ff ff call 80102ee0 <lapiceoi> break; 80106951: e9 32 01 00 00 jmp 80106a88 <trap+0x1f6> case T_IRQ0 + IRQ_IDE+1: // Bochs generates spurious IDE1 interrupts. break; case T_IRQ0 + IRQ_KBD: kbdintr(); 80106956: e8 68 c3 ff ff call 80102cc3 <kbdintr> lapiceoi(); 8010695b: e8 80 c5 ff ff call 80102ee0 <lapiceoi> break; 80106960: e9 23 01 00 00 jmp 80106a88 <trap+0x1f6> case T_IRQ0 + IRQ_COM1: uartintr(); 80106965: e8 9d 03 00 00 call 80106d07 <uartintr> lapiceoi(); 8010696a: e8 71 c5 ff ff call 80102ee0 <lapiceoi> break; 8010696f: e9 14 01 00 00 jmp 80106a88 <trap+0x1f6> case T_IRQ0 + 7: case T_IRQ0 + IRQ_SPURIOUS: cprintf("cpu%d: spurious interrupt at %x:%x\n", 80106974: 8b 45 08 mov 0x8(%ebp),%eax 80106977: 8b 48 38 mov 0x38(%eax),%ecx cpu->id, tf->cs, tf->eip); 8010697a: 8b 45 08 mov 0x8(%ebp),%eax 8010697d: 0f b7 40 3c movzwl 0x3c(%eax),%eax uartintr(); lapiceoi(); break; case T_IRQ0 + 7: case T_IRQ0 + IRQ_SPURIOUS: cprintf("cpu%d: spurious interrupt at %x:%x\n", 80106981: 0f b7 d0 movzwl %ax,%edx cpu->id, tf->cs, tf->eip); 80106984: 65 a1 00 00 00 00 mov %gs:0x0,%eax 8010698a: 0f b6 00 movzbl (%eax),%eax uartintr(); lapiceoi(); break; case T_IRQ0 + 7: case T_IRQ0 + IRQ_SPURIOUS: cprintf("cpu%d: spurious interrupt at %x:%x\n", 8010698d: 0f b6 c0 movzbl %al,%eax 80106990: 89 4c 24 0c mov %ecx,0xc(%esp) 80106994: 89 54 24 08 mov %edx,0x8(%esp) 80106998: 89 44 24 04 mov %eax,0x4(%esp) 8010699c: c7 04 24 ac 8a 10 80 movl $0x80108aac,(%esp) 801069a3: e8 f2 99 ff ff call 8010039a <cprintf> cpu->id, tf->cs, tf->eip); lapiceoi(); 801069a8: e8 33 c5 ff ff call 80102ee0 <lapiceoi> break; 801069ad: e9 d6 00 00 00 jmp 80106a88 <trap+0x1f6> //PAGEBREAK: 13 default: if(proc == 0 || (tf->cs&3) == 0){ 801069b2: 65 a1 04 00 00 00 mov %gs:0x4,%eax 801069b8: 85 c0 test %eax,%eax 801069ba: 74 11 je 801069cd <trap+0x13b> 801069bc: 8b 45 08 mov 0x8(%ebp),%eax 801069bf: 0f b7 40 3c movzwl 0x3c(%eax),%eax 801069c3: 0f b7 c0 movzwl %ax,%eax 801069c6: 83 e0 03 and $0x3,%eax 801069c9: 85 c0 test %eax,%eax 801069cb: 75 46 jne 80106a13 <trap+0x181> // In kernel, it must be our mistake. cprintf("unexpected trap %d from cpu %d eip %x (cr2=0x%x)\n", 801069cd: e8 23 fd ff ff call 801066f5 <rcr2> 801069d2: 8b 55 08 mov 0x8(%ebp),%edx 801069d5: 8b 5a 38 mov 0x38(%edx),%ebx tf->trapno, cpu->id, tf->eip, rcr2()); 801069d8: 65 8b 15 00 00 00 00 mov %gs:0x0,%edx 801069df: 0f b6 12 movzbl (%edx),%edx //PAGEBREAK: 13 default: if(proc == 0 || (tf->cs&3) == 0){ // In kernel, it must be our mistake. cprintf("unexpected trap %d from cpu %d eip %x (cr2=0x%x)\n", 801069e2: 0f b6 ca movzbl %dl,%ecx 801069e5: 8b 55 08 mov 0x8(%ebp),%edx 801069e8: 8b 52 30 mov 0x30(%edx),%edx 801069eb: 89 44 24 10 mov %eax,0x10(%esp) 801069ef: 89 5c 24 0c mov %ebx,0xc(%esp) 801069f3: 89 4c 24 08 mov %ecx,0x8(%esp) 801069f7: 89 54 24 04 mov %edx,0x4(%esp) 801069fb: c7 04 24 d0 8a 10 80 movl $0x80108ad0,(%esp) 80106a02: e8 93 99 ff ff call 8010039a <cprintf> tf->trapno, cpu->id, tf->eip, rcr2()); panic("trap"); 80106a07: c7 04 24 02 8b 10 80 movl $0x80108b02,(%esp) 80106a0e: e8 27 9b ff ff call 8010053a <panic> } // In user space, assume process misbehaved. cprintf("pid %d %s: trap %d err %d on cpu %d " 80106a13: e8 dd fc ff ff call 801066f5 <rcr2> 80106a18: 89 c2 mov %eax,%edx 80106a1a: 8b 45 08 mov 0x8(%ebp),%eax 80106a1d: 8b 78 38 mov 0x38(%eax),%edi "eip 0x%x addr 0x%x--kill proc\n", proc->pid, proc->name, tf->trapno, tf->err, cpu->id, tf->eip, 80106a20: 65 a1 00 00 00 00 mov %gs:0x0,%eax 80106a26: 0f b6 00 movzbl (%eax),%eax cprintf("unexpected trap %d from cpu %d eip %x (cr2=0x%x)\n", tf->trapno, cpu->id, tf->eip, rcr2()); panic("trap"); } // In user space, assume process misbehaved. cprintf("pid %d %s: trap %d err %d on cpu %d " 80106a29: 0f b6 f0 movzbl %al,%esi 80106a2c: 8b 45 08 mov 0x8(%ebp),%eax 80106a2f: 8b 58 34 mov 0x34(%eax),%ebx 80106a32: 8b 45 08 mov 0x8(%ebp),%eax 80106a35: 8b 48 30 mov 0x30(%eax),%ecx "eip 0x%x addr 0x%x--kill proc\n", proc->pid, proc->name, tf->trapno, tf->err, cpu->id, tf->eip, 80106a38: 65 a1 04 00 00 00 mov %gs:0x4,%eax cprintf("unexpected trap %d from cpu %d eip %x (cr2=0x%x)\n", tf->trapno, cpu->id, tf->eip, rcr2()); panic("trap"); } // In user space, assume process misbehaved. cprintf("pid %d %s: trap %d err %d on cpu %d " 80106a3e: 83 c0 6c add $0x6c,%eax 80106a41: 89 45 e4 mov %eax,-0x1c(%ebp) "eip 0x%x addr 0x%x--kill proc\n", proc->pid, proc->name, tf->trapno, tf->err, cpu->id, tf->eip, 80106a44: 65 a1 04 00 00 00 mov %gs:0x4,%eax cprintf("unexpected trap %d from cpu %d eip %x (cr2=0x%x)\n", tf->trapno, cpu->id, tf->eip, rcr2()); panic("trap"); } // In user space, assume process misbehaved. cprintf("pid %d %s: trap %d err %d on cpu %d " 80106a4a: 8b 40 10 mov 0x10(%eax),%eax 80106a4d: 89 54 24 1c mov %edx,0x1c(%esp) 80106a51: 89 7c 24 18 mov %edi,0x18(%esp) 80106a55: 89 74 24 14 mov %esi,0x14(%esp) 80106a59: 89 5c 24 10 mov %ebx,0x10(%esp) 80106a5d: 89 4c 24 0c mov %ecx,0xc(%esp) 80106a61: 8b 55 e4 mov -0x1c(%ebp),%edx 80106a64: 89 54 24 08 mov %edx,0x8(%esp) 80106a68: 89 44 24 04 mov %eax,0x4(%esp) 80106a6c: c7 04 24 08 8b 10 80 movl $0x80108b08,(%esp) 80106a73: e8 22 99 ff ff call 8010039a <cprintf> "eip 0x%x addr 0x%x--kill proc\n", proc->pid, proc->name, tf->trapno, tf->err, cpu->id, tf->eip, rcr2()); proc->killed = 1; 80106a78: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80106a7e: c7 40 24 01 00 00 00 movl $0x1,0x24(%eax) 80106a85: eb 01 jmp 80106a88 <trap+0x1f6> ideintr(); lapiceoi(); break; case T_IRQ0 + IRQ_IDE+1: // Bochs generates spurious IDE1 interrupts. break; 80106a87: 90 nop } // Force process exit if it has been killed and is in user space. // (If it is still executing in the kernel, let it keep running // until it gets to the regular system call return.) if(proc && proc->killed && (tf->cs&3) == DPL_USER) 80106a88: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80106a8e: 85 c0 test %eax,%eax 80106a90: 74 24 je 80106ab6 <trap+0x224> 80106a92: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80106a98: 8b 40 24 mov 0x24(%eax),%eax 80106a9b: 85 c0 test %eax,%eax 80106a9d: 74 17 je 80106ab6 <trap+0x224> 80106a9f: 8b 45 08 mov 0x8(%ebp),%eax 80106aa2: 0f b7 40 3c movzwl 0x3c(%eax),%eax 80106aa6: 0f b7 c0 movzwl %ax,%eax 80106aa9: 83 e0 03 and $0x3,%eax 80106aac: 83 f8 03 cmp $0x3,%eax 80106aaf: 75 05 jne 80106ab6 <trap+0x224> exit(); 80106ab1: e8 1a dc ff ff call 801046d0 <exit> // Force process to give up CPU on clock tick. // If interrupts were on while locks held, would need to check nlock. if(proc && proc->state == RUNNING && tf->trapno == T_IRQ0+IRQ_TIMER) 80106ab6: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80106abc: 85 c0 test %eax,%eax 80106abe: 74 1e je 80106ade <trap+0x24c> 80106ac0: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80106ac6: 8b 40 0c mov 0xc(%eax),%eax 80106ac9: 83 f8 04 cmp $0x4,%eax 80106acc: 75 10 jne 80106ade <trap+0x24c> 80106ace: 8b 45 08 mov 0x8(%ebp),%eax 80106ad1: 8b 40 30 mov 0x30(%eax),%eax 80106ad4: 83 f8 20 cmp $0x20,%eax 80106ad7: 75 05 jne 80106ade <trap+0x24c> yield(); 80106ad9: e8 75 e0 ff ff call 80104b53 <yield> // Check if the process has been killed since we yielded if(proc && proc->killed && (tf->cs&3) == DPL_USER) 80106ade: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80106ae4: 85 c0 test %eax,%eax 80106ae6: 74 27 je 80106b0f <trap+0x27d> 80106ae8: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80106aee: 8b 40 24 mov 0x24(%eax),%eax 80106af1: 85 c0 test %eax,%eax 80106af3: 74 1a je 80106b0f <trap+0x27d> 80106af5: 8b 45 08 mov 0x8(%ebp),%eax 80106af8: 0f b7 40 3c movzwl 0x3c(%eax),%eax 80106afc: 0f b7 c0 movzwl %ax,%eax 80106aff: 83 e0 03 and $0x3,%eax 80106b02: 83 f8 03 cmp $0x3,%eax 80106b05: 75 08 jne 80106b0f <trap+0x27d> exit(); 80106b07: e8 c4 db ff ff call 801046d0 <exit> 80106b0c: eb 01 jmp 80106b0f <trap+0x27d> exit(); proc->tf = tf; syscall(); if(proc->killed) exit(); return; 80106b0e: 90 nop yield(); // Check if the process has been killed since we yielded if(proc && proc->killed && (tf->cs&3) == DPL_USER) exit(); } 80106b0f: 83 c4 3c add $0x3c,%esp 80106b12: 5b pop %ebx 80106b13: 5e pop %esi 80106b14: 5f pop %edi 80106b15: 5d pop %ebp 80106b16: c3 ret ... 80106b18 <inb>: // Routines to let C code use special x86 instructions. static inline uchar inb(ushort port) { 80106b18: 55 push %ebp 80106b19: 89 e5 mov %esp,%ebp 80106b1b: 83 ec 14 sub $0x14,%esp 80106b1e: 8b 45 08 mov 0x8(%ebp),%eax 80106b21: 66 89 45 ec mov %ax,-0x14(%ebp) uchar data; asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 80106b25: 0f b7 45 ec movzwl -0x14(%ebp),%eax 80106b29: 89 c2 mov %eax,%edx 80106b2b: ec in (%dx),%al 80106b2c: 88 45 ff mov %al,-0x1(%ebp) return data; 80106b2f: 0f b6 45 ff movzbl -0x1(%ebp),%eax } 80106b33: c9 leave 80106b34: c3 ret 80106b35 <outb>: "memory", "cc"); } static inline void outb(ushort port, uchar data) { 80106b35: 55 push %ebp 80106b36: 89 e5 mov %esp,%ebp 80106b38: 83 ec 08 sub $0x8,%esp 80106b3b: 8b 55 08 mov 0x8(%ebp),%edx 80106b3e: 8b 45 0c mov 0xc(%ebp),%eax 80106b41: 66 89 55 fc mov %dx,-0x4(%ebp) 80106b45: 88 45 f8 mov %al,-0x8(%ebp) asm volatile("out %0,%1" : : "a" (data), "d" (port)); 80106b48: 0f b6 45 f8 movzbl -0x8(%ebp),%eax 80106b4c: 0f b7 55 fc movzwl -0x4(%ebp),%edx 80106b50: ee out %al,(%dx) } 80106b51: c9 leave 80106b52: c3 ret 80106b53 <uartinit>: static int uart; // is there a uart? void uartinit(void) { 80106b53: 55 push %ebp 80106b54: 89 e5 mov %esp,%ebp 80106b56: 83 ec 28 sub $0x28,%esp char *p; // Turn off the FIFO outb(COM1+2, 0); 80106b59: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80106b60: 00 80106b61: c7 04 24 fa 03 00 00 movl $0x3fa,(%esp) 80106b68: e8 c8 ff ff ff call 80106b35 <outb> // 9600 baud, 8 data bits, 1 stop bit, parity off. outb(COM1+3, 0x80); // Unlock divisor 80106b6d: c7 44 24 04 80 00 00 movl $0x80,0x4(%esp) 80106b74: 00 80106b75: c7 04 24 fb 03 00 00 movl $0x3fb,(%esp) 80106b7c: e8 b4 ff ff ff call 80106b35 <outb> outb(COM1+0, 115200/9600); 80106b81: c7 44 24 04 0c 00 00 movl $0xc,0x4(%esp) 80106b88: 00 80106b89: c7 04 24 f8 03 00 00 movl $0x3f8,(%esp) 80106b90: e8 a0 ff ff ff call 80106b35 <outb> outb(COM1+1, 0); 80106b95: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80106b9c: 00 80106b9d: c7 04 24 f9 03 00 00 movl $0x3f9,(%esp) 80106ba4: e8 8c ff ff ff call 80106b35 <outb> outb(COM1+3, 0x03); // Lock divisor, 8 data bits. 80106ba9: c7 44 24 04 03 00 00 movl $0x3,0x4(%esp) 80106bb0: 00 80106bb1: c7 04 24 fb 03 00 00 movl $0x3fb,(%esp) 80106bb8: e8 78 ff ff ff call 80106b35 <outb> outb(COM1+4, 0); 80106bbd: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80106bc4: 00 80106bc5: c7 04 24 fc 03 00 00 movl $0x3fc,(%esp) 80106bcc: e8 64 ff ff ff call 80106b35 <outb> outb(COM1+1, 0x01); // Enable receive interrupts. 80106bd1: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp) 80106bd8: 00 80106bd9: c7 04 24 f9 03 00 00 movl $0x3f9,(%esp) 80106be0: e8 50 ff ff ff call 80106b35 <outb> // If status is 0xFF, no serial port. if(inb(COM1+5) == 0xFF) 80106be5: c7 04 24 fd 03 00 00 movl $0x3fd,(%esp) 80106bec: e8 27 ff ff ff call 80106b18 <inb> 80106bf1: 3c ff cmp $0xff,%al 80106bf3: 74 6c je 80106c61 <uartinit+0x10e> return; uart = 1; 80106bf5: c7 05 6c b6 10 80 01 movl $0x1,0x8010b66c 80106bfc: 00 00 00 // Acknowledge pre-existing interrupt conditions; // enable interrupts. inb(COM1+2); 80106bff: c7 04 24 fa 03 00 00 movl $0x3fa,(%esp) 80106c06: e8 0d ff ff ff call 80106b18 <inb> inb(COM1+0); 80106c0b: c7 04 24 f8 03 00 00 movl $0x3f8,(%esp) 80106c12: e8 01 ff ff ff call 80106b18 <inb> picenable(IRQ_COM1); 80106c17: c7 04 24 04 00 00 00 movl $0x4,(%esp) 80106c1e: e8 6a ce ff ff call 80103a8d <picenable> ioapicenable(IRQ_COM1, 0); 80106c23: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80106c2a: 00 80106c2b: c7 04 24 04 00 00 00 movl $0x4,(%esp) 80106c32: e8 47 bd ff ff call 8010297e <ioapicenable> // Announce that we're here. for(p="xv6...\n"; *p; p++) 80106c37: c7 45 f4 cc 8b 10 80 movl $0x80108bcc,-0xc(%ebp) 80106c3e: eb 15 jmp 80106c55 <uartinit+0x102> uartputc(*p); 80106c40: 8b 45 f4 mov -0xc(%ebp),%eax 80106c43: 0f b6 00 movzbl (%eax),%eax 80106c46: 0f be c0 movsbl %al,%eax 80106c49: 89 04 24 mov %eax,(%esp) 80106c4c: e8 13 00 00 00 call 80106c64 <uartputc> inb(COM1+0); picenable(IRQ_COM1); ioapicenable(IRQ_COM1, 0); // Announce that we're here. for(p="xv6...\n"; *p; p++) 80106c51: 83 45 f4 01 addl $0x1,-0xc(%ebp) 80106c55: 8b 45 f4 mov -0xc(%ebp),%eax 80106c58: 0f b6 00 movzbl (%eax),%eax 80106c5b: 84 c0 test %al,%al 80106c5d: 75 e1 jne 80106c40 <uartinit+0xed> 80106c5f: eb 01 jmp 80106c62 <uartinit+0x10f> outb(COM1+4, 0); outb(COM1+1, 0x01); // Enable receive interrupts. // If status is 0xFF, no serial port. if(inb(COM1+5) == 0xFF) return; 80106c61: 90 nop ioapicenable(IRQ_COM1, 0); // Announce that we're here. for(p="xv6...\n"; *p; p++) uartputc(*p); } 80106c62: c9 leave 80106c63: c3 ret 80106c64 <uartputc>: void uartputc(int c) { 80106c64: 55 push %ebp 80106c65: 89 e5 mov %esp,%ebp 80106c67: 83 ec 28 sub $0x28,%esp int i; if(!uart) 80106c6a: a1 6c b6 10 80 mov 0x8010b66c,%eax 80106c6f: 85 c0 test %eax,%eax 80106c71: 74 4d je 80106cc0 <uartputc+0x5c> return; for(i = 0; i < 128 && !(inb(COM1+5) & 0x20); i++) 80106c73: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) 80106c7a: eb 10 jmp 80106c8c <uartputc+0x28> microdelay(10); 80106c7c: c7 04 24 0a 00 00 00 movl $0xa,(%esp) 80106c83: e8 7d c2 ff ff call 80102f05 <microdelay> { int i; if(!uart) return; for(i = 0; i < 128 && !(inb(COM1+5) & 0x20); i++) 80106c88: 83 45 f4 01 addl $0x1,-0xc(%ebp) 80106c8c: 83 7d f4 7f cmpl $0x7f,-0xc(%ebp) 80106c90: 7f 16 jg 80106ca8 <uartputc+0x44> 80106c92: c7 04 24 fd 03 00 00 movl $0x3fd,(%esp) 80106c99: e8 7a fe ff ff call 80106b18 <inb> 80106c9e: 0f b6 c0 movzbl %al,%eax 80106ca1: 83 e0 20 and $0x20,%eax 80106ca4: 85 c0 test %eax,%eax 80106ca6: 74 d4 je 80106c7c <uartputc+0x18> microdelay(10); outb(COM1+0, c); 80106ca8: 8b 45 08 mov 0x8(%ebp),%eax 80106cab: 0f b6 c0 movzbl %al,%eax 80106cae: 89 44 24 04 mov %eax,0x4(%esp) 80106cb2: c7 04 24 f8 03 00 00 movl $0x3f8,(%esp) 80106cb9: e8 77 fe ff ff call 80106b35 <outb> 80106cbe: eb 01 jmp 80106cc1 <uartputc+0x5d> uartputc(int c) { int i; if(!uart) return; 80106cc0: 90 nop for(i = 0; i < 128 && !(inb(COM1+5) & 0x20); i++) microdelay(10); outb(COM1+0, c); } 80106cc1: c9 leave 80106cc2: c3 ret 80106cc3 <uartgetc>: static int uartgetc(void) { 80106cc3: 55 push %ebp 80106cc4: 89 e5 mov %esp,%ebp 80106cc6: 83 ec 04 sub $0x4,%esp if(!uart) 80106cc9: a1 6c b6 10 80 mov 0x8010b66c,%eax 80106cce: 85 c0 test %eax,%eax 80106cd0: 75 07 jne 80106cd9 <uartgetc+0x16> return -1; 80106cd2: b8 ff ff ff ff mov $0xffffffff,%eax 80106cd7: eb 2c jmp 80106d05 <uartgetc+0x42> if(!(inb(COM1+5) & 0x01)) 80106cd9: c7 04 24 fd 03 00 00 movl $0x3fd,(%esp) 80106ce0: e8 33 fe ff ff call 80106b18 <inb> 80106ce5: 0f b6 c0 movzbl %al,%eax 80106ce8: 83 e0 01 and $0x1,%eax 80106ceb: 85 c0 test %eax,%eax 80106ced: 75 07 jne 80106cf6 <uartgetc+0x33> return -1; 80106cef: b8 ff ff ff ff mov $0xffffffff,%eax 80106cf4: eb 0f jmp 80106d05 <uartgetc+0x42> return inb(COM1+0); 80106cf6: c7 04 24 f8 03 00 00 movl $0x3f8,(%esp) 80106cfd: e8 16 fe ff ff call 80106b18 <inb> 80106d02: 0f b6 c0 movzbl %al,%eax } 80106d05: c9 leave 80106d06: c3 ret 80106d07 <uartintr>: void uartintr(void) { 80106d07: 55 push %ebp 80106d08: 89 e5 mov %esp,%ebp 80106d0a: 83 ec 18 sub $0x18,%esp consoleintr(uartgetc); 80106d0d: c7 04 24 c3 6c 10 80 movl $0x80106cc3,(%esp) 80106d14: e8 92 9a ff ff call 801007ab <consoleintr> } 80106d19: c9 leave 80106d1a: c3 ret ... 80106d1c <vector0>: # generated by vectors.pl - do not edit # handlers .globl alltraps .globl vector0 vector0: pushl $0 80106d1c: 6a 00 push $0x0 pushl $0 80106d1e: 6a 00 push $0x0 jmp alltraps 80106d20: e9 7b f9 ff ff jmp 801066a0 <alltraps> 80106d25 <vector1>: .globl vector1 vector1: pushl $0 80106d25: 6a 00 push $0x0 pushl $1 80106d27: 6a 01 push $0x1 jmp alltraps 80106d29: e9 72 f9 ff ff jmp 801066a0 <alltraps> 80106d2e <vector2>: .globl vector2 vector2: pushl $0 80106d2e: 6a 00 push $0x0 pushl $2 80106d30: 6a 02 push $0x2 jmp alltraps 80106d32: e9 69 f9 ff ff jmp 801066a0 <alltraps> 80106d37 <vector3>: .globl vector3 vector3: pushl $0 80106d37: 6a 00 push $0x0 pushl $3 80106d39: 6a 03 push $0x3 jmp alltraps 80106d3b: e9 60 f9 ff ff jmp 801066a0 <alltraps> 80106d40 <vector4>: .globl vector4 vector4: pushl $0 80106d40: 6a 00 push $0x0 pushl $4 80106d42: 6a 04 push $0x4 jmp alltraps 80106d44: e9 57 f9 ff ff jmp 801066a0 <alltraps> 80106d49 <vector5>: .globl vector5 vector5: pushl $0 80106d49: 6a 00 push $0x0 pushl $5 80106d4b: 6a 05 push $0x5 jmp alltraps 80106d4d: e9 4e f9 ff ff jmp 801066a0 <alltraps> 80106d52 <vector6>: .globl vector6 vector6: pushl $0 80106d52: 6a 00 push $0x0 pushl $6 80106d54: 6a 06 push $0x6 jmp alltraps 80106d56: e9 45 f9 ff ff jmp 801066a0 <alltraps> 80106d5b <vector7>: .globl vector7 vector7: pushl $0 80106d5b: 6a 00 push $0x0 pushl $7 80106d5d: 6a 07 push $0x7 jmp alltraps 80106d5f: e9 3c f9 ff ff jmp 801066a0 <alltraps> 80106d64 <vector8>: .globl vector8 vector8: pushl $8 80106d64: 6a 08 push $0x8 jmp alltraps 80106d66: e9 35 f9 ff ff jmp 801066a0 <alltraps> 80106d6b <vector9>: .globl vector9 vector9: pushl $0 80106d6b: 6a 00 push $0x0 pushl $9 80106d6d: 6a 09 push $0x9 jmp alltraps 80106d6f: e9 2c f9 ff ff jmp 801066a0 <alltraps> 80106d74 <vector10>: .globl vector10 vector10: pushl $10 80106d74: 6a 0a push $0xa jmp alltraps 80106d76: e9 25 f9 ff ff jmp 801066a0 <alltraps> 80106d7b <vector11>: .globl vector11 vector11: pushl $11 80106d7b: 6a 0b push $0xb jmp alltraps 80106d7d: e9 1e f9 ff ff jmp 801066a0 <alltraps> 80106d82 <vector12>: .globl vector12 vector12: pushl $12 80106d82: 6a 0c push $0xc jmp alltraps 80106d84: e9 17 f9 ff ff jmp 801066a0 <alltraps> 80106d89 <vector13>: .globl vector13 vector13: pushl $13 80106d89: 6a 0d push $0xd jmp alltraps 80106d8b: e9 10 f9 ff ff jmp 801066a0 <alltraps> 80106d90 <vector14>: .globl vector14 vector14: pushl $14 80106d90: 6a 0e push $0xe jmp alltraps 80106d92: e9 09 f9 ff ff jmp 801066a0 <alltraps> 80106d97 <vector15>: .globl vector15 vector15: pushl $0 80106d97: 6a 00 push $0x0 pushl $15 80106d99: 6a 0f push $0xf jmp alltraps 80106d9b: e9 00 f9 ff ff jmp 801066a0 <alltraps> 80106da0 <vector16>: .globl vector16 vector16: pushl $0 80106da0: 6a 00 push $0x0 pushl $16 80106da2: 6a 10 push $0x10 jmp alltraps 80106da4: e9 f7 f8 ff ff jmp 801066a0 <alltraps> 80106da9 <vector17>: .globl vector17 vector17: pushl $17 80106da9: 6a 11 push $0x11 jmp alltraps 80106dab: e9 f0 f8 ff ff jmp 801066a0 <alltraps> 80106db0 <vector18>: .globl vector18 vector18: pushl $0 80106db0: 6a 00 push $0x0 pushl $18 80106db2: 6a 12 push $0x12 jmp alltraps 80106db4: e9 e7 f8 ff ff jmp 801066a0 <alltraps> 80106db9 <vector19>: .globl vector19 vector19: pushl $0 80106db9: 6a 00 push $0x0 pushl $19 80106dbb: 6a 13 push $0x13 jmp alltraps 80106dbd: e9 de f8 ff ff jmp 801066a0 <alltraps> 80106dc2 <vector20>: .globl vector20 vector20: pushl $0 80106dc2: 6a 00 push $0x0 pushl $20 80106dc4: 6a 14 push $0x14 jmp alltraps 80106dc6: e9 d5 f8 ff ff jmp 801066a0 <alltraps> 80106dcb <vector21>: .globl vector21 vector21: pushl $0 80106dcb: 6a 00 push $0x0 pushl $21 80106dcd: 6a 15 push $0x15 jmp alltraps 80106dcf: e9 cc f8 ff ff jmp 801066a0 <alltraps> 80106dd4 <vector22>: .globl vector22 vector22: pushl $0 80106dd4: 6a 00 push $0x0 pushl $22 80106dd6: 6a 16 push $0x16 jmp alltraps 80106dd8: e9 c3 f8 ff ff jmp 801066a0 <alltraps> 80106ddd <vector23>: .globl vector23 vector23: pushl $0 80106ddd: 6a 00 push $0x0 pushl $23 80106ddf: 6a 17 push $0x17 jmp alltraps 80106de1: e9 ba f8 ff ff jmp 801066a0 <alltraps> 80106de6 <vector24>: .globl vector24 vector24: pushl $0 80106de6: 6a 00 push $0x0 pushl $24 80106de8: 6a 18 push $0x18 jmp alltraps 80106dea: e9 b1 f8 ff ff jmp 801066a0 <alltraps> 80106def <vector25>: .globl vector25 vector25: pushl $0 80106def: 6a 00 push $0x0 pushl $25 80106df1: 6a 19 push $0x19 jmp alltraps 80106df3: e9 a8 f8 ff ff jmp 801066a0 <alltraps> 80106df8 <vector26>: .globl vector26 vector26: pushl $0 80106df8: 6a 00 push $0x0 pushl $26 80106dfa: 6a 1a push $0x1a jmp alltraps 80106dfc: e9 9f f8 ff ff jmp 801066a0 <alltraps> 80106e01 <vector27>: .globl vector27 vector27: pushl $0 80106e01: 6a 00 push $0x0 pushl $27 80106e03: 6a 1b push $0x1b jmp alltraps 80106e05: e9 96 f8 ff ff jmp 801066a0 <alltraps> 80106e0a <vector28>: .globl vector28 vector28: pushl $0 80106e0a: 6a 00 push $0x0 pushl $28 80106e0c: 6a 1c push $0x1c jmp alltraps 80106e0e: e9 8d f8 ff ff jmp 801066a0 <alltraps> 80106e13 <vector29>: .globl vector29 vector29: pushl $0 80106e13: 6a 00 push $0x0 pushl $29 80106e15: 6a 1d push $0x1d jmp alltraps 80106e17: e9 84 f8 ff ff jmp 801066a0 <alltraps> 80106e1c <vector30>: .globl vector30 vector30: pushl $0 80106e1c: 6a 00 push $0x0 pushl $30 80106e1e: 6a 1e push $0x1e jmp alltraps 80106e20: e9 7b f8 ff ff jmp 801066a0 <alltraps> 80106e25 <vector31>: .globl vector31 vector31: pushl $0 80106e25: 6a 00 push $0x0 pushl $31 80106e27: 6a 1f push $0x1f jmp alltraps 80106e29: e9 72 f8 ff ff jmp 801066a0 <alltraps> 80106e2e <vector32>: .globl vector32 vector32: pushl $0 80106e2e: 6a 00 push $0x0 pushl $32 80106e30: 6a 20 push $0x20 jmp alltraps 80106e32: e9 69 f8 ff ff jmp 801066a0 <alltraps> 80106e37 <vector33>: .globl vector33 vector33: pushl $0 80106e37: 6a 00 push $0x0 pushl $33 80106e39: 6a 21 push $0x21 jmp alltraps 80106e3b: e9 60 f8 ff ff jmp 801066a0 <alltraps> 80106e40 <vector34>: .globl vector34 vector34: pushl $0 80106e40: 6a 00 push $0x0 pushl $34 80106e42: 6a 22 push $0x22 jmp alltraps 80106e44: e9 57 f8 ff ff jmp 801066a0 <alltraps> 80106e49 <vector35>: .globl vector35 vector35: pushl $0 80106e49: 6a 00 push $0x0 pushl $35 80106e4b: 6a 23 push $0x23 jmp alltraps 80106e4d: e9 4e f8 ff ff jmp 801066a0 <alltraps> 80106e52 <vector36>: .globl vector36 vector36: pushl $0 80106e52: 6a 00 push $0x0 pushl $36 80106e54: 6a 24 push $0x24 jmp alltraps 80106e56: e9 45 f8 ff ff jmp 801066a0 <alltraps> 80106e5b <vector37>: .globl vector37 vector37: pushl $0 80106e5b: 6a 00 push $0x0 pushl $37 80106e5d: 6a 25 push $0x25 jmp alltraps 80106e5f: e9 3c f8 ff ff jmp 801066a0 <alltraps> 80106e64 <vector38>: .globl vector38 vector38: pushl $0 80106e64: 6a 00 push $0x0 pushl $38 80106e66: 6a 26 push $0x26 jmp alltraps 80106e68: e9 33 f8 ff ff jmp 801066a0 <alltraps> 80106e6d <vector39>: .globl vector39 vector39: pushl $0 80106e6d: 6a 00 push $0x0 pushl $39 80106e6f: 6a 27 push $0x27 jmp alltraps 80106e71: e9 2a f8 ff ff jmp 801066a0 <alltraps> 80106e76 <vector40>: .globl vector40 vector40: pushl $0 80106e76: 6a 00 push $0x0 pushl $40 80106e78: 6a 28 push $0x28 jmp alltraps 80106e7a: e9 21 f8 ff ff jmp 801066a0 <alltraps> 80106e7f <vector41>: .globl vector41 vector41: pushl $0 80106e7f: 6a 00 push $0x0 pushl $41 80106e81: 6a 29 push $0x29 jmp alltraps 80106e83: e9 18 f8 ff ff jmp 801066a0 <alltraps> 80106e88 <vector42>: .globl vector42 vector42: pushl $0 80106e88: 6a 00 push $0x0 pushl $42 80106e8a: 6a 2a push $0x2a jmp alltraps 80106e8c: e9 0f f8 ff ff jmp 801066a0 <alltraps> 80106e91 <vector43>: .globl vector43 vector43: pushl $0 80106e91: 6a 00 push $0x0 pushl $43 80106e93: 6a 2b push $0x2b jmp alltraps 80106e95: e9 06 f8 ff ff jmp 801066a0 <alltraps> 80106e9a <vector44>: .globl vector44 vector44: pushl $0 80106e9a: 6a 00 push $0x0 pushl $44 80106e9c: 6a 2c push $0x2c jmp alltraps 80106e9e: e9 fd f7 ff ff jmp 801066a0 <alltraps> 80106ea3 <vector45>: .globl vector45 vector45: pushl $0 80106ea3: 6a 00 push $0x0 pushl $45 80106ea5: 6a 2d push $0x2d jmp alltraps 80106ea7: e9 f4 f7 ff ff jmp 801066a0 <alltraps> 80106eac <vector46>: .globl vector46 vector46: pushl $0 80106eac: 6a 00 push $0x0 pushl $46 80106eae: 6a 2e push $0x2e jmp alltraps 80106eb0: e9 eb f7 ff ff jmp 801066a0 <alltraps> 80106eb5 <vector47>: .globl vector47 vector47: pushl $0 80106eb5: 6a 00 push $0x0 pushl $47 80106eb7: 6a 2f push $0x2f jmp alltraps 80106eb9: e9 e2 f7 ff ff jmp 801066a0 <alltraps> 80106ebe <vector48>: .globl vector48 vector48: pushl $0 80106ebe: 6a 00 push $0x0 pushl $48 80106ec0: 6a 30 push $0x30 jmp alltraps 80106ec2: e9 d9 f7 ff ff jmp 801066a0 <alltraps> 80106ec7 <vector49>: .globl vector49 vector49: pushl $0 80106ec7: 6a 00 push $0x0 pushl $49 80106ec9: 6a 31 push $0x31 jmp alltraps 80106ecb: e9 d0 f7 ff ff jmp 801066a0 <alltraps> 80106ed0 <vector50>: .globl vector50 vector50: pushl $0 80106ed0: 6a 00 push $0x0 pushl $50 80106ed2: 6a 32 push $0x32 jmp alltraps 80106ed4: e9 c7 f7 ff ff jmp 801066a0 <alltraps> 80106ed9 <vector51>: .globl vector51 vector51: pushl $0 80106ed9: 6a 00 push $0x0 pushl $51 80106edb: 6a 33 push $0x33 jmp alltraps 80106edd: e9 be f7 ff ff jmp 801066a0 <alltraps> 80106ee2 <vector52>: .globl vector52 vector52: pushl $0 80106ee2: 6a 00 push $0x0 pushl $52 80106ee4: 6a 34 push $0x34 jmp alltraps 80106ee6: e9 b5 f7 ff ff jmp 801066a0 <alltraps> 80106eeb <vector53>: .globl vector53 vector53: pushl $0 80106eeb: 6a 00 push $0x0 pushl $53 80106eed: 6a 35 push $0x35 jmp alltraps 80106eef: e9 ac f7 ff ff jmp 801066a0 <alltraps> 80106ef4 <vector54>: .globl vector54 vector54: pushl $0 80106ef4: 6a 00 push $0x0 pushl $54 80106ef6: 6a 36 push $0x36 jmp alltraps 80106ef8: e9 a3 f7 ff ff jmp 801066a0 <alltraps> 80106efd <vector55>: .globl vector55 vector55: pushl $0 80106efd: 6a 00 push $0x0 pushl $55 80106eff: 6a 37 push $0x37 jmp alltraps 80106f01: e9 9a f7 ff ff jmp 801066a0 <alltraps> 80106f06 <vector56>: .globl vector56 vector56: pushl $0 80106f06: 6a 00 push $0x0 pushl $56 80106f08: 6a 38 push $0x38 jmp alltraps 80106f0a: e9 91 f7 ff ff jmp 801066a0 <alltraps> 80106f0f <vector57>: .globl vector57 vector57: pushl $0 80106f0f: 6a 00 push $0x0 pushl $57 80106f11: 6a 39 push $0x39 jmp alltraps 80106f13: e9 88 f7 ff ff jmp 801066a0 <alltraps> 80106f18 <vector58>: .globl vector58 vector58: pushl $0 80106f18: 6a 00 push $0x0 pushl $58 80106f1a: 6a 3a push $0x3a jmp alltraps 80106f1c: e9 7f f7 ff ff jmp 801066a0 <alltraps> 80106f21 <vector59>: .globl vector59 vector59: pushl $0 80106f21: 6a 00 push $0x0 pushl $59 80106f23: 6a 3b push $0x3b jmp alltraps 80106f25: e9 76 f7 ff ff jmp 801066a0 <alltraps> 80106f2a <vector60>: .globl vector60 vector60: pushl $0 80106f2a: 6a 00 push $0x0 pushl $60 80106f2c: 6a 3c push $0x3c jmp alltraps 80106f2e: e9 6d f7 ff ff jmp 801066a0 <alltraps> 80106f33 <vector61>: .globl vector61 vector61: pushl $0 80106f33: 6a 00 push $0x0 pushl $61 80106f35: 6a 3d push $0x3d jmp alltraps 80106f37: e9 64 f7 ff ff jmp 801066a0 <alltraps> 80106f3c <vector62>: .globl vector62 vector62: pushl $0 80106f3c: 6a 00 push $0x0 pushl $62 80106f3e: 6a 3e push $0x3e jmp alltraps 80106f40: e9 5b f7 ff ff jmp 801066a0 <alltraps> 80106f45 <vector63>: .globl vector63 vector63: pushl $0 80106f45: 6a 00 push $0x0 pushl $63 80106f47: 6a 3f push $0x3f jmp alltraps 80106f49: e9 52 f7 ff ff jmp 801066a0 <alltraps> 80106f4e <vector64>: .globl vector64 vector64: pushl $0 80106f4e: 6a 00 push $0x0 pushl $64 80106f50: 6a 40 push $0x40 jmp alltraps 80106f52: e9 49 f7 ff ff jmp 801066a0 <alltraps> 80106f57 <vector65>: .globl vector65 vector65: pushl $0 80106f57: 6a 00 push $0x0 pushl $65 80106f59: 6a 41 push $0x41 jmp alltraps 80106f5b: e9 40 f7 ff ff jmp 801066a0 <alltraps> 80106f60 <vector66>: .globl vector66 vector66: pushl $0 80106f60: 6a 00 push $0x0 pushl $66 80106f62: 6a 42 push $0x42 jmp alltraps 80106f64: e9 37 f7 ff ff jmp 801066a0 <alltraps> 80106f69 <vector67>: .globl vector67 vector67: pushl $0 80106f69: 6a 00 push $0x0 pushl $67 80106f6b: 6a 43 push $0x43 jmp alltraps 80106f6d: e9 2e f7 ff ff jmp 801066a0 <alltraps> 80106f72 <vector68>: .globl vector68 vector68: pushl $0 80106f72: 6a 00 push $0x0 pushl $68 80106f74: 6a 44 push $0x44 jmp alltraps 80106f76: e9 25 f7 ff ff jmp 801066a0 <alltraps> 80106f7b <vector69>: .globl vector69 vector69: pushl $0 80106f7b: 6a 00 push $0x0 pushl $69 80106f7d: 6a 45 push $0x45 jmp alltraps 80106f7f: e9 1c f7 ff ff jmp 801066a0 <alltraps> 80106f84 <vector70>: .globl vector70 vector70: pushl $0 80106f84: 6a 00 push $0x0 pushl $70 80106f86: 6a 46 push $0x46 jmp alltraps 80106f88: e9 13 f7 ff ff jmp 801066a0 <alltraps> 80106f8d <vector71>: .globl vector71 vector71: pushl $0 80106f8d: 6a 00 push $0x0 pushl $71 80106f8f: 6a 47 push $0x47 jmp alltraps 80106f91: e9 0a f7 ff ff jmp 801066a0 <alltraps> 80106f96 <vector72>: .globl vector72 vector72: pushl $0 80106f96: 6a 00 push $0x0 pushl $72 80106f98: 6a 48 push $0x48 jmp alltraps 80106f9a: e9 01 f7 ff ff jmp 801066a0 <alltraps> 80106f9f <vector73>: .globl vector73 vector73: pushl $0 80106f9f: 6a 00 push $0x0 pushl $73 80106fa1: 6a 49 push $0x49 jmp alltraps 80106fa3: e9 f8 f6 ff ff jmp 801066a0 <alltraps> 80106fa8 <vector74>: .globl vector74 vector74: pushl $0 80106fa8: 6a 00 push $0x0 pushl $74 80106faa: 6a 4a push $0x4a jmp alltraps 80106fac: e9 ef f6 ff ff jmp 801066a0 <alltraps> 80106fb1 <vector75>: .globl vector75 vector75: pushl $0 80106fb1: 6a 00 push $0x0 pushl $75 80106fb3: 6a 4b push $0x4b jmp alltraps 80106fb5: e9 e6 f6 ff ff jmp 801066a0 <alltraps> 80106fba <vector76>: .globl vector76 vector76: pushl $0 80106fba: 6a 00 push $0x0 pushl $76 80106fbc: 6a 4c push $0x4c jmp alltraps 80106fbe: e9 dd f6 ff ff jmp 801066a0 <alltraps> 80106fc3 <vector77>: .globl vector77 vector77: pushl $0 80106fc3: 6a 00 push $0x0 pushl $77 80106fc5: 6a 4d push $0x4d jmp alltraps 80106fc7: e9 d4 f6 ff ff jmp 801066a0 <alltraps> 80106fcc <vector78>: .globl vector78 vector78: pushl $0 80106fcc: 6a 00 push $0x0 pushl $78 80106fce: 6a 4e push $0x4e jmp alltraps 80106fd0: e9 cb f6 ff ff jmp 801066a0 <alltraps> 80106fd5 <vector79>: .globl vector79 vector79: pushl $0 80106fd5: 6a 00 push $0x0 pushl $79 80106fd7: 6a 4f push $0x4f jmp alltraps 80106fd9: e9 c2 f6 ff ff jmp 801066a0 <alltraps> 80106fde <vector80>: .globl vector80 vector80: pushl $0 80106fde: 6a 00 push $0x0 pushl $80 80106fe0: 6a 50 push $0x50 jmp alltraps 80106fe2: e9 b9 f6 ff ff jmp 801066a0 <alltraps> 80106fe7 <vector81>: .globl vector81 vector81: pushl $0 80106fe7: 6a 00 push $0x0 pushl $81 80106fe9: 6a 51 push $0x51 jmp alltraps 80106feb: e9 b0 f6 ff ff jmp 801066a0 <alltraps> 80106ff0 <vector82>: .globl vector82 vector82: pushl $0 80106ff0: 6a 00 push $0x0 pushl $82 80106ff2: 6a 52 push $0x52 jmp alltraps 80106ff4: e9 a7 f6 ff ff jmp 801066a0 <alltraps> 80106ff9 <vector83>: .globl vector83 vector83: pushl $0 80106ff9: 6a 00 push $0x0 pushl $83 80106ffb: 6a 53 push $0x53 jmp alltraps 80106ffd: e9 9e f6 ff ff jmp 801066a0 <alltraps> 80107002 <vector84>: .globl vector84 vector84: pushl $0 80107002: 6a 00 push $0x0 pushl $84 80107004: 6a 54 push $0x54 jmp alltraps 80107006: e9 95 f6 ff ff jmp 801066a0 <alltraps> 8010700b <vector85>: .globl vector85 vector85: pushl $0 8010700b: 6a 00 push $0x0 pushl $85 8010700d: 6a 55 push $0x55 jmp alltraps 8010700f: e9 8c f6 ff ff jmp 801066a0 <alltraps> 80107014 <vector86>: .globl vector86 vector86: pushl $0 80107014: 6a 00 push $0x0 pushl $86 80107016: 6a 56 push $0x56 jmp alltraps 80107018: e9 83 f6 ff ff jmp 801066a0 <alltraps> 8010701d <vector87>: .globl vector87 vector87: pushl $0 8010701d: 6a 00 push $0x0 pushl $87 8010701f: 6a 57 push $0x57 jmp alltraps 80107021: e9 7a f6 ff ff jmp 801066a0 <alltraps> 80107026 <vector88>: .globl vector88 vector88: pushl $0 80107026: 6a 00 push $0x0 pushl $88 80107028: 6a 58 push $0x58 jmp alltraps 8010702a: e9 71 f6 ff ff jmp 801066a0 <alltraps> 8010702f <vector89>: .globl vector89 vector89: pushl $0 8010702f: 6a 00 push $0x0 pushl $89 80107031: 6a 59 push $0x59 jmp alltraps 80107033: e9 68 f6 ff ff jmp 801066a0 <alltraps> 80107038 <vector90>: .globl vector90 vector90: pushl $0 80107038: 6a 00 push $0x0 pushl $90 8010703a: 6a 5a push $0x5a jmp alltraps 8010703c: e9 5f f6 ff ff jmp 801066a0 <alltraps> 80107041 <vector91>: .globl vector91 vector91: pushl $0 80107041: 6a 00 push $0x0 pushl $91 80107043: 6a 5b push $0x5b jmp alltraps 80107045: e9 56 f6 ff ff jmp 801066a0 <alltraps> 8010704a <vector92>: .globl vector92 vector92: pushl $0 8010704a: 6a 00 push $0x0 pushl $92 8010704c: 6a 5c push $0x5c jmp alltraps 8010704e: e9 4d f6 ff ff jmp 801066a0 <alltraps> 80107053 <vector93>: .globl vector93 vector93: pushl $0 80107053: 6a 00 push $0x0 pushl $93 80107055: 6a 5d push $0x5d jmp alltraps 80107057: e9 44 f6 ff ff jmp 801066a0 <alltraps> 8010705c <vector94>: .globl vector94 vector94: pushl $0 8010705c: 6a 00 push $0x0 pushl $94 8010705e: 6a 5e push $0x5e jmp alltraps 80107060: e9 3b f6 ff ff jmp 801066a0 <alltraps> 80107065 <vector95>: .globl vector95 vector95: pushl $0 80107065: 6a 00 push $0x0 pushl $95 80107067: 6a 5f push $0x5f jmp alltraps 80107069: e9 32 f6 ff ff jmp 801066a0 <alltraps> 8010706e <vector96>: .globl vector96 vector96: pushl $0 8010706e: 6a 00 push $0x0 pushl $96 80107070: 6a 60 push $0x60 jmp alltraps 80107072: e9 29 f6 ff ff jmp 801066a0 <alltraps> 80107077 <vector97>: .globl vector97 vector97: pushl $0 80107077: 6a 00 push $0x0 pushl $97 80107079: 6a 61 push $0x61 jmp alltraps 8010707b: e9 20 f6 ff ff jmp 801066a0 <alltraps> 80107080 <vector98>: .globl vector98 vector98: pushl $0 80107080: 6a 00 push $0x0 pushl $98 80107082: 6a 62 push $0x62 jmp alltraps 80107084: e9 17 f6 ff ff jmp 801066a0 <alltraps> 80107089 <vector99>: .globl vector99 vector99: pushl $0 80107089: 6a 00 push $0x0 pushl $99 8010708b: 6a 63 push $0x63 jmp alltraps 8010708d: e9 0e f6 ff ff jmp 801066a0 <alltraps> 80107092 <vector100>: .globl vector100 vector100: pushl $0 80107092: 6a 00 push $0x0 pushl $100 80107094: 6a 64 push $0x64 jmp alltraps 80107096: e9 05 f6 ff ff jmp 801066a0 <alltraps> 8010709b <vector101>: .globl vector101 vector101: pushl $0 8010709b: 6a 00 push $0x0 pushl $101 8010709d: 6a 65 push $0x65 jmp alltraps 8010709f: e9 fc f5 ff ff jmp 801066a0 <alltraps> 801070a4 <vector102>: .globl vector102 vector102: pushl $0 801070a4: 6a 00 push $0x0 pushl $102 801070a6: 6a 66 push $0x66 jmp alltraps 801070a8: e9 f3 f5 ff ff jmp 801066a0 <alltraps> 801070ad <vector103>: .globl vector103 vector103: pushl $0 801070ad: 6a 00 push $0x0 pushl $103 801070af: 6a 67 push $0x67 jmp alltraps 801070b1: e9 ea f5 ff ff jmp 801066a0 <alltraps> 801070b6 <vector104>: .globl vector104 vector104: pushl $0 801070b6: 6a 00 push $0x0 pushl $104 801070b8: 6a 68 push $0x68 jmp alltraps 801070ba: e9 e1 f5 ff ff jmp 801066a0 <alltraps> 801070bf <vector105>: .globl vector105 vector105: pushl $0 801070bf: 6a 00 push $0x0 pushl $105 801070c1: 6a 69 push $0x69 jmp alltraps 801070c3: e9 d8 f5 ff ff jmp 801066a0 <alltraps> 801070c8 <vector106>: .globl vector106 vector106: pushl $0 801070c8: 6a 00 push $0x0 pushl $106 801070ca: 6a 6a push $0x6a jmp alltraps 801070cc: e9 cf f5 ff ff jmp 801066a0 <alltraps> 801070d1 <vector107>: .globl vector107 vector107: pushl $0 801070d1: 6a 00 push $0x0 pushl $107 801070d3: 6a 6b push $0x6b jmp alltraps 801070d5: e9 c6 f5 ff ff jmp 801066a0 <alltraps> 801070da <vector108>: .globl vector108 vector108: pushl $0 801070da: 6a 00 push $0x0 pushl $108 801070dc: 6a 6c push $0x6c jmp alltraps 801070de: e9 bd f5 ff ff jmp 801066a0 <alltraps> 801070e3 <vector109>: .globl vector109 vector109: pushl $0 801070e3: 6a 00 push $0x0 pushl $109 801070e5: 6a 6d push $0x6d jmp alltraps 801070e7: e9 b4 f5 ff ff jmp 801066a0 <alltraps> 801070ec <vector110>: .globl vector110 vector110: pushl $0 801070ec: 6a 00 push $0x0 pushl $110 801070ee: 6a 6e push $0x6e jmp alltraps 801070f0: e9 ab f5 ff ff jmp 801066a0 <alltraps> 801070f5 <vector111>: .globl vector111 vector111: pushl $0 801070f5: 6a 00 push $0x0 pushl $111 801070f7: 6a 6f push $0x6f jmp alltraps 801070f9: e9 a2 f5 ff ff jmp 801066a0 <alltraps> 801070fe <vector112>: .globl vector112 vector112: pushl $0 801070fe: 6a 00 push $0x0 pushl $112 80107100: 6a 70 push $0x70 jmp alltraps 80107102: e9 99 f5 ff ff jmp 801066a0 <alltraps> 80107107 <vector113>: .globl vector113 vector113: pushl $0 80107107: 6a 00 push $0x0 pushl $113 80107109: 6a 71 push $0x71 jmp alltraps 8010710b: e9 90 f5 ff ff jmp 801066a0 <alltraps> 80107110 <vector114>: .globl vector114 vector114: pushl $0 80107110: 6a 00 push $0x0 pushl $114 80107112: 6a 72 push $0x72 jmp alltraps 80107114: e9 87 f5 ff ff jmp 801066a0 <alltraps> 80107119 <vector115>: .globl vector115 vector115: pushl $0 80107119: 6a 00 push $0x0 pushl $115 8010711b: 6a 73 push $0x73 jmp alltraps 8010711d: e9 7e f5 ff ff jmp 801066a0 <alltraps> 80107122 <vector116>: .globl vector116 vector116: pushl $0 80107122: 6a 00 push $0x0 pushl $116 80107124: 6a 74 push $0x74 jmp alltraps 80107126: e9 75 f5 ff ff jmp 801066a0 <alltraps> 8010712b <vector117>: .globl vector117 vector117: pushl $0 8010712b: 6a 00 push $0x0 pushl $117 8010712d: 6a 75 push $0x75 jmp alltraps 8010712f: e9 6c f5 ff ff jmp 801066a0 <alltraps> 80107134 <vector118>: .globl vector118 vector118: pushl $0 80107134: 6a 00 push $0x0 pushl $118 80107136: 6a 76 push $0x76 jmp alltraps 80107138: e9 63 f5 ff ff jmp 801066a0 <alltraps> 8010713d <vector119>: .globl vector119 vector119: pushl $0 8010713d: 6a 00 push $0x0 pushl $119 8010713f: 6a 77 push $0x77 jmp alltraps 80107141: e9 5a f5 ff ff jmp 801066a0 <alltraps> 80107146 <vector120>: .globl vector120 vector120: pushl $0 80107146: 6a 00 push $0x0 pushl $120 80107148: 6a 78 push $0x78 jmp alltraps 8010714a: e9 51 f5 ff ff jmp 801066a0 <alltraps> 8010714f <vector121>: .globl vector121 vector121: pushl $0 8010714f: 6a 00 push $0x0 pushl $121 80107151: 6a 79 push $0x79 jmp alltraps 80107153: e9 48 f5 ff ff jmp 801066a0 <alltraps> 80107158 <vector122>: .globl vector122 vector122: pushl $0 80107158: 6a 00 push $0x0 pushl $122 8010715a: 6a 7a push $0x7a jmp alltraps 8010715c: e9 3f f5 ff ff jmp 801066a0 <alltraps> 80107161 <vector123>: .globl vector123 vector123: pushl $0 80107161: 6a 00 push $0x0 pushl $123 80107163: 6a 7b push $0x7b jmp alltraps 80107165: e9 36 f5 ff ff jmp 801066a0 <alltraps> 8010716a <vector124>: .globl vector124 vector124: pushl $0 8010716a: 6a 00 push $0x0 pushl $124 8010716c: 6a 7c push $0x7c jmp alltraps 8010716e: e9 2d f5 ff ff jmp 801066a0 <alltraps> 80107173 <vector125>: .globl vector125 vector125: pushl $0 80107173: 6a 00 push $0x0 pushl $125 80107175: 6a 7d push $0x7d jmp alltraps 80107177: e9 24 f5 ff ff jmp 801066a0 <alltraps> 8010717c <vector126>: .globl vector126 vector126: pushl $0 8010717c: 6a 00 push $0x0 pushl $126 8010717e: 6a 7e push $0x7e jmp alltraps 80107180: e9 1b f5 ff ff jmp 801066a0 <alltraps> 80107185 <vector127>: .globl vector127 vector127: pushl $0 80107185: 6a 00 push $0x0 pushl $127 80107187: 6a 7f push $0x7f jmp alltraps 80107189: e9 12 f5 ff ff jmp 801066a0 <alltraps> 8010718e <vector128>: .globl vector128 vector128: pushl $0 8010718e: 6a 00 push $0x0 pushl $128 80107190: 68 80 00 00 00 push $0x80 jmp alltraps 80107195: e9 06 f5 ff ff jmp 801066a0 <alltraps> 8010719a <vector129>: .globl vector129 vector129: pushl $0 8010719a: 6a 00 push $0x0 pushl $129 8010719c: 68 81 00 00 00 push $0x81 jmp alltraps 801071a1: e9 fa f4 ff ff jmp 801066a0 <alltraps> 801071a6 <vector130>: .globl vector130 vector130: pushl $0 801071a6: 6a 00 push $0x0 pushl $130 801071a8: 68 82 00 00 00 push $0x82 jmp alltraps 801071ad: e9 ee f4 ff ff jmp 801066a0 <alltraps> 801071b2 <vector131>: .globl vector131 vector131: pushl $0 801071b2: 6a 00 push $0x0 pushl $131 801071b4: 68 83 00 00 00 push $0x83 jmp alltraps 801071b9: e9 e2 f4 ff ff jmp 801066a0 <alltraps> 801071be <vector132>: .globl vector132 vector132: pushl $0 801071be: 6a 00 push $0x0 pushl $132 801071c0: 68 84 00 00 00 push $0x84 jmp alltraps 801071c5: e9 d6 f4 ff ff jmp 801066a0 <alltraps> 801071ca <vector133>: .globl vector133 vector133: pushl $0 801071ca: 6a 00 push $0x0 pushl $133 801071cc: 68 85 00 00 00 push $0x85 jmp alltraps 801071d1: e9 ca f4 ff ff jmp 801066a0 <alltraps> 801071d6 <vector134>: .globl vector134 vector134: pushl $0 801071d6: 6a 00 push $0x0 pushl $134 801071d8: 68 86 00 00 00 push $0x86 jmp alltraps 801071dd: e9 be f4 ff ff jmp 801066a0 <alltraps> 801071e2 <vector135>: .globl vector135 vector135: pushl $0 801071e2: 6a 00 push $0x0 pushl $135 801071e4: 68 87 00 00 00 push $0x87 jmp alltraps 801071e9: e9 b2 f4 ff ff jmp 801066a0 <alltraps> 801071ee <vector136>: .globl vector136 vector136: pushl $0 801071ee: 6a 00 push $0x0 pushl $136 801071f0: 68 88 00 00 00 push $0x88 jmp alltraps 801071f5: e9 a6 f4 ff ff jmp 801066a0 <alltraps> 801071fa <vector137>: .globl vector137 vector137: pushl $0 801071fa: 6a 00 push $0x0 pushl $137 801071fc: 68 89 00 00 00 push $0x89 jmp alltraps 80107201: e9 9a f4 ff ff jmp 801066a0 <alltraps> 80107206 <vector138>: .globl vector138 vector138: pushl $0 80107206: 6a 00 push $0x0 pushl $138 80107208: 68 8a 00 00 00 push $0x8a jmp alltraps 8010720d: e9 8e f4 ff ff jmp 801066a0 <alltraps> 80107212 <vector139>: .globl vector139 vector139: pushl $0 80107212: 6a 00 push $0x0 pushl $139 80107214: 68 8b 00 00 00 push $0x8b jmp alltraps 80107219: e9 82 f4 ff ff jmp 801066a0 <alltraps> 8010721e <vector140>: .globl vector140 vector140: pushl $0 8010721e: 6a 00 push $0x0 pushl $140 80107220: 68 8c 00 00 00 push $0x8c jmp alltraps 80107225: e9 76 f4 ff ff jmp 801066a0 <alltraps> 8010722a <vector141>: .globl vector141 vector141: pushl $0 8010722a: 6a 00 push $0x0 pushl $141 8010722c: 68 8d 00 00 00 push $0x8d jmp alltraps 80107231: e9 6a f4 ff ff jmp 801066a0 <alltraps> 80107236 <vector142>: .globl vector142 vector142: pushl $0 80107236: 6a 00 push $0x0 pushl $142 80107238: 68 8e 00 00 00 push $0x8e jmp alltraps 8010723d: e9 5e f4 ff ff jmp 801066a0 <alltraps> 80107242 <vector143>: .globl vector143 vector143: pushl $0 80107242: 6a 00 push $0x0 pushl $143 80107244: 68 8f 00 00 00 push $0x8f jmp alltraps 80107249: e9 52 f4 ff ff jmp 801066a0 <alltraps> 8010724e <vector144>: .globl vector144 vector144: pushl $0 8010724e: 6a 00 push $0x0 pushl $144 80107250: 68 90 00 00 00 push $0x90 jmp alltraps 80107255: e9 46 f4 ff ff jmp 801066a0 <alltraps> 8010725a <vector145>: .globl vector145 vector145: pushl $0 8010725a: 6a 00 push $0x0 pushl $145 8010725c: 68 91 00 00 00 push $0x91 jmp alltraps 80107261: e9 3a f4 ff ff jmp 801066a0 <alltraps> 80107266 <vector146>: .globl vector146 vector146: pushl $0 80107266: 6a 00 push $0x0 pushl $146 80107268: 68 92 00 00 00 push $0x92 jmp alltraps 8010726d: e9 2e f4 ff ff jmp 801066a0 <alltraps> 80107272 <vector147>: .globl vector147 vector147: pushl $0 80107272: 6a 00 push $0x0 pushl $147 80107274: 68 93 00 00 00 push $0x93 jmp alltraps 80107279: e9 22 f4 ff ff jmp 801066a0 <alltraps> 8010727e <vector148>: .globl vector148 vector148: pushl $0 8010727e: 6a 00 push $0x0 pushl $148 80107280: 68 94 00 00 00 push $0x94 jmp alltraps 80107285: e9 16 f4 ff ff jmp 801066a0 <alltraps> 8010728a <vector149>: .globl vector149 vector149: pushl $0 8010728a: 6a 00 push $0x0 pushl $149 8010728c: 68 95 00 00 00 push $0x95 jmp alltraps 80107291: e9 0a f4 ff ff jmp 801066a0 <alltraps> 80107296 <vector150>: .globl vector150 vector150: pushl $0 80107296: 6a 00 push $0x0 pushl $150 80107298: 68 96 00 00 00 push $0x96 jmp alltraps 8010729d: e9 fe f3 ff ff jmp 801066a0 <alltraps> 801072a2 <vector151>: .globl vector151 vector151: pushl $0 801072a2: 6a 00 push $0x0 pushl $151 801072a4: 68 97 00 00 00 push $0x97 jmp alltraps 801072a9: e9 f2 f3 ff ff jmp 801066a0 <alltraps> 801072ae <vector152>: .globl vector152 vector152: pushl $0 801072ae: 6a 00 push $0x0 pushl $152 801072b0: 68 98 00 00 00 push $0x98 jmp alltraps 801072b5: e9 e6 f3 ff ff jmp 801066a0 <alltraps> 801072ba <vector153>: .globl vector153 vector153: pushl $0 801072ba: 6a 00 push $0x0 pushl $153 801072bc: 68 99 00 00 00 push $0x99 jmp alltraps 801072c1: e9 da f3 ff ff jmp 801066a0 <alltraps> 801072c6 <vector154>: .globl vector154 vector154: pushl $0 801072c6: 6a 00 push $0x0 pushl $154 801072c8: 68 9a 00 00 00 push $0x9a jmp alltraps 801072cd: e9 ce f3 ff ff jmp 801066a0 <alltraps> 801072d2 <vector155>: .globl vector155 vector155: pushl $0 801072d2: 6a 00 push $0x0 pushl $155 801072d4: 68 9b 00 00 00 push $0x9b jmp alltraps 801072d9: e9 c2 f3 ff ff jmp 801066a0 <alltraps> 801072de <vector156>: .globl vector156 vector156: pushl $0 801072de: 6a 00 push $0x0 pushl $156 801072e0: 68 9c 00 00 00 push $0x9c jmp alltraps 801072e5: e9 b6 f3 ff ff jmp 801066a0 <alltraps> 801072ea <vector157>: .globl vector157 vector157: pushl $0 801072ea: 6a 00 push $0x0 pushl $157 801072ec: 68 9d 00 00 00 push $0x9d jmp alltraps 801072f1: e9 aa f3 ff ff jmp 801066a0 <alltraps> 801072f6 <vector158>: .globl vector158 vector158: pushl $0 801072f6: 6a 00 push $0x0 pushl $158 801072f8: 68 9e 00 00 00 push $0x9e jmp alltraps 801072fd: e9 9e f3 ff ff jmp 801066a0 <alltraps> 80107302 <vector159>: .globl vector159 vector159: pushl $0 80107302: 6a 00 push $0x0 pushl $159 80107304: 68 9f 00 00 00 push $0x9f jmp alltraps 80107309: e9 92 f3 ff ff jmp 801066a0 <alltraps> 8010730e <vector160>: .globl vector160 vector160: pushl $0 8010730e: 6a 00 push $0x0 pushl $160 80107310: 68 a0 00 00 00 push $0xa0 jmp alltraps 80107315: e9 86 f3 ff ff jmp 801066a0 <alltraps> 8010731a <vector161>: .globl vector161 vector161: pushl $0 8010731a: 6a 00 push $0x0 pushl $161 8010731c: 68 a1 00 00 00 push $0xa1 jmp alltraps 80107321: e9 7a f3 ff ff jmp 801066a0 <alltraps> 80107326 <vector162>: .globl vector162 vector162: pushl $0 80107326: 6a 00 push $0x0 pushl $162 80107328: 68 a2 00 00 00 push $0xa2 jmp alltraps 8010732d: e9 6e f3 ff ff jmp 801066a0 <alltraps> 80107332 <vector163>: .globl vector163 vector163: pushl $0 80107332: 6a 00 push $0x0 pushl $163 80107334: 68 a3 00 00 00 push $0xa3 jmp alltraps 80107339: e9 62 f3 ff ff jmp 801066a0 <alltraps> 8010733e <vector164>: .globl vector164 vector164: pushl $0 8010733e: 6a 00 push $0x0 pushl $164 80107340: 68 a4 00 00 00 push $0xa4 jmp alltraps 80107345: e9 56 f3 ff ff jmp 801066a0 <alltraps> 8010734a <vector165>: .globl vector165 vector165: pushl $0 8010734a: 6a 00 push $0x0 pushl $165 8010734c: 68 a5 00 00 00 push $0xa5 jmp alltraps 80107351: e9 4a f3 ff ff jmp 801066a0 <alltraps> 80107356 <vector166>: .globl vector166 vector166: pushl $0 80107356: 6a 00 push $0x0 pushl $166 80107358: 68 a6 00 00 00 push $0xa6 jmp alltraps 8010735d: e9 3e f3 ff ff jmp 801066a0 <alltraps> 80107362 <vector167>: .globl vector167 vector167: pushl $0 80107362: 6a 00 push $0x0 pushl $167 80107364: 68 a7 00 00 00 push $0xa7 jmp alltraps 80107369: e9 32 f3 ff ff jmp 801066a0 <alltraps> 8010736e <vector168>: .globl vector168 vector168: pushl $0 8010736e: 6a 00 push $0x0 pushl $168 80107370: 68 a8 00 00 00 push $0xa8 jmp alltraps 80107375: e9 26 f3 ff ff jmp 801066a0 <alltraps> 8010737a <vector169>: .globl vector169 vector169: pushl $0 8010737a: 6a 00 push $0x0 pushl $169 8010737c: 68 a9 00 00 00 push $0xa9 jmp alltraps 80107381: e9 1a f3 ff ff jmp 801066a0 <alltraps> 80107386 <vector170>: .globl vector170 vector170: pushl $0 80107386: 6a 00 push $0x0 pushl $170 80107388: 68 aa 00 00 00 push $0xaa jmp alltraps 8010738d: e9 0e f3 ff ff jmp 801066a0 <alltraps> 80107392 <vector171>: .globl vector171 vector171: pushl $0 80107392: 6a 00 push $0x0 pushl $171 80107394: 68 ab 00 00 00 push $0xab jmp alltraps 80107399: e9 02 f3 ff ff jmp 801066a0 <alltraps> 8010739e <vector172>: .globl vector172 vector172: pushl $0 8010739e: 6a 00 push $0x0 pushl $172 801073a0: 68 ac 00 00 00 push $0xac jmp alltraps 801073a5: e9 f6 f2 ff ff jmp 801066a0 <alltraps> 801073aa <vector173>: .globl vector173 vector173: pushl $0 801073aa: 6a 00 push $0x0 pushl $173 801073ac: 68 ad 00 00 00 push $0xad jmp alltraps 801073b1: e9 ea f2 ff ff jmp 801066a0 <alltraps> 801073b6 <vector174>: .globl vector174 vector174: pushl $0 801073b6: 6a 00 push $0x0 pushl $174 801073b8: 68 ae 00 00 00 push $0xae jmp alltraps 801073bd: e9 de f2 ff ff jmp 801066a0 <alltraps> 801073c2 <vector175>: .globl vector175 vector175: pushl $0 801073c2: 6a 00 push $0x0 pushl $175 801073c4: 68 af 00 00 00 push $0xaf jmp alltraps 801073c9: e9 d2 f2 ff ff jmp 801066a0 <alltraps> 801073ce <vector176>: .globl vector176 vector176: pushl $0 801073ce: 6a 00 push $0x0 pushl $176 801073d0: 68 b0 00 00 00 push $0xb0 jmp alltraps 801073d5: e9 c6 f2 ff ff jmp 801066a0 <alltraps> 801073da <vector177>: .globl vector177 vector177: pushl $0 801073da: 6a 00 push $0x0 pushl $177 801073dc: 68 b1 00 00 00 push $0xb1 jmp alltraps 801073e1: e9 ba f2 ff ff jmp 801066a0 <alltraps> 801073e6 <vector178>: .globl vector178 vector178: pushl $0 801073e6: 6a 00 push $0x0 pushl $178 801073e8: 68 b2 00 00 00 push $0xb2 jmp alltraps 801073ed: e9 ae f2 ff ff jmp 801066a0 <alltraps> 801073f2 <vector179>: .globl vector179 vector179: pushl $0 801073f2: 6a 00 push $0x0 pushl $179 801073f4: 68 b3 00 00 00 push $0xb3 jmp alltraps 801073f9: e9 a2 f2 ff ff jmp 801066a0 <alltraps> 801073fe <vector180>: .globl vector180 vector180: pushl $0 801073fe: 6a 00 push $0x0 pushl $180 80107400: 68 b4 00 00 00 push $0xb4 jmp alltraps 80107405: e9 96 f2 ff ff jmp 801066a0 <alltraps> 8010740a <vector181>: .globl vector181 vector181: pushl $0 8010740a: 6a 00 push $0x0 pushl $181 8010740c: 68 b5 00 00 00 push $0xb5 jmp alltraps 80107411: e9 8a f2 ff ff jmp 801066a0 <alltraps> 80107416 <vector182>: .globl vector182 vector182: pushl $0 80107416: 6a 00 push $0x0 pushl $182 80107418: 68 b6 00 00 00 push $0xb6 jmp alltraps 8010741d: e9 7e f2 ff ff jmp 801066a0 <alltraps> 80107422 <vector183>: .globl vector183 vector183: pushl $0 80107422: 6a 00 push $0x0 pushl $183 80107424: 68 b7 00 00 00 push $0xb7 jmp alltraps 80107429: e9 72 f2 ff ff jmp 801066a0 <alltraps> 8010742e <vector184>: .globl vector184 vector184: pushl $0 8010742e: 6a 00 push $0x0 pushl $184 80107430: 68 b8 00 00 00 push $0xb8 jmp alltraps 80107435: e9 66 f2 ff ff jmp 801066a0 <alltraps> 8010743a <vector185>: .globl vector185 vector185: pushl $0 8010743a: 6a 00 push $0x0 pushl $185 8010743c: 68 b9 00 00 00 push $0xb9 jmp alltraps 80107441: e9 5a f2 ff ff jmp 801066a0 <alltraps> 80107446 <vector186>: .globl vector186 vector186: pushl $0 80107446: 6a 00 push $0x0 pushl $186 80107448: 68 ba 00 00 00 push $0xba jmp alltraps 8010744d: e9 4e f2 ff ff jmp 801066a0 <alltraps> 80107452 <vector187>: .globl vector187 vector187: pushl $0 80107452: 6a 00 push $0x0 pushl $187 80107454: 68 bb 00 00 00 push $0xbb jmp alltraps 80107459: e9 42 f2 ff ff jmp 801066a0 <alltraps> 8010745e <vector188>: .globl vector188 vector188: pushl $0 8010745e: 6a 00 push $0x0 pushl $188 80107460: 68 bc 00 00 00 push $0xbc jmp alltraps 80107465: e9 36 f2 ff ff jmp 801066a0 <alltraps> 8010746a <vector189>: .globl vector189 vector189: pushl $0 8010746a: 6a 00 push $0x0 pushl $189 8010746c: 68 bd 00 00 00 push $0xbd jmp alltraps 80107471: e9 2a f2 ff ff jmp 801066a0 <alltraps> 80107476 <vector190>: .globl vector190 vector190: pushl $0 80107476: 6a 00 push $0x0 pushl $190 80107478: 68 be 00 00 00 push $0xbe jmp alltraps 8010747d: e9 1e f2 ff ff jmp 801066a0 <alltraps> 80107482 <vector191>: .globl vector191 vector191: pushl $0 80107482: 6a 00 push $0x0 pushl $191 80107484: 68 bf 00 00 00 push $0xbf jmp alltraps 80107489: e9 12 f2 ff ff jmp 801066a0 <alltraps> 8010748e <vector192>: .globl vector192 vector192: pushl $0 8010748e: 6a 00 push $0x0 pushl $192 80107490: 68 c0 00 00 00 push $0xc0 jmp alltraps 80107495: e9 06 f2 ff ff jmp 801066a0 <alltraps> 8010749a <vector193>: .globl vector193 vector193: pushl $0 8010749a: 6a 00 push $0x0 pushl $193 8010749c: 68 c1 00 00 00 push $0xc1 jmp alltraps 801074a1: e9 fa f1 ff ff jmp 801066a0 <alltraps> 801074a6 <vector194>: .globl vector194 vector194: pushl $0 801074a6: 6a 00 push $0x0 pushl $194 801074a8: 68 c2 00 00 00 push $0xc2 jmp alltraps 801074ad: e9 ee f1 ff ff jmp 801066a0 <alltraps> 801074b2 <vector195>: .globl vector195 vector195: pushl $0 801074b2: 6a 00 push $0x0 pushl $195 801074b4: 68 c3 00 00 00 push $0xc3 jmp alltraps 801074b9: e9 e2 f1 ff ff jmp 801066a0 <alltraps> 801074be <vector196>: .globl vector196 vector196: pushl $0 801074be: 6a 00 push $0x0 pushl $196 801074c0: 68 c4 00 00 00 push $0xc4 jmp alltraps 801074c5: e9 d6 f1 ff ff jmp 801066a0 <alltraps> 801074ca <vector197>: .globl vector197 vector197: pushl $0 801074ca: 6a 00 push $0x0 pushl $197 801074cc: 68 c5 00 00 00 push $0xc5 jmp alltraps 801074d1: e9 ca f1 ff ff jmp 801066a0 <alltraps> 801074d6 <vector198>: .globl vector198 vector198: pushl $0 801074d6: 6a 00 push $0x0 pushl $198 801074d8: 68 c6 00 00 00 push $0xc6 jmp alltraps 801074dd: e9 be f1 ff ff jmp 801066a0 <alltraps> 801074e2 <vector199>: .globl vector199 vector199: pushl $0 801074e2: 6a 00 push $0x0 pushl $199 801074e4: 68 c7 00 00 00 push $0xc7 jmp alltraps 801074e9: e9 b2 f1 ff ff jmp 801066a0 <alltraps> 801074ee <vector200>: .globl vector200 vector200: pushl $0 801074ee: 6a 00 push $0x0 pushl $200 801074f0: 68 c8 00 00 00 push $0xc8 jmp alltraps 801074f5: e9 a6 f1 ff ff jmp 801066a0 <alltraps> 801074fa <vector201>: .globl vector201 vector201: pushl $0 801074fa: 6a 00 push $0x0 pushl $201 801074fc: 68 c9 00 00 00 push $0xc9 jmp alltraps 80107501: e9 9a f1 ff ff jmp 801066a0 <alltraps> 80107506 <vector202>: .globl vector202 vector202: pushl $0 80107506: 6a 00 push $0x0 pushl $202 80107508: 68 ca 00 00 00 push $0xca jmp alltraps 8010750d: e9 8e f1 ff ff jmp 801066a0 <alltraps> 80107512 <vector203>: .globl vector203 vector203: pushl $0 80107512: 6a 00 push $0x0 pushl $203 80107514: 68 cb 00 00 00 push $0xcb jmp alltraps 80107519: e9 82 f1 ff ff jmp 801066a0 <alltraps> 8010751e <vector204>: .globl vector204 vector204: pushl $0 8010751e: 6a 00 push $0x0 pushl $204 80107520: 68 cc 00 00 00 push $0xcc jmp alltraps 80107525: e9 76 f1 ff ff jmp 801066a0 <alltraps> 8010752a <vector205>: .globl vector205 vector205: pushl $0 8010752a: 6a 00 push $0x0 pushl $205 8010752c: 68 cd 00 00 00 push $0xcd jmp alltraps 80107531: e9 6a f1 ff ff jmp 801066a0 <alltraps> 80107536 <vector206>: .globl vector206 vector206: pushl $0 80107536: 6a 00 push $0x0 pushl $206 80107538: 68 ce 00 00 00 push $0xce jmp alltraps 8010753d: e9 5e f1 ff ff jmp 801066a0 <alltraps> 80107542 <vector207>: .globl vector207 vector207: pushl $0 80107542: 6a 00 push $0x0 pushl $207 80107544: 68 cf 00 00 00 push $0xcf jmp alltraps 80107549: e9 52 f1 ff ff jmp 801066a0 <alltraps> 8010754e <vector208>: .globl vector208 vector208: pushl $0 8010754e: 6a 00 push $0x0 pushl $208 80107550: 68 d0 00 00 00 push $0xd0 jmp alltraps 80107555: e9 46 f1 ff ff jmp 801066a0 <alltraps> 8010755a <vector209>: .globl vector209 vector209: pushl $0 8010755a: 6a 00 push $0x0 pushl $209 8010755c: 68 d1 00 00 00 push $0xd1 jmp alltraps 80107561: e9 3a f1 ff ff jmp 801066a0 <alltraps> 80107566 <vector210>: .globl vector210 vector210: pushl $0 80107566: 6a 00 push $0x0 pushl $210 80107568: 68 d2 00 00 00 push $0xd2 jmp alltraps 8010756d: e9 2e f1 ff ff jmp 801066a0 <alltraps> 80107572 <vector211>: .globl vector211 vector211: pushl $0 80107572: 6a 00 push $0x0 pushl $211 80107574: 68 d3 00 00 00 push $0xd3 jmp alltraps 80107579: e9 22 f1 ff ff jmp 801066a0 <alltraps> 8010757e <vector212>: .globl vector212 vector212: pushl $0 8010757e: 6a 00 push $0x0 pushl $212 80107580: 68 d4 00 00 00 push $0xd4 jmp alltraps 80107585: e9 16 f1 ff ff jmp 801066a0 <alltraps> 8010758a <vector213>: .globl vector213 vector213: pushl $0 8010758a: 6a 00 push $0x0 pushl $213 8010758c: 68 d5 00 00 00 push $0xd5 jmp alltraps 80107591: e9 0a f1 ff ff jmp 801066a0 <alltraps> 80107596 <vector214>: .globl vector214 vector214: pushl $0 80107596: 6a 00 push $0x0 pushl $214 80107598: 68 d6 00 00 00 push $0xd6 jmp alltraps 8010759d: e9 fe f0 ff ff jmp 801066a0 <alltraps> 801075a2 <vector215>: .globl vector215 vector215: pushl $0 801075a2: 6a 00 push $0x0 pushl $215 801075a4: 68 d7 00 00 00 push $0xd7 jmp alltraps 801075a9: e9 f2 f0 ff ff jmp 801066a0 <alltraps> 801075ae <vector216>: .globl vector216 vector216: pushl $0 801075ae: 6a 00 push $0x0 pushl $216 801075b0: 68 d8 00 00 00 push $0xd8 jmp alltraps 801075b5: e9 e6 f0 ff ff jmp 801066a0 <alltraps> 801075ba <vector217>: .globl vector217 vector217: pushl $0 801075ba: 6a 00 push $0x0 pushl $217 801075bc: 68 d9 00 00 00 push $0xd9 jmp alltraps 801075c1: e9 da f0 ff ff jmp 801066a0 <alltraps> 801075c6 <vector218>: .globl vector218 vector218: pushl $0 801075c6: 6a 00 push $0x0 pushl $218 801075c8: 68 da 00 00 00 push $0xda jmp alltraps 801075cd: e9 ce f0 ff ff jmp 801066a0 <alltraps> 801075d2 <vector219>: .globl vector219 vector219: pushl $0 801075d2: 6a 00 push $0x0 pushl $219 801075d4: 68 db 00 00 00 push $0xdb jmp alltraps 801075d9: e9 c2 f0 ff ff jmp 801066a0 <alltraps> 801075de <vector220>: .globl vector220 vector220: pushl $0 801075de: 6a 00 push $0x0 pushl $220 801075e0: 68 dc 00 00 00 push $0xdc jmp alltraps 801075e5: e9 b6 f0 ff ff jmp 801066a0 <alltraps> 801075ea <vector221>: .globl vector221 vector221: pushl $0 801075ea: 6a 00 push $0x0 pushl $221 801075ec: 68 dd 00 00 00 push $0xdd jmp alltraps 801075f1: e9 aa f0 ff ff jmp 801066a0 <alltraps> 801075f6 <vector222>: .globl vector222 vector222: pushl $0 801075f6: 6a 00 push $0x0 pushl $222 801075f8: 68 de 00 00 00 push $0xde jmp alltraps 801075fd: e9 9e f0 ff ff jmp 801066a0 <alltraps> 80107602 <vector223>: .globl vector223 vector223: pushl $0 80107602: 6a 00 push $0x0 pushl $223 80107604: 68 df 00 00 00 push $0xdf jmp alltraps 80107609: e9 92 f0 ff ff jmp 801066a0 <alltraps> 8010760e <vector224>: .globl vector224 vector224: pushl $0 8010760e: 6a 00 push $0x0 pushl $224 80107610: 68 e0 00 00 00 push $0xe0 jmp alltraps 80107615: e9 86 f0 ff ff jmp 801066a0 <alltraps> 8010761a <vector225>: .globl vector225 vector225: pushl $0 8010761a: 6a 00 push $0x0 pushl $225 8010761c: 68 e1 00 00 00 push $0xe1 jmp alltraps 80107621: e9 7a f0 ff ff jmp 801066a0 <alltraps> 80107626 <vector226>: .globl vector226 vector226: pushl $0 80107626: 6a 00 push $0x0 pushl $226 80107628: 68 e2 00 00 00 push $0xe2 jmp alltraps 8010762d: e9 6e f0 ff ff jmp 801066a0 <alltraps> 80107632 <vector227>: .globl vector227 vector227: pushl $0 80107632: 6a 00 push $0x0 pushl $227 80107634: 68 e3 00 00 00 push $0xe3 jmp alltraps 80107639: e9 62 f0 ff ff jmp 801066a0 <alltraps> 8010763e <vector228>: .globl vector228 vector228: pushl $0 8010763e: 6a 00 push $0x0 pushl $228 80107640: 68 e4 00 00 00 push $0xe4 jmp alltraps 80107645: e9 56 f0 ff ff jmp 801066a0 <alltraps> 8010764a <vector229>: .globl vector229 vector229: pushl $0 8010764a: 6a 00 push $0x0 pushl $229 8010764c: 68 e5 00 00 00 push $0xe5 jmp alltraps 80107651: e9 4a f0 ff ff jmp 801066a0 <alltraps> 80107656 <vector230>: .globl vector230 vector230: pushl $0 80107656: 6a 00 push $0x0 pushl $230 80107658: 68 e6 00 00 00 push $0xe6 jmp alltraps 8010765d: e9 3e f0 ff ff jmp 801066a0 <alltraps> 80107662 <vector231>: .globl vector231 vector231: pushl $0 80107662: 6a 00 push $0x0 pushl $231 80107664: 68 e7 00 00 00 push $0xe7 jmp alltraps 80107669: e9 32 f0 ff ff jmp 801066a0 <alltraps> 8010766e <vector232>: .globl vector232 vector232: pushl $0 8010766e: 6a 00 push $0x0 pushl $232 80107670: 68 e8 00 00 00 push $0xe8 jmp alltraps 80107675: e9 26 f0 ff ff jmp 801066a0 <alltraps> 8010767a <vector233>: .globl vector233 vector233: pushl $0 8010767a: 6a 00 push $0x0 pushl $233 8010767c: 68 e9 00 00 00 push $0xe9 jmp alltraps 80107681: e9 1a f0 ff ff jmp 801066a0 <alltraps> 80107686 <vector234>: .globl vector234 vector234: pushl $0 80107686: 6a 00 push $0x0 pushl $234 80107688: 68 ea 00 00 00 push $0xea jmp alltraps 8010768d: e9 0e f0 ff ff jmp 801066a0 <alltraps> 80107692 <vector235>: .globl vector235 vector235: pushl $0 80107692: 6a 00 push $0x0 pushl $235 80107694: 68 eb 00 00 00 push $0xeb jmp alltraps 80107699: e9 02 f0 ff ff jmp 801066a0 <alltraps> 8010769e <vector236>: .globl vector236 vector236: pushl $0 8010769e: 6a 00 push $0x0 pushl $236 801076a0: 68 ec 00 00 00 push $0xec jmp alltraps 801076a5: e9 f6 ef ff ff jmp 801066a0 <alltraps> 801076aa <vector237>: .globl vector237 vector237: pushl $0 801076aa: 6a 00 push $0x0 pushl $237 801076ac: 68 ed 00 00 00 push $0xed jmp alltraps 801076b1: e9 ea ef ff ff jmp 801066a0 <alltraps> 801076b6 <vector238>: .globl vector238 vector238: pushl $0 801076b6: 6a 00 push $0x0 pushl $238 801076b8: 68 ee 00 00 00 push $0xee jmp alltraps 801076bd: e9 de ef ff ff jmp 801066a0 <alltraps> 801076c2 <vector239>: .globl vector239 vector239: pushl $0 801076c2: 6a 00 push $0x0 pushl $239 801076c4: 68 ef 00 00 00 push $0xef jmp alltraps 801076c9: e9 d2 ef ff ff jmp 801066a0 <alltraps> 801076ce <vector240>: .globl vector240 vector240: pushl $0 801076ce: 6a 00 push $0x0 pushl $240 801076d0: 68 f0 00 00 00 push $0xf0 jmp alltraps 801076d5: e9 c6 ef ff ff jmp 801066a0 <alltraps> 801076da <vector241>: .globl vector241 vector241: pushl $0 801076da: 6a 00 push $0x0 pushl $241 801076dc: 68 f1 00 00 00 push $0xf1 jmp alltraps 801076e1: e9 ba ef ff ff jmp 801066a0 <alltraps> 801076e6 <vector242>: .globl vector242 vector242: pushl $0 801076e6: 6a 00 push $0x0 pushl $242 801076e8: 68 f2 00 00 00 push $0xf2 jmp alltraps 801076ed: e9 ae ef ff ff jmp 801066a0 <alltraps> 801076f2 <vector243>: .globl vector243 vector243: pushl $0 801076f2: 6a 00 push $0x0 pushl $243 801076f4: 68 f3 00 00 00 push $0xf3 jmp alltraps 801076f9: e9 a2 ef ff ff jmp 801066a0 <alltraps> 801076fe <vector244>: .globl vector244 vector244: pushl $0 801076fe: 6a 00 push $0x0 pushl $244 80107700: 68 f4 00 00 00 push $0xf4 jmp alltraps 80107705: e9 96 ef ff ff jmp 801066a0 <alltraps> 8010770a <vector245>: .globl vector245 vector245: pushl $0 8010770a: 6a 00 push $0x0 pushl $245 8010770c: 68 f5 00 00 00 push $0xf5 jmp alltraps 80107711: e9 8a ef ff ff jmp 801066a0 <alltraps> 80107716 <vector246>: .globl vector246 vector246: pushl $0 80107716: 6a 00 push $0x0 pushl $246 80107718: 68 f6 00 00 00 push $0xf6 jmp alltraps 8010771d: e9 7e ef ff ff jmp 801066a0 <alltraps> 80107722 <vector247>: .globl vector247 vector247: pushl $0 80107722: 6a 00 push $0x0 pushl $247 80107724: 68 f7 00 00 00 push $0xf7 jmp alltraps 80107729: e9 72 ef ff ff jmp 801066a0 <alltraps> 8010772e <vector248>: .globl vector248 vector248: pushl $0 8010772e: 6a 00 push $0x0 pushl $248 80107730: 68 f8 00 00 00 push $0xf8 jmp alltraps 80107735: e9 66 ef ff ff jmp 801066a0 <alltraps> 8010773a <vector249>: .globl vector249 vector249: pushl $0 8010773a: 6a 00 push $0x0 pushl $249 8010773c: 68 f9 00 00 00 push $0xf9 jmp alltraps 80107741: e9 5a ef ff ff jmp 801066a0 <alltraps> 80107746 <vector250>: .globl vector250 vector250: pushl $0 80107746: 6a 00 push $0x0 pushl $250 80107748: 68 fa 00 00 00 push $0xfa jmp alltraps 8010774d: e9 4e ef ff ff jmp 801066a0 <alltraps> 80107752 <vector251>: .globl vector251 vector251: pushl $0 80107752: 6a 00 push $0x0 pushl $251 80107754: 68 fb 00 00 00 push $0xfb jmp alltraps 80107759: e9 42 ef ff ff jmp 801066a0 <alltraps> 8010775e <vector252>: .globl vector252 vector252: pushl $0 8010775e: 6a 00 push $0x0 pushl $252 80107760: 68 fc 00 00 00 push $0xfc jmp alltraps 80107765: e9 36 ef ff ff jmp 801066a0 <alltraps> 8010776a <vector253>: .globl vector253 vector253: pushl $0 8010776a: 6a 00 push $0x0 pushl $253 8010776c: 68 fd 00 00 00 push $0xfd jmp alltraps 80107771: e9 2a ef ff ff jmp 801066a0 <alltraps> 80107776 <vector254>: .globl vector254 vector254: pushl $0 80107776: 6a 00 push $0x0 pushl $254 80107778: 68 fe 00 00 00 push $0xfe jmp alltraps 8010777d: e9 1e ef ff ff jmp 801066a0 <alltraps> 80107782 <vector255>: .globl vector255 vector255: pushl $0 80107782: 6a 00 push $0x0 pushl $255 80107784: 68 ff 00 00 00 push $0xff jmp alltraps 80107789: e9 12 ef ff ff jmp 801066a0 <alltraps> ... 80107790 <lgdt>: struct segdesc; static inline void lgdt(struct segdesc *p, int size) { 80107790: 55 push %ebp 80107791: 89 e5 mov %esp,%ebp 80107793: 83 ec 10 sub $0x10,%esp volatile ushort pd[3]; pd[0] = size-1; 80107796: 8b 45 0c mov 0xc(%ebp),%eax 80107799: 83 e8 01 sub $0x1,%eax 8010779c: 66 89 45 fa mov %ax,-0x6(%ebp) pd[1] = (uint)p; 801077a0: 8b 45 08 mov 0x8(%ebp),%eax 801077a3: 66 89 45 fc mov %ax,-0x4(%ebp) pd[2] = (uint)p >> 16; 801077a7: 8b 45 08 mov 0x8(%ebp),%eax 801077aa: c1 e8 10 shr $0x10,%eax 801077ad: 66 89 45 fe mov %ax,-0x2(%ebp) asm volatile("lgdt (%0)" : : "r" (pd)); 801077b1: 8d 45 fa lea -0x6(%ebp),%eax 801077b4: 0f 01 10 lgdtl (%eax) } 801077b7: c9 leave 801077b8: c3 ret 801077b9 <ltr>: asm volatile("lidt (%0)" : : "r" (pd)); } static inline void ltr(ushort sel) { 801077b9: 55 push %ebp 801077ba: 89 e5 mov %esp,%ebp 801077bc: 83 ec 04 sub $0x4,%esp 801077bf: 8b 45 08 mov 0x8(%ebp),%eax 801077c2: 66 89 45 fc mov %ax,-0x4(%ebp) asm volatile("ltr %0" : : "r" (sel)); 801077c6: 0f b7 45 fc movzwl -0x4(%ebp),%eax 801077ca: 0f 00 d8 ltr %ax } 801077cd: c9 leave 801077ce: c3 ret 801077cf <loadgs>: return eflags; } static inline void loadgs(ushort v) { 801077cf: 55 push %ebp 801077d0: 89 e5 mov %esp,%ebp 801077d2: 83 ec 04 sub $0x4,%esp 801077d5: 8b 45 08 mov 0x8(%ebp),%eax 801077d8: 66 89 45 fc mov %ax,-0x4(%ebp) asm volatile("movw %0, %%gs" : : "r" (v)); 801077dc: 0f b7 45 fc movzwl -0x4(%ebp),%eax 801077e0: 8e e8 mov %eax,%gs } 801077e2: c9 leave 801077e3: c3 ret 801077e4 <lcr3>: return val; } static inline void lcr3(uint val) { 801077e4: 55 push %ebp 801077e5: 89 e5 mov %esp,%ebp asm volatile("movl %0,%%cr3" : : "r" (val)); 801077e7: 8b 45 08 mov 0x8(%ebp),%eax 801077ea: 0f 22 d8 mov %eax,%cr3 } 801077ed: 5d pop %ebp 801077ee: c3 ret 801077ef <v2p>: #define KERNBASE 0x80000000 // First kernel virtual address #define KERNLINK (KERNBASE+EXTMEM) // Address where kernel is linked #ifndef __ASSEMBLER__ static inline uint v2p(void *a) { return ((uint) (a)) - KERNBASE; } 801077ef: 55 push %ebp 801077f0: 89 e5 mov %esp,%ebp 801077f2: 8b 45 08 mov 0x8(%ebp),%eax 801077f5: 2d 00 00 00 80 sub $0x80000000,%eax 801077fa: 5d pop %ebp 801077fb: c3 ret 801077fc <p2v>: static inline void *p2v(uint a) { return (void *) ((a) + KERNBASE); } 801077fc: 55 push %ebp 801077fd: 89 e5 mov %esp,%ebp 801077ff: 8b 45 08 mov 0x8(%ebp),%eax 80107802: 2d 00 00 00 80 sub $0x80000000,%eax 80107807: 5d pop %ebp 80107808: c3 ret 80107809 <seginit>: // Set up CPU's kernel segment descriptors. // Run once on entry on each CPU. void seginit(void) { 80107809: 55 push %ebp 8010780a: 89 e5 mov %esp,%ebp 8010780c: 53 push %ebx 8010780d: 83 ec 24 sub $0x24,%esp // Map "logical" addresses to virtual addresses using identity map. // Cannot share a CODE descriptor for both kernel and user // because it would have to have DPL_USR, but the CPU forbids // an interrupt from CPL=0 to DPL=3. c = &cpus[cpunum()]; 80107810: e8 6f b6 ff ff call 80102e84 <cpunum> 80107815: 69 c0 bc 00 00 00 imul $0xbc,%eax,%eax 8010781b: 05 40 f9 10 80 add $0x8010f940,%eax 80107820: 89 45 f4 mov %eax,-0xc(%ebp) c->gdt[SEG_KCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, 0); 80107823: 8b 45 f4 mov -0xc(%ebp),%eax 80107826: 66 c7 40 78 ff ff movw $0xffff,0x78(%eax) 8010782c: 8b 45 f4 mov -0xc(%ebp),%eax 8010782f: 66 c7 40 7a 00 00 movw $0x0,0x7a(%eax) 80107835: 8b 45 f4 mov -0xc(%ebp),%eax 80107838: c6 40 7c 00 movb $0x0,0x7c(%eax) 8010783c: 8b 45 f4 mov -0xc(%ebp),%eax 8010783f: 0f b6 50 7d movzbl 0x7d(%eax),%edx 80107843: 83 e2 f0 and $0xfffffff0,%edx 80107846: 83 ca 0a or $0xa,%edx 80107849: 88 50 7d mov %dl,0x7d(%eax) 8010784c: 8b 45 f4 mov -0xc(%ebp),%eax 8010784f: 0f b6 50 7d movzbl 0x7d(%eax),%edx 80107853: 83 ca 10 or $0x10,%edx 80107856: 88 50 7d mov %dl,0x7d(%eax) 80107859: 8b 45 f4 mov -0xc(%ebp),%eax 8010785c: 0f b6 50 7d movzbl 0x7d(%eax),%edx 80107860: 83 e2 9f and $0xffffff9f,%edx 80107863: 88 50 7d mov %dl,0x7d(%eax) 80107866: 8b 45 f4 mov -0xc(%ebp),%eax 80107869: 0f b6 50 7d movzbl 0x7d(%eax),%edx 8010786d: 83 ca 80 or $0xffffff80,%edx 80107870: 88 50 7d mov %dl,0x7d(%eax) 80107873: 8b 45 f4 mov -0xc(%ebp),%eax 80107876: 0f b6 50 7e movzbl 0x7e(%eax),%edx 8010787a: 83 ca 0f or $0xf,%edx 8010787d: 88 50 7e mov %dl,0x7e(%eax) 80107880: 8b 45 f4 mov -0xc(%ebp),%eax 80107883: 0f b6 50 7e movzbl 0x7e(%eax),%edx 80107887: 83 e2 ef and $0xffffffef,%edx 8010788a: 88 50 7e mov %dl,0x7e(%eax) 8010788d: 8b 45 f4 mov -0xc(%ebp),%eax 80107890: 0f b6 50 7e movzbl 0x7e(%eax),%edx 80107894: 83 e2 df and $0xffffffdf,%edx 80107897: 88 50 7e mov %dl,0x7e(%eax) 8010789a: 8b 45 f4 mov -0xc(%ebp),%eax 8010789d: 0f b6 50 7e movzbl 0x7e(%eax),%edx 801078a1: 83 ca 40 or $0x40,%edx 801078a4: 88 50 7e mov %dl,0x7e(%eax) 801078a7: 8b 45 f4 mov -0xc(%ebp),%eax 801078aa: 0f b6 50 7e movzbl 0x7e(%eax),%edx 801078ae: 83 ca 80 or $0xffffff80,%edx 801078b1: 88 50 7e mov %dl,0x7e(%eax) 801078b4: 8b 45 f4 mov -0xc(%ebp),%eax 801078b7: c6 40 7f 00 movb $0x0,0x7f(%eax) c->gdt[SEG_KDATA] = SEG(STA_W, 0, 0xffffffff, 0); 801078bb: 8b 45 f4 mov -0xc(%ebp),%eax 801078be: 66 c7 80 80 00 00 00 movw $0xffff,0x80(%eax) 801078c5: ff ff 801078c7: 8b 45 f4 mov -0xc(%ebp),%eax 801078ca: 66 c7 80 82 00 00 00 movw $0x0,0x82(%eax) 801078d1: 00 00 801078d3: 8b 45 f4 mov -0xc(%ebp),%eax 801078d6: c6 80 84 00 00 00 00 movb $0x0,0x84(%eax) 801078dd: 8b 45 f4 mov -0xc(%ebp),%eax 801078e0: 0f b6 90 85 00 00 00 movzbl 0x85(%eax),%edx 801078e7: 83 e2 f0 and $0xfffffff0,%edx 801078ea: 83 ca 02 or $0x2,%edx 801078ed: 88 90 85 00 00 00 mov %dl,0x85(%eax) 801078f3: 8b 45 f4 mov -0xc(%ebp),%eax 801078f6: 0f b6 90 85 00 00 00 movzbl 0x85(%eax),%edx 801078fd: 83 ca 10 or $0x10,%edx 80107900: 88 90 85 00 00 00 mov %dl,0x85(%eax) 80107906: 8b 45 f4 mov -0xc(%ebp),%eax 80107909: 0f b6 90 85 00 00 00 movzbl 0x85(%eax),%edx 80107910: 83 e2 9f and $0xffffff9f,%edx 80107913: 88 90 85 00 00 00 mov %dl,0x85(%eax) 80107919: 8b 45 f4 mov -0xc(%ebp),%eax 8010791c: 0f b6 90 85 00 00 00 movzbl 0x85(%eax),%edx 80107923: 83 ca 80 or $0xffffff80,%edx 80107926: 88 90 85 00 00 00 mov %dl,0x85(%eax) 8010792c: 8b 45 f4 mov -0xc(%ebp),%eax 8010792f: 0f b6 90 86 00 00 00 movzbl 0x86(%eax),%edx 80107936: 83 ca 0f or $0xf,%edx 80107939: 88 90 86 00 00 00 mov %dl,0x86(%eax) 8010793f: 8b 45 f4 mov -0xc(%ebp),%eax 80107942: 0f b6 90 86 00 00 00 movzbl 0x86(%eax),%edx 80107949: 83 e2 ef and $0xffffffef,%edx 8010794c: 88 90 86 00 00 00 mov %dl,0x86(%eax) 80107952: 8b 45 f4 mov -0xc(%ebp),%eax 80107955: 0f b6 90 86 00 00 00 movzbl 0x86(%eax),%edx 8010795c: 83 e2 df and $0xffffffdf,%edx 8010795f: 88 90 86 00 00 00 mov %dl,0x86(%eax) 80107965: 8b 45 f4 mov -0xc(%ebp),%eax 80107968: 0f b6 90 86 00 00 00 movzbl 0x86(%eax),%edx 8010796f: 83 ca 40 or $0x40,%edx 80107972: 88 90 86 00 00 00 mov %dl,0x86(%eax) 80107978: 8b 45 f4 mov -0xc(%ebp),%eax 8010797b: 0f b6 90 86 00 00 00 movzbl 0x86(%eax),%edx 80107982: 83 ca 80 or $0xffffff80,%edx 80107985: 88 90 86 00 00 00 mov %dl,0x86(%eax) 8010798b: 8b 45 f4 mov -0xc(%ebp),%eax 8010798e: c6 80 87 00 00 00 00 movb $0x0,0x87(%eax) c->gdt[SEG_UCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, DPL_USER); 80107995: 8b 45 f4 mov -0xc(%ebp),%eax 80107998: 66 c7 80 90 00 00 00 movw $0xffff,0x90(%eax) 8010799f: ff ff 801079a1: 8b 45 f4 mov -0xc(%ebp),%eax 801079a4: 66 c7 80 92 00 00 00 movw $0x0,0x92(%eax) 801079ab: 00 00 801079ad: 8b 45 f4 mov -0xc(%ebp),%eax 801079b0: c6 80 94 00 00 00 00 movb $0x0,0x94(%eax) 801079b7: 8b 45 f4 mov -0xc(%ebp),%eax 801079ba: 0f b6 90 95 00 00 00 movzbl 0x95(%eax),%edx 801079c1: 83 e2 f0 and $0xfffffff0,%edx 801079c4: 83 ca 0a or $0xa,%edx 801079c7: 88 90 95 00 00 00 mov %dl,0x95(%eax) 801079cd: 8b 45 f4 mov -0xc(%ebp),%eax 801079d0: 0f b6 90 95 00 00 00 movzbl 0x95(%eax),%edx 801079d7: 83 ca 10 or $0x10,%edx 801079da: 88 90 95 00 00 00 mov %dl,0x95(%eax) 801079e0: 8b 45 f4 mov -0xc(%ebp),%eax 801079e3: 0f b6 90 95 00 00 00 movzbl 0x95(%eax),%edx 801079ea: 83 ca 60 or $0x60,%edx 801079ed: 88 90 95 00 00 00 mov %dl,0x95(%eax) 801079f3: 8b 45 f4 mov -0xc(%ebp),%eax 801079f6: 0f b6 90 95 00 00 00 movzbl 0x95(%eax),%edx 801079fd: 83 ca 80 or $0xffffff80,%edx 80107a00: 88 90 95 00 00 00 mov %dl,0x95(%eax) 80107a06: 8b 45 f4 mov -0xc(%ebp),%eax 80107a09: 0f b6 90 96 00 00 00 movzbl 0x96(%eax),%edx 80107a10: 83 ca 0f or $0xf,%edx 80107a13: 88 90 96 00 00 00 mov %dl,0x96(%eax) 80107a19: 8b 45 f4 mov -0xc(%ebp),%eax 80107a1c: 0f b6 90 96 00 00 00 movzbl 0x96(%eax),%edx 80107a23: 83 e2 ef and $0xffffffef,%edx 80107a26: 88 90 96 00 00 00 mov %dl,0x96(%eax) 80107a2c: 8b 45 f4 mov -0xc(%ebp),%eax 80107a2f: 0f b6 90 96 00 00 00 movzbl 0x96(%eax),%edx 80107a36: 83 e2 df and $0xffffffdf,%edx 80107a39: 88 90 96 00 00 00 mov %dl,0x96(%eax) 80107a3f: 8b 45 f4 mov -0xc(%ebp),%eax 80107a42: 0f b6 90 96 00 00 00 movzbl 0x96(%eax),%edx 80107a49: 83 ca 40 or $0x40,%edx 80107a4c: 88 90 96 00 00 00 mov %dl,0x96(%eax) 80107a52: 8b 45 f4 mov -0xc(%ebp),%eax 80107a55: 0f b6 90 96 00 00 00 movzbl 0x96(%eax),%edx 80107a5c: 83 ca 80 or $0xffffff80,%edx 80107a5f: 88 90 96 00 00 00 mov %dl,0x96(%eax) 80107a65: 8b 45 f4 mov -0xc(%ebp),%eax 80107a68: c6 80 97 00 00 00 00 movb $0x0,0x97(%eax) c->gdt[SEG_UDATA] = SEG(STA_W, 0, 0xffffffff, DPL_USER); 80107a6f: 8b 45 f4 mov -0xc(%ebp),%eax 80107a72: 66 c7 80 98 00 00 00 movw $0xffff,0x98(%eax) 80107a79: ff ff 80107a7b: 8b 45 f4 mov -0xc(%ebp),%eax 80107a7e: 66 c7 80 9a 00 00 00 movw $0x0,0x9a(%eax) 80107a85: 00 00 80107a87: 8b 45 f4 mov -0xc(%ebp),%eax 80107a8a: c6 80 9c 00 00 00 00 movb $0x0,0x9c(%eax) 80107a91: 8b 45 f4 mov -0xc(%ebp),%eax 80107a94: 0f b6 90 9d 00 00 00 movzbl 0x9d(%eax),%edx 80107a9b: 83 e2 f0 and $0xfffffff0,%edx 80107a9e: 83 ca 02 or $0x2,%edx 80107aa1: 88 90 9d 00 00 00 mov %dl,0x9d(%eax) 80107aa7: 8b 45 f4 mov -0xc(%ebp),%eax 80107aaa: 0f b6 90 9d 00 00 00 movzbl 0x9d(%eax),%edx 80107ab1: 83 ca 10 or $0x10,%edx 80107ab4: 88 90 9d 00 00 00 mov %dl,0x9d(%eax) 80107aba: 8b 45 f4 mov -0xc(%ebp),%eax 80107abd: 0f b6 90 9d 00 00 00 movzbl 0x9d(%eax),%edx 80107ac4: 83 ca 60 or $0x60,%edx 80107ac7: 88 90 9d 00 00 00 mov %dl,0x9d(%eax) 80107acd: 8b 45 f4 mov -0xc(%ebp),%eax 80107ad0: 0f b6 90 9d 00 00 00 movzbl 0x9d(%eax),%edx 80107ad7: 83 ca 80 or $0xffffff80,%edx 80107ada: 88 90 9d 00 00 00 mov %dl,0x9d(%eax) 80107ae0: 8b 45 f4 mov -0xc(%ebp),%eax 80107ae3: 0f b6 90 9e 00 00 00 movzbl 0x9e(%eax),%edx 80107aea: 83 ca 0f or $0xf,%edx 80107aed: 88 90 9e 00 00 00 mov %dl,0x9e(%eax) 80107af3: 8b 45 f4 mov -0xc(%ebp),%eax 80107af6: 0f b6 90 9e 00 00 00 movzbl 0x9e(%eax),%edx 80107afd: 83 e2 ef and $0xffffffef,%edx 80107b00: 88 90 9e 00 00 00 mov %dl,0x9e(%eax) 80107b06: 8b 45 f4 mov -0xc(%ebp),%eax 80107b09: 0f b6 90 9e 00 00 00 movzbl 0x9e(%eax),%edx 80107b10: 83 e2 df and $0xffffffdf,%edx 80107b13: 88 90 9e 00 00 00 mov %dl,0x9e(%eax) 80107b19: 8b 45 f4 mov -0xc(%ebp),%eax 80107b1c: 0f b6 90 9e 00 00 00 movzbl 0x9e(%eax),%edx 80107b23: 83 ca 40 or $0x40,%edx 80107b26: 88 90 9e 00 00 00 mov %dl,0x9e(%eax) 80107b2c: 8b 45 f4 mov -0xc(%ebp),%eax 80107b2f: 0f b6 90 9e 00 00 00 movzbl 0x9e(%eax),%edx 80107b36: 83 ca 80 or $0xffffff80,%edx 80107b39: 88 90 9e 00 00 00 mov %dl,0x9e(%eax) 80107b3f: 8b 45 f4 mov -0xc(%ebp),%eax 80107b42: c6 80 9f 00 00 00 00 movb $0x0,0x9f(%eax) // Map cpu, and curproc c->gdt[SEG_KCPU] = SEG(STA_W, &c->cpu, 8, 0); 80107b49: 8b 45 f4 mov -0xc(%ebp),%eax 80107b4c: 05 b4 00 00 00 add $0xb4,%eax 80107b51: 89 c3 mov %eax,%ebx 80107b53: 8b 45 f4 mov -0xc(%ebp),%eax 80107b56: 05 b4 00 00 00 add $0xb4,%eax 80107b5b: c1 e8 10 shr $0x10,%eax 80107b5e: 89 c1 mov %eax,%ecx 80107b60: 8b 45 f4 mov -0xc(%ebp),%eax 80107b63: 05 b4 00 00 00 add $0xb4,%eax 80107b68: c1 e8 18 shr $0x18,%eax 80107b6b: 89 c2 mov %eax,%edx 80107b6d: 8b 45 f4 mov -0xc(%ebp),%eax 80107b70: 66 c7 80 88 00 00 00 movw $0x0,0x88(%eax) 80107b77: 00 00 80107b79: 8b 45 f4 mov -0xc(%ebp),%eax 80107b7c: 66 89 98 8a 00 00 00 mov %bx,0x8a(%eax) 80107b83: 8b 45 f4 mov -0xc(%ebp),%eax 80107b86: 88 88 8c 00 00 00 mov %cl,0x8c(%eax) 80107b8c: 8b 45 f4 mov -0xc(%ebp),%eax 80107b8f: 0f b6 88 8d 00 00 00 movzbl 0x8d(%eax),%ecx 80107b96: 83 e1 f0 and $0xfffffff0,%ecx 80107b99: 83 c9 02 or $0x2,%ecx 80107b9c: 88 88 8d 00 00 00 mov %cl,0x8d(%eax) 80107ba2: 8b 45 f4 mov -0xc(%ebp),%eax 80107ba5: 0f b6 88 8d 00 00 00 movzbl 0x8d(%eax),%ecx 80107bac: 83 c9 10 or $0x10,%ecx 80107baf: 88 88 8d 00 00 00 mov %cl,0x8d(%eax) 80107bb5: 8b 45 f4 mov -0xc(%ebp),%eax 80107bb8: 0f b6 88 8d 00 00 00 movzbl 0x8d(%eax),%ecx 80107bbf: 83 e1 9f and $0xffffff9f,%ecx 80107bc2: 88 88 8d 00 00 00 mov %cl,0x8d(%eax) 80107bc8: 8b 45 f4 mov -0xc(%ebp),%eax 80107bcb: 0f b6 88 8d 00 00 00 movzbl 0x8d(%eax),%ecx 80107bd2: 83 c9 80 or $0xffffff80,%ecx 80107bd5: 88 88 8d 00 00 00 mov %cl,0x8d(%eax) 80107bdb: 8b 45 f4 mov -0xc(%ebp),%eax 80107bde: 0f b6 88 8e 00 00 00 movzbl 0x8e(%eax),%ecx 80107be5: 83 e1 f0 and $0xfffffff0,%ecx 80107be8: 88 88 8e 00 00 00 mov %cl,0x8e(%eax) 80107bee: 8b 45 f4 mov -0xc(%ebp),%eax 80107bf1: 0f b6 88 8e 00 00 00 movzbl 0x8e(%eax),%ecx 80107bf8: 83 e1 ef and $0xffffffef,%ecx 80107bfb: 88 88 8e 00 00 00 mov %cl,0x8e(%eax) 80107c01: 8b 45 f4 mov -0xc(%ebp),%eax 80107c04: 0f b6 88 8e 00 00 00 movzbl 0x8e(%eax),%ecx 80107c0b: 83 e1 df and $0xffffffdf,%ecx 80107c0e: 88 88 8e 00 00 00 mov %cl,0x8e(%eax) 80107c14: 8b 45 f4 mov -0xc(%ebp),%eax 80107c17: 0f b6 88 8e 00 00 00 movzbl 0x8e(%eax),%ecx 80107c1e: 83 c9 40 or $0x40,%ecx 80107c21: 88 88 8e 00 00 00 mov %cl,0x8e(%eax) 80107c27: 8b 45 f4 mov -0xc(%ebp),%eax 80107c2a: 0f b6 88 8e 00 00 00 movzbl 0x8e(%eax),%ecx 80107c31: 83 c9 80 or $0xffffff80,%ecx 80107c34: 88 88 8e 00 00 00 mov %cl,0x8e(%eax) 80107c3a: 8b 45 f4 mov -0xc(%ebp),%eax 80107c3d: 88 90 8f 00 00 00 mov %dl,0x8f(%eax) lgdt(c->gdt, sizeof(c->gdt)); 80107c43: 8b 45 f4 mov -0xc(%ebp),%eax 80107c46: 83 c0 70 add $0x70,%eax 80107c49: c7 44 24 04 38 00 00 movl $0x38,0x4(%esp) 80107c50: 00 80107c51: 89 04 24 mov %eax,(%esp) 80107c54: e8 37 fb ff ff call 80107790 <lgdt> loadgs(SEG_KCPU << 3); 80107c59: c7 04 24 18 00 00 00 movl $0x18,(%esp) 80107c60: e8 6a fb ff ff call 801077cf <loadgs> // Initialize cpu-local storage. cpu = c; 80107c65: 8b 45 f4 mov -0xc(%ebp),%eax 80107c68: 65 a3 00 00 00 00 mov %eax,%gs:0x0 proc = 0; 80107c6e: 65 c7 05 04 00 00 00 movl $0x0,%gs:0x4 80107c75: 00 00 00 00 } 80107c79: 83 c4 24 add $0x24,%esp 80107c7c: 5b pop %ebx 80107c7d: 5d pop %ebp 80107c7e: c3 ret 80107c7f <walkpgdir>: // Return the address of the PTE in page table pgdir // that corresponds to virtual address va. If alloc!=0, // create any required page table pages. static pte_t * walkpgdir(pde_t *pgdir, const void *va, int alloc) { 80107c7f: 55 push %ebp 80107c80: 89 e5 mov %esp,%ebp 80107c82: 83 ec 28 sub $0x28,%esp pde_t *pde; pte_t *pgtab; pde = &pgdir[PDX(va)]; 80107c85: 8b 45 0c mov 0xc(%ebp),%eax 80107c88: c1 e8 16 shr $0x16,%eax 80107c8b: c1 e0 02 shl $0x2,%eax 80107c8e: 03 45 08 add 0x8(%ebp),%eax 80107c91: 89 45 f0 mov %eax,-0x10(%ebp) if(*pde & PTE_P){ 80107c94: 8b 45 f0 mov -0x10(%ebp),%eax 80107c97: 8b 00 mov (%eax),%eax 80107c99: 83 e0 01 and $0x1,%eax 80107c9c: 84 c0 test %al,%al 80107c9e: 74 17 je 80107cb7 <walkpgdir+0x38> pgtab = (pte_t*)p2v(PTE_ADDR(*pde)); 80107ca0: 8b 45 f0 mov -0x10(%ebp),%eax 80107ca3: 8b 00 mov (%eax),%eax 80107ca5: 25 00 f0 ff ff and $0xfffff000,%eax 80107caa: 89 04 24 mov %eax,(%esp) 80107cad: e8 4a fb ff ff call 801077fc <p2v> 80107cb2: 89 45 f4 mov %eax,-0xc(%ebp) 80107cb5: eb 4b jmp 80107d02 <walkpgdir+0x83> } else { if(!alloc || (pgtab = (pte_t*)kalloc()) == 0) 80107cb7: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 80107cbb: 74 0e je 80107ccb <walkpgdir+0x4c> 80107cbd: e8 48 ae ff ff call 80102b0a <kalloc> 80107cc2: 89 45 f4 mov %eax,-0xc(%ebp) 80107cc5: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 80107cc9: 75 07 jne 80107cd2 <walkpgdir+0x53> return 0; 80107ccb: b8 00 00 00 00 mov $0x0,%eax 80107cd0: eb 41 jmp 80107d13 <walkpgdir+0x94> // Make sure all those PTE_P bits are zero. memset(pgtab, 0, PGSIZE); 80107cd2: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 80107cd9: 00 80107cda: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80107ce1: 00 80107ce2: 8b 45 f4 mov -0xc(%ebp),%eax 80107ce5: 89 04 24 mov %eax,(%esp) 80107ce8: e8 dd d4 ff ff call 801051ca <memset> // The permissions here are overly generous, but they can // be further restricted by the permissions in the page table // entries, if necessary. *pde = v2p(pgtab) | PTE_P | PTE_W | PTE_U; 80107ced: 8b 45 f4 mov -0xc(%ebp),%eax 80107cf0: 89 04 24 mov %eax,(%esp) 80107cf3: e8 f7 fa ff ff call 801077ef <v2p> 80107cf8: 89 c2 mov %eax,%edx 80107cfa: 83 ca 07 or $0x7,%edx 80107cfd: 8b 45 f0 mov -0x10(%ebp),%eax 80107d00: 89 10 mov %edx,(%eax) } return &pgtab[PTX(va)]; 80107d02: 8b 45 0c mov 0xc(%ebp),%eax 80107d05: c1 e8 0c shr $0xc,%eax 80107d08: 25 ff 03 00 00 and $0x3ff,%eax 80107d0d: c1 e0 02 shl $0x2,%eax 80107d10: 03 45 f4 add -0xc(%ebp),%eax } 80107d13: c9 leave 80107d14: c3 ret 80107d15 <mappages>: // Create PTEs for virtual addresses starting at va that refer to // physical addresses starting at pa. va and size might not // be page-aligned. static int mappages(pde_t *pgdir, void *va, uint size, uint pa, int perm) { 80107d15: 55 push %ebp 80107d16: 89 e5 mov %esp,%ebp 80107d18: 83 ec 28 sub $0x28,%esp char *a, *last; pte_t *pte; a = (char*)PGROUNDDOWN((uint)va); 80107d1b: 8b 45 0c mov 0xc(%ebp),%eax 80107d1e: 25 00 f0 ff ff and $0xfffff000,%eax 80107d23: 89 45 ec mov %eax,-0x14(%ebp) last = (char*)PGROUNDDOWN(((uint)va) + size - 1); 80107d26: 8b 45 0c mov 0xc(%ebp),%eax 80107d29: 03 45 10 add 0x10(%ebp),%eax 80107d2c: 83 e8 01 sub $0x1,%eax 80107d2f: 25 00 f0 ff ff and $0xfffff000,%eax 80107d34: 89 45 f0 mov %eax,-0x10(%ebp) for(;;){ if((pte = walkpgdir(pgdir, a, 1)) == 0) 80107d37: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp) 80107d3e: 00 80107d3f: 8b 45 ec mov -0x14(%ebp),%eax 80107d42: 89 44 24 04 mov %eax,0x4(%esp) 80107d46: 8b 45 08 mov 0x8(%ebp),%eax 80107d49: 89 04 24 mov %eax,(%esp) 80107d4c: e8 2e ff ff ff call 80107c7f <walkpgdir> 80107d51: 89 45 f4 mov %eax,-0xc(%ebp) 80107d54: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 80107d58: 75 07 jne 80107d61 <mappages+0x4c> return -1; 80107d5a: b8 ff ff ff ff mov $0xffffffff,%eax 80107d5f: eb 46 jmp 80107da7 <mappages+0x92> if(*pte & PTE_P) 80107d61: 8b 45 f4 mov -0xc(%ebp),%eax 80107d64: 8b 00 mov (%eax),%eax 80107d66: 83 e0 01 and $0x1,%eax 80107d69: 84 c0 test %al,%al 80107d6b: 74 0c je 80107d79 <mappages+0x64> panic("remap"); 80107d6d: c7 04 24 d4 8b 10 80 movl $0x80108bd4,(%esp) 80107d74: e8 c1 87 ff ff call 8010053a <panic> *pte = pa | perm | PTE_P; 80107d79: 8b 45 18 mov 0x18(%ebp),%eax 80107d7c: 0b 45 14 or 0x14(%ebp),%eax 80107d7f: 89 c2 mov %eax,%edx 80107d81: 83 ca 01 or $0x1,%edx 80107d84: 8b 45 f4 mov -0xc(%ebp),%eax 80107d87: 89 10 mov %edx,(%eax) if(a == last) 80107d89: 8b 45 ec mov -0x14(%ebp),%eax 80107d8c: 3b 45 f0 cmp -0x10(%ebp),%eax 80107d8f: 74 10 je 80107da1 <mappages+0x8c> break; a += PGSIZE; 80107d91: 81 45 ec 00 10 00 00 addl $0x1000,-0x14(%ebp) pa += PGSIZE; 80107d98: 81 45 14 00 10 00 00 addl $0x1000,0x14(%ebp) } 80107d9f: eb 96 jmp 80107d37 <mappages+0x22> return -1; if(*pte & PTE_P) panic("remap"); *pte = pa | perm | PTE_P; if(a == last) break; 80107da1: 90 nop a += PGSIZE; pa += PGSIZE; } return 0; 80107da2: b8 00 00 00 00 mov $0x0,%eax } 80107da7: c9 leave 80107da8: c3 ret 80107da9 <setupkvm>: }; // Set up kernel part of a page table. pde_t* setupkvm(void) { 80107da9: 55 push %ebp 80107daa: 89 e5 mov %esp,%ebp 80107dac: 53 push %ebx 80107dad: 83 ec 34 sub $0x34,%esp pde_t *pgdir; struct kmap *k; if((pgdir = (pde_t*)kalloc()) == 0) 80107db0: e8 55 ad ff ff call 80102b0a <kalloc> 80107db5: 89 45 f0 mov %eax,-0x10(%ebp) 80107db8: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 80107dbc: 75 0a jne 80107dc8 <setupkvm+0x1f> return 0; 80107dbe: b8 00 00 00 00 mov $0x0,%eax 80107dc3: e9 99 00 00 00 jmp 80107e61 <setupkvm+0xb8> memset(pgdir, 0, PGSIZE); 80107dc8: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 80107dcf: 00 80107dd0: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80107dd7: 00 80107dd8: 8b 45 f0 mov -0x10(%ebp),%eax 80107ddb: 89 04 24 mov %eax,(%esp) 80107dde: e8 e7 d3 ff ff call 801051ca <memset> if (p2v(PHYSTOP) > (void*)DEVSPACE) 80107de3: c7 04 24 00 00 00 0e movl $0xe000000,(%esp) 80107dea: e8 0d fa ff ff call 801077fc <p2v> 80107def: 3d 00 00 00 fe cmp $0xfe000000,%eax 80107df4: 76 0c jbe 80107e02 <setupkvm+0x59> panic("PHYSTOP too high"); 80107df6: c7 04 24 da 8b 10 80 movl $0x80108bda,(%esp) 80107dfd: e8 38 87 ff ff call 8010053a <panic> for(k = kmap; k < &kmap[NELEM(kmap)]; k++) 80107e02: c7 45 f4 c0 b4 10 80 movl $0x8010b4c0,-0xc(%ebp) 80107e09: eb 49 jmp 80107e54 <setupkvm+0xab> if(mappages(pgdir, k->virt, k->phys_end - k->phys_start, 80107e0b: 8b 45 f4 mov -0xc(%ebp),%eax 80107e0e: 8b 48 0c mov 0xc(%eax),%ecx 80107e11: 8b 45 f4 mov -0xc(%ebp),%eax 80107e14: 8b 50 04 mov 0x4(%eax),%edx 80107e17: 8b 45 f4 mov -0xc(%ebp),%eax 80107e1a: 8b 58 08 mov 0x8(%eax),%ebx 80107e1d: 8b 45 f4 mov -0xc(%ebp),%eax 80107e20: 8b 40 04 mov 0x4(%eax),%eax 80107e23: 29 c3 sub %eax,%ebx 80107e25: 8b 45 f4 mov -0xc(%ebp),%eax 80107e28: 8b 00 mov (%eax),%eax 80107e2a: 89 4c 24 10 mov %ecx,0x10(%esp) 80107e2e: 89 54 24 0c mov %edx,0xc(%esp) 80107e32: 89 5c 24 08 mov %ebx,0x8(%esp) 80107e36: 89 44 24 04 mov %eax,0x4(%esp) 80107e3a: 8b 45 f0 mov -0x10(%ebp),%eax 80107e3d: 89 04 24 mov %eax,(%esp) 80107e40: e8 d0 fe ff ff call 80107d15 <mappages> 80107e45: 85 c0 test %eax,%eax 80107e47: 79 07 jns 80107e50 <setupkvm+0xa7> (uint)k->phys_start, k->perm) < 0) return 0; 80107e49: b8 00 00 00 00 mov $0x0,%eax 80107e4e: eb 11 jmp 80107e61 <setupkvm+0xb8> if((pgdir = (pde_t*)kalloc()) == 0) return 0; memset(pgdir, 0, PGSIZE); if (p2v(PHYSTOP) > (void*)DEVSPACE) panic("PHYSTOP too high"); for(k = kmap; k < &kmap[NELEM(kmap)]; k++) 80107e50: 83 45 f4 10 addl $0x10,-0xc(%ebp) 80107e54: b8 00 b5 10 80 mov $0x8010b500,%eax 80107e59: 39 45 f4 cmp %eax,-0xc(%ebp) 80107e5c: 72 ad jb 80107e0b <setupkvm+0x62> if(mappages(pgdir, k->virt, k->phys_end - k->phys_start, (uint)k->phys_start, k->perm) < 0) return 0; return pgdir; 80107e5e: 8b 45 f0 mov -0x10(%ebp),%eax } 80107e61: 83 c4 34 add $0x34,%esp 80107e64: 5b pop %ebx 80107e65: 5d pop %ebp 80107e66: c3 ret 80107e67 <kvmalloc>: // Allocate one page table for the machine for the kernel address // space for scheduler processes. void kvmalloc(void) { 80107e67: 55 push %ebp 80107e68: 89 e5 mov %esp,%ebp 80107e6a: 83 ec 08 sub $0x8,%esp kpgdir = setupkvm(); 80107e6d: e8 37 ff ff ff call 80107da9 <setupkvm> 80107e72: a3 18 29 11 80 mov %eax,0x80112918 switchkvm(); 80107e77: e8 02 00 00 00 call 80107e7e <switchkvm> } 80107e7c: c9 leave 80107e7d: c3 ret 80107e7e <switchkvm>: // Switch h/w page table register to the kernel-only page table, // for when no process is running. void switchkvm(void) { 80107e7e: 55 push %ebp 80107e7f: 89 e5 mov %esp,%ebp 80107e81: 83 ec 04 sub $0x4,%esp lcr3(v2p(kpgdir)); // switch to the kernel page table 80107e84: a1 18 29 11 80 mov 0x80112918,%eax 80107e89: 89 04 24 mov %eax,(%esp) 80107e8c: e8 5e f9 ff ff call 801077ef <v2p> 80107e91: 89 04 24 mov %eax,(%esp) 80107e94: e8 4b f9 ff ff call 801077e4 <lcr3> } 80107e99: c9 leave 80107e9a: c3 ret 80107e9b <switchuvm>: // Switch TSS and h/w page table to correspond to process p. void switchuvm(struct proc *p) { 80107e9b: 55 push %ebp 80107e9c: 89 e5 mov %esp,%ebp 80107e9e: 53 push %ebx 80107e9f: 83 ec 14 sub $0x14,%esp pushcli(); 80107ea2: e8 1d d2 ff ff call 801050c4 <pushcli> cpu->gdt[SEG_TSS] = SEG16(STS_T32A, &cpu->ts, sizeof(cpu->ts)-1, 0); 80107ea7: 65 a1 00 00 00 00 mov %gs:0x0,%eax 80107ead: 65 8b 15 00 00 00 00 mov %gs:0x0,%edx 80107eb4: 83 c2 08 add $0x8,%edx 80107eb7: 89 d3 mov %edx,%ebx 80107eb9: 65 8b 15 00 00 00 00 mov %gs:0x0,%edx 80107ec0: 83 c2 08 add $0x8,%edx 80107ec3: c1 ea 10 shr $0x10,%edx 80107ec6: 89 d1 mov %edx,%ecx 80107ec8: 65 8b 15 00 00 00 00 mov %gs:0x0,%edx 80107ecf: 83 c2 08 add $0x8,%edx 80107ed2: c1 ea 18 shr $0x18,%edx 80107ed5: 66 c7 80 a0 00 00 00 movw $0x67,0xa0(%eax) 80107edc: 67 00 80107ede: 66 89 98 a2 00 00 00 mov %bx,0xa2(%eax) 80107ee5: 88 88 a4 00 00 00 mov %cl,0xa4(%eax) 80107eeb: 0f b6 88 a5 00 00 00 movzbl 0xa5(%eax),%ecx 80107ef2: 83 e1 f0 and $0xfffffff0,%ecx 80107ef5: 83 c9 09 or $0x9,%ecx 80107ef8: 88 88 a5 00 00 00 mov %cl,0xa5(%eax) 80107efe: 0f b6 88 a5 00 00 00 movzbl 0xa5(%eax),%ecx 80107f05: 83 c9 10 or $0x10,%ecx 80107f08: 88 88 a5 00 00 00 mov %cl,0xa5(%eax) 80107f0e: 0f b6 88 a5 00 00 00 movzbl 0xa5(%eax),%ecx 80107f15: 83 e1 9f and $0xffffff9f,%ecx 80107f18: 88 88 a5 00 00 00 mov %cl,0xa5(%eax) 80107f1e: 0f b6 88 a5 00 00 00 movzbl 0xa5(%eax),%ecx 80107f25: 83 c9 80 or $0xffffff80,%ecx 80107f28: 88 88 a5 00 00 00 mov %cl,0xa5(%eax) 80107f2e: 0f b6 88 a6 00 00 00 movzbl 0xa6(%eax),%ecx 80107f35: 83 e1 f0 and $0xfffffff0,%ecx 80107f38: 88 88 a6 00 00 00 mov %cl,0xa6(%eax) 80107f3e: 0f b6 88 a6 00 00 00 movzbl 0xa6(%eax),%ecx 80107f45: 83 e1 ef and $0xffffffef,%ecx 80107f48: 88 88 a6 00 00 00 mov %cl,0xa6(%eax) 80107f4e: 0f b6 88 a6 00 00 00 movzbl 0xa6(%eax),%ecx 80107f55: 83 e1 df and $0xffffffdf,%ecx 80107f58: 88 88 a6 00 00 00 mov %cl,0xa6(%eax) 80107f5e: 0f b6 88 a6 00 00 00 movzbl 0xa6(%eax),%ecx 80107f65: 83 c9 40 or $0x40,%ecx 80107f68: 88 88 a6 00 00 00 mov %cl,0xa6(%eax) 80107f6e: 0f b6 88 a6 00 00 00 movzbl 0xa6(%eax),%ecx 80107f75: 83 e1 7f and $0x7f,%ecx 80107f78: 88 88 a6 00 00 00 mov %cl,0xa6(%eax) 80107f7e: 88 90 a7 00 00 00 mov %dl,0xa7(%eax) cpu->gdt[SEG_TSS].s = 0; 80107f84: 65 a1 00 00 00 00 mov %gs:0x0,%eax 80107f8a: 0f b6 90 a5 00 00 00 movzbl 0xa5(%eax),%edx 80107f91: 83 e2 ef and $0xffffffef,%edx 80107f94: 88 90 a5 00 00 00 mov %dl,0xa5(%eax) cpu->ts.ss0 = SEG_KDATA << 3; 80107f9a: 65 a1 00 00 00 00 mov %gs:0x0,%eax 80107fa0: 66 c7 40 10 10 00 movw $0x10,0x10(%eax) cpu->ts.esp0 = (uint)proc->kstack + KSTACKSIZE; 80107fa6: 65 a1 00 00 00 00 mov %gs:0x0,%eax 80107fac: 65 8b 15 04 00 00 00 mov %gs:0x4,%edx 80107fb3: 8b 52 08 mov 0x8(%edx),%edx 80107fb6: 81 c2 00 10 00 00 add $0x1000,%edx 80107fbc: 89 50 0c mov %edx,0xc(%eax) ltr(SEG_TSS << 3); 80107fbf: c7 04 24 30 00 00 00 movl $0x30,(%esp) 80107fc6: e8 ee f7 ff ff call 801077b9 <ltr> if(p->pgdir == 0) 80107fcb: 8b 45 08 mov 0x8(%ebp),%eax 80107fce: 8b 40 04 mov 0x4(%eax),%eax 80107fd1: 85 c0 test %eax,%eax 80107fd3: 75 0c jne 80107fe1 <switchuvm+0x146> panic("switchuvm: no pgdir"); 80107fd5: c7 04 24 eb 8b 10 80 movl $0x80108beb,(%esp) 80107fdc: e8 59 85 ff ff call 8010053a <panic> lcr3(v2p(p->pgdir)); // switch to new address space 80107fe1: 8b 45 08 mov 0x8(%ebp),%eax 80107fe4: 8b 40 04 mov 0x4(%eax),%eax 80107fe7: 89 04 24 mov %eax,(%esp) 80107fea: e8 00 f8 ff ff call 801077ef <v2p> 80107fef: 89 04 24 mov %eax,(%esp) 80107ff2: e8 ed f7 ff ff call 801077e4 <lcr3> popcli(); 80107ff7: e8 10 d1 ff ff call 8010510c <popcli> } 80107ffc: 83 c4 14 add $0x14,%esp 80107fff: 5b pop %ebx 80108000: 5d pop %ebp 80108001: c3 ret 80108002 <inituvm>: // Load the initcode into address 0 of pgdir. // sz must be less than a page. void inituvm(pde_t *pgdir, char *init, uint sz) { 80108002: 55 push %ebp 80108003: 89 e5 mov %esp,%ebp 80108005: 83 ec 38 sub $0x38,%esp char *mem; if(sz >= PGSIZE) 80108008: 81 7d 10 ff 0f 00 00 cmpl $0xfff,0x10(%ebp) 8010800f: 76 0c jbe 8010801d <inituvm+0x1b> panic("inituvm: more than a page"); 80108011: c7 04 24 ff 8b 10 80 movl $0x80108bff,(%esp) 80108018: e8 1d 85 ff ff call 8010053a <panic> mem = kalloc(); 8010801d: e8 e8 aa ff ff call 80102b0a <kalloc> 80108022: 89 45 f4 mov %eax,-0xc(%ebp) memset(mem, 0, PGSIZE); 80108025: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 8010802c: 00 8010802d: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80108034: 00 80108035: 8b 45 f4 mov -0xc(%ebp),%eax 80108038: 89 04 24 mov %eax,(%esp) 8010803b: e8 8a d1 ff ff call 801051ca <memset> mappages(pgdir, 0, PGSIZE, v2p(mem), PTE_W|PTE_U); 80108040: 8b 45 f4 mov -0xc(%ebp),%eax 80108043: 89 04 24 mov %eax,(%esp) 80108046: e8 a4 f7 ff ff call 801077ef <v2p> 8010804b: c7 44 24 10 06 00 00 movl $0x6,0x10(%esp) 80108052: 00 80108053: 89 44 24 0c mov %eax,0xc(%esp) 80108057: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 8010805e: 00 8010805f: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80108066: 00 80108067: 8b 45 08 mov 0x8(%ebp),%eax 8010806a: 89 04 24 mov %eax,(%esp) 8010806d: e8 a3 fc ff ff call 80107d15 <mappages> memmove(mem, init, sz); 80108072: 8b 45 10 mov 0x10(%ebp),%eax 80108075: 89 44 24 08 mov %eax,0x8(%esp) 80108079: 8b 45 0c mov 0xc(%ebp),%eax 8010807c: 89 44 24 04 mov %eax,0x4(%esp) 80108080: 8b 45 f4 mov -0xc(%ebp),%eax 80108083: 89 04 24 mov %eax,(%esp) 80108086: e8 12 d2 ff ff call 8010529d <memmove> } 8010808b: c9 leave 8010808c: c3 ret 8010808d <loaduvm>: // Load a program segment into pgdir. addr must be page-aligned // and the pages from addr to addr+sz must already be mapped. int loaduvm(pde_t *pgdir, char *addr, struct inode *ip, uint offset, uint sz) { 8010808d: 55 push %ebp 8010808e: 89 e5 mov %esp,%ebp 80108090: 53 push %ebx 80108091: 83 ec 24 sub $0x24,%esp uint i, pa, n; pte_t *pte; if((uint) addr % PGSIZE != 0) 80108094: 8b 45 0c mov 0xc(%ebp),%eax 80108097: 25 ff 0f 00 00 and $0xfff,%eax 8010809c: 85 c0 test %eax,%eax 8010809e: 74 0c je 801080ac <loaduvm+0x1f> panic("loaduvm: addr must be page aligned"); 801080a0: c7 04 24 1c 8c 10 80 movl $0x80108c1c,(%esp) 801080a7: e8 8e 84 ff ff call 8010053a <panic> for(i = 0; i < sz; i += PGSIZE){ 801080ac: c7 45 e8 00 00 00 00 movl $0x0,-0x18(%ebp) 801080b3: e9 ae 00 00 00 jmp 80108166 <loaduvm+0xd9> if((pte = walkpgdir(pgdir, addr+i, 0)) == 0) 801080b8: 8b 45 e8 mov -0x18(%ebp),%eax 801080bb: 8b 55 0c mov 0xc(%ebp),%edx 801080be: 8d 04 02 lea (%edx,%eax,1),%eax 801080c1: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp) 801080c8: 00 801080c9: 89 44 24 04 mov %eax,0x4(%esp) 801080cd: 8b 45 08 mov 0x8(%ebp),%eax 801080d0: 89 04 24 mov %eax,(%esp) 801080d3: e8 a7 fb ff ff call 80107c7f <walkpgdir> 801080d8: 89 45 f4 mov %eax,-0xc(%ebp) 801080db: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 801080df: 75 0c jne 801080ed <loaduvm+0x60> panic("loaduvm: address should exist"); 801080e1: c7 04 24 3f 8c 10 80 movl $0x80108c3f,(%esp) 801080e8: e8 4d 84 ff ff call 8010053a <panic> pa = PTE_ADDR(*pte); 801080ed: 8b 45 f4 mov -0xc(%ebp),%eax 801080f0: 8b 00 mov (%eax),%eax 801080f2: 25 00 f0 ff ff and $0xfffff000,%eax 801080f7: 89 45 ec mov %eax,-0x14(%ebp) if(sz - i < PGSIZE) 801080fa: 8b 45 e8 mov -0x18(%ebp),%eax 801080fd: 8b 55 18 mov 0x18(%ebp),%edx 80108100: 89 d1 mov %edx,%ecx 80108102: 29 c1 sub %eax,%ecx 80108104: 89 c8 mov %ecx,%eax 80108106: 3d ff 0f 00 00 cmp $0xfff,%eax 8010810b: 77 11 ja 8010811e <loaduvm+0x91> n = sz - i; 8010810d: 8b 45 e8 mov -0x18(%ebp),%eax 80108110: 8b 55 18 mov 0x18(%ebp),%edx 80108113: 89 d1 mov %edx,%ecx 80108115: 29 c1 sub %eax,%ecx 80108117: 89 c8 mov %ecx,%eax 80108119: 89 45 f0 mov %eax,-0x10(%ebp) 8010811c: eb 07 jmp 80108125 <loaduvm+0x98> else n = PGSIZE; 8010811e: c7 45 f0 00 10 00 00 movl $0x1000,-0x10(%ebp) if(readi(ip, p2v(pa), offset+i, n) != n) 80108125: 8b 45 e8 mov -0x18(%ebp),%eax 80108128: 8b 55 14 mov 0x14(%ebp),%edx 8010812b: 8d 1c 02 lea (%edx,%eax,1),%ebx 8010812e: 8b 45 ec mov -0x14(%ebp),%eax 80108131: 89 04 24 mov %eax,(%esp) 80108134: e8 c3 f6 ff ff call 801077fc <p2v> 80108139: 8b 55 f0 mov -0x10(%ebp),%edx 8010813c: 89 54 24 0c mov %edx,0xc(%esp) 80108140: 89 5c 24 08 mov %ebx,0x8(%esp) 80108144: 89 44 24 04 mov %eax,0x4(%esp) 80108148: 8b 45 10 mov 0x10(%ebp),%eax 8010814b: 89 04 24 mov %eax,(%esp) 8010814e: e8 21 9c ff ff call 80101d74 <readi> 80108153: 3b 45 f0 cmp -0x10(%ebp),%eax 80108156: 74 07 je 8010815f <loaduvm+0xd2> return -1; 80108158: b8 ff ff ff ff mov $0xffffffff,%eax 8010815d: eb 18 jmp 80108177 <loaduvm+0xea> uint i, pa, n; pte_t *pte; if((uint) addr % PGSIZE != 0) panic("loaduvm: addr must be page aligned"); for(i = 0; i < sz; i += PGSIZE){ 8010815f: 81 45 e8 00 10 00 00 addl $0x1000,-0x18(%ebp) 80108166: 8b 45 e8 mov -0x18(%ebp),%eax 80108169: 3b 45 18 cmp 0x18(%ebp),%eax 8010816c: 0f 82 46 ff ff ff jb 801080b8 <loaduvm+0x2b> else n = PGSIZE; if(readi(ip, p2v(pa), offset+i, n) != n) return -1; } return 0; 80108172: b8 00 00 00 00 mov $0x0,%eax } 80108177: 83 c4 24 add $0x24,%esp 8010817a: 5b pop %ebx 8010817b: 5d pop %ebp 8010817c: c3 ret 8010817d <allocuvm>: // Allocate page tables and physical memory to grow process from oldsz to // newsz, which need not be page aligned. Returns new size or 0 on error. int allocuvm(pde_t *pgdir, uint oldsz, uint newsz) { 8010817d: 55 push %ebp 8010817e: 89 e5 mov %esp,%ebp 80108180: 83 ec 38 sub $0x38,%esp char *mem; uint a; if(newsz >= KERNBASE) 80108183: 8b 45 10 mov 0x10(%ebp),%eax 80108186: 85 c0 test %eax,%eax 80108188: 79 0a jns 80108194 <allocuvm+0x17> return 0; 8010818a: b8 00 00 00 00 mov $0x0,%eax 8010818f: e9 c1 00 00 00 jmp 80108255 <allocuvm+0xd8> if(newsz < oldsz) 80108194: 8b 45 10 mov 0x10(%ebp),%eax 80108197: 3b 45 0c cmp 0xc(%ebp),%eax 8010819a: 73 08 jae 801081a4 <allocuvm+0x27> return oldsz; 8010819c: 8b 45 0c mov 0xc(%ebp),%eax 8010819f: e9 b1 00 00 00 jmp 80108255 <allocuvm+0xd8> a = PGROUNDUP(oldsz); 801081a4: 8b 45 0c mov 0xc(%ebp),%eax 801081a7: 05 ff 0f 00 00 add $0xfff,%eax 801081ac: 25 00 f0 ff ff and $0xfffff000,%eax 801081b1: 89 45 f4 mov %eax,-0xc(%ebp) for(; a < newsz; a += PGSIZE){ 801081b4: e9 8d 00 00 00 jmp 80108246 <allocuvm+0xc9> mem = kalloc(); 801081b9: e8 4c a9 ff ff call 80102b0a <kalloc> 801081be: 89 45 f0 mov %eax,-0x10(%ebp) if(mem == 0){ 801081c1: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 801081c5: 75 2c jne 801081f3 <allocuvm+0x76> cprintf("allocuvm out of memory\n"); 801081c7: c7 04 24 5d 8c 10 80 movl $0x80108c5d,(%esp) 801081ce: e8 c7 81 ff ff call 8010039a <cprintf> deallocuvm(pgdir, newsz, oldsz); 801081d3: 8b 45 0c mov 0xc(%ebp),%eax 801081d6: 89 44 24 08 mov %eax,0x8(%esp) 801081da: 8b 45 10 mov 0x10(%ebp),%eax 801081dd: 89 44 24 04 mov %eax,0x4(%esp) 801081e1: 8b 45 08 mov 0x8(%ebp),%eax 801081e4: 89 04 24 mov %eax,(%esp) 801081e7: e8 6b 00 00 00 call 80108257 <deallocuvm> return 0; 801081ec: b8 00 00 00 00 mov $0x0,%eax 801081f1: eb 62 jmp 80108255 <allocuvm+0xd8> } memset(mem, 0, PGSIZE); 801081f3: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 801081fa: 00 801081fb: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80108202: 00 80108203: 8b 45 f0 mov -0x10(%ebp),%eax 80108206: 89 04 24 mov %eax,(%esp) 80108209: e8 bc cf ff ff call 801051ca <memset> mappages(pgdir, (char*)a, PGSIZE, v2p(mem), PTE_W|PTE_U); 8010820e: 8b 45 f0 mov -0x10(%ebp),%eax 80108211: 89 04 24 mov %eax,(%esp) 80108214: e8 d6 f5 ff ff call 801077ef <v2p> 80108219: 8b 55 f4 mov -0xc(%ebp),%edx 8010821c: c7 44 24 10 06 00 00 movl $0x6,0x10(%esp) 80108223: 00 80108224: 89 44 24 0c mov %eax,0xc(%esp) 80108228: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 8010822f: 00 80108230: 89 54 24 04 mov %edx,0x4(%esp) 80108234: 8b 45 08 mov 0x8(%ebp),%eax 80108237: 89 04 24 mov %eax,(%esp) 8010823a: e8 d6 fa ff ff call 80107d15 <mappages> return 0; if(newsz < oldsz) return oldsz; a = PGROUNDUP(oldsz); for(; a < newsz; a += PGSIZE){ 8010823f: 81 45 f4 00 10 00 00 addl $0x1000,-0xc(%ebp) 80108246: 8b 45 f4 mov -0xc(%ebp),%eax 80108249: 3b 45 10 cmp 0x10(%ebp),%eax 8010824c: 0f 82 67 ff ff ff jb 801081b9 <allocuvm+0x3c> return 0; } memset(mem, 0, PGSIZE); mappages(pgdir, (char*)a, PGSIZE, v2p(mem), PTE_W|PTE_U); } return newsz; 80108252: 8b 45 10 mov 0x10(%ebp),%eax } 80108255: c9 leave 80108256: c3 ret 80108257 <deallocuvm>: // newsz. oldsz and newsz need not be page-aligned, nor does newsz // need to be less than oldsz. oldsz can be larger than the actual // process size. Returns the new process size. int deallocuvm(pde_t *pgdir, uint oldsz, uint newsz) { 80108257: 55 push %ebp 80108258: 89 e5 mov %esp,%ebp 8010825a: 83 ec 28 sub $0x28,%esp pte_t *pte; uint a, pa; if(newsz >= oldsz) 8010825d: 8b 45 10 mov 0x10(%ebp),%eax 80108260: 3b 45 0c cmp 0xc(%ebp),%eax 80108263: 72 08 jb 8010826d <deallocuvm+0x16> return oldsz; 80108265: 8b 45 0c mov 0xc(%ebp),%eax 80108268: e9 a4 00 00 00 jmp 80108311 <deallocuvm+0xba> a = PGROUNDUP(newsz); 8010826d: 8b 45 10 mov 0x10(%ebp),%eax 80108270: 05 ff 0f 00 00 add $0xfff,%eax 80108275: 25 00 f0 ff ff and $0xfffff000,%eax 8010827a: 89 45 ec mov %eax,-0x14(%ebp) for(; a < oldsz; a += PGSIZE){ 8010827d: e9 80 00 00 00 jmp 80108302 <deallocuvm+0xab> pte = walkpgdir(pgdir, (char*)a, 0); 80108282: 8b 45 ec mov -0x14(%ebp),%eax 80108285: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp) 8010828c: 00 8010828d: 89 44 24 04 mov %eax,0x4(%esp) 80108291: 8b 45 08 mov 0x8(%ebp),%eax 80108294: 89 04 24 mov %eax,(%esp) 80108297: e8 e3 f9 ff ff call 80107c7f <walkpgdir> 8010829c: 89 45 e8 mov %eax,-0x18(%ebp) if(!pte) 8010829f: 83 7d e8 00 cmpl $0x0,-0x18(%ebp) 801082a3: 75 09 jne 801082ae <deallocuvm+0x57> a += (NPTENTRIES - 1) * PGSIZE; 801082a5: 81 45 ec 00 f0 3f 00 addl $0x3ff000,-0x14(%ebp) 801082ac: eb 4d jmp 801082fb <deallocuvm+0xa4> else if((*pte & PTE_P) != 0){ 801082ae: 8b 45 e8 mov -0x18(%ebp),%eax 801082b1: 8b 00 mov (%eax),%eax 801082b3: 83 e0 01 and $0x1,%eax 801082b6: 84 c0 test %al,%al 801082b8: 74 41 je 801082fb <deallocuvm+0xa4> pa = PTE_ADDR(*pte); 801082ba: 8b 45 e8 mov -0x18(%ebp),%eax 801082bd: 8b 00 mov (%eax),%eax 801082bf: 25 00 f0 ff ff and $0xfffff000,%eax 801082c4: 89 45 f0 mov %eax,-0x10(%ebp) if(pa == 0) 801082c7: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 801082cb: 75 0c jne 801082d9 <deallocuvm+0x82> panic("kfree"); 801082cd: c7 04 24 75 8c 10 80 movl $0x80108c75,(%esp) 801082d4: e8 61 82 ff ff call 8010053a <panic> char *v = p2v(pa); 801082d9: 8b 45 f0 mov -0x10(%ebp),%eax 801082dc: 89 04 24 mov %eax,(%esp) 801082df: e8 18 f5 ff ff call 801077fc <p2v> 801082e4: 89 45 f4 mov %eax,-0xc(%ebp) kfree(v); 801082e7: 8b 45 f4 mov -0xc(%ebp),%eax 801082ea: 89 04 24 mov %eax,(%esp) 801082ed: e8 7f a7 ff ff call 80102a71 <kfree> *pte = 0; 801082f2: 8b 45 e8 mov -0x18(%ebp),%eax 801082f5: c7 00 00 00 00 00 movl $0x0,(%eax) if(newsz >= oldsz) return oldsz; a = PGROUNDUP(newsz); for(; a < oldsz; a += PGSIZE){ 801082fb: 81 45 ec 00 10 00 00 addl $0x1000,-0x14(%ebp) 80108302: 8b 45 ec mov -0x14(%ebp),%eax 80108305: 3b 45 0c cmp 0xc(%ebp),%eax 80108308: 0f 82 74 ff ff ff jb 80108282 <deallocuvm+0x2b> char *v = p2v(pa); kfree(v); *pte = 0; } } return newsz; 8010830e: 8b 45 10 mov 0x10(%ebp),%eax } 80108311: c9 leave 80108312: c3 ret 80108313 <freevm>: // Free a page table and all the physical memory pages // in the user part. void freevm(pde_t *pgdir) { 80108313: 55 push %ebp 80108314: 89 e5 mov %esp,%ebp 80108316: 83 ec 28 sub $0x28,%esp uint i; if(pgdir == 0) 80108319: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 8010831d: 75 0c jne 8010832b <freevm+0x18> panic("freevm: no pgdir"); 8010831f: c7 04 24 7b 8c 10 80 movl $0x80108c7b,(%esp) 80108326: e8 0f 82 ff ff call 8010053a <panic> deallocuvm(pgdir, KERNBASE, 0); 8010832b: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp) 80108332: 00 80108333: c7 44 24 04 00 00 00 movl $0x80000000,0x4(%esp) 8010833a: 80 8010833b: 8b 45 08 mov 0x8(%ebp),%eax 8010833e: 89 04 24 mov %eax,(%esp) 80108341: e8 11 ff ff ff call 80108257 <deallocuvm> for(i = 0; i < NPDENTRIES; i++){ 80108346: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) 8010834d: eb 3c jmp 8010838b <freevm+0x78> if(pgdir[i] & PTE_P){ 8010834f: 8b 45 f0 mov -0x10(%ebp),%eax 80108352: c1 e0 02 shl $0x2,%eax 80108355: 03 45 08 add 0x8(%ebp),%eax 80108358: 8b 00 mov (%eax),%eax 8010835a: 83 e0 01 and $0x1,%eax 8010835d: 84 c0 test %al,%al 8010835f: 74 26 je 80108387 <freevm+0x74> char * v = p2v(PTE_ADDR(pgdir[i])); 80108361: 8b 45 f0 mov -0x10(%ebp),%eax 80108364: c1 e0 02 shl $0x2,%eax 80108367: 03 45 08 add 0x8(%ebp),%eax 8010836a: 8b 00 mov (%eax),%eax 8010836c: 25 00 f0 ff ff and $0xfffff000,%eax 80108371: 89 04 24 mov %eax,(%esp) 80108374: e8 83 f4 ff ff call 801077fc <p2v> 80108379: 89 45 f4 mov %eax,-0xc(%ebp) kfree(v); 8010837c: 8b 45 f4 mov -0xc(%ebp),%eax 8010837f: 89 04 24 mov %eax,(%esp) 80108382: e8 ea a6 ff ff call 80102a71 <kfree> uint i; if(pgdir == 0) panic("freevm: no pgdir"); deallocuvm(pgdir, KERNBASE, 0); for(i = 0; i < NPDENTRIES; i++){ 80108387: 83 45 f0 01 addl $0x1,-0x10(%ebp) 8010838b: 81 7d f0 ff 03 00 00 cmpl $0x3ff,-0x10(%ebp) 80108392: 76 bb jbe 8010834f <freevm+0x3c> if(pgdir[i] & PTE_P){ char * v = p2v(PTE_ADDR(pgdir[i])); kfree(v); } } kfree((char*)pgdir); 80108394: 8b 45 08 mov 0x8(%ebp),%eax 80108397: 89 04 24 mov %eax,(%esp) 8010839a: e8 d2 a6 ff ff call 80102a71 <kfree> } 8010839f: c9 leave 801083a0: c3 ret 801083a1 <clearpteu>: // Clear PTE_U on a page. Used to create an inaccessible // page beneath the user stack. void clearpteu(pde_t *pgdir, char *uva) { 801083a1: 55 push %ebp 801083a2: 89 e5 mov %esp,%ebp 801083a4: 83 ec 28 sub $0x28,%esp pte_t *pte; pte = walkpgdir(pgdir, uva, 0); 801083a7: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp) 801083ae: 00 801083af: 8b 45 0c mov 0xc(%ebp),%eax 801083b2: 89 44 24 04 mov %eax,0x4(%esp) 801083b6: 8b 45 08 mov 0x8(%ebp),%eax 801083b9: 89 04 24 mov %eax,(%esp) 801083bc: e8 be f8 ff ff call 80107c7f <walkpgdir> 801083c1: 89 45 f4 mov %eax,-0xc(%ebp) if(pte == 0) 801083c4: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 801083c8: 75 0c jne 801083d6 <clearpteu+0x35> panic("clearpteu"); 801083ca: c7 04 24 8c 8c 10 80 movl $0x80108c8c,(%esp) 801083d1: e8 64 81 ff ff call 8010053a <panic> *pte &= ~PTE_U; 801083d6: 8b 45 f4 mov -0xc(%ebp),%eax 801083d9: 8b 00 mov (%eax),%eax 801083db: 89 c2 mov %eax,%edx 801083dd: 83 e2 fb and $0xfffffffb,%edx 801083e0: 8b 45 f4 mov -0xc(%ebp),%eax 801083e3: 89 10 mov %edx,(%eax) } 801083e5: c9 leave 801083e6: c3 ret 801083e7 <copyuvm>: // Given a parent process's page table, create a copy // of it for a child. pde_t* copyuvm(pde_t *pgdir, uint sz) { 801083e7: 55 push %ebp 801083e8: 89 e5 mov %esp,%ebp 801083ea: 53 push %ebx 801083eb: 83 ec 44 sub $0x44,%esp pde_t *d; pte_t *pte; uint pa, i, flags; char *mem; if((d = setupkvm()) == 0) 801083ee: e8 b6 f9 ff ff call 80107da9 <setupkvm> 801083f3: 89 45 e0 mov %eax,-0x20(%ebp) 801083f6: 83 7d e0 00 cmpl $0x0,-0x20(%ebp) 801083fa: 75 0a jne 80108406 <copyuvm+0x1f> return 0; 801083fc: b8 00 00 00 00 mov $0x0,%eax 80108401: e9 fd 00 00 00 jmp 80108503 <copyuvm+0x11c> for(i = PGSIZE; i < sz; i += PGSIZE){ 80108406: c7 45 ec 00 10 00 00 movl $0x1000,-0x14(%ebp) 8010840d: e9 cc 00 00 00 jmp 801084de <copyuvm+0xf7> if((pte = walkpgdir(pgdir, (void *) i, 0)) == 0) 80108412: 8b 45 ec mov -0x14(%ebp),%eax 80108415: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp) 8010841c: 00 8010841d: 89 44 24 04 mov %eax,0x4(%esp) 80108421: 8b 45 08 mov 0x8(%ebp),%eax 80108424: 89 04 24 mov %eax,(%esp) 80108427: e8 53 f8 ff ff call 80107c7f <walkpgdir> 8010842c: 89 45 e4 mov %eax,-0x1c(%ebp) 8010842f: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 80108433: 75 0c jne 80108441 <copyuvm+0x5a> panic("copyuvm: pte should exist"); 80108435: c7 04 24 96 8c 10 80 movl $0x80108c96,(%esp) 8010843c: e8 f9 80 ff ff call 8010053a <panic> if(!(*pte & PTE_P)) 80108441: 8b 45 e4 mov -0x1c(%ebp),%eax 80108444: 8b 00 mov (%eax),%eax 80108446: 83 e0 01 and $0x1,%eax 80108449: 85 c0 test %eax,%eax 8010844b: 75 0c jne 80108459 <copyuvm+0x72> panic("copyuvm: page not present"); 8010844d: c7 04 24 b0 8c 10 80 movl $0x80108cb0,(%esp) 80108454: e8 e1 80 ff ff call 8010053a <panic> pa = PTE_ADDR(*pte); 80108459: 8b 45 e4 mov -0x1c(%ebp),%eax 8010845c: 8b 00 mov (%eax),%eax 8010845e: 25 00 f0 ff ff and $0xfffff000,%eax 80108463: 89 45 e8 mov %eax,-0x18(%ebp) flags = PTE_FLAGS(*pte); 80108466: 8b 45 e4 mov -0x1c(%ebp),%eax 80108469: 8b 00 mov (%eax),%eax 8010846b: 25 ff 0f 00 00 and $0xfff,%eax 80108470: 89 45 f0 mov %eax,-0x10(%ebp) if((mem = kalloc()) == 0) 80108473: e8 92 a6 ff ff call 80102b0a <kalloc> 80108478: 89 45 f4 mov %eax,-0xc(%ebp) 8010847b: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 8010847f: 74 6e je 801084ef <copyuvm+0x108> goto bad; memmove(mem, (char*)p2v(pa), PGSIZE); 80108481: 8b 45 e8 mov -0x18(%ebp),%eax 80108484: 89 04 24 mov %eax,(%esp) 80108487: e8 70 f3 ff ff call 801077fc <p2v> 8010848c: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 80108493: 00 80108494: 89 44 24 04 mov %eax,0x4(%esp) 80108498: 8b 45 f4 mov -0xc(%ebp),%eax 8010849b: 89 04 24 mov %eax,(%esp) 8010849e: e8 fa cd ff ff call 8010529d <memmove> if(mappages(d, (void*)i, PGSIZE, v2p(mem), flags) < 0) 801084a3: 8b 5d f0 mov -0x10(%ebp),%ebx 801084a6: 8b 45 f4 mov -0xc(%ebp),%eax 801084a9: 89 04 24 mov %eax,(%esp) 801084ac: e8 3e f3 ff ff call 801077ef <v2p> 801084b1: 8b 55 ec mov -0x14(%ebp),%edx 801084b4: 89 5c 24 10 mov %ebx,0x10(%esp) 801084b8: 89 44 24 0c mov %eax,0xc(%esp) 801084bc: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 801084c3: 00 801084c4: 89 54 24 04 mov %edx,0x4(%esp) 801084c8: 8b 45 e0 mov -0x20(%ebp),%eax 801084cb: 89 04 24 mov %eax,(%esp) 801084ce: e8 42 f8 ff ff call 80107d15 <mappages> 801084d3: 85 c0 test %eax,%eax 801084d5: 78 1b js 801084f2 <copyuvm+0x10b> uint pa, i, flags; char *mem; if((d = setupkvm()) == 0) return 0; for(i = PGSIZE; i < sz; i += PGSIZE){ 801084d7: 81 45 ec 00 10 00 00 addl $0x1000,-0x14(%ebp) 801084de: 8b 45 ec mov -0x14(%ebp),%eax 801084e1: 3b 45 0c cmp 0xc(%ebp),%eax 801084e4: 0f 82 28 ff ff ff jb 80108412 <copyuvm+0x2b> goto bad; memmove(mem, (char*)p2v(pa), PGSIZE); if(mappages(d, (void*)i, PGSIZE, v2p(mem), flags) < 0) goto bad; } return d; 801084ea: 8b 45 e0 mov -0x20(%ebp),%eax 801084ed: eb 14 jmp 80108503 <copyuvm+0x11c> if(!(*pte & PTE_P)) panic("copyuvm: page not present"); pa = PTE_ADDR(*pte); flags = PTE_FLAGS(*pte); if((mem = kalloc()) == 0) goto bad; 801084ef: 90 nop 801084f0: eb 01 jmp 801084f3 <copyuvm+0x10c> memmove(mem, (char*)p2v(pa), PGSIZE); if(mappages(d, (void*)i, PGSIZE, v2p(mem), flags) < 0) goto bad; 801084f2: 90 nop } return d; bad: freevm(d); 801084f3: 8b 45 e0 mov -0x20(%ebp),%eax 801084f6: 89 04 24 mov %eax,(%esp) 801084f9: e8 15 fe ff ff call 80108313 <freevm> return 0; 801084fe: b8 00 00 00 00 mov $0x0,%eax } 80108503: 83 c4 44 add $0x44,%esp 80108506: 5b pop %ebx 80108507: 5d pop %ebp 80108508: c3 ret 80108509 <uva2ka>: //PAGEBREAK! // Map user virtual address to kernel address. char* uva2ka(pde_t *pgdir, char *uva) { 80108509: 55 push %ebp 8010850a: 89 e5 mov %esp,%ebp 8010850c: 83 ec 28 sub $0x28,%esp pte_t *pte; pte = walkpgdir(pgdir, uva, 0); 8010850f: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp) 80108516: 00 80108517: 8b 45 0c mov 0xc(%ebp),%eax 8010851a: 89 44 24 04 mov %eax,0x4(%esp) 8010851e: 8b 45 08 mov 0x8(%ebp),%eax 80108521: 89 04 24 mov %eax,(%esp) 80108524: e8 56 f7 ff ff call 80107c7f <walkpgdir> 80108529: 89 45 f4 mov %eax,-0xc(%ebp) if((*pte & PTE_P) == 0) 8010852c: 8b 45 f4 mov -0xc(%ebp),%eax 8010852f: 8b 00 mov (%eax),%eax 80108531: 83 e0 01 and $0x1,%eax 80108534: 85 c0 test %eax,%eax 80108536: 75 07 jne 8010853f <uva2ka+0x36> return 0; 80108538: b8 00 00 00 00 mov $0x0,%eax 8010853d: eb 25 jmp 80108564 <uva2ka+0x5b> if((*pte & PTE_U) == 0) 8010853f: 8b 45 f4 mov -0xc(%ebp),%eax 80108542: 8b 00 mov (%eax),%eax 80108544: 83 e0 04 and $0x4,%eax 80108547: 85 c0 test %eax,%eax 80108549: 75 07 jne 80108552 <uva2ka+0x49> return 0; 8010854b: b8 00 00 00 00 mov $0x0,%eax 80108550: eb 12 jmp 80108564 <uva2ka+0x5b> return (char*)p2v(PTE_ADDR(*pte)); 80108552: 8b 45 f4 mov -0xc(%ebp),%eax 80108555: 8b 00 mov (%eax),%eax 80108557: 25 00 f0 ff ff and $0xfffff000,%eax 8010855c: 89 04 24 mov %eax,(%esp) 8010855f: e8 98 f2 ff ff call 801077fc <p2v> } 80108564: c9 leave 80108565: c3 ret 80108566 <copyout>: // Copy len bytes from p to user address va in page table pgdir. // Most useful when pgdir is not the current page table. // uva2ka ensures this only works for PTE_U pages. int copyout(pde_t *pgdir, uint va, void *p, uint len) { 80108566: 55 push %ebp 80108567: 89 e5 mov %esp,%ebp 80108569: 83 ec 28 sub $0x28,%esp char *buf, *pa0; uint n, va0; buf = (char*)p; 8010856c: 8b 45 10 mov 0x10(%ebp),%eax 8010856f: 89 45 e8 mov %eax,-0x18(%ebp) while(len > 0){ 80108572: e9 8b 00 00 00 jmp 80108602 <copyout+0x9c> va0 = (uint)PGROUNDDOWN(va); 80108577: 8b 45 0c mov 0xc(%ebp),%eax 8010857a: 25 00 f0 ff ff and $0xfffff000,%eax 8010857f: 89 45 f4 mov %eax,-0xc(%ebp) pa0 = uva2ka(pgdir, (char*)va0); 80108582: 8b 45 f4 mov -0xc(%ebp),%eax 80108585: 89 44 24 04 mov %eax,0x4(%esp) 80108589: 8b 45 08 mov 0x8(%ebp),%eax 8010858c: 89 04 24 mov %eax,(%esp) 8010858f: e8 75 ff ff ff call 80108509 <uva2ka> 80108594: 89 45 ec mov %eax,-0x14(%ebp) if(pa0 == 0) 80108597: 83 7d ec 00 cmpl $0x0,-0x14(%ebp) 8010859b: 75 07 jne 801085a4 <copyout+0x3e> return -1; 8010859d: b8 ff ff ff ff mov $0xffffffff,%eax 801085a2: eb 6d jmp 80108611 <copyout+0xab> n = PGSIZE - (va - va0); 801085a4: 8b 45 0c mov 0xc(%ebp),%eax 801085a7: 8b 55 f4 mov -0xc(%ebp),%edx 801085aa: 89 d1 mov %edx,%ecx 801085ac: 29 c1 sub %eax,%ecx 801085ae: 89 c8 mov %ecx,%eax 801085b0: 05 00 10 00 00 add $0x1000,%eax 801085b5: 89 45 f0 mov %eax,-0x10(%ebp) if(n > len) 801085b8: 8b 45 f0 mov -0x10(%ebp),%eax 801085bb: 3b 45 14 cmp 0x14(%ebp),%eax 801085be: 76 06 jbe 801085c6 <copyout+0x60> n = len; 801085c0: 8b 45 14 mov 0x14(%ebp),%eax 801085c3: 89 45 f0 mov %eax,-0x10(%ebp) memmove(pa0 + (va - va0), buf, n); 801085c6: 8b 45 f4 mov -0xc(%ebp),%eax 801085c9: 8b 55 0c mov 0xc(%ebp),%edx 801085cc: 89 d1 mov %edx,%ecx 801085ce: 29 c1 sub %eax,%ecx 801085d0: 89 c8 mov %ecx,%eax 801085d2: 03 45 ec add -0x14(%ebp),%eax 801085d5: 8b 55 f0 mov -0x10(%ebp),%edx 801085d8: 89 54 24 08 mov %edx,0x8(%esp) 801085dc: 8b 55 e8 mov -0x18(%ebp),%edx 801085df: 89 54 24 04 mov %edx,0x4(%esp) 801085e3: 89 04 24 mov %eax,(%esp) 801085e6: e8 b2 cc ff ff call 8010529d <memmove> len -= n; 801085eb: 8b 45 f0 mov -0x10(%ebp),%eax 801085ee: 29 45 14 sub %eax,0x14(%ebp) buf += n; 801085f1: 8b 45 f0 mov -0x10(%ebp),%eax 801085f4: 01 45 e8 add %eax,-0x18(%ebp) va = va0 + PGSIZE; 801085f7: 8b 45 f4 mov -0xc(%ebp),%eax 801085fa: 05 00 10 00 00 add $0x1000,%eax 801085ff: 89 45 0c mov %eax,0xc(%ebp) { char *buf, *pa0; uint n, va0; buf = (char*)p; while(len > 0){ 80108602: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 80108606: 0f 85 6b ff ff ff jne 80108577 <copyout+0x11> memmove(pa0 + (va - va0), buf, n); len -= n; buf += n; va = va0 + PGSIZE; } return 0; 8010860c: b8 00 00 00 00 mov $0x0,%eax } 80108611: c9 leave 80108612: c3 ret
37.526885
74
0.5374
[ "MIT-0" ]
tphan022/AssignmentTestCases
kernel.asm
665,802
Assembly
; A204539: a(n) = number of integers N=4k whose "basin" sequence (cf. comment) ends in n^2. ; 1,1,1,2,1,3,2,4,2,4,3,5,1,9,2,10,3,5,7,9,2,10,9,9,2,13,9,8,4,20,4,15,6,15,8,12,6,22,6,15,15,21,5,13,12,23,7,24,11,19,15,24,6,30,6,26,7,27,26,13,6,33,27,30,5,13,30,30,5,37,15,26,28,32,7,17,25,54,9,30,21,41,25,11,13,47,30,43,11,30,28,21,29,52,9,57,9,15,66,24,6,44,60,34,2,37,53,28,2,79,23,48,12,42,48,67,3,27,35,64,45,17,49,35,6,109,11,64,8,31,75,54,12,50,48,46,24,42,78,32,25,41,10,150,9,18,75,30,8,79,90,48,5,78,43,47,4,114,15,96,5,64,30,105,17,58,51,53,37,123,8,49,33,111,27,93,17,58,32,112,2,70,96,99,5,49,71,64,14,108,58,86,6,30,84,145,15,80,25,105,30,105,51,62,16,129,47,100,36,92,18,132,31,41,6,232,32,70,26,52,75,95,48,127,15,117,18,143,24,60,124,84,2,96,90,88,15,131,76,138,9,57,54,51,131,150,22,66,51,131 mov $5,2 mov $7,$0 lpb $5 sub $5,1 add $0,$5 sub $0,1 mov $2,$0 mov $4,2 lpb $2 mov $6,$4 lpb $6 add $4,1 trn $6,$2 lpe sub $2,1 lpe mov $3,$5 mov $8,$4 lpb $3 mov $1,$8 sub $3,1 lpe lpe lpb $7 sub $1,$8 mov $7,0 lpe sub $1,2 div $1,2 add $1,1
32.764706
714
0.593357
[ "Apache-2.0" ]
jmorken/loda
programs/oeis/204/A204539.asm
1,114
Assembly
;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> ; This program and the accompanying materials ; are licensed and made available under the terms and conditions of the BSD License ; which accompanies this distribution. The full text of the license may be found at ; http://opensource.org/licenses/bsd-license.php. ; ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. ; ; Module Name: ; ; ReadCr4.Asm ; ; Abstract: ; ; AsmReadCr4 function ; ; Notes: ; ;------------------------------------------------------------------------------ .586p .model flat,C .code ;------------------------------------------------------------------------------ ; UINTN ; EFIAPI ; AsmReadCr4 ( ; VOID ; ); ;------------------------------------------------------------------------------ AsmReadCr4 PROC mov eax, cr4 ret AsmReadCr4 ENDP END
25.756098
84
0.488636
[ "MIT" ]
Axoosha/icebox
third_party/virtualbox/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/Ia32/ReadCr4.asm
1,056
Assembly
; A214091: a(n) = 3^n - 2^(n+2). ; -3,-5,-7,-5,17,115,473,1675,5537,17635,54953,168955,515057,1561555,4717433,14217835,42784577,128615875,386371913,1160164315,3482590097,10451964595,31364282393,94109624395,282362427617,847154391715,2541597392873,7625060614075,22875718713137,68628229881235,205886837127353,617664806349355,1853003008982657,5559026206817155,16677112980189833,50031407660046235,150094360419092177,450283356135183475,1350850618161364313,4052552953995720715,12157661061010417697,36472987581077764195,109418971539326314793 mov $2,$0 add $0,2 mov $1,3 pow $1,$2 mov $3,2 pow $3,$0 sub $1,$3 mov $0,$1
51
500
0.826797
[ "Apache-2.0" ]
ckrause/loda-programs
oeis/214/A214091.asm
612
Assembly
; A142140: Primes congruent to 31 mod 37. ; Submitted by Jon Maiga ; 31,179,401,919,1289,1511,1733,2029,2251,2399,2473,2621,2843,2917,3361,3583,4027,4397,5507,5581,6173,6247,6469,6691,7283,7727,7949,8171,8467,8689,8837,9059,9133,9281,10169,10243,10391,10613,10687,10909,11057,11131,11279,11353,12241,12611,12907,13499,13721,14387,14461,14683,14831,15053,15349,15497,16607,16829,16903,17569,17791,17939,18013,18457,18679,19937,20011,20233,20899,21121,21269,21491,21713,21787,22157,22453,23563,24007,24229,24821,25117,25339,25561,25931,26153,26227,26449,26597,26893 mov $1,17 mov $2,$0 add $2,2 pow $2,2 lpb $2 sub $1,2 sub $2,2 mov $3,$1 mul $3,2 seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0. sub $0,$3 add $1,39 mov $4,$0 max $4,0 cmp $4,$0 mul $2,$4 lpe mul $1,2 mov $0,$1 sub $0,77
33.44
496
0.72488
[ "Apache-2.0" ]
ckrause/loda-programs
oeis/142/A142140.asm
836
Assembly
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r13 push %r15 push %r9 push %rax push %rbx push %rcx push %rdi push %rsi lea addresses_normal_ht+0x916f, %r9 nop nop nop xor %r15, %r15 movw $0x6162, (%r9) nop nop nop nop nop sub %rax, %rax lea addresses_WT_ht+0xc30f, %rsi sub %rbx, %rbx movb $0x61, (%rsi) nop nop add %r15, %r15 lea addresses_WC_ht+0x1449e, %r15 nop nop nop nop and $23425, %r10 mov (%r15), %r9 nop nop nop nop nop add $3068, %r10 lea addresses_WC_ht+0x4a6f, %r15 nop sub %r10, %r10 mov (%r15), %rbx nop and %rax, %rax lea addresses_WC_ht+0x19d5f, %rbx nop inc %rax mov (%rbx), %r13w nop nop nop nop add %rbx, %rbx lea addresses_UC_ht+0x858f, %rsi lea addresses_normal_ht+0x11c57, %rdi nop nop nop xor %r10, %r10 mov $51, %rcx rep movsl nop add $47888, %rdi lea addresses_UC_ht+0x800f, %r10 nop and %rax, %rax movb (%r10), %cl nop nop add %r15, %r15 lea addresses_UC_ht+0xd80f, %rcx nop and %r15, %r15 movw $0x6162, (%rcx) nop nop nop nop and $14024, %rcx lea addresses_WC_ht+0x64f, %r10 sub %rcx, %rcx movb $0x61, (%r10) nop nop inc %r10 lea addresses_WT_ht+0x1140f, %r13 nop nop cmp $2232, %r15 mov (%r13), %eax sub %r10, %r10 lea addresses_WC_ht+0x70f, %r9 nop nop cmp %r10, %r10 mov (%r9), %r13w nop nop nop nop nop and $34254, %rdi lea addresses_UC_ht+0x298f, %rdi clflush (%rdi) nop nop nop and $55592, %rbx movw $0x6162, (%rdi) nop nop nop nop nop sub $34929, %rcx pop %rsi pop %rdi pop %rcx pop %rbx pop %rax pop %r9 pop %r15 pop %r13 pop %r10 ret .global s_faulty_load s_faulty_load: push %r11 push %r8 push %rax push %rcx push %rsi // Faulty Load lea addresses_WC+0xa00f, %rsi nop nop add $38675, %r8 movb (%rsi), %al lea oracles, %rcx and $0xff, %rax shlq $12, %rax mov (%rcx,%rax,1), %rax pop %rsi pop %rcx pop %rax pop %r8 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_WC', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_WC', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'size': 2, 'AVXalign': True, 'NT': False, 'congruent': 3, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 4, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 4, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 4, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 3, 'same': True}} {'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': True}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'size': 1, 'AVXalign': True, 'NT': False, 'congruent': 2, 'same': True}} {'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'size': 4, 'AVXalign': False, 'NT': True, 'congruent': 7, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'size': 2, 'AVXalign': False, 'NT': True, 'congruent': 5, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 7, 'same': False}} {'38': 21829} 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 */
37.280899
2,999
0.6522
[ "MIT" ]
danielmgmi/medusa
Transynther/_processed/NONE/_xt_/i7-8650U_0xd2_notsx.log_21829_1125.asm
6,636
Assembly
; A010689: Periodic sequence: Repeat 1, 8. ; 1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1 mod $0,2 mov $1,8 pow $1,$0
40.571429
211
0.53169
[ "Apache-2.0" ]
jmorken/loda
programs/oeis/010/A010689.asm
284
Assembly
; Copyright © 2018, VideoLAN and dav1d authors ; Copyright © 2018, Two Orioles, LLC ; 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. ; ; 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 OWNER 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. %include "ext/x86/x86inc.asm" %if ARCH_X86_64 SECTION_RODATA 32 ; Note: The order of (at least some of) those constants matter! iadst4_dconly2a: dw 10568, 10568, 10568, 10568, 19856, 19856, 19856, 19856 iadst4_dconly2b: dw 26752, 26752, 26752, 26752, 30424, 30424, 30424, 30424 iadst4_dconly1a: dw 10568, 19856, 26752, 30424 iadst4_dconly1b: dw 30424, 26752, 19856, 10568 deint_shuf: db 0, 1, 4, 5, 8, 9, 12, 13, 2, 3, 6, 7, 10, 11, 14, 15 %macro COEF_PAIR 2 pw_%1_%2: dw %1, %2 pw_m%2_%1: dw -%2, %1 %endmacro ; ADST-only pw_3803_1321: dw 3803, 1321 pw_m1321_2482: dw -1321, 2482 pw_2482_3344: dw 2482, 3344 pw_m3803_3344: dw -3803, 3344 pw_m3803_m6688: dw -3803, -6688 %define pw_3344x8 iadst4_dconly2b pw_5: times 2 dw 5 pw_2048: times 2 dw 2048 pw_4096: times 2 dw 4096 pw_8192: times 2 dw 8192 pw_16384: times 2 dw 16384 pw_2896x8: times 2 dw 2896*8 pw_5793x4: times 2 dw 5793*4 pd_2048: dd 2048 COEF_PAIR 1567, 3784 COEF_PAIR 3784, 1567 COEF_PAIR 201, 4091 COEF_PAIR 995, 3973 COEF_PAIR 1751, 3703 COEF_PAIR 2440, 3290 COEF_PAIR 3035, 2751 COEF_PAIR 3513, 2106 COEF_PAIR 3857, 1380 COEF_PAIR 4052, 601 COEF_PAIR 401, 4076 COEF_PAIR 1931, 3612 COEF_PAIR 3166, 2598 COEF_PAIR 3920, 1189 COEF_PAIR 799, 4017 COEF_PAIR 3406, 2276 pw_m799_m4017: dw -799, -4017 pw_m1567_m3784: dw -1567, -3784 pw_m3406_m2276: dw -3406, -2276 pw_m401_m4076: dw -401, -4076 pw_m3166_m2598: dw -3166, -2598 pw_m1931_m3612: dw -1931, -3612 pw_m3920_m1189: dw -3920, -1189 COEF_PAIR 2276, 3406 COEF_PAIR 4017, 799 %macro COEF_X8 1-* %rep %0 dw %1*8, %1*8 %rotate 1 %endrep %endmacro pw_3703x8: COEF_X8 3703 pw_1751x8: COEF_X8 1751 pw_m1380x8: COEF_X8 -1380 pw_3857x8: COEF_X8 3857 pw_3973x8: COEF_X8 3973 pw_995x8: COEF_X8 995 pw_m2106x8: COEF_X8 -2106 pw_3513x8: COEF_X8 3513 pw_3290x8: COEF_X8 3290 pw_2440x8: COEF_X8 2440 pw_m601x8: COEF_X8 -601 pw_4052x8: COEF_X8 4052 idct64_mul: COEF_X8 4095, 101, 4065, 501, 2967, -2824, 3229, -2520 COEF_X8 3745, 1660, 3564, 2019, 3822, -1474, 3948, -1092 COEF_X8 3996, 897, 3889, 1285, 3461, -2191, 3659, -1842 COEF_X8 3349, 2359, 3102, 2675, 4036, -700, 4085, -301 pw_201_4091x8: dw 201*8, 4091*8 pw_m601_4052x8: dw -601*8, 4052*8 pw_995_3973x8: dw 995*8, 3973*8 pw_m1380_3857x8: dw -1380*8, 3857*8 pw_1751_3703x8: dw 1751*8, 3703*8 pw_m2106_3513x8: dw -2106*8, 3513*8 pw_2440_3290x8: dw 2440*8, 3290*8 pw_m2751_3035x8: dw -2751*8, 3035*8 %define o_idct64_offset idct64_mul - (o_base) - 8 SECTION .text ; Code size reduction trickery: Intead of using rip-relative loads with ; mandatory 4-byte offsets everywhere, we can set up a base pointer with a ; single rip-relative lea and then address things relative from that with ; 1-byte offsets as long as data is within +-128 bytes of the base pointer. %define o_base iadst4_dconly2a + 128 %define o(x) (rax - (o_base) + (x)) %macro REPX 2-* %xdefine %%f(x) %1 %rep %0 - 1 %rotate 1 %%f(%1) %endrep %endmacro %define m(x) mangle(private_prefix %+ _ %+ x %+ SUFFIX) ; flags: 1 = swap, 2 = interleave, 4: coef_regs %macro ITX_MUL2X_PACK 6-7 0 ; dst/src, tmp[1-2], rnd, coef[1-2], flags %if %7 & 4 pmaddwd m%2, m%5, m%1 pmaddwd m%1, m%6 %else %if %7 & 1 vpbroadcastd m%2, [o(pw_%5_%6)] vpbroadcastd m%3, [o(pw_m%6_%5)] %else vpbroadcastd m%2, [o(pw_m%6_%5)] vpbroadcastd m%3, [o(pw_%5_%6)] %endif pmaddwd m%2, m%1 pmaddwd m%1, m%3 %endif paddd m%2, m%4 paddd m%1, m%4 %if %7 & 2 pslld m%2, 4 psrld m%1, 12 pblendw m%1, m%2, 0xaa %else psrad m%2, 12 psrad m%1, 12 packssdw m%1, m%2 %endif %endmacro ; flags: 1 = swap, 2 = interleave, 4 = coef_regs %macro ITX_MUL4X_PACK 9-10 0 ; dst/src, tmp[1-3], rnd, coef[1-4], flags %if %10 & 1 vpbroadcastd m%3, [o(pw_%8_%9)] vpbroadcastd m%4, [o(pw_m%9_%8)] vpbroadcastd xm%2, [o(pw_%6_%7)] vpblendd m%2, m%2, m%3, 0xf0 vpbroadcastd xm%3, [o(pw_m%7_%6)] %else vpbroadcastd m%3, [o(pw_m%9_%8)] vpbroadcastd m%4, [o(pw_%8_%9)] vpbroadcastd xm%2, [o(pw_m%7_%6)] vpblendd m%2, m%2, m%3, 0xf0 vpbroadcastd xm%3, [o(pw_%6_%7)] %endif vpblendd m%3, m%3, m%4, 0xf0 ITX_MUL2X_PACK %1, %4, _, %5, %2, %3, (4|%10) %endmacro ; dst1 = (src1 * coef1 - src2 * coef2 + rnd) >> 12 ; dst2 = (src1 * coef2 + src2 * coef1 + rnd) >> 12 %macro ITX_MULSUB_2W 7 ; dst/src[1-2], tmp[1-2], rnd, coef[1-2] punpckhwd m%3, m%2, m%1 punpcklwd m%2, m%1 %if %7 < 32 pmaddwd m%1, m%7, m%2 pmaddwd m%4, m%7, m%3 %else vpbroadcastd m%1, [o(pw_m%7_%6)] pmaddwd m%4, m%3, m%1 pmaddwd m%1, m%2 %endif paddd m%4, m%5 paddd m%1, m%5 psrad m%4, 12 psrad m%1, 12 packssdw m%1, m%4 %if %7 < 32 pmaddwd m%3, m%6 pmaddwd m%2, m%6 %else vpbroadcastd m%4, [o(pw_%6_%7)] pmaddwd m%3, m%4 pmaddwd m%2, m%4 %endif paddd m%3, m%5 paddd m%2, m%5 psrad m%3, 12 psrad m%2, 12 packssdw m%2, m%3 %endmacro %macro IDCT4_1D 7 ; src[1-4], tmp[1-2], pd_2048 ITX_MULSUB_2W %2, %4, %5, %6, %7, 1567, 3784 ; t2, t3 vpbroadcastd m%6, [o(pw_2896x8)] paddw m%5, m%1, m%3 psubw m%1, m%3 pmulhrsw m%1, m%6 ; t1 pmulhrsw m%5, m%6 ; t0 psubsw m%3, m%1, m%2 paddsw m%2, m%1 paddsw m%1, m%5, m%4 psubsw m%4, m%5, m%4 %endmacro %macro IDCT8_1D 11 ; src[1-8], tmp[1-2], pd_2048 ITX_MULSUB_2W %6, %4, %9, %10, %11, 3406, 2276 ; t5a, t6a ITX_MULSUB_2W %2, %8, %9, %10, %11, 799, 4017 ; t4a, t7a ITX_MULSUB_2W %3, %7, %9, %10, %11, 1567, 3784 ; t2, t3 paddsw m%9, m%2, m%6 ; t4 psubsw m%2, m%6 ; t5a paddsw m%10, m%8, m%4 ; t7 psubsw m%8, m%4 ; t6a vpbroadcastd m%4, [o(pw_2896x8)] psubw m%6, m%1, m%5 paddw m%1, m%5 psubw m%5, m%8, m%2 paddw m%8, m%2 pmulhrsw m%1, m%4 ; t0 pmulhrsw m%6, m%4 ; t1 pmulhrsw m%8, m%4 ; t6 pmulhrsw m%5, m%4 ; t5 psubsw m%4, m%1, m%7 ; dct4 out3 paddsw m%1, m%7 ; dct4 out0 paddsw m%7, m%6, m%3 ; dct4 out1 psubsw m%6, m%3 ; dct4 out2 paddsw m%2, m%7, m%8 ; out1 psubsw m%7, m%8 ; out6 psubsw m%8, m%1, m%10 ; out7 paddsw m%1, m%10 ; out0 paddsw m%3, m%6, m%5 ; out2 psubsw m%6, m%5 ; out5 psubsw m%5, m%4, m%9 ; out4 paddsw m%4, m%9 ; out3 %endmacro ; in1 = %1, in3 = %2, in5 = %3, in7 = %4 ; in9 = %5, in11 = %6, in13 = %7, in15 = %8 %macro IDCT16_1D_ODDHALF 11 ; src[1-8], tmp[1-2], pd_2048 ITX_MULSUB_2W %1, %8, %9, %10, %11, 401, 4076 ; t8a, t15a ITX_MULSUB_2W %5, %4, %9, %10, %11, 3166, 2598 ; t9a, t14a ITX_MULSUB_2W %3, %6, %9, %10, %11, 1931, 3612 ; t10a, t13a ITX_MULSUB_2W %7, %2, %9, %10, %11, 3920, 1189 ; t11a, t12a psubsw m%9, m%2, m%6 ; t13 paddsw m%6, m%2 ; t12 psubsw m%2, m%8, m%4 ; t14 paddsw m%8, m%4 ; t15 psubsw m%4, m%7, m%3 ; t10 paddsw m%3, m%7 ; t11 psubsw m%7, m%1, m%5 ; t9 paddsw m%1, m%5 ; t8 ITX_MULSUB_2W %2, %7, %5, %10, %11, 1567, 3784 ; t9a, t14a ITX_MULSUB_2W %9, %4, %5, %10, %11, m3784, 1567 ; t10a, t13a vpbroadcastd m%10, [o(pw_2896x8)] psubsw m%5, m%2, m%9 ; t10 paddsw m%2, m%9 ; t9 psubsw m%9, m%1, m%3 ; t11a paddsw m%1, m%3 ; t8a psubsw m%3, m%7, m%4 ; t13 paddsw m%7, m%4 ; t14 psubsw m%4, m%8, m%6 ; t12a paddsw m%8, m%6 ; t15a paddw m%6, m%3, m%5 ; t13a psubw m%3, m%5 ; t10a paddw m%5, m%4, m%9 ; t12 psubw m%4, m%9 ; t11 REPX {pmulhrsw x, m%10}, m%6, m%3, m%5, m%4 %endmacro %macro WRAP_XMM 1+ INIT_XMM cpuname %1 INIT_YMM cpuname %endmacro %macro ITX4_END 4-5 2048 ; row[1-4], rnd %if %5 vpbroadcastd m2, [o(pw_%5)] pmulhrsw m0, m2 pmulhrsw m1, m2 %endif lea r2, [dstq+strideq*2] %assign %%i 1 %rep 4 %if %1 & 2 CAT_XDEFINE %%row_adr, %%i, r2 + strideq*(%1&1) %else CAT_XDEFINE %%row_adr, %%i, dstq + strideq*(%1&1) %endif %assign %%i %%i + 1 %rotate 1 %endrep movd m2, [%%row_adr1] pinsrd m2, [%%row_adr2], 1 movd m3, [%%row_adr3] pinsrd m3, [%%row_adr4], 1 pmovzxbw m2, m2 pmovzxbw m3, m3 paddw m0, m2 paddw m1, m3 packuswb m0, m1 movd [%%row_adr1], m0 pextrd [%%row_adr2], m0, 1 pextrd [%%row_adr3], m0, 2 pextrd [%%row_adr4], m0, 3 ret %endmacro %macro IWHT4_1D_PACKED 0 punpckhqdq m3, m0, m1 ; in1 in3 punpcklqdq m0, m1 ; in0 in2 psubw m2, m0, m3 paddw m0, m3 punpckhqdq m2, m2 ; t2 t2 punpcklqdq m0, m0 ; t0 t0 psubw m1, m0, m2 psraw m1, 1 psubw m1, m3 ; t1 t3 psubw m0, m1 ; ____ out0 paddw m2, m1 ; out3 ____ %endmacro INIT_XMM avx2 cglobal inv_txfm_add_wht_wht_4x4, 3, 3, 4, dst, stride, c mova m0, [cq+16*0] mova m1, [cq+16*1] pxor m2, m2 mova [cq+16*0], m2 mova [cq+16*1], m2 psraw m0, 2 psraw m1, 2 IWHT4_1D_PACKED punpckhwd m0, m1 punpcklwd m3, m1, m2 punpckhdq m1, m0, m3 punpckldq m0, m3 IWHT4_1D_PACKED vpblendd m0, m0, m2, 0x03 ITX4_END 3, 0, 2, 1, 0 %macro INV_TXFM_FN 4 ; type1, type2, fast_thresh, size cglobal inv_txfm_add_%1_%2_%4, 4, 5, 0, dst, stride, c, eob, tx2 %undef cmp %define %%p1 m(i%1_%4_internal) lea rax, [o_base] ; Jump to the 1st txfm function if we're not taking the fast path, which ; in turn performs an indirect jump to the 2nd txfm function. lea tx2q, [m(i%2_%4_internal).pass2] %if %3 > 0 cmp eobd, %3 jg %%p1 %elif %3 == 0 test eobd, eobd jnz %%p1 %else ; jump to the 1st txfm function unless it's located directly after this times ((%%end - %%p1) >> 31) & 1 jmp %%p1 ALIGN function_align %%end: %endif %endmacro %macro INV_TXFM_4X4_FN 2-3 -1 ; type1, type2, fast_thresh INV_TXFM_FN %1, %2, %3, 4x4 %ifidn %1_%2, dct_identity vpbroadcastd m0, [o(pw_2896x8)] pmulhrsw m0, [cq] vpbroadcastd m1, [o(pw_5793x4)] paddw m0, m0 pmulhrsw m0, m1 punpcklwd m0, m0 punpckhdq m1, m0, m0 punpckldq m0, m0 jmp m(iadst_4x4_internal).end %elifidn %1_%2, identity_dct mova m0, [cq+16*0] packusdw m0, [cq+16*1] vpbroadcastd m2, [o(pw_5793x4)] vpbroadcastd m3, [o(pw_2896x8)] packusdw m0, m0 paddw m0, m0 pmulhrsw m0, m2 pmulhrsw m0, m3 mova m1, m0 jmp m(iadst_4x4_internal).end %elif %3 >= 0 vpbroadcastw m0, [cq] %ifidn %1, dct vpbroadcastd m1, [o(pw_2896x8)] pmulhrsw m0, m1 %elifidn %1, adst movddup m1, [o(iadst4_dconly1a)] pmulhrsw m0, m1 %elifidn %1, flipadst movddup m1, [o(iadst4_dconly1b)] pmulhrsw m0, m1 %endif mov [cq], eobd ; 0 %ifidn %2, dct %ifnidn %1, dct vpbroadcastd m1, [o(pw_2896x8)] %endif pmulhrsw m0, m1 mova m1, m0 jmp m(iadst_4x4_internal).end2 %else ; adst / flipadst pmulhrsw m1, m0, [o(iadst4_dconly2b)] pmulhrsw m0, [o(iadst4_dconly2a)] jmp m(i%2_4x4_internal).end2 %endif %endif %endmacro %macro IDCT4_1D_PACKED 0-1 ; pw_2896x8 vpbroadcastd m4, [o(pd_2048)] punpckhwd m2, m1, m0 psubw m3, m0, m1 paddw m0, m1 punpcklqdq m0, m3 ITX_MUL2X_PACK 2, 1, 3, 4, 1567, 3784 %if %0 == 1 pmulhrsw m0, m%1 %else vpbroadcastd m4, [o(pw_2896x8)] pmulhrsw m0, m4 ; t0 t1 %endif psubsw m1, m0, m2 ; out3 out2 paddsw m0, m2 ; out0 out1 %endmacro %macro IADST4_1D_PACKED 0 punpcklwd m2, m1, m0 punpckhwd m3, m1, m0 psubw m0, m1 punpckhqdq m1, m1 paddw m1, m0 ; in0 - in2 + in3 vpbroadcastd m0, [o(pw_3803_1321)] vpbroadcastd m4, [o(pw_m1321_2482)] pmaddwd m0, m2 pmaddwd m2, m4 vpbroadcastd m4, [o(pw_2482_3344)] vpbroadcastd m5, [o(pw_m3803_3344)] pmaddwd m4, m3 pmaddwd m5, m3 paddd m4, m0 ; 1321*in0 + 3344*in1 + 3803*in2 + 2482*in3 vpbroadcastd m0, [o(pw_m3803_m6688)] pmaddwd m3, m0 vpbroadcastd m0, [o(pw_3344x8)] pmulhrsw m1, m0 ; out2 ____ vpbroadcastd m0, [o(pd_2048)] paddd m2, m0 paddd m0, m4 paddd m5, m2 ; 2482*in0 + 3344*in1 - 1321*in2 - 3803*in3 paddd m2, m4 paddd m2, m3 psrad m0, 12 psrad m5, 12 psrad m2, 12 packssdw m0, m5 ; out0 out1 packssdw m2, m2 ; out3 out3 %endmacro INV_TXFM_4X4_FN dct, dct, 0 INV_TXFM_4X4_FN dct, adst, 0 INV_TXFM_4X4_FN dct, flipadst, 0 INV_TXFM_4X4_FN dct, identity, 3 cglobal idct_4x4_internal, 0, 5, 6, dst, stride, c, eob, tx2 mova m0, [cq+16*0] mova m1, [cq+16*1] IDCT4_1D_PACKED mova m2, [o(deint_shuf)] shufps m3, m0, m1, q1331 shufps m0, m0, m1, q0220 pshufb m0, m2 pshufb m1, m3, m2 jmp tx2q .pass2: IDCT4_1D_PACKED pxor m2, m2 mova [cq+16*0], m2 mova [cq+16*1], m2 ITX4_END 0, 1, 3, 2 INV_TXFM_4X4_FN adst, dct, 0 INV_TXFM_4X4_FN adst, adst, 0 INV_TXFM_4X4_FN adst, flipadst, 0 INV_TXFM_4X4_FN adst, identity cglobal iadst_4x4_internal, 0, 5, 6, dst, stride, c, eob, tx2 mova m0, [cq+16*0] mova m1, [cq+16*1] call .main punpckhwd m3, m0, m2 punpcklwd m0, m1 punpckhwd m1, m0, m3 punpcklwd m0, m3 jmp tx2q .pass2: call .main vpblendd m1, m1, m2, 0x0c ; out2 out3 .end: pxor m2, m2 mova [cq+16*0], m2 mova [cq+16*1], m2 .end2: ITX4_END 0, 1, 2, 3 ALIGN function_align .main: IADST4_1D_PACKED ret INV_TXFM_4X4_FN flipadst, dct, 0 INV_TXFM_4X4_FN flipadst, adst, 0 INV_TXFM_4X4_FN flipadst, flipadst, 0 INV_TXFM_4X4_FN flipadst, identity cglobal iflipadst_4x4_internal, 0, 5, 6, dst, stride, c, eob, tx2 mova m0, [cq+16*0] mova m1, [cq+16*1] call m(iadst_4x4_internal).main punpcklwd m1, m0 punpckhwd m2, m0 punpcklwd m0, m2, m1 punpckhwd m1, m2, m1 jmp tx2q .pass2: call m(iadst_4x4_internal).main vpblendd m1, m1, m2, 0x0c ; out2 out3 .end: pxor m2, m2 mova [cq+16*0], m2 mova [cq+16*1], m2 .end2: ITX4_END 3, 2, 1, 0 INV_TXFM_4X4_FN identity, dct, 3 INV_TXFM_4X4_FN identity, adst INV_TXFM_4X4_FN identity, flipadst INV_TXFM_4X4_FN identity, identity cglobal iidentity_4x4_internal, 0, 5, 6, dst, stride, c, eob, tx2 mova m0, [cq+16*0] mova m1, [cq+16*1] vpbroadcastd m2, [o(pw_5793x4)] paddw m0, m0 paddw m1, m1 pmulhrsw m0, m2 pmulhrsw m1, m2 punpckhwd m2, m0, m1 punpcklwd m0, m1 punpckhwd m1, m0, m2 punpcklwd m0, m2 jmp tx2q .pass2: vpbroadcastd m2, [o(pw_5793x4)] paddw m0, m0 paddw m1, m1 pmulhrsw m0, m2 pmulhrsw m1, m2 jmp m(iadst_4x4_internal).end %macro WRITE_4X8 2 ; coefs[1-2] movd xm4, [dstq+strideq*0] pinsrd xm4, [dstq+strideq*1], 1 movd xm5, [dstq+strideq*2] pinsrd xm5, [dstq+r3 ], 1 pinsrd xm4, [r2 +strideq*0], 2 pinsrd xm4, [r2 +strideq*1], 3 pinsrd xm5, [r2 +strideq*2], 2 pinsrd xm5, [r2 +r3 ], 3 pmovzxbw m4, xm4 pmovzxbw m5, xm5 paddw m4, m%1 paddw m5, m%2 packuswb m4, m5 vextracti128 xm5, m4, 1 movd [dstq+strideq*0], xm4 pextrd [dstq+strideq*1], xm4, 1 pextrd [dstq+strideq*2], xm4, 2 pextrd [dstq+r3 ], xm4, 3 movd [r2 +strideq*0], xm5 pextrd [r2 +strideq*1], xm5, 1 pextrd [r2 +strideq*2], xm5, 2 pextrd [r2 +r3 ], xm5, 3 %endmacro %macro INV_TXFM_4X8_FN 2-3 -1 ; type1, type2, fast_thresh INV_TXFM_FN %1, %2, %3, 4x8 %if %3 >= 0 %ifidn %1_%2, dct_identity vpbroadcastd xm0, [o(pw_2896x8)] pmulhrsw xm1, xm0, [cq] vpbroadcastd xm2, [o(pw_4096)] pmulhrsw xm1, xm0 pmulhrsw xm1, xm2 vpermq m1, m1, q1100 punpcklwd m1, m1 punpckldq m0, m1, m1 punpckhdq m1, m1 jmp m(iadst_4x8_internal).end3 %elifidn %1_%2, identity_dct movd xm0, [cq+16*0] punpcklwd xm0, [cq+16*1] movd xm1, [cq+16*2] punpcklwd xm1, [cq+16*3] vpbroadcastd xm2, [o(pw_2896x8)] vpbroadcastd xm3, [o(pw_5793x4)] vpbroadcastd xm4, [o(pw_2048)] punpckldq xm0, xm1 pmulhrsw xm0, xm2 paddw xm0, xm0 pmulhrsw xm0, xm3 pmulhrsw xm0, xm2 pmulhrsw xm0, xm4 vpbroadcastq m0, xm0 mova m1, m0 jmp m(iadst_4x8_internal).end3 %elifidn %1_%2, dct_dct movd xm1, [o(pw_2896x8)] pmulhrsw xm0, xm1, [cq] movd xm2, [o(pw_2048)] mov [cq], eobd pmulhrsw xm0, xm1 pmulhrsw xm0, xm1 pmulhrsw xm0, xm2 vpbroadcastw m0, xm0 mova m1, m0 jmp m(iadst_4x8_internal).end4 %else ; adst_dct / flipadst_dct vpbroadcastw xm0, [cq] vpbroadcastd xm1, [o(pw_2896x8)] pmulhrsw xm0, xm1 pmulhrsw xm0, [o(iadst4_dconly1a)] vpbroadcastd xm2, [o(pw_2048)] mov [cq], eobd pmulhrsw xm0, xm1 pmulhrsw xm0, xm2 %ifidn %1, adst vpbroadcastq m0, xm0 %else ; flipadst vpermq m0, m0, q1111 %endif mova m1, m0 jmp m(iadst_4x8_internal).end4 %endif %endif %endmacro %macro IDCT8_1D_PACKED 0 vpbroadcastd m6, [o(pd_2048)] punpckhwd m5, m3, m0 ; in7 in1 punpckhwd m4, m1, m2 ; in3 in5 punpcklwd m3, m1 ; in2 in6 psubw m1, m0, m2 paddw m0, m2 punpcklqdq m0, m1 ; in0+in4 in0-in4 ITX_MUL2X_PACK 5, 1, 2, 6, 799, 4017, 1 ; t4a t7a ITX_MUL2X_PACK 4, 1, 2, 6, 3406, 2276, 1 ; t5a t6a ITX_MUL2X_PACK 3, 1, 2, 6, 1567, 3784 ; t3 t2 vpbroadcastd m6, [o(pw_2896x8)] psubsw m2, m5, m4 ; t4 t7 paddsw m5, m4 ; t5a t6a pshufd m4, m2, q1032 psubw m1, m2, m4 paddw m4, m2 vpblendd m4, m4, m1, 0xcc pmulhrsw m0, m6 ; t0 t1 pmulhrsw m4, m6 ; t6 t5 psubsw m1, m0, m3 ; tmp3 tmp2 paddsw m0, m3 ; tmp0 tmp1 shufps m2, m5, m4, q1032 ; t7 t6 vpblendd m5, m5, m4, 0xcc ; t4 t5 psubsw m3, m0, m2 ; out7 out6 paddsw m0, m2 ; out0 out1 psubsw m2, m1, m5 ; out4 out5 paddsw m1, m5 ; out3 out2 %endmacro %macro IADST8_1D_PACKED 0 vpbroadcastd m6, [o(pd_2048)] punpckhwd m0, m4, m3 ; 0 7 punpckhwd m1, m5, m2 ; 2 5 punpcklwd m2, m5 ; 4 3 punpcklwd m3, m4 ; 6 1 ITX_MUL2X_PACK 0, 4, 5, 6, 401, 4076 ; t0a t1a ITX_MUL2X_PACK 1, 4, 5, 6, 1931, 3612 ; t2a t3a ITX_MUL2X_PACK 2, 4, 5, 6, 3166, 2598 ; t4a t5a ITX_MUL2X_PACK 3, 4, 5, 6, 3920, 1189 ; t6a t7a psubsw m4, m0, m2 ; t4 t5 paddsw m0, m2 ; t0 t1 psubsw m5, m1, m3 ; t6 t7 paddsw m1, m3 ; t2 t3 shufps m2, m5, m4, q1032 punpckhwd m4, m2 punpcklwd m5, m2 ITX_MUL2X_PACK 4, 2, 3, 6, 1567, 3784, 1 ; t5a t4a ITX_MUL2X_PACK 5, 2, 3, 6, 3784, 1567 ; t7a t6a psubsw m2, m0, m1 ; t2 t3 paddsw m0, m1 ; out0 -out7 psubsw m1, m4, m5 ; t7 t6 paddsw m4, m5 ; out6 -out1 vpbroadcastd m5, [o(pw_2896x8)] vpblendd m3, m0, m4, 0x33 ; out6 -out7 vpblendd m0, m0, m4, 0xcc ; out0 -out1 shufps m4, m2, m1, q1032 ; t3 t7 vpblendd m1, m2, m1, 0xcc ; t2 t6 psubw m2, m1, m4 ; t2-t3 t6-t7 paddw m1, m4 ; t2+t3 t6+t7 pmulhrsw m2, m5 ; out4 -out5 pshufd m1, m1, q1032 pmulhrsw m1, m5 ; out2 -out3 %endmacro INIT_YMM avx2 INV_TXFM_4X8_FN dct, dct, 0 INV_TXFM_4X8_FN dct, identity, 7 INV_TXFM_4X8_FN dct, adst INV_TXFM_4X8_FN dct, flipadst cglobal idct_4x8_internal, 0, 5, 7, dst, stride, c, eob, tx2 vpermq m0, [cq+32*0], q3120 vpermq m1, [cq+32*1], q3120 vpbroadcastd m5, [o(pw_2896x8)] pmulhrsw m0, m5 pmulhrsw m1, m5 IDCT4_1D_PACKED 5 vbroadcasti128 m2, [o(deint_shuf)] shufps m3, m0, m1, q1331 shufps m0, m0, m1, q0220 pshufb m0, m2 pshufb m1, m3, m2 jmp tx2q .pass2: vextracti128 xm2, m0, 1 vextracti128 xm3, m1, 1 call .main vpbroadcastd m4, [o(pw_2048)] vinserti128 m0, m0, xm2, 1 vinserti128 m1, m1, xm3, 1 pshufd m1, m1, q1032 jmp m(iadst_4x8_internal).end2 ALIGN function_align .main: WRAP_XMM IDCT8_1D_PACKED ret INV_TXFM_4X8_FN adst, dct, 0 INV_TXFM_4X8_FN adst, adst INV_TXFM_4X8_FN adst, flipadst INV_TXFM_4X8_FN adst, identity cglobal iadst_4x8_internal, 0, 5, 7, dst, stride, c, eob, tx2 vpermq m0, [cq+32*0], q3120 vpermq m1, [cq+32*1], q3120 vpbroadcastd m2, [o(pw_2896x8)] pmulhrsw m0, m2 pmulhrsw m1, m2 call m(iadst_8x4_internal).main punpckhwd m3, m0, m2 punpcklwd m0, m1 punpckhwd m1, m0, m3 punpcklwd m0, m3 jmp tx2q .pass2: vextracti128 xm2, m0, 1 vextracti128 xm3, m1, 1 pshufd xm4, xm0, q1032 pshufd xm5, xm1, q1032 call .main vpbroadcastd m4, [o(pw_2048)] vinserti128 m0, m0, xm2, 1 vinserti128 m1, m1, xm3, 1 pxor m5, m5 psubw m5, m4 .end: vpblendd m4, m4, m5, 0xcc .end2: pmulhrsw m0, m4 pmulhrsw m1, m4 WIN64_RESTORE_XMM .end3: pxor m2, m2 mova [cq+32*0], m2 mova [cq+32*1], m2 .end4: lea r2, [dstq+strideq*4] lea r3, [strideq*3] WRITE_4X8 0, 1 RET ALIGN function_align .main: WRAP_XMM IADST8_1D_PACKED ret INV_TXFM_4X8_FN flipadst, dct, 0 INV_TXFM_4X8_FN flipadst, adst INV_TXFM_4X8_FN flipadst, flipadst INV_TXFM_4X8_FN flipadst, identity cglobal iflipadst_4x8_internal, 0, 5, 7, dst, stride, c, eob, tx2 vpermq m0, [cq+32*0], q3120 vpermq m1, [cq+32*1], q3120 vpbroadcastd m2, [o(pw_2896x8)] pmulhrsw m0, m2 pmulhrsw m1, m2 call m(iadst_8x4_internal).main punpcklwd m3, m1, m0 punpckhwd m1, m2, m0 punpcklwd m0, m1, m3 punpckhwd m1, m3 jmp tx2q .pass2: vextracti128 xm2, m0, 1 vextracti128 xm3, m1, 1 pshufd xm4, xm0, q1032 pshufd xm5, xm1, q1032 call m(iadst_4x8_internal).main vpbroadcastd m5, [o(pw_2048)] vinserti128 m3, m3, xm1, 1 vinserti128 m2, m2, xm0, 1 pxor m4, m4 psubw m4, m5 pshufd m0, m3, q1032 pshufd m1, m2, q1032 jmp m(iadst_4x8_internal).end INV_TXFM_4X8_FN identity, dct, 3 INV_TXFM_4X8_FN identity, adst INV_TXFM_4X8_FN identity, flipadst INV_TXFM_4X8_FN identity, identity cglobal iidentity_4x8_internal, 0, 5, 7, dst, stride, c, eob, tx2 vpermq m2, [cq+32*0], q3120 vpermq m0, [cq+32*1], q3120 vpbroadcastd m3, [o(pw_2896x8)] vpbroadcastd m4, [o(pw_5793x4)] punpcklwd m1, m2, m0 punpckhwd m2, m0 pmulhrsw m1, m3 pmulhrsw m2, m3 punpcklwd m0, m1, m2 punpckhwd m1, m2 paddw m0, m0 paddw m1, m1 pmulhrsw m0, m4 pmulhrsw m1, m4 jmp tx2q .pass2: vpbroadcastd m4, [o(pw_4096)] jmp m(iadst_4x8_internal).end2 %macro INV_TXFM_4X16_FN 2-3 -1 ; type1, type2, fast_thresh INV_TXFM_FN %1, %2, %3, 4x16 %if %3 >= 0 %ifidn %1_%2, dct_identity vpbroadcastd m0, [o(pw_2896x8)] pmulhrsw m0, [cq] vpbroadcastd m1, [o(pw_16384)] vpbroadcastd m2, [o(pw_5793x4)] vpbroadcastd m3, [o(pw_2048)] pmulhrsw m0, m1 psllw m0, 2 pmulhrsw m0, m2 pmulhrsw m3, m0 punpcklwd m1, m3, m3 punpckhwd m3, m3 punpckldq m0, m1, m1 punpckhdq m1, m1 punpckldq m2, m3, m3 punpckhdq m3, m3 jmp m(iadst_4x16_internal).end3 %elifidn %1_%2, identity_dct movd xm0, [cq+32*0] punpcklwd xm0, [cq+32*1] movd xm1, [cq+32*2] punpcklwd xm1, [cq+32*3] vpbroadcastd xm2, [o(pw_5793x4)] vpbroadcastd xm3, [o(pw_16384)] vpbroadcastd xm4, [o(pw_2896x8)] punpckldq xm0, xm1 paddw xm0, xm0 pmulhrsw xm0, xm2 pmulhrsw xm0, xm3 psrlw xm3, 3 ; pw_2048 pmulhrsw xm0, xm4 pmulhrsw xm0, xm3 vpbroadcastq m0, xm0 mova m1, m0 mova m2, m0 mova m3, m0 jmp m(iadst_4x16_internal).end3 %elifidn %1_%2, dct_dct movd xm1, [o(pw_2896x8)] pmulhrsw xm0, xm1, [cq] movd xm2, [o(pw_16384)] movd xm3, [o(pw_2048)] mov [cq], eobd pmulhrsw xm0, xm2 pmulhrsw xm0, xm1 pmulhrsw xm0, xm3 vpbroadcastw m0, xm0 mova m1, m0 mova m2, m0 mova m3, m0 jmp m(iadst_4x16_internal).end4 %else ; adst_dct / flipadst_dct vpbroadcastw xm0, [cq] pmulhrsw xm0, [o(iadst4_dconly1a)] vpbroadcastd xm1, [o(pw_16384)] vpbroadcastd xm2, [o(pw_2896x8)] mov [cq], eobd pmulhrsw xm0, xm1 psrlw xm1, 3 ; pw_2048 pmulhrsw xm0, xm2 pmulhrsw xm0, xm1 %ifidn %1, adst vpbroadcastq m0, xm0 %else ; flipadst vpermq m0, m0, q1111 %endif mova m1, m0 mova m2, m0 mova m3, m0 jmp m(iadst_4x16_internal).end4 %endif %endif %endmacro %macro IDCT16_1D_PACKED 0 vpbroadcastd m10, [o(pd_2048)] .main2: punpckhwd m8, m7, m0 ; dct16 in15 in1 paddw m9, m0, m4 psubw m0, m4 punpcklqdq m9, m0 ; dct4 in0+in2 in0-in2 punpckhwd m0, m3, m4 ; dct16 in7 in9 punpcklwd m7, m1 ; dct8 in7 in1 punpckhwd m1, m6 ; dct16 in3 in13 punpcklwd m3, m5 ; dct8 in3 in5 punpckhwd m5, m2 ; dct16 in11 in5 punpcklwd m6, m2 ; dct4 in3 in1 ITX_MUL2X_PACK 8, 2, 4, 10, 401, 4076, 3 ; t8a t15a ITX_MUL2X_PACK 0, 2, 4, 10, 3166, 2598, 3 ; t9a t14a ITX_MUL2X_PACK 1, 2, 4, 10, 3920, 1189, 3 ; t11a t12a ITX_MUL2X_PACK 5, 2, 4, 10, 1931, 3612, 3 ; t10a t13a ITX_MUL2X_PACK 7, 2, 4, 10, 799, 4017, 1 ; t4a t7a ITX_MUL2X_PACK 3, 2, 4, 10, 3406, 2276, 1 ; t5a t6a ITX_MUL2X_PACK 6, 2, 4, 10, 1567, 3784 ; t3 t2 psubsw m2, m8, m0 ; t9 t14 paddsw m8, m0 ; t8 t15 psubsw m0, m1, m5 ; t10 t13 paddsw m1, m5 ; t11 t12 %if mmsize > 16 vbroadcasti128 m5, [o(deint_shuf)] %else mova m5, [o(deint_shuf)] %endif pshufb m8, m5 pshufb m1, m5 vpbroadcastd m5, [o(pw_m3784_1567)] ; reuse pw_1567_3784 ITX_MUL2X_PACK 2, 4, _, 10, 4, 5, 4 ; t9a t14a vpbroadcastd m4, [o(pw_m1567_m3784)] ; reuse pw_m3784_1567 ITX_MUL2X_PACK 0, 5, _, 10, 5, 4, 4 ; t10a t13a psubsw m5, m7, m3 ; t5a t6a paddsw m7, m3 ; t4 t7 psubsw m4, m8, m1 ; t11a t12a paddsw m8, m1 ; t8a t15a paddsw m1, m2, m0 ; t9 t14 psubsw m2, m0 ; t10 t13 punpckhqdq m0, m8, m1 ; t15a t14 punpcklqdq m8, m1 ; t8a t9 pshufd m3, m5, q1032 psubw m1, m5, m3 paddw m3, m5 vpblendd m3, m3, m1, 0xcc ; t6 t5 vpbroadcastd m1, [o(pw_2896x8)] punpckhqdq m5, m4, m2 ; t12a t13 punpcklqdq m2, m4, m2 ; t11a t10 psubw m4, m5, m2 paddw m5, m2 pmulhrsw m9, m1 ; t0 t1 pmulhrsw m3, m1 ; t6 t5 pmulhrsw m4, m1 ; t11 t10a pmulhrsw m5, m1 ; t12 t13a shufps m2, m7, m3, q1032 ; t7 t6 vpblendd m7, m7, m3, 0xcc ; t4 t5 psubsw m1, m9, m6 ; dct4 out3 out2 paddsw m9, m6 ; dct4 out0 out1 psubsw m3, m9, m2 ; dct8 out7 out6 paddsw m9, m2 ; dct8 out0 out1 psubsw m2, m1, m7 ; dct8 out4 out5 paddsw m1, m7 ; dct8 out3 out2 psubsw m7, m9, m0 ; out15 out14 paddsw m0, m9 ; out0 out1 psubsw m6, m1, m5 ; out12 out13 paddsw m1, m5 ; out3 out2 psubsw m5, m2, m4 ; out11 out10 paddsw m2, m4 ; out4 out5 psubsw m4, m3, m8 ; out8 out9 paddsw m3, m8 ; out7 out6 %endmacro INV_TXFM_4X16_FN dct, dct, 0 INV_TXFM_4X16_FN dct, identity, 15 INV_TXFM_4X16_FN dct, adst INV_TXFM_4X16_FN dct, flipadst cglobal idct_4x16_internal, 0, 5, 11, dst, stride, c, eob, tx2 mova m0, [cq+32*0] mova m1, [cq+32*1] mova m2, [cq+32*2] mova m3, [cq+32*3] call m(idct_16x4_internal).main vpbroadcastd m5, [o(pw_16384)] punpckhwd m4, m2, m3 punpcklwd m2, m3 punpckhwd m3, m0, m1 punpcklwd m0, m1 REPX {pmulhrsw x, m5}, m0, m4, m2, m3 punpckhdq m1, m0, m2 punpckldq m0, m2 punpckldq m2, m3, m4 punpckhdq m3, m4 jmp tx2q .pass2: vextracti128 xm4, m0, 1 vextracti128 xm5, m1, 1 vextracti128 xm6, m2, 1 vextracti128 xm7, m3, 1 call .main vinserti128 m0, m0, xm4, 1 vinserti128 m1, m1, xm5, 1 vpbroadcastd m5, [o(pw_2048)] vinserti128 m2, m2, xm6, 1 vinserti128 m3, m3, xm7, 1 pshufd m1, m1, q1032 pshufd m3, m3, q1032 jmp m(iadst_4x16_internal).end2 ALIGN function_align .main: WRAP_XMM IDCT16_1D_PACKED ret INV_TXFM_4X16_FN adst, dct, 0 INV_TXFM_4X16_FN adst, adst INV_TXFM_4X16_FN adst, flipadst INV_TXFM_4X16_FN adst, identity cglobal iadst_4x16_internal, 0, 5, 11, dst, stride, c, eob, tx2 mova m0, [cq+32*0] mova m1, [cq+32*1] mova m2, [cq+32*2] mova m3, [cq+32*3] call m(iadst_16x4_internal).main vpbroadcastd m5, [o(pw_16384)] punpckhwd m4, m2, m3 punpcklwd m2, m3 punpckhwd m3, m0, m1 punpcklwd m0, m1 REPX {pmulhrsw x, m5}, m4, m2, m3, m0 punpckhdq m1, m0, m2 punpckldq m0, m2 punpckldq m2, m3, m4 punpckhdq m3, m4 jmp tx2q .pass2: call .main pshufd m1, m1, q1032 vpbroadcastd m5, [o(pw_2048)] vpblendd m4, m1, m0, 0x33 vpblendd m0, m0, m2, 0x33 vpblendd m2, m2, m3, 0x33 vpblendd m3, m3, m1, 0x33 vpermq m0, m0, q2031 vpermq m1, m2, q1302 vpermq m2, m3, q3120 vpermq m3, m4, q0213 psubw m6, m7, m5 .end: vpblendd m5, m5, m6, 0xcc .end2: REPX {pmulhrsw x, m5}, m0, m1, m2, m3 WIN64_RESTORE_XMM .end3: pxor m4, m4 mova [cq+32*0], m4 mova [cq+32*1], m4 mova [cq+32*2], m4 mova [cq+32*3], m4 .end4: lea r2, [dstq+strideq*8] lea r3, [strideq*3] WRITE_4X8 0, 1 lea dstq, [dstq+strideq*4] lea r2, [r2 +strideq*4] WRITE_4X8 2, 3 RET ALIGN function_align .main: vpblendd m4, m1, m0, 0xcc vpblendd m1, m1, m0, 0x33 vpblendd m5, m2, m3, 0xcc vpblendd m2, m2, m3, 0x33 vperm2i128 m3, m5, m2, 0x31 vinserti128 m0, m1, xm4, 1 ; in0 in3 in2 in1 vperm2i128 m4, m1, m4, 0x31 vinserti128 m1, m5, xm2, 1 ; in4 in7 in6 in5 pshufd m3, m3, q1032 ; in12 in15 in13 in14 pshufd m2, m4, q1032 ; in11 in8 in9 in10 .main2: vpbroadcastd m8, [o(pd_2048)] pxor m7, m7 punpckhwd m4, m3, m0 ; in12 in3 in14 in1 punpcklwd m0, m3 ; in0 in15 in2 in13 punpckhwd m3, m2, m1 ; in8 in7 in10 in5 punpcklwd m1, m2 ; in4 in11 in6 in9 ITX_MUL4X_PACK 0, 2, 5, 6, 8, 201, 4091, 995, 3973, 3 ITX_MUL4X_PACK 1, 2, 5, 6, 8, 1751, 3703, 2440, 3290, 3 ITX_MUL4X_PACK 3, 2, 5, 6, 8, 3035, 2751, 3513, 2106, 3 ITX_MUL4X_PACK 4, 2, 5, 6, 8, 3857, 1380, 4052, 601, 3 psubsw m2, m0, m3 ; t9a t8a t11a t10a paddsw m0, m3 ; t1a t0a t3a t2a psubsw m3, m1, m4 ; t13a t12a t15a t14a paddsw m1, m4 ; t5a t4a t7a t6a ITX_MUL4X_PACK 2, 4, 5, 6, 8, 799, 4017, 3406, 2276, 3 psubw m6, m7, m5 ITX_MUL2X_PACK 3, 5, _, 8, 6, 4, 6 vpbroadcastd m6, [o(pw_m3784_1567)] vpbroadcastd m5, [o(pw_1567_3784)] psubsw m4, m0, m1 ; t5 t4 t7 t6 paddsw m0, m1 ; t1 t0 t3 t2 psubsw m1, m2, m3 ; t13a t12a t15a t14a paddsw m2, m3 ; t9a t8a t11a t10a psubw m3, m7, m6 ; pw_3784_m1567 vpblendd m6, m6, m3, 0xf0 ITX_MUL2X_PACK 4, 3, _, 8, 6, 5, 4 ; t4a t5a t7a t6a ITX_MUL2X_PACK 1, 3, _, 8, 6, 5, 4 ; t12 t13 t15 t14 vbroadcasti128 m5, [o(deint_shuf)] pshufb m0, m5 pshufb m2, m5 vperm2i128 m3, m0, m2, 0x31 ; t3 t2 t11a t10a vinserti128 m0, m0, xm2, 1 ; t1 t0 t9a t8a vperm2i128 m2, m4, m1, 0x31 ; t7a t6a t15 t14 vinserti128 m4, m4, xm1, 1 ; t4a t5a t12 t13 vpbroadcastd m5, [o(pw_2896x8)] pshufd m2, m2, q1032 ; t6a t7a t14 t15 psubsw m1, m0, m3 ; t3a t2a t11 t10 paddsw m0, m3 ; -out15 out0 out14 -out1 paddsw m3, m4, m2 ; -out3 out12 out2 -out13 psubsw m4, m2 ; t6 t7 t14a t15a shufps m2, m1, m4, q1032 ; t2a t6 t10 t14a vpblendd m4, m4, m1, 0x33 ; t3a t7 t11 t15a paddw m1, m2, m4 psubw m2, m4 pmulhrsw m1, m5 ; -out7 out4 out6 -out5 pmulhrsw m2, m5 ; out8 -out11 -out9 out10 ret INV_TXFM_4X16_FN flipadst, dct, 0 INV_TXFM_4X16_FN flipadst, adst INV_TXFM_4X16_FN flipadst, flipadst INV_TXFM_4X16_FN flipadst, identity cglobal iflipadst_4x16_internal, 0, 5, 11, dst, stride, c, eob, tx2 mova m0, [cq+32*0] mova m1, [cq+32*1] mova m2, [cq+32*2] mova m3, [cq+32*3] call m(iadst_16x4_internal).main vpbroadcastd m5, [o(pw_16384)] punpcklwd m4, m1, m0 punpckhwd m1, m0 punpcklwd m0, m3, m2 punpckhwd m3, m2 REPX {pmulhrsw x, m5}, m4, m1, m0, m3 punpckldq m2, m3, m1 punpckhdq m3, m1 punpckhdq m1, m0, m4 punpckldq m0, m4 jmp tx2q .pass2: call m(iadst_4x16_internal).main pshufd m1, m1, q1032 vpbroadcastd m6, [o(pw_2048)] vpblendd m4, m0, m2, 0x33 vpblendd m0, m0, m1, 0xcc vpblendd m1, m1, m3, 0xcc vpblendd m2, m2, m3, 0x33 vpermq m0, m0, q3120 vpermq m1, m1, q0213 vpermq m2, m2, q2031 vpermq m3, m4, q1302 psubw m5, m7, m6 jmp m(iadst_4x16_internal).end INV_TXFM_4X16_FN identity, dct, 3 INV_TXFM_4X16_FN identity, adst INV_TXFM_4X16_FN identity, flipadst INV_TXFM_4X16_FN identity, identity cglobal iidentity_4x16_internal, 0, 5, 11, dst, stride, c, eob, tx2 mova m3, [cq+32*0] mova m2, [cq+32*1] mova m4, [cq+32*2] mova m0, [cq+32*3] vpbroadcastd m5, [o(pw_5793x4)] punpcklwd m1, m3, m2 punpckhwd m3, m2 punpcklwd m2, m4, m0 punpckhwd m4, m0 REPX {paddw x, x }, m1, m2, m3, m4 REPX {pmulhrsw x, m5}, m1, m2, m3, m4 vpbroadcastd m5, [o(pw_16384)] punpckldq m0, m1, m2 punpckhdq m1, m2 punpckldq m2, m3, m4 punpckhdq m3, m4 REPX {pmulhrsw x, m5}, m0, m1, m2, m3 jmp tx2q .pass2: vpbroadcastd m4, [o(pw_5793x4)] vpbroadcastd m5, [o(pw_2048)] REPX {psllw x, 2 }, m0, m1, m2, m3 REPX {pmulhrsw x, m4}, m0, m1, m2, m3 jmp m(iadst_4x16_internal).end2 %macro WRITE_8X4 4-7 strideq*1, strideq*2, r3, ; coefs[1-2], tmp[1-2], off[1-3] movq xm%3, [dstq ] movhps xm%3, [dstq+%5] movq xm%4, [dstq+%6] movhps xm%4, [dstq+%7] pmovzxbw m%3, xm%3 pmovzxbw m%4, xm%4 %ifnum %1 paddw m%3, m%1 %else paddw m%3, %1 %endif %ifnum %2 paddw m%4, m%2 %else paddw m%4, %2 %endif packuswb m%3, m%4 vextracti128 xm%4, m%3, 1 movq [dstq ], xm%3 movhps [dstq+%6], xm%3 movq [dstq+%5], xm%4 movhps [dstq+%7], xm%4 %endmacro %macro INV_TXFM_8X4_FN 2-3 -1 ; type1, type2, fast_thresh INV_TXFM_FN %1, %2, %3, 8x4 %if %3 >= 0 %ifidn %1_%2, dct_identity vpbroadcastd xm0, [o(pw_2896x8)] pmulhrsw xm1, xm0, [cq] vpbroadcastd xm2, [o(pw_5793x4)] vpbroadcastd xm3, [o(pw_2048)] pmulhrsw xm1, xm0 paddw xm1, xm1 pmulhrsw xm1, xm2 pmulhrsw xm1, xm3 punpcklwd xm1, xm1 punpckldq xm0, xm1, xm1 punpckhdq xm1, xm1 vpermq m0, m0, q1100 vpermq m1, m1, q1100 %elifidn %1_%2, identity_dct mova xm0, [cq+16*0] packusdw xm0, [cq+16*1] mova xm1, [cq+16*2] packusdw xm1, [cq+16*3] vpbroadcastd xm2, [o(pw_2896x8)] vpbroadcastd xm3, [o(pw_2048)] packusdw xm0, xm1 pmulhrsw xm0, xm2 paddw xm0, xm0 pmulhrsw xm0, xm2 pmulhrsw xm0, xm3 vinserti128 m0, m0, xm0, 1 mova m1, m0 %else movd xm1, [o(pw_2896x8)] pmulhrsw xm0, xm1, [cq] pmulhrsw xm0, xm1 %ifidn %2, dct movd xm2, [o(pw_2048)] pmulhrsw xm0, xm1 pmulhrsw xm0, xm2 vpbroadcastw m0, xm0 mova m1, m0 %else ; adst / flipadst vpbroadcastw m0, xm0 pmulhrsw m0, [o(iadst4_dconly2a)] vpbroadcastd m1, [o(pw_2048)] pmulhrsw m1, m0 %ifidn %2, adst vpermq m0, m1, q1100 vpermq m1, m1, q3322 %else ; flipadst vpermq m0, m1, q2233 vpermq m1, m1, q0011 %endif %endif %endif jmp m(iadst_8x4_internal).end3 %endif %endmacro INV_TXFM_8X4_FN dct, dct, 0 INV_TXFM_8X4_FN dct, adst, 0 INV_TXFM_8X4_FN dct, flipadst, 0 INV_TXFM_8X4_FN dct, identity, 3 cglobal idct_8x4_internal, 0, 5, 7, dst, stride, c, eob, tx2 vpbroadcastd xm3, [o(pw_2896x8)] pmulhrsw xm0, xm3, [cq+16*0] pmulhrsw xm1, xm3, [cq+16*1] pmulhrsw xm2, xm3, [cq+16*2] pmulhrsw xm3, [cq+16*3] call m(idct_4x8_internal).main vbroadcasti128 m4, [o(deint_shuf)] vinserti128 m3, m1, xm3, 1 vinserti128 m1, m0, xm2, 1 shufps m0, m1, m3, q0220 shufps m1, m1, m3, q1331 pshufb m0, m4 pshufb m1, m4 jmp tx2q .pass2: IDCT4_1D_PACKED vpermq m0, m0, q3120 vpermq m1, m1, q2031 jmp m(iadst_8x4_internal).end2 INV_TXFM_8X4_FN adst, dct INV_TXFM_8X4_FN adst, adst INV_TXFM_8X4_FN adst, flipadst INV_TXFM_8X4_FN adst, identity cglobal iadst_8x4_internal, 0, 5, 7, dst, stride, c, eob, tx2 vpbroadcastd xm0, [o(pw_2896x8)] pshufd xm4, [cq+16*0], q1032 pmulhrsw xm3, xm0, [cq+16*3] pshufd xm5, [cq+16*1], q1032 pmulhrsw xm2, xm0, [cq+16*2] pmulhrsw xm4, xm0 pmulhrsw xm5, xm0 call m(iadst_4x8_internal).main vinserti128 m0, m0, xm2, 1 vinserti128 m1, m1, xm3, 1 punpckhwd m2, m0, m1 punpcklwd m0, m1 pxor m3, m3 psubw m3, m2 punpckhwd m1, m0, m3 punpcklwd m0, m3 jmp tx2q .pass2: call .main vpblendd m1, m1, m2, 0xcc .end: vpermq m0, m0, q3120 vpermq m1, m1, q3120 .end2: vpbroadcastd m2, [o(pw_2048)] pmulhrsw m0, m2 pmulhrsw m1, m2 WIN64_RESTORE_XMM .end3: pxor m2, m2 mova [cq+32*0], m2 mova [cq+32*1], m2 lea r3, [strideq*3] WRITE_8X4 0, 1, 4, 5 RET ALIGN function_align .main: IADST4_1D_PACKED ret INV_TXFM_8X4_FN flipadst, dct INV_TXFM_8X4_FN flipadst, adst INV_TXFM_8X4_FN flipadst, flipadst INV_TXFM_8X4_FN flipadst, identity cglobal iflipadst_8x4_internal, 0, 5, 7, dst, stride, c, eob, tx2 vpbroadcastd xm0, [o(pw_2896x8)] pshufd xm4, [cq+16*0], q1032 pmulhrsw xm3, xm0, [cq+16*3] pshufd xm5, [cq+16*1], q1032 pmulhrsw xm2, xm0, [cq+16*2] pmulhrsw xm4, xm0 pmulhrsw xm5, xm0 call m(iadst_4x8_internal).main vinserti128 m3, m3, xm1, 1 vinserti128 m2, m2, xm0, 1 punpckhwd m1, m3, m2 punpcklwd m3, m2 pxor m0, m0 psubw m0, m1 punpckhwd m1, m0, m3 punpcklwd m0, m3 jmp tx2q .pass2: call m(iadst_8x4_internal).main vpblendd m2, m2, m1, 0x33 vpermq m1, m0, q2031 vpermq m0, m2, q2031 jmp m(iadst_8x4_internal).end2 INV_TXFM_8X4_FN identity, dct, 7 INV_TXFM_8X4_FN identity, adst INV_TXFM_8X4_FN identity, flipadst INV_TXFM_8X4_FN identity, identity cglobal iidentity_8x4_internal, 0, 5, 7, dst, stride, c, eob, tx2 mova xm2, [cq+16*0] mova xm0, [cq+16*1] vinserti128 m2, m2, [cq+16*2], 1 vinserti128 m0, m0, [cq+16*3], 1 vpbroadcastd m3, [o(pw_2896x8)] punpcklwd m1, m2, m0 punpckhwd m2, m0 pmulhrsw m1, m3 pmulhrsw m2, m3 punpcklwd m0, m1, m2 punpckhwd m1, m2 paddw m0, m0 paddw m1, m1 jmp tx2q .pass2: vpbroadcastd m2, [o(pw_5793x4)] paddw m0, m0 paddw m1, m1 pmulhrsw m0, m2 pmulhrsw m1, m2 jmp m(iadst_8x4_internal).end %macro INV_TXFM_8X8_FN 2-3 -1 ; type1, type2, fast_thresh INV_TXFM_FN %1, %2, %3, 8x8 %ifidn %1_%2, dct_identity vpbroadcastd xm0, [o(pw_2896x8)] pmulhrsw xm0, [cq] vpbroadcastd xm1, [o(pw_16384)] pmulhrsw xm0, xm1 psrlw xm1, 2 ; pw_4096 pmulhrsw xm0, xm1 pshufb xm0, [o(deint_shuf)] vpermq m3, m0, q1100 punpcklwd m3, m3 pshufd m0, m3, q0000 pshufd m1, m3, q1111 pshufd m2, m3, q2222 pshufd m3, m3, q3333 jmp m(iadst_8x8_internal).end4 %elif %3 >= 0 %ifidn %1, dct movd xm1, [o(pw_2896x8)] pmulhrsw xm0, xm1, [cq] movd xm2, [o(pw_16384)] mov [cq], eobd pmulhrsw xm0, xm2 psrlw xm2, 3 ; pw_2048 pmulhrsw xm0, xm1 pmulhrsw xm0, xm2 vpbroadcastw m0, xm0 .end: mov r2d, 2 .end2: lea r3, [strideq*3] .loop: WRITE_8X4 0, 0, 1, 2 lea dstq, [dstq+strideq*4] dec r2d jg .loop RET %else ; identity mova m0, [cq+32*0] punpcklwd m0, [cq+32*1] mova m1, [cq+32*2] punpcklwd m1, [cq+32*3] vpbroadcastd m2, [o(pw_2896x8)] vpbroadcastd m3, [o(pw_2048)] pxor m4, m4 mova [cq+32*0], m4 mova [cq+32*1], m4 mova [cq+32*2], m4 mova [cq+32*3], m4 punpckldq m0, m1 vpermq m1, m0, q3232 vpermq m0, m0, q1010 punpcklwd m0, m1 pmulhrsw m0, m2 pmulhrsw m0, m3 jmp m(inv_txfm_add_dct_dct_8x8).end %endif %endif %endmacro INV_TXFM_8X8_FN dct, dct, 0 INV_TXFM_8X8_FN dct, identity, 7 INV_TXFM_8X8_FN dct, adst INV_TXFM_8X8_FN dct, flipadst cglobal idct_8x8_internal, 0, 5, 7, dst, stride, c, eob, tx2 vpermq m0, [cq+32*0], q3120 ; 0 1 vpermq m3, [cq+32*3], q3120 ; 6 7 vpermq m2, [cq+32*2], q3120 ; 4 5 vpermq m1, [cq+32*1], q3120 ; 2 3 call .main shufps m4, m0, m1, q0220 shufps m5, m0, m1, q1331 shufps m1, m2, m3, q0220 shufps m3, m2, m3, q1331 vbroadcasti128 m0, [o(deint_shuf)] vpbroadcastd m2, [o(pw_16384)] REPX {pshufb x, m0}, m4, m5, m1, m3 REPX {pmulhrsw x, m2}, m4, m5, m1, m3 vinserti128 m0, m4, xm1, 1 vperm2i128 m2, m4, m1, 0x31 vinserti128 m1, m5, xm3, 1 vperm2i128 m3, m5, m3, 0x31 jmp tx2q .pass2: call .main vpbroadcastd m4, [o(pw_2048)] vpermq m0, m0, q3120 vpermq m1, m1, q2031 vpermq m2, m2, q3120 vpermq m3, m3, q2031 jmp m(iadst_8x8_internal).end2 ALIGN function_align .main: IDCT8_1D_PACKED ret INV_TXFM_8X8_FN adst, dct INV_TXFM_8X8_FN adst, adst INV_TXFM_8X8_FN adst, flipadst INV_TXFM_8X8_FN adst, identity cglobal iadst_8x8_internal, 0, 5, 7, dst, stride, c, eob, tx2 vpermq m4, [cq+32*0], q1302 ; 1 0 vpermq m3, [cq+32*3], q3120 ; 6 7 vpermq m5, [cq+32*1], q1302 ; 3 2 vpermq m2, [cq+32*2], q3120 ; 4 5 call .main vpbroadcastd m5, [o(pw_16384)] punpcklwd m4, m0, m1 punpckhwd m0, m1 punpcklwd m1, m2, m3 punpckhwd m2, m3 pxor m3, m3 psubw m3, m5 ; negate odd elements during rounding pmulhrsw m4, m5 pmulhrsw m0, m3 pmulhrsw m1, m5 pmulhrsw m2, m3 punpcklwd m3, m4, m0 punpckhwd m4, m0 punpcklwd m0, m1, m2 punpckhwd m1, m2 vperm2i128 m2, m3, m0, 0x31 vinserti128 m0, m3, xm0, 1 vperm2i128 m3, m4, m1, 0x31 vinserti128 m1, m4, xm1, 1 jmp tx2q .pass2: pshufd m4, m0, q1032 pshufd m5, m1, q1032 call .main vpbroadcastd m5, [o(pw_2048)] vpbroadcastd xm4, [o(pw_4096)] psubw m4, m5 ; lower half = 2048, upper half = -2048 .end: REPX {vpermq x, x, q3120}, m0, m1, m2, m3 .end2: pmulhrsw m0, m4 pmulhrsw m1, m4 .end3: pmulhrsw m2, m4 pmulhrsw m3, m4 WIN64_RESTORE_XMM .end4: pxor m4, m4 mova [cq+32*0], m4 mova [cq+32*1], m4 mova [cq+32*2], m4 mova [cq+32*3], m4 lea r3, [strideq*3] WRITE_8X4 0, 1, 4, 5 lea dstq, [dstq+strideq*4] WRITE_8X4 2, 3, 4, 5 RET ALIGN function_align .main: IADST8_1D_PACKED ret INV_TXFM_8X8_FN flipadst, dct INV_TXFM_8X8_FN flipadst, adst INV_TXFM_8X8_FN flipadst, flipadst INV_TXFM_8X8_FN flipadst, identity cglobal iflipadst_8x8_internal, 0, 5, 7, dst, stride, c, eob, tx2 vpermq m4, [cq+32*0], q1302 ; 1 0 vpermq m3, [cq+32*3], q3120 ; 6 7 vpermq m5, [cq+32*1], q1302 ; 3 2 vpermq m2, [cq+32*2], q3120 ; 4 5 call m(iadst_8x8_internal).main vpbroadcastd m5, [o(pw_16384)] punpckhwd m4, m3, m2 punpcklwd m3, m2 punpckhwd m2, m1, m0 punpcklwd m1, m0 pxor m0, m0 psubw m0, m5 pmulhrsw m4, m0 pmulhrsw m3, m5 pmulhrsw m2, m0 pmulhrsw m1, m5 punpckhwd m0, m4, m3 punpcklwd m4, m3 punpckhwd m3, m2, m1 punpcklwd m2, m1 vinserti128 m1, m0, xm3, 1 vperm2i128 m3, m0, m3, 0x31 vinserti128 m0, m4, xm2, 1 vperm2i128 m2, m4, m2, 0x31 jmp tx2q .pass2: pshufd m4, m0, q1032 pshufd m5, m1, q1032 call m(iadst_8x8_internal).main vpbroadcastd m4, [o(pw_2048)] vpbroadcastd xm5, [o(pw_4096)] psubw m4, m5 ; lower half = -2048, upper half = 2048 vpermq m5, m3, q2031 vpermq m3, m0, q2031 vpermq m0, m2, q2031 vpermq m2, m1, q2031 pmulhrsw m1, m0, m4 pmulhrsw m0, m5, m4 jmp m(iadst_8x8_internal).end3 INV_TXFM_8X8_FN identity, dct, 7 INV_TXFM_8X8_FN identity, adst INV_TXFM_8X8_FN identity, flipadst INV_TXFM_8X8_FN identity, identity cglobal iidentity_8x8_internal, 0, 5, 7, dst, stride, c, eob, tx2 mova xm3, [cq+16*0] mova xm2, [cq+16*1] vinserti128 m3, m3, [cq+16*4], 1 vinserti128 m2, m2, [cq+16*5], 1 mova xm4, [cq+16*2] mova xm0, [cq+16*3] vinserti128 m4, m4, [cq+16*6], 1 vinserti128 m0, m0, [cq+16*7], 1 punpcklwd m1, m3, m2 punpckhwd m3, m2 punpcklwd m2, m4, m0 punpckhwd m4, m0 punpckldq m0, m1, m2 punpckhdq m1, m2 punpckldq m2, m3, m4 punpckhdq m3, m4 jmp tx2q .pass2: vpbroadcastd m4, [o(pw_4096)] jmp m(iadst_8x8_internal).end %macro INV_TXFM_8X16_FN 2-3 -1 ; type1, type2, fast_thresh INV_TXFM_FN %1, %2, %3, 8x16 %ifidn %1_%2, dct_dct movd xm1, [o(pw_2896x8)] pmulhrsw xm0, xm1, [cq] movd xm2, [o(pw_16384)] mov [cq], eobd pmulhrsw xm0, xm1 pmulhrsw xm0, xm2 psrlw xm2, 3 ; pw_2048 pmulhrsw xm0, xm1 pmulhrsw xm0, xm2 vpbroadcastw m0, xm0 mov r2d, 4 jmp m(inv_txfm_add_dct_dct_8x8).end2 %elifidn %1_%2, dct_identity WIN64_SPILL_XMM 13 vpbroadcastd m0, [o(pw_2896x8)] pmulhrsw m7, m0, [cq] vpbroadcastd m1, [o(pw_16384)] vpbroadcastd m2, [o(pw_5793x4)] pxor m3, m3 mova [cq], m3 pmulhrsw m7, m0 pmulhrsw m7, m1 psrlw m1, 3 ; pw_2048 psllw m7, 2 pmulhrsw m7, m2 pmulhrsw m7, m1 punpcklwd m5, m7, m7 punpckhwd m7, m7 punpcklwd m4, m5, m5 punpckhwd m5, m5 punpcklwd m6, m7, m7 punpckhwd m7, m7 vpermq m0, m4, q1100 vpermq m1, m5, q1100 vpermq m2, m6, q1100 vpermq m3, m7, q1100 vpermq m4, m4, q3322 vpermq m5, m5, q3322 vpermq m6, m6, q3322 vpermq m7, m7, q3322 jmp m(idct_8x16_internal).end4 %elifidn %1_%2, identity_dct movd xm0, [cq+32*0] punpcklwd xm0, [cq+32*1] movd xm2, [cq+32*2] punpcklwd xm2, [cq+32*3] add cq, 32*4 movd xm1, [cq+32*0] punpcklwd xm1, [cq+32*1] movd xm3, [cq+32*2] punpcklwd xm3, [cq+32*3] vpbroadcastd xm4, [o(pw_2896x8)] vpbroadcastd xm5, [o(pw_2048)] xor eax, eax mov [cq-32*4], eax mov [cq-32*3], eax mov [cq-32*2], eax mov [cq-32*1], eax punpckldq xm0, xm2 punpckldq xm1, xm3 punpcklqdq xm0, xm1 pmulhrsw xm0, xm4 pmulhrsw xm0, xm4 pmulhrsw xm0, xm5 mov [cq+32*0], eax mov [cq+32*1], eax mov [cq+32*2], eax mov [cq+32*3], eax vinserti128 m0, m0, xm0, 1 mov r2d, 4 jmp m(inv_txfm_add_dct_dct_8x8).end2 %endif %endmacro %macro ITX_8X16_LOAD_COEFS 0 vpbroadcastd m4, [o(pw_2896x8)] pmulhrsw m0, m4, [cq+32*0] add cq, 32*4 pmulhrsw m7, m4, [cq+32*3] pmulhrsw m1, m4, [cq-32*3] pmulhrsw m6, m4, [cq+32*2] pmulhrsw m2, m4, [cq-32*2] pmulhrsw m5, m4, [cq+32*1] pmulhrsw m3, m4, [cq-32*1] pmulhrsw m4, [cq+32*0] %endmacro INV_TXFM_8X16_FN dct, dct, 0 INV_TXFM_8X16_FN dct, identity, 15 INV_TXFM_8X16_FN dct, adst INV_TXFM_8X16_FN dct, flipadst cglobal idct_8x16_internal, 0, 5, 13, dst, stride, c, eob, tx2 ITX_8X16_LOAD_COEFS call m(idct_16x8_internal).main vpbroadcastd m10, [o(pw_16384)] .pass1_end: vperm2i128 m9, m3, m7, 0x31 vinserti128 m3, m3, xm7, 1 vperm2i128 m8, m2, m6, 0x31 vinserti128 m2, m2, xm6, 1 vperm2i128 m6, m1, m5, 0x31 vinserti128 m1, m1, xm5, 1 vperm2i128 m5, m0, m4, 0x31 vinserti128 m0, m0, xm4, 1 punpckhwd m4, m2, m3 punpcklwd m2, m3 punpckhwd m3, m0, m1 punpcklwd m0, m1 .pass1_end2: punpckhwd m7, m5, m6 punpcklwd m5, m6 punpcklwd m6, m8, m9 punpckhwd m8, m9 REPX {pmulhrsw x, m10}, m2, m0, m4, m3, m5, m6, m7, m8 punpckhdq m1, m0, m2 punpckldq m0, m2 punpckldq m2, m3, m4 punpckhdq m3, m4 punpckldq m4, m5, m6 punpckhdq m5, m6 punpckldq m6, m7, m8 punpckhdq m7, m8 jmp tx2q .pass2: call .main REPX {vpermq x, x, q3120}, m0, m2, m4, m6 REPX {vpermq x, x, q2031}, m1, m3, m5, m7 .end: vpbroadcastd m8, [o(pw_2048)] .end2: REPX {pmulhrsw x, m8}, m0, m1, m2, m3, m4, m5, m6, m7 .end3: pxor m8, m8 REPX {mova [cq+32*x], m8}, -4, -3, -2, -1, 0, 1, 2, 3 .end4: lea r3, [strideq*3] WRITE_8X4 0, 1, 8, 9 lea dstq, [dstq+strideq*4] WRITE_8X4 2, 3, 0, 1 lea dstq, [dstq+strideq*4] WRITE_8X4 4, 5, 0, 1 lea dstq, [dstq+strideq*4] WRITE_8X4 6, 7, 0, 1 RET ALIGN function_align .main: IDCT16_1D_PACKED ret INV_TXFM_8X16_FN adst, dct INV_TXFM_8X16_FN adst, adst INV_TXFM_8X16_FN adst, flipadst INV_TXFM_8X16_FN adst, identity cglobal iadst_8x16_internal, 0, 5, 13, dst, stride, c, eob, tx2 ITX_8X16_LOAD_COEFS call m(iadst_16x8_internal).main vpbroadcastd m10, [o(pw_16384)] pslld m9, m10, 17 psubw m10, m9 ; 16384, -16384 jmp m(idct_8x16_internal).pass1_end ALIGN function_align .pass2: call .main vpbroadcastd m9, [o(pw_2048)] vpbroadcastd xm8, [o(pw_4096)] psubw m8, m9 REPX {vpermq x, x, q2031}, m0, m1, m2, m3 REPX {vpermq x, x, q3120}, m4, m5, m6, m7 jmp m(idct_8x16_internal).end2 ALIGN function_align .main: REPX {pshufd x, x, q1032}, m7, m1, m5, m3 .main2: vpbroadcastd m10, [o(pd_2048)] punpckhwd m8, m7, m0 ; in14 in1 punpcklwd m0, m7 ; in0 in15 punpcklwd m7, m6, m1 ; in12 in3 punpckhwd m1, m6 ; in2 in13 punpckhwd m6, m5, m2 ; in10 in5 punpcklwd m2, m5 ; in4 in11 punpcklwd m5, m4, m3 ; in8 in7 punpckhwd m3, m4 ; in6 in9 ITX_MUL2X_PACK 0, 4, 9, 10, 201, 4091, 3 ; t0 t1 ITX_MUL2X_PACK 1, 4, 9, 10, 995, 3973, 3 ; t2 t3 ITX_MUL2X_PACK 2, 4, 9, 10, 1751, 3703, 3 ; t4 t5 ITX_MUL2X_PACK 3, 4, 9, 10, 2440, 3290, 3 ; t6 t7 ITX_MUL2X_PACK 5, 4, 9, 10, 3035, 2751, 3 ; t8 t9 ITX_MUL2X_PACK 6, 4, 9, 10, 3513, 2106, 3 ; t10 t11 ITX_MUL2X_PACK 7, 4, 9, 10, 3857, 1380, 3 ; t12 t13 ITX_MUL2X_PACK 8, 4, 9, 10, 4052, 601, 3 ; t14 t15 psubsw m4, m0, m5 ; t9a t8a paddsw m0, m5 ; t1a t0a psubsw m5, m1, m6 ; t11a t10a paddsw m1, m6 ; t3a t2a psubsw m6, m2, m7 ; t13a t12a paddsw m2, m7 ; t5a t4a psubsw m7, m3, m8 ; t15a t14a paddsw m3, m8 ; t7a t6a vpbroadcastd m11, [o(pw_m4017_799)] vpbroadcastd m12, [o(pw_799_4017)] pxor m9, m9 ITX_MUL2X_PACK 4, 8, _, 10, 11, 12, 6 ; t8 t9 psubw m8, m9, m11 ; pw_4017_m799 ITX_MUL2X_PACK 6, 12, _, 10, 12, 8, 6 ; t12 t13 vpbroadcastd m11, [o(pw_m2276_3406)] vpbroadcastd m12, [o(pw_3406_2276)] ITX_MUL2X_PACK 5, 8, _, 10, 11, 12, 6 ; t10 t11 psubw m8, m9, m11 ; pw_2276_m3406 ITX_MUL2X_PACK 7, 12, _, 10, 12, 8, 6 ; t14 t15 psubsw m8, m1, m3 ; t7 t6 paddsw m1, m3 ; t3 t2 psubsw m3, m0, m2 ; t5 t4 paddsw m0, m2 ; t1 t0 psubsw m2, m5, m7 ; t14a t15a paddsw m7, m5 ; t10a t11a psubsw m5, m4, m6 ; t12a t13a paddsw m4, m6 ; t8a t9a vpbroadcastd m11, [o(pw_m3784_1567)] vpbroadcastd m12, [o(pw_1567_3784)] ITX_MUL2X_PACK 3, 6, _, 10, 11, 12, 4 ; t4a t5a psubw m6, m9, m11 ; pw_3784_m1567 ITX_MUL2X_PACK 8, 12, _, 10, 12, 6, 4 ; t6a t7a vpbroadcastd m11, [o(pw_m1567_3784)] vpbroadcastd m12, [o(pw_3784_1567)] ITX_MUL2X_PACK 2, 6, _, 10, 11, 12, 4 ; t15 t14 psubw m6, m9, m11 ; pw_1567_m3784 ITX_MUL2X_PACK 5, 12, _, 10, 12, 6, 4 ; t13 t12 vbroadcasti128 m11, [o(deint_shuf)] vpbroadcastd m12, [o(pw_2896x8)] psubsw m6, m0, m1 ; t3a t2a paddsw m0, m1 ; -out15 out0 paddsw m1, m2, m5 ; -out13 out2 psubsw m5, m2 ; t15a t14a paddsw m2, m4, m7 ; -out1 out14 psubsw m4, m7 ; t10 t11 psubsw m7, m3, m8 ; t6 t7 paddsw m8, m3 ; -out3 out12 REPX {pshufb x, m11}, m6, m4, m0, m2 vpblendd m3, m6, m4, 0xcc ; t3a t11 shufps m6, m6, m4, q1032 ; t2a t10 vpblendd m4, m5, m7, 0xcc ; t15a t7 shufps m5, m5, m7, q1032 ; t14a t6 shufps m7, m2, m0, q1032 ; out14 -out15 vpblendd m0, m0, m2, 0x33 ; -out1 out0 paddw m2, m5, m4 ; -out5 out4 psubw m5, m4 ; out10 -out11 psubw m4, m6, m3 ; out8 -out9 paddw m3, m6 ; -out7 out6 shufps m6, m8, m1, q1032 ; out12 -out13 vpblendd m1, m1, m8, 0x33 ; -out3 out2 REPX {pmulhrsw x, m12}, m2, m3, m4, m5 ret INV_TXFM_8X16_FN flipadst, dct INV_TXFM_8X16_FN flipadst, adst INV_TXFM_8X16_FN flipadst, flipadst INV_TXFM_8X16_FN flipadst, identity cglobal iflipadst_8x16_internal, 0, 5, 13, dst, stride, c, eob, tx2 ITX_8X16_LOAD_COEFS call m(iadst_16x8_internal).main vpbroadcastd m9, [o(pw_16384)] pslld m10, m9, 17 psubw m10, m9 ; -16384, 16384 vperm2i128 m9, m4, m0, 0x31 vinserti128 m0, m4, xm0, 1 vperm2i128 m8, m5, m1, 0x31 vinserti128 m4, m5, xm1, 1 vperm2i128 m5, m7, m3, 0x31 vinserti128 m3, m7, xm3, 1 vinserti128 m1, m6, xm2, 1 vperm2i128 m6, m6, m2, 0x31 punpcklwd m2, m4, m0 punpckhwd m4, m0 punpcklwd m0, m3, m1 punpckhwd m3, m1 jmp m(idct_8x16_internal).pass1_end2 .pass2: call m(iadst_8x16_internal).main vpbroadcastd m8, [o(pw_2048)] vpbroadcastd xm9, [o(pw_4096)] psubw m8, m9 vpermq m9, m0, q3120 vpermq m0, m7, q2031 vpermq m7, m1, q3120 vpermq m1, m6, q2031 vpermq m6, m2, q3120 vpermq m2, m5, q2031 vpermq m5, m3, q3120 vpermq m3, m4, q2031 pmulhrsw m0, m8 pmulhrsw m1, m8 pmulhrsw m2, m8 pmulhrsw m3, m8 pmulhrsw m4, m5, m8 pmulhrsw m5, m6, m8 pmulhrsw m6, m7, m8 pmulhrsw m7, m9, m8 jmp m(idct_8x16_internal).end3 INV_TXFM_8X16_FN identity, dct, 7 INV_TXFM_8X16_FN identity, adst INV_TXFM_8X16_FN identity, flipadst INV_TXFM_8X16_FN identity, identity cglobal iidentity_8x16_internal, 0, 5, 13, dst, stride, c, eob, tx2 mova xm3, [cq+16*0] mova xm2, [cq+16*2] add cq, 16*8 vinserti128 m3, m3, [cq+16*0], 1 vinserti128 m2, m2, [cq+16*2], 1 vpbroadcastd m9, [o(pw_2896x8)] mova xm4, [cq-16*4] mova xm5, [cq-16*2] vinserti128 m4, m4, [cq+16*4], 1 vinserti128 m5, m5, [cq+16*6], 1 mova xm7, [cq-16*7] mova xm6, [cq-16*5] vinserti128 m7, m7, [cq+16*1], 1 vinserti128 m6, m6, [cq+16*3], 1 mova xm8, [cq-16*3] mova xm0, [cq-16*1] vinserti128 m8, m8, [cq+16*5], 1 vinserti128 m0, m0, [cq+16*7], 1 punpcklwd m1, m3, m2 punpckhwd m3, m2 punpcklwd m2, m4, m5 punpckhwd m4, m5 punpcklwd m5, m7, m6 punpckhwd m7, m6 punpcklwd m6, m8, m0 punpckhwd m8, m0 REPX {pmulhrsw x, m9}, m1, m2, m3, m4, m5, m6, m7, m8 punpckldq m0, m1, m2 punpckhdq m1, m2 punpckldq m2, m3, m4 punpckhdq m3, m4 punpckldq m4, m5, m6 punpckhdq m5, m6 punpckldq m6, m7, m8 punpckhdq m7, m8 jmp tx2q .pass2: vpbroadcastd m8, [o(pw_5793x4)] REPX {psllw x, 2 }, m0, m1, m2, m3, m4, m5, m6, m7 REPX {vpermq x, x, q3120}, m0, m1, m2, m3, m4, m5, m6, m7 REPX {pmulhrsw x, m8 }, m0, m1, m2, m3, m4, m5, m6, m7 jmp m(idct_8x16_internal).end %macro WRITE_16X2 6 ; coefs[1-2], tmp[1-2], offset[1-2] pmovzxbw m%3, [dstq+%5] %ifnum %1 paddw m%3, m%1 %else paddw m%3, %1 %endif pmovzxbw m%4, [dstq+%6] %ifnum %2 paddw m%4, m%2 %else paddw m%4, %2 %endif packuswb m%3, m%4 vpermq m%3, m%3, q3120 mova [dstq+%5], xm%3 vextracti128 [dstq+%6], m%3, 1 %endmacro %macro INV_TXFM_16X4_FN 2-3 -1 ; type1, type2, fast_thresh INV_TXFM_FN %1, %2, %3, 16x4 %if %3 >= 0 %ifidn %1_%2, dct_identity vpbroadcastd xm3, [o(pw_2896x8)] pmulhrsw xm3, [cq] vpbroadcastd xm0, [o(pw_16384)] vpbroadcastd xm1, [o(pw_5793x4)] pmulhrsw xm3, xm0 psrlw xm0, 3 ; pw_2048 paddw xm3, xm3 pmulhrsw xm3, xm1 pmulhrsw xm3, xm0 punpcklwd xm3, xm3 punpckldq xm1, xm3, xm3 punpckhdq xm3, xm3 vpbroadcastq m0, xm1 vpermq m1, m1, q1111 vpbroadcastq m2, xm3 vpermq m3, m3, q1111 jmp m(iadst_16x4_internal).end2 %elifidn %1_%2, identity_dct mova xm0, [cq+16*0] mova xm2, [cq+16*1] vinserti128 m0, m0, [cq+16*4], 1 vinserti128 m2, m2, [cq+16*5], 1 mova xm1, [cq+16*2] mova xm3, [cq+16*3] vinserti128 m1, m1, [cq+16*6], 1 vinserti128 m3, m3, [cq+16*7], 1 vpbroadcastd m4, [o(pw_5793x4)] vpbroadcastd m5, [o(pw_16384)] packusdw m0, m2 packusdw m1, m3 packusdw m0, m1 vpbroadcastd m1, [o(pw_2896x8)] psllw m0, 2 pmulhrsw m0, m4 pmulhrsw m0, m5 psrlw m5, 3 ; pw_2048 pmulhrsw m0, m1 pmulhrsw m0, m5 mov r3d, 2 .end: pxor m3, m3 .end_loop: mova [cq+32*0], m3 mova [cq+32*1], m3 add cq, 32*2 WRITE_16X2 0, 0, 1, 2, strideq*0, strideq*1 lea dstq, [dstq+strideq*2] dec r3d jg .end_loop RET %else movd xm1, [o(pw_2896x8)] pmulhrsw xm0, xm1, [cq] %ifidn %2, dct movd xm2, [o(pw_16384)] mov [cq], eobd mov r2d, 2 .dconly: pmulhrsw xm0, xm2 movd xm2, [pw_2048] ; intentionally rip-relative pmulhrsw xm0, xm1 pmulhrsw xm0, xm2 vpbroadcastw m0, xm0 pxor m3, m3 .dconly_loop: mova xm1, [dstq] vinserti128 m1, m1, [dstq+strideq], 1 punpckhbw m2, m1, m3 punpcklbw m1, m3 paddw m2, m0 paddw m1, m0 packuswb m1, m2 mova [dstq], xm1 vextracti128 [dstq+strideq], m1, 1 lea dstq, [dstq+strideq*2] dec r2d jg .dconly_loop RET %else ; adst / flipadst movd xm2, [o(pw_16384)] pmulhrsw xm0, xm2 vpbroadcastw m0, xm0 pmulhrsw m0, [o(iadst4_dconly2a)] vpbroadcastd m3, [o(pw_2048)] mov [cq], eobd pmulhrsw m3, m0 %ifidn %2, adst vpbroadcastq m0, xm3 vpermq m1, m3, q1111 vpermq m2, m3, q2222 vpermq m3, m3, q3333 %else ; flipadst vpermq m0, m3, q3333 vpermq m1, m3, q2222 vpermq m2, m3, q1111 vpbroadcastq m3, xm3 %endif jmp m(iadst_16x4_internal).end3 %endif %endif %endif %endmacro INV_TXFM_16X4_FN dct, dct, 0 INV_TXFM_16X4_FN dct, adst, 0 INV_TXFM_16X4_FN dct, flipadst, 0 INV_TXFM_16X4_FN dct, identity, 3 cglobal idct_16x4_internal, 0, 5, 11, dst, stride, c, eob, tx2 mova xm0, [cq+16*0] mova xm1, [cq+16*1] mova xm2, [cq+16*2] mova xm3, [cq+16*3] mova xm4, [cq+16*4] mova xm5, [cq+16*5] mova xm6, [cq+16*6] mova xm7, [cq+16*7] call m(idct_4x16_internal).main vinserti128 m6, m2, xm6, 1 vinserti128 m2, m0, xm4, 1 vinserti128 m0, m1, xm5, 1 vinserti128 m1, m3, xm7, 1 punpcklwd m3, m2, m6 punpckhwd m2, m6 vpbroadcastd m6, [o(pw_16384)] punpckhwd m4, m0, m1 punpcklwd m0, m1 mova m1, m6 jmp m(iadst_16x4_internal).pass1_end .pass2: call .main jmp m(iadst_16x4_internal).end ALIGN function_align .main: vpbroadcastd m6, [o(pd_2048)] IDCT4_1D 0, 1, 2, 3, 4, 5, 6 ret INV_TXFM_16X4_FN adst, dct INV_TXFM_16X4_FN adst, adst INV_TXFM_16X4_FN adst, flipadst INV_TXFM_16X4_FN adst, identity cglobal iadst_16x4_internal, 0, 5, 11, dst, stride, c, eob, tx2 vpermq m0, [cq+32*0], q1230 vpermq m3, [cq+32*3], q2103 vpermq m1, [cq+32*1], q1230 vpermq m2, [cq+32*2], q2103 call m(iadst_4x16_internal).main2 pshufd m2, m2, q1032 punpcklwd m4, m3, m1 punpcklwd m5, m2, m0 punpckhwd m0, m1 punpckhwd m2, m3 vpbroadcastd m1, [o(pw_16384)] vinserti128 m3, m0, xm2, 1 vperm2i128 m2, m0, m2, 0x31 vinserti128 m0, m4, xm5, 1 vperm2i128 m4, m4, m5, 0x31 psubw m6, m7, m1 .pass1_end: pmulhrsw m3, m1 pmulhrsw m2, m6 pmulhrsw m4, m1 pmulhrsw m0, m6 punpcklwd m1, m3, m2 punpckhwd m3, m2 punpcklwd m2, m4, m0 punpckhwd m4, m0 punpckldq m0, m1, m2 punpckhdq m1, m2 punpckldq m2, m3, m4 punpckhdq m3, m4 jmp tx2q .pass2: call .main .end: vpbroadcastd m4, [o(pw_2048)] REPX {pmulhrsw x, m4}, m0, m1, m2, m3 WIN64_RESTORE_XMM .end2: pxor m4, m4 mova [cq+32*0], m4 mova [cq+32*1], m4 mova [cq+32*2], m4 mova [cq+32*3], m4 .end3: WRITE_16X2 0, 1, 4, 5, strideq*0, strideq*1 lea dstq, [dstq+strideq*2] WRITE_16X2 2, 3, 4, 5, strideq*0, strideq*1 RET ALIGN function_align .main: vpbroadcastd m7, [o(pw_3803_1321)] vpbroadcastd m8, [o(pw_m1321_2482)] vpbroadcastd m9, [o(pw_2482_3344)] punpcklwd m4, m2, m0 ; in2 in0 l psubw m6, m0, m2 punpckhwd m2, m0 ; in2 in0 h paddw m6, m3 ; t2 pmaddwd m0, m7, m4 ; t0:02 l pmaddwd m7, m2 ; t0:02 h pmaddwd m4, m8 ; t1:02 l pmaddwd m8, m2 ; t1:02 h punpckhwd m2, m3, m1 ; in3 in1 h punpcklwd m3, m1 ; in3 in1 l vpbroadcastd m1, [o(pd_2048)] pmaddwd m5, m9, m3 pmaddwd m9, m2 paddd m0, m1 paddd m7, m1 paddd m0, m5 ; t0 + t3 + 2048 l paddd m7, m9 ; t0 + t3 + 2048 h vpbroadcastd m9, [o(pw_m3803_3344)] pmaddwd m5, m9, m2 pmaddwd m9, m3 paddd m5, m1 ; t1:13 + 2048 h paddd m1, m9 ; t1:13 + 2048 l vpbroadcastd m9, [o(pw_m3803_m6688)] pmaddwd m2, m9 pmaddwd m3, m9 paddd m5, m8 ; t1 + t3 + 2048 h paddd m1, m4 ; t1 + t3 + 2048 l paddd m8, m7 paddd m4, m0 paddd m2, m8 ; t0 + t1 - t3 + 2048 h paddd m3, m4 ; t0 + t1 - t3 + 2048 l REPX {psrad x, 12}, m0, m7, m5, m1, m2, m3 packssdw m0, m7 packssdw m1, m5 packssdw m3, m2 vpbroadcastd m2, [o(pw_3344x8)] pmulhrsw m2, m6 ret INV_TXFM_16X4_FN flipadst, dct INV_TXFM_16X4_FN flipadst, adst INV_TXFM_16X4_FN flipadst, flipadst INV_TXFM_16X4_FN flipadst, identity cglobal iflipadst_16x4_internal, 0, 5, 11, dst, stride, c, eob, tx2 vpermq m0, [cq+32*0], q1230 vpermq m3, [cq+32*3], q2103 vpermq m1, [cq+32*1], q1230 vpermq m2, [cq+32*2], q2103 call m(iadst_4x16_internal).main2 pshufd m2, m2, q1032 punpckhwd m4, m3, m2 punpckhwd m5, m1, m0 punpcklwd m0, m2 punpcklwd m1, m3 vpbroadcastd m6, [o(pw_16384)] vinserti128 m3, m0, xm1, 1 vperm2i128 m2, m0, m1, 0x31 vinserti128 m0, m4, xm5, 1 vperm2i128 m4, m4, m5, 0x31 psubw m1, m7, m6 jmp m(iadst_16x4_internal).pass1_end ALIGN function_align .pass2: call m(iadst_16x4_internal).main vpbroadcastd m4, [o(pw_2048)] REPX {pmulhrsw x, m4}, m3, m2, m1, m0 pxor m4, m4 mova [cq+32*0], m4 mova [cq+32*1], m4 mova [cq+32*2], m4 mova [cq+32*3], m4 WRITE_16X2 3, 2, 4, 5, strideq*0, strideq*1 lea dstq, [dstq+strideq*2] WRITE_16X2 1, 0, 4, 5, strideq*0, strideq*1 RET INV_TXFM_16X4_FN identity, dct, 15 INV_TXFM_16X4_FN identity, adst INV_TXFM_16X4_FN identity, flipadst INV_TXFM_16X4_FN identity, identity cglobal iidentity_16x4_internal, 0, 5, 11, dst, stride, c, eob, tx2 mova xm2, [cq+16*0] mova xm4, [cq+16*1] vinserti128 m2, m2, [cq+16*4], 1 vinserti128 m4, m4, [cq+16*5], 1 mova xm0, [cq+16*2] mova xm1, [cq+16*3] vinserti128 m0, m0, [cq+16*6], 1 vinserti128 m1, m1, [cq+16*7], 1 vpbroadcastd m5, [o(pw_5793x4)] punpcklwd m3, m2, m4 punpckhwd m2, m4 punpcklwd m4, m0, m1 punpckhwd m0, m1 REPX {psllw x, 2}, m3, m2, m4, m0 punpcklwd m1, m3, m2 punpckhwd m3, m2 punpcklwd m2, m4, m0 punpckhwd m4, m0 REPX {pmulhrsw x, m5}, m1, m3, m2, m4 vpbroadcastd m5, [o(pw_16384)] punpcklqdq m0, m1, m2 punpckhqdq m1, m2 punpcklqdq m2, m3, m4 punpckhqdq m3, m4 REPX {pmulhrsw x, m5}, m0, m1, m2, m3 jmp tx2q .pass2: vpbroadcastd m4, [o(pw_5793x4)] REPX {paddw x, x }, m0, m1, m2, m3 REPX {pmulhrsw x, m4}, m0, m1, m2, m3 jmp m(iadst_16x4_internal).end %macro INV_TXFM_16X8_FN 2-3 -1 ; type1, type2, fast_thresh INV_TXFM_FN %1, %2, %3, 16x8 %ifidn %1_%2, dct_dct movd xm1, [o(pw_2896x8)] pmulhrsw xm0, xm1, [cq] movd xm2, [o(pw_16384)] mov [cq], eobd pmulhrsw xm0, xm1 mov r2d, 4 jmp m(inv_txfm_add_dct_dct_16x4).dconly %elifidn %1_%2, dct_identity WIN64_SPILL_XMM 13 vbroadcasti128 m7, [cq] vpbroadcastd m0, [o(pw_2896x8)] vpbroadcastd m1, [o(pw_16384)] pxor xm2, xm2 mova [cq], xm2 pmulhrsw m7, m0 pmulhrsw m7, m0 pmulhrsw m7, m1 psrlw m1, 2 ; pw_4096 pmulhrsw m7, m1 punpcklwd m3, m7, m7 punpckhwd m7, m7 pshufd m0, m3, q0000 pshufd m1, m3, q1111 pshufd m2, m3, q2222 pshufd m3, m3, q3333 pshufd m4, m7, q0000 pshufd m5, m7, q1111 pshufd m6, m7, q2222 pshufd m7, m7, q3333 lea r3, [strideq*3] WRITE_16X2 0, 1, 8, 0, strideq*0, strideq*1 WRITE_16X2 2, 3, 0, 1, strideq*2, r3 jmp m(idct_16x8_internal).end4 %elifidn %1_%2, identity_dct mova m0, [cq+32*0] packusdw m0, [cq+32*1] mova m2, [cq+32*2] packusdw m2, [cq+32*3] mova m1, [cq+32*4] packusdw m1, [cq+32*5] mova m3, [cq+32*6] packusdw m3, [cq+32*7] vpbroadcastd m4, [o(pw_2896x8)] vpbroadcastd m5, [o(pw_5793x4)] packusdw m0, m2 packusdw m1, m3 vpbroadcastd m2, [o(pw_16384)] packusdw m0, m1 vpermq m1, m0, q3322 vpermq m0, m0, q1100 punpcklwd m0, m1 pmulhrsw m0, m4 psllw m0, 2 pmulhrsw m0, m5 pmulhrsw m0, m2 psrlw m2, 3 ; pw_2048 pmulhrsw m0, m4 pmulhrsw m0, m2 mov r3d, 4 jmp m(inv_txfm_add_identity_dct_16x4).end %endif %endmacro %macro ITX_16X8_LOAD_COEFS 1 ; shuf_odd vpbroadcastd m8, [o(pw_2896x8)] vpermq m0, [cq+32*0], q3120 add cq, 32*4 vpermq m7, [cq+32*3], q%1 vpermq m1, [cq-32*3], q%1 vpermq m6, [cq+32*2], q3120 vpermq m2, [cq-32*2], q3120 vpermq m5, [cq+32*1], q%1 vpermq m3, [cq-32*1], q%1 vpermq m4, [cq+32*0], q3120 REPX {pmulhrsw x, m8}, m0, m7, m1, m6, m2, m5, m3, m4 %endmacro INV_TXFM_16X8_FN dct, dct, 0 INV_TXFM_16X8_FN dct, identity, 7 INV_TXFM_16X8_FN dct, adst INV_TXFM_16X8_FN dct, flipadst cglobal idct_16x8_internal, 0, 5, 13, dst, stride, c, eob, tx2 ITX_16X8_LOAD_COEFS 3120 call m(idct_8x16_internal).main vpbroadcastd m10, [o(pw_16384)] punpckhwd m8, m0, m2 punpcklwd m0, m2 punpckhwd m2, m1, m3 punpcklwd m1, m3 punpcklwd m9, m4, m6 punpckhwd m4, m6 punpcklwd m6, m5, m7 punpckhwd m5, m7 REPX {pmulhrsw x, m10}, m8, m1, m4, m6 .pass1_end: REPX {pmulhrsw x, m10}, m0, m2, m9, m5 punpckhwd m3, m0, m8 punpcklwd m0, m8 punpckhwd m8, m2, m1 punpcklwd m2, m1 punpcklwd m7, m9, m4 punpckhwd m9, m4 punpcklwd m4, m5, m6 punpckhwd m5, m6 punpckhdq m1, m0, m2 punpckldq m0, m2 punpckldq m2, m3, m8 punpckhdq m3, m8 punpckldq m6, m7, m4 punpckhdq m7, m4 punpckldq m8, m9, m5 punpckhdq m9, m5 vperm2i128 m4, m0, m6, 0x31 vinserti128 m0, m0, xm6, 1 vperm2i128 m5, m1, m7, 0x31 vinserti128 m1, m1, xm7, 1 vperm2i128 m6, m2, m8, 0x31 vinserti128 m2, m2, xm8, 1 vperm2i128 m7, m3, m9, 0x31 vinserti128 m3, m3, xm9, 1 jmp tx2q .pass2: call .main vpbroadcastd m8, [o(pw_2048)] .end: REPX {pmulhrsw x, m8}, m0, m2, m4, m6 .end2: REPX {pmulhrsw x, m8}, m1, m3, m5, m7 lea r3, [strideq*3] WRITE_16X2 0, 1, 8, 0, strideq*0, strideq*1 WRITE_16X2 2, 3, 0, 1, strideq*2, r3 .end3: pxor m0, m0 REPX {mova [cq+32*x], m0}, -4, -3, -2, -1, 0, 1, 2, 3 .end4: lea dstq, [dstq+strideq*4] WRITE_16X2 4, 5, 0, 1, strideq*0, strideq*1 WRITE_16X2 6, 7, 0, 1, strideq*2, r3 RET ALIGN function_align .main: vpbroadcastd m10, [o(pd_2048)] .main2: IDCT8_1D 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ret INV_TXFM_16X8_FN adst, dct INV_TXFM_16X8_FN adst, adst INV_TXFM_16X8_FN adst, flipadst INV_TXFM_16X8_FN adst, identity cglobal iadst_16x8_internal, 0, 5, 13, dst, stride, c, eob, tx2 ITX_16X8_LOAD_COEFS 1302 call m(iadst_8x16_internal).main2 vpbroadcastd m10, [o(pw_16384)] psubw m11, m9, m10 punpcklwd m8, m0, m2 punpckhwd m0, m2 punpckhwd m2, m1, m3 punpcklwd m1, m3 punpcklwd m9, m4, m6 punpckhwd m4, m6 punpckhwd m6, m5, m7 punpcklwd m5, m7 REPX {pmulhrsw x, m11}, m8, m1, m4, m6 jmp m(idct_16x8_internal).pass1_end ALIGN function_align .pass2: call .main vpbroadcastd m9, [o(pw_2048)] pxor m8, m8 psubw m8, m9 REPX {pmulhrsw x, m9}, m0, m2, m4, m6 jmp m(idct_16x8_internal).end2 ALIGN function_align .main: vpbroadcastd m10, [o(pd_2048)] ITX_MULSUB_2W 7, 0, 8, 9, 10, 401, 4076 ; t1a, t0a ITX_MULSUB_2W 3, 4, 8, 9, 10, 3166, 2598 ; t5a, t4a ITX_MULSUB_2W 1, 6, 8, 9, 10, 3920, 1189 ; t7a, t6a ITX_MULSUB_2W 5, 2, 8, 9, 10, 1931, 3612 ; t3a, t2a psubsw m8, m2, m6 ; t6 paddsw m2, m6 ; t2 psubsw m6, m0, m4 ; t4 paddsw m0, m4 ; t0 psubsw m4, m5, m1 ; t7 paddsw m5, m1 ; t3 psubsw m1, m7, m3 ; t5 paddsw m7, m3 ; t1 ITX_MULSUB_2W 6, 1, 3, 9, 10, 1567, 3784 ; t5a, t4a ITX_MULSUB_2W 4, 8, 3, 9, 10, 3784, 1567 ; t6a, t7a psubsw m9, m6, m8 ; t7 paddsw m6, m8 ; out6 vpbroadcastd m8, [o(pw_2896x8)] psubsw m3, m7, m5 ; t3 paddsw m7, m5 ; -out7 psubsw m5, m0, m2 ; t2 paddsw m0, m2 ; out0 psubsw m2, m1, m4 ; t6 paddsw m1, m4 ; -out1 psubw m4, m5, m3 paddw m3, m5 psubw m5, m2, m9 paddw m2, m9 pmulhrsw m2, m8 ; out2 pmulhrsw m3, m8 ; -out3 pmulhrsw m4, m8 ; out4 pmulhrsw m5, m8 ; -out5 ret INV_TXFM_16X8_FN flipadst, dct INV_TXFM_16X8_FN flipadst, adst INV_TXFM_16X8_FN flipadst, flipadst INV_TXFM_16X8_FN flipadst, identity cglobal iflipadst_16x8_internal, 0, 5, 13, dst, stride, c, eob, tx2 ITX_16X8_LOAD_COEFS 1302 call m(iadst_8x16_internal).main2 vpbroadcastd m10, [o(pw_16384)] psubw m9, m10 punpcklwd m8, m6, m4 punpckhwd m6, m4 punpcklwd m4, m7, m5 punpckhwd m7, m5 punpckhwd m5, m3, m1 punpcklwd m3, m1 punpckhwd m1, m2, m0 punpcklwd m2, m0 REPX {pmulhrsw x, m10}, m8, m4, m5, m1 REPX {pmulhrsw x, m9 }, m6, m7, m3, m2 punpcklwd m0, m7, m4 punpckhwd m7, m4 punpckhwd m4, m6, m8 punpcklwd m6, m8 punpckhwd m8, m3, m5 punpcklwd m3, m5 punpcklwd m5, m2, m1 punpckhwd m2, m1 punpckhdq m1, m0, m6 punpckldq m0, m6 punpckldq m6, m7, m4 punpckhdq m7, m4 punpckhdq m4, m3, m5 punpckldq m3, m5 punpckldq m5, m8, m2 punpckhdq m8, m2 vinserti128 m2, m6, xm5, 1 vperm2i128 m6, m6, m5, 0x31 vperm2i128 m5, m1, m4, 0x31 vinserti128 m1, m1, xm4, 1 vperm2i128 m4, m0, m3, 0x31 vinserti128 m0, m0, xm3, 1 vinserti128 m3, m7, xm8, 1 vperm2i128 m7, m7, m8, 0x31 jmp tx2q .pass2: call m(iadst_16x8_internal).main vpbroadcastd m9, [o(pw_2048)] pxor m8, m8 psubw m8, m9 pmulhrsw m10, m7, m8 pmulhrsw m7, m0, m9 pmulhrsw m0, m6, m9 pmulhrsw m6, m1, m8 pmulhrsw m1, m5, m8 pmulhrsw m5, m2, m9 pmulhrsw m2, m4, m9 pmulhrsw m4, m3, m8 lea r3, [strideq*3] WRITE_16X2 10, 0, 8, 9, strideq*0, strideq*1 WRITE_16X2 1, 2, 0, 1, strideq*2, r3 jmp m(idct_16x8_internal).end3 INV_TXFM_16X8_FN identity, dct, 15 INV_TXFM_16X8_FN identity, adst INV_TXFM_16X8_FN identity, flipadst INV_TXFM_16X8_FN identity, identity cglobal iidentity_16x8_internal, 0, 5, 13, dst, stride, c, eob, tx2 mova xm7, [cq+16*0] mova xm2, [cq+16*1] add cq, 16*8 vpbroadcastd m3, [o(pw_2896x8)] vinserti128 m7, m7, [cq+16*0], 1 vinserti128 m2, m2, [cq+16*1], 1 mova xm6, [cq-16*6] mova xm4, [cq-16*5] vinserti128 m6, m6, [cq+16*2], 1 vinserti128 m4, m4, [cq+16*3], 1 mova xm8, [cq-16*4] mova xm5, [cq-16*3] vinserti128 m8, m8, [cq+16*4], 1 vinserti128 m5, m5, [cq+16*5], 1 mova xm0, [cq-16*2] mova xm1, [cq-16*1] vinserti128 m0, m0, [cq+16*6], 1 vinserti128 m1, m1, [cq+16*7], 1 vpbroadcastd m9, [o(pw_5793x4)] vpbroadcastd m10, [o(pw_16384)] REPX {pmulhrsw x, m3}, m7, m2, m6, m4, m8, m5, m0, m1 punpcklwd m3, m7, m2 punpckhwd m7, m2 punpcklwd m2, m6, m4 punpckhwd m6, m4 punpcklwd m4, m8, m5 punpckhwd m8, m5 punpcklwd m5, m0, m1 punpckhwd m0, m1 REPX {psllw x, 2}, m3, m7, m2, m6, m4, m8, m5, m0 punpckldq m1, m3, m2 punpckhdq m3, m2 punpckldq m2, m4, m5 punpckhdq m4, m5 punpckldq m5, m7, m6 punpckhdq m7, m6 punpckldq m6, m8, m0 punpckhdq m8, m0 REPX {pmulhrsw x, m9}, m1, m3, m2, m4, m5, m7, m6, m8 punpcklqdq m0, m1, m2 punpckhqdq m1, m2 punpcklqdq m2, m3, m4 punpckhqdq m3, m4 punpcklqdq m4, m5, m6 punpckhqdq m5, m6 punpcklqdq m6, m7, m8 punpckhqdq m7, m8 REPX {pmulhrsw x, m10}, m0, m1, m2, m3, m4, m5, m6, m7 jmp tx2q .pass2: vpbroadcastd m8, [o(pw_4096)] jmp m(idct_16x8_internal).end %define o_base pw_5 + 128 %macro INV_TXFM_16X16_FN 2-3 -1 ; type1, type2, fast_thresh INV_TXFM_FN %1, %2, %3, 16x16 %ifidn %1_%2, dct_dct movd xm1, [o(pw_2896x8)] pmulhrsw xm0, xm1, [cq] movd xm2, [o(pw_8192)] mov [cq], eobd mov r2d, 8 jmp m(inv_txfm_add_dct_dct_16x4).dconly %elifidn %1_%2, dct_identity WIN64_SPILL_XMM 7 vpbroadcastd m3, [o(pw_2896x8)] pmulhrsw m3, [cq] vpbroadcastd m0, [o(pw_8192)] vpbroadcastd m1, [o(pw_5793x4)] vpbroadcastw m4, [o(deint_shuf)] ; pb_0_1 pcmpeqb m5, m5 pxor m6, m6 mova [cq], m6 paddb m5, m5 ; pb_m2 pmulhrsw m3, m0 psrlw m0, 2 ; pw_2048 psllw m3, 2 pmulhrsw m3, m1 pmulhrsw m3, m0 mov r3d, 8 .loop: mova xm1, [dstq] vinserti128 m1, m1, [dstq+strideq*8], 1 pshufb m0, m3, m4 psubb m4, m5 ; += 2 punpckhbw m2, m1, m6 punpcklbw m1, m6 paddw m2, m0 paddw m1, m0 packuswb m1, m2 mova [dstq], xm1 vextracti128 [dstq+strideq*8], m1, 1 add dstq, strideq dec r3d jg .loop RET %elifidn %1_%2, identity_dct movd xm0, [cq+32*0 ] movd xm2, [cq+32*1 ] movd xm1, [cq+32*2 ] movd xm3, [cq+32*3 ] vinserti128 m0, m0, [cq+32*8 ], 1 vinserti128 m2, m2, [cq+32*9 ], 1 vinserti128 m1, m1, [cq+32*10], 1 vinserti128 m3, m3, [cq+32*11], 1 punpcklwd m0, m2 punpcklwd m1, m3 punpckldq m0, m1 movd xm1, [cq+32*4 ] movd xm3, [cq+32*5 ] movd xm2, [cq+32*6 ] movd xm4, [cq+32*7 ] vinserti128 m1, m1, [cq+32*12], 1 vinserti128 m3, m3, [cq+32*13], 1 vinserti128 m2, m2, [cq+32*14], 1 vinserti128 m4, m4, [cq+32*15], 1 punpcklwd m1, m3 vpbroadcastd m3, [o(pw_5793x4)] punpcklwd m2, m4 vpbroadcastd m4, [o(pw_8192)] punpckldq m1, m2 vpbroadcastd m2, [o(pw_2896x8)] punpcklqdq m0, m1 psllw m0, 2 pmulhrsw m0, m3 pmulhrsw m0, m4 psrlw m4, 2 ; pw_2048 pmulhrsw m0, m2 pmulhrsw m0, m4 mov r3d, 8 jmp m(inv_txfm_add_identity_dct_16x4).end %endif %endmacro %macro ITX_16X16_LOAD_COEFS 0 mova m0, [cq+32*0] mova m1, [cq+32*1] mova m2, [cq+32*2] mova m3, [cq+32*3] add cq, 32*8 mova m4, [cq-32*4] mova m5, [cq-32*3] mova m6, [cq-32*2] mova m7, [cq-32*1] mova m8, [cq+32*0] mova m9, [cq+32*1] mova m10, [cq+32*2] mova m11, [cq+32*3] mova m12, [cq+32*4] mova m13, [cq+32*5] mova m14, [cq+32*6] mova m15, [cq+32*7] mova [rsp], m15 %endmacro INV_TXFM_16X16_FN dct, dct, 0 INV_TXFM_16X16_FN dct, identity, 15 INV_TXFM_16X16_FN dct, adst INV_TXFM_16X16_FN dct, flipadst cglobal idct_16x16_internal, 0, 5, 16, 32*3, dst, stride, c, eob, tx2 ITX_16X16_LOAD_COEFS call .main .pass1_end: vpbroadcastd m1, [o(pw_8192)] REPX {pmulhrsw x, m1}, m0, m2, m4, m6, m8, m10, m12, m14 vextracti128 [rsp+16*5], m8, 1 mova [rsp+16*1], xm8 .pass1_end2: vextracti128 [rsp+16*4], m0, 1 mova [rsp+16*0], xm0 REPX {pmulhrsw x, m1}, m3, m5, m7, m9, m11, m13, m15 pmulhrsw m1, [rsp+32*1] vperm2i128 m8, m1, m9, 0x31 vinserti128 m1, m1, xm9, 1 vperm2i128 m9, m2, m10, 0x31 vinserti128 m2, m2, xm10, 1 vperm2i128 m10, m3, m11, 0x31 vinserti128 m3, m3, xm11, 1 vperm2i128 m11, m4, m12, 0x31 vinserti128 m4, m4, xm12, 1 vperm2i128 m12, m5, m13, 0x31 vinserti128 m5, m5, xm13, 1 vperm2i128 m13, m6, m14, 0x31 vinserti128 m6, m6, xm14, 1 vperm2i128 m14, m7, m15, 0x31 vinserti128 m7, m7, xm15, 1 mova m15, [rsp+32*2] .pass1_end3: punpcklwd m0, m9, m10 punpckhwd m9, m10 punpcklwd m10, m15, m8 punpckhwd m15, m8 punpckhwd m8, m11, m12 punpcklwd m11, m12 punpckhwd m12, m13, m14 punpcklwd m13, m14 punpckhdq m14, m11, m13 punpckldq m11, m13 punpckldq m13, m15, m9 punpckhdq m15, m9 punpckldq m9, m10, m0 punpckhdq m10, m0 punpckhdq m0, m8, m12 punpckldq m8, m12 punpcklqdq m12, m13, m8 punpckhqdq m13, m8 punpcklqdq m8, m9, m11 punpckhqdq m9, m11 punpckhqdq m11, m10, m14 punpcklqdq m10, m14 punpcklqdq m14, m15, m0 punpckhqdq m15, m0 mova m0, [rsp] mova [rsp], m15 punpckhwd m15, m4, m5 punpcklwd m4, m5 punpckhwd m5, m0, m1 punpcklwd m0, m1 punpckhwd m1, m6, m7 punpcklwd m6, m7 punpckhwd m7, m2, m3 punpcklwd m2, m3 punpckhdq m3, m0, m2 punpckldq m0, m2 punpckldq m2, m4, m6 punpckhdq m4, m6 punpckhdq m6, m5, m7 punpckldq m5, m7 punpckldq m7, m15, m1 punpckhdq m15, m1 punpckhqdq m1, m0, m2 punpcklqdq m0, m2 punpcklqdq m2, m3, m4 punpckhqdq m3, m4 punpcklqdq m4, m5, m7 punpckhqdq m5, m7 punpckhqdq m7, m6, m15 punpcklqdq m6, m15 jmp tx2q .pass2: call .main .end: vpbroadcastd m1, [o(pw_2048)] REPX {pmulhrsw x, m1}, m0, m2, m4, m6, m8, m10, m12, m14 mova [rsp], m6 .end2: REPX {pmulhrsw x, m1}, m3, m5, m7, m9, m11, m13, m15 pmulhrsw m1, [rsp+32*1] lea r3, [strideq*3] WRITE_16X2 0, 1, 6, 0, strideq*0, strideq*1 WRITE_16X2 2, 3, 0, 1, strideq*2, r3 lea dstq, [dstq+strideq*4] WRITE_16X2 4, 5, 0, 1, strideq*0, strideq*1 WRITE_16X2 [rsp], 7, 0, 1, strideq*2, r3 .end3: pxor m2, m2 REPX {mova [cq+32*x], m2}, -8, -7, -6, -5, -4, -3, -2, -1 lea dstq, [dstq+strideq*4] WRITE_16X2 8, 9, 0, 1, strideq*0, strideq*1 WRITE_16X2 10, 11, 0, 1, strideq*2, r3 REPX {mova [cq+32*x], m2}, 0, 1, 2, 3, 4, 5, 6, 7 lea dstq, [dstq+strideq*4] WRITE_16X2 12, 13, 0, 1, strideq*0, strideq*1 WRITE_16X2 14, 15, 0, 1, strideq*2, r3 RET ALIGN function_align .main: vpbroadcastd m15, [o(pd_2048)] mova [rsp+gprsize+32*1], m1 mova [rsp+gprsize+32*2], m9 IDCT8_1D 0, 2, 4, 6, 8, 10, 12, 14, 1, 9, 15 mova m1, [rsp+gprsize+32*2] ; in9 mova [rsp+gprsize+32*2], m14 ; tmp7 mova m9, [rsp+gprsize+32*1] ; in1 mova [rsp+gprsize+32*1], m10 ; tmp5 mova m14, [rsp+gprsize+32*0] ; in15 mova [rsp+gprsize+32*0], m6 ; tmp3 IDCT16_1D_ODDHALF 9, 3, 5, 7, 1, 11, 13, 14, 6, 10, 15 mova m6, [rsp+gprsize+32*1] ; tmp5 psubsw m15, m0, m14 ; out15 paddsw m0, m14 ; out0 psubsw m14, m2, m13 ; out14 paddsw m2, m13 ; out1 mova [rsp+gprsize+32*1], m2 psubsw m13, m4, m11 ; out13 paddsw m2, m4, m11 ; out2 psubsw m11, m8, m7 ; out11 paddsw m4, m8, m7 ; out4 mova m7, [rsp+gprsize+32*2] ; tmp7 psubsw m10, m6, m5 ; out10 paddsw m5, m6 ; out5 psubsw m8, m7, m9 ; out8 paddsw m7, m9 ; out7 psubsw m9, m12, m3 ; out9 paddsw m6, m12, m3 ; out6 mova m3, [rsp+gprsize+32*0] ; tmp3 psubsw m12, m3, m1 ; out12 paddsw m3, m1 ; out3 ret INV_TXFM_16X16_FN adst, dct INV_TXFM_16X16_FN adst, adst INV_TXFM_16X16_FN adst, flipadst cglobal iadst_16x16_internal, 0, 5, 16, 32*3, dst, stride, c, eob, tx2 ITX_16X16_LOAD_COEFS call .main vpbroadcastd m1, [o(pw_8192)] REPX {pmulhrsw x, m1}, m0, m2, m4, m6, m8, m10, m12, m14 vextracti128 [rsp+16*5], m8, 1 mova [rsp+16*1], xm8 pxor m8, m8 psubw m1, m8, m1 jmp m(idct_16x16_internal).pass1_end2 ALIGN function_align .pass2: call .main vpbroadcastd m1, [o(pw_2048)] REPX {pmulhrsw x, m1}, m0, m2, m4, m6, m8, m10, m12, m14 mova [rsp+32*0], m6 pxor m6, m6 psubw m1, m6, m1 jmp m(idct_16x16_internal).end2 ALIGN function_align .main: vpbroadcastd m15, [o(pd_2048)] mova [rsp+gprsize+32*1], m0 mova [rsp+gprsize+32*2], m4 ITX_MULSUB_2W 13, 2, 0, 4, 15, 995, 3973 ; t3, t2 ITX_MULSUB_2W 9, 6, 0, 4, 15, 2440, 3290 ; t7, t6 ITX_MULSUB_2W 5, 10, 0, 4, 15, 3513, 2106 ; t11, t10 ITX_MULSUB_2W 1, 14, 0, 4, 15, 4052, 601 ; t15, t14 psubsw m0, m2, m10 ; t10a paddsw m2, m10 ; t2a psubsw m10, m13, m5 ; t11a paddsw m13, m5 ; t3a psubsw m5, m6, m14 ; t14a paddsw m6, m14 ; t6a psubsw m14, m9, m1 ; t15a paddsw m9, m1 ; t7a ITX_MULSUB_2W 0, 10, 1, 4, 15, 3406, 2276 ; t11, t10 ITX_MULSUB_2W 14, 5, 1, 4, 15, 2276, 3406 ; t14, t15 psubsw m1, m10, m14 ; t14a paddsw m10, m14 ; t10a psubsw m14, m0, m5 ; t15a paddsw m0, m5 ; t11a psubsw m5, m2, m6 ; t6 paddsw m2, m6 ; t2 psubsw m6, m13, m9 ; t7 paddsw m13, m9 ; t3 ITX_MULSUB_2W 6, 5, 4, 9, 15, 3784, 1567 ; t6a, t7a ITX_MULSUB_2W 14, 1, 4, 9, 15, 3784, 1567 ; t14, t15 mova m9, [rsp+gprsize+32*0] ; in15 mova [rsp+gprsize+32*0], m10 ; t10a mova m4, [rsp+gprsize+32*1] ; in0 mova [rsp+gprsize+32*1], m6 ; t6a mova m6, [rsp+gprsize+32*2] ; in4 mova [rsp+gprsize+32*2], m2 ; t2 ITX_MULSUB_2W 9, 4, 2, 10, 15, 201, 4091 ; t1, t0 ITX_MULSUB_2W 11, 6, 2, 10, 15, 1751, 3703 ; t5, t4 ITX_MULSUB_2W 7, 8, 2, 10, 15, 3035, 2751 ; t9, t8 ITX_MULSUB_2W 3, 12, 2, 10, 15, 3857, 1380 ; t13, t12 psubsw m10, m4, m8 ; t8a paddsw m8, m4 ; t0a psubsw m4, m9, m7 ; t9a paddsw m9, m7 ; t1a psubsw m7, m6, m12 ; t12a paddsw m6, m12 ; t4a psubsw m12, m11, m3 ; t13a paddsw m11, m3 ; t5a ITX_MULSUB_2W 10, 4, 2, 3, 15, 799, 4017 ; t9, t8 ITX_MULSUB_2W 12, 7, 2, 3, 15, 4017, 799 ; t12, t13 psubsw m3, m9, m11 ; t5 paddsw m9, m11 ; t1 psubsw m11, m4, m12 ; t12a paddsw m4, m12 ; t8a paddsw m12, m8, m6 ; t0 psubsw m8, m6 ; t4 paddsw m6, m10, m7 ; t9a psubsw m10, m7 ; t13a ITX_MULSUB_2W 8, 3, 2, 7, 15, 1567, 3784 ; t5a, t4a ITX_MULSUB_2W 11, 10, 2, 7, 15, 1567, 3784 ; t13, t12 mova m7, [rsp+gprsize+32*0] ; t10a mova m2, [rsp+gprsize+32*1] ; t6a paddsw m15, m9, m13 ; -out15 psubsw m9, m13 ; t3a paddsw m13, m11, m1 ; -out13 psubsw m11, m1 ; t15a psubsw m1, m4, m7 ; t10 paddsw m7, m4 ; -out1 psubsw m4, m3, m2 ; t6 paddsw m3, m2 ; -out3 paddsw m2, m10, m14 ; out2 psubsw m10, m14 ; t14a paddsw m14, m6, m0 ; out14 psubsw m6, m0 ; t11 mova m0, [rsp+gprsize+32*2] ; t2 mova [rsp+gprsize+32*1], m7 psubsw m7, m12, m0 ; t2a paddsw m0, m12 ; out0 paddsw m12, m8, m5 ; out12 psubsw m8, m5 ; t7 paddw m5, m10, m11 ; -out5 psubw m10, m11 ; out10 psubw m11, m4, m8 ; -out11 paddw m4, m8 ; out4 psubw m8, m7, m9 ; out8 paddw m7, m9 ; -out7 psubw m9, m1, m6 ; -out9 paddw m6, m1 ; out6 vpbroadcastd m1, [o(pw_2896x8)] REPX {pmulhrsw x, m1}, m4, m5, m6, m7, m8, m9, m10, m11 ret INV_TXFM_16X16_FN flipadst, dct INV_TXFM_16X16_FN flipadst, adst INV_TXFM_16X16_FN flipadst, flipadst cglobal iflipadst_16x16_internal, 0, 5, 16, 32*3, dst, stride, c, eob, tx2 ITX_16X16_LOAD_COEFS call m(iadst_16x16_internal).main vpbroadcastd m1, [o(pw_8192)] pmulhrsw m6, m1 mova [rsp+32*2], m6 pmulhrsw m6, m1, m4 pmulhrsw m4, m1, m10 pmulhrsw m10, m1, m12 pmulhrsw m12, m1, m2 pmulhrsw m2, m1, m8 pmulhrsw m8, m1, m14 pmulhrsw m14, m1, m0 pxor m0, m0 psubw m0, m1 REPX {pmulhrsw x, m0}, m3, m5, m7, m11, m15 pmulhrsw m1, m0, m9 pmulhrsw m9, m0, m13 pmulhrsw m0, [rsp+32*1] mova [rsp+16*0], xm15 mova [rsp+16*1], xm7 vperm2i128 m15, m15, m7, 0x31 vinserti128 m7, m2, xm14, 1 vperm2i128 m14, m2, m14, 0x31 vinserti128 m2, m9, xm5, 1 vperm2i128 m9, m9, m5, 0x31 vinserti128 m5, m4, xm12, 1 vperm2i128 m12, m4, m12, 0x31 vinserti128 m4, m11, xm3, 1 vperm2i128 m11, m11, m3, 0x31 vinserti128 m3, m10, xm6, 1 vperm2i128 m10, m10, m6, 0x31 vinserti128 m6, m1, xm0, 1 vperm2i128 m13, m1, m0, 0x31 vinserti128 m1, m8, [rsp+32*2], 1 vperm2i128 m8, m8, [rsp+32*2], 0x31 jmp m(idct_16x16_internal).pass1_end3 .pass2: call m(iadst_16x16_internal).main vpbroadcastd m1, [o(pw_2048)] pmulhrsw m0, m1 pmulhrsw m8, m1 mova [rsp+32*0], m0 mova [rsp+32*2], m8 pxor m0, m0 psubw m0, m1 pmulhrsw m8, m0, m7 pmulhrsw m7, m0, m9 pmulhrsw m9, m1, m6 pmulhrsw m6, m1, m10 pmulhrsw m10, m0, m5 pmulhrsw m5, m0, m11 pmulhrsw m11, m1, m4 pmulhrsw m4, m1, m12 pmulhrsw m12, m0, m3 pmulhrsw m3, m0, m13 pmulhrsw m13, m1, m2 pmulhrsw m1, m14 pmulhrsw m14, m0, [rsp+32*1] pmulhrsw m0, m15 lea r3, [strideq*3] WRITE_16X2 0, 1, 2, 0, strideq*0, strideq*1 mova m15, [rsp+32*0] WRITE_16X2 3, 4, 0, 1, strideq*2, r3 lea dstq, [dstq+strideq*4] WRITE_16X2 5, 6, 0, 1, strideq*0, strideq*1 WRITE_16X2 7, [rsp+32*2], 0, 1, strideq*2, r3 jmp m(idct_16x16_internal).end3 INV_TXFM_16X16_FN identity, dct, 15 INV_TXFM_16X16_FN identity, identity cglobal iidentity_16x16_internal, 0, 5, 16, 32*3, dst, stride, c, eob, tx2 mova xm0, [cq+16*0] mova xm15, [cq+16*1] mova xm1, [cq+16*2] mova xm8, [cq+16*3] mova xm2, [cq+16*4] mova xm9, [cq+16*5] mova xm3, [cq+16*6] mova xm10, [cq+16*7] add cq, 16*16 vinserti128 m0, m0, [cq+16*0], 1 vinserti128 m15, m15, [cq+16*1], 1 mova xm4, [cq-16*8] mova xm11, [cq-16*7] vinserti128 m1, m1, [cq+16*2], 1 vinserti128 m8, m8, [cq+16*3], 1 mova xm5, [cq-16*6] mova xm12, [cq-16*5] vinserti128 m2, m2, [cq+16*4], 1 vinserti128 m9, m9, [cq+16*5], 1 mova xm6, [cq-16*4] mova xm13, [cq-16*3] vinserti128 m3, m3, [cq+16*6], 1 vinserti128 m10, m10, [cq+16*7], 1 mova xm7, [cq-16*2] mova xm14, [cq-16*1] vinserti128 m4, m4, [cq+16*8], 1 vinserti128 m11, m11, [cq+16*9], 1 vinserti128 m5, m5, [cq+16*10], 1 vinserti128 m12, m12, [cq+16*11], 1 vinserti128 m6, m6, [cq+16*12], 1 vinserti128 m13, m13, [cq+16*13], 1 vinserti128 m7, m7, [cq+16*14], 1 vinserti128 m14, m14, [cq+16*15], 1 REPX {psllw x, 2 }, m0, m1, m2, m3, m4, m5, m6, m7, \ m8, m9, m10, m11, m12, m13, m14, m15 mova [rsp], m0 vpbroadcastd m0, [o(pw_5793x4)] REPX {pmulhrsw x, m0}, m1, m2, m3, m4, m5, m6, m7, \ m8, m9, m10, m11, m12, m13, m14, m15 pmulhrsw m0, [rsp] mova [rsp], m1 vpbroadcastd m1, [o(pw_8192)] REPX {pmulhrsw x, m1}, m0, m2, m3, m4, m5, m6, m7, \ m8, m9, m10, m11, m12, m13, m14, m15 pmulhrsw m1, [rsp] mova [rsp], m0 jmp m(idct_16x16_internal).pass1_end3 ALIGN function_align .pass2: vpbroadcastd m15, [o(pw_5793x4)] REPX {psllw x, 2 }, m0, m1, m2, m3, m4, m5, m6, m7 REPX {pmulhrsw x, m15}, m0, m1, m2, m3, m4, m5, m6, m7 mova [rsp+32*1], m1 mova m1, [rsp+32*0] REPX {psllw x, 2 }, m8, m9, m10, m11, m12, m13, m14, m1 REPX {pmulhrsw x, m15}, m8, m9, m10, m11, m12, m13, m14 pmulhrsw m15, m1 jmp m(idct_16x16_internal).end %define o_base iadst4_dconly2a + 128 %macro LOAD_8ROWS 2-3 0 ; src, stride, is_rect2 %if %3 vpbroadcastd m15, [o(pw_2896x8)] pmulhrsw m0, m15, [%1+%2*0] pmulhrsw m1, m15, [%1+%2*1] pmulhrsw m2, m15, [%1+%2*2] pmulhrsw m3, m15, [%1+%2*3] pmulhrsw m4, m15, [%1+%2*4] pmulhrsw m5, m15, [%1+%2*5] pmulhrsw m6, m15, [%1+%2*6] pmulhrsw m7, m15, [%1+%2*7] %else mova m0, [%1+%2*0] mova m1, [%1+%2*1] mova m2, [%1+%2*2] mova m3, [%1+%2*3] mova m4, [%1+%2*4] mova m5, [%1+%2*5] mova m6, [%1+%2*6] mova m7, [%1+%2*7] %endif %endmacro %macro LOAD_8ROWS_H 2-3 0 ; src, stride, is_rect2 %if %3 %if %3 == 1 vpbroadcastd m15, [o(pw_2896x8)] %endif pmulhrsw m8, m15, [%1+%2*0] pmulhrsw m9, m15, [%1+%2*1] pmulhrsw m10, m15, [%1+%2*2] pmulhrsw m11, m15, [%1+%2*3] pmulhrsw m12, m15, [%1+%2*4] pmulhrsw m13, m15, [%1+%2*5] pmulhrsw m14, m15, [%1+%2*6] pmulhrsw m15, [%1+%2*7] %else mova m8, [%1+%2*0] mova m9, [%1+%2*1] mova m10, [%1+%2*2] mova m11, [%1+%2*3] mova m12, [%1+%2*4] mova m13, [%1+%2*5] mova m14, [%1+%2*6] mova m15, [%1+%2*7] %endif %endmacro %macro ITX_UNPACK_MULHRSW 7 ; dst1, dst2/src, tmp, coef[1-4] vpbroadcastd m%3, [r5-pw_201_4091x8+pw_%4_%5x8] punpcklwd m%1, m%2, m%2 pmulhrsw m%1, m%3 vpbroadcastd m%3, [r5-pw_201_4091x8+pw_%6_%7x8] punpckhwd m%2, m%2 pmulhrsw m%2, m%3 %endmacro cglobal inv_txfm_add_dct_dct_8x32, 4, 4, 0, dst, stride, c, eob lea rax, [o_base] test eobd, eobd jz .dconly PROLOGUE 0, 4, 16, 32*3, dst, stride, c, eob %undef cmp cmp eobd, 106 jle .fast LOAD_8ROWS cq+32*1, 32*2 call m(idct_16x8_internal).main vperm2i128 m11, m0, m4, 0x31 vinserti128 m0, m0, xm4, 1 vperm2i128 m4, m1, m5, 0x31 vinserti128 m1, m1, xm5, 1 vperm2i128 m5, m2, m6, 0x31 vinserti128 m2, m2, xm6, 1 vperm2i128 m6, m3, m7, 0x31 vinserti128 m3, m3, xm7, 1 pxor m7, m7 REPX {mova [cq+32*x], m7}, 1, 3, 5, 7, 9, 11, 13, 15 punpckhwd m7, m0, m1 punpcklwd m0, m1 punpckhwd m1, m2, m3 punpcklwd m2, m3 punpcklwd m3, m11, m4 punpckhwd m11, m4 punpckhwd m4, m5, m6 punpcklwd m5, m6 punpckhdq m6, m0, m2 punpckldq m0, m2 punpckldq m2, m3, m5 punpckhdq m3, m5 punpckhdq m5, m11, m4 punpckldq m11, m4 punpckldq m4, m7, m1 punpckhdq m7, m1 punpckhqdq m12, m6, m0 punpcklqdq m0, m6 ; out4 punpckhqdq m13, m7, m4 punpcklqdq m4, m7 ; out5 punpckhqdq m14, m3, m2 punpcklqdq m2, m3 ; out6 punpckhqdq m15, m5, m11 punpcklqdq m11, m5 ; out7 mova [rsp+32*0], m0 mova [rsp+32*1], m4 mova [rsp+32*2], m2 .fast: LOAD_8ROWS cq+32*0, 32*2 call m(idct_16x8_internal).main vperm2i128 m8, m0, m4, 0x31 vinserti128 m0, m0, xm4, 1 vperm2i128 m4, m1, m5, 0x31 vinserti128 m1, m1, xm5, 1 vperm2i128 m5, m2, m6, 0x31 vinserti128 m2, m2, xm6, 1 vperm2i128 m6, m3, m7, 0x31 vinserti128 m3, m3, xm7, 1 vpbroadcastd m9, [o(pw_8192)] pxor m7, m7 REPX {mova [cq+32*x], m7}, 0, 2, 4, 6, 8, 10, 12, 14 punpckhwd m7, m0, m1 punpcklwd m0, m1 punpckhwd m1, m2, m3 punpcklwd m2, m3 punpckhwd m3, m8, m4 punpcklwd m8, m4 punpckhwd m4, m5, m6 punpcklwd m5, m6 punpckhdq m6, m0, m2 punpckldq m0, m2 punpckldq m2, m8, m5 punpckhdq m8, m5 punpckhdq m5, m3, m4 punpckldq m3, m4 punpckhdq m4, m7, m1 punpckldq m7, m1 punpcklqdq m1, m7, m4 punpckhqdq m7, m4 ; out9 punpckhqdq m4, m2, m8 ; out10 punpcklqdq m2, m8 punpckhqdq m8, m3, m5 punpcklqdq m3, m5 punpckhqdq m5, m0, m6 ; out8 punpcklqdq m0, m6 REPX {pmulhrsw x, m9}, m0, m1, m2, m3, m4, m5, m7 cmp eobd, 106 jg .full mova [rsp+32*0], m5 mova [rsp+32*1], m7 mova [rsp+32*2], m4 pmulhrsw m11, m9, m8 pxor m4, m4 REPX {mova x, m4}, m5, m6, m7 call .main_fast jmp .pass2 .dconly: movd xm1, [o(pw_2896x8)] pmulhrsw xm0, xm1, [cq] movd xm2, [o(pw_8192)] mov [cq], eobd pmulhrsw xm0, xm2 psrlw xm2, 2 ; pw_2048 pmulhrsw xm0, xm1 pmulhrsw xm0, xm2 vpbroadcastw m0, xm0 mov r2d, 8 jmp m(inv_txfm_add_dct_dct_8x8).end2 .full: REPX {pmulhrsw x, m9}, m12, m13, m14, m15 pmulhrsw m6, m9, [rsp+32*2] mova [rsp+32*2], m4 pmulhrsw m4, m9, [rsp+32*0] mova [rsp+32*0], m5 pmulhrsw m5, m9, [rsp+32*1] mova [rsp+32*1], m7 pmulhrsw m7, m9, m11 pmulhrsw m11, m9, m8 call .main .pass2: vpbroadcastd m12, [o(pw_2048)] REPX {pmulhrsw x, m12}, m0, m1, m2, m3, m4, m5, m6, m7, \ m8, m9, m10, m11, m13, m14, m15 pmulhrsw m12, [rsp] REPX {vpermq x, x, q3120}, m0, m2, m4, m6, m8, m10, m12, m14 REPX {vpermq x, x, q2031}, m1, m3, m5, m7, m9, m11, m13, m15 mova [rsp+32*0], m4 mova [rsp+32*1], m6 lea r3, [strideq*3] WRITE_8X4 0, 1, 4, 6 lea dstq, [dstq+strideq*4] WRITE_8X4 2, 3, 4, 6 lea dstq, [dstq+strideq*4] WRITE_8X4 [rsp+32*0], 5, 4, 6 lea dstq, [dstq+strideq*4] WRITE_8X4 [rsp+32*1], 7, 4, 6 lea dstq, [dstq+strideq*4] WRITE_8X4 8, 9, 4, 6 lea dstq, [dstq+strideq*4] WRITE_8X4 10, 11, 4, 6 lea dstq, [dstq+strideq*4] WRITE_8X4 12, 13, 4, 6 lea dstq, [dstq+strideq*4] WRITE_8X4 14, 15, 4, 6 RET ALIGN function_align .main_fast: ; bottom half is zero call m(idct_8x16_internal).main mova m8, [rsp+gprsize+0*32] mova [rsp+gprsize+0*32], m0 mova m9, [rsp+gprsize+1*32] mova [rsp+gprsize+1*32], m1 mova m0, [rsp+gprsize+2*32] mova [rsp+gprsize+2*32], m6 lea r5, [rax-(o_base)+pw_201_4091x8] ITX_UNPACK_MULHRSW 1, 8, 6, 201, 4091, m601, 4052 ; t16a, t31a, t23a, t24a ITX_UNPACK_MULHRSW 15, 9, 6, 995, 3973, m1380, 3857 ; t20a, t27a, t19a, t28a ITX_UNPACK_MULHRSW 14, 0, 6, 1751, 3703, m2106, 3513 ; t18a, t29a, t21a, t26a ITX_UNPACK_MULHRSW 13, 11, 6, 2440, 3290, m2751, 3035 ; t22a, t25a, t17a, t30a jmp .main2 ALIGN function_align .main: call m(idct_8x16_internal).main mova m8, [rsp+gprsize+0*32] mova [rsp+gprsize+0*32], m0 mova m9, [rsp+gprsize+1*32] mova [rsp+gprsize+1*32], m1 mova m0, [rsp+gprsize+2*32] mova [rsp+gprsize+2*32], m6 punpcklwd m1, m15, m8 ; in31 in1 punpckhwd m8, m15 ; in3 in29 punpcklwd m15, m14, m9 ; in27 in5 punpckhwd m9, m14 ; in7 in25 punpcklwd m14, m13, m0 ; in23 in9 punpckhwd m0, m13 ; in11 in21 punpcklwd m13, m12, m11 ; in19 in13 punpckhwd m11, m12 ; in15 in17 ITX_MUL2X_PACK 1, 6, 12, 10, 201, 4091, 3 ; t16a, t31a ITX_MUL2X_PACK 8, 6, 12, 10, 4052, 601, 3 ; t23a, t24a ITX_MUL2X_PACK 15, 6, 12, 10, 995, 3973, 3 ; t20a, t27a ITX_MUL2X_PACK 9, 6, 12, 10, 3857, 1380, 3 ; t19a, t28a ITX_MUL2X_PACK 14, 6, 12, 10, 1751, 3703, 3 ; t18a, t29a ITX_MUL2X_PACK 0, 6, 12, 10, 3513, 2106, 3 ; t21a, t26a ITX_MUL2X_PACK 13, 6, 12, 10, 2440, 3290, 3 ; t22a, t25a ITX_MUL2X_PACK 11, 6, 12, 10, 3035, 2751, 3 ; t17a, t30a .main2: psubsw m6, m1, m11 ; t17 t30 paddsw m1, m11 ; t16 t31 psubsw m11, m9, m14 ; t18 t29 paddsw m9, m14 ; t19 t28 psubsw m14, m15, m0 ; t21 t26 paddsw m15, m0 ; t20 t27 psubsw m0, m8, m13 ; t22 t25 paddsw m8, m13 ; t23 t24 ITX_MUL2X_PACK 6, 12, 13, 10, 799, 4017, 3 ; t17a t30a ITX_MUL2X_PACK 11, 12, 13, 10, m4017, 799, 3 ; t18a t29a ITX_MUL2X_PACK 14, 12, 13, 10, 3406, 2276, 3 ; t21a t26a ITX_MUL2X_PACK 0, 12, 13, 10, m2276, 3406, 3 ; t22a t25a psubsw m13, m1, m9 ; t19a t28a paddsw m1, m9 ; t16a t31a psubsw m9, m8, m15 ; t20a t27a paddsw m8, m15 ; t23a t24a psubsw m15, m6, m11 ; t18 t29 paddsw m6, m11 ; t17 t30 psubsw m11, m0, m14 ; t21 t26 paddsw m0, m14 ; t22 t25 ITX_MUL2X_PACK 15, 12, 14, 10, 1567, 3784, 1 ; t18a t29a ITX_MUL2X_PACK 13, 12, 14, 10, 1567, 3784, 1 ; t19 t28 ITX_MUL2X_PACK 9, 12, 14, 10, m3784, 1567, 1 ; t20 t27 ITX_MUL2X_PACK 11, 12, 14, 10, m3784, 1567, 1 ; t21a t26a vbroadcasti128 m12, [o(deint_shuf)] REPX {pshufb x, m12}, m0, m1, m6, m8 psubsw m14, m1, m8 ; t23 t24 paddsw m1, m8 ; t16 t31 psubsw m8, m6, m0 ; t22a t25a paddsw m6, m0 ; t17a t30a psubsw m0, m15, m11 ; t21 t26 paddsw m15, m11 ; t18 t29 psubsw m11, m13, m9 ; t20a t27a paddsw m13, m9 ; t19a t28a vpbroadcastd m12, [o(pw_2896x8)] punpcklqdq m9, m11, m0 ; t20a t21 punpckhqdq m11, m0 ; t27a t26 punpcklqdq m0, m14, m8 ; t23 t22a punpckhqdq m14, m8 ; t24 t25a psubw m8, m11, m9 ; t20 t21a paddw m11, m9 ; t27 t26a psubw m9, m14, m0 ; t23a t22 paddw m14, m0 ; t24a t25 REPX {pmulhrsw x, m12}, m8, m9, m14, m11 punpcklqdq m0, m1, m6 ; t16 t17a punpckhqdq m1, m6 ; t31 t30a psubsw m10, m5, m8 ; out20 out21 paddsw m5, m8 ; out11 out10 psubsw m6, m3, m14 ; out24 out25 paddsw m3, m14 ; out7 out6 psubsw m8, m7, m0 ; out16 out17 paddsw m7, m0 ; out15 out14 mova m0, [rsp+gprsize+0*32] punpcklqdq m12, m13, m15 ; t19a t18 punpckhqdq m13, m15 ; t28a t29 psubsw m15, m0, m1 ; out31 out30 paddsw m0, m1 ; out0 out1 mova m1, [rsp+gprsize+1*32] mova [rsp+gprsize+0*32], m6 mova m6, [rsp+gprsize+2*32] psubsw m14, m1, m13 ; out28 out29 paddsw m1, m13 ; out3 out2 psubsw m13, m2, m11 ; out27 out26 paddsw m2, m11 ; out4 out5 psubsw m11, m4, m9 ; out23 out22 paddsw m4, m9 ; out8 out9 psubsw m9, m6, m12 ; out19 out18 paddsw m6, m12 ; out12 out13 ret %macro LOAD_PACKED_16X2 4 ; dst, tmp, row[1-2] vbroadcasti128 m%1, [cq+16*%3] vbroadcasti128 m%2, [cq+16*%4] shufpd m%1, m%1, m%2, 0x0c %endmacro cglobal inv_txfm_add_dct_dct_32x8, 4, 4, 0, dst, stride, c, eob lea rax, [o_base] test eobd, eobd jnz .normal movd xm1, [o(pw_2896x8)] pmulhrsw xm0, xm1, [cq] movd xm2, [o(pw_8192)] mov [cq], eobd mov r2d, 8 .dconly: pmulhrsw xm0, xm2 movd xm2, [pw_2048] ; intentionally rip-relative pmulhrsw xm0, xm1 pmulhrsw xm0, xm2 vpbroadcastw m0, xm0 pxor m3, m3 .dconly_loop: mova m1, [dstq] punpckhbw m2, m1, m3 punpcklbw m1, m3 paddw m2, m0 paddw m1, m0 packuswb m1, m2 mova [dstq], m1 add dstq, strideq dec r2d jg .dconly_loop RET .normal: PROLOGUE 0, 4, 16, 32*3, dst, stride, c, eob %undef cmp LOAD_PACKED_16X2 0, 7, 0, 2 ; in0 in2 LOAD_PACKED_16X2 4, 7, 1, 3 ; in1 in3 LOAD_PACKED_16X2 1, 7, 4, 6 ; in4 in6 LOAD_PACKED_16X2 5, 7, 5, 7 ; in5 in7 pxor m8, m8 REPX {mova [cq+32*x], m8}, 0, 1, 2, 3 add cq, 16*16 LOAD_PACKED_16X2 2, 7, -8, -6 ; in8 in10 LOAD_PACKED_16X2 6, 7, -7, -5 ; in9 in11 LOAD_PACKED_16X2 3, 7, -4, -2 ; in12 in14 LOAD_PACKED_16X2 11, 7, -3, -1 ; in13 in15 REPX {mova [cq+32*x], m8}, -4, -3, -2, -1 mova [rsp+32*0], m4 mova [rsp+32*1], m5 mova [rsp+32*2], m6 cmp eobd, 106 jg .full pxor m4, m4 REPX {mova x, m4}, m5, m6, m7 call m(inv_txfm_add_dct_dct_8x32).main_fast jmp .pass2 .full: LOAD_PACKED_16X2 4, 7, 0, 2 ; in16 in18 LOAD_PACKED_16X2 12, 7, 3, 1 ; in19 in17 LOAD_PACKED_16X2 5, 7, 4, 6 ; in20 in22 LOAD_PACKED_16X2 13, 7, 7, 5 ; in23 in21 REPX {mova [cq+32*x], m8}, 0, 1, 2, 3 add cq, 16*8 LOAD_PACKED_16X2 6, 7, 0, 2 ; in24 in26 LOAD_PACKED_16X2 14, 7, 3, 1 ; in27 in25 LOAD_PACKED_16X2 7, 8, 4, 6 ; in28 in30 LOAD_PACKED_16X2 15, 8, 7, 5 ; in31 in29 pxor m8, m8 REPX {mova [cq+32*x], m8}, 0, 1, 2, 3 call m(inv_txfm_add_dct_dct_8x32).main .pass2: vpbroadcastd m12, [o(pw_8192)] REPX {pmulhrsw x, m12}, m8, m9, m10, m11, m13, m14, m15 mova [rsp+32*1], m9 mova [rsp+32*2], m10 punpckhwd m9, m0, m2 punpcklwd m0, m2 punpckhwd m2, m1, m3 punpcklwd m1, m3 punpcklwd m10, m4, m6 punpckhwd m4, m6 punpcklwd m6, m5, m7 punpckhwd m5, m7 punpckhwd m3, m0, m9 punpcklwd m0, m9 punpckhwd m9, m2, m1 punpcklwd m2, m1 punpcklwd m7, m10, m4 punpckhwd m10, m4 punpcklwd m4, m5, m6 punpckhwd m5, m6 punpckhdq m1, m0, m2 punpckldq m0, m2 punpckldq m2, m3, m9 punpckhdq m3, m9 punpckldq m6, m7, m4 punpckhdq m7, m4 punpckldq m9, m10, m5 punpckhdq m10, m5 REPX {pmulhrsw x, m12}, m0, m1, m2, m3, m6, m7, m9, m10 pmulhrsw m12, [rsp+32*0] mova [rsp+32*0], m8 vperm2i128 m4, m0, m6, 0x31 vinserti128 m0, m0, xm6, 1 vperm2i128 m5, m1, m7, 0x31 vinserti128 m1, m1, xm7, 1 vperm2i128 m6, m2, m9, 0x31 vinserti128 m2, m2, xm9, 1 vperm2i128 m7, m3, m10, 0x31 vinserti128 m3, m3, xm10, 1 call m(idct_16x8_internal).main vpbroadcastd m8, [o(pw_2048)] REPX {pmulhrsw x, m8}, m0, m1, m2, m3, m4, m5, m6, m7 lea r2, [strideq*3] WRITE_16X2 0, 1, 8, 0, strideq*0, strideq*1 WRITE_16X2 2, 3, 0, 1, strideq*2, r2 lea r3, [dstq+strideq*4] %define dstq r3 WRITE_16X2 4, 5, 0, 1, strideq*0, strideq*1 WRITE_16X2 6, 7, 0, 1, strideq*2, r2 mova m0, [rsp+32*0] mova m1, [rsp+32*1] mova m2, [rsp+32*2] punpckhwd m7, m0, m2 punpcklwd m0, m2 punpckhwd m2, m1, m11 punpcklwd m1, m11 punpckhwd m4, m12, m14 punpcklwd m12, m14 punpckhwd m5, m13, m15 punpcklwd m13, m15 punpckhwd m3, m0, m7 punpcklwd m0, m7 punpckhwd m9, m2, m1 punpcklwd m2, m1 punpcklwd m7, m12, m4 punpckhwd m12, m4 punpcklwd m4, m5, m13 punpckhwd m5, m13 punpckhdq m1, m0, m2 punpckldq m0, m2 punpckldq m2, m3, m9 punpckhdq m3, m9 punpckldq m6, m7, m4 punpckhdq m7, m4 punpckldq m9, m12, m5 punpckhdq m12, m5 vperm2i128 m4, m0, m6, 0x31 vinserti128 m0, m0, xm6, 1 vperm2i128 m5, m1, m7, 0x31 vinserti128 m1, m1, xm7, 1 vperm2i128 m6, m2, m9, 0x31 vinserti128 m2, m2, xm9, 1 vperm2i128 m7, m3, m12, 0x31 vinserti128 m3, m3, xm12, 1 call m(idct_16x8_internal).main2 vpbroadcastd m8, [o(pw_2048)] REPX {pmulhrsw x, m8}, m0, m1, m2, m3, m4, m5, m6, m7 add r0, 16 add r3, 16 %define dstq r0 WRITE_16X2 0, 1, 8, 0, strideq*0, strideq*1 WRITE_16X2 2, 3, 0, 1, strideq*2, r2 %define dstq r3 WRITE_16X2 4, 5, 0, 1, strideq*0, strideq*1 WRITE_16X2 6, 7, 0, 1, strideq*2, r2 RET cglobal inv_txfm_add_identity_identity_8x32, 4, 5, 11, dst, stride, c, eob vpbroadcastd m9, [pw_5] lea r4, [strideq*3] sub eobd, 107 ; loop_iterations = 1 + (eobd >= 107) .loop: mova xm0, [cq+16* 0] mova xm1, [cq+16* 4] vinserti128 m0, m0, [cq+16* 1], 1 vinserti128 m1, m1, [cq+16* 5], 1 pxor m8, m8 mova [cq+32*0], m8 mova [cq+32*2], m8 add cq, 16*16 mova xm2, [cq-16* 8] mova xm3, [cq-16* 4] vinserti128 m2, m2, [cq-16* 7], 1 vinserti128 m3, m3, [cq-16* 3], 1 mova xm4, [cq+16* 0] mova xm5, [cq+16* 4] vinserti128 m4, m4, [cq+16* 1], 1 vinserti128 m5, m5, [cq+16* 5], 1 mova xm6, [cq+16* 8] mova xm7, [cq+16*12] vinserti128 m6, m6, [cq+16* 9], 1 vinserti128 m7, m7, [cq+16*13], 1 REPX {mova [cq+32*x], m8}, -4, -2, 0, 2, 4, 6 REPX {paddw x, m9}, m0, m1, m2, m3, m4, m5, m6, m7 call .transpose8x8 REPX {psraw x, 3 }, m0, m1, m2, m3, m4, m5, m6, m7 WRITE_8X4 0, 4, 8, 10, strideq*8, strideq*4, r4*4 add dstq, strideq WRITE_8X4 1, 5, 0, 4, strideq*8, strideq*4, r4*4 add dstq, strideq WRITE_8X4 2, 6, 0, 4, strideq*8, strideq*4, r4*4 add dstq, strideq WRITE_8X4 3, 7, 0, 4, strideq*8, strideq*4, r4*4 add dstq, strideq sub cq, 16*16-32 lea dstq, [dstq+r4*4] add eobd, 0x80000000 jnc .loop RET ALIGN function_align .transpose8x8: punpckhwd m8, m4, m5 punpcklwd m4, m5 punpckhwd m5, m0, m1 punpcklwd m0, m1 punpckhwd m1, m6, m7 punpcklwd m6, m7 punpckhwd m7, m2, m3 punpcklwd m2, m3 punpckhdq m3, m0, m2 punpckldq m0, m2 punpckldq m2, m4, m6 punpckhdq m4, m6 punpckhdq m6, m5, m7 punpckldq m5, m7 punpckldq m7, m8, m1 punpckhdq m8, m1 punpckhqdq m1, m0, m2 punpcklqdq m0, m2 punpcklqdq m2, m3, m4 punpckhqdq m3, m4 punpcklqdq m4, m5, m7 punpckhqdq m5, m7 punpckhqdq m7, m6, m8 punpcklqdq m6, m8 ret cglobal inv_txfm_add_identity_identity_32x8, 4, 6, 10, dst, stride, c, eob add cq, 16*8 vpbroadcastd m9, [pw_4096] lea r4, [strideq*3] lea r5, [dstq+strideq*4] sub eobd, 107 .loop: mova xm0, [cq-16*8] mova xm1, [cq-16*7] vinserti128 m0, m0, [cq+16*0], 1 vinserti128 m1, m1, [cq+16*1], 1 mova xm2, [cq-16*6] mova xm3, [cq-16*5] vinserti128 m2, m2, [cq+16*2], 1 vinserti128 m3, m3, [cq+16*3], 1 mova xm4, [cq-16*4] mova xm5, [cq-16*3] vinserti128 m4, m4, [cq+16*4], 1 vinserti128 m5, m5, [cq+16*5], 1 mova xm6, [cq-16*2] mova xm7, [cq-16*1] vinserti128 m6, m6, [cq+16*6], 1 vinserti128 m7, m7, [cq+16*7], 1 pxor m8, m8 REPX {mova [cq+32*x], m8}, -4, -3, -2, -1, 0, 1, 2, 3 call m(inv_txfm_add_identity_identity_8x32).transpose8x8 REPX {pmulhrsw x, m9}, m0, m1, m2, m3, m4, m5, m6, m7 WRITE_16X2 0, 1, 8, 0, strideq*0, strideq*1 WRITE_16X2 2, 3, 0, 1, strideq*2, r4 %define dstq r5 WRITE_16X2 4, 5, 0, 1, strideq*0, strideq*1 WRITE_16X2 6, 7, 0, 1, strideq*2, r4 add cq, 16*16 add r0, 16 add r5, 16 add eobd, 0x80000000 jnc .loop RET %define o_base pw_5 + 128 %macro LOAD_16ROWS 2-4 0, 1 ; src, stride, is_rect2, zero_coefs %if %3 vpbroadcastd m15, [o(pw_2896x8)] pmulhrsw m0, m15, [%1+%2* 0] pmulhrsw m1, m15, [%1+%2* 1] pmulhrsw m2, m15, [%1+%2* 2] pmulhrsw m3, m15, [%1+%2* 3] pmulhrsw m4, m15, [%1+%2* 4] pmulhrsw m5, m15, [%1+%2* 5] pmulhrsw m6, m15, [%1+%2* 6] pmulhrsw m7, m15, [%1+%2* 7] pmulhrsw m8, m15, [%1+%2* 8] pmulhrsw m9, m15, [%1+%2* 9] pmulhrsw m10, m15, [%1+%2*10] pmulhrsw m11, m15, [%1+%2*11] pmulhrsw m12, m15, [%1+%2*12] pmulhrsw m13, m15, [%1+%2*13] pmulhrsw m14, m15, [%1+%2*14] pmulhrsw m15, [%1+%2*15] %else mova m0, [%1+%2* 0] mova m1, [%1+%2* 1] mova m2, [%1+%2* 2] mova m3, [%1+%2* 3] mova m4, [%1+%2* 4] mova m5, [%1+%2* 5] mova m6, [%1+%2* 6] mova m7, [%1+%2* 7] mova m8, [%1+%2* 8] mova m9, [%1+%2* 9] mova m10, [%1+%2*10] mova m11, [%1+%2*11] mova m12, [%1+%2*12] mova m13, [%1+%2*13] mova m14, [%1+%2*14] mova m15, [%1+%2*15] %endif mova [rsp], m15 %if %4 pxor m15, m15 REPX {mova [%1+%2*x], m15}, 0, 1, 2, 3, 4, 5, 6, 7, \ 8, 9, 10, 11, 12, 13, 14, 15 %endif %endmacro %macro IDCT32_PASS2_END 7 ; coefs[1-2], tmp[1-2], rnd, offset[1-2] mova m%4, [%2] paddsw m%3, m%1, m%4 psubsw m%1, m%4 pmovzxbw m%4, [dstq+%6] pmulhrsw m%3, m%5 pmulhrsw m%1, m%5 paddw m%3, m%4 pmovzxbw m%4, [r2+%7] paddw m%1, m%4 packuswb m%3, m%1 vpermq m%3, m%3, q3120 mova [dstq+%6], xm%3 vextracti128 [r2+%7], m%3, 1 %endmacro cglobal inv_txfm_add_dct_dct_16x32, 4, 4, 0, dst, stride, c, eob lea rax, [o_base] test eobd, eobd jz .dconly PROLOGUE 0, 8, 16, 32*35, dst, stride, c, eob, tmp1, tmp2, \ base, tmp3 %undef cmp LOAD_16ROWS cq, 64, 1 call m(idct_16x16_internal).main lea tmp1q, [rsp+32*7] lea tmp2q, [tmp1q+32*8] lea tmp3q, [tmp1q+32*16] mova m1, [rsp+32*1] mova [rsp+32*0], m6 mova [rsp+32*1], m7 vpbroadcastd m7, [o(pw_16384)] call .transpose_2x8x8_round mova m15, [rsp+32*0] mova [tmp3q-32*4+ 0], xm0 vextracti128 [tmp3q+32*0+ 0], m0, 1 mova [tmp3q-32*3+ 0], xm2 vextracti128 [tmp3q+32*1+ 0], m2, 1 mova [tmp3q-32*2+ 0], xm4 vextracti128 [tmp3q+32*2+ 0], m4, 1 mova [tmp3q-32*1+ 0], xm6 vextracti128 [tmp3q+32*3+ 0], m6, 1 mova [tmp3q-32*4+16], xm8 vextracti128 [tmp3q+32*0+16], m8, 1 mova [tmp3q-32*3+16], xm10 vextracti128 [tmp3q+32*1+16], m10, 1 mova [tmp3q-32*2+16], xm12 vextracti128 [tmp3q+32*2+16], m12, 1 mova [tmp3q-32*1+16], xm14 vextracti128 [tmp3q+32*3+16], m14, 1 cmp eobd, 150 jg .full vinserti128 m0, m1, xm9, 1 vperm2i128 m4, m1, m9, 0x31 vinserti128 m2, m5, xm13, 1 vperm2i128 m6, m5, m13, 0x31 vinserti128 m1, m3, xm11, 1 vperm2i128 m5, m3, m11, 0x31 vinserti128 m3, m7, xm15, 1 vperm2i128 m7, m7, m15, 0x31 call .main_oddhalf_fast pxor m8, m8 REPX {mova x, m8}, m9, m10, m11, m12, m13, m14, m15 jmp .idct16 .dconly: movd xm1, [o(pw_2896x8)] pmulhrsw xm0, xm1, [cq] movd xm2, [o(pw_16384)] mov [cq], eobd pmulhrsw xm0, xm1 mov r2d, 16 jmp m(inv_txfm_add_dct_dct_16x4).dconly .full: mova [tmp1q-32*4], m1 mova [tmp1q-32*3], m3 mova [tmp1q-32*2], m5 mova [tmp1q-32*1], m7 mova [tmp1q+32*0], m9 mova [tmp1q+32*1], m11 mova [tmp1q+32*2], m13 mova [tmp1q+32*3], m15 LOAD_16ROWS cq+32, 64, 1 call m(idct_16x16_internal).main lea r2, [tmp3q+32*8] mova m1, [rsp+32*1] mova [rsp+32*0], m6 mova [rsp+32*1], m7 vpbroadcastd m7, [o(pw_16384)] call .transpose_2x8x8_round mova m15, [rsp+32*0] mova [r2-32*4+ 0], xm0 vextracti128 [r2+32*0+ 0], m0, 1 mova [r2-32*3+ 0], xm2 vextracti128 [r2+32*1+ 0], m2, 1 mova [r2-32*2+ 0], xm4 vextracti128 [r2+32*2+ 0], m4, 1 mova [r2-32*1+ 0], xm6 vextracti128 [r2+32*3+ 0], m6, 1 mova [r2-32*4+16], xm8 vextracti128 [r2+32*0+16], m8, 1 mova [r2-32*3+16], xm10 vextracti128 [r2+32*1+16], m10, 1 mova [r2-32*2+16], xm12 vextracti128 [r2+32*2+16], m12, 1 mova [r2-32*1+16], xm14 vextracti128 [r2+32*3+16], m14, 1 vinserti128 m8, m1, xm9, 1 vperm2i128 m12, m1, m9, 0x31 mova xm0, [tmp1q-32*4] mova xm1, [tmp1q-32*3] vinserti128 m0, m0, [tmp1q+32*0], 1 vinserti128 m1, m1, [tmp1q+32*1], 1 vinserti128 m10, m5, xm13, 1 vperm2i128 m14, m5, m13, 0x31 mova xm4, [tmp1q-32*4+16] mova xm5, [tmp1q-32*3+16] vinserti128 m4, m4, [tmp1q+32*0+16], 1 vinserti128 m5, m5, [tmp1q+32*1+16], 1 vinserti128 m9, m3, xm11, 1 vperm2i128 m13, m3, m11, 0x31 mova xm2, [tmp1q-32*2] mova xm3, [tmp1q-32*1] vinserti128 m2, m2, [tmp1q+32*2], 1 vinserti128 m3, m3, [tmp1q+32*3], 1 vinserti128 m11, m7, xm15, 1 vperm2i128 m15, m7, m15, 0x31 mova xm6, [tmp1q-32*2+16] mova xm7, [tmp1q-32*1+16] vinserti128 m6, m6, [tmp1q+32*2+16], 1 vinserti128 m7, m7, [tmp1q+32*3+16], 1 call .main_oddhalf LOAD_8ROWS_H r2-32*4, 32 .idct16: LOAD_8ROWS tmp3q-32*4, 32 mova [rsp], m15 call m(idct_16x16_internal).main imul r2, strideq, 19 lea r3, [strideq*3] add r2, dstq call .pass2_end RET ALIGN function_align .main_oddhalf_fast: ; lower half is zero mova [rsp+gprsize+32*1], m7 pxor m7, m7 mova [rsp+gprsize+32*0], m7 mova [rsp+gprsize+32*2], m7 vpbroadcastd m11, [o(pw_3703x8)] vpbroadcastd m7, [o(pw_1751x8)] vpbroadcastd m12, [o(pw_m1380x8)] vpbroadcastd m8, [o(pw_3857x8)] vpbroadcastd m13, [o(pw_3973x8)] vpbroadcastd m15, [o(pw_995x8)] pmulhrsw m11, m4 ; t29a pmulhrsw m4, m7 ; t18a pmulhrsw m12, m3 ; t19a pmulhrsw m3, m8 ; t28a pmulhrsw m13, m2 ; t27a pmulhrsw m2, m15 ; t20a vpbroadcastd m10, [o(pw_m2106x8)] vpbroadcastd m7, [o(pw_3513x8)] vpbroadcastd m9, [o(pw_3290x8)] vpbroadcastd m8, [o(pw_2440x8)] vpbroadcastd m14, [o(pw_m601x8)] vpbroadcastd m15, [o(pw_4052x8)] pmulhrsw m10, m5 ; t21a pmulhrsw m5, m7 ; t26a pmulhrsw m9, m6 ; t25a pmulhrsw m6, m8 ; t22a pmulhrsw m14, m1 ; t23a pmulhrsw m1, m15 ; t24a vpbroadcastd m15, [o(pd_2048)] jmp .main2 ALIGN function_align .main_oddhalf: mova [rsp+gprsize+32*0], m15 mova [rsp+gprsize+32*1], m7 mova [rsp+gprsize+32*2], m8 vpbroadcastd m15, [o(pd_2048)] ITX_MULSUB_2W 4, 11, 7, 8, 15, 1751, 3703 ; t18a, t29a ITX_MULSUB_2W 12, 3, 7, 8, 15, 3857, 1380 ; t19a, t28a ITX_MULSUB_2W 2, 13, 7, 8, 15, 995, 3973 ; t20a, t27a ITX_MULSUB_2W 10, 5, 7, 8, 15, 3513, 2106 ; t21a, t26a ITX_MULSUB_2W 6, 9, 7, 8, 15, 2440, 3290 ; t22a, t25a ITX_MULSUB_2W 14, 1, 7, 8, 15, 4052, 601 ; t23a, t24a .main2: psubsw m7, m12, m4 ; t18 paddsw m12, m4 ; t19 psubsw m4, m2, m10 ; t21 paddsw m2, m10 ; t20 psubsw m10, m14, m6 ; t22 paddsw m14, m6 ; t23 psubsw m6, m1, m9 ; t25 paddsw m1, m9 ; t24 psubsw m9, m13, m5 ; t26 paddsw m13, m5 ; t27 psubsw m5, m3, m11 ; t29 paddsw m3, m11 ; t28 ITX_MULSUB_2W 5, 7, 8, 11, 15, m4017, 799 ; t18a, t29a ITX_MULSUB_2W 9, 4, 8, 11, 15, 3406, 2276 ; t21a, t26a ITX_MULSUB_2W 6, 10, 8, 11, 15, m2276, 3406 ; t22a, t25a psubsw m8, m14, m2 ; t20a paddsw m14, m2 ; t23a psubsw m2, m1, m13 ; t27a paddsw m1, m13 ; t24a psubsw m13, m6, m9 ; t21 paddsw m6, m9 ; t22 psubsw m9, m10, m4 ; t26 paddsw m10, m4 ; t25 ITX_MULSUB_2W 2, 8, 4, 11, 15, m3784, 1567 ; t20, t27 ITX_MULSUB_2W 9, 13, 4, 11, 15, m3784, 1567 ; t21a, t26a mova m4, [rsp+gprsize+32*0] ; in31 mova [rsp+gprsize+32*0], m6 ; t22 mova m6, [rsp+gprsize+32*1] ; in15 mova [rsp+gprsize+32*1], m14 ; t23a mova m14, [rsp+gprsize+32*2] ; in17 mova [rsp+gprsize+32*2], m1 ; t24a ITX_MULSUB_2W 0, 4, 1, 11, 15, 201, 4091 ; t16a, t31a ITX_MULSUB_2W 14, 6, 1, 11, 15, 3035, 2751 ; t17a, t30a psubsw m1, m0, m14 ; t17 paddsw m0, m14 ; t16 psubsw m14, m4, m6 ; t30 paddsw m4, m6 ; t31 ITX_MULSUB_2W 14, 1, 6, 11, 15, 799, 4017 ; t17a, t30a psubsw m6, m0, m12 ; t19a paddsw m0, m12 ; t16a psubsw m12, m4, m3 ; t28a paddsw m4, m3 ; t31a psubsw m3, m14, m5 ; t18 paddsw m14, m5 ; t17 psubsw m5, m1, m7 ; t29 paddsw m1, m7 ; t30 ITX_MULSUB_2W 5, 3, 7, 11, 15, 1567, 3784 ; t18a, t29a ITX_MULSUB_2W 12, 6, 7, 11, 15, 1567, 3784 ; t19, t28 psubsw m7, m1, m10 ; t25a paddsw m1, m10 ; t30a psubsw m10, m5, m9 ; t21 paddsw m5, m9 ; t18 psubsw m9, m12, m2 ; t20a paddsw m12, m2 ; t19a psubsw m2, m3, m13 ; t26 paddsw m3, m13 ; t29 psubsw m13, m6, m8 ; t27a paddsw m6, m8 ; t28a mova [tmp1q-32*2], m5 mova [tmp1q-32*1], m12 mova [tmp2q+32*0], m6 mova [tmp2q+32*1], m3 mova [tmp2q+32*2], m1 mova m5, [rsp+gprsize+32*0] ; t22 mova m6, [rsp+gprsize+32*1] ; t23 mova m3, [rsp+gprsize+32*2] ; t24a vpbroadcastd m8, [o(pw_2896x8)] psubsw m1, m14, m5 ; t22a paddsw m14, m5 ; t17a psubsw m5, m0, m6 ; t23 paddsw m0, m6 ; t16 psubsw m6, m4, m3 ; t24 paddsw m4, m3 ; t31 mova [tmp1q-32*4], m0 mova [tmp1q-32*3], m14 mova [tmp2q+32*3], m4 psubw m3, m13, m9 ; t20 paddw m13, m9 ; t27 psubw m9, m2, m10 ; t21a paddw m2, m10 ; t26a psubw m10, m7, m1 ; t22 paddw m7, m1 ; t25 psubw m1, m6, m5 ; t23a paddw m6, m5 ; t24a REPX {pmulhrsw x, m8}, m3, m13, m9, m2, m10, m7, m1, m6 mova [tmp1q+32*0], m3 mova [tmp1q+32*1], m9 mova [tmp1q+32*2], m10 mova [tmp1q+32*3], m1 mova [tmp2q-32*4], m6 mova [tmp2q-32*3], m7 mova [tmp2q-32*2], m2 mova [tmp2q-32*1], m13 ret ALIGN function_align .transpose_2x8x8_round: punpckhwd m6, m12, m13 punpcklwd m12, m13 punpckhwd m13, m8, m9 punpcklwd m8, m9 punpckhwd m9, m14, m15 punpcklwd m14, m15 punpckhwd m15, m10, m11 punpcklwd m10, m11 REPX {pmulhrsw x, m7}, m0, m1, m2, m3, m4, m5 punpckhdq m11, m8, m10 punpckldq m8, m10 punpckldq m10, m12, m14 punpckhdq m12, m14 punpckhdq m14, m13, m15 punpckldq m13, m15 punpckldq m15, m6, m9 punpckhdq m6, m9 punpckhqdq m9, m8, m10 punpcklqdq m8, m10 punpcklqdq m10, m11, m12 punpckhqdq m11, m12 punpcklqdq m12, m13, m15 punpckhqdq m13, m15 punpckhqdq m15, m14, m6 punpcklqdq m14, m6 pmulhrsw m6, m7, [rsp+gprsize+32*0] REPX {pmulhrsw x, m7}, m8, m9, m10, m11, m12, m13, m14, m15 pmulhrsw m7, [rsp+gprsize+32*1] mova [rsp+gprsize+32*0], m15 punpckhwd m15, m4, m5 punpcklwd m4, m5 punpckhwd m5, m0, m1 punpcklwd m0, m1 punpckhwd m1, m6, m7 punpcklwd m6, m7 punpckhwd m7, m2, m3 punpcklwd m2, m3 punpckhdq m3, m0, m2 punpckldq m0, m2 punpckldq m2, m4, m6 punpckhdq m4, m6 punpckhdq m6, m5, m7 punpckldq m5, m7 punpckldq m7, m15, m1 punpckhdq m15, m1 punpckhqdq m1, m0, m2 punpcklqdq m0, m2 punpcklqdq m2, m3, m4 punpckhqdq m3, m4 punpcklqdq m4, m5, m7 punpckhqdq m5, m7 punpckhqdq m7, m6, m15 punpcklqdq m6, m15 ret ALIGN function_align .pass2_end: mova [rsp+gprsize+32*0], m7 mova [rsp+gprsize+32*2], m15 vpbroadcastd m15, [o(pw_2048)] IDCT32_PASS2_END 0, tmp2q+32*3, 1, 7, 15, strideq*0, r3*4 IDCT32_PASS2_END 4, tmp2q-32*1, 0, 7, 15, strideq*4, strideq*8 IDCT32_PASS2_END 8, tmp1q+32*3, 0, 4, 15, strideq*8, strideq*4 IDCT32_PASS2_END 12, tmp1q-32*1, 0, 4, 15, r3*4, strideq*0 add dstq, strideq sub r2, strideq mova m1, [rsp+gprsize+32*1] IDCT32_PASS2_END 1, tmp2q+32*2, 0, 4, 15, strideq*0, r3*4 IDCT32_PASS2_END 5, tmp2q-32*2, 0, 4, 15, strideq*4, strideq*8 IDCT32_PASS2_END 9, tmp1q+32*2, 0, 4, 15, strideq*8, strideq*4 IDCT32_PASS2_END 13, tmp1q-32*2, 0, 4, 15, r3*4, strideq*0 add dstq, strideq sub r2, strideq IDCT32_PASS2_END 2, tmp2q+32*1, 0, 4, 15, strideq*0, r3*4 IDCT32_PASS2_END 6, tmp2q-32*3, 0, 4, 15, strideq*4, strideq*8 IDCT32_PASS2_END 10, tmp1q+32*1, 0, 4, 15, strideq*8, strideq*4 IDCT32_PASS2_END 14, tmp1q-32*3, 0, 4, 15, r3*4, strideq*0 add dstq, strideq sub r2, strideq mova m7, [rsp+gprsize+32*0] mova m1, [rsp+gprsize+32*2] IDCT32_PASS2_END 3, tmp2q+32*0, 0, 4, 15, strideq*0, r3*4 IDCT32_PASS2_END 7, tmp2q-32*4, 0, 4, 15, strideq*4, strideq*8 IDCT32_PASS2_END 11, tmp1q+32*0, 0, 4, 15, strideq*8, strideq*4 IDCT32_PASS2_END 1, tmp1q-32*4, 0, 4, 15, r3*4, strideq*0 ret ; Perform the final sumsub step and YMM lane shuffling %macro IDCT32_PASS1_END 4 ; row[1-2], tmp[1-2] mova m%3, [tmp2q+32*( 3-%1)] psubsw m%4, m%1, m%3 paddsw m%1, m%3 mova m%3, [tmp1q+32*(11-%2)] mova [tmp1q+32*(11-%2)+16], xm%4 vextracti128 [tmp2q+32*( 3-%1)+16], m%4, 1 paddsw m%4, m%2, m%3 psubsw m%2, m%3 mova [tmp1q+32*(11-%2)], xm%2 vextracti128 [tmp2q+32*( 3-%1)], m%2, 1 vperm2i128 m%2, m%1, m%4, 0x31 vinserti128 m%1, m%1, xm%4, 1 %endmacro cglobal inv_txfm_add_dct_dct_32x16, 4, 4, 0, dst, stride, c, eob lea rax, [o_base] test eobd, eobd jnz .normal movd xm1, [o(pw_2896x8)] pmulhrsw xm0, xm1, [cq] movd xm2, [o(pw_16384)] mov [cq], eobd pmulhrsw xm0, xm1 mov r2d, 16 jmp m(inv_txfm_add_dct_dct_32x8).dconly .normal: PROLOGUE 0, 6, 16, 32*19, dst, stride, c, eob, tmp1, tmp2 vpbroadcastd m15, [o(pw_2896x8)] pmulhrsw m0, m15, [cq+32* 1] pmulhrsw m1, m15, [cq+32* 3] pmulhrsw m2, m15, [cq+32* 5] pmulhrsw m3, m15, [cq+32* 7] pmulhrsw m4, m15, [cq+32* 9] pmulhrsw m5, m15, [cq+32*11] pmulhrsw m6, m15, [cq+32*13] pmulhrsw m7, m15, [cq+32*15] pmulhrsw m8, m15, [cq+32*17] pmulhrsw m9, m15, [cq+32*19] pmulhrsw m10, m15, [cq+32*21] pmulhrsw m11, m15, [cq+32*23] pmulhrsw m12, m15, [cq+32*25] pmulhrsw m13, m15, [cq+32*27] pmulhrsw m14, m15, [cq+32*29] pmulhrsw m15, [cq+32*31] lea tmp1q, [rsp+32*7] lea tmp2q, [tmp1q+32*8] call m(inv_txfm_add_dct_dct_16x32).main_oddhalf LOAD_16ROWS cq+32*0, 32*2, 1, 0 pxor m15, m15 mov r3d, 8 .zero_loop: mova [cq+32*0], m15 mova [cq+32*1], m15 mova [cq+32*2], m15 mova [cq+32*3], m15 add cq, 32*4 dec r3d jg .zero_loop call m(idct_16x16_internal).main call .pass1_end lea r2, [strideq*3] mov r3, dstq .pass2: vpbroadcastd m7, [o(pw_16384)] call m(inv_txfm_add_dct_dct_16x32).transpose_2x8x8_round call m(idct_16x16_internal).main mova [rsp+32*2], m15 vpbroadcastd m15, [o(pw_2048)] REPX {pmulhrsw x, m15}, m2, m3, m0 WRITE_16X2 2, 3, 1, 2, strideq*2, r2 pmulhrsw m1, m15, [rsp+32*1] WRITE_16X2 0, 1, 2, 3, strideq*0, strideq*1 lea dstq, [dstq+strideq*4] REPX {pmulhrsw x, m15}, m4, m5, m6, m7 WRITE_16X2 4, 5, 2, 3, strideq*0, strideq*1 WRITE_16X2 6, 7, 2, 3, strideq*2, r2 lea dstq, [dstq+strideq*4] REPX {pmulhrsw x, m15}, m8, m9, m10, m11 WRITE_16X2 8, 9, 2, 3, strideq*0, strideq*1 WRITE_16X2 10, 11, 2, 3, strideq*2, r2 lea dstq, [dstq+strideq*4] REPX {pmulhrsw x, m15}, m11, m12, m13, m14 pmulhrsw m15, [rsp+32*2] WRITE_16X2 12, 13, 2, 3, strideq*0, strideq*1 WRITE_16X2 14, 15, 2, 3, strideq*2, r2 test r3, r3 jnz .right_half RET .right_half: LOAD_8ROWS tmp1q-32*4, 32 LOAD_8ROWS_H tmp2q-32*4, 32 lea dstq, [r3+16] xor r3d, r3d mova [rsp+32*0], m6 mova [rsp+32*1], m7 jmp .pass2 ALIGN function_align .pass1_end: mova [rsp+gprsize+32*0], m9 IDCT32_PASS1_END 0, 8, 1, 9 IDCT32_PASS1_END 2, 10, 1, 9 IDCT32_PASS1_END 3, 11, 1, 9 IDCT32_PASS1_END 4, 12, 1, 9 IDCT32_PASS1_END 5, 13, 1, 9 IDCT32_PASS1_END 6, 14, 1, 9 IDCT32_PASS1_END 7, 15, 1, 9 mova m1, [rsp+gprsize+32*1] mova m9, [rsp+gprsize+32*0] mova [rsp+gprsize+32*0], m6 mova [rsp+gprsize+32*1], m7 IDCT32_PASS1_END 1, 9, 6, 7 ret cglobal inv_txfm_add_identity_identity_16x32, 4, 5, 12, dst, stride, c, eob %undef cmp lea rax, [o_base] vpbroadcastd m9, [o(pw_2896x8)] vpbroadcastd m10, [o(pw_5793x4)] vpbroadcastd m11, [o(pw_5)] cmp eobd, 43 ; if (eob > 43) setg r4b ; iteration_count++ cmp eobd, 150 ; if (eob > 150) setg al ; iteration_count++ add eobd, -279 ; if (eob > 278) adc r4b, al ; iteration_count++ lea r3, [strideq*3] mov rax, cq .loop: mova xm0, [cq+64* 0] mova xm1, [cq+64* 1] vinserti128 m0, m0, [cq+64* 8], 1 vinserti128 m1, m1, [cq+64* 9], 1 mova xm2, [cq+64* 2] mova xm3, [cq+64* 3] vinserti128 m2, m2, [cq+64*10], 1 vinserti128 m3, m3, [cq+64*11], 1 mova xm4, [cq+64* 4] mova xm5, [cq+64* 5] vinserti128 m4, m4, [cq+64*12], 1 vinserti128 m5, m5, [cq+64*13], 1 mova xm6, [cq+64* 6] mova xm7, [cq+64* 7] vinserti128 m6, m6, [cq+64*14], 1 vinserti128 m7, m7, [cq+64*15], 1 REPX {pmulhrsw x, m9 }, m0, m1, m2, m3, m4, m5, m6, m7 REPX {psllw x, 2 }, m0, m1, m2, m3, m4, m5, m6, m7 call m(inv_txfm_add_identity_identity_8x32).transpose8x8 REPX {pmulhrsw x, m10}, m0, m1, m2, m3, m4, m5, m6, m7 REPX {paddw x, m11}, m0, m1, m2, m3, m4, m5, m6, m7 REPX {psraw x, 3 }, m0, m1, m2, m3, m4, m5, m6, m7 WRITE_16X2 0, 1, 8, 0, strideq*0, strideq*1 WRITE_16X2 2, 3, 0, 1, strideq*2, r3 lea dstq, [dstq+strideq*4] WRITE_16X2 4, 5, 0, 1, strideq*0, strideq*1 WRITE_16X2 6, 7, 0, 1, strideq*2, r3 lea dstq, [dstq+strideq*4] add cq, 16 dec r4b jge .loop sub cq, 32 pxor m0, m0 mov r0d, 8 cmp cq, rax jg .zero_loop .zero_loop_half: mova [rax+64*0], m0 mova [rax+64*1], m0 mova [rax+64*2], m0 mova [rax+64*3], m0 add rax, 64*4 sub r0d, 2 jg .zero_loop_half RET .zero_loop: mova [rax+32*0], m0 mova [rax+32*1], m0 mova [rax+32*2], m0 mova [rax+32*3], m0 add rax, 32*4 dec r0d jg .zero_loop RET cglobal inv_txfm_add_identity_identity_32x16, 4, 6, 12, dst, stride, c, eob %undef cmp lea rax, [o_base] vpbroadcastd m9, [o(pw_2896x8)] vpbroadcastd m10, [o(pw_5793x4)] vpbroadcastd m11, [o(pw_2048)] cmp eobd, 35 ; if (eob > 35) setg r4b ; iteration_count++ cmp eobd, 150 ; if (eob > 150) setg r3b ; iteration_count += 2 lea r4d, [r4+r3*2] lea r3, [strideq*3] mov r5, dstq mov rax, cq .loop: mova xm0, [cq+32* 0] mova xm1, [cq+32* 1] vinserti128 m0, m0, [cq+32* 8], 1 vinserti128 m1, m1, [cq+32* 9], 1 mova xm2, [cq+32* 2] mova xm3, [cq+32* 3] vinserti128 m2, m2, [cq+32*10], 1 vinserti128 m3, m3, [cq+32*11], 1 mova xm4, [cq+32* 4] mova xm5, [cq+32* 5] vinserti128 m4, m4, [cq+32*12], 1 vinserti128 m5, m5, [cq+32*13], 1 mova xm6, [cq+32* 6] mova xm7, [cq+32* 7] vinserti128 m6, m6, [cq+32*14], 1 vinserti128 m7, m7, [cq+32*15], 1 REPX {pmulhrsw x, m9 }, m0, m1, m2, m3, m4, m5, m6, m7 REPX {psllw x, 3 }, m0, m1, m2, m3, m4, m5, m6, m7 call m(inv_txfm_add_identity_identity_8x32).transpose8x8 REPX {pmulhrsw x, m10}, m0, m1, m2, m3, m4, m5, m6, m7 REPX {pmulhrsw x, m11}, m0, m1, m2, m3, m4, m5, m6, m7 WRITE_16X2 0, 1, 8, 0, strideq*0, strideq*1 WRITE_16X2 2, 3, 0, 1, strideq*2, r3 lea dstq, [dstq+strideq*4] WRITE_16X2 4, 5, 0, 1, strideq*0, strideq*1 WRITE_16X2 6, 7, 0, 1, strideq*2, r3 lea dstq, [dstq+strideq*4] add cq, 16 dec r4b jl .ret test r4b, 1 jz .loop add cq, 32*15 lea dstq, [r5+16] jmp .loop .ret: sub cq, 32 pxor m0, m0 mov r0d, 4 mov r1d, 8 cmp cq, rax cmovg r0d, r1d .zero_loop: mova [rax+32*0], m0 mova [rax+32*1], m0 mova [rax+32*2], m0 mova [rax+32*3], m0 add rax, 32*4 dec r0d jg .zero_loop RET cglobal inv_txfm_add_dct_dct_32x32, 4, 4, 0, dst, stride, c, eob lea rax, [o_base] test eobd, eobd jnz .normal movd xm1, [o(pw_2896x8)] pmulhrsw xm0, xm1, [cq] movd xm2, [o(pw_8192)] mov [cq], eobd mov r2d, 32 jmp m(inv_txfm_add_dct_dct_32x8).dconly .normal: PROLOGUE 0, 9, 16, 32*67, dst, stride, c, eob, tmp1, tmp2, \ base, tmp3, tmp4 %undef cmp lea tmp1q, [rsp+32*7] lea tmp2q, [tmp1q+32*8] sub eobd, 136 mov tmp4d, eobd .pass1_loop: LOAD_8ROWS cq+64*1, 64*2 pxor m8, m8 REPX {mova [cq+64*x], m8}, 1, 3, 5, 7, 9, 11, 13, 15 test tmp4d, tmp4d jl .fast LOAD_8ROWS_H cq+64*17, 64*2 call m(inv_txfm_add_dct_dct_16x32).main_oddhalf LOAD_8ROWS_H cq+64*16, 64*2 pxor m0, m0 REPX {mova [cq+64*x], m0}, 16, 17, 18, 19, 20, 21, 22, 23, \ 24, 25, 26, 27, 28, 29, 30, 31 mova [rsp], m15 jmp .idct16 .fast: call m(inv_txfm_add_dct_dct_16x32).main_oddhalf_fast pxor m8, m8 REPX {mova x, m8}, m9, m10, m11, m12, m13, m14 mova [rsp], m8 .idct16: LOAD_8ROWS cq+64*0, 64*2 pxor m15, m15 REPX {mova [cq+64*x], m15}, 0, 2, 4, 6, 8, 10, 12, 14 call m(idct_16x16_internal).main call m(inv_txfm_add_dct_dct_32x16).pass1_end vpbroadcastd m7, [o(pw_8192)] call m(inv_txfm_add_dct_dct_16x32).transpose_2x8x8_round lea tmp3q, [tmp1q+32*32] mova m15, [rsp] mova [tmp3q-32*4], m0 mova [tmp3q-32*3], m2 mova [tmp3q-32*2], m4 mova [tmp3q-32*1], m6 mova [tmp3q+32*0], m8 mova [tmp3q+32*1], m10 mova [tmp3q+32*2], m12 mova [tmp3q+32*3], m14 add tmp3q, 32*8 mova [tmp3q-32*4], m1 mova [tmp3q-32*3], m3 mova [tmp3q-32*2], m5 mova [tmp3q-32*1], m7 mova [tmp3q+32*0], m9 mova [tmp3q+32*1], m11 mova [tmp3q+32*2], m13 mova [tmp3q+32*3], m15 vpbroadcastd m9, [o(pw_8192)] pmulhrsw m0, m9, [tmp1q-32*4] pmulhrsw m1, m9, [tmp1q-32*3] pmulhrsw m2, m9, [tmp1q-32*2] pmulhrsw m3, m9, [tmp1q-32*1] pmulhrsw m4, m9, [tmp1q+32*0] pmulhrsw m5, m9, [tmp1q+32*1] pmulhrsw m6, m9, [tmp1q+32*2] pmulhrsw m7, m9, [tmp1q+32*3] call m(inv_txfm_add_identity_identity_8x32).transpose8x8 mova [tmp1q-32*4], m0 pmulhrsw m0, m9, [tmp2q-32*4] mova [tmp2q-32*4], m1 pmulhrsw m1, m9, [tmp2q-32*3] mova [tmp1q-32*3], m2 pmulhrsw m2, m9, [tmp2q-32*2] mova [tmp2q-32*3], m3 pmulhrsw m3, m9, [tmp2q-32*1] mova [tmp1q-32*2], m4 pmulhrsw m4, m9, [tmp2q+32*0] mova [tmp2q-32*2], m5 pmulhrsw m5, m9, [tmp2q+32*1] mova [tmp1q-32*1], m6 pmulhrsw m6, m9, [tmp2q+32*2] mova [tmp2q-32*1], m7 pmulhrsw m7, m9, [tmp2q+32*3] call m(inv_txfm_add_identity_identity_8x32).transpose8x8 mova [tmp1q+32*0], m0 mova [tmp2q+32*0], m1 mova [tmp1q+32*1], m2 mova [tmp2q+32*1], m3 mova [tmp1q+32*2], m4 mova [tmp2q+32*2], m5 mova [tmp1q+32*3], m6 mova [tmp2q+32*3], m7 add cq, 32 add tmp1q, 32*16 add tmp2q, 32*16 add eobd, 0x80000000 jnc .pass1_loop add tmp1q, 32*24 imul r2, strideq, 19 lea r3, [strideq*3] add r2, dstq test tmp4d, tmp4d jge .pass2_loop add tmp1q, 32*16 add tmp2q, 32*16 add tmp3q, 32*16 .pass2_loop: LOAD_8ROWS tmp2q-32*4, 32 test tmp4d, tmp4d jl .fast2 LOAD_8ROWS_H tmp3q-32*4, 32 call m(inv_txfm_add_dct_dct_16x32).main_oddhalf sub tmp3q, 32*8 LOAD_8ROWS_H tmp3q-32*4, 32 sub tmp3q, 32*16 jmp .pass2_loop_end .fast2: call m(inv_txfm_add_dct_dct_16x32).main_oddhalf_fast sub tmp3q, 32*24 pxor m8, m8 REPX {mova x, m8}, m9, m10, m11, m12, m13, m14, m15 .pass2_loop_end: LOAD_8ROWS tmp3q-32*4, 32 mova [rsp], m15 call m(idct_16x16_internal).main call m(inv_txfm_add_dct_dct_16x32).pass2_end lea tmp3q, [tmp1q-32*32] cmp tmp2q, tmp3q jl .ret sub tmp2q, 32*32 sub dstq, r3 lea r2, [r2+r3+16] add dstq, 16 jmp .pass2_loop .ret: RET cglobal inv_txfm_add_identity_identity_32x32, 4, 6, 10, dst, stride, c, eob %undef cmp vpbroadcastd m9, [pw_8192] sub eobd, 136 ; if (eob < 136) shr eobd, 30 ; topleft 16x16 only lea eobd, [eobq*2-8] lea r4, [strideq*3] mov r5, dstq lea rax, [cq+32] .loop: mova xm0, [cq+64* 0] mova xm1, [cq+64* 1] vinserti128 m0, m0, [cq+64* 8], 1 vinserti128 m1, m1, [cq+64* 9], 1 mova xm2, [cq+64* 2] mova xm3, [cq+64* 3] vinserti128 m2, m2, [cq+64*10], 1 vinserti128 m3, m3, [cq+64*11], 1 mova xm4, [cq+64* 4] mova xm5, [cq+64* 5] vinserti128 m4, m4, [cq+64*12], 1 vinserti128 m5, m5, [cq+64*13], 1 mova xm6, [cq+64* 6] mova xm7, [cq+64* 7] vinserti128 m6, m6, [cq+64*14], 1 vinserti128 m7, m7, [cq+64*15], 1 call m(inv_txfm_add_identity_identity_8x32).transpose8x8 REPX {pmulhrsw x, m9}, m0, m1, m2, m3, m4, m5, m6, m7 WRITE_16X2 0, 1, 8, 0, strideq*0, strideq*1 WRITE_16X2 2, 3, 0, 1, strideq*2, r4 lea dstq, [dstq+strideq*4] WRITE_16X2 4, 5, 0, 1, strideq*0, strideq*1 WRITE_16X2 6, 7, 0, 1, strideq*2, r4 lea dstq, [dstq+strideq*4] add cq, 16 inc eobd jz .ret test eobd, 3 jnz .loop add cq, 64*15 lea dstq, [r5+16] jmp .loop .ret: pxor m0, m0 mov r0d, 16 cmp cq, rax jne .zero_loop .zero_loop_topleft: mova [rax-32*1], m0 mova [rax+32*1], m0 mova [rax+32*3], m0 mova [rax+32*5], m0 add rax, 64*4 sub r0d, 4 jg .zero_loop_topleft RET .zero_loop: mova [rax-32*1], m0 mova [rax+32*0], m0 mova [rax+32*1], m0 mova [rax+32*2], m0 add rax, 32*4 dec r0d jg .zero_loop RET %macro IDCT64_PART2_END 6-10 ; out, src[1-2], tmp[1-3], (offset[1-4]) %if %1 & 1 mova m%5, [tmp2q-32*(51-%1)] ; idct16 out 0+n mova m%4, [tmp1q-32*(14+%1)] ; idct32 out31-n %else mova m%5, [tmp1q-32*(45-%1)] mova m%4, [tmp2q-32*(20+%1)] %endif psubsw m%6, m%5, m%4 ; idct32 out31-n paddsw m%5, m%4 ; idct32 out 0+n psubsw m%4, m%6, m%3 ; out32+n paddsw m%6, m%3 ; out31-n psubsw m%3, m%5, m%2 ; out63-n paddsw m%5, m%2 ; out 0+n %if %0 == 6 ; pass 1 %if %1 & 1 mova [tmp2q-32*(19-%1)], m%4 mova [tmp1q-32*(14+%1)], m%6 mova [tmp1q+32*(18-%1)], m%3 mova [tmp2q-32*(51-%1)], m%5 %else mova [tmp1q-32*(13-%1)], m%4 mova [tmp2q-32*(20+%1)], m%6 mova [tmp2q+32*(12-%1)], m%3 mova [tmp1q-32*(45-%1)], m%5 %endif %else ; pass 2 REPX {pmulhrsw x, m14}, m%4, m%6, m%3, m%5 %if %1 & 1 %define %%d0 r2 %define %%d1 dstq %else %define %%d0 dstq %define %%d1 r2 %endif pmovzxbw m%2, [%%d0+%9 ] paddw m%2, m%4 pmovzxbw m%4, [%%d1+%8 ] paddw m%4, m%6 pmovzxbw m%6, [%%d1+%10] paddw m%3, m%6 pmovzxbw m%6, [%%d0+%7 ] paddw m%5, m%6 packuswb m%2, m%4 packuswb m%3, m%5 vpermq m%2, m%2, q3120 vpermq m%3, m%3, q3120 mova [%%d0+%9 ], xm%2 vextracti128 [%%d1+%8 ], m%2, 1 mova [%%d1+%10], xm%3 vextracti128 [%%d0+%7 ], m%3, 1 %endif %endmacro cglobal inv_txfm_add_dct_dct_16x64, 4, 4, 0, dst, stride, c, eob lea rax, [o_base] test eobd, eobd jnz .normal movd xm1, [o(pw_2896x8)] pmulhrsw xm0, xm1, [cq] movd xm2, [o(pw_8192)] mov [cq], eobd mov r2d, 32 jmp m(inv_txfm_add_dct_dct_16x4).dconly .normal: PROLOGUE 0, 10, 16, 32*67, dst, stride, c, eob, tmp1, tmp2 %undef cmp lea tmp1q, [rsp+32*23] lea tmp2q, [tmp1q+32*24] sub eobd, 151 mov r7d, eobd .pass1_loop: LOAD_16ROWS cq, 64 call m(idct_16x16_internal).main mova m1, [rsp+32*1] mova [rsp+32*0], m6 mova [rsp+32*1], m7 vpbroadcastd m7, [o(pw_8192)] call m(inv_txfm_add_dct_dct_16x32).transpose_2x8x8_round mova m15, [rsp+32*0] mova [tmp1q-32*4], m0 mova [tmp1q-32*3], m2 mova [tmp1q-32*2], m4 mova [tmp1q-32*1], m6 mova [tmp1q+32*0], m8 mova [tmp1q+32*1], m10 mova [tmp1q+32*2], m12 mova [tmp1q+32*3], m14 mova [tmp2q-32*4], m1 mova [tmp2q-32*3], m3 mova [tmp2q-32*2], m5 mova [tmp2q-32*1], m7 mova [tmp2q+32*0], m9 mova [tmp2q+32*1], m11 mova [tmp2q+32*2], m13 mova [tmp2q+32*3], m15 add cq, 32 add tmp1q, 32*8 add tmp2q, 32*8 add eobd, 0x80000000 jnc .pass1_loop lea r2, [rsp+32*23] mova xm0, [r2-32*4+ 0] mova xm1, [r2-32*2+ 0] vinserti128 m0, m0, [r2+32*0+ 0], 1 vinserti128 m1, m1, [r2+32*2+ 0], 1 mova xm2, [r2-32*4+16] mova xm3, [r2-32*2+16] vinserti128 m2, m2, [r2+32*0+16], 1 vinserti128 m3, m3, [r2+32*2+16], 1 pxor m4, m4 REPX {mova x, m4}, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14 test r7d, r7d jl .fast lea r3, [r2+32*8] mova xm4, [r3-32*4+ 0] mova xm5, [r3-32*2+ 0] vinserti128 m4, m4, [r3+32*0+ 0], 1 vinserti128 m5, m5, [r3+32*2+ 0], 1 mova xm6, [r3-32*4+16] mova xm7, [r3-32*2+16] vinserti128 m6, m6, [r3+32*0+16], 1 vinserti128 m7, m7, [r3+32*2+16], 1 .fast: mova [rsp], m8 lea tmp1q, [rsp+32*7] call m(idct_16x16_internal).main mova m1, [rsp+32*1] mova [tmp1q-32*4], m0 mova [tmp1q-32*3], m1 mova [tmp1q-32*2], m2 mova [tmp1q-32*1], m3 mova [tmp1q+32*0], m4 mova [tmp1q+32*1], m5 mova [tmp1q+32*2], m6 mova [tmp1q+32*3], m7 add tmp1q, 32*8 mova [tmp1q-32*4], m8 mova [tmp1q-32*3], m9 mova [tmp1q-32*2], m10 mova [tmp1q-32*1], m11 mova [tmp1q+32*0], m12 mova [tmp1q+32*1], m13 mova [tmp1q+32*2], m14 mova [tmp1q+32*3], m15 mova xm0, [r2-32*3+ 0] mova xm1, [r2-32*1+ 0] vinserti128 m0, m0, [r2+32*1+ 0], 1 vinserti128 m1, m1, [r2+32*3+ 0], 1 mova xm2, [r2-32*3+16] mova xm3, [r2-32*1+16] vinserti128 m2, m2, [r2+32*1+16], 1 vinserti128 m3, m3, [r2+32*3+16], 1 pxor m4, m4 REPX {mova x, m4}, m5, m6, m7 test r7d, r7d jl .fast2 mova xm4, [r3-32*3+ 0] mova xm5, [r3-32*1+ 0] vinserti128 m4, m4, [r3+32*1+ 0], 1 vinserti128 m5, m5, [r3+32*3+ 0], 1 mova xm6, [r3-32*3+16] mova xm7, [r3-32*1+16] vinserti128 m6, m6, [r3+32*1+16], 1 vinserti128 m7, m7, [r3+32*3+16], 1 .fast2: add tmp1q, 32*8 lea tmp2q, [tmp1q+32*8] call m(inv_txfm_add_dct_dct_16x32).main_oddhalf_fast add r2, 32*24 vpbroadcastd m15, [o(pd_2048)] add tmp1q, 32*16 add tmp2q, 32*32 mova xm0, [r2-32*4+ 0] mova xm3, [r2-32*1+16] vinserti128 m0, m0, [r2+32*0+ 0], 1 vinserti128 m3, m3, [r2+32*3+16], 1 mova xm4, [r2-32*4+16] mova xm7, [r2-32*1+ 0] vinserti128 m4, m4, [r2+32*0+16], 1 vinserti128 m7, m7, [r2+32*3+ 0], 1 pxor m1, m1 REPX {mova x, m1}, m2, m5, m6 test r7d, r7d jl .fast3 add r3, 32*24 mova xm1, [r3-32*1+16] mova xm2, [r3-32*4+ 0] vinserti128 m1, m1, [r3+32*3+16], 1 vinserti128 m2, m2, [r3+32*0+ 0], 1 mova xm5, [r3-32*1+ 0] mova xm6, [r3-32*4+16] vinserti128 m5, m5, [r3+32*3+ 0], 1 vinserti128 m6, m6, [r3+32*0+16], 1 .fast3: add rax, o_idct64_offset call m(inv_txfm_add_dct_dct_16x64).main_part1 add rax, 8 add tmp1q, 32*8 sub tmp2q, 32*8 mova xm0, [r2-32*2+ 0] mova xm3, [r2-32*3+16] vinserti128 m0, m0, [r2+32*2+ 0], 1 vinserti128 m3, m3, [r2+32*1+16], 1 mova xm4, [r2-32*2+16] mova xm7, [r2-32*3+ 0] vinserti128 m4, m4, [r2+32*2+16], 1 vinserti128 m7, m7, [r2+32*1+ 0], 1 pxor m1, m1 REPX {mova x, m1}, m2, m5, m6 test r7d, r7d jl .fast4 mova xm1, [r3-32*3+16] mova xm2, [r3-32*2+ 0] vinserti128 m1, m1, [r3+32*1+16], 1 vinserti128 m2, m2, [r3+32*2+ 0], 1 mova xm5, [r3-32*3+ 0] mova xm6, [r3-32*2+16] vinserti128 m5, m5, [r3+32*1+ 0], 1 vinserti128 m6, m6, [r3+32*2+16], 1 .fast4: call m(inv_txfm_add_dct_dct_16x64).main_part1 call m(inv_txfm_add_dct_dct_16x64).main_part2_pass2 RET ALIGN function_align %define o_base idct64_mul - 8 .main_part1: ; idct64 steps 1-5: ; in1/31/17/15/ 9/23/25/ 7 -> ; t32a/33/34a/35/36/37a/38/39a/56a/57/58a/59/60/61a/62/63a ; in5/27/21/11/13/19/29/ 3 -> ; t40a/41/42a/43/44/45a/46/47a/48a/49/50a/51/52/53a/54/55a vpbroadcastd m11, [o(idct64_mul+4* 0)] vpbroadcastd m13, [o(idct64_mul+4* 1)] vpbroadcastd m10, [o(idct64_mul+4* 4)] vpbroadcastd m12, [o(idct64_mul+4* 5)] pmulhrsw m11, m0 ; t63a pmulhrsw m0, m13 ; t32a pmulhrsw m10, m1 ; t62a pmulhrsw m1, m12 ; t33a vpbroadcastd m9, [o(idct64_mul+4* 8)] vpbroadcastd m13, [o(idct64_mul+4* 9)] vpbroadcastd m8, [o(idct64_mul+4*12)] vpbroadcastd m12, [o(idct64_mul+4*13)] pmulhrsw m9, m2 ; t61a pmulhrsw m2, m13 ; t34a pmulhrsw m8, m3 ; t60a pmulhrsw m3, m12 ; t35a psubsw m12, m0, m1 ; t33 paddsw m0, m1 ; t32 psubsw m1, m3, m2 ; t34 paddsw m3, m2 ; t35 psubsw m2, m8, m9 ; t61 paddsw m8, m9 ; t60 psubsw m9, m11, m10 ; t62 paddsw m11, m10 ; t63 ITX_MULSUB_2W 2, 1, 10, 13, 15, m4076, 401 ; t34a, t61a vpbroadcastd m14, [o(pw_401_4076)] ITX_MULSUB_2W 9, 12, 10, 13, 15, 14, 13 ; t33a, t62a psubsw m10, m0, m3 ; t35a paddsw m0, m3 ; t32a psubsw m3, m11, m8 ; t60a paddsw m11, m8 ; t63a psubsw m8, m9, m2 ; t34 paddsw m9, m2 ; t33 psubsw m2, m12, m1 ; t61 paddsw m12, m1 ; t62 mova [tmp1q-32*4], m0 mova [tmp1q-32*3], m9 mova [tmp2q+32*2], m12 mova [tmp2q+32*3], m11 vpbroadcastd m13, [o(pw_m4017_799)] vpbroadcastd m14, [o(pw_799_4017)] ITX_MULSUB_2W 2, 8, 0, 1, 15, 14, 13 ; t34a, t61a ITX_MULSUB_2W 3, 10, 0, 1, 15, 14, 13 ; t35, t60 mova [tmp1q-32*2], m2 mova [tmp1q-32*1], m3 mova [tmp2q+32*0], m10 mova [tmp2q+32*1], m8 vpbroadcastd m3, [o(idct64_mul+4*16)] vpbroadcastd m11, [o(idct64_mul+4*17)] vpbroadcastd m2, [o(idct64_mul+4*20)] vpbroadcastd m10, [o(idct64_mul+4*21)] vpbroadcastd m1, [o(idct64_mul+4*24)] vpbroadcastd m9, [o(idct64_mul+4*25)] vpbroadcastd m0, [o(idct64_mul+4*28)] vpbroadcastd m8, [o(idct64_mul+4*29)] pmulhrsw m3, m4 ; t59a pmulhrsw m4, m11 ; t36a pmulhrsw m2, m5 ; t58a pmulhrsw m5, m10 ; t37a pmulhrsw m1, m6 ; t57a pmulhrsw m6, m9 ; t38a pmulhrsw m0, m7 ; t56a pmulhrsw m7, m8 ; t39a psubsw m8, m4, m5 ; t37 paddsw m4, m5 ; t36 psubsw m5, m7, m6 ; t38 paddsw m7, m6 ; t39 psubsw m6, m0, m1 ; t57 paddsw m0, m1 ; t56 psubsw m1, m3, m2 ; t58 paddsw m3, m2 ; t59 ITX_MULSUB_2W 6, 5, 2, 9, 15, m2598, 3166 ; t38a, t57a vpbroadcastd m10, [o(pw_3166_2598)] ITX_MULSUB_2W 1, 8, 2, 9, 15, 10, 9 ; t37a, t58a psubsw m2, m7, m4 ; t36a paddsw m7, m4 ; t39a psubsw m4, m0, m3 ; t59a paddsw m0, m3 ; t56a psubsw m3, m6, m1 ; t37 paddsw m6, m1 ; t38 psubsw m1, m5, m8 ; t58 paddsw m5, m8 ; t57 mova [tmp1q+32*2], m6 mova [tmp1q+32*3], m7 mova [tmp2q-32*4], m0 mova [tmp2q-32*3], m5 vpbroadcastd m6, [o(pw_m799_m4017)] vpbroadcastd m7, [o(pw_m4017_799)] ITX_MULSUB_2W 4, 2, 0, 5, 15, 7, 6 ; t36, t59 ITX_MULSUB_2W 1, 3, 0, 5, 15, 7, 6 ; t37a, t58a mova [tmp1q+32*0], m4 mova [tmp1q+32*1], m1 mova [tmp2q-32*2], m3 mova [tmp2q-32*1], m2 ret %define o_base pw_5 + 128 .main_part2_pass1: ; idct64 steps 6-9 + idct16/32/64 sumsub sub rax, o_idct64_offset + 8 vpbroadcastd m11, [o(pw_1567_3784)] vpbroadcastd m12, [o(pw_m3784_1567)] vpbroadcastd m13, [o(pw_m1567_m3784)] vpbroadcastd m14, [o(pw_2896x8)] .main_part2_pass1_loop: call .main_part2_internal REPX {pmulhrsw x, m14}, m1, m2, m4, m3 IDCT64_PART2_END 0, 7, 0, 6, 9, 10 IDCT64_PART2_END 7, 8, 5, 0, 6, 7 IDCT64_PART2_END 8, 2, 1, 0, 6, 7 IDCT64_PART2_END 15, 3, 4, 0, 6, 7 cmp tmp1q, tmp2q jne .main_part2_pass1_loop ret .main_part2_internal: mova m0, [tmp1q-32*12] ; t32a mova m1, [tmp2q-32*13] ; t39a mova m2, [tmp1q-32* 4] ; t40a mova m5, [tmp2q+32* 3] ; t55a add tmp1q, 32 sub tmp2q, 32 mova m4, [tmp1q+32* 3] ; t48a mova m3, [tmp2q-32* 4] ; t47a mova m6, [tmp1q+32*11] ; t56a mova m7, [tmp2q+32*12] ; t63a psubsw m8, m0, m1 ; t39 paddsw m0, m1 ; t32 psubsw m1, m3, m2 ; t40 paddsw m3, m2 ; t47 psubsw m2, m4, m5 ; t55 paddsw m4, m5 ; t48 psubsw m5, m7, m6 ; t56 paddsw m7, m6 ; t63 ITX_MULSUB_2W 5, 8, 6, 9, 15, 11, 12 ; t39a, t56a ITX_MULSUB_2W 2, 1, 6, 9, 15, 12, 13 ; t40a, t55a psubsw m6, m0, m3 ; t47a paddsw m0, m3 ; t32a psubsw m3, m7, m4 ; t48a paddsw m7, m4 ; t63a psubsw m4, m5, m2 ; t40 paddsw m5, m2 ; t39 psubsw m2, m8, m1 ; t55 paddsw m8, m1 ; t56 psubw m1, m2, m4 ; t40a paddw m2, m4 ; t55a psubw m4, m3, m6 ; t47 paddw m3, m6 ; t48 ret .main_part2_pass2: sub rax, o_idct64_offset + 8 vpbroadcastd m11, [o(pw_1567_3784)] vpbroadcastd m12, [o(pw_m3784_1567)] vpbroadcastd m13, [o(pw_m1567_m3784)] vpbroadcastd m14, [o(pw_2048)] lea r9, [strideq*5] ; stride*5 lea r3, [r9+strideq*1] ; stride*6 lea r7, [r9+strideq*2] ; stride*7 lea r8, [r3+strideq*2] ; stride*8 lea r2, [dstq+r7] .main_part2_pass2_loop: call .main_part2_internal vpbroadcastd m10, [o(pw_2896x8)] REPX {pmulhrsw x, m10}, m1, m2, m4, m3 IDCT64_PART2_END 0, 7, 0, 6, 9, 10, strideq*0, r3*4, r8*4, r7*8 IDCT64_PART2_END 7, 8, 5, 0, 6, 7, strideq*0, r3*4, r8*4, r7*8 IDCT64_PART2_END 8, 2, 1, 0, 6, 7, strideq*8, r8*2, r9*8, r3*8 IDCT64_PART2_END 15, 3, 4, 0, 6, 7, strideq*8, r8*2, r9*8, r3*8 add dstq, strideq sub r2, strideq cmp tmp1q, tmp2q jne .main_part2_pass2_loop ret cglobal inv_txfm_add_dct_dct_64x16, 4, 4, 0, dst, stride, c, eob lea rax, [o_base] test eobd, eobd jnz .normal movd xm1, [o(pw_2896x8)] pmulhrsw xm0, xm1, [cq] movd xm2, [o(pw_8192)] mov [cq], eobd mov r2d, 16 .dconly: pmulhrsw xm0, xm2 movd xm2, [o(pw_2048)] pmulhrsw xm0, xm1 pmulhrsw xm0, xm2 vpbroadcastw m0, xm0 pxor m1, m1 .dconly_loop: mova m2, [dstq+32*0] mova m3, [dstq+32*1] punpckhbw m4, m2, m1 punpcklbw m2, m1 punpckhbw m5, m3, m1 punpcklbw m3, m1 paddw m4, m0 paddw m2, m0 paddw m5, m0 paddw m3, m0 packuswb m2, m4 packuswb m3, m5 mova [dstq+32*0], m2 mova [dstq+32*1], m3 add dstq, strideq dec r2d jg .dconly_loop RET .normal: PROLOGUE 0, 7, 16, 32*67, dst, stride, c, eob, tmp1, tmp2 LOAD_8ROWS cq+32*0, 32*4 pxor m8, m8 REPX {mova [cq+32*x], m8}, 0, 4, 8, 12, 16, 20, 24, 28 REPX {mova x, m8}, m9, m10, m11, m12, m13, m14 mova [rsp], m8 lea tmp1q, [rsp+32*7] call m(idct_16x16_internal).main mova m1, [rsp+32*1] mova [tmp1q-32*4], m0 mova [tmp1q-32*3], m1 mova [tmp1q-32*2], m2 mova [tmp1q-32*1], m3 mova [tmp1q+32*0], m4 mova [tmp1q+32*1], m5 mova [tmp1q+32*2], m6 mova [tmp1q+32*3], m7 add tmp1q, 32*8 mova [tmp1q-32*4], m8 mova [tmp1q-32*3], m9 mova [tmp1q-32*2], m10 mova [tmp1q-32*1], m11 mova [tmp1q+32*0], m12 mova [tmp1q+32*1], m13 mova [tmp1q+32*2], m14 mova [tmp1q+32*3], m15 LOAD_8ROWS cq+32*2, 32*4 pxor m8, m8 REPX {mova [cq+32*x], m8}, 2, 6, 10, 14, 18, 22, 26, 30 add tmp1q, 32*8 lea tmp2q, [tmp1q+32*8] call m(inv_txfm_add_dct_dct_16x32).main_oddhalf_fast vpbroadcastd m15, [o(pd_2048)] add tmp1q, 32*16 add tmp2q, 32*32 mova m0, [cq+32* 1] mova m1, [cq+32*31] mova m2, [cq+32*17] mova m3, [cq+32*15] mova m4, [cq+32* 9] mova m5, [cq+32*23] mova m6, [cq+32*25] mova m7, [cq+32* 7] pxor m8, m8 REPX {mova [cq+32*x], m8}, 1, 31, 17, 15, 9, 23, 25, 7 add rax, o_idct64_offset call m(inv_txfm_add_dct_dct_16x64).main_part1 add rax, 8 add tmp1q, 32*8 sub tmp2q, 32*8 mova m0, [cq+32* 5] mova m1, [cq+32*27] mova m2, [cq+32*21] mova m3, [cq+32*11] mova m4, [cq+32*13] mova m5, [cq+32*19] mova m6, [cq+32*29] mova m7, [cq+32* 3] pxor m8, m8 REPX {mova [cq+32*x], m8}, 5, 27, 21, 11, 13, 19, 29, 3 call m(inv_txfm_add_dct_dct_16x64).main_part1 call m(inv_txfm_add_dct_dct_16x64).main_part2_pass1 sub tmp1q, 32*36 lea r2, [strideq*3] mov tmp2d, 4 .pass2_loop: lea r3, [tmp1q-32*8] mova xm0, [r3 -32*4] mova xm1, [r3 -32*3] vinserti128 m0, m0, [tmp1q-32*4], 1 vinserti128 m1, m1, [tmp1q-32*3], 1 mova xm2, [r3 -32*2] mova xm3, [r3 -32*1] vinserti128 m2, m2, [tmp1q-32*2], 1 vinserti128 m3, m3, [tmp1q-32*1], 1 mova xm4, [r3 +32*0] mova xm5, [r3 +32*1] vinserti128 m4, m4, [tmp1q+32*0], 1 vinserti128 m5, m5, [tmp1q+32*1], 1 mova xm6, [r3 +32*2] mova xm7, [r3 +32*3] vinserti128 m6, m6, [tmp1q+32*2], 1 vinserti128 m7, m7, [tmp1q+32*3], 1 mova xm8, [r3 -32*4+16] mova xm9, [r3 -32*3+16] vinserti128 m8, m8, [tmp1q-32*4+16], 1 vinserti128 m9, m9, [tmp1q-32*3+16], 1 mova xm10, [r3 -32*2+16] mova xm11, [r3 -32*1+16] vinserti128 m10, m10, [tmp1q-32*2+16], 1 vinserti128 m11, m11, [tmp1q-32*1+16], 1 mova xm12, [r3 +32*0+16] mova xm13, [r3 +32*1+16] vinserti128 m12, m12, [tmp1q+32*0+16], 1 vinserti128 m13, m13, [tmp1q+32*1+16], 1 mova xm14, [r3 +32*2+16] mova xm15, [r3 +32*3+16] vinserti128 m14, m14, [tmp1q+32*2+16], 1 vinserti128 m15, m15, [tmp1q+32*3+16], 1 mova [rsp+32*0], m6 mova [rsp+32*1], m7 vpbroadcastd m7, [o(pw_8192)] call m(inv_txfm_add_dct_dct_16x32).transpose_2x8x8_round call m(idct_16x16_internal).main mova [rsp+32*0], m15 vpbroadcastd m15, [o(pw_2048)] REPX {pmulhrsw x, m15}, m0, m2, m3, m4, m5, m6, m7 WRITE_16X2 2, 3, 1, 2, strideq*2, r2 pmulhrsw m1, m15, [rsp+32*1] WRITE_16X2 0, 1, 2, 3, strideq*0, strideq*1 lea r3, [dstq+strideq*4] %define dstq r3 WRITE_16X2 4, 5, 2, 3, strideq*0, strideq*1 WRITE_16X2 6, 7, 2, 3, strideq*2, r2 REPX {pmulhrsw x, m15}, m8, m9, m10, m11, m12, m13, m14 lea r3, [r3+strideq*4] WRITE_16X2 8, 9, 2, 3, strideq*0, strideq*1 WRITE_16X2 10, 11, 2, 3, strideq*2, r2 pmulhrsw m15, [rsp+32*0] lea r3, [r3+strideq*4] WRITE_16X2 12, 13, 2, 3, strideq*0, strideq*1 WRITE_16X2 14, 15, 2, 3, strideq*2, r2 add tmp1q, 32*16 add r0, 16 dec tmp2d jg .pass2_loop RET cglobal inv_txfm_add_dct_dct_32x64, 4, 4, 0, dst, stride, c, eob lea rax, [o_base] test eobd, eobd jnz .normal movd xm1, [o(pw_2896x8)] pmulhrsw xm0, xm1, [cq] movd xm2, [o(pw_16384)] mov [cq], eobd pmulhrsw xm0, xm1 mov r2d, 64 jmp m(inv_txfm_add_dct_dct_32x8).dconly .normal: PROLOGUE 0, 11, 16, 32*99, dst, stride, c, eob, tmp1, tmp2 lea tmp1q, [rsp+32*7] lea r10d, [eobq-136] sar r10d, 31 .pass1_loop: lea tmp2q, [tmp1q+32*16] LOAD_8ROWS cq+64*1, 64*2, 1 pxor m8, m8 REPX {mova [cq+64*x], m8}, 1, 3, 5, 7, 9, 11, 13, 15 test r10b, r10b jnz .fast LOAD_8ROWS_H cq+64*17, 64*2, 2 call m(inv_txfm_add_dct_dct_16x32).main_oddhalf LOAD_8ROWS_H cq+64*16, 64*2, 1 mova [rsp], m15 pxor m15, m15 REPX {mova [cq+64*x], m15}, 16, 17, 18, 19, 20, 21, 22, 23, \ 24, 25, 26, 27, 28, 29, 30, 31 jmp .idct16 .fast: call m(inv_txfm_add_dct_dct_16x32).main_oddhalf_fast pxor m8, m8 REPX {mova x, m8}, m9, m10, m11, m12, m13, m14 mova [rsp], m8 .idct16: LOAD_8ROWS cq+64*0, 64*2, 1 pxor m15, m15 REPX {mova [cq+64*x], m15}, 0, 2, 4, 6, 8, 10, 12, 14 call m(idct_16x16_internal).main call m(inv_txfm_add_dct_dct_32x16).pass1_end vpbroadcastd m7, [o(pw_16384)] call m(inv_txfm_add_dct_dct_16x32).transpose_2x8x8_round lea r3, [tmp1q+32*48] mova m15, [rsp] mova [r3-32*4], m0 mova [r3-32*3], m2 mova [r3-32*2], m4 mova [r3-32*1], m6 mova [r3+32*0], m8 mova [r3+32*1], m10 mova [r3+32*2], m12 mova [r3+32*3], m14 add r3, 32*24 mova [r3-32*4], m1 mova [r3-32*3], m3 mova [r3-32*2], m5 mova [r3-32*1], m7 mova [r3+32*0], m9 mova [r3+32*1], m11 mova [r3+32*2], m13 mova [r3+32*3], m15 vpbroadcastd m9, [o(pw_16384)] pmulhrsw m0, m9, [tmp1q-32*4] pmulhrsw m1, m9, [tmp1q-32*3] pmulhrsw m2, m9, [tmp1q-32*2] pmulhrsw m3, m9, [tmp1q-32*1] pmulhrsw m4, m9, [tmp1q+32*0] pmulhrsw m5, m9, [tmp1q+32*1] pmulhrsw m6, m9, [tmp1q+32*2] pmulhrsw m7, m9, [tmp1q+32*3] call m(inv_txfm_add_identity_identity_8x32).transpose8x8 mova [tmp1q-32*4], m0 pmulhrsw m0, m9, [tmp2q-32*4] mova [tmp2q-32*4], m1 pmulhrsw m1, m9, [tmp2q-32*3] mova [tmp1q-32*3], m2 pmulhrsw m2, m9, [tmp2q-32*2] mova [tmp2q-32*3], m3 pmulhrsw m3, m9, [tmp2q-32*1] mova [tmp1q-32*2], m4 pmulhrsw m4, m9, [tmp2q+32*0] mova [tmp2q-32*2], m5 pmulhrsw m5, m9, [tmp2q+32*1] mova [tmp1q-32*1], m6 pmulhrsw m6, m9, [tmp2q+32*2] mova [tmp2q-32*1], m7 pmulhrsw m7, m9, [tmp2q+32*3] call m(inv_txfm_add_identity_identity_8x32).transpose8x8 mova [tmp1q+32*0], m0 mova [tmp2q+32*0], m1 mova [tmp1q+32*1], m2 mova [tmp2q+32*1], m3 mova [tmp1q+32*2], m4 mova [tmp2q+32*2], m5 mova [tmp1q+32*3], m6 mova [tmp2q+32*3], m7 add cq, 32 add tmp1q, 32*8 add r10d, 0x80000000 jnc .pass1_loop lea r2, [rsp+32*55] lea r7, [r2+32*24] .pass2_loop: lea r3, [r2+32*8] lea r8, [r7+32*8] mova m0, [r2-32*4] mova m1, [r2-32*2] mova m2, [r2+32*0] mova m3, [r2+32*2] pxor m4, m4 REPX {mova x, m4}, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14 test r10b, r10b jnz .fast2 mova m4, [r3-32*4] mova m5, [r3-32*2] mova m6, [r3+32*0] mova m7, [r3+32*2] .fast2: mova [rsp], m8 lea tmp1q, [rsp+32*39] call m(idct_16x16_internal).main mova m1, [rsp+32*1] mova [tmp1q-32*4], m0 mova [tmp1q-32*3], m1 mova [tmp1q-32*2], m2 mova [tmp1q-32*1], m3 mova [tmp1q+32*0], m4 mova [tmp1q+32*1], m5 mova [tmp1q+32*2], m6 mova [tmp1q+32*3], m7 add tmp1q, 32*8 mova [tmp1q-32*4], m8 mova [tmp1q-32*3], m9 mova [tmp1q-32*2], m10 mova [tmp1q-32*1], m11 mova [tmp1q+32*0], m12 mova [tmp1q+32*1], m13 mova [tmp1q+32*2], m14 mova [tmp1q+32*3], m15 mova m0, [r2-32*3] mova m1, [r2-32*1] mova m2, [r2+32*1] mova m3, [r2+32*3] pxor m4, m4 REPX {mova x, m4}, m5, m6, m7 test r10b, r10b jnz .fast3 mova m4, [r3-32*3] mova m5, [r3-32*1] mova m6, [r3+32*1] mova m7, [r3+32*3] .fast3: add tmp1q, 32*8 lea tmp2q, [tmp1q+32*8] call m(inv_txfm_add_dct_dct_16x32).main_oddhalf_fast vpbroadcastd m15, [o(pd_2048)] add tmp1q, 32*16 add tmp2q, 32*32 mova m0, [r7-32*4] mova m3, [r7+32*3] mova m4, [r7+32*0] mova m7, [r7-32*1] pxor m1, m1 REPX {mova x, m1}, m2, m5, m6 test r10b, r10b jnz .fast4 mova m1, [r8+32*3] mova m2, [r8-32*4] mova m5, [r8-32*1] mova m6, [r8+32*0] .fast4: add rax, o_idct64_offset call m(inv_txfm_add_dct_dct_16x64).main_part1 add rax, 8 add tmp1q, 32*8 sub tmp2q, 32*8 mova m0, [r7-32*2] mova m3, [r7+32*1] mova m4, [r7+32*2] mova m7, [r7-32*3] pxor m1, m1 REPX {mova x, m1}, m2, m5, m6 test r10b, r10b jnz .fast5 mova m1, [r8+32*1] mova m2, [r8-32*2] mova m5, [r8-32*3] mova m6, [r8+32*2] .fast5: call m(inv_txfm_add_dct_dct_16x64).main_part1 call m(inv_txfm_add_dct_dct_16x64).main_part2_pass2 add r10d, 0x80000000 jc .ret lea r2, [rsp+32*7] lea r7, [r2+32*16] sub dstq, r8 lea dstq, [dstq+strideq*4+16] jmp .pass2_loop .ret: RET cglobal inv_txfm_add_dct_dct_64x32, 4, 4, 0, dst, stride, c, eob lea rax, [o_base] test eobd, eobd jnz .normal movd xm1, [o(pw_2896x8)] pmulhrsw xm0, xm1, [cq] movd xm2, [o(pw_16384)] mov [cq], eobd pmulhrsw xm0, xm1 mov r2d, 32 jmp m(inv_txfm_add_dct_dct_64x16).dconly .normal: PROLOGUE 0, 9, 16, 32*131, dst, stride, c, eob, tmp1, tmp2, \ base, tmp3, tmp4 lea tmp1q, [rsp+32*7] lea tmp4d, [eobq-136] .pass1_loop: LOAD_8ROWS cq+64*0, 64*4, 1 pxor m8, m8 REPX {mova [cq+64*x], m8}, 0, 4, 8, 12, 16, 20, 24, 28 REPX {mova x, m8}, m9, m10, m11, m12, m13, m14 mova [rsp], m8 call m(idct_16x16_internal).main mova m1, [rsp+32*1] mova [tmp1q-32*4], m0 mova [tmp1q-32*3], m1 mova [tmp1q-32*2], m2 mova [tmp1q-32*1], m3 mova [tmp1q+32*0], m4 mova [tmp1q+32*1], m5 mova [tmp1q+32*2], m6 mova [tmp1q+32*3], m7 add tmp1q, 32*8 mova [tmp1q-32*4], m8 mova [tmp1q-32*3], m9 mova [tmp1q-32*2], m10 mova [tmp1q-32*1], m11 mova [tmp1q+32*0], m12 mova [tmp1q+32*1], m13 mova [tmp1q+32*2], m14 mova [tmp1q+32*3], m15 LOAD_8ROWS cq+64*2, 64*4, 1 pxor m8, m8 REPX {mova [cq+64*x], m8}, 2, 6, 10, 14, 18, 22, 26, 30 add tmp1q, 32*8 lea tmp2q, [tmp1q+32*8] call m(inv_txfm_add_dct_dct_16x32).main_oddhalf_fast vpbroadcastd m15, [o(pd_2048)] add tmp1q, 32*16 add tmp2q, 32*32 vpbroadcastd m7, [o(pw_2896x8)] pmulhrsw m0, m7, [cq+64* 1] pmulhrsw m1, m7, [cq+64*31] pmulhrsw m2, m7, [cq+64*17] pmulhrsw m3, m7, [cq+64*15] pmulhrsw m4, m7, [cq+64* 9] pmulhrsw m5, m7, [cq+64*23] pmulhrsw m6, m7, [cq+64*25] pmulhrsw m7, [cq+64* 7] pxor m8, m8 REPX {mova [cq+64*x], m8}, 1, 31, 17, 15, 9, 23, 25, 7 add rax, o_idct64_offset call m(inv_txfm_add_dct_dct_16x64).main_part1 vpbroadcastd m7, [o(pw_2896x8-(o_idct64_offset))] add rax, 8 add tmp1q, 32*8 sub tmp2q, 32*8 pmulhrsw m0, m7, [cq+64* 5] pmulhrsw m1, m7, [cq+64*27] pmulhrsw m2, m7, [cq+64*21] pmulhrsw m3, m7, [cq+64*11] pmulhrsw m4, m7, [cq+64*13] pmulhrsw m5, m7, [cq+64*19] pmulhrsw m6, m7, [cq+64*29] pmulhrsw m7, [cq+64* 3] pxor m8, m8 REPX {mova [cq+64*x], m8}, 5, 27, 21, 11, 13, 19, 29, 3 call m(inv_txfm_add_dct_dct_16x64).main_part1 call m(inv_txfm_add_dct_dct_16x64).main_part2_pass1 sub tmp1q, 32*44 vpbroadcastd m10, [o(pw_16384)] call m(inv_txfm_add_dct_dct_64x32).transpose_round_interleave add cq, 32 add tmp4d, 0x80000000 jnc .pass1_loop lea tmp1q, [rsp+32*15] imul r2, strideq, 19 lea r3, [strideq*3] add r2, dstq mov tmp4b, 4 .pass2_loop: lea tmp2q, [tmp1q+32*64] LOAD_8ROWS tmp1q-32*4, 32 test tmp4d, 0x40000000 jnz .fast LOAD_8ROWS_H tmp2q-32*4, 32 call m(inv_txfm_add_dct_dct_16x32).main_oddhalf lea tmp3q, [tmp2q-32*8] LOAD_8ROWS_H tmp3q-32*4, 32 mova [rsp], m15 jmp .idct16 .fast: call m(inv_txfm_add_dct_dct_16x32).main_oddhalf_fast pxor m8, m8 REPX {mova x, m8}, m9, m10, m11, m12, m13, m14 mova [rsp], m8 .idct16: lea tmp3q, [tmp1q-32*8] LOAD_8ROWS tmp3q-32*4, 32 call m(idct_16x16_internal).main call m(inv_txfm_add_dct_dct_16x32).pass2_end add tmp1q, 32*16 sub dstq, r3 lea r2, [r2+r3+16] add dstq, 16 dec tmp4b jg .pass2_loop RET ALIGN function_align .transpose_round_interleave: mov tmp3d, 4 .loop: lea tmp2q, [tmp1q+32*8] mova xm0, [tmp1q-32*4] mova xm1, [tmp1q-32*3] vinserti128 m0, m0, [tmp2q-32*4], 1 vinserti128 m1, m1, [tmp2q-32*3], 1 mova xm2, [tmp1q-32*2] mova xm3, [tmp1q-32*1] vinserti128 m2, m2, [tmp2q-32*2], 1 vinserti128 m3, m3, [tmp2q-32*1], 1 mova xm4, [tmp1q+32*0] mova xm5, [tmp1q+32*1] vinserti128 m4, m4, [tmp2q+32*0], 1 vinserti128 m5, m5, [tmp2q+32*1], 1 mova xm6, [tmp1q+32*2] mova xm7, [tmp1q+32*3] vinserti128 m6, m6, [tmp2q+32*2], 1 vinserti128 m7, m7, [tmp2q+32*3], 1 REPX {pmulhrsw x, m10}, m0, m1, m2, m3, m4, m5, m6, m7 call m(inv_txfm_add_identity_identity_8x32).transpose8x8 mova xm8, [tmp1q-32*4+16] mova xm9, [tmp1q-32*3+16] vinserti128 m8, m8, [tmp2q-32*4+16], 1 vinserti128 m9, m9, [tmp2q-32*3+16], 1 mova [tmp1q-32*4], m0 mova [tmp2q-32*4], m1 mova [tmp1q-32*3], m2 mova [tmp2q-32*3], m3 mova xm2, [tmp1q-32*2+16] mova xm3, [tmp1q-32*1+16] vinserti128 m2, m2, [tmp2q-32*2+16], 1 vinserti128 m3, m3, [tmp2q-32*1+16], 1 mova [tmp1q-32*2], m4 mova [tmp2q-32*2], m5 mova [tmp1q-32*1], m6 mova [tmp2q-32*1], m7 mova xm4, [tmp1q+32*0+16] mova xm5, [tmp1q+32*1+16] vinserti128 m4, m4, [tmp2q+32*0+16], 1 vinserti128 m5, m5, [tmp2q+32*1+16], 1 mova xm6, [tmp1q+32*2+16] mova xm7, [tmp1q+32*3+16] vinserti128 m6, m6, [tmp2q+32*2+16], 1 vinserti128 m7, m7, [tmp2q+32*3+16], 1 pmulhrsw m0, m8, m10 pmulhrsw m1, m9, m10 REPX {pmulhrsw x, m10}, m2, m3, m4, m5, m6, m7 call m(inv_txfm_add_identity_identity_8x32).transpose8x8 mova [tmp1q+32*0], m0 mova [tmp2q+32*0], m1 mova [tmp1q+32*1], m2 mova [tmp2q+32*1], m3 mova [tmp1q+32*2], m4 mova [tmp2q+32*2], m5 mova [tmp1q+32*3], m6 mova [tmp2q+32*3], m7 add tmp1q, 32*16 dec tmp3d jg .loop ret cglobal inv_txfm_add_dct_dct_64x64, 4, 4, 0, dst, stride, c, eob lea rax, [o_base] test eobd, eobd jnz .normal movd xm1, [o(pw_2896x8)] pmulhrsw xm0, xm1, [cq] movd xm2, [o(pw_8192)] mov [cq], eobd mov r2d, 64 jmp m(inv_txfm_add_dct_dct_64x16).dconly .normal: PROLOGUE 0, 11, 16, 32*199, dst, stride, c, eob, tmp1, tmp2 lea tmp1q, [rsp+32*71] lea r10d, [eobq-136] .pass1_loop: LOAD_8ROWS cq+64*0, 64*4 pxor m8, m8 REPX {mova [cq+64*x], m8}, 0, 4, 8, 12, 16, 20, 24, 28 REPX {mova x, m8}, m9, m10, m11, m12, m13, m14 mova [rsp], m8 call m(idct_16x16_internal).main mova m1, [rsp+32*1] mova [tmp1q-32*4], m0 mova [tmp1q-32*3], m1 mova [tmp1q-32*2], m2 mova [tmp1q-32*1], m3 mova [tmp1q+32*0], m4 mova [tmp1q+32*1], m5 mova [tmp1q+32*2], m6 mova [tmp1q+32*3], m7 add tmp1q, 32*8 mova [tmp1q-32*4], m8 mova [tmp1q-32*3], m9 mova [tmp1q-32*2], m10 mova [tmp1q-32*1], m11 mova [tmp1q+32*0], m12 mova [tmp1q+32*1], m13 mova [tmp1q+32*2], m14 mova [tmp1q+32*3], m15 LOAD_8ROWS cq+64*2, 64*4 pxor m8, m8 REPX {mova [cq+64*x], m8}, 2, 6, 10, 14, 18, 22, 26, 30 add tmp1q, 32*8 lea tmp2q, [tmp1q+32*8] call m(inv_txfm_add_dct_dct_16x32).main_oddhalf_fast vpbroadcastd m15, [o(pd_2048)] add tmp1q, 32*16 add tmp2q, 32*32 mova m0, [cq+64* 1] mova m1, [cq+64*31] mova m2, [cq+64*17] mova m3, [cq+64*15] mova m4, [cq+64* 9] mova m5, [cq+64*23] mova m6, [cq+64*25] mova m7, [cq+64* 7] pxor m8, m8 REPX {mova [cq+64*x], m8}, 1, 31, 17, 15, 9, 23, 25, 7 add rax, o_idct64_offset call m(inv_txfm_add_dct_dct_16x64).main_part1 add rax, 8 add tmp1q, 32*8 sub tmp2q, 32*8 mova m0, [cq+64* 5] mova m1, [cq+64*27] mova m2, [cq+64*21] mova m3, [cq+64*11] mova m4, [cq+64*13] mova m5, [cq+64*19] mova m6, [cq+64*29] mova m7, [cq+64* 3] pxor m8, m8 REPX {mova [cq+64*x], m8}, 5, 27, 21, 11, 13, 19, 29, 3 call m(inv_txfm_add_dct_dct_16x64).main_part1 call m(inv_txfm_add_dct_dct_16x64).main_part2_pass1 sub tmp1q, 32*44 vpbroadcastd m10, [o(pw_8192)] call m(inv_txfm_add_dct_dct_64x32).transpose_round_interleave add cq, 32 add r10d, 0x80000000 jnc .pass1_loop lea tmp1q, [rsp+32*7] mov r10b, 4 .pass2_loop: lea r2, [tmp1q+32*64] mova m0, [r2-32*4] mova m1, [r2-32*2] mova m2, [r2+32*0] mova m3, [r2+32*2] pxor m4, m4 REPX {mova x, m4}, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14 mova [rsp], m4 test r10d, 0x40000000 jnz .fast lea r3, [r2+32*64] mova m4, [r3-32*4] mova m5, [r3-32*2] mova m6, [r3+32*0] mova m7, [r3+32*2] .fast: call m(idct_16x16_internal).main mova m1, [rsp+32*1] mova [tmp1q-32*4], m0 mova [tmp1q-32*3], m1 mova [tmp1q-32*2], m2 mova [tmp1q-32*1], m3 mova [tmp1q+32*0], m4 mova [tmp1q+32*1], m5 mova [tmp1q+32*2], m6 mova [tmp1q+32*3], m7 add tmp1q, 32*8 mova [tmp1q-32*4], m8 mova [tmp1q-32*3], m9 mova [tmp1q-32*2], m10 mova [tmp1q-32*1], m11 mova [tmp1q+32*0], m12 mova [tmp1q+32*1], m13 mova [tmp1q+32*2], m14 mova [tmp1q+32*3], m15 mova m0, [r2-32*3] mova m1, [r2-32*1] mova m2, [r2+32*1] mova m3, [r2+32*3] pxor m4, m4 REPX {mova x, m4}, m5, m6, m7 test r10d, 0x40000000 jnz .fast2 mova m4, [r3-32*3] mova m5, [r3-32*1] mova m6, [r3+32*1] mova m7, [r3+32*3] .fast2: add tmp1q, 32*8 lea tmp2q, [tmp1q+32*8] call m(inv_txfm_add_dct_dct_16x32).main_oddhalf_fast vpbroadcastd m15, [o(pd_2048)] add r2, 32*8 add r3, 32*8 add tmp1q, 32*16 add tmp2q, 32*32 mova m0, [r2-32*4] ; 1 mova m3, [r2+32*3] ; 15 mova m4, [r2+32*0] ; 9 mova m7, [r2-32*1] ; 7 pxor m1, m1 REPX {mova x, m1}, m2, m5, m6 test r10d, 0x40000000 jnz .fast3 mova m1, [r3+32*3] ; 31 mova m2, [r3-32*4] ; 17 mova m5, [r3-32*1] ; 23 mova m6, [r3+32*0] ; 25 .fast3: add rax, o_idct64_offset call m(inv_txfm_add_dct_dct_16x64).main_part1 add rax, 8 add tmp1q, 32*8 sub tmp2q, 32*8 mova m0, [r2-32*2] ; 5 mova m3, [r2+32*1] ; 11 mova m4, [r2+32*2] ; 13 mova m7, [r2-32*3] ; 3 pxor m1, m1 REPX {mova x, m1}, m2, m5, m6 test r10d, 0x40000000 jnz .fast4 mova m1, [r3+32*1] ; 27 mova m2, [r3-32*2] ; 21 mova m5, [r3-32*3] ; 19 mova m6, [r3+32*2] ; 29 .fast4: call m(inv_txfm_add_dct_dct_16x64).main_part1 call m(inv_txfm_add_dct_dct_16x64).main_part2_pass2 sub tmp1q, 32*28 sub dstq, r8 lea dstq, [dstq+strideq*4+16] dec r10b jg .pass2_loop RET %endif ; ARCH_X86_64
37.198938
85
0.456873
[ "BSD-2-Clause" ]
cgisquet/dav1d
src/x86/itx.asm
217,095
Assembly
; Program 5.3 ; Nested for Loop - NASM (64-bit) ; Copyright (c) 2017 Hall & Slonka SECTION .text global _main _main: xor rax, rax mov rbx, 2 outer: mov rcx, 3 inner: inc rax dec rcx cmp rcx, 0 jne inner dec rbx cmp rbx, 0 jne outer mov rax, 60 xor rdi, rdi syscall
12.4
34
0.603226
[ "MIT" ]
LaudateCorpus1/Assembly-1
Chapter_5/Program 5.3/x86_64/Program_5.3_NASM.asm
310
Assembly
; A127981: a(n) = (n + 1/3)*2^(n-1) - 1/2 + (-1)^(n-1)*(1/6). ; 1,4,13,34,85,202,469,1066,2389,5290,11605,25258,54613,117418,251221,535210,1135957,2402986,5068117,10660522,22369621,46836394,97867093,204122794,425022805,883600042,1834308949,3802835626,7874106709,16285084330,33643910485,69435304618,143165576533,294921087658,607022044501,1248403827370,2565527131477,5268493216426,10811864339797,22173484493482,45446480614741,93091984485034,190582015481173,389960123984554,797512434013525,1630209240115882,3330787224409429,6802311937174186,13886098851059029 mov $1,$0 mul $0,3 add $0,4 mov $2,2 pow $2,$1 mul $0,$2 div $0,3
56.636364
493
0.802568
[ "Apache-2.0" ]
ckrause/loda-programs
oeis/127/A127981.asm
623
Assembly
; ; Automatically generated ; .include "00start.asm" .section code .send code
10
25
0.725
[ "MIT" ]
paulscottrobson/6502-Basic
source/header/header.asm
80
Assembly
include uXmx86asm.inc option casemap:none ifndef __X64__ .686P .xmm .model flat, c else .X64P .xmm option win64:11 option stackbase:rsp endif option frame:auto .code align 16 uXm_has_SSE41 proto VECCALL (byte) align 16 uXm_has_SSE41 proc VECCALL (byte) mov eax, 1 cpuid and ecx, bit_SSE41 cmp ecx, bit_SSE41 ; SSE41 support by microprocessor .if EQUAL? mov al, true .else mov al, false .endif ret uXm_has_SSE41 endp end ;.code
13.7
76
0.611314
[ "MIT" ]
Navegos/uasmlib
src/host/x86/asm/has/uXmhasSSE41.asm
548
Assembly
SECTION "loading data state handler", ROM0 state_loading_data: jp main
18
42
0.805556
[ "MIT" ]
Xeyler/gb-hello-world
src/state_handlers/loading_data.asm
72
Assembly
%ifdef flag hellostring: db "hello", 0 %endif
15
26
0.733333
[ "MIT" ]
zhoujiagen/learning-c
codes/low-level/ch05/defining_in_cla.asm
45
Assembly
Name: zel_com1.asm Type: file Size: 5067 Last-Modified: '2016-05-13T04:23:03Z' SHA-1: FD8054824871F1803FA5176F2FF8D8D12DABBC25 Description: null
20.714286
47
0.813793
[ "MIT" ]
prismotizm/gigaleak
other.7z/SFC.7z/SFC/ソースデータ/ゼルダの伝説神々のトライフォース/ドイツ_PAL/Ger_asm1/zel_com1.asm
145
Assembly
[BotW_FenceMethod_V208] moduleMatches = 0x6267BFD0 .origin = codecave # variables _fenceMethod: # stores fence method mode from preset .int $fenceMethod _conditionalPerformanceFence: lis r11, _fenceMethod@ha lwz r11, _fenceMethod@l(r11) ; Load the fence method value cmpwi r11, 1 ; Compare the skip fence method with the fence method that's set, store comparison to the conditional register bne .+0x0C ; If the conditional register isn't equel to the performance fence method, skip the next two instructions li r0, 1 # Performance fence always set the fence skip value to 1 blr ; Return to the instruction that jumped to this part to the code cave lwz r0, 0x388(r31) ; Instruction that gets executed if performance fence isn't used, this is the original instruction. blr ; Return to the instruction that jumped to this part to the code cave # Accurate and Skip Fence methods _conditionalAccurateAndSkipFence: lis r5, _fenceMethod@ha lwz r11, _fenceMethod@l(r5) ; Load the fence method value cmpwi r11, 2 ; Compare the accurate fence method with the fence method that's set, store comparison to the conditional register li r5, 6 ; Original instruction that got replaced with the jump add r6, r12, r0 ; Instruction that got replaced with the fence skip check bne .+0x10 ; If the conditional register isn't equel to accurate fence, skip the next three instructions (the ones that are the accurate fence) to the next comparison instruction. cmpwi r6, 500 # Accurate fence basically checks if it's the first 500 frames of the game, in which case it does a full fence. blt .+0x08 subi r6, r6, 1 cmpwi r11, 3 ; Compare the skip fence method with the fence method that's set, in preparation of the fence skip since it stores the result in the conditional register. blr ; Return to the instruction that jumped to this part to the code cave 0x31FAAE8 = bla _conditionalPerformanceFence ; Jumps to the conditional performance part of the code cave that creates the performance fence skip if that preset has been chosen. 0x31FAAF8 = bla _conditionalAccurateAndSkipFence ; Jumps to the conditional accurate part of the code cave that creates the accurate fence skip if that preset has been chosen. 0x31FAAFC = beq .+0x08 ; This part is the crucial part of the fence skip method. It skips the GX2SetGPUFence call in which case there's no fence skip, if the conditional register that has previously been set by the accurate code cave was true.
65.783784
243
0.794166
[ "CC0-1.0" ]
ActualMandM/cemu_graphic_packs
src/BreathOfTheWild/Mods/FPS++/patch_FenceMethod.asm
2,434
Assembly
.global s_prepare_buffers s_prepare_buffers: push %r15 push %r8 push %rax push %rcx push %rdi push %rdx push %rsi lea addresses_WT_ht+0x1e46b, %rsi lea addresses_normal_ht+0xc443, %rdi sub $43097, %r15 mov $58, %rcx rep movsq nop nop nop nop and %rax, %rax lea addresses_normal_ht+0xd838, %rdx nop nop nop cmp %rsi, %rsi mov $0x6162636465666768, %rax movq %rax, %xmm7 vmovups %ymm7, (%rdx) nop cmp $56438, %rcx lea addresses_WT_ht+0xfc64, %rcx nop nop and $53998, %r8 mov $0x6162636465666768, %rax movq %rax, %xmm4 vmovups %ymm4, (%rcx) nop nop nop nop nop cmp $40563, %rdx lea addresses_WT_ht+0x67de, %rsi nop nop nop nop nop lfence mov $0x6162636465666768, %rdx movq %rdx, (%rsi) nop nop nop nop add $2649, %rsi lea addresses_WT_ht+0x13f6b, %r15 sub $7704, %rdx mov $0x6162636465666768, %rsi movq %rsi, %xmm3 movups %xmm3, (%r15) nop nop and $31906, %rsi pop %rsi pop %rdx pop %rdi pop %rcx pop %rax pop %r8 pop %r15 ret .global s_faulty_load s_faulty_load: push %r10 push %r9 push %rax push %rbp push %rcx push %rdi push %rsi // Store mov $0x518, %rbp nop xor $6539, %r10 mov $0x5152535455565758, %rdi movq %rdi, %xmm4 vmovups %ymm4, (%rbp) nop add $47169, %r9 // Faulty Load lea addresses_D+0x706b, %rax nop nop add $16175, %rcx vmovaps (%rax), %ymm4 vextracti128 $0, %ymm4, %xmm4 vpextrq $1, %xmm4, %r10 lea oracles, %rax and $0xff, %r10 shlq $12, %r10 mov (%rax,%r10,1), %r10 pop %rsi pop %rdi pop %rcx pop %rbp pop %rax pop %r9 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': True, 'size': 32, 'type': 'addresses_D', 'congruent': 0}} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_P', 'congruent': 0}, 'OP': 'STOR'} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': True, 'size': 32, 'type': 'addresses_D', 'congruent': 0}} <gen_prepare_buffer> {'dst': {'same': False, 'congruent': 3, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 9, 'type': 'addresses_WT_ht'}} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_normal_ht', 'congruent': 0}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_WT_ht', 'congruent': 0}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': True, 'size': 8, 'type': 'addresses_WT_ht', 'congruent': 0}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_WT_ht', 'congruent': 7}, 'OP': 'STOR'} {'40': 12, '04': 1, 'ff': 13, 'a9': 1, '49': 169, '00': 21594, 'eb': 1, 'b9': 1, '0a': 1, 'ec': 1, '76': 1, 'b3': 1, 'c5': 33} 00 00 00 00 00 00 00 00 49 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 c5 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff 49 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 40 49 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 49 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff 49 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
43.282443
2,999
0.656085
[ "MIT" ]
danielmgmi/medusa
Transynther/_processed/AVXALIGN/_ht_zr_un_/i7-7700_9_0x48_notsx.log_21829_975.asm
5,670
Assembly
; Copyright (C) 2019 Philippe Aubertin. ; 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. Neither the name of the author nor the names of other contributors ; may be used to endorse or promote products derived from this software ; without specific prior written permission. ; ; THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. getcontext: ; setup frame pointer push ebp mov ebp, esp ; allocate space for system call arguments sub esp, 16 ; Stack layout: ; esp+24 argument 1: ucontext ; esp+20 return address ; esp+16 frame pointer (ebp) ; esp+12 message argument 3 ; esp+ 8 message argument 2 ; esp+ 4 message argument 1 ; esp+ 0 message argument 0 mov ecx, [esp+24] mov [esp+ 0], SYS_GETCONTEXT mov [esp+ 4], 0 mov [esp+ 8], ecx mov [esp+12], JINUE_ARGS_PACK_BUFFER_SIZE(SIZEOF_UCONTEXT) push esp call jinue_call_raw pop ecx mov eax, [ecx+0] or eax, eax jnz .exit ; Save the caller-preserved registers. The system call stub retored them ; before returning to us as required by the ABI but did overwrite them ; before doing the system call. lea ecx, [ecx+MCONTEXT_OFFSET] mov [ecx+EBX], ebx mov [ecx+ESI], esi mov [ecx+EDI], edi ; Return value mov [ecx+EAX], eax ; At least one kernel entry point clobbers GS. mov edx, 0 mov dx, gs mov [ecx+GS], edx ; We want the frame pointer (ebp), the return address and the stack pointer ; to have the values they had before this function was called. mov edx, [esp+16] mov [ecx+EBP], edx mov edx, [esp+20] mov [ecx+EIP], edx mov edx, esp add esp, 24 mov [ecx+ESP], edx mov [ecx+UESP], edx .exit: ret
32.180851
79
0.684298
[ "BSD-3-Clause" ]
phaubertin/jinue
lib/jinue/getcontext.asm
3,025
Assembly
include macr.inc include ex_macr.inc .286 .model small .stack 64 .data include arrs.inc ; Contains all the arrays of images nl db 10,13,'$' Enter_Name_message0 db 'Press Enter key to continue ', '$' Enter_Name_message db 'Please enter Your Name: ', '$' Enter_SECOND_Name_message db 'Please enter second Name: ', '$' Enter_Name_message2 db 'Name MUST start with a letter (No digits or special characters)$' Enter_Points_message db 'Please enter Initial Points: ', '$' Enter_other_Points_message db 'Second player, Please enter Initial Points: ', '$' Press_any_Key_message db 'press any key to continue...$' MAIN_Screen_message1 db 'To Start Chatting press F1','$' MAIN_Screen_message2 db 'To Start Game press F2$' MAIN_Screen_message3 db 'To end Program press ESC$' STATUS_BAR_MSG db '_______________________________________________________________________________$' INSTRUCTIONS_msg db 'SOME INSTRUCTIONS OF THE GAME $' INSTRUCTIONS_msg1 db 'F3 FOR INLINE GAME CHAT $' INSTRUCTIONS_msg2 db 'F4 TO LEAVE THE GAME $' INSTRUCTIONS_msg3 db 'F1 TO EXECUTE A COMMAND ON YOUR OPPONENTS PROCESSOR $' INSTRUCTIONS_msg4 db 'F2 TO EXECUTE A COMMAND ON YOUR OWN PROCESSOR $' INSTRUCTIONS_msg5 db 'F5 TO EXECUTE A COMMAND ON YOUR OWN PROCESSOR -5 POINTS-$' INSTRUCTIONS_msg6 db 'F6 TO EXECUTE A COMMAND ON BOTH PROCESSORS -3 POINTS-$' INSTRUCTIONS_msg7 db 'F7 TO CHANGE THE FORBIDDEN CHARACTER ONLY ONCE -8 POINTS-$' INSTRUCTIONS_msg8 db 'F8 TO CLEAR ALL REGISTERS -30 POINTS (USED ONCE)$' INSTRUCTIONS_msg9 db 'F9 TO CHANGE THE TARGET VALUE -7 POINTS (USED ONCE)$' Sent_CHAT_INV_msg db 'You sent a chat Invitation','$' Sent_Game_INV_msg db 'You sent a Game Invitation','$' level1_msg db 'LEVEL 1 -- PRESS F1$' level2_msg db 'LEVEL 2 -- PRESS F2$' choose_hidden_char db 'Choose A Forbidden char: $' choose_hidden_char2 db 'Choose SECOND Forbidden char: $' forbidden_char db '?' ;; The hiddden char chosen by current player right_forbidden_char db 'R' contains_forbidden db 0 MY_REGs_msg db 'MY REGS$' HIS_REGs_msg db 'HIS REGS$' AX_msg db 'AX: $' BX_msg db 'BX: $' CX_msg db 'CX: $' DX_msg db 'DX: $' SI_msg db 'SI: $' DI_msg db 'DI: $' SP_msg db 'SP: $' BP_msg db 'BP: $' separator_ db ': $' is_player_1_ready_for_game db 0 is_player_2_ready_for_game db 0 is_player_1_ready_for_chat db 0 is_player_2_ready_for_chat db 0 My_Initial_points dw 0 Game_Level db 0 Game_Turn db 1 ;; 1 for left player 2 for right FirstName LABEL BYTE ; named the next it the same name FirstNameSize db 20 ActualFirstNameSize db ? FirstNameData db 20 dup('$') SecondName LABEL BYTE ; named the next it the same name SecondNameSize db 20 ActualSecondNameSize db ? SecondNameData db 20 dup('$') ;;;;;;;;;-----------------positions----------;;;; ;;for the left ax_rec_l dw 0104h cx_rec_l dw 0504h bx_rec_l dw 0304h dx_rec_l dw 0704h si_rec_l dw 0904h di_rec_l dw 0B04h sp_rec_l dw 0D04h Bp_rec_l dw 0F04h ;; Ds LeftSide DS_0_left dw 030Bh DS_1_left dw 040Bh DS_2_left dw 050Bh DS_3_left dw 060Bh DS_4_left dw 070Bh DS_5_left dw 080Bh DS_6_left dw 090Bh DS_7_left dw 0A0Bh ;; second column DS_8_left dw 030eh DS_9_left dw 040eh DS_A_left dw 050eh DS_B_left dw 060eh DS_C_left dw 070eh DS_D_left dw 080eh DS_E_left dw 090eh DS_F_left dw 0A0eh l_CARRY_LEFT DW 0F09h forbidden_char_left DW 0110h TARGET_VALUE_BOX DW 0012H ;; command line left side and points BOX CL_row_left dw 1201h Points_BOX_left dw 0E0Ch ;; Balls first_ball_left dw 0213h; second_ball_left dw 0613h; third_ball_left dw 0a13h; forth_ball_left dw 0e13h; fifth_ball_left dw 1213h; ;;for the right ax_rec_r dw 011Ah cx_rec_r dw 051Ah bx_rec_r dw 031Ah dx_rec_r dw 071Ah si_rec_r dw 091Ah di_rec_r dw 0B1Ah sp_rec_r dw 0D1Ah Bp_rec_r dw 0F1Ah ;; Ds RightSide DS_firstCol_right dw 0321h DS_secondCol_right dw 0324h DS_0_right dw 0321h DS_1_right dw 0421h DS_2_right dw 0521h DS_3_right dw 0621h DS_4_right dw 0721h DS_5_right dw 0821h DS_6_right dw 0921h DS_7_right dw 0A21h ;; s_right column DS_8_right dw 0324h DS_9_right dw 0424h DS_A_right dw 0524h DS_B_right dw 0624h DS_C_right dw 0724h DS_D_right dw 0824h DS_E_right dw 0924h DS_F_right dw 0A24h R_CARRY_RIGHT DW 0F1Fh forbidden_char_right DW 0126h ;; command line left side CL_row_Right dw 1217h Points_BOX_right dw 0E22h ; EX_MAIN -> COMMAND REG, _AX ;; Values in regs ;; L -> _ gAME_TURN 1 2 XCHG ;;IF(1) - > SWAP L,_ _AX dw 0 _BX dw 0 _CX dw 0 _DX dw 0 _SI dw 0 _DI dw 0 _SP dw 0 _BP dw 0 ;DATA Segment _00 db 0 _01 db 0 _02 db 0 _03 db 0 _04 db 0 _05 db 0 _06 db 0 _07 db 0 _08 db 0 _09 db 0 _A db 0 _B db 0 _C db 0 _D db 0 _E db 0 _F db 0 _CARRY DB 0 L_AX dw 0 L_BX dw 0 L_CX dw 0 L_DX dw 0 L_SI dw 0 L_DI dw 0 L_SP dw 0 L_BP dw 0 ;;DATA Segment L_00 db 0 L_01 db 0 L_02 db 0 L_03 db 0 L_04 db 0 L_05 db 0 L_06 db 0 L_07 db 0 L_08 db 0 L_09 db 0 L_A db 0 L_B db 0 L_C db 0 L_D db 0 L_E db 0 L_F db 0 ;; balls values balls label byte ball_0 db 0 ;;green ball_1 db 0 ;;magenta ball_2 db 0 ;;red ball_3 db 0 ;;blue ball_4 db 0 ;;yellow ;; Values in regs R_AX dw 0 R_BX dw 0 R_CX dw 0 R_DX dw 0 R_SI dw 0 R_DI dw 0 R_SP dw 0 R_BP dw 0 ;;DATA Segment R_00 db 0 R_01 db 0 R_02 db 0 R_03 db 0 R_04 db 0 R_05 db 0 R_06 db 0 R_07 db 0 R_08 db 0 R_09 db 0 R_A db 0 R_B db 0 R_C db 0 R_D db 0 R_E db 0 R_F db 0 L_CARRY DB 0 R_CARRY DB 0 ASC_TBL DB '0','1','2','3','4','5','6','7','8','9' DB 'A','B','C','D','E','F' ;;For The Graphics ;;;;;;---------------SARAHHHHHHHHHHHHHHH;;;;;;;;;;;;;;;;;;;;;;; birdX dw 0 birdY dw 0Ah BirdWidth dw 13 birdVelocity dw 4 right_birdX dw 147 right_birdY dw 0Ah right_BirdWidth dw 13 right_birdVelocity dw 4 paddle_Width dw 20 paddle_x dw 5 paddle_y dw 185 ;at the bottom of the 320*200 pixels screen paddle_velocity_x dw 10 paddle_velocity_y dw 5 paddleColor db 1011b paddleUp db 72 ; scan code of up arrow paddleDown db 80 ; scan code of down arrow paddleRight db 77 ; scan code of right arrow paddleLeft db 75 ; scan code of left arrow right_paddle_Width dw 20 right_paddle_x dw 170 right_paddle_y dw 185 ;at the bottom of the 320*200 pixels screen right_paddle_velocity_x dw 10 right_paddle_velocity_y dw 5 right_paddleColor db 1101b right_paddleUp db 71 ; scan code of 7 when num lock is turned off right_paddleDown db 73 ; scan code of 9 when num lock is turned off right_paddleRight db 81 ; scan code of 1 when num lock is turned off right_paddleLeft db 79 ; scan code of 3 when num lock is turned off ballWidth dw 9 fireballColor db 0fh ;left fireball fireBall_x dw ? fireBall_y dw 190 fireBall_velocity_y dw 20 ifFireIsPressed db 0 fireScanCode db 53 ;right fireball right_fireBall_x dw ? right_fireBall_y dw 190 right_fireBall_velocity_y dw 20 right_ifFireIsPressed db 0 right_fireScanCode db 04eh ;green, light magenta, red, blue, yellow colors db 47, 36, 41, 54, 43 ;green, light magenta, red, blue, yellow pointsOfColors db 1, 2, 3, 4, 5 numOfShotBalls db 0,0,0,0,0 colorIndex db 0 birdColor db 47 birdStatus db 1 birdPoints db 1 right_colorIndex db 0 right_birdColor db 47 right_birdStatus db 1 right_birdPoints db 1 playerPoints dw 0 right_playerPoints dw 0 gameStatus db 1 prevTime db 0 ;variable used when checking if the time has changed timeInterval db 8 ;the shooting game apears/disappears every time interval ;;;;-------------Comand Line Input------------;;;;;; command LABEL BYTE ; named the next it the same name commandSize db 30 actualcommand_Size db 0 ;the actual size of input at the current time THE_COMMAND db 30 dup('$') finished_taking_input db 0 ; just a flag to indicate we finished entering the string L_command LABEL BYTE ; named the next it the same name L_commandSize db 30 Actual_L_commandSize db ? L_commandData db 30 dup('$') R_command LABEL BYTE ; named the next it the same name R_commandSize db 30 Actual_R_commandSize db ? R_commandData db 30 dup('$') command_splited db 5 dup('$') ;';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;' Operand1 db 10 dup('$') Operand2 db 10 dup('$') Two_Operands_Together_splited db 22 dup('$') Operand2_Value dw 0H Operand1_Value dw 0H sizeIndex db 0 HASH_Operand DW 0H Operand_Value DW 0H Operand DB 10 dup('$') HASH_comand DW 0H HASH_Operand2 DW 0H HASH_Operand1 DW 0H Not_CL_or_Value db 'AX','BX','CX','DX' db 'AH','AL','BH','BL','CH','DH','DL' db 'CS','IP','SS','SP' db 'BP','SI','DI','DS','ES' IS_CL DB 'CL' Able_To_Shift_Flag db ? ; 1 is unable 0 is able Able_To_Shift_Flag1 db ? ; 1 is unable 0 is able target_value dw 105eh playersStatus db 0 ;; 0 -> nothing , 1 -> left palyer lost/right player won , 2 -> right player lost/left player won POWERUP1_MSG DB 'YOU CHOSE POWER-UP 1$' POWERUP1_MSG2 DB 'PLEASE ENTER COMMAND TO EXECUTE$' POWERUP2_MSG DB 'YOU CHOSE POWER-UP 2$' POWERUP2_MSG2 DB 'PLEASE ENTER COMMAND TO EXECUTE$' POWERUP3_MSG DB 'YOU CHOSE POWER-UP 3$' POWERUP3_MSG2 DB 'ENTER FORBIDDEN CHAR (ONLY ONCE)$' POWERUP5_MSG DB 'YOU CHOSE POWER-UP 5$' POWERUP5_MSG2 DB 'ENTER NEW TARGET VALUE (ONLY ONCE)$' EXIT_MSG DB 'YOU EXIT THE GAME$' EXIT_MSG2 DB 'PLAYER 1 POINTS: $' EXIT_MSG3 DB 'PLAYER 2 POINTS: $' EXIT_MSG4 DB 'THE WINNER OF THE GAME IS: $' IS_USED_POWERUP3 db 0 ;;TO INDICATE IF USED BEFORE right_IS_USED_POWERUP3 db 0 ;;TO INDICATE IF USED BEFORE IS_USED_POWERUP4 db 0 ;;TO INDICATE IF USED BEFORE right_IS_USED_POWERUP4 db 0 ;;TO INDICATE IF USED BEFORE IS_USED_POWERUP6 db 0 ;;TO INDICATE IF USED BEFORE right_IS_USED_POWERUP6 db 0 ;;TO INDICATE IF USED BEFORE EXECUTE_REVESED db 0 ;;IN LEVEL 2 IT INDECATES IF YOU CHOSED TO EXECUTE ON OTHER ;;VALIDATION Command_valid db 1 validRegNamesArr db 'AX','BX','CX','DX' db 'AH','AL','BH','BL','CH','CL','DH','DL' db 'CS','IP','SS','SP' db 'BP','SI','DI','DS','ES' validRegNamesArrSize db 21d valid_addressing_mode_regs db '[BX]','[SI]','[DI]','[00]' DB '[01]','[02]','[03]', '[04]', '[05]', '[06]', '[07]' DB '[08]', '[09]', '[0A]', '[0B]', '[0C]', '[0D]', '[0E]','[0F]' VALID_SHIFT DB 'SHL','SHR','SAR','ROR','RCL','RCR','ROL' ISSHIFTING DB 0 .code main proc far mov ax, @data mov ds, ax mov ES,AX ;; for string operations ;ChangeVideoMode 13h ;;clears screen and starts Video mode ;call START_GAME DisplayAgain: CLR_Screen_with_Scrolling_TEXT_MODE call NAME_VALIDATION DisplayString_AT_position_not_moving_cursor Enter_Points_message 0518h ; show mes MoveCursorTo 0621h ReadNumberhexa_in_ax ;; Read points and put it in ax ;; TODO: See if you want this in hexa mov My_Initial_points,ax ;; initialize initial points ;; Todo: get min and initialize the points mov playerPoints,ax ;;PLAYER 2 call NAME_VALIDATION2 DisplayString_AT_position_not_moving_cursor Enter_other_Points_message 0A18h ; show mes MoveCursorTo 0B21h ReadNumberhexa_in_ax ;; Read points and put it in ax ;; TODO: See if you want this in hexa mov right_playerPoints,ax FIX_POINTS_MIN ; now enter the main Screen DisplayString nl DisplayString_AT_position_not_moving_cursor Press_any_Key_message 1018h Read_KEY Main_Screen: ;; it shouldn't wait untill the user enters the KeY ;; 2 loops in the main ;; The first is to check if the user clicked any key ;; the second to check ;; enter -> scancode 1C ;; esc -> SC 01 ;; F2 -> 3C ;; F1 -> 3B CLR_Screen_with_Scrolling_TEXT_MODE DEAW_STATUS_BAR DisplayString_AT_position_not_moving_cursor MAIN_Screen_message1 ,0C16h DisplayString_AT_position_not_moving_cursor MAIN_Screen_message2 ,0D16h DisplayString_AT_position_not_moving_cursor MAIN_Screen_message3 ,0E16h check_key_pressed1: mov ah, 1 int 16h ;Get key pressed (do not wait for a key - AH:scancode, AL:ASCII) jnz _continue ;; something is clicked jmp no_thing_clicked _continue: ;; check the type of the key cmp ah,1h ; esc jne check_f1 jmp QUIT_THIS_GAME check_f1: cmp ah,3bh ;f1 jne check_f2 ;in case of F1 UPDATE_notification_bar Sent_CHAT_INV_msg mov is_player_1_ready_for_chat,1 ;; make me ready and see if the other is ready to cmp is_player_1_ready_for_chat,1 ;;je LETS_Chat ;;Player 2 is Ready TOO mov is_player_2_ready_for_chat,1 ;; TODO: temproraly in PHASE 1 -> Pressing Twice Starts THE Chat Room jmp remove_key_from_buffer check_f2: cmp ah,3ch ; F2 jne remove_key_from_buffer ;in case of F2 UPDATE_notification_bar Sent_Game_INV_msg ;; mov is_player_1_ready_for_game,1 ;; make me ready and see if the other is ready to cmp is_player_2_ready_for_game,1 je LETS_PLAY ;;Player 2 is Ready TOO mov is_player_2_ready_for_game,1 ;; TODO: temproraly in PHASE 1 -> Pressing Twice Starts THE GAME remove_key_from_buffer: ;; delete The key from buffer empitify_buffer no_thing_clicked: ;; the second loop is here but nothing to display now jmp check_key_pressed1 LETS_PLAY: empitify_buffer ;; To make Sure That no bat chars are saved in Buffer CALL GAME_WELCOME_PAGES ;; For level selection and continue To GAME empitify_buffer ;; To make Sure That no bat chars are saved in Buffer CALL START_My_GAME jmp QUIT_THIS_GAME LETS_Chat: empitify_buffer ;; To make Sure That no bat chars are saved in Buffer CAll CHAT_ROOM ;;should BE THE CHAT.ASM but just For now jmp QUIT_THIS_GAME QUIT_THIS_GAME: MOV AH,4CH INT 21H ;GO BACK TO DOS ;to end the program main endp include Ex.asm include validate.asm ;To validate The input NAME NAME_VALIDATION PROC DisplayString_AT_position_not_moving_cursor Enter_Name_message 0318h MoveCursorTo 0421h ReadString FirstName cmp FirstNameData,'A' ;check if first character is letter ;;we only allow range (A-Z and a-z) jl TRY_AGAIN_INPUT cmp FirstNameData,'z' jg TRY_AGAIN_INPUT cmp FirstNameData,'`' jg NAME_IS_VALID cmp FirstNameData,'[' jl NAME_IS_VALID TRY_AGAIN_INPUT: ; if first character isn't a letter, clear screen and display a message to user DisplayString_AT_position_not_moving_cursor Enter_Name_message2 0a04h DisplayString_AT_position_not_moving_cursor Press_any_Key_message 0b04h mov al,'$' mov di,offset FirstNameData ;DI points to the target mov cx,0 ;count mov cl,ActualFirstNameSize ; no need to reset The whole String rep stosb ;copy $ into FirstNameData to reset it to all $ Read_KEY jmp DisplayAgain ;Display first screen again NAME_IS_VALID: ret NAME_VALIDATION ENDP NAME_VALIDATION2 PROC RENTER_FAFA: mov ax, 0600h ;Scroll Screen AH=07(Scroll DOWN), AL=1 one line mov bh, 07h ;Normal attributes -> 07 ;; 0E-> yellow text mov cx, 0800H ;from row 17h col 0 mov dx, 1850H ;To end of screen int 10h ;Clear the first line DisplayString_AT_position_not_moving_cursor Enter_SECOND_Name_message 0818h MoveCursorTo 0921h ReadString SecondName cmp SecondNameData,'A' ;check if first character is letter ;;we only allow range (A-Z and a-z) jl TRY_AGAIN_INPUT2 cmp SecondNameData,'z' jg TRY_AGAIN_INPUT2 cmp SecondNameData,'`' jg NAME2_IS_VALID cmp SecondNameData,'[' jl NAME2_IS_VALID TRY_AGAIN_INPUT2: ; if first character isn't a letter, clear screen and display a message to user DisplayString_AT_position_not_moving_cursor Enter_Name_message2 0C04h DisplayString_AT_position_not_moving_cursor Press_any_Key_message 0b04h mov al,'$' mov di,offset SecondNameData ;DI points to the target mov cx,0 ;count mov cl,ActualSecondNameSize ; no need to reset The whole String rep stosb ;copy $ into FirstNameData to reset it to all $ Read_KEY jmp RENTER_FAFA ;Display first screen again NAME2_IS_VALID: ret NAME_VALIDATION2 ENDP dis2dig proc ; displays 2 digit number in AX mov bl, 10 XOR BH,BH div bl mov dh, ah mov ah, 0 XOR BH,BH div bl mov dl, ah add dl, '0' add dh, '0' MOV AL,DL ;al contains the char to print mov ah, 0eh ;0eh = 14 mov bl, 0ch ;Color is red int 10h ; print char -> auto advances cursor MOV AL,DH ;al contains the char to print mov ah, 0eh ;0eh = 14 mov bl, 0ch ;Color is red int 10h ; print char -> auto advances cursor ret dis2dig endp ;THE GAME AND LEVEL SELECTION GAME_WELCOME_PAGES PROC ChangeVideoMode 3h ;;clears screen and starts Video mode DisplayString_AT_position_not_moving_cursor level1_msg 0a20h DisplayString_AT_position_not_moving_cursor level2_msg 0c20h ;;LEVEL SELECTION -> keep looping till a F1 or F2 Is Pressed LEVEL_SELECTION ; just you choose the the level LEVEL_PROCESSING ; according to the chosen -> you do that shit INSTRUCTIONS_PAGE ;just to show The instructions of THE game for 10 seconds ;; let the Game begin ;; just to stop the program ;sis: jmp sis ret GAME_WELCOME_PAGES ENDP ;description CHAT_ROOM PROC ret CHAT_ROOM ENDP ;would add another Your_Game ig i the one who recieved the invitation START_My_GAME PROC ChangeVideoMode 13h ;; CLEARS tHE SCREEN and start video mode mov Game_turn,1 ;; player left starts the Game GAME_LOOP: CLR_Screen_with_Scrolling_GRAPHICS_MODE ;; CLEARS tHE SCREEN call READ_BUFFER_IF_NOT_USED MOV AH,1 INT 16H cmp ah,3eh ; F4 jne not_finshed_for_noww jmp QUIT_GAME_LOOP not_finshed_for_noww: ;; WE DRAW THE BACKGROUND - THE Values - call DRAW_BACKGROUND ;;Draws The BackGround Image call UPDATE_VALUES_Displayed ;; Update values displayed with ones in variables call BIRDGAME call CHECK_POWERUPS call GetCommand Update_the_Commands ;; to be displayed in its place (L or R) CMP finished_taking_input,1 je hhhheeeeeeee Jmp NOT_FINISHED_INPUT_YET hhhheeeeeeee: ;; THE PLAYER FINSHED TYPING ;; WE WILL UPDATE chosen players Regs mov Command_valid,1 call Check_valid cmp Command_valid,0H ;;invalid jne execute_command_valid ;; command is not valid ;;dec points cmp game_turn,1 jne dec_other_player DEC playerpoints jmp FINISHED_EXECUTING dec_other_player: DEC right_playerpoints jmp FINISHED_EXECUTING execute_command_valid: CMP EXECUTE_REVESED,1 JNE EXECUTE_NORMALLY cmp game_turn, 1 jne executrtheOther EXECUTE_THECOMMAND_AT_SIDE 2 ;;EXECCUTE IN OPPONENT REGS MOV EXECUTE_REVESED,0 JMP FINISHED_EXECUTING executrtheOther: ;;player 2 is playing EXECUTE_THECOMMAND_AT_SIDE 1 ;;EXECCUTE IN OPPONENT REGS ;; MOV EXECUTE_REVESED,0 JMP FINISHED_EXECUTING EXECUTE_NORMALLY: EXECUTE_THECOMMAND_AT_SIDE game_turn FINISHED_EXECUTING: Reset_Command MOV finished_taking_input,0 ;;to reset it ;;swap turns SWAP_TURNS NOT_FINISHED_INPUT_YET: CALL checkValuesInRegisters CALL checkIfAnyPlayerLost CMP playersStatus,1 ;; LEFT LOST JNE CHECK_IF_RIGHT_LOST JMP QUIT_GAME_LOOP CHECK_IF_RIGHT_LOST: CMP playersStatus,2 ;; Right LOST JNE no_ONE_LOST_YET JMP QUIT_GAME_LOOP no_ONE_LOST_YET: Wait_centi_seconds 1 JMP GAME_LOOP QUIT_GAME_LOOP: ChangeVideoMode 3H DisplayString_AT_position_and_move_cursor EXIT_MSG 0409H DisplayString_AT_position_and_move_cursor EXIT_MSG2 0609H DISPLAY_num_in_HEX_ 0709h 4 playerPoints DisplayString_AT_position_and_move_cursor EXIT_MSG3 0621H DISPLAY_num_in_HEX_ 0721h 4 right_playerPoints CMP playersStatus,1 ;; RIGHT WINS JNE CHECK_IF_THE_OTHER_WINS DisplayString_AT_position_and_move_cursor EXIT_MSG4 0F1AH DisplayString SecondNameData JMP WAIT_TIME_A CHECK_IF_THE_OTHER_WINS: CMP playersStatus,2 JNE WAIT_TIME_A DisplayString_AT_position_and_move_cursor EXIT_MSG4 0F1AH DisplayString FirstNameData WAIT_TIME_A: WAIT_10_seconds_TIME CALL RESET_ALL_VARS JMP Main_Screen RET START_My_GAME ENDP UPDATE_VALUES_Displayed PROC ;; ;; The Code could be massive but if no problems -> WHY NOT?? DISPLAY_num_in_HEX_ ax_rec_l, 4 ,L_Ax DISPLAY_num_in_HEX_ bx_rec_l, 4 ,L_Bx DISPLAY_num_in_HEX_ cx_rec_l, 4 ,L_Cx DISPLAY_num_in_HEX_ dx_rec_l, 4 ,L_Dx DISPLAY_num_in_HEX_ si_rec_l, 4 ,L_SI DISPLAY_num_in_HEX_ di_rec_l, 4 ,L_DI DISPLAY_num_in_HEX_ bp_rec_l, 4 ,L_BP DISPLAY_num_in_HEX_ sp_rec_l, 4 ,L_SP xor ah,ah mov al, L_00 ;; its a byte DISPLAY_num_in_HEX_ DS_0_left, 2 ,ax xor ah,ah mov al, L_01 ;; its a byte DISPLAY_num_in_HEX_ DS_1_left, 2 ,ax xor ah,ah mov al, L_02 ;; its a byte DISPLAY_num_in_HEX_ DS_2_left, 2 ,ax xor ah,ah mov al, L_03 ;; its a byte DISPLAY_num_in_HEX_ DS_3_left, 2 ,ax xor ah,ah mov al, L_04 ;; its a byte DISPLAY_num_in_HEX_ DS_4_left, 2 ,ax xor ah,ah mov al, L_05 ;; its a byte DISPLAY_num_in_HEX_ DS_5_left, 2 ,ax xor ah,ah mov al, L_06 ;; its a byte DISPLAY_num_in_HEX_ DS_6_left, 2 ,ax xor ah,ah mov al, L_07 ;; its a byte DISPLAY_num_in_HEX_ DS_7_left, 2 ,ax xor ah,ah mov al, L_08 ;; its a byte DISPLAY_num_in_HEX_ DS_8_left, 2 ,ax xor ah,ah mov al, L_09 ;; its a byte DISPLAY_num_in_HEX_ DS_9_left, 2 ,ax xor ah,ah mov al, L_A ;; its a byte DISPLAY_num_in_HEX_ DS_A_left, 2 ,ax xor ah,ah mov al, L_B ;; its a byte DISPLAY_num_in_HEX_ DS_B_left, 2 ,ax xor ah,ah mov al, L_C ;; its a byte DISPLAY_num_in_HEX_ DS_C_left, 2 ,ax xor ah,ah mov al, L_D ;; its a byte DISPLAY_num_in_HEX_ DS_D_left, 2 ,ax xor ah,ah mov al, L_E ;; its a byte DISPLAY_num_in_HEX_ DS_E_left, 2 ,ax xor ah,ah mov al, L_F ;; its a byte DISPLAY_num_in_HEX_ DS_F_left, 2 ,ax xor ah,ah mov al, L_cARRY ;; its a byte DISPLAY_num_in_HEX_ l_CARRY_LEFT, 1 ,ax ;; The Balls xor ah,ah mov al, ball_0 ;; its a byte DISPLAY_num_in_HEX_ first_ball_left, 2 ,ax xor ah,ah mov al, ball_1 ;; its a byte DISPLAY_num_in_HEX_ second_ball_left, 2 ,ax xor ah,ah mov al, ball_2 ;; its a byte DISPLAY_num_in_HEX_ third_ball_left, 2 ,ax xor ah,ah mov al, ball_3 ;; its a byte DISPLAY_num_in_HEX_ forth_ball_left, 2 ,ax xor ah,ah mov al, ball_4 ;; its a byte DISPLAY_num_in_HEX_ fifth_ball_left, 2 ,ax ;; TODO : CHANGE THE REG TO THE OTHER SIDE REGS DISPLAY_num_in_HEX_ ax_rec_r, 4 ,R_Ax DISPLAY_num_in_HEX_ bx_rec_r, 4 ,R_Bx DISPLAY_num_in_HEX_ cx_rec_r, 4 ,R_Cx DISPLAY_num_in_HEX_ dx_rec_r, 4 ,R_Dx DISPLAY_num_in_HEX_ si_rec_r, 4 ,R_SI DISPLAY_num_in_HEX_ di_rec_r, 4 ,R_DI DISPLAY_num_in_HEX_ bp_rec_r, 4 ,R_BP DISPLAY_num_in_HEX_ sp_rec_r, 4 ,R_SP DISPLAY_num_in_HEX_ TARGET_VALUE_BOX, 4 ,TARGET_VALUE xor ah,ah mov al, R_00 ;; its a byte DISPLAY_num_in_HEX_ DS_0_right, 2 ,ax xor ah,ah mov al, R_01 ;; its a byte DISPLAY_num_in_HEX_ DS_1_right, 2 ,ax xor ah,ah mov al, R_02 ;; its a byte DISPLAY_num_in_HEX_ DS_2_right, 2 ,ax xor ah,ah mov al, R_03 ;; its a byte DISPLAY_num_in_HEX_ DS_3_right, 2 ,ax xor ah,ah mov al, R_04 ;; its a byte DISPLAY_num_in_HEX_ DS_4_right, 2 ,ax xor ah,ah mov al, R_05 ;; its a byte DISPLAY_num_in_HEX_ DS_5_right, 2 ,ax xor ah,ah mov al, R_06 ;; its a byte DISPLAY_num_in_HEX_ DS_6_right, 2 ,ax xor ah,ah mov al, R_07 ;; its a byte DISPLAY_num_in_HEX_ DS_7_right, 2 ,ax xor ah,ah mov al, R_08 ;; its a byte DISPLAY_num_in_HEX_ DS_8_right, 2 ,ax xor ah,ah mov al, R_09 ;; its a byte DISPLAY_num_in_HEX_ DS_9_right, 2 ,ax xor ah,ah mov al, R_A ;; its a byte DISPLAY_num_in_HEX_ DS_A_right, 2 ,ax xor ah,ah mov al, R_B ;; its a byte DISPLAY_num_in_HEX_ DS_B_right, 2 ,ax xor ah,ah mov al, R_C ;; its a byte DISPLAY_num_in_HEX_ DS_C_right, 2 ,ax xor ah,ah mov al, R_D ;; its a byte DISPLAY_num_in_HEX_ DS_D_right, 2 ,ax xor ah,ah mov al, R_E ;; its a byte DISPLAY_num_in_HEX_ DS_E_right, 2 ,ax xor ah,ah mov al, R_F ;; its a byte DISPLAY_num_in_HEX_ DS_F_right, 2 ,ax xor ah,ah mov al, R_CARRY ;; its a byte DISPLAY_num_in_HEX_ R_CARRY_RIGHT, 1 ,ax cmp game_level,2 je dont_print_forbidden MoveCursorTo forbidden_char_LEFT xor ah,ah mov al, forbidden_char ;; its a byte mov ah, 0eh ;0eh = 14 mov bl, 0ch ;Color is red int 10h ; print char -> auto advances cursor xor ah,ah mov al, right_forbidden_char ;; its a byte MoveCursorTo forbidden_char_RIGHT xor ah,ah mov al, right_forbidden_char ;; its a byte mov ah, 0eh ;0eh = 14 mov bl, 0ch ;Color is red int 10h ; print char -> auto advances cursor Draw_IMG 125 5 forb_char forb_char_size Draw_IMG 301 5 forb_char forb_char_size dont_print_forbidden: ;;points DISPLAY_num_in_HEX_ Points_BOX_left, 4 ,playerPoints DISPLAY_num_in_HEX_ Points_BOX_right, 4 ,right_playerPoints ;;Command DisplayString_AT_position_and_move_cursor FirstNameData CL_row_left mov dx,CL_row_left add dl, ActualFirstNameSize ;;to move cursor MoveCursorTo dx DisplayString separator_ DisplayString L_commandData DisplayString_AT_position_and_move_cursor SecondNameData CL_row_RIGHT mov dx,CL_row_RIGHT add dl, ActualSecondNameSize ;;to move cursor MoveCursorTo dx DisplayString separator_ DisplayString R_commandData ret UPDATE_VALUES_Displayed ENDP ;To Draw The background DRAW_BACKGROUND PROC mov ah, 0ch mov bx, offset backGround_left KeepDrawingLeft: drawPixelWithOffset [bx], [bx+1], [bx+2], 0, 0 add bx, 3 cmp bx, offset back_leftSize JNE KeepDrawingLeft mov ah, 0ch mov bx, offset backGround_right KeepDrawingright: drawPixelWithOffset [bx], [bx+1], [bx+2], 160, 0 add bx, 3 cmp bx, offset back_rightSize JNE KeepDrawingright ret DRAW_BACKGROUND ENDP ;; Draws the Bird BIRDGAME PROC Draw_IMG_with_color paddle_x,paddle_y,paddleImg,paddleColor,paddleSize Draw_IMG_with_color right_paddle_x,right_paddle_y,right_paddleImg,right_paddleColor,right_paddleSize movePaddle paddle_x,paddle_velocity_x,paddle_y,paddle_velocity_y,paddleUp,paddleDown,paddleRight,paddleLeft,135,0 movePaddle right_paddle_x,right_paddle_velocity_x,right_paddle_y,right_paddle_velocity_y,right_paddleUp,right_paddleDown,right_paddleRight,right_paddleLeft,295,165 ;checkTime randomBirdColor birdColor,colorIndex setBirdPointsWithTheCorrespondingColor colorIndex,birdPoints,pointsOfColors ;randomBirdColor right_birdStatus,right_birdColor,colorIndex setBirdPointsWithTheCorrespondingColor colorIndex,right_birdPoints,pointsOfColors ;clearScreen cmp gamestatus,0 jne skipSkipDrawingBirds jmp skipDrawingBirds skipSkipDrawingBirds: ;left bird Draw_IMG_with_color birdX,birdY,BirdImg,birdcolor,BirdSize ;right bird ;moveBird 304,180,right_birdVelocity,right_birdX Draw_IMG_with_color right_birdX,right_birdY,right_BirdImg,birdcolor,right_BirdSize moveBird 135,0,birdVelocity,birdX skipDrawingBirds: checkForFire fireScanCode,paddle_x,paddle_width,BallSize,fireBall_x,fireBall_y,ifFireIsPressed,paddle_y cmp ifFireIsPressed,0 jne skipCheckRight jmp checkRight skipCheckRight: moveFireBall fireBall_velocity_y,fireBall_y,ifFireIsPressed Draw_IMG_with_color fireBall_x,fireBall_y,BallImg,fireballColor,BallSize compareBirdWithBall birdX,fireBall_x,fireBall_y,BirdSize,0,birdStatus,playerPoints,birdPoints,colorIndex checkRight: checkForFire right_fireScancode,right_paddle_x,right_paddle_width,BallSize,right_fireBall_x,right_fireBall_y,right_ifFireIsPressed,right_paddle_y cmp right_ifFireIsPressed,0 jne skipJmp jmp midDraw skipJmp: moveFireBall right_fireBall_velocity_y,right_fireBall_y,right_ifFireIsPressed Draw_IMG_with_color right_fireBall_x,right_fireBall_y,BallImg,fireballColor,BallSize compareBirdWithBall right_birdX,right_fireBall_x,right_fireBall_y,right_BirdSize,160,birdStatus,right_playerPoints,right_birdPoints,colorIndex midDraw: checkTimeInterval gamestatus, prevTime, timeInterval RET BIRDGAME ENDP GetCommand PROC mov ah,1 int 16h ;-> looks at the buffer jz FinishedTakingChar ;nothing is clicked cmp al,20H ;;a space jb CHECK_IF_ENTER11 cmp al, ']' ja CHECK_IF_ENTER11 JMP ADD_TO_COMMAND ;;its a valid one CHECK_IF_ENTER11: cmp ah,59 ;; check if F1 is pressed jne CHECK_IF_F2IS_PRESSED mov finished_taking_input,1 jmp ADD_TO_COMMAND ;; TO ADD THE ENTER CHECK_IF_F2IS_PRESSED: cmp ah,60 ;; check if F2 is pressed jne CHECK_IF_BACKSLASH11 mov finished_taking_input,1 CMP GAME_LEVEL, 2 JNE ADD_TO_COMMAND MOV EXECUTE_REVESED, 1 jmp ADD_TO_COMMAND ;; TO ADD THE ENTER CHECK_IF_BACKSLASH11: cmp ah,0eh ;;backk jne FinishedTakingChar ;;NOT ANY OFTHE THREE CASES ;if size>0 then delete the last char and dec string READ_KEY cmp actualcommand_Size,0 je FinishedTakingChar mov di,offset THE_COMMAND mov bl,actualcommand_Size dec bl xor bh,bh add di,bx mov byte ptr [di], '$' dec actualcommand_Size jmp FinishedTakingChar ADD_TO_COMMAND: READ_KEY ;then store The char and print it then inc the size cmp actualcommand_Size,15 ;; command is full -> in order to not delete $ at the end je FinishedTakingChar mov di,offset THE_COMMAND mov bl,actualcommand_Size xor bh,bh add di,bx mov [di],al ;;the char is moved to the end of string inc actualcommand_Size FinishedTakingChar: ret GetCommand ENDP CHECK_FORBIDDEN_CHARS proc ;; if turn=1 mov to L_command else R_command cmp Game_turn,1 ;;first player jne check_p22 mov al,right_forbidden_char jmp check_p33 check_p22: ;;the other is playing mov al,forbidden_char check_p33: ;; checks if command have that char mov di,offset THE_COMMAND xor ch,ch mov cl,actualcommand_Size repne scasb ;;searches for al cmp cx,0 jne bad_char dec di cmp byte ptr [di],al je bad_char mov contains_forbidden,0 ret bad_char: mov contains_forbidden,1 ret CHECK_FORBIDDEN_CHARS ENDp exchangeValuesInRegisters proc ; cmp game_turn,2 ;;send it in al CMP al,2 JE RTRTRTRT jMP exchangeRightPlayerRegisters RTRTRTRT: mov ax,L_AX xchg _AX,ax mov L_AX,ax mov ax,L_BX xchg _BX,ax mov L_BX,ax mov ax,L_CX xchg _CX,ax mov L_CX,ax mov ax,L_DX xchg _DX,ax mov L_DX,ax mov ax,L_SI xchg _SI,ax mov L_SI,ax mov ax,L_DI xchg _DI,ax mov L_DI,ax mov ax,L_SP xchg _SP,ax mov L_SP,ax mov ax,L_BP xchg _BP,ax mov L_BP,ax mov ah,L_00 xchg _00,ah mov L_00,ah mov ah,L_01 xchg _01,ah mov L_01,ah mov ah,L_02 xchg _02,ah mov L_02,ah mov ah,L_03 xchg _03,ah mov L_03,ah mov ah,L_04 xchg _04,ah mov L_04,ah mov ah,L_05 xchg _05,ah mov L_05,ah mov ah,L_06 xchg _06,ah mov L_06,ah mov ah,L_07 xchg _07,ah mov L_07,ah mov ah,L_08 xchg _08,ah mov L_08,ah mov ah,L_09 xchg _09,ah mov L_09,ah mov ah,L_A xchg _A,ah mov L_A,ah mov ah,L_B xchg _B,ah mov L_B,ah mov ah,L_C xchg _C,ah mov L_C,ah mov ah,L_D xchg _D,ah mov L_D,ah mov ah,L_E xchg _E,ah mov L_E,ah mov ah,L_F xchg _F,ah mov L_F,ah mov ah,L_CARRY xchg _CARRY,ah mov L_CARRY,ah jmp ouououlou exchangeRightPlayerRegisters: mov ax,R_AX xchg _AX,ax mov R_AX,ax mov ax,R_BX xchg _BX,ax mov R_BX,ax mov ax,R_CX xchg _CX,ax mov R_CX,ax mov ax,R_DX xchg _DX,ax mov R_DX,ax mov ax,R_SI xchg _SI,ax mov R_SI,ax mov ax,R_DI xchg _DI,ax mov R_DI,ax mov ax,R_SP xchg _SP,ax mov R_SP,ax mov ax,R_BP xchg _BP,ax mov R_BP,ax mov ah,R_00 xchg _00,ah mov R_00,ah mov ah,R_01 xchg _01,ah mov R_01,ah mov ah,R_02 xchg _02,ah mov R_02,ah mov ah,R_03 xchg _03,ah mov R_03,ah mov ah,R_04 xchg _04,ah mov R_04,ah mov ah,R_05 xchg _05,ah mov R_05,ah mov ah,R_06 xchg _06,ah mov R_06,ah mov ah,R_07 xchg _07,ah mov R_07,ah mov ah,R_08 xchg _08,ah mov R_08,ah mov ah,R_09 xchg _09,ah mov R_09,ah mov ah,R_A xchg _A,ah mov R_A,ah mov ah,R_B xchg _B,ah mov R_B,ah mov ah,R_C xchg _C,ah mov R_C,ah mov ah,R_D xchg _D,ah mov R_D,ah mov ah,R_E xchg _E,ah mov R_E,ah mov ah,R_F xchg _F,ah mov R_F,ah mov ah,R_CARRY xchg _CARRY,ah mov R_CARRY,ah ouououlou: ret endp exchangeValuesInRegisters checkValuesInRegisters proc mov ax,target_value cmp R_AX,ax je leftPlayerWins cmp R_BX,ax je leftPlayerWins cmp R_CX,ax je leftPlayerWins cmp R_DX,ax je leftPlayerWins cmp R_SI,ax je leftPlayerWins cmp R_DI,ax je leftPlayerWins cmp R_SP,ax je leftPlayerWins cmp R_BP,ax jne checkLeftPlayer leftPlayerWins: mov playersStatus,2 ;; RIGHT LOST LEFT WINS jmp exitCheckValuesInRegisters checkLeftPlayer: cmp L_AX,ax je rightPlayerWins cmp L_BX,ax je rightPlayerWins cmp L_CX,ax je rightPlayerWins cmp L_DX,ax je rightPlayerWins cmp L_SI,ax je rightPlayerWins cmp L_DI,ax je rightPlayerWins cmp L_SP,ax je rightPlayerWins cmp L_BP,ax jne exitCheckValuesInRegisters rightPlayerWins: mov playersStatus,1 exitCheckValuesInRegisters: ret checkValuesInRegisters endp checkIfAnyPlayerLost proc cmp playerPoints,0 jg checkIfRightPlayerLost mov playersStatus,1 checkIfRightPlayerLost: cmp right_playerPoints,0 jg exitCheckIfAnyPlayerLost mov playersStatus,2 exitCheckIfAnyPlayerLost: ret checkIfAnyPlayerLost endp ;description CHECK_POWERUPS PROC mov ah,1 int 16h ;-> looks at the buffer jnz xserdc jmp FinishedCheckingPowerUps ;nothing is clicked xserdc: ;; f5 to f9 are the POWERUps ;; f5 ->sc63 cmp ah,63 ;F5 jne check_if_F6 ;execute on your Procecceor READ_KEY CALL powerUp_1 JMP FinishedCheckingPowerUps check_if_F6: cmp ah,64 ;F6 jne check_if_F7 READ_KEY CALL powerUp_2 JMP FinishedCheckingPowerUps check_if_F7: cmp ah,65 ;F7 jne check_if_F8 READ_KEY ;;READ the f7 cmp game_turn,1 jne check_if_the_other_game_turn cmp IS_USED_POWERUP3,1 je FinishedCheckingPowerUps ;;no more tries CALL powerUp_3 JMP FinishedCheckingPowerUps check_if_the_other_game_turn: cmp right_IS_USED_POWERUP3,1 je FinishedCheckingPowerUps ;;no more tries CALL powerUp_3 JMP FinishedCheckingPowerUps check_if_F8: cmp ah,66 ;F8 jne check_if_F9 READ_KEY ;;READ the f8 cmp game_turn,1 jne check_if_the_other_game_turn2 cmp IS_USED_POWERUP4,1 je FinishedCheckingPowerUps ;;no more tries CALL powerUp_4 JMP FinishedCheckingPowerUps check_if_the_other_game_turn2: cmp right_IS_USED_POWERUP4,1 je FinishedCheckingPowerUps ;;no more tries CALL powerUp_4 JMP FinishedCheckingPowerUps check_if_F9: cmp ah,67 ;F9 jne check_if_F10 READ_KEY ;;READ the f9 cmp game_level,2 jne FinishedCheckingPowerUps cmp game_turn,1 jne check_if_the_other_game_turn3 cmp IS_USED_POWERUP6,1 je FinishedCheckingPowerUps ;;no more tries CALL powerUp_6 JMP FinishedCheckingPowerUps check_if_the_other_game_turn3: cmp right_IS_USED_POWERUP6,1 je FinishedCheckingPowerUps ;;no more tries CALL powerUp_6 JMP FinishedCheckingPowerUps check_if_F10: FinishedCheckingPowerUps: ret CHECK_POWERUPS ENDP ;execute a command at your proceccor powerUp_1 PROC cmp game_turn,1 JE RTRTRTRTASAS JMP exec_on_other1 RTRTRTRTASAS: cmp playerPoints,5 ;;consumes 3 points JNB EDCESDAD JMP NOT_POWERUP_1 EDCESDAD: Draw_blank_line DisplayString_AT_position_not_moving_cursor POWERUP1_MSG, 0B09h DisplayString_AT_position_not_moving_cursor POWERUP1_MSG2, 0c05h MoveCursorTo 0E09h ReadString COMMAND EXECUTE_THECOMMAND_AT_SIDE 2 SUB playerPoints,5 Reset_Command JMP NOT_POWERUP_1 exec_on_other1: cmp right_playerPoints,5 ;;consumes 3 points JNB ASDASDASD JMP NOT_POWERUP_1 ASDASDASD: Draw_blank_line DisplayString_AT_position_not_moving_cursor POWERUP1_MSG, 0B09h DisplayString_AT_position_not_moving_cursor POWERUP1_MSG2, 0c05h MoveCursorTo 0E09h ReadString COMMAND EXECUTE_THECOMMAND_AT_SIDE 1 SUB right_playerPoints,5 Reset_Command NOT_POWERUP_1: RET powerUp_1 endP powerUp_2 PROC cmp game_turn,1 JE RTRTRTRTASASAS JMP exec_on_other2 RTRTRTRTASASAS: cmp playerPoints,3 ;;consumes 3 points JNB SARAH112 JMP NOT_POWERUP_2 SARAH112: Draw_blank_line DisplayString_AT_position_not_moving_cursor POWERUP2_MSG, 0B09h DisplayString_AT_position_not_moving_cursor POWERUP2_MSG2, 0c05h MoveCursorTo 0E09h ReadString COMMAND EXECUTE_THECOMMAND_AT_SIDE 1 cmp contains_forbidden,1 je dont_on_other EXECUTE_THECOMMAND_AT_SIDE 2 dont_on_other: SUB playerPoints,3 Reset_Command JMP NOT_POWERUP_2 exec_on_other2: cmp right_playerPoints,3 ;;consumes 3 points JNB RETSARAHTER JMP NOT_POWERUP_2 RETSARAHTER: Draw_blank_line DisplayString_AT_position_not_moving_cursor POWERUP2_MSG, 0B09h DisplayString_AT_position_not_moving_cursor POWERUP2_MSG2, 0c05h MoveCursorTo 0E09h ReadString COMMAND EXECUTE_THECOMMAND_AT_SIDE 2 cmp contains_forbidden,1 je dont_on_other2 EXECUTE_THECOMMAND_AT_SIDE 1 dont_on_other2: SUB right_playerPoints,3 Reset_Command NOT_POWERUP_2: RET powerUp_2 endP powerUp_3 PROC cmp game_turn,1 jne exec_on_other3 cmp playerPoints,8 ;;consumes 3 points JNB SARAH1112 JMP NOT_POWERUP_3 SARAH1112: Draw_blank_line DisplayString_AT_position_not_moving_cursor POWERUP3_MSG, 0B09h DisplayString_AT_position_not_moving_cursor POWERUP3_MSG2, 0c05h READ_KEY MOV forbidden_char ,AL MoveCursorTo 0E14h ;;MIGHT CAUSE A PROBLEM mov dl,al mov ah,2 ;; to display the the char into screen (echo) int 21h READ_KEY sub playerPoints,8 mov IS_USED_POWERUP3,1 JMP NOT_POWERUP_3 exec_on_other3: cmp right_playerPoints,8 ;;consumes 3 points JNB RETSARAHTERR JMP NOT_POWERUP_3 RETSARAHTERR: Draw_blank_line DisplayString_AT_position_not_moving_cursor POWERUP3_MSG, 0B09h DisplayString_AT_position_not_moving_cursor POWERUP3_MSG2, 0c05h READ_KEY MoveCursorTo 0E14h ;;MIGHT CAUSE A PROBLEM mov dl,al mov ah,2 ;; to display the the char into screen (echo) int 21h READ_KEY MOV right_forbidden_char ,AL sub RIGHT_playerPoints,8 mov right_IS_USED_POWERUP3,1 NOT_POWERUP_3: RET powerUp_3 endP ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; powerUp_4 PROC cmp game_turn,1 ;checks if it's left player's turn jne checkIfItsRightPlayerTurn_powerUp_4 cmp playerPoints,30 jnb skipme1 jmp exitPowerUp_4 skipme1: sub playerPoints,30 MOV IS_USED_POWERUP4,1 jmp clearAllRegisters checkIfItsRightPlayerTurn_powerUp_4: cmp right_playerPoints,30 jnb SKIPME2 jmp exitPowerUp_4 SKIPME2: MOV right_IS_USED_POWERUP4,1 sub RIGHT_playerPoints,30 clearAllRegisters: mov L_AX,0 mov L_BX,0 mov L_CX,0 mov L_DX,0 mov L_SI,0 mov L_DI,0 mov L_SP,0 mov L_BP,0 mov R_AX,0 mov R_BX,0 mov R_CX,0 mov R_DX,0 mov R_SI,0 mov R_DI,0 mov R_SP,0 mov R_BP,0 exitPowerUp_4: ret powerUp_4 endp powerUp_6 proc cmp game_turn,1 jne checkIfItsRightPlayerTurn_powerUp_6 cmp playerPoints,7 JNB SKIPSARAH1 jmp exitPowerUp_6 SKIPSARAH1: jmp changeTargetValue checkIfItsRightPlayerTurn_powerUp_6: cmp right_playerPoints,7 JNB SKIPSARAH2 jmp exitPowerUp_6 SKIPSARAH2: changeTargetValue: Draw_blank_line DisplayString_AT_position_not_moving_cursor POWERUP5_MSG, 0B09h DisplayString_AT_position_not_moving_cursor POWERUP5_MSG2, 0c05h MoveCursorTo 0E09h ReadNumberhexa_in_ax ;;reads new target value cmp L_AX,ax je exitPowerUp_6 cmp L_BX,ax je exitPowerUp_6 cmp L_CX,ax je exitPowerUp_6 cmp L_DX,ax je exitPowerUp_6 cmp L_SI,ax je exitPowerUp_6 cmp L_DI,ax je exitPowerUp_6 cmp L_SP,ax je exitPowerUp_6 cmp L_BP,ax je exitPowerUp_6 cmp R_AX,ax je exitPowerUp_6 cmp R_BX,ax je exitPowerUp_6 cmp R_CX,ax je exitPowerUp_6 cmp R_DX,ax je exitPowerUp_6 cmp R_SI,ax je exitPowerUp_6 cmp R_DI,ax je exitPowerUp_6 cmp R_SP,ax je exitPowerUp_6 cmp R_BP,ax je exitPowerUp_6 mov target_value,ax CMP GAME_TURN,1 JNE other_player_is_playing sub playerPoints,7 mov IS_USED_POWERUP6,1 jmp exitPowerUp_6 other_player_is_playing: mov right_IS_USED_POWERUP6,1 sub right_playerPoints,7 exitPowerUp_6: RET powerUp_6 endp ;description RESET_ALL_VARS PROC mov _Ax, 0 mov _BX, 0 mov _CX, 0 mov _DX, 0 mov _SI, 0 mov _DI, 0 mov _SP, 0 mov _BP, 0 mov _00, 0 mov _01, 0 mov _02, 0 mov _03, 0 mov _04, 0 mov _05, 0 mov _06, 0 mov _07, 0 mov _08, 0 mov _09, 0 mov _A, 0 mov _B, 0 mov _C, 0 mov _D, 0 mov _E, 0 mov _F, 0 mov _CARRY, 0 mov L_Ax, 0 mov L_BX, 0 mov L_CX, 0 mov L_DX, 0 mov L_SI, 0 mov L_DI, 0 mov L_SP, 0 mov L_BP, 0 mov L_00, 0 mov L_01, 0 mov L_02, 0 mov L_03, 0 mov L_04, 0 mov L_05, 0 mov L_06, 0 mov L_07, 0 mov L_08, 0 mov L_09, 0 mov L_A, 0 mov L_B, 0 mov L_C, 0 mov L_D, 0 mov L_E, 0 mov L_F, 0 mov L_CARRY, 0 mov R_Ax, 0 mov R_BX, 0 mov R_CX, 0 mov R_DX, 0 mov R_SI, 0 mov R_DI, 0 mov R_SP, 0 mov R_BP, 0 mov R_00, 0 mov R_01, 0 mov R_02, 0 mov R_03, 0 mov R_04, 0 mov R_05, 0 mov R_06, 0 mov R_07, 0 mov R_08, 0 mov R_09, 0 mov R_A, 0 mov R_B, 0 mov R_C, 0 mov R_D, 0 mov R_E, 0 mov R_F, 0 mov R_CARRY, 0 MOV Game_Level , 0 MOV Game_Turn , 1 ;; TO BE MOV ball_0 ,0 ;;green MOV ball_1 ,0 ;;magenta MOV ball_2 ,0 ;;red MOV ball_3 ,0 ;;blue MOV ball_4 ,0 ;;yellow MOV paddle_x , 5 MOV paddle_y , 185 MOV right_paddle_x ,170 MOV right_paddle_y ,185 MOV DI,OFFSET numOfShotBalls MOV [DI],BYTE PTR 0 MOV [DI+1],BYTE PTR 0 MOV [DI+2],BYTE PTR 0 MOV [DI+3],BYTE PTR 0 MOV [DI+4],BYTE PTR 0 MOV gameStatus , 1 MOV prevTime , 0 ;variable used when checking if the time has changed MOV sizeIndex , 0 MOV playersStatus, 0 MOV target_value , 105eh MOV IS_USED_POWERUP3, 0 ;;TO INDICATE IF USED BEFORE MOV right_IS_USED_POWERUP3, 0 ;;TO INDICATE IF USED BEFORE MOV IS_USED_POWERUP4, 0 ;;TO INDICATE IF USED BEFORE MOV right_IS_USED_POWERUP4, 0 ;;TO INDICATE IF USED BEFORE MOV IS_USED_POWERUP6, 0 ;;TO INDICATE IF USED BEFORE MOV right_IS_USED_POWERUP6, 0 ;;TO INDICATE IF USED BEFORE MOV EXECUTE_REVESED, 0 ;;IN LEVEL 2 IT INDECATES IF YOU CHOSED TO EXECUTE ON OTHER RET RESET_ALL_VARS ENDP READ_BUFFER_IF_NOT_USED PROC MOV AH,1 INT 16H jnz _continue1 ;; something is clicked RET _continue1: ;; AH-> SC A;-ASCII JOMP1: cmp ah,3bh ;f1 jne JOMP2 RET JOMP2: cmp ah,3ch ; F2 jne JOMP3 RET JOMP3: cmp ah,3dh ; F3 jne JOMP4 RET JOMP4: cmp ah,3eh ; F4 jne JOMP5 RET JOMP5: cmp ah,paddleUp jne checkNextttt ret checkNextttt: cmp ah,paddleDown jne checkNexttttt ret checkNexttttt: cmp ah,paddleRight jne checkNextttttt ret checkNextttttt: cmp ah,paddleLeft jne checkNexttttttt ret checkNexttttttt: cmp ah,right_paddleUp jne checkNexttttt1 ret checkNexttttt1: cmp ah,right_paddleDown jne checkNextttttttttttttt ret checkNextttttttttttttt: cmp ah,right_paddleRight jne checkNexttttttttt ret checkNexttttttttt: cmp ah,right_paddleLeft jne checkNexttttttttttt ret checkNexttttttttttt: cmp ah,fireScanCode jne checkNextttttttttttt ret checkNextttttttttttt: cmp ah,right_fireScanCode jne checkNexttttttttttttt ret checkNexttttttttttttt: cmp ah,63 ;F5 jne JOMP33 RET JOMP33: cmp ah,64 ;F6 jne JOMP44 RET JOMP44: cmp ah,65 ;F7 jne JOMP45 RET JOMP45: cmp ah,66 ;F8 jne JOMP46 RET JOMP46: cmp ah,67 ;F9 jne JOMP47 RET JOMP47: cmp al,20H ;;a space jb checkitnn cmp al, ']' ja checkitnn ret checkitnn: cmp ah,0eh ;;backk jne checkitnn2 ret checkitnn2: READ_KEY RET READ_BUFFER_IF_NOT_USED ENDP end main
24.821287
167
0.646164
[ "MIT" ]
Ahmed-ata112/processor_simulation_game
Phase 1/mainGame.asm
50,139
Assembly
#define BASE_ADDR_0 0x00000000 // (core 0) #define BASE_ADDR_1 0x02000000 // (core 1) #define BASE_ADDR_2 0x04000000 // (core 2) #define BASE_ADDR_3 0x06000000 // (core 3) #int main1() { # # int *arr2 = (int *) BASE_ADDR_2; // data mapped on core 2 # int temp = 0; # # *(arr2+1) = 1; // migrates to core 2 (guest context) # # for (int i = 0; i <= 100; i++) { # temp += i; # } # # *(arr2+3) = temp; # # return 0; #} #(RA) #@ENTRY: PUSH 1; PUSH 1; SETHI 0x0400; ST_EM 2 0; PUSH 0; PUSH 0; #(i, temp, RA) #@CONDITION: PULL_CP 0; PUSH 100; COMP_ULT; B_Z 5; #branch to @BODY #(i, temp, RA) #@RETURN: DROP 0; PUSH 3; SETHI 0x0400; ST_EM 2 0; HALT; #(i, temp, RA) #@BODY: # temp += i TUCK_CP 1; #(i, temp, i, RA) ADD; #(temp, i, RA) PULL 1; #(i, temp, RA) #(i, temp, RA) #@FOR.END: PUSH 1; ADD; J_REL -15; #@CONDITION
12.820896
59
0.56461
[ "MIT" ]
ilebedev/stacktool
tests/emra/EM_MODE/asm/EM08_core1.asm
859
Assembly
; A127233: a(n) = n!*(n*(n+1)/2)!. ; Submitted by Jon Maiga ; 1,1,12,4320,87091200,156920924160000,36785478363630796800000,1536637256843037856927580160000000,14998770936168817088309737749441675264000000000,43408511507665453002645192043544271642563569306828800000000000 mov $2,$0 seq $0,52295 ; a(n) = (n*(n+1)/2)!. lpb $2 mul $0,$2 sub $2,1 lpe
31.818182
208
0.762857
[ "Apache-2.0" ]
ckrause/loda-programs
oeis/127/A127233.asm
350
Assembly
; A139487: Numbers k such that 8k + 7 is prime. ; Submitted by Jon Maiga ; 0,2,3,5,8,9,12,15,18,20,23,24,27,29,32,33,38,44,45,47,53,54,57,59,60,62,74,75,78,80,89,90,92,93,102,104,107,110,113,114,120,122,123,128,129,132,135,137,143,152,153,159,162,164,165,170,174,177,179,180,183,185,188,192,194,195,197,200,207,219,222,227,228,230,233,234,243,249,254,257,260,263,267,275,279,285,288,293,297,299,302,305,312,317,318,323,330,332,333,335 mov $1,6 mov $2,$0 add $2,3 pow $2,2 lpb $2 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,8 mov $4,$0 max $4,0 cmp $4,$0 mul $2,$4 lpe mov $0,$1 sub $0,14 div $0,8
29.695652
361
0.658858
[ "Apache-2.0" ]
ckrause/loda-programs
oeis/139/A139487.asm
683
Assembly
; A274616: Maximal number of non-attacking queens on a right triangular board with n cells on each side. ; 0,1,1,2,2,3,4,5,5,6,7,7,8,9,9,10,11,11,12,13,13,14,15,15,16,17,17,18,19,19,20,21,21,22,23,23,24,25,25,26,27,27,28,29,29,30,31,31,32,33,33,34,35,35,36,37,37,38,39,39,40,41,41,42,43,43,44,45,45,46,47,47,48,49,49,50,51,51,52,53,53,54,55,55,56,57,57,58,59,59,60,61,61,62,63,63,64,65,65,66,67,67,68,69,69,70,71,71,72,73,73,74,75,75,76,77,77,78,79,79,80,81,81,82,83,83,84,85,85,86,87,87,88,89,89,90,91,91,92,93,93,94,95,95,96,97,97,98,99,99,100,101,101,102,103,103,104,105,105,106,107,107,108,109,109,110,111,111,112,113,113,114,115,115,116,117,117,118,119,119,120,121,121,122,123,123,124,125,125,126,127,127,128,129,129,130,131,131,132,133,133,134,135,135,136,137,137,138,139,139,140,141,141,142,143,143,144,145,145,146,147,147,148,149,149,150,151,151,152,153,153,154,155,155,156,157,157,158,159,159,160,161,161,162,163,163,164,165,165,166 mov $1,14 add $1,$0 cmp $0,4 sub $0,$1 sub $1,$0 add $1,90 div $1,3 sub $1,39
85.083333
836
0.696376
[ "Apache-2.0" ]
jmorken/loda
programs/oeis/274/A274616.asm
1,021
Assembly
start lda msg puts halt msg string "hello, world!"
10.857143
26
0.5
[ "MIT" ]
siraben/awk-vm
hello.asm
76
Assembly
copyright zengfr site:http://github.com/zengfr/romhack 003AE6 move.w (A1)+, D0 [1p+20, 1p+22, boss+20, boss+22, container+20, container+22, enemy+20, enemy+22, weapon+20, weapon+22] 003B0C movea.l ($20,A6), A1 [1p+20, 1p+22, boss+20, boss+22, container+20, container+22, enemy+20, enemy+22, weapon+20, weapon+22] 003B20 move.w (A1)+, D0 [1p+20, 1p+22, boss+20, boss+22, container+20, container+22, enemy+20, enemy+22, weapon+20, weapon+22] 00A2C6 dbra D0, $a2c0 00A2D8 clr.l ($20,A4) 00A2DC clr.w ($24,A4) copyright zengfr site:http://github.com/zengfr/romhack
52.818182
131
0.685026
[ "Apache-2.0" ]
zengfr/arcade_game_romhacking_sourcecode_top_secret_data
ffight/lcs/1p/20.asm
581
Assembly
; A037824: Number of i such that d(i)>d(i-1), where Sum{d(i)*9^i: i=0,1,....,m} is base 9 representation of n. ; 0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,1,1,1,1,1,0,0,0,0,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1 lpb $0 add $0,1 mod $0,9 mul $0,10 mov $1,6 lpe div $1,6 mov $0,$1
30.75
181
0.533875
[ "Apache-2.0" ]
ckrause/cm
programs/oeis/037/A037824.asm
369
Assembly
; A183091: a(n) is the product of the divisors p^k of n where p is prime and k >= 1. ; Submitted by Christian Krause ; 1,2,3,8,5,6,7,64,27,10,11,24,13,14,15,1024,17,54,19,40,21,22,23,192,125,26,729,56,29,30,31,32768,33,34,35,216,37,38,39,320,41,42,43,88,135,46,47,3072,343,250,51,104,53,1458,55,448,57,58,59,120,61,62,189,2097152,65,66,67,136,69,70,71,1728,73,74,375,152,77,78,79,5120,59049,82,83,168,85,86,87,704,89,270,91,184,93,94,95,98304,97,686,297,1000 add $0,1 mov $7,$0 lpb $0 mov $3,$0 lpb $3 mov $4,$0 mov $6,$2 cmp $6,0 add $2,$6 mod $4,$2 cmp $4,0 cmp $4,0 mov $5,$2 add $2,1 cmp $5,1 max $4,$5 sub $3,$4 lpe mov $5,1 lpb $0 dif $0,$2 mul $7,$5 mul $5,$2 lpe lpe mov $0,$7
24.451613
341
0.585752
[ "Apache-2.0" ]
ckrause/loda-programs
oeis/183/A183091.asm
758
Assembly
############################################################################### # Copyright 2018 Intel Corporation # All Rights Reserved. # # If this software was obtained under the Intel Simplified Software License, # the following terms apply: # # The source code, information and material ("Material") contained herein is # owned by Intel Corporation or its suppliers or licensors, and title to such # Material remains with Intel Corporation or its suppliers or licensors. The # Material contains proprietary information of Intel or its suppliers and # licensors. The Material is protected by worldwide copyright laws and treaty # provisions. No part of the Material may be used, copied, reproduced, # modified, published, uploaded, posted, transmitted, distributed or disclosed # in any way without Intel's prior express written permission. No license under # any patent, copyright or other intellectual property rights in the Material # is granted to or conferred upon you, either expressly, by implication, # inducement, estoppel or otherwise. Any license under such intellectual # property rights must be express and approved by Intel in writing. # # Unless otherwise agreed by Intel in writing, you may not remove or alter this # notice or any other notice embedded in Materials by Intel or Intel's # suppliers or licensors in any way. # # # If this software was obtained under the Apache License, Version 2.0 (the # "License"), the following terms apply: # # 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. ############################################################################### .section .note.GNU-stack,"",%progbits .text .p2align 5, 0x90 SWP_BYTE: pByteSwp: .byte 3,2,1,0, 7,6,5,4, 11,10,9,8, 15,14,13,12 .p2align 5, 0x90 .globl h9_UpdateSHA256 .type h9_UpdateSHA256, @function h9_UpdateSHA256: push %ebp mov %esp, %ebp push %ebx push %esi push %edi sub $(52), %esp .Lsha256_block_loopgas_1: movl (8)(%ebp), %eax vmovdqu (%eax), %xmm0 vmovdqu (16)(%eax), %xmm1 vmovdqu %xmm0, (%esp) vmovdqu %xmm1, (16)(%esp) movl (12)(%ebp), %eax movl (20)(%ebp), %ebx call .L__0000gas_1 .L__0000gas_1: pop %ecx sub $(.L__0000gas_1-SWP_BYTE), %ecx movdqa ((pByteSwp-SWP_BYTE))(%ecx), %xmm6 vmovdqu (%eax), %xmm0 vmovdqu (16)(%eax), %xmm1 vmovdqu (32)(%eax), %xmm2 vmovdqu (48)(%eax), %xmm3 mov (16)(%esp), %eax mov (%esp), %edx vpshufb %xmm6, %xmm0, %xmm0 vpaddd (%ebx), %xmm0, %xmm7 vmovdqu %xmm7, (32)(%esp) mov %eax, %esi shrd $(6), %esi, %esi mov %eax, %ecx shrd $(11), %ecx, %ecx xor %ecx, %esi shrd $(14), %ecx, %ecx xor %ecx, %esi mov (20)(%esp), %edi xor (24)(%esp), %edi and %eax, %edi xor (24)(%esp), %edi mov (28)(%esp), %eax add %esi, %eax add %edi, %eax addl (32)(%esp), %eax movl (4)(%esp), %esi movl (8)(%esp), %ecx mov %edx, %edi xor %ecx, %edi xor %esi, %ecx and %ecx, %edi xor %esi, %ecx xor %ecx, %edi mov %edx, %esi shrd $(2), %esi, %esi mov %edx, %ecx shrd $(13), %ecx, %ecx xor %ecx, %esi shrd $(9), %ecx, %ecx xor %ecx, %esi lea (%edi,%esi), %edx add %eax, %edx add (12)(%esp), %eax mov %edx, (28)(%esp) mov %eax, (12)(%esp) mov %eax, %esi shrd $(6), %esi, %esi mov %eax, %ecx shrd $(11), %ecx, %ecx xor %ecx, %esi shrd $(14), %ecx, %ecx xor %ecx, %esi mov (16)(%esp), %edi xor (20)(%esp), %edi and %eax, %edi xor (20)(%esp), %edi mov (24)(%esp), %eax add %esi, %eax add %edi, %eax addl (36)(%esp), %eax movl (%esp), %esi movl (4)(%esp), %ecx mov %edx, %edi xor %ecx, %edi xor %esi, %ecx and %ecx, %edi xor %esi, %ecx xor %ecx, %edi mov %edx, %esi shrd $(2), %esi, %esi mov %edx, %ecx shrd $(13), %ecx, %ecx xor %ecx, %esi shrd $(9), %ecx, %ecx xor %ecx, %esi lea (%edi,%esi), %edx add %eax, %edx add (8)(%esp), %eax mov %edx, (24)(%esp) mov %eax, (8)(%esp) mov %eax, %esi shrd $(6), %esi, %esi mov %eax, %ecx shrd $(11), %ecx, %ecx xor %ecx, %esi shrd $(14), %ecx, %ecx xor %ecx, %esi mov (12)(%esp), %edi xor (16)(%esp), %edi and %eax, %edi xor (16)(%esp), %edi mov (20)(%esp), %eax add %esi, %eax add %edi, %eax addl (40)(%esp), %eax movl (28)(%esp), %esi movl (%esp), %ecx mov %edx, %edi xor %ecx, %edi xor %esi, %ecx and %ecx, %edi xor %esi, %ecx xor %ecx, %edi mov %edx, %esi shrd $(2), %esi, %esi mov %edx, %ecx shrd $(13), %ecx, %ecx xor %ecx, %esi shrd $(9), %ecx, %ecx xor %ecx, %esi lea (%edi,%esi), %edx add %eax, %edx add (4)(%esp), %eax mov %edx, (20)(%esp) mov %eax, (4)(%esp) mov %eax, %esi shrd $(6), %esi, %esi mov %eax, %ecx shrd $(11), %ecx, %ecx xor %ecx, %esi shrd $(14), %ecx, %ecx xor %ecx, %esi mov (8)(%esp), %edi xor (12)(%esp), %edi and %eax, %edi xor (12)(%esp), %edi mov (16)(%esp), %eax add %esi, %eax add %edi, %eax addl (44)(%esp), %eax movl (24)(%esp), %esi movl (28)(%esp), %ecx mov %edx, %edi xor %ecx, %edi xor %esi, %ecx and %ecx, %edi xor %esi, %ecx xor %ecx, %edi mov %edx, %esi shrd $(2), %esi, %esi mov %edx, %ecx shrd $(13), %ecx, %ecx xor %ecx, %esi shrd $(9), %ecx, %ecx xor %ecx, %esi lea (%edi,%esi), %edx add %eax, %edx add (%esp), %eax mov %edx, (16)(%esp) mov %eax, (%esp) vpshufb %xmm6, %xmm1, %xmm1 vpaddd (16)(%ebx), %xmm1, %xmm7 vmovdqu %xmm7, (32)(%esp) mov %eax, %esi shrd $(6), %esi, %esi mov %eax, %ecx shrd $(11), %ecx, %ecx xor %ecx, %esi shrd $(14), %ecx, %ecx xor %ecx, %esi mov (4)(%esp), %edi xor (8)(%esp), %edi and %eax, %edi xor (8)(%esp), %edi mov (12)(%esp), %eax add %esi, %eax add %edi, %eax addl (32)(%esp), %eax movl (20)(%esp), %esi movl (24)(%esp), %ecx mov %edx, %edi xor %ecx, %edi xor %esi, %ecx and %ecx, %edi xor %esi, %ecx xor %ecx, %edi mov %edx, %esi shrd $(2), %esi, %esi mov %edx, %ecx shrd $(13), %ecx, %ecx xor %ecx, %esi shrd $(9), %ecx, %ecx xor %ecx, %esi lea (%edi,%esi), %edx add %eax, %edx add (28)(%esp), %eax mov %edx, (12)(%esp) mov %eax, (28)(%esp) mov %eax, %esi shrd $(6), %esi, %esi mov %eax, %ecx shrd $(11), %ecx, %ecx xor %ecx, %esi shrd $(14), %ecx, %ecx xor %ecx, %esi mov (%esp), %edi xor (4)(%esp), %edi and %eax, %edi xor (4)(%esp), %edi mov (8)(%esp), %eax add %esi, %eax add %edi, %eax addl (36)(%esp), %eax movl (16)(%esp), %esi movl (20)(%esp), %ecx mov %edx, %edi xor %ecx, %edi xor %esi, %ecx and %ecx, %edi xor %esi, %ecx xor %ecx, %edi mov %edx, %esi shrd $(2), %esi, %esi mov %edx, %ecx shrd $(13), %ecx, %ecx xor %ecx, %esi shrd $(9), %ecx, %ecx xor %ecx, %esi lea (%edi,%esi), %edx add %eax, %edx add (24)(%esp), %eax mov %edx, (8)(%esp) mov %eax, (24)(%esp) mov %eax, %esi shrd $(6), %esi, %esi mov %eax, %ecx shrd $(11), %ecx, %ecx xor %ecx, %esi shrd $(14), %ecx, %ecx xor %ecx, %esi mov (28)(%esp), %edi xor (%esp), %edi and %eax, %edi xor (%esp), %edi mov (4)(%esp), %eax add %esi, %eax add %edi, %eax addl (40)(%esp), %eax movl (12)(%esp), %esi movl (16)(%esp), %ecx mov %edx, %edi xor %ecx, %edi xor %esi, %ecx and %ecx, %edi xor %esi, %ecx xor %ecx, %edi mov %edx, %esi shrd $(2), %esi, %esi mov %edx, %ecx shrd $(13), %ecx, %ecx xor %ecx, %esi shrd $(9), %ecx, %ecx xor %ecx, %esi lea (%edi,%esi), %edx add %eax, %edx add (20)(%esp), %eax mov %edx, (4)(%esp) mov %eax, (20)(%esp) mov %eax, %esi shrd $(6), %esi, %esi mov %eax, %ecx shrd $(11), %ecx, %ecx xor %ecx, %esi shrd $(14), %ecx, %ecx xor %ecx, %esi mov (24)(%esp), %edi xor (28)(%esp), %edi and %eax, %edi xor (28)(%esp), %edi mov (%esp), %eax add %esi, %eax add %edi, %eax addl (44)(%esp), %eax movl (8)(%esp), %esi movl (12)(%esp), %ecx mov %edx, %edi xor %ecx, %edi xor %esi, %ecx and %ecx, %edi xor %esi, %ecx xor %ecx, %edi mov %edx, %esi shrd $(2), %esi, %esi mov %edx, %ecx shrd $(13), %ecx, %ecx xor %ecx, %esi shrd $(9), %ecx, %ecx xor %ecx, %esi lea (%edi,%esi), %edx add %eax, %edx add (16)(%esp), %eax mov %edx, (%esp) mov %eax, (16)(%esp) vpshufb %xmm6, %xmm2, %xmm2 vpaddd (32)(%ebx), %xmm2, %xmm7 vmovdqu %xmm7, (32)(%esp) mov %eax, %esi shrd $(6), %esi, %esi mov %eax, %ecx shrd $(11), %ecx, %ecx xor %ecx, %esi shrd $(14), %ecx, %ecx xor %ecx, %esi mov (20)(%esp), %edi xor (24)(%esp), %edi and %eax, %edi xor (24)(%esp), %edi mov (28)(%esp), %eax add %esi, %eax add %edi, %eax addl (32)(%esp), %eax movl (4)(%esp), %esi movl (8)(%esp), %ecx mov %edx, %edi xor %ecx, %edi xor %esi, %ecx and %ecx, %edi xor %esi, %ecx xor %ecx, %edi mov %edx, %esi shrd $(2), %esi, %esi mov %edx, %ecx shrd $(13), %ecx, %ecx xor %ecx, %esi shrd $(9), %ecx, %ecx xor %ecx, %esi lea (%edi,%esi), %edx add %eax, %edx add (12)(%esp), %eax mov %edx, (28)(%esp) mov %eax, (12)(%esp) mov %eax, %esi shrd $(6), %esi, %esi mov %eax, %ecx shrd $(11), %ecx, %ecx xor %ecx, %esi shrd $(14), %ecx, %ecx xor %ecx, %esi mov (16)(%esp), %edi xor (20)(%esp), %edi and %eax, %edi xor (20)(%esp), %edi mov (24)(%esp), %eax add %esi, %eax add %edi, %eax addl (36)(%esp), %eax movl (%esp), %esi movl (4)(%esp), %ecx mov %edx, %edi xor %ecx, %edi xor %esi, %ecx and %ecx, %edi xor %esi, %ecx xor %ecx, %edi mov %edx, %esi shrd $(2), %esi, %esi mov %edx, %ecx shrd $(13), %ecx, %ecx xor %ecx, %esi shrd $(9), %ecx, %ecx xor %ecx, %esi lea (%edi,%esi), %edx add %eax, %edx add (8)(%esp), %eax mov %edx, (24)(%esp) mov %eax, (8)(%esp) mov %eax, %esi shrd $(6), %esi, %esi mov %eax, %ecx shrd $(11), %ecx, %ecx xor %ecx, %esi shrd $(14), %ecx, %ecx xor %ecx, %esi mov (12)(%esp), %edi xor (16)(%esp), %edi and %eax, %edi xor (16)(%esp), %edi mov (20)(%esp), %eax add %esi, %eax add %edi, %eax addl (40)(%esp), %eax movl (28)(%esp), %esi movl (%esp), %ecx mov %edx, %edi xor %ecx, %edi xor %esi, %ecx and %ecx, %edi xor %esi, %ecx xor %ecx, %edi mov %edx, %esi shrd $(2), %esi, %esi mov %edx, %ecx shrd $(13), %ecx, %ecx xor %ecx, %esi shrd $(9), %ecx, %ecx xor %ecx, %esi lea (%edi,%esi), %edx add %eax, %edx add (4)(%esp), %eax mov %edx, (20)(%esp) mov %eax, (4)(%esp) mov %eax, %esi shrd $(6), %esi, %esi mov %eax, %ecx shrd $(11), %ecx, %ecx xor %ecx, %esi shrd $(14), %ecx, %ecx xor %ecx, %esi mov (8)(%esp), %edi xor (12)(%esp), %edi and %eax, %edi xor (12)(%esp), %edi mov (16)(%esp), %eax add %esi, %eax add %edi, %eax addl (44)(%esp), %eax movl (24)(%esp), %esi movl (28)(%esp), %ecx mov %edx, %edi xor %ecx, %edi xor %esi, %ecx and %ecx, %edi xor %esi, %ecx xor %ecx, %edi mov %edx, %esi shrd $(2), %esi, %esi mov %edx, %ecx shrd $(13), %ecx, %ecx xor %ecx, %esi shrd $(9), %ecx, %ecx xor %ecx, %esi lea (%edi,%esi), %edx add %eax, %edx add (%esp), %eax mov %edx, (16)(%esp) mov %eax, (%esp) vpshufb %xmm6, %xmm3, %xmm3 vpaddd (48)(%ebx), %xmm3, %xmm7 vmovdqu %xmm7, (32)(%esp) mov %eax, %esi shrd $(6), %esi, %esi mov %eax, %ecx shrd $(11), %ecx, %ecx xor %ecx, %esi shrd $(14), %ecx, %ecx xor %ecx, %esi mov (4)(%esp), %edi xor (8)(%esp), %edi and %eax, %edi xor (8)(%esp), %edi mov (12)(%esp), %eax add %esi, %eax add %edi, %eax addl (32)(%esp), %eax movl (20)(%esp), %esi movl (24)(%esp), %ecx mov %edx, %edi xor %ecx, %edi xor %esi, %ecx and %ecx, %edi xor %esi, %ecx xor %ecx, %edi mov %edx, %esi shrd $(2), %esi, %esi mov %edx, %ecx shrd $(13), %ecx, %ecx xor %ecx, %esi shrd $(9), %ecx, %ecx xor %ecx, %esi lea (%edi,%esi), %edx add %eax, %edx add (28)(%esp), %eax mov %edx, (12)(%esp) mov %eax, (28)(%esp) mov %eax, %esi shrd $(6), %esi, %esi mov %eax, %ecx shrd $(11), %ecx, %ecx xor %ecx, %esi shrd $(14), %ecx, %ecx xor %ecx, %esi mov (%esp), %edi xor (4)(%esp), %edi and %eax, %edi xor (4)(%esp), %edi mov (8)(%esp), %eax add %esi, %eax add %edi, %eax addl (36)(%esp), %eax movl (16)(%esp), %esi movl (20)(%esp), %ecx mov %edx, %edi xor %ecx, %edi xor %esi, %ecx and %ecx, %edi xor %esi, %ecx xor %ecx, %edi mov %edx, %esi shrd $(2), %esi, %esi mov %edx, %ecx shrd $(13), %ecx, %ecx xor %ecx, %esi shrd $(9), %ecx, %ecx xor %ecx, %esi lea (%edi,%esi), %edx add %eax, %edx add (24)(%esp), %eax mov %edx, (8)(%esp) mov %eax, (24)(%esp) mov %eax, %esi shrd $(6), %esi, %esi mov %eax, %ecx shrd $(11), %ecx, %ecx xor %ecx, %esi shrd $(14), %ecx, %ecx xor %ecx, %esi mov (28)(%esp), %edi xor (%esp), %edi and %eax, %edi xor (%esp), %edi mov (4)(%esp), %eax add %esi, %eax add %edi, %eax addl (40)(%esp), %eax movl (12)(%esp), %esi movl (16)(%esp), %ecx mov %edx, %edi xor %ecx, %edi xor %esi, %ecx and %ecx, %edi xor %esi, %ecx xor %ecx, %edi mov %edx, %esi shrd $(2), %esi, %esi mov %edx, %ecx shrd $(13), %ecx, %ecx xor %ecx, %esi shrd $(9), %ecx, %ecx xor %ecx, %esi lea (%edi,%esi), %edx add %eax, %edx add (20)(%esp), %eax mov %edx, (4)(%esp) mov %eax, (20)(%esp) mov %eax, %esi shrd $(6), %esi, %esi mov %eax, %ecx shrd $(11), %ecx, %ecx xor %ecx, %esi shrd $(14), %ecx, %ecx xor %ecx, %esi mov (24)(%esp), %edi xor (28)(%esp), %edi and %eax, %edi xor (28)(%esp), %edi mov (%esp), %eax add %esi, %eax add %edi, %eax addl (44)(%esp), %eax movl (8)(%esp), %esi movl (12)(%esp), %ecx mov %edx, %edi xor %ecx, %edi xor %esi, %ecx and %ecx, %edi xor %esi, %ecx xor %ecx, %edi mov %edx, %esi shrd $(2), %esi, %esi mov %edx, %ecx shrd $(13), %ecx, %ecx xor %ecx, %esi shrd $(9), %ecx, %ecx xor %ecx, %esi lea (%edi,%esi), %edx add %eax, %edx add (16)(%esp), %eax mov %edx, (%esp) mov %eax, (16)(%esp) movl $(48), (48)(%esp) .Lloop_16_63gas_1: add $(64), %ebx vpshufd $(250), %xmm3, %xmm6 vpsrld $(10), %xmm6, %xmm4 vpsrlq $(17), %xmm6, %xmm6 vpxor %xmm6, %xmm4, %xmm4 vpsrlq $(2), %xmm6, %xmm6 vpxor %xmm6, %xmm4, %xmm4 vpshufd $(165), %xmm0, %xmm6 vpsrld $(3), %xmm6, %xmm5 vpsrlq $(7), %xmm6, %xmm6 vpxor %xmm6, %xmm5, %xmm5 vpsrlq $(11), %xmm6, %xmm6 vpxor %xmm6, %xmm5, %xmm5 vpshufd $(80), %xmm0, %xmm7 vpaddd %xmm5, %xmm4, %xmm4 vpshufd $(165), %xmm2, %xmm6 vpaddd %xmm4, %xmm7, %xmm7 vpaddd %xmm6, %xmm7, %xmm7 vpshufd $(160), %xmm7, %xmm6 vpsrld $(10), %xmm6, %xmm4 vpsrlq $(17), %xmm6, %xmm6 vpxor %xmm6, %xmm4, %xmm4 vpsrlq $(2), %xmm6, %xmm6 vpxor %xmm6, %xmm4, %xmm4 vpalignr $(12), %xmm0, %xmm1, %xmm6 vpshufd $(80), %xmm6, %xmm6 vpsrld $(3), %xmm6, %xmm5 vpsrlq $(7), %xmm6, %xmm6 vpxor %xmm6, %xmm5, %xmm5 vpsrlq $(11), %xmm6, %xmm6 vpxor %xmm6, %xmm5, %xmm5 vpalignr $(12), %xmm2, %xmm3, %xmm6 vpshufd $(250), %xmm0, %xmm0 vpaddd %xmm5, %xmm4, %xmm4 vpshufd $(80), %xmm6, %xmm6 vpaddd %xmm4, %xmm0, %xmm0 vpaddd %xmm6, %xmm0, %xmm0 vpshufd $(136), %xmm7, %xmm7 vpshufd $(136), %xmm0, %xmm0 vpalignr $(8), %xmm7, %xmm0, %xmm0 vpaddd (%ebx), %xmm0, %xmm7 vmovdqu %xmm7, (32)(%esp) mov %eax, %esi shrd $(6), %esi, %esi mov %eax, %ecx shrd $(11), %ecx, %ecx xor %ecx, %esi shrd $(14), %ecx, %ecx xor %ecx, %esi mov (20)(%esp), %edi xor (24)(%esp), %edi and %eax, %edi xor (24)(%esp), %edi mov (28)(%esp), %eax add %esi, %eax add %edi, %eax addl (32)(%esp), %eax movl (4)(%esp), %esi movl (8)(%esp), %ecx mov %edx, %edi xor %ecx, %edi xor %esi, %ecx and %ecx, %edi xor %esi, %ecx xor %ecx, %edi mov %edx, %esi shrd $(2), %esi, %esi mov %edx, %ecx shrd $(13), %ecx, %ecx xor %ecx, %esi shrd $(9), %ecx, %ecx xor %ecx, %esi lea (%edi,%esi), %edx add %eax, %edx add (12)(%esp), %eax mov %edx, (28)(%esp) mov %eax, (12)(%esp) mov %eax, %esi shrd $(6), %esi, %esi mov %eax, %ecx shrd $(11), %ecx, %ecx xor %ecx, %esi shrd $(14), %ecx, %ecx xor %ecx, %esi mov (16)(%esp), %edi xor (20)(%esp), %edi and %eax, %edi xor (20)(%esp), %edi mov (24)(%esp), %eax add %esi, %eax add %edi, %eax addl (36)(%esp), %eax movl (%esp), %esi movl (4)(%esp), %ecx mov %edx, %edi xor %ecx, %edi xor %esi, %ecx and %ecx, %edi xor %esi, %ecx xor %ecx, %edi mov %edx, %esi shrd $(2), %esi, %esi mov %edx, %ecx shrd $(13), %ecx, %ecx xor %ecx, %esi shrd $(9), %ecx, %ecx xor %ecx, %esi lea (%edi,%esi), %edx add %eax, %edx add (8)(%esp), %eax mov %edx, (24)(%esp) mov %eax, (8)(%esp) mov %eax, %esi shrd $(6), %esi, %esi mov %eax, %ecx shrd $(11), %ecx, %ecx xor %ecx, %esi shrd $(14), %ecx, %ecx xor %ecx, %esi mov (12)(%esp), %edi xor (16)(%esp), %edi and %eax, %edi xor (16)(%esp), %edi mov (20)(%esp), %eax add %esi, %eax add %edi, %eax addl (40)(%esp), %eax movl (28)(%esp), %esi movl (%esp), %ecx mov %edx, %edi xor %ecx, %edi xor %esi, %ecx and %ecx, %edi xor %esi, %ecx xor %ecx, %edi mov %edx, %esi shrd $(2), %esi, %esi mov %edx, %ecx shrd $(13), %ecx, %ecx xor %ecx, %esi shrd $(9), %ecx, %ecx xor %ecx, %esi lea (%edi,%esi), %edx add %eax, %edx add (4)(%esp), %eax mov %edx, (20)(%esp) mov %eax, (4)(%esp) mov %eax, %esi shrd $(6), %esi, %esi mov %eax, %ecx shrd $(11), %ecx, %ecx xor %ecx, %esi shrd $(14), %ecx, %ecx xor %ecx, %esi mov (8)(%esp), %edi xor (12)(%esp), %edi and %eax, %edi xor (12)(%esp), %edi mov (16)(%esp), %eax add %esi, %eax add %edi, %eax addl (44)(%esp), %eax movl (24)(%esp), %esi movl (28)(%esp), %ecx mov %edx, %edi xor %ecx, %edi xor %esi, %ecx and %ecx, %edi xor %esi, %ecx xor %ecx, %edi mov %edx, %esi shrd $(2), %esi, %esi mov %edx, %ecx shrd $(13), %ecx, %ecx xor %ecx, %esi shrd $(9), %ecx, %ecx xor %ecx, %esi lea (%edi,%esi), %edx add %eax, %edx add (%esp), %eax mov %edx, (16)(%esp) mov %eax, (%esp) vpshufd $(250), %xmm0, %xmm6 vpsrld $(10), %xmm6, %xmm4 vpsrlq $(17), %xmm6, %xmm6 vpxor %xmm6, %xmm4, %xmm4 vpsrlq $(2), %xmm6, %xmm6 vpxor %xmm6, %xmm4, %xmm4 vpshufd $(165), %xmm1, %xmm6 vpsrld $(3), %xmm6, %xmm5 vpsrlq $(7), %xmm6, %xmm6 vpxor %xmm6, %xmm5, %xmm5 vpsrlq $(11), %xmm6, %xmm6 vpxor %xmm6, %xmm5, %xmm5 vpshufd $(80), %xmm1, %xmm7 vpaddd %xmm5, %xmm4, %xmm4 vpshufd $(165), %xmm3, %xmm6 vpaddd %xmm4, %xmm7, %xmm7 vpaddd %xmm6, %xmm7, %xmm7 vpshufd $(160), %xmm7, %xmm6 vpsrld $(10), %xmm6, %xmm4 vpsrlq $(17), %xmm6, %xmm6 vpxor %xmm6, %xmm4, %xmm4 vpsrlq $(2), %xmm6, %xmm6 vpxor %xmm6, %xmm4, %xmm4 vpalignr $(12), %xmm1, %xmm2, %xmm6 vpshufd $(80), %xmm6, %xmm6 vpsrld $(3), %xmm6, %xmm5 vpsrlq $(7), %xmm6, %xmm6 vpxor %xmm6, %xmm5, %xmm5 vpsrlq $(11), %xmm6, %xmm6 vpxor %xmm6, %xmm5, %xmm5 vpalignr $(12), %xmm3, %xmm0, %xmm6 vpshufd $(250), %xmm1, %xmm1 vpaddd %xmm5, %xmm4, %xmm4 vpshufd $(80), %xmm6, %xmm6 vpaddd %xmm4, %xmm1, %xmm1 vpaddd %xmm6, %xmm1, %xmm1 vpshufd $(136), %xmm7, %xmm7 vpshufd $(136), %xmm1, %xmm1 vpalignr $(8), %xmm7, %xmm1, %xmm1 vpaddd (16)(%ebx), %xmm1, %xmm7 vmovdqu %xmm7, (32)(%esp) mov %eax, %esi shrd $(6), %esi, %esi mov %eax, %ecx shrd $(11), %ecx, %ecx xor %ecx, %esi shrd $(14), %ecx, %ecx xor %ecx, %esi mov (4)(%esp), %edi xor (8)(%esp), %edi and %eax, %edi xor (8)(%esp), %edi mov (12)(%esp), %eax add %esi, %eax add %edi, %eax addl (32)(%esp), %eax movl (20)(%esp), %esi movl (24)(%esp), %ecx mov %edx, %edi xor %ecx, %edi xor %esi, %ecx and %ecx, %edi xor %esi, %ecx xor %ecx, %edi mov %edx, %esi shrd $(2), %esi, %esi mov %edx, %ecx shrd $(13), %ecx, %ecx xor %ecx, %esi shrd $(9), %ecx, %ecx xor %ecx, %esi lea (%edi,%esi), %edx add %eax, %edx add (28)(%esp), %eax mov %edx, (12)(%esp) mov %eax, (28)(%esp) mov %eax, %esi shrd $(6), %esi, %esi mov %eax, %ecx shrd $(11), %ecx, %ecx xor %ecx, %esi shrd $(14), %ecx, %ecx xor %ecx, %esi mov (%esp), %edi xor (4)(%esp), %edi and %eax, %edi xor (4)(%esp), %edi mov (8)(%esp), %eax add %esi, %eax add %edi, %eax addl (36)(%esp), %eax movl (16)(%esp), %esi movl (20)(%esp), %ecx mov %edx, %edi xor %ecx, %edi xor %esi, %ecx and %ecx, %edi xor %esi, %ecx xor %ecx, %edi mov %edx, %esi shrd $(2), %esi, %esi mov %edx, %ecx shrd $(13), %ecx, %ecx xor %ecx, %esi shrd $(9), %ecx, %ecx xor %ecx, %esi lea (%edi,%esi), %edx add %eax, %edx add (24)(%esp), %eax mov %edx, (8)(%esp) mov %eax, (24)(%esp) mov %eax, %esi shrd $(6), %esi, %esi mov %eax, %ecx shrd $(11), %ecx, %ecx xor %ecx, %esi shrd $(14), %ecx, %ecx xor %ecx, %esi mov (28)(%esp), %edi xor (%esp), %edi and %eax, %edi xor (%esp), %edi mov (4)(%esp), %eax add %esi, %eax add %edi, %eax addl (40)(%esp), %eax movl (12)(%esp), %esi movl (16)(%esp), %ecx mov %edx, %edi xor %ecx, %edi xor %esi, %ecx and %ecx, %edi xor %esi, %ecx xor %ecx, %edi mov %edx, %esi shrd $(2), %esi, %esi mov %edx, %ecx shrd $(13), %ecx, %ecx xor %ecx, %esi shrd $(9), %ecx, %ecx xor %ecx, %esi lea (%edi,%esi), %edx add %eax, %edx add (20)(%esp), %eax mov %edx, (4)(%esp) mov %eax, (20)(%esp) mov %eax, %esi shrd $(6), %esi, %esi mov %eax, %ecx shrd $(11), %ecx, %ecx xor %ecx, %esi shrd $(14), %ecx, %ecx xor %ecx, %esi mov (24)(%esp), %edi xor (28)(%esp), %edi and %eax, %edi xor (28)(%esp), %edi mov (%esp), %eax add %esi, %eax add %edi, %eax addl (44)(%esp), %eax movl (8)(%esp), %esi movl (12)(%esp), %ecx mov %edx, %edi xor %ecx, %edi xor %esi, %ecx and %ecx, %edi xor %esi, %ecx xor %ecx, %edi mov %edx, %esi shrd $(2), %esi, %esi mov %edx, %ecx shrd $(13), %ecx, %ecx xor %ecx, %esi shrd $(9), %ecx, %ecx xor %ecx, %esi lea (%edi,%esi), %edx add %eax, %edx add (16)(%esp), %eax mov %edx, (%esp) mov %eax, (16)(%esp) vpshufd $(250), %xmm1, %xmm6 vpsrld $(10), %xmm6, %xmm4 vpsrlq $(17), %xmm6, %xmm6 vpxor %xmm6, %xmm4, %xmm4 vpsrlq $(2), %xmm6, %xmm6 vpxor %xmm6, %xmm4, %xmm4 vpshufd $(165), %xmm2, %xmm6 vpsrld $(3), %xmm6, %xmm5 vpsrlq $(7), %xmm6, %xmm6 vpxor %xmm6, %xmm5, %xmm5 vpsrlq $(11), %xmm6, %xmm6 vpxor %xmm6, %xmm5, %xmm5 vpshufd $(80), %xmm2, %xmm7 vpaddd %xmm5, %xmm4, %xmm4 vpshufd $(165), %xmm0, %xmm6 vpaddd %xmm4, %xmm7, %xmm7 vpaddd %xmm6, %xmm7, %xmm7 vpshufd $(160), %xmm7, %xmm6 vpsrld $(10), %xmm6, %xmm4 vpsrlq $(17), %xmm6, %xmm6 vpxor %xmm6, %xmm4, %xmm4 vpsrlq $(2), %xmm6, %xmm6 vpxor %xmm6, %xmm4, %xmm4 vpalignr $(12), %xmm2, %xmm3, %xmm6 vpshufd $(80), %xmm6, %xmm6 vpsrld $(3), %xmm6, %xmm5 vpsrlq $(7), %xmm6, %xmm6 vpxor %xmm6, %xmm5, %xmm5 vpsrlq $(11), %xmm6, %xmm6 vpxor %xmm6, %xmm5, %xmm5 vpalignr $(12), %xmm0, %xmm1, %xmm6 vpshufd $(250), %xmm2, %xmm2 vpaddd %xmm5, %xmm4, %xmm4 vpshufd $(80), %xmm6, %xmm6 vpaddd %xmm4, %xmm2, %xmm2 vpaddd %xmm6, %xmm2, %xmm2 vpshufd $(136), %xmm7, %xmm7 vpshufd $(136), %xmm2, %xmm2 vpalignr $(8), %xmm7, %xmm2, %xmm2 vpaddd (32)(%ebx), %xmm2, %xmm7 vmovdqu %xmm7, (32)(%esp) mov %eax, %esi shrd $(6), %esi, %esi mov %eax, %ecx shrd $(11), %ecx, %ecx xor %ecx, %esi shrd $(14), %ecx, %ecx xor %ecx, %esi mov (20)(%esp), %edi xor (24)(%esp), %edi and %eax, %edi xor (24)(%esp), %edi mov (28)(%esp), %eax add %esi, %eax add %edi, %eax addl (32)(%esp), %eax movl (4)(%esp), %esi movl (8)(%esp), %ecx mov %edx, %edi xor %ecx, %edi xor %esi, %ecx and %ecx, %edi xor %esi, %ecx xor %ecx, %edi mov %edx, %esi shrd $(2), %esi, %esi mov %edx, %ecx shrd $(13), %ecx, %ecx xor %ecx, %esi shrd $(9), %ecx, %ecx xor %ecx, %esi lea (%edi,%esi), %edx add %eax, %edx add (12)(%esp), %eax mov %edx, (28)(%esp) mov %eax, (12)(%esp) mov %eax, %esi shrd $(6), %esi, %esi mov %eax, %ecx shrd $(11), %ecx, %ecx xor %ecx, %esi shrd $(14), %ecx, %ecx xor %ecx, %esi mov (16)(%esp), %edi xor (20)(%esp), %edi and %eax, %edi xor (20)(%esp), %edi mov (24)(%esp), %eax add %esi, %eax add %edi, %eax addl (36)(%esp), %eax movl (%esp), %esi movl (4)(%esp), %ecx mov %edx, %edi xor %ecx, %edi xor %esi, %ecx and %ecx, %edi xor %esi, %ecx xor %ecx, %edi mov %edx, %esi shrd $(2), %esi, %esi mov %edx, %ecx shrd $(13), %ecx, %ecx xor %ecx, %esi shrd $(9), %ecx, %ecx xor %ecx, %esi lea (%edi,%esi), %edx add %eax, %edx add (8)(%esp), %eax mov %edx, (24)(%esp) mov %eax, (8)(%esp) mov %eax, %esi shrd $(6), %esi, %esi mov %eax, %ecx shrd $(11), %ecx, %ecx xor %ecx, %esi shrd $(14), %ecx, %ecx xor %ecx, %esi mov (12)(%esp), %edi xor (16)(%esp), %edi and %eax, %edi xor (16)(%esp), %edi mov (20)(%esp), %eax add %esi, %eax add %edi, %eax addl (40)(%esp), %eax movl (28)(%esp), %esi movl (%esp), %ecx mov %edx, %edi xor %ecx, %edi xor %esi, %ecx and %ecx, %edi xor %esi, %ecx xor %ecx, %edi mov %edx, %esi shrd $(2), %esi, %esi mov %edx, %ecx shrd $(13), %ecx, %ecx xor %ecx, %esi shrd $(9), %ecx, %ecx xor %ecx, %esi lea (%edi,%esi), %edx add %eax, %edx add (4)(%esp), %eax mov %edx, (20)(%esp) mov %eax, (4)(%esp) mov %eax, %esi shrd $(6), %esi, %esi mov %eax, %ecx shrd $(11), %ecx, %ecx xor %ecx, %esi shrd $(14), %ecx, %ecx xor %ecx, %esi mov (8)(%esp), %edi xor (12)(%esp), %edi and %eax, %edi xor (12)(%esp), %edi mov (16)(%esp), %eax add %esi, %eax add %edi, %eax addl (44)(%esp), %eax movl (24)(%esp), %esi movl (28)(%esp), %ecx mov %edx, %edi xor %ecx, %edi xor %esi, %ecx and %ecx, %edi xor %esi, %ecx xor %ecx, %edi mov %edx, %esi shrd $(2), %esi, %esi mov %edx, %ecx shrd $(13), %ecx, %ecx xor %ecx, %esi shrd $(9), %ecx, %ecx xor %ecx, %esi lea (%edi,%esi), %edx add %eax, %edx add (%esp), %eax mov %edx, (16)(%esp) mov %eax, (%esp) vpshufd $(250), %xmm2, %xmm6 vpsrld $(10), %xmm6, %xmm4 vpsrlq $(17), %xmm6, %xmm6 vpxor %xmm6, %xmm4, %xmm4 vpsrlq $(2), %xmm6, %xmm6 vpxor %xmm6, %xmm4, %xmm4 vpshufd $(165), %xmm3, %xmm6 vpsrld $(3), %xmm6, %xmm5 vpsrlq $(7), %xmm6, %xmm6 vpxor %xmm6, %xmm5, %xmm5 vpsrlq $(11), %xmm6, %xmm6 vpxor %xmm6, %xmm5, %xmm5 vpshufd $(80), %xmm3, %xmm7 vpaddd %xmm5, %xmm4, %xmm4 vpshufd $(165), %xmm1, %xmm6 vpaddd %xmm4, %xmm7, %xmm7 vpaddd %xmm6, %xmm7, %xmm7 vpshufd $(160), %xmm7, %xmm6 vpsrld $(10), %xmm6, %xmm4 vpsrlq $(17), %xmm6, %xmm6 vpxor %xmm6, %xmm4, %xmm4 vpsrlq $(2), %xmm6, %xmm6 vpxor %xmm6, %xmm4, %xmm4 vpalignr $(12), %xmm3, %xmm0, %xmm6 vpshufd $(80), %xmm6, %xmm6 vpsrld $(3), %xmm6, %xmm5 vpsrlq $(7), %xmm6, %xmm6 vpxor %xmm6, %xmm5, %xmm5 vpsrlq $(11), %xmm6, %xmm6 vpxor %xmm6, %xmm5, %xmm5 vpalignr $(12), %xmm1, %xmm2, %xmm6 vpshufd $(250), %xmm3, %xmm3 vpaddd %xmm5, %xmm4, %xmm4 vpshufd $(80), %xmm6, %xmm6 vpaddd %xmm4, %xmm3, %xmm3 vpaddd %xmm6, %xmm3, %xmm3 vpshufd $(136), %xmm7, %xmm7 vpshufd $(136), %xmm3, %xmm3 vpalignr $(8), %xmm7, %xmm3, %xmm3 vpaddd (48)(%ebx), %xmm3, %xmm7 vmovdqu %xmm7, (32)(%esp) mov %eax, %esi shrd $(6), %esi, %esi mov %eax, %ecx shrd $(11), %ecx, %ecx xor %ecx, %esi shrd $(14), %ecx, %ecx xor %ecx, %esi mov (4)(%esp), %edi xor (8)(%esp), %edi and %eax, %edi xor (8)(%esp), %edi mov (12)(%esp), %eax add %esi, %eax add %edi, %eax addl (32)(%esp), %eax movl (20)(%esp), %esi movl (24)(%esp), %ecx mov %edx, %edi xor %ecx, %edi xor %esi, %ecx and %ecx, %edi xor %esi, %ecx xor %ecx, %edi mov %edx, %esi shrd $(2), %esi, %esi mov %edx, %ecx shrd $(13), %ecx, %ecx xor %ecx, %esi shrd $(9), %ecx, %ecx xor %ecx, %esi lea (%edi,%esi), %edx add %eax, %edx add (28)(%esp), %eax mov %edx, (12)(%esp) mov %eax, (28)(%esp) mov %eax, %esi shrd $(6), %esi, %esi mov %eax, %ecx shrd $(11), %ecx, %ecx xor %ecx, %esi shrd $(14), %ecx, %ecx xor %ecx, %esi mov (%esp), %edi xor (4)(%esp), %edi and %eax, %edi xor (4)(%esp), %edi mov (8)(%esp), %eax add %esi, %eax add %edi, %eax addl (36)(%esp), %eax movl (16)(%esp), %esi movl (20)(%esp), %ecx mov %edx, %edi xor %ecx, %edi xor %esi, %ecx and %ecx, %edi xor %esi, %ecx xor %ecx, %edi mov %edx, %esi shrd $(2), %esi, %esi mov %edx, %ecx shrd $(13), %ecx, %ecx xor %ecx, %esi shrd $(9), %ecx, %ecx xor %ecx, %esi lea (%edi,%esi), %edx add %eax, %edx add (24)(%esp), %eax mov %edx, (8)(%esp) mov %eax, (24)(%esp) mov %eax, %esi shrd $(6), %esi, %esi mov %eax, %ecx shrd $(11), %ecx, %ecx xor %ecx, %esi shrd $(14), %ecx, %ecx xor %ecx, %esi mov (28)(%esp), %edi xor (%esp), %edi and %eax, %edi xor (%esp), %edi mov (4)(%esp), %eax add %esi, %eax add %edi, %eax addl (40)(%esp), %eax movl (12)(%esp), %esi movl (16)(%esp), %ecx mov %edx, %edi xor %ecx, %edi xor %esi, %ecx and %ecx, %edi xor %esi, %ecx xor %ecx, %edi mov %edx, %esi shrd $(2), %esi, %esi mov %edx, %ecx shrd $(13), %ecx, %ecx xor %ecx, %esi shrd $(9), %ecx, %ecx xor %ecx, %esi lea (%edi,%esi), %edx add %eax, %edx add (20)(%esp), %eax mov %edx, (4)(%esp) mov %eax, (20)(%esp) mov %eax, %esi shrd $(6), %esi, %esi mov %eax, %ecx shrd $(11), %ecx, %ecx xor %ecx, %esi shrd $(14), %ecx, %ecx xor %ecx, %esi mov (24)(%esp), %edi xor (28)(%esp), %edi and %eax, %edi xor (28)(%esp), %edi mov (%esp), %eax add %esi, %eax add %edi, %eax addl (44)(%esp), %eax movl (8)(%esp), %esi movl (12)(%esp), %ecx mov %edx, %edi xor %ecx, %edi xor %esi, %ecx and %ecx, %edi xor %esi, %ecx xor %ecx, %edi mov %edx, %esi shrd $(2), %esi, %esi mov %edx, %ecx shrd $(13), %ecx, %ecx xor %ecx, %esi shrd $(9), %ecx, %ecx xor %ecx, %esi lea (%edi,%esi), %edx add %eax, %edx add (16)(%esp), %eax mov %edx, (%esp) mov %eax, (16)(%esp) subl $(16), (48)(%esp) jg .Lloop_16_63gas_1 movl (8)(%ebp), %eax vmovdqu (%esp), %xmm0 vmovdqu (16)(%esp), %xmm1 vmovdqu (%eax), %xmm7 vpaddd %xmm0, %xmm7, %xmm7 vmovdqu %xmm7, (%eax) vmovdqu (16)(%eax), %xmm7 vpaddd %xmm1, %xmm7, %xmm7 vmovdqu %xmm7, (16)(%eax) addl $(64), (12)(%ebp) subl $(64), (16)(%ebp) jg .Lsha256_block_loopgas_1 add $(52), %esp pop %edi pop %esi pop %ebx pop %ebp ret .Lfe1: .size h9_UpdateSHA256, .Lfe1-(h9_UpdateSHA256)
32.056228
80
0.367837
[ "Apache-2.0" ]
idesai/ipp-crypto
sources/ippcp/asm_ia32_gas_converted/linux/pic/h9/merged/pcpsha256g9as.asm
45,039
Assembly
; A170119: Number of reduced words of length n in Coxeter group on 14 generators S_i with relations (S_i)^2 = (S_i S_j)^38 = I. ; 1,14,182,2366,30758,399854,5198102,67575326,878479238,11420230094,148462991222,1930018885886,25090245516518,326173191714734,4240251492291542,55123269399790046,716602502197270598 add $0,1 mov $3,1 lpb $0 sub $0,1 add $2,$3 div $3,$2 mul $2,13 lpe mov $0,$2 div $0,13
28.928571
179
0.748148
[ "Apache-2.0" ]
ckrause/loda-programs
oeis/170/A170119.asm
405
Assembly
; A125168: a(n) = gcd(n, A032741(n)) where A032741(n) is the number of proper divisors of n. ; 1,1,1,2,1,3,1,1,1,1,1,1,1,1,3,4,1,1,1,5,3,1,1,1,1,1,3,1,1,1,1,1,3,1,1,4,1,1,3,1,1,7,1,1,5,1,1,3,1,5,3,1,1,1,1,7,3,1,1,1,1,1,1,2,1,1,1,1,3,7,1,1,1,1,5,1,1,1,1,1,1,1,1,1,1,1,3,1,1,1,1,1,3,1,1,1,1,1,1,4,1,1,1,1,7,1,1,1,1,1,3,1,1,1,1,1,1,1,1,15,1,1,3,1,1,1,1,1,3,1,1,11,1,1,1,1,1,1,1,1,3,1,1,2,1,1,1,1,1,1,1,1,1,7,1,1,1,1,3,1,1,9,1,1,1,1,1,3,1,1,1,1,1,1,5,1,3,1,1,1,1,7,3,1,1,1,1,1,7,1,1,1,1,1,1,4,1,11,1,1,3,1,1,1,1,1,1,1,1,15,1,1,3,1,1,3,1,1,3,11,1,1,1,1,1,1,1,1,1,1,7,1,1,1,1,1,3,7,1,1,1,1,1,1,5,1,1,1,3,1 mov $2,1 add $2,$0 cal $0,5 ; d(n) (also called tau(n) or sigma_0(n)), the number of divisors of n. sub $0,1 gcd $0,$2 add $0,7 mov $1,$0 sub $1,7
62.333333
506
0.544118
[ "Apache-2.0" ]
karttu/loda
programs/oeis/125/A125168.asm
748
Assembly
.MACRO LKS_Clear_RAM /* ldy #$0000 sty 0 ldx #$0000 -: sty 0,x inx inx sty 0,x inx inx cpx #$2000 bne - */ rep #$20 lda #0 ldx #$00 -: sta $7E0000,x inx inx sta $7E0000,x inx inx cpx #$8000 bne - sep #$20 .ENDM .MACRO LKS_Clear_VRAM SNES_VMADD $0000 ldy #$0000 ldx #0 -: sty VMDATAL sty VMDATAL sty VMDATAL sty VMDATAL sty VMDATAL sty VMDATAL sty VMDATAL sty VMDATAL inx sty VMDATAL sty VMDATAL sty VMDATAL sty VMDATAL sty VMDATAL sty VMDATAL sty VMDATAL sty VMDATAL inx cpx #$1000 bne - .ENDM .MACRO LKS_Clear_OAM SNES_OAMADDL $0000 ldy #$0000 sty $0000 ldx #$0000 -: sty $0000,x inx cpx #$110 bne - .ENDM
8.633333
21
0.561133
[ "MIT" ]
Kannagi/Super-Kannagi-Sound
LKS/MC_Clear.asm
777
Assembly
; A024442: Expansion of 1/((1-x)(1-7x)(1-9x)(1-11x)). ; Submitted by Jon Maiga ; 1,28,518,7988,111279,1454376,18208156,221140696,2626932077,30692791844,354119115714,4046102802924,45880411771195,517157095113232,5801772397167992,64842434348911472,722511991410929433 add $0,2 lpb $0 sub $0,1 add $2,1 mul $2,7 mul $3,11 add $3,$1 mul $1,9 add $1,$2 lpe mov $0,$3 div $0,7
22.588235
184
0.713542
[ "Apache-2.0" ]
ckrause/loda-programs
oeis/024/A024442.asm
384
Assembly
; A004495: Tersum n + 6. ; 6,7,8,0,1,2,3,4,5,15,16,17,9,10,11,12,13,14,24,25,26,18,19,20,21,22,23,33,34,35,27,28,29,30,31,32,42,43,44,36,37,38,39,40,41,51,52,53,45,46,47,48,49,50,60,61,62,54 mov $3,$0 mod $0,9 mov $1,896 add $1,$3 mov $2,7 lpb $0,1 mov $0,2 sub $1,$2 sub $1,2 lpe sub $1,890
19.933333
165
0.595318
[ "Apache-2.0" ]
karttu/loda
programs/oeis/004/A004495.asm
299
Assembly
#---------------------------------------data# .data #---------------------------------------word# arraySize : .word 10 givenArray : .word 0 3 2 5 1 8 7 9 4 6 #---------------------------------------asciiz# filename : .asciiz "\nBubbleSort.asm\n" description : .asciiz "Sorts the given integers in increasing order as bubble sort algorithm.\n" newline : .asciiz "\n" space : .asciiz " " unsorted : .asciiz "Unsorted array : " sorted : .asciiz "Sorted array : " #---------------------------------------text# .text #---------------------------------------globl# .globl main3 #---------------------------------------label# main3 : la $a0, filename # a0 = filename li $v0, 4 # print string syscall # syscall la $a0, description # a0 = description li $v0, 4 # print string syscall # syscall la $a0, unsorted # a0 = unsorted li $v0, 4 # print string syscall # syscall lw $s0, arraySize # s0 = array size la $t0, givenArray # t0 = given array [0] add $t1, $zero, $zero # t1 = 0 jal printArray la $a0, newline # a0 = newline li $v0, 4 # print string syscall # syscall lw $s0, arraySize # s0 = array size la $a0, givenArray # a0 = given array [0] add $t0, $zero, $zero # t0 = 0 addi $a1, $s0, 1 # a1 = s0 + 1 jal bubbleSort # procedure call bubbleSort la $a0, sorted # a0 = sorted li $v0, 4 # print string syscall # syscall lw $s0, arraySize # s0 = array size la $t0, givenArray # t0 = given array [0] add $t1, $zero, $zero # t1 = 0 jal printArray la $a0, newline # a0 = newline li $v0, 4 # print string syscall # syscall #---------------------------------------label# exit : li $v0, 10 # exit syscall # syscall #---------------------------------------procedure# printArray : lw $a0, 0($t0) # a0 = t0[0] li $v0, 1 # print int syscall # syscall la $a0, space # a0 = space li $v0, 4 # print string syscall # syscall addi $t0, $t0, 4 # t0+=4 addi $t1, $t1, 1 # t1++ bne $s0, $t1, printArray # go back print array endPrint : jr $ra bubbleSort : add $t0, $zero, $zero # t0 = 0 outerLoop : addi $t0, $t0, 1 # t0++ bgt $t0, $a1, endProcedure # if (t0 > a1) then ends procedure add $t1, $a1, $zero # t1 = a1 innerLoop : bge $t0, $t1, outerLoop # if (t0 >= t1) then outer loop # NOTE : that means these are already ordered addi $t1, $t1, -1 # t1-- mul $t4, $t1, 4 # t4 = t1 * 4 array [t1] addi $t3, $t4, -4 # t3 = t4 - 4 array [t1-1] add $t7, $t4, $a0 # t7 = t4 + a0 array [t1] add $t8, $t3, $a0 # t8 = t3 + a0 array [t1-1] lw $t5, 0($t7) # t5 = t7 [0] array [t1] lw $t6, 0($t8) # t6 = t8 [0] array [t1-1] bgt $t5, $t6, innerLoop # if (t6 > t5) then inner loop sw $t5, 0($t8) # t7 [0] = t5 array [t1-1] sw $t6, 0($t7) # t8 [0] = t6 array [t1] j innerLoop # go back loop 2 endProcedure: jr $ra # end of the procedure, returns where does the program remain
26.324138
92
0.403982
[ "MIT" ]
seydanurdemir/cpp-builder-vcl-components-examples
FileContentForm/AsmFiles/CSE312_HW1_121044042/BubbleSort.asm
3,817
Assembly
TITLE HELP - Loader for DOS Online Help ;*** ;HELP - Load QBASIC.EXE with /QHELP switch to start DOS Help Viewer ; ; Copyright (C) 1990, Microsoft Corporation ; ;Purpose: ; This file implements HELP.COM. The purpose of this com file ; is to invoke QBASIC.EXE with the /QHELP switch, passing on all ; other command line options ; ;******************************************************************************* ; ; (a-emoryh) ; WARNING - '/QHELP' switch MUST be first switch on cmdline, or else ; multi-word topics will be broken. ; Stack_Size = 256 ; size of stack in bytes Path_Size = 128 ; max size of path + filename of QBASIC Max_CmdTail = 73 ; max size of program options after /QHELP OldCmdLine = 80h ; DS:OldCmdLine = ptr to QHELP command line EnvSeg = 2ch ; DS:EnvSeg = ptr to QHELP environment code SEGMENT PARA PUBLIC 'CODE' ASSUME cs:code, ds:code, es:code, ss:code ORG 0100h help: mov bx, offset TopOfStack ; BX = ptr to top of stack (end of mem) mov sp,bx ; move stack to perminent memory add bx,000fh ; round up to units of paragraphs shr bx,1 shr bx,1 shr bx,1 shr bx,1 ; BX = # paragraphs of memory mov ah,4ah ; modify memory block int 21h mov dx, offset ErrART ; assume an error jnc @F GiveError_Near: jmp GiveError ; brif error @@: ; set up the parameter block mov ax,cs mov [PB_CmdLineSeg],ax ; set the segment of the command line ; set up the command line mov al, ds:[OldCmdLine] ; al = length of old command line cmp al, Max_CmdTail ; is the command line too long mov dx, offset ErrCmd ; assume so, prepare error ja GiveError_Near ; brif too long cbw ; zero extend ax (cant be > 80) mov cx, ax ; save in cx inc cx ; also copy over 0D terminator add ax, CmdTail-CmdLine ; ax = length of new command line mov [CmdLine],al ; and save it mov si, offset OldCmdLine+1 ; DS:SI = ptr to old command line mov di, offset CmdTail ; DS:DI = ptr to new command line rep movsb ; and copy it over ; set up the program name mov ax, ds:[EnvSeg] ; ax = segment of environment mov es, ax xor di, di ; ES:DI = ptr to environment xor ax, ax ; look for a zero mov pszPATH,-1 ; indicate that no PATH found LocateFname: mov cx, cbPATH ; length of 'PATH=' mov si, offset stPATH ; see if this is the PATH specification repe cmpsb jne NotPath ; brif not PATH mov pszPATH, di ; EnvSeg:pszPATH = ptr to PATH data NotPath: dec di ; back up a character mov cx, 8000h ; scan a long way for a 0 if needed repne scasb ; skip an environment string cmp es:[di],al ; is next byte a null? jne LocateFname ; not double null term, keep looking inc di ; skip last null scasw ; skip word containing 1h mov si, di ; ES:SI = ptr to HELP path & name mov di, offset ProgName ; DS:DI = ptr to QBASIC path & name push es pop ds ; DS:SI = ptr to HELP path & name push cs pop es ; ES:DI = ptr to QBASIC path & name mov ah,30h ; get version number int 21h ; are we in DOS 3 or above? mov bx,di ; CS:BX = ptr to first char in HELP ; name as it is copied over cmp al,3 jb HavePath ; brif not DOS 3 or above, no path CopyName: lodsb ; grab a byte stosb ; and store it cmp al,'\' ; is it a slash je PathChar ; go remember it cmp al,'/' ; or this slash je PathChar ; go remember it cmp al,':' ; or a colon jne TestTerminator ; brif not PathChar: mov bx,di ; set last path character found TestTerminator: or al,al ; 0 terminator? jnz CopyName ; brif not, more characters to do HavePath: push cs pop ds ; restore ES = DS = CS cmp bx, offset ProgName ; does it have any path? jne @F ; brif so mov fCurDir,1 ; else flag cur directory tried @@: mov di, bx ; ES:DI = ptr to end of HELP path mov si, offset szQBASIC ; DS:SI = ptr to new file name mov cx, cbQBASIC ; CX = # characters rep movsb ; and copy it over ; all set up, lets go exec the program mov dx, offset ProgName mov bx, offset ParmBlock mov ax, 4b00h int 21h ; Exec program jnc GetRetCode ; brif ok mov dx,offset ErrOM cmp ax,8 ; is it out of memory? jne TryPathSearch ; brif not, assume file not found GiveError: push cs ; set DS=code segment (for error) pop ds mov ah,9 int 21h ; print error message mov ax,4cffh ; terminate program, return code FF int 21h ;Does not return GetRetCode: mov ah,4dh int 21h ; al = return code of previous prog mov ah,4ch int 21h ; exit with return code in al ;Does not return ; We could not load QBASIC from the directory that HELP was located in. ; We will now try the directories in the PATH. TryPathSearch: cmp fCurDir,0 ; have we looked in current dir? mov bx, offset ProgName ; assume not, setup to try with no path jz HavePath ; brif not, go try it. mov dx, offset ErrFNF ; prepare for error mov ax, cs:[EnvSeg] ; ax = segment of environment mov ds, ax mov si, cs:pszPATH ; DS:SI = ptr to PATH data cmp si,-1 ; was there a PATH env variable? je GiveError ; brif not, give File Not Found push cs pop es mov di, offset ProgName ; ES:DI = buffer to construct filename NextPathChar: lodsb ; get a character of a path stosb ; save character cmp al,';' ; end of path? je PathEnd ; brif so or al,al ; end of string jne NextPathChar ; brif not mov si,-1 ; indicate no more path PathEnd: mov cs:pszPATH,si ; set up pointer for next iteration dec di ; back up over the ';' or 0 terminator mov al,'\' ; look for a back slash cmp byte ptr es:[di-1],al ; does it end in a backslash? je HaveFullPath ; brif so cmp byte ptr es:[di-1],'/' ; or does it end in a forward slash? je HaveFullPath ; brif so stosb ; else, add it HaveFullPath: mov bx, di ; CS:BX = ptr to where to fill in name jmp HavePath ErrOM db 'Out of memory$' ErrFNF db 'Can not find file QBASIC.EXE$' ErrART db 'DOS memory-arena error$' ErrCMD db 'Command line too long$' szQBASIC db 'QBASIC.EXE', 0 cbQBASIC = $ - szQBASIC stPATH db 'PATH=' cbPATH = $ - stPATH pszPATH dw ? ; near ptr to PATH data fCurDir db 0 ; have we looked in the current dir? ParmBlock dw 0 ; use HELPs environment dw offset CmdLine ; offset of command line PB_CmdLineSeg dw 0 ; segment of command line dd -1 ; use default for FCB 1 dd -1 ; use default for FCB 2 ; NOTE: The command tail, program name, and stack do not have any ; NOTE: representation in this file. They are allocated after the ; NOTE: command line in the memory that DOS allocates for us. This ; NOTE: allows the COM file to be only 1 sector in size, thus saving ; NOTE: disk space. CmdLine db 0 ; length of command line db '/QHELP ' ; static part of command line CmdTail db 0 ; user specified part of command line ProgName = CmdTail + Max_CmdTail -1; program to exec TopOfStack = ProgName + Path_Size + Stack_Size ; Top of stack = end of mem code ENDS END help
28.295082
80
0.677144
[ "Apache-2.0" ]
minblock/msdos
45/qb5/ir/help.asm
6,904
Assembly
arch pce.cpu origin $88f1; jsr $896A jsr $896A jsr $896A nop nop done: rts
9.9
13
0.545455
[ "MIT" ]
konkers/neutopia
rando/src/asm/text-speedup.asm
99
Assembly
; A169727: a(n) = 3*(2^(n+1)-2)*(2^(n+1)-1) + 1. ; 1,19,127,631,2791,11719,48007,194311,781831,3136519,12564487,50294791,201252871,805158919,3220930567,12884312071,51538427911,206156070919,824629002247,3298525446151,13194120658951,52776520384519,211106157035527,844424779137031,3377699418537991 mov $1,2 pow $1,$0 sub $1,1 mul $1,6 mov $2,$1 add $1,3 mul $1,$2 add $1,3 div $1,3
29.230769
245
0.744737
[ "Apache-2.0" ]
jmorken/loda
programs/oeis/169/A169727.asm
380
Assembly
INCLUDE "hardware.inc" INCLUDE "macros.inc" DEF STATUS_BAR_TILE_OFFSET EQUS "(((StatusBarVRAM - $8800) / 16) + 128)" DEF MENUBAR_TILE_OFFSET EQUS "(((MenuBarTilesVRAM - $8800) / 16) + 128)" DEF NUMBER_TILE_OFFSET EQUS "(((MenuBarNumbersVRAM - $8800) / 16) + 128)" DEF MENU_BAR_ANIM_SPEED EQU 3 ; How fast the menu bar opens / closes. Pixels per frame. DEF PAUSE_MID_POS EQU 64 ; Scanline number of the middle of the menu bar DEF PAUSE_TOP_LINE EQU 64 - 24 DEF PAUSE_BOTTOM_LINE EQU 64 + 24 DEF PAUSE_MENU_OPTION_1_POS EQU 64 DEF PAUSE_MENU_OPTION_2_POS EQU 64 + 8 DEF GAMEOVER_MID_POS EQU 68 DEF GAMEOVER_TOP_LINE EQU 32 DEF GAMEOVER_BOTTOM_LINE EQU 104 DEF GAMEOVER_MENU_OPTION_1_POS EQU 56 DEF GAMEOVER_MENU_OPTION_2_POS EQU 56 + 8 SECTION "StatusBarBuffer", WRAM0, ALIGN[6] DS 20 * 2 ; 20 tiles wide * 2 tiles tall SECTION "MenuBarState", WRAM0 menuBarTopLine: DS 1 ; Scanline of the top of the menu bar menuBarBottomLine: DS 1 ; Scanline of the bottom of the menu bar menuBarTargetTop: DS 1 menuBarTargetBottom: DS 1 menuBarCurrentMidPos: DS 1 menuOption1Pos: DS 1 menuOption2Pos: DS 1 whichMenuOpen: DS 1 ; 0 = Pause Menu, nonzero = Game Over menuBarState: DS 1 ; 0 = growing, nonzero = shrinking menuBarDoneAnim: DS 1 ; 0 = still animating, menu functionality is disabled, nonzero = menu is ready menuOptionSelected: DS 1 ; 0 = option 1, 1 = option 2 SECTION "In-Game UI Code", ROM0 ; Initialise the starting state of game UI ; Sets - A to garbage initGameUI:: ; Load in status bar tiles that never change ld a, STATUS_BAR_TILE_OFFSET + 11 ; dollar sign ld [STARTOF("StatusBarBuffer")], a ld a, STATUS_BAR_TILE_OFFSET + 27 ld [STARTOF("StatusBarBuffer") + 20], a ld a, STATUS_BAR_TILE_OFFSET + 26 ; blank space to left of missile ld [STARTOF("StatusBarBuffer") + 20 + 11], a ld [STARTOF("StatusBarBuffer") + 20 + 14], a ; blank space to left of speed ld a, STATUS_BAR_TILE_OFFSET + 10 ld [STARTOF("StatusBarBuffer") + 14], a ld [STARTOF("StatusBarBuffer") + 18], a ; blank space at top right ld a, STATUS_BAR_TILE_OFFSET + 60 ld [STARTOF("StatusBarBuffer") + 19], a ld a, STATUS_BAR_TILE_OFFSET + 58 ; km / h ld [STARTOF("StatusBarBuffer") + 20 + 18], a inc a ld [STARTOF("StatusBarBuffer") + 20 + 19], a ret ; Generates the tilemaps for the Paused and Game Over menus, and puts them in the BG map ; Assumes VRAM is always active, so needs to be run while screen is disabled genMenuBarTilemaps:: rom_bank_switch BANK("MenuBarTilemap") ld de, STARTOF("MenuBarTilemap") ld b, MENUBAR_TILE_OFFSET FOR N, 0, 15 ld hl, _SCRN1 + (32 * (15 + N)) ld c, 20 rst memcpyFastOffset ENDR ret ; Updates the status bar state, and puts it into StatusBarBuffer ; Sets - A B C D E H L to garbage updateStatusBar:: ; Draw status bar ; HL = top line pointer ; BC = bottom line pointer rom_bank_switch BANK("CurveBarTilemap") ld hl, STARTOF("StatusBarBuffer") + 1 ; + 1 to skip past dollar sign ld bc, STARTOF("StatusBarBuffer") + 1 + 20 ; Draw money FOR N, 1, -1, -1 ; run this for MoneyAmount + 1 and MoneyAmount ld a, [MoneyAmount + N] ld d, a swap a and $0F add STATUS_BAR_TILE_OFFSET ld [hli], a ; digit 1 top add 16 ld [bc], a ; digit 1 bottom inc c ; never changes pages, so "inc c" works instead of "inc bc" ld a, d and $0F add STATUS_BAR_TILE_OFFSET ld [hli], a ; digit 2 top add 16 ld [bc], a ; digit 2 bottom inc c ENDR ; Draw curved part of charge bars ld a, [SpecialChargeValue] and %00000011 sla a sla a ld d, a ld a, [MissileChargeValue] and %00000011 or a, d ; bottom 2 bits = on/off state of 2 curved bars for missile, 2 bits above = state for special sla a ; each entry is 4 bytes sla a ld de, STARTOF("CurveBarTilemap") ; \ add e ; | ld de with CurveBarTilemap + offset ld e, a ; / ld a, [de] add STATUS_BAR_TILE_OFFSET ld [hli], a inc e ld a, [de] add STATUS_BAR_TILE_OFFSET ld [hli], a inc e ld a, [de] add STATUS_BAR_TILE_OFFSET ld [bc], a inc e inc c ld a, [de] add STATUS_BAR_TILE_OFFSET ld [bc], a inc c ; Draw straight part of charge bars ld d, %00000100 .drawStraightBarsLp: ld a, [MissileChargeValue] and d jr nz, .missileOn ld a, [SpecialChargeValue] and d jr nz, .missileOffSpecialOn .missileOffSpecialOff: ld a, STATUS_BAR_TILE_OFFSET + 41 ld [hli], a jr .doneDrawStraightBlock .missileOffSpecialOn: ld a, STATUS_BAR_TILE_OFFSET + 40 ld [hli], a jr .doneDrawStraightBlock .missileOn: ld a, [SpecialChargeValue] and d jr nz, .missileOnSpecialOn .missileOnSpecialOff: ld a, STATUS_BAR_TILE_OFFSET + 39 ld [hli], a jr .doneDrawStraightBlock .missileOnSpecialOn: ld a, STATUS_BAR_TILE_OFFSET + 38 ld [hli], a .doneDrawStraightBlock: sla d bit 6, d jr z, .drawStraightBarsLp ; Draw hearts ld a, [LivesValue] ld d, a REPT 4 dec d bit 7, d ; if result is negative jr z, .filledHeart\@ ld a, STATUS_BAR_TILE_OFFSET + 55 ; empty heart jr .drawHeart\@ .filledHeart\@: ld a, STATUS_BAR_TILE_OFFSET + 54 .drawHeart\@: ld [bc], a inc c ENDR inc c ; skip past already filled block ; Draw special / missile icons and lines ld a, [MissileChargeValue] and %00100000 jr nz, .missileOn2 ld a, [SpecialChargeValue] and %00100000 jr nz, .missileOffSpecialOn2 .missileOffSpecialOff2: ld a, STATUS_BAR_TILE_OFFSET + 12 ; top line ld [hli], a ld a, STATUS_BAR_TILE_OFFSET + 42 ld [hli], a inc a ld [hli], a ld a, STATUS_BAR_TILE_OFFSET + 46 ; bottom line ld [bc], a inc c inc a ld [bc], a inc c jr .doneDrawIcons .missileOffSpecialOn2: ld a, STATUS_BAR_TILE_OFFSET + 28 ; top line ld [hli], a ld a, STATUS_BAR_TILE_OFFSET + 45 ld [hli], a ld a, STATUS_BAR_TILE_OFFSET + 43 ld [hli], a ld a, STATUS_BAR_TILE_OFFSET + 30 ; bottom line ld [bc], a inc c ld a, STATUS_BAR_TILE_OFFSET + 47 ld [bc], a inc c jr .doneDrawIcons .missileOn2: ld a, [SpecialChargeValue] and %00100000 jr nz, .missileOnSpecialOn2 .missileOnSpecialOff2: ld a, STATUS_BAR_TILE_OFFSET + 13 ; top line ld [hli], a ld a, STATUS_BAR_TILE_OFFSET + 44 ld [hli], a ld a, STATUS_BAR_TILE_OFFSET + 15 ld [hli], a ld a, STATUS_BAR_TILE_OFFSET + 46 ; bottom line ld [bc], a inc c ld a, STATUS_BAR_TILE_OFFSET + 31 ld [bc], a inc c jr .doneDrawIcons .missileOnSpecialOn2: ld a, STATUS_BAR_TILE_OFFSET + 29 ; top line ld [hli], a ld a, STATUS_BAR_TILE_OFFSET + 14 ld [hli], a inc a ld [hli], a ld a, STATUS_BAR_TILE_OFFSET + 30 ; bottom line ld [bc], a inc c inc a ld [bc], a inc c .doneDrawIcons: inc l ; skip past 2 already filled blocks inc c ; Draw speed ; To convert road scroll speed to KM/H, shift right twice then subtract 40ish ; speeds above 0 but below a certain value will be negative - is this an issue? push hl ; save HL and BC for when we need to write the text push bc ld a, [CurrentRoadScrollSpeed + 1] ; load low byte srl a srl a ld d, a ld a, [CurrentRoadScrollSpeed] ; load high byte rrca ; rotate right is equivalent to shifting right onto new byte rrca ; if value was %00000111 it's now %11000001 ld h, a and $F0 ; isolate top bits or d ; combine high and low bytes ld l, a ; move into low byte area ld a, h and $0F ; isolate bottom bits ld h, a ; move into high byte area or l ; \ jr z, .noKphOffset ; / special case so 0 speed shows as 0 kph ld bc, -40 add hl, bc .noKphOffset: ; kph conversion is done, value is in HL, now convert to characters call bcd16 pop bc ; restore HL and BC to the array indices pop hl ; C isn't needed since the value is never >1000 ld a, d and $0F ; isolate hundreds digit add STATUS_BAR_TILE_OFFSET ; \ ld [hli], a ; | add 16 ; | write hundreds digit ld [bc], a ; | inc c ; / ld a, e and $F0 ; isolate tens digit swap a add STATUS_BAR_TILE_OFFSET ; \ ld [hli], a ; | add 16 ; | write tens digit ld [bc], a ; | inc c ; / ld a, e and $0F ; isolate ones digit add STATUS_BAR_TILE_OFFSET ; \ ld [hli], a ; | add 16 ; | write ones digit ld [bc], a ; / ret ; Copy the status bar buffer into VRAM ; Sets - A C D E H L to garbage copyStatusBarBuffer:: ld hl, _SCRN1 + (32 * 30) ; copy first line ld de, STARTOF("StatusBarBuffer") ld c, SIZEOF("StatusBarBuffer") / 2 rst memcpyFast ld hl, _SCRN1 + (32 * 31) ; copy second line ld c, SIZEOF("StatusBarBuffer") / 2 rst memcpyFast ret ; Run every frame, in an LCD interrupt on the first line of the status bar. statusBarTopLine:: ldh a, [rLCDC] and ~LCDCF_OBJON ; Disable sprites or LCDCF_BG9C00 ; Switch background tilemap ld b, a ; Wait for safe VRAM access (next hblank) : ld a, [rSTAT] and a, STATF_BUSY jr nz, :- ; Set LCD registers ld a, b ldh [rLCDC], a xor a ldh [rSCX], a ; Set X scroll to 0 ld a, (8 * 30) - 129 ; 8 pix per tile * 30 tile lines to bottom of VRAM - status bar starts scanline 129 ldh [rSCY], a ; Set Y scroll to show status bar jp LCDIntEnd ; Set up LCD interrupt for top of menu bar ; Sets - A to garbage setupMenuBarInterrupt:: ld hl, LCDIntVectorRAM ld a, LOW(menuBarTopLineFunc) ld [hli], a ld a, HIGH(menuBarTopLineFunc) ld [hl], a ld a, [menuBarTopLine] dec a ld [rLYC], a ret ; Runs on the top scanline of the menu bar. menuBarTopLineFunc: ldh a, [rLCDC] and ~LCDCF_OBJON ; Disable sprites or LCDCF_BG9C00 ; Switch background tilemap ld b, a ld a, [whichMenuOpen] and a jr nz, .gameOverMenu ld c, (8 * 15) - 40 ; 8 pix per tile * 15 tile lines to the position in VRAM - menu bar starts scanline 40 jr .donePickMenu .gameOverMenu: ld c, (8 * 21) - 32 ; 8 pix per tile * 21 tile lines to the position in VRAM - menu bar starts scanline 32 .donePickMenu: ; Wait for safe VRAM access (next hblank) : ld a, [rSTAT] and a, STATF_BUSY jr nz, :- ; Set LCD registers ld a, b ldh [rLCDC], a xor a ldh [rSCX], a ; Set X scroll to 0 ld a, c ldh [rSCY], a ; Set Y scroll to show status bar ld a, [menuBarDoneAnim] and a jr z, .noSelBar call selectionBarSetupTopInt jp LCDIntEnd .noSelBar: ; Set up menu bar bottom line interrupt ld hl, LCDIntVectorRAM ld a, LOW(menuBarBottomLineFunc) ld [hli], a ld a, HIGH(menuBarBottomLineFunc) ld [hl], a ld a, [menuBarBottomLine] dec a ld [rLYC], a jp LCDIntEnd ; Runs on the bottom scanline of the menu bar. menuBarBottomLineFunc: ldh a, [rLCDC] or LCDCF_OBJON ; Enable sprites and ~LCDCF_BG9C00 ; Switch background tilemap ld b, a ld a, [ShadowScrollX] ; Set X scroll back to road ld c, a ld a, [CurrentRoadScrollPos] ; Set Y scroll back to road ld d, a ; Wait for safe VRAM access (next hblank) : ld a, [rSTAT] and a, STATF_BUSY jr nz, :- ; Set LCD registers ld a, b ldh [rLCDC], a ld a, c ldh [rSCX], a ld a, d ldh [rSCY], a ; Set up status bar interrupt call setupStatusBarInterrupt jp LCDIntEnd ; Run when the menu bar opens. ; Input - A = Which menu to open (0 = Pause, nonzero = Game Over) ; Sets - A to garbage startMenuBarAnim:: ld [whichMenuOpen], a and a jr z, .pauseMenu xor a ld hl, $9F6C call gameOverDrawDistance ld a, 1 ld hl, $9F8C call gameOverDrawDistance ld a, GAMEOVER_MENU_OPTION_1_POS ; Game Over menu ld [menuOption1Pos], a ld a, GAMEOVER_MENU_OPTION_2_POS ld [menuOption2Pos], a ld a, GAMEOVER_BOTTOM_LINE ld [menuBarTargetBottom], a ld a, GAMEOVER_TOP_LINE ld [menuBarTargetTop], a ld a, GAMEOVER_MID_POS ld [menuBarCurrentMidPos], a jr .donePickMenu .pauseMenu: ld a, PAUSE_MENU_OPTION_1_POS ld [menuOption1Pos], a ld a, PAUSE_MENU_OPTION_2_POS ld [menuOption2Pos], a ld a, PAUSE_BOTTOM_LINE ld [menuBarTargetBottom], a ld a, PAUSE_TOP_LINE ld [menuBarTargetTop], a ld a, PAUSE_MID_POS ld [menuBarCurrentMidPos], a .donePickMenu: ld [menuBarTopLine], a ; TopLine = MidPos inc a ld [menuBarBottomLine], a xor a ld [menuBarState], a ld [menuBarDoneAnim], a ld [menuOptionSelected], a ld [SelBarTopLine + 1], a ld a, [menuOption1Pos] ; Start selection bar on top item ld [SelBarTopLine], a ld [SelBarTargetPos], a ; Setup interrupt options that tell the selection bar to go the bottom of the menu bar ld hl, AfterSelIntVec ld a, LOW(menuBarBottomLineFunc) ld [hli], a ld a, HIGH(menuBarBottomLineFunc) ld [hl], a ld a, [menuBarTargetBottom] ld [AfterSelIntLine], a ret ; Run every frame when menu bar is open. updateMenuBar:: ld a, [menuBarState] and a ld a, [menuBarTopLine] ld b, MENU_BAR_ANIM_SPEED jr z, .barGrowing add b ; Bar is shrinking ld [menuBarTopLine], a ld c, a ld a, [menuBarBottomLine] sub b ld [menuBarBottomLine], a cp c ; C Set if (menuBarBottomLine < menuBarTopLine) jr nc, .doneAnimBar xor a ; When menu bar is done closing, unpause the game ld [IsGamePaused], a ; Only the pause menu shrinks, the game over menu doesn't, so this is fine. ld a, [menuBarCurrentMidPos] ; \ ld [menuBarTopLine], a ; | Reset the bar positions to 1 line high inc a ; | This prevents the bar from "glitching" for one frame after closing ld [menuBarBottomLine], a ; / jr .doneAnimBar .barGrowing: sub b ld hl, menuBarTargetTop cp [hl] jr c, .doneGrowing ld [menuBarTopLine], a ld a, [menuBarBottomLine] add b ld [menuBarBottomLine], a jr .doneAnimBar .doneGrowing: ld a, [menuBarTargetTop] ld [menuBarTopLine], a ld a, [menuBarTargetBottom] ld [menuBarBottomLine], a ld a, $FF ld [menuBarDoneAnim], a .doneAnimBar: ld a, [whichMenuOpen] ; \ and a ; | Can't close menu when game over, so skip past unpause jr nz, .pauseNotPressed ; / ld a, [newButtons] ; Start shrinking menu bar if start button is pressed and PADF_START jr z, .pauseNotPressed call unpause .pauseNotPressed: ld a, [menuBarDoneAnim] ; \ and a ; | Skip processing menu input if menu is still opening jr z, .skipCheckMenuButtons ; / call selectionBarUpdate ; Check for A button selecting the current menu option ld a, [newButtons] and PADF_A jr z, .aNotPressed ld a, [menuOptionSelected] ; \ and a ; | Second option is "Menu" in both pause and game over jr nz, .secondOptionSelected; / ld a, [whichMenuOpen] ; \ and a ; | Handle buttons differently if in pause menu or game over menu jr z, .aPressedPauseMenu ; / jp StartGame ; First option selected in game over menu = Restart .aPressedPauseMenu: ; First option selected in pause menu = Resume call unpause jr .aNotPressed .secondOptionSelected: ; Second option = Go to main menu jp EntryPoint .aNotPressed: ; Check for up/down buttons moving the selection ld a, [menuOptionSelected] ; B = old MenuOptionSelected ld b, a ; ld a, [newButtons] and PADF_UP jr z, .upNotPressed xor a ld [menuOptionSelected], a ld a, [menuOption1Pos] ld [SelBarTargetPos], a .upNotPressed: ld a, [newButtons] and PADF_DOWN jr z, .downNotPressed ld a, 1 ld [menuOptionSelected], a ld a, [menuOption2Pos] ld [SelBarTargetPos], a .downNotPressed: ld a, [menuOptionSelected] ; Play menu "bip" sound if new MenuOption is different to old one xor b jr z, .skipCheckMenuButtons play_sound_effect FX_MenuBip .skipCheckMenuButtons: ret ; Unpause the game ; This does not unpause immediately - it starts shrinking the menu bar ; and the game is unpaused when the bar is done shrinking. ; Called when Start is pressed in pause menu, or "Resume" is selected in pause menu unpause: ld a, $FF ld [menuBarState], a xor a ld [menuBarDoneAnim], a play_sound_effect FX_Unpause ret
28.733898
110
0.638294
[ "MIT" ]
QuinnPainter/Renegade-Rush
src/ingameui.asm
16,953
Assembly
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r8 push %rbp push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_normal_ht+0x9cd7, %rdx nop nop nop lfence movb $0x61, (%rdx) nop xor $45044, %r8 lea addresses_normal_ht+0xeadf, %rsi lea addresses_D_ht+0x5d77, %rdi nop nop nop nop add $24541, %r8 mov $26, %rcx rep movsl nop nop nop nop nop and %rdx, %rdx lea addresses_WC_ht+0x15a77, %rsi lea addresses_UC_ht+0x1cc77, %rdi clflush (%rdi) nop nop nop nop nop and $37221, %r10 mov $76, %rcx rep movsq nop nop nop nop cmp $11476, %r10 pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %rbp pop %r8 pop %r10 ret .global s_faulty_load s_faulty_load: push %r14 push %r9 push %rax push %rbx push %rcx push %rdi // Faulty Load mov $0x52a2130000000a77, %rbx nop nop nop dec %r9 mov (%rbx), %rcx lea oracles, %r14 and $0xff, %rcx shlq $12, %rcx mov (%r14,%rcx,1), %rcx pop %rdi pop %rcx pop %rbx pop %rax pop %r9 pop %r14 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_NC', 'AVXalign': False, 'size': 32, 'NT': True, 'same': True, 'congruent': 0}, 'OP': 'LOAD'} [Faulty Load] {'src': {'type': 'addresses_NC', 'AVXalign': False, 'size': 8, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': True, 'congruent': 4}} {'src': {'type': 'addresses_normal_ht', 'congruent': 3, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 3, 'same': False}} {'src': {'type': 'addresses_WC_ht', 'congruent': 11, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 6, '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 */
46.50495
2,999
0.66468
[ "MIT" ]
danielmgmi/medusa
Transynther/_processed/NC/_zr_/i9-9900K_12_0xa0_notsx.log_21829_1583.asm
4,697
Assembly
; A035344: Expansion of 1/((1 - x)*(1 - 4*x + 2 * x^2)). ; 1,5,19,67,231,791,2703,9231,31519,107615,367423,1254463,4283007,14623103,49926399,170459391,581984767,1987020287,6784111615,23162405887,79081400319,270000789503,921840357375 mov $1,2 lpb $0,1 sub $0,1 add $2,$1 mul $1,2 add $1,$2 lpe sub $1,1
25.916667
175
0.694534
[ "Apache-2.0" ]
karttu/loda
programs/oeis/035/A035344.asm
311
Assembly
.byte $00 ; Unknown purpose .byte OBJ_THWOMP, $09, $04 .byte OBJ_ROTODISCCCLOCKWISE, $14, $15 .byte OBJ_ROTODISCCLOCKWISE, $1C, $15 .byte OBJ_ROTODISCCCLOCKWISE, $23, $15 .byte OBJ_THWOMP, $24, $04 .byte OBJ_ROTODISCCLOCKWISE, $28, $15 .byte OBJ_BOOMBOOMJUMP, $4D, $17 .byte $FF ; Terminator
27.454545
39
0.708609
[ "Unlicense" ]
narfman0/smb3_pp1
PRG/objects/D309.asm
302
Assembly
include "../../asrt.i" include "../../err.asm" include "../../math.asm" include "../../numb/nextChar.asm" include "../../numb/tryConversion.asm" setvecs: sd a0, zpV(x0) jalr x0, 0(ra) setword: sd a0, zpWordStart(x0) sd a1, zpWordLength(x0) jalr x0, 0(ra) ; When attempting to convert a word into a number we expect the current base to ; be preserved. numbbase_setv: jal a0, setvecs jal x0, ep_numbbase_eitherHexOrDecimal ep_numbbase_eitherHexOrDecimal: ori a0, x0, 20 sd a0, zpBase(x0) jalr x0, 0(rt) byte "NUMBBASE" testNumbBasePreserved: sd ra, zpTestPC(x0) jal ra, numbbase_setv addi a0, x0, 10 sd a0, zpBase(x0) jal ra, numbTryConversion ld a0, zpBase(x0) ori a1, x0, 10 jal ra, asrtEquals ld ra, zpTestPC(x0) jalr x0, 0(ra) ; When converting a word into a number, we must start at the beginning of the word. numbbgn_setv: jal a0, setvecs jal x0, ep_numbbgn_eitherHexOrDecimal numbbgn_setword: addi a1, x0, numbbgn_wordlen jal a0, setword numbbgn0: byte "aword" numbbgn_wordlen = *-numbbgn0 align 4 ep_numbbgn_eitherHexOrDecimal: addi rp, rp, -8 sd rt, 0(rp) ld a0, zpWordIndex(x0) jal rt, asrtIsFalse ld rt, 0(rp) addi rp, rp, 8 jalr x0, 0(rt) byte "NUMBBGN " testNumbWordStart: sd ra, zpTestPC(x0) jal ra, numbbgn_setv jal ra, numbbgn_setword addi a0, x0, 4 sd a0, zpWordIndex(x0) jal ra, numbTryConversion ld ra, zpTestPC(x0) jalr x0, 0(ra) ; Always assume a positive number by default when attempting to convert a number. numbpos_setv: jal a0, setvecs jalr x0, 0(rt) ; null eitherHexOrDecimal byte "NUMBPOS " testNumbPositiveStart: sd ra, zpTestPC(x0) jal ra, numbpos_setv jal ra, numbbgn_setword ori a0, x0, 1 sb a0, zpSign(x0) jal ra, numbTryConversion lb a0, zpSign(x0) jal ra, asrtIsZero ld ra, zpTestPC(x0) jalr x0, 0(ra) ; If attempting to convert a negative number, we expect the sign flag to be set. numbneg_setv: jal a0, setvecs jal x0, ep_numbneg_eitherHexOrDecimal ep_numbneg_eitherHexOrDecimal: addi rp, rp, -8 sd rt, 0(rp) lb a0, zpSign(x0) jal ra, asrtIsTrue ld a0, zpWordIndex(x0) ori a1, x0, 1 jal ra, asrtEquals addi a0, x0, 1234 sd a0, zpValue(x0) ld rt, 0(rp) addi rp, rp, 8 jalr x0, 0(rt) numbneg_setword: addi a1, x0, numbneg_wordlen jal a0, setword numbneg0: byte "-1234" numbneg_wordlen = *-numbneg0 align 4 byte "NUMBNEG " testNumbNegativeStart: addi rp, rp, -8 sd ra, 0(rp) jal ra, numbneg_setv jal ra, numbneg_setword sb x0, zpSign(x0) jal ra, numbTryConversion ld a0, zpValue(x0) addi a1, x0, -1234 jal ra, asrtEquals ld ra, 0(rp) addi rp, rp, 8 jalr x0, 0(ra) epv_numbEitherHexOrDecimal = 0 numbEitherHexOrDecimal: ld t0, zpV(x0) jalr x0, epv_numbEitherHexOrDecimal(t0) align 4 start_tests: jal a0, asrtBoot align 8 dword 4 dword romBase+testNumbBasePreserved dword romBase+testNumbWordStart dword romBase+testNumbPositiveStart dword romBase+testNumbNegativeStart ; Must be the very last thing in the ROM image. include "../../asrt.asm"
20.355263
83
0.699741
[ "MPL-2.0", "MPL-2.0-no-copyleft-exception" ]
KestrelComputer/kestrel
software/src/forth/OLD/numb/test/tryConversion.asm
3,094
Assembly
SECTION code_fp_dai32 PUBLIC l_f32_div EXTERN ___dai32_setup_arith EXTERN ___dai32_xfdiv EXTERN ___dai32_return l_f32_div: call ___dai32_setup_arith call ___dai32_xfdiv jp ___dai32_return
13.4
28
0.845771
[ "Unlicense" ]
drunkfly/gamemyx
Tools/z88dk/libsrc/math/daimath32/c/sccz80/l_f32_div.asm
201
Assembly
; ; bin2asm by Altomcat/Sector One Jan/95 ; ;fichier de base : GOODBYE.BIN DD 08B208B1h,0A208A20h,0A300A76h,0A340A2Eh,0A200A38h DD 08B208DBh,08B108B2h,08B108B1h,08B008B0h,08B008B0h DD 08B008B0h,08200820h,08200820h,08200820h,08200820h DD 08200820h,08200820h,08200820h,08200820h,08200820h DD 08200820h,08200820h,08200820h,08200820h,08B00820h DD 08B008B0h,08B108B1h,08B208B1h,08DB08B2h,04200C20h DD 0C4A0420h,0C6E0C61h,0C610C75h,0C790C72h,0C320C20h DD 0C740C34h,0C200C68h,0C390C31h,0C370C39h,04200C20h DD 0FC40FD6h,0FC40FC4h,0FC40FC4h,0FC40FC4h,0FC40FC4h DD 0FC40FC4h,0FC40FC4h,0FC40FC4h,0FC40FC4h,0FC40FC4h DD 0FC40FC4h,0FC40FC4h,0FC40FC4h,0FC40FC4h,0FC40FC4h DD 0FC40FC4h,0FC40FC4h,0FC40FC4h,0FC40FC4h,0FC40FC4h DD 0FC40FC4h,0FC40FC4h,0FC40FC4h,0FC40FC4h,0FC40FC4h DD 0FC40FC4h,0FC40FC4h,0FC40FC4h,0FC40FC4h,0FC40FC4h DD 0200FB7h,06200620h,06200620h,06200620h,06200620h DD 06200620h,06200620h,06200620h,06200620h,06200620h DD 01B10FBAh,07B107B0h,07B107B0h,07B107B0h,01B207DDh DD 01B201B2h,07B107B0h,07B107B0h,07DD07B0h,01B201B2h DD 07B101B2h,07B107B0h,07B007B0h,01B207DDh,07B101B2h DD 07DD07B0h,07B101B2h,07B107B0h,07B107B0h,07DD07B0h DD 07B101B2h,07DD07B0h,07B101B2h,07B107B0h,07B107B0h DD 07DD07B0h,07B101B2h,07B107B0h,07B107B0h,07DD07B0h DD 0200FBAh,01B4D1B59h,01B381B2Dh,01B311B39h,01B201B30h DD 01B6D1B45h,01B6C1B75h,01B741B61h,01B6F1B69h,09B201B6Eh DD 01B20FBAh,0FB00FB1h,01B20FDDh,0FB001B2h,0FDD0FB0h DD 0FB001B2h,0FDD0FB1h,01B201B2h,0FB00FB0h,01B201B2h DD 07B00FB1h,01B207DDh,07B001B2h,07DD07B0h,0FB001B2h DD 0FDD0FB1h,0FB001B2h,0FDD0FB1h,01B201B2h,01B201B2h DD 0FB001B2h,0FDD0FB1h,0FB001B2h,0FDD0FB1h,01B201B2h DD 01B201B2h,01B201B2h,0FB001B2h,0FDD0FB1h,01B201B2h DD 0200FBAh,01B791B62h,01B411B20h,01B6E1B72h,01B751B61h DD 01B201B64h,01B611B43h,01B721B72h,09B201B65h,09B209B20h DD 01B10FBAh,0EB10EB0h,0EB10EB0h,0EB10EB0h,01B10EDDh DD 0EB101B1h,0EB10EB0h,0EB10EB0h,0EB10EB0h,01B101B1h DD 0EB10EB0h,01B10EDDh,01B101B1h,01B101B1h,0EB101B1h DD 0EDD0EB0h,0EB101B1h,0EB00EB0h,0EDD0EB0h,01B101B1h DD 0EB101B1h,0EDD0EB0h,0EB101B1h,0EB10EB0h,0EB10EB0h DD 0EDD0EB0h,01B101B1h,0EB101B1h,0EDD0EB0h,01B101B1h DD 0F200FBAh,01A651A6Ch,01A6E1A6Fh,01A721A61h,01A401A64h DD 01A791A6Dh,01A611A67h,01A651A6Ch,01A6F1A2Eh,01A671A72h DD 01B00FBAh,0AB00AB1h,01B00ADDh,01B001B0h,01B001B0h DD 0AB001B0h,0ADD0AB1h,01B001B0h,0AB00AB0h,01B00ADDh DD 0AB00AB1h,01B00ADDh,0AB101B0h,0ADD0AB0h,0AB001B0h DD 0ADD0AB1h,0AB001B0h,0ADD0AB1h,01B001B0h,01B001B0h DD 0AB001B0h,0ADD0AB1h,01B001B0h,01B001B0h,0AB001B0h DD 0ADD0AB1h,01B001B0h,0AB001B0h,0ADD0AB1h,01B001B0h DD 0A200FBAh,07200720h,07200720h,07200720h,07200720h DD 07200720h,07200720h,07200720h,07200720h,07200720h DD 01B00FBAh,0BB20BB2h,01B00BDDh,01B001B0h,01B001B0h DD 0BB201B0h,0BDD0BB2h,01B001B0h,0BB20BB2h,01B00BDDh DD 0BB201B0h,0BB20BB2h,0BB20BB2h,01B00BDDh,0BB201B0h DD 0BDD0BB2h,0BB201B0h,0BDD0BB2h,01B001B0h,01B001B0h DD 0BB201B0h,0BDD0BB2h,0BB201B0h,0BB20BB2h,0BB20BB2h DD 0BDD0BB2h,01B001B0h,0BB201B0h,0BDD0BB2h,01B001B0h DD 0B200FBAh,05F685F63h,05F635F65h,05F205F6Bh,05F695F68h DD 05F205F73h,05F545F53h,05F4F5F53h,05F4E5F55h,05F205F44h DD 0FC40FD3h,0FC40FC4h,0FC40FC4h,0FC40FC4h,0FC40FC4h DD 0FC40FC4h,0FC40FC4h,0FC40FC4h,0FC40FC4h,0FC40FC4h DD 0FC40FC4h,0FC40FC4h,0FC40FC4h,0FC40FC4h,0FC40FC4h DD 0FC40FC4h,0FC40FC4h,0FC40FC4h,0FC40FC4h,0FC40FC4h DD 0FC40FC4h,0FC40FC4h,0FC40FC4h,0FC40FC4h,0FC40FC4h DD 0FC40FC4h,0FC40FC4h,0FC40FC4h,0FC40FC4h,0FC40FC4h DD 09200FBDh,05F725F70h,05F675F6Fh,05F615F72h,05F2C5F6Dh DD 05F695F20h,05F275F74h,05F205F73h,05F495F42h,05F215F47h DD 01E651A20h,01E6D1E2Dh,01E691E61h,01E3A1E6Ch,01A661A20h DD 01A651A72h,01A651A64h,01A691A72h,01A2E1A63h,01A691A67h DD 01A6F1A64h,01A691A75h,01A401A6Eh,01A6F1A68h,01A2E1A6Ch DD 01A721A66h,01A201A20h,019651953h,01964196Eh,019631920h DD 0196D196Fh,01965196Dh,01974196Eh,0192C1973h,019661920h DD 01961196Ch,01965196Dh,0192E1973h,0194E1920h,01920194Fh DD 0194F1954h,019201953h,019451952h,019551951h,019531945h DD 019531954h,019201921h,019201920h,019201920h,019201920h DD 01E571A20h,01E621E65h,01A201E3Ah,01A741A68h,01A701A74h DD 01A2F1A3Ah,01A771A2Fh,01A771A77h,01A701A2Eh,01A631A61h DD 01A661A69h,01A731A69h,01A2E1A74h,01A611A66h,01A611A74h DD 01A2D1A6Ch,01A651A64h,01A691A73h,01A6E1A67h,01A631A2Eh DD 01A6D1A6Fh,01C641A20h,01C731C65h,01C671C69h,01C651C6Eh DD 01C201C64h,01C791C62h,01C521C20h,01C631C69h,01C611C68h DD 01C641C72h,01C441C20h,01C761C61h,01C791C65h,01A201A20h DD 01A201A20h,01A201A20h,01A201A20h,01A201A20h,01A201A20h DD 028542E20h,028612868h,0286B286Eh,028202873h,0286F2874h DD 02B432820h,02F612F68h,02F6C2F72h,02F732F65h,02F532820h DD 02F682F63h,02F662F65h,02F6F2F66h,02F642F6Ch,028262820h DD 02B542820h,02F6F2F68h,02F612F6Dh,028202F73h,02F792F50h DD 02F652F74h,028202F6Ch,0286F2866h,028202872h,0284D2850h DD 02844284Fh,0282F2845h,028202857h,028732875h,028642865h DD 028692820h,02820286Eh,028682874h,028732869h,028702820h DD 0286F2872h,028722867h,0286D2861h,02E20282Eh,02E202E20h DD 04E614E50h,04E694E43h,04E694E66h,04E544E53h,04E694E20h DD 04E204E73h,04E724E77h,04E744E69h,04E654E74h,04E204E6Eh DD 04E6E4E69h,04E414E20h,04E4D4E53h,04E664E20h,04E724E6Fh DD 04E364E20h,04E304E38h,04E304E30h,04E204E2Ch,04E464E4Dh DD 04E204E50h,04E204E26h,04E634E53h,04E654E72h,04E6E4E65h DD 04E724E20h,04E6E4E65h,04E654E64h,04E694E72h,04E674E6Eh DD 04E2D4E20h,04E434E20h,04E6C4E20h,04E6E4E61h,04E754E67h DD 04E674E61h,04E204E65h,04E6F4E66h,04E204E72h,04E204E20h DD 04E424E4Bh,04E2C4E44h,04E444E20h,04E734E69h,04E734E6Bh DD 04E614E20h,04E204E73h,04E654E77h,04E6C4E6Ch,04E614E20h DD 04E204E73h,04E6F4E4Dh,04E694E6Eh,04E6F4E74h,04E204E72h DD 04E204E20h,04E204E20h,04E204F20h,01F201F20h,01F201F20h DD 01F201F20h,01F201F20h,01F201F20h,01F201F20h,01F201F20h DD 01F201F20h,01F201F20h,01F541F20h,01F491F48h,01F201F53h DD 01F521F50h,01F471F4Fh,01F411F52h,01F201F4Dh,01F531F49h DD 01F471F20h,01F461F49h,01F571F54h,01F521F41h,01F2E1F45h DD 04200420h,04200420h,04200420h,03200420h,03200320h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 0F200F20h,0F200F20h,0F200F20h,0F200F20h,0F200F20h DD 0F200F20h,0F200F20h,0F200F20h,0F200F20h,0F200F20h DD 0F200F20h,0F200F20h,0F200F20h,0F200F20h,0F200F20h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200E20h,04200420h,04200420h,04200420h,03200320h DD 04200320h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200E20h,04200420h,04200420h,04200420h,03200320h DD 04200320h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200E20h,04200420h,04200420h,04200420h,03200320h DD 04200320h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200E20h,04200420h,04200420h,04200420h,03200320h DD 04200320h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200E20h,04200420h,04200420h,04200420h,03200320h DD 04200320h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200E20h,04200420h,04200420h,04200420h,03200320h DD 04200320h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200E20h,04200420h,04200420h,04200420h,03200320h DD 04200320h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200E20h,04200420h,04200420h,04200420h,03200320h DD 04200320h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200E20h,04200420h,04200420h,04200420h,03200320h DD 04200320h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 04200420h,04200420h,04200420h,04200420h,04200420h DD 07200720h,07200720h,07200720h,07200720h,07200720h DD 07200720h,07200720h,07200720h,07200720h,07200720h DD 07200720h,07200720h,07200720h,07200720h,07200720h DD 07200720h,07200720h,07200720h,07200720h,07200720h DD 07200720h,07200720h,07200720h,07200720h,07200720h DD 07200720h,07200720h,07200720h,07200720h,07200720h DD 07200720h,07200720h,07200720h,07200720h,07200720h DD 07200720h,07200720h,07200720h,07200720h,07200720h
53.758454
58
0.871316
[ "Apache-2.0" ]
gidouin/pacifist-emulator
goodbye.asm
11,128
Assembly
; A114327: Table T(n,m) = n - m read by upwards antidiagonals. ; 0,1,-1,2,0,-2,3,1,-1,-3,4,2,0,-2,-4,5,3,1,-1,-3,-5,6,4,2,0,-2,-4,-6,7,5,3,1,-1,-3,-5,-7,8,6,4,2,0,-2,-4,-6,-8,9,7,5,3,1,-1,-3,-5,-7,-9,10,8,6,4,2,0,-2,-4,-6,-8,-10,11,9,7,5,3,1,-1,-3,-5,-7,-9,-11,12,10,8,6,4,2,0,-2,-4,-6,-8,-10,-12,13,11,9,7,5,3,1,-1,-3,-5,-7,-9,-11,-13,14,12,10,8,6,4,2,0,-2,-4,-6,-8,-10,-12,-14,15,13,11,9,7,5,3,1,-1,-3,-5,-7,-9,-11,-13,-15,16,14,12,10,8,6,4,2,0,-2,-4,-6,-8,-10,-12,-14,-16,17,15,13,11,9,7,5,3,1,-1,-3,-5,-7,-9,-11,-13,-15,-17,18,16,14,12,10,8,6,4,2,0,-2,-4,-6,-8,-10,-12,-14,-16,-18,19,17,15,13,11,9,7,5,3,1,-1,-3,-5,-7,-9,-11,-13,-15,-17,-19,20,18,16,14,12,10,8,6,4,2,0,-2,-4,-6,-8,-10,-12,-14,-16,-18,-20,21,19,17,15,13,11,9,7,5,3,1,-1,-3,-5,-7,-9,-11,-13,-15 mov $1,-2 mov $2,1 mov $3,2 mul $3,$0 mov $4,1 trn $5,$0 mul $0,2 add $5,1 lpb $0 mov $0,$2 add $1,$5 sub $4,$3 mov $3,$2 add $4,1 sub $4,$1 mul $0,$4 sub $1,3 add $4,2 lpe mov $1,$0
40.25
700
0.487578
[ "Apache-2.0" ]
jmorken/loda
programs/oeis/114/A114327.asm
966
Assembly
; ; jdsample.asm - upsampling (64-bit SSE2) ; ; Copyright 2009 Pierre Ossman <[email protected]> for Cendio AB ; Copyright (C) 2009, 2016, D. R. Commander. ; Copyright (C) 2018, Matthias Räncker. ; ; Based on the x86 SIMD extension for IJG JPEG library ; Copyright (C) 1999-2006, MIYASAKA Masaru. ; For conditions of distribution and use, see copyright notice in jsimdext.inc ; ; This file should be assembled with NASM (Netwide Assembler), ; can *not* be assembled with Microsoft's MASM or any compatible ; assembler (including Borland's Turbo Assembler). ; NASM is available from http://nasm.sourceforge.net/ or ; http://sourceforge.net/project/showfiles.php?group_id=6208 %include "jsimdext.inc" ; -------------------------------------------------------------------------- SECTION SEG_CONST alignz 32 GLOBAL_DATA(jconst_fancy_upsample_sse2) EXTN(jconst_fancy_upsample_sse2): PW_ONE times 8 dw 1 PW_TWO times 8 dw 2 PW_THREE times 8 dw 3 PW_SEVEN times 8 dw 7 PW_EIGHT times 8 dw 8 alignz 32 ; -------------------------------------------------------------------------- SECTION SEG_TEXT BITS 64 ; ; Fancy processing for the common case of 2:1 horizontal and 1:1 vertical. ; ; The upsampling algorithm is linear interpolation between pixel centers, ; also known as a "triangle filter". This is a good compromise between ; speed and visual quality. The centers of the output pixels are 1/4 and 3/4 ; of the way between input pixel centers. ; ; GLOBAL(void) ; jsimd_h2v1_fancy_upsample_sse2(int max_v_samp_factor, ; JDIMENSION downsampled_width, ; JSAMPARRAY input_data, ; JSAMPARRAY *output_data_ptr); ; ; r10 = int max_v_samp_factor ; r11d = JDIMENSION downsampled_width ; r12 = JSAMPARRAY input_data ; r13 = JSAMPARRAY *output_data_ptr align 32 GLOBAL_FUNCTION(jsimd_h2v1_fancy_upsample_sse2) EXTN(jsimd_h2v1_fancy_upsample_sse2): push rbp mov rax, rsp mov rbp, rsp collect_args 4 mov eax, r11d ; colctr test rax, rax jz near .return mov rcx, r10 ; rowctr test rcx, rcx jz near .return mov rsi, r12 ; input_data mov rdi, r13 mov rdip, JSAMPARRAY [rdi] ; output_data .rowloop: push rax ; colctr push rdi push rsi mov rsip, JSAMPROW [rsi] ; inptr mov rdip, JSAMPROW [rdi] ; outptr test rax, SIZEOF_XMMWORD-1 jz short .skip mov dl, JSAMPLE [rsi+(rax-1)*SIZEOF_JSAMPLE] mov JSAMPLE [rsi+rax*SIZEOF_JSAMPLE], dl ; insert a dummy sample .skip: pxor xmm0, xmm0 ; xmm0=(all 0's) pcmpeqb xmm7, xmm7 psrldq xmm7, (SIZEOF_XMMWORD-1) pand xmm7, XMMWORD [rsi+0*SIZEOF_XMMWORD] add rax, byte SIZEOF_XMMWORD-1 and rax, byte -SIZEOF_XMMWORD cmp rax, byte SIZEOF_XMMWORD ja short .columnloop .columnloop_last: pcmpeqb xmm6, xmm6 pslldq xmm6, (SIZEOF_XMMWORD-1) pand xmm6, XMMWORD [rsi+0*SIZEOF_XMMWORD] jmp short .upsample .columnloop: movdqa xmm6, XMMWORD [rsi+1*SIZEOF_XMMWORD] pslldq xmm6, (SIZEOF_XMMWORD-1) .upsample: movdqa xmm1, XMMWORD [rsi+0*SIZEOF_XMMWORD] movdqa xmm2, xmm1 movdqa xmm3, xmm1 ; xmm1=( 0 1 2 ... 13 14 15) pslldq xmm2, 1 ; xmm2=(-- 0 1 ... 12 13 14) psrldq xmm3, 1 ; xmm3=( 1 2 3 ... 14 15 --) por xmm2, xmm7 ; xmm2=(-1 0 1 ... 12 13 14) por xmm3, xmm6 ; xmm3=( 1 2 3 ... 14 15 16) movdqa xmm7, xmm1 psrldq xmm7, (SIZEOF_XMMWORD-1) ; xmm7=(15 -- -- ... -- -- --) movdqa xmm4, xmm1 punpcklbw xmm1, xmm0 ; xmm1=( 0 1 2 3 4 5 6 7) punpckhbw xmm4, xmm0 ; xmm4=( 8 9 10 11 12 13 14 15) movdqa xmm5, xmm2 punpcklbw xmm2, xmm0 ; xmm2=(-1 0 1 2 3 4 5 6) punpckhbw xmm5, xmm0 ; xmm5=( 7 8 9 10 11 12 13 14) movdqa xmm6, xmm3 punpcklbw xmm3, xmm0 ; xmm3=( 1 2 3 4 5 6 7 8) punpckhbw xmm6, xmm0 ; xmm6=( 9 10 11 12 13 14 15 16) pmullw xmm1, [rel PW_THREE] pmullw xmm4, [rel PW_THREE] paddw xmm2, [rel PW_ONE] paddw xmm5, [rel PW_ONE] paddw xmm3, [rel PW_TWO] paddw xmm6, [rel PW_TWO] paddw xmm2, xmm1 paddw xmm5, xmm4 psrlw xmm2, 2 ; xmm2=OutLE=( 0 2 4 6 8 10 12 14) psrlw xmm5, 2 ; xmm5=OutHE=(16 18 20 22 24 26 28 30) paddw xmm3, xmm1 paddw xmm6, xmm4 psrlw xmm3, 2 ; xmm3=OutLO=( 1 3 5 7 9 11 13 15) psrlw xmm6, 2 ; xmm6=OutHO=(17 19 21 23 25 27 29 31) psllw xmm3, BYTE_BIT psllw xmm6, BYTE_BIT por xmm2, xmm3 ; xmm2=OutL=( 0 1 2 ... 13 14 15) por xmm5, xmm6 ; xmm5=OutH=(16 17 18 ... 29 30 31) movdqa XMMWORD [rdi+0*SIZEOF_XMMWORD], xmm2 movdqa XMMWORD [rdi+1*SIZEOF_XMMWORD], xmm5 sub rax, byte SIZEOF_XMMWORD add rsi, byte 1*SIZEOF_XMMWORD ; inptr add rdi, byte 2*SIZEOF_XMMWORD ; outptr cmp rax, byte SIZEOF_XMMWORD ja near .columnloop test eax, eax jnz near .columnloop_last pop rsi pop rdi pop rax add rsi, byte SIZEOF_JSAMPROW ; input_data add rdi, byte SIZEOF_JSAMPROW ; output_data dec rcx ; rowctr jg near .rowloop .return: uncollect_args 4 pop rbp ret ; -------------------------------------------------------------------------- ; ; Fancy processing for the common case of 2:1 horizontal and 2:1 vertical. ; Again a triangle filter; see comments for h2v1 case, above. ; ; GLOBAL(void) ; jsimd_h2v2_fancy_upsample_sse2(int max_v_samp_factor, ; JDIMENSION downsampled_width, ; JSAMPARRAY input_data, ; JSAMPARRAY *output_data_ptr); ; ; r10 = int max_v_samp_factor ; r11d = JDIMENSION downsampled_width ; r12 = JSAMPARRAY input_data ; r13 = JSAMPARRAY *output_data_ptr %define wk(i) rbp - (WK_NUM - (i)) * SIZEOF_XMMWORD ; xmmword wk[WK_NUM] %define WK_NUM 4 align 32 GLOBAL_FUNCTION(jsimd_h2v2_fancy_upsample_sse2) EXTN(jsimd_h2v2_fancy_upsample_sse2): push rbp mov rax, rsp ; rax = original rbp sub rsp, byte 4 and rsp, byte (-SIZEOF_XMMWORD) ; align to 128 bits mov [rsp], rax mov rbp, rsp ; rbp = aligned rbp lea rsp, [wk(0)] collect_args 4 push rbx mov eax, r11d ; colctr test rax, rax jz near .return mov rcx, r10 ; rowctr test rcx, rcx jz near .return mov rsi, r12 ; input_data mov rdi, r13 mov rdip, JSAMPARRAY [rdi] ; output_data .rowloop: push rax ; colctr push rcx push rdi push rsi mov rcxp, JSAMPROW [rsi-1*SIZEOF_JSAMPROW] ; inptr1(above) mov rbxp, JSAMPROW [rsi+0*SIZEOF_JSAMPROW] ; inptr0 mov rsip, JSAMPROW [rsi+1*SIZEOF_JSAMPROW] ; inptr1(below) mov rdxp, JSAMPROW [rdi+0*SIZEOF_JSAMPROW] ; outptr0 mov rdip, JSAMPROW [rdi+1*SIZEOF_JSAMPROW] ; outptr1 test rax, SIZEOF_XMMWORD-1 jz short .skip push rdx mov dl, JSAMPLE [rcx+(rax-1)*SIZEOF_JSAMPLE] mov JSAMPLE [rcx+rax*SIZEOF_JSAMPLE], dl mov dl, JSAMPLE [rbx+(rax-1)*SIZEOF_JSAMPLE] mov JSAMPLE [rbx+rax*SIZEOF_JSAMPLE], dl mov dl, JSAMPLE [rsi+(rax-1)*SIZEOF_JSAMPLE] mov JSAMPLE [rsi+rax*SIZEOF_JSAMPLE], dl ; insert a dummy sample pop rdx .skip: ; -- process the first column block movdqa xmm0, XMMWORD [rbx+0*SIZEOF_XMMWORD] ; xmm0=row[ 0][0] movdqa xmm1, XMMWORD [rcx+0*SIZEOF_XMMWORD] ; xmm1=row[-1][0] movdqa xmm2, XMMWORD [rsi+0*SIZEOF_XMMWORD] ; xmm2=row[+1][0] pxor xmm3, xmm3 ; xmm3=(all 0's) movdqa xmm4, xmm0 punpcklbw xmm0, xmm3 ; xmm0=row[ 0]( 0 1 2 3 4 5 6 7) punpckhbw xmm4, xmm3 ; xmm4=row[ 0]( 8 9 10 11 12 13 14 15) movdqa xmm5, xmm1 punpcklbw xmm1, xmm3 ; xmm1=row[-1]( 0 1 2 3 4 5 6 7) punpckhbw xmm5, xmm3 ; xmm5=row[-1]( 8 9 10 11 12 13 14 15) movdqa xmm6, xmm2 punpcklbw xmm2, xmm3 ; xmm2=row[+1]( 0 1 2 3 4 5 6 7) punpckhbw xmm6, xmm3 ; xmm6=row[+1]( 8 9 10 11 12 13 14 15) pmullw xmm0, [rel PW_THREE] pmullw xmm4, [rel PW_THREE] pcmpeqb xmm7, xmm7 psrldq xmm7, (SIZEOF_XMMWORD-2) paddw xmm1, xmm0 ; xmm1=Int0L=( 0 1 2 3 4 5 6 7) paddw xmm5, xmm4 ; xmm5=Int0H=( 8 9 10 11 12 13 14 15) paddw xmm2, xmm0 ; xmm2=Int1L=( 0 1 2 3 4 5 6 7) paddw xmm6, xmm4 ; xmm6=Int1H=( 8 9 10 11 12 13 14 15) movdqa XMMWORD [rdx+0*SIZEOF_XMMWORD], xmm1 ; temporarily save movdqa XMMWORD [rdx+1*SIZEOF_XMMWORD], xmm5 ; the intermediate data movdqa XMMWORD [rdi+0*SIZEOF_XMMWORD], xmm2 movdqa XMMWORD [rdi+1*SIZEOF_XMMWORD], xmm6 pand xmm1, xmm7 ; xmm1=( 0 -- -- -- -- -- -- --) pand xmm2, xmm7 ; xmm2=( 0 -- -- -- -- -- -- --) movdqa XMMWORD [wk(0)], xmm1 movdqa XMMWORD [wk(1)], xmm2 add rax, byte SIZEOF_XMMWORD-1 and rax, byte -SIZEOF_XMMWORD cmp rax, byte SIZEOF_XMMWORD ja short .columnloop .columnloop_last: ; -- process the last column block pcmpeqb xmm1, xmm1 pslldq xmm1, (SIZEOF_XMMWORD-2) movdqa xmm2, xmm1 pand xmm1, XMMWORD [rdx+1*SIZEOF_XMMWORD] pand xmm2, XMMWORD [rdi+1*SIZEOF_XMMWORD] movdqa XMMWORD [wk(2)], xmm1 ; xmm1=(-- -- -- -- -- -- -- 15) movdqa XMMWORD [wk(3)], xmm2 ; xmm2=(-- -- -- -- -- -- -- 15) jmp near .upsample .columnloop: ; -- process the next column block movdqa xmm0, XMMWORD [rbx+1*SIZEOF_XMMWORD] ; xmm0=row[ 0][1] movdqa xmm1, XMMWORD [rcx+1*SIZEOF_XMMWORD] ; xmm1=row[-1][1] movdqa xmm2, XMMWORD [rsi+1*SIZEOF_XMMWORD] ; xmm2=row[+1][1] pxor xmm3, xmm3 ; xmm3=(all 0's) movdqa xmm4, xmm0 punpcklbw xmm0, xmm3 ; xmm0=row[ 0]( 0 1 2 3 4 5 6 7) punpckhbw xmm4, xmm3 ; xmm4=row[ 0]( 8 9 10 11 12 13 14 15) movdqa xmm5, xmm1 punpcklbw xmm1, xmm3 ; xmm1=row[-1]( 0 1 2 3 4 5 6 7) punpckhbw xmm5, xmm3 ; xmm5=row[-1]( 8 9 10 11 12 13 14 15) movdqa xmm6, xmm2 punpcklbw xmm2, xmm3 ; xmm2=row[+1]( 0 1 2 3 4 5 6 7) punpckhbw xmm6, xmm3 ; xmm6=row[+1]( 8 9 10 11 12 13 14 15) pmullw xmm0, [rel PW_THREE] pmullw xmm4, [rel PW_THREE] paddw xmm1, xmm0 ; xmm1=Int0L=( 0 1 2 3 4 5 6 7) paddw xmm5, xmm4 ; xmm5=Int0H=( 8 9 10 11 12 13 14 15) paddw xmm2, xmm0 ; xmm2=Int1L=( 0 1 2 3 4 5 6 7) paddw xmm6, xmm4 ; xmm6=Int1H=( 8 9 10 11 12 13 14 15) movdqa XMMWORD [rdx+2*SIZEOF_XMMWORD], xmm1 ; temporarily save movdqa XMMWORD [rdx+3*SIZEOF_XMMWORD], xmm5 ; the intermediate data movdqa XMMWORD [rdi+2*SIZEOF_XMMWORD], xmm2 movdqa XMMWORD [rdi+3*SIZEOF_XMMWORD], xmm6 pslldq xmm1, (SIZEOF_XMMWORD-2) ; xmm1=(-- -- -- -- -- -- -- 0) pslldq xmm2, (SIZEOF_XMMWORD-2) ; xmm2=(-- -- -- -- -- -- -- 0) movdqa XMMWORD [wk(2)], xmm1 movdqa XMMWORD [wk(3)], xmm2 .upsample: ; -- process the upper row movdqa xmm7, XMMWORD [rdx+0*SIZEOF_XMMWORD] movdqa xmm3, XMMWORD [rdx+1*SIZEOF_XMMWORD] movdqa xmm0, xmm7 ; xmm7=Int0L=( 0 1 2 3 4 5 6 7) movdqa xmm4, xmm3 ; xmm3=Int0H=( 8 9 10 11 12 13 14 15) psrldq xmm0, 2 ; xmm0=( 1 2 3 4 5 6 7 --) pslldq xmm4, (SIZEOF_XMMWORD-2) ; xmm4=(-- -- -- -- -- -- -- 8) movdqa xmm5, xmm7 movdqa xmm6, xmm3 psrldq xmm5, (SIZEOF_XMMWORD-2) ; xmm5=( 7 -- -- -- -- -- -- --) pslldq xmm6, 2 ; xmm6=(-- 8 9 10 11 12 13 14) por xmm0, xmm4 ; xmm0=( 1 2 3 4 5 6 7 8) por xmm5, xmm6 ; xmm5=( 7 8 9 10 11 12 13 14) movdqa xmm1, xmm7 movdqa xmm2, xmm3 pslldq xmm1, 2 ; xmm1=(-- 0 1 2 3 4 5 6) psrldq xmm2, 2 ; xmm2=( 9 10 11 12 13 14 15 --) movdqa xmm4, xmm3 psrldq xmm4, (SIZEOF_XMMWORD-2) ; xmm4=(15 -- -- -- -- -- -- --) por xmm1, XMMWORD [wk(0)] ; xmm1=(-1 0 1 2 3 4 5 6) por xmm2, XMMWORD [wk(2)] ; xmm2=( 9 10 11 12 13 14 15 16) movdqa XMMWORD [wk(0)], xmm4 pmullw xmm7, [rel PW_THREE] pmullw xmm3, [rel PW_THREE] paddw xmm1, [rel PW_EIGHT] paddw xmm5, [rel PW_EIGHT] paddw xmm0, [rel PW_SEVEN] paddw xmm2, [rel PW_SEVEN] paddw xmm1, xmm7 paddw xmm5, xmm3 psrlw xmm1, 4 ; xmm1=Out0LE=( 0 2 4 6 8 10 12 14) psrlw xmm5, 4 ; xmm5=Out0HE=(16 18 20 22 24 26 28 30) paddw xmm0, xmm7 paddw xmm2, xmm3 psrlw xmm0, 4 ; xmm0=Out0LO=( 1 3 5 7 9 11 13 15) psrlw xmm2, 4 ; xmm2=Out0HO=(17 19 21 23 25 27 29 31) psllw xmm0, BYTE_BIT psllw xmm2, BYTE_BIT por xmm1, xmm0 ; xmm1=Out0L=( 0 1 2 ... 13 14 15) por xmm5, xmm2 ; xmm5=Out0H=(16 17 18 ... 29 30 31) movdqa XMMWORD [rdx+0*SIZEOF_XMMWORD], xmm1 movdqa XMMWORD [rdx+1*SIZEOF_XMMWORD], xmm5 ; -- process the lower row movdqa xmm6, XMMWORD [rdi+0*SIZEOF_XMMWORD] movdqa xmm4, XMMWORD [rdi+1*SIZEOF_XMMWORD] movdqa xmm7, xmm6 ; xmm6=Int1L=( 0 1 2 3 4 5 6 7) movdqa xmm3, xmm4 ; xmm4=Int1H=( 8 9 10 11 12 13 14 15) psrldq xmm7, 2 ; xmm7=( 1 2 3 4 5 6 7 --) pslldq xmm3, (SIZEOF_XMMWORD-2) ; xmm3=(-- -- -- -- -- -- -- 8) movdqa xmm0, xmm6 movdqa xmm2, xmm4 psrldq xmm0, (SIZEOF_XMMWORD-2) ; xmm0=( 7 -- -- -- -- -- -- --) pslldq xmm2, 2 ; xmm2=(-- 8 9 10 11 12 13 14) por xmm7, xmm3 ; xmm7=( 1 2 3 4 5 6 7 8) por xmm0, xmm2 ; xmm0=( 7 8 9 10 11 12 13 14) movdqa xmm1, xmm6 movdqa xmm5, xmm4 pslldq xmm1, 2 ; xmm1=(-- 0 1 2 3 4 5 6) psrldq xmm5, 2 ; xmm5=( 9 10 11 12 13 14 15 --) movdqa xmm3, xmm4 psrldq xmm3, (SIZEOF_XMMWORD-2) ; xmm3=(15 -- -- -- -- -- -- --) por xmm1, XMMWORD [wk(1)] ; xmm1=(-1 0 1 2 3 4 5 6) por xmm5, XMMWORD [wk(3)] ; xmm5=( 9 10 11 12 13 14 15 16) movdqa XMMWORD [wk(1)], xmm3 pmullw xmm6, [rel PW_THREE] pmullw xmm4, [rel PW_THREE] paddw xmm1, [rel PW_EIGHT] paddw xmm0, [rel PW_EIGHT] paddw xmm7, [rel PW_SEVEN] paddw xmm5, [rel PW_SEVEN] paddw xmm1, xmm6 paddw xmm0, xmm4 psrlw xmm1, 4 ; xmm1=Out1LE=( 0 2 4 6 8 10 12 14) psrlw xmm0, 4 ; xmm0=Out1HE=(16 18 20 22 24 26 28 30) paddw xmm7, xmm6 paddw xmm5, xmm4 psrlw xmm7, 4 ; xmm7=Out1LO=( 1 3 5 7 9 11 13 15) psrlw xmm5, 4 ; xmm5=Out1HO=(17 19 21 23 25 27 29 31) psllw xmm7, BYTE_BIT psllw xmm5, BYTE_BIT por xmm1, xmm7 ; xmm1=Out1L=( 0 1 2 ... 13 14 15) por xmm0, xmm5 ; xmm0=Out1H=(16 17 18 ... 29 30 31) movdqa XMMWORD [rdi+0*SIZEOF_XMMWORD], xmm1 movdqa XMMWORD [rdi+1*SIZEOF_XMMWORD], xmm0 sub rax, byte SIZEOF_XMMWORD add rcx, byte 1*SIZEOF_XMMWORD ; inptr1(above) add rbx, byte 1*SIZEOF_XMMWORD ; inptr0 add rsi, byte 1*SIZEOF_XMMWORD ; inptr1(below) add rdx, byte 2*SIZEOF_XMMWORD ; outptr0 add rdi, byte 2*SIZEOF_XMMWORD ; outptr1 cmp rax, byte SIZEOF_XMMWORD ja near .columnloop test rax, rax jnz near .columnloop_last pop rsi pop rdi pop rcx pop rax add rsi, byte 1*SIZEOF_JSAMPROW ; input_data add rdi, byte 2*SIZEOF_JSAMPROW ; output_data sub rcx, byte 2 ; rowctr jg near .rowloop .return: pop rbx uncollect_args 4 mov rsp, rbp ; rsp <- aligned rbp pop rsp ; rsp <- original rbp pop rbp ret ; -------------------------------------------------------------------------- ; ; Fast processing for the common case of 2:1 horizontal and 1:1 vertical. ; It's still a box filter. ; ; GLOBAL(void) ; jsimd_h2v1_upsample_sse2(int max_v_samp_factor, JDIMENSION output_width, ; JSAMPARRAY input_data, JSAMPARRAY *output_data_ptr); ; ; r10 = int max_v_samp_factor ; r11d = JDIMENSION output_width ; r12 = JSAMPARRAY input_data ; r13 = JSAMPARRAY *output_data_ptr align 32 GLOBAL_FUNCTION(jsimd_h2v1_upsample_sse2) EXTN(jsimd_h2v1_upsample_sse2): push rbp mov rax, rsp mov rbp, rsp collect_args 4 mov edx, r11d add rdx, byte (2*SIZEOF_XMMWORD)-1 and rdx, byte -(2*SIZEOF_XMMWORD) jz near .return mov rcx, r10 ; rowctr test rcx, rcx jz short .return mov rsi, r12 ; input_data mov rdi, r13 mov rdip, JSAMPARRAY [rdi] ; output_data .rowloop: push rdi push rsi mov rsip, JSAMPROW [rsi] ; inptr mov rdip, JSAMPROW [rdi] ; outptr mov rax, rdx ; colctr .columnloop: movdqa xmm0, XMMWORD [rsi+0*SIZEOF_XMMWORD] movdqa xmm1, xmm0 punpcklbw xmm0, xmm0 punpckhbw xmm1, xmm1 movdqa XMMWORD [rdi+0*SIZEOF_XMMWORD], xmm0 movdqa XMMWORD [rdi+1*SIZEOF_XMMWORD], xmm1 sub rax, byte 2*SIZEOF_XMMWORD jz short .nextrow movdqa xmm2, XMMWORD [rsi+1*SIZEOF_XMMWORD] movdqa xmm3, xmm2 punpcklbw xmm2, xmm2 punpckhbw xmm3, xmm3 movdqa XMMWORD [rdi+2*SIZEOF_XMMWORD], xmm2 movdqa XMMWORD [rdi+3*SIZEOF_XMMWORD], xmm3 sub rax, byte 2*SIZEOF_XMMWORD jz short .nextrow add rsi, byte 2*SIZEOF_XMMWORD ; inptr add rdi, byte 4*SIZEOF_XMMWORD ; outptr jmp short .columnloop .nextrow: pop rsi pop rdi add rsi, byte SIZEOF_JSAMPROW ; input_data add rdi, byte SIZEOF_JSAMPROW ; output_data dec rcx ; rowctr jg short .rowloop .return: uncollect_args 4 pop rbp ret ; -------------------------------------------------------------------------- ; ; Fast processing for the common case of 2:1 horizontal and 2:1 vertical. ; It's still a box filter. ; ; GLOBAL(void) ; jsimd_h2v2_upsample_sse2(int max_v_samp_factor, JDIMENSION output_width, ; JSAMPARRAY input_data, JSAMPARRAY *output_data_ptr); ; ; r10 = int max_v_samp_factor ; r11d = JDIMENSION output_width ; r12 = JSAMPARRAY input_data ; r13 = JSAMPARRAY *output_data_ptr align 32 GLOBAL_FUNCTION(jsimd_h2v2_upsample_sse2) EXTN(jsimd_h2v2_upsample_sse2): push rbp mov rax, rsp mov rbp, rsp collect_args 4 push rbx mov edx, r11d add rdx, byte (2*SIZEOF_XMMWORD)-1 and rdx, byte -(2*SIZEOF_XMMWORD) jz near .return mov rcx, r10 ; rowctr test rcx, rcx jz near .return mov rsi, r12 ; input_data mov rdi, r13 mov rdip, JSAMPARRAY [rdi] ; output_data .rowloop: push rdi push rsi mov rsip, JSAMPROW [rsi] ; inptr mov rbxp, JSAMPROW [rdi+0*SIZEOF_JSAMPROW] ; outptr0 mov rdip, JSAMPROW [rdi+1*SIZEOF_JSAMPROW] ; outptr1 mov rax, rdx ; colctr .columnloop: movdqa xmm0, XMMWORD [rsi+0*SIZEOF_XMMWORD] movdqa xmm1, xmm0 punpcklbw xmm0, xmm0 punpckhbw xmm1, xmm1 movdqa XMMWORD [rbx+0*SIZEOF_XMMWORD], xmm0 movdqa XMMWORD [rbx+1*SIZEOF_XMMWORD], xmm1 movdqa XMMWORD [rdi+0*SIZEOF_XMMWORD], xmm0 movdqa XMMWORD [rdi+1*SIZEOF_XMMWORD], xmm1 sub rax, byte 2*SIZEOF_XMMWORD jz short .nextrow movdqa xmm2, XMMWORD [rsi+1*SIZEOF_XMMWORD] movdqa xmm3, xmm2 punpcklbw xmm2, xmm2 punpckhbw xmm3, xmm3 movdqa XMMWORD [rbx+2*SIZEOF_XMMWORD], xmm2 movdqa XMMWORD [rbx+3*SIZEOF_XMMWORD], xmm3 movdqa XMMWORD [rdi+2*SIZEOF_XMMWORD], xmm2 movdqa XMMWORD [rdi+3*SIZEOF_XMMWORD], xmm3 sub rax, byte 2*SIZEOF_XMMWORD jz short .nextrow add rsi, byte 2*SIZEOF_XMMWORD ; inptr add rbx, byte 4*SIZEOF_XMMWORD ; outptr0 add rdi, byte 4*SIZEOF_XMMWORD ; outptr1 jmp short .columnloop .nextrow: pop rsi pop rdi add rsi, byte 1*SIZEOF_JSAMPROW ; input_data add rdi, byte 2*SIZEOF_JSAMPROW ; output_data sub rcx, byte 2 ; rowctr jg near .rowloop .return: pop rbx uncollect_args 4 pop rbp ret ; For some reason, the OS X linker does not honor the request to align the ; segment unless we do this. align 32
35.277778
80
0.513684
[ "Apache-2.0" ]
IntelRealSense/RealSenseID
3rdparty/libjpeg-turbo_2_1_0/simd/x86_64/jdsample-sse2.asm
23,496
Assembly
; DO NOT MODIFY THIS FILE DIRECTLY! ; author: @TinySecEx ; ssdt asm stub for 6.3.9600-sp0-windows-8.1 i386 .686 .mmx .xmm .model flat,stdcall option casemap:none option prologue:none option epilogue:none .code ; ULONG __stdcall NtWorkerFactoryWorkerReady( ULONG arg_01 ); _6_3_9600_sp0_windows_8_1_NtWorkerFactoryWorkerReady PROC STDCALL arg_01:DWORD mov eax , 0 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtWorkerFactoryWorkerReady ENDP ; ULONG __stdcall NtAcceptConnectPort( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); _6_3_9600_sp0_windows_8_1_NtAcceptConnectPort PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 1 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtAcceptConnectPort ENDP ; ULONG __stdcall NtYieldExecution( ); _6_3_9600_sp0_windows_8_1_NtYieldExecution PROC STDCALL mov eax , 2 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtYieldExecution ENDP ; ULONG __stdcall NtWriteVirtualMemory( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtWriteVirtualMemory PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 3 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtWriteVirtualMemory ENDP ; ULONG __stdcall NtWriteRequestData( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); _6_3_9600_sp0_windows_8_1_NtWriteRequestData PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 4 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtWriteRequestData ENDP ; ULONG __stdcall NtWriteFileGather( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 ); _6_3_9600_sp0_windows_8_1_NtWriteFileGather PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD mov eax , 5 call _label_sysenter ret 36 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtWriteFileGather ENDP ; ULONG __stdcall NtWriteFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 ); _6_3_9600_sp0_windows_8_1_NtWriteFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD mov eax , 6 call _label_sysenter ret 36 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtWriteFile ENDP ; ULONG __stdcall NtWaitLowEventPair( ULONG arg_01 ); _6_3_9600_sp0_windows_8_1_NtWaitLowEventPair PROC STDCALL arg_01:DWORD mov eax , 7 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtWaitLowEventPair ENDP ; ULONG __stdcall NtWaitHighEventPair( ULONG arg_01 ); _6_3_9600_sp0_windows_8_1_NtWaitHighEventPair PROC STDCALL arg_01:DWORD mov eax , 8 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtWaitHighEventPair ENDP ; ULONG __stdcall NtWaitForWorkViaWorkerFactory( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtWaitForWorkViaWorkerFactory PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 9 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtWaitForWorkViaWorkerFactory ENDP ; ULONG __stdcall NtWaitForSingleObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtWaitForSingleObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 10 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtWaitForSingleObject ENDP ; ULONG __stdcall NtWaitForMultipleObjects32( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtWaitForMultipleObjects32 PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 11 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtWaitForMultipleObjects32 ENDP ; ULONG __stdcall NtWaitForMultipleObjects( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtWaitForMultipleObjects PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 12 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtWaitForMultipleObjects ENDP ; ULONG __stdcall NtWaitForKeyedEvent( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); _6_3_9600_sp0_windows_8_1_NtWaitForKeyedEvent PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 13 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtWaitForKeyedEvent ENDP ; ULONG __stdcall NtWaitForDebugEvent( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); _6_3_9600_sp0_windows_8_1_NtWaitForDebugEvent PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 14 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtWaitForDebugEvent ENDP ; ULONG __stdcall NtWaitForAlertByThreadId( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtWaitForAlertByThreadId PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 15 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtWaitForAlertByThreadId ENDP ; ULONG __stdcall NtVdmControl( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtVdmControl PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 16 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtVdmControl ENDP ; ULONG __stdcall NtUnsubscribeWnfStateChange( ULONG arg_01 ); _6_3_9600_sp0_windows_8_1_NtUnsubscribeWnfStateChange PROC STDCALL arg_01:DWORD mov eax , 17 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtUnsubscribeWnfStateChange ENDP ; ULONG __stdcall NtUpdateWnfStateData( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 ); _6_3_9600_sp0_windows_8_1_NtUpdateWnfStateData PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD mov eax , 18 call _label_sysenter ret 28 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtUpdateWnfStateData ENDP ; ULONG __stdcall NtUnmapViewOfSection( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtUnmapViewOfSection PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 19 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtUnmapViewOfSection ENDP ; ULONG __stdcall NtUnmapViewOfSectionEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtUnmapViewOfSectionEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 20 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtUnmapViewOfSectionEx ENDP ; ULONG __stdcall NtUnlockVirtualMemory( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); _6_3_9600_sp0_windows_8_1_NtUnlockVirtualMemory PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 21 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtUnlockVirtualMemory ENDP ; ULONG __stdcall NtUnlockFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtUnlockFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 22 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtUnlockFile ENDP ; ULONG __stdcall NtUnloadKeyEx( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtUnloadKeyEx PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 23 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtUnloadKeyEx ENDP ; ULONG __stdcall NtUnloadKey2( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtUnloadKey2 PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 24 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtUnloadKey2 ENDP ; ULONG __stdcall NtUnloadKey( ULONG arg_01 ); _6_3_9600_sp0_windows_8_1_NtUnloadKey PROC STDCALL arg_01:DWORD mov eax , 25 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtUnloadKey ENDP ; ULONG __stdcall NtUnloadDriver( ULONG arg_01 ); _6_3_9600_sp0_windows_8_1_NtUnloadDriver PROC STDCALL arg_01:DWORD mov eax , 26 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtUnloadDriver ENDP ; ULONG __stdcall NtUmsThreadYield( ULONG arg_01 ); _6_3_9600_sp0_windows_8_1_NtUmsThreadYield PROC STDCALL arg_01:DWORD mov eax , 27 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtUmsThreadYield ENDP ; ULONG __stdcall NtTranslateFilePath( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); _6_3_9600_sp0_windows_8_1_NtTranslateFilePath PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 28 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtTranslateFilePath ENDP ; ULONG __stdcall NtTraceEvent( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); _6_3_9600_sp0_windows_8_1_NtTraceEvent PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 29 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtTraceEvent ENDP ; ULONG __stdcall NtTraceControl( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); _6_3_9600_sp0_windows_8_1_NtTraceControl PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 30 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtTraceControl ENDP ; ULONG __stdcall NtThawTransactions( ); _6_3_9600_sp0_windows_8_1_NtThawTransactions PROC STDCALL mov eax , 31 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtThawTransactions ENDP ; ULONG __stdcall NtThawRegistry( ); _6_3_9600_sp0_windows_8_1_NtThawRegistry PROC STDCALL mov eax , 32 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtThawRegistry ENDP ; ULONG __stdcall NtTestAlert( ); _6_3_9600_sp0_windows_8_1_NtTestAlert PROC STDCALL mov eax , 33 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtTestAlert ENDP ; ULONG __stdcall NtTerminateThread( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtTerminateThread PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 34 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtTerminateThread ENDP ; ULONG __stdcall NtTerminateProcess( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtTerminateProcess PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 35 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtTerminateProcess ENDP ; ULONG __stdcall NtTerminateJobObject( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtTerminateJobObject PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 36 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtTerminateJobObject ENDP ; ULONG __stdcall NtSystemDebugControl( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); _6_3_9600_sp0_windows_8_1_NtSystemDebugControl PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 37 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSystemDebugControl ENDP ; ULONG __stdcall NtSuspendThread( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtSuspendThread PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 38 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSuspendThread ENDP ; ULONG __stdcall NtSuspendProcess( ULONG arg_01 ); _6_3_9600_sp0_windows_8_1_NtSuspendProcess PROC STDCALL arg_01:DWORD mov eax , 39 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSuspendProcess ENDP ; ULONG __stdcall NtSubscribeWnfStateChange( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); _6_3_9600_sp0_windows_8_1_NtSubscribeWnfStateChange PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 40 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSubscribeWnfStateChange ENDP ; ULONG __stdcall NtStopProfile( ULONG arg_01 ); _6_3_9600_sp0_windows_8_1_NtStopProfile PROC STDCALL arg_01:DWORD mov eax , 41 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtStopProfile ENDP ; ULONG __stdcall NtStartProfile( ULONG arg_01 ); _6_3_9600_sp0_windows_8_1_NtStartProfile PROC STDCALL arg_01:DWORD mov eax , 42 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtStartProfile ENDP ; ULONG __stdcall NtSinglePhaseReject( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtSinglePhaseReject PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 43 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSinglePhaseReject ENDP ; ULONG __stdcall NtSignalAndWaitForSingleObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); _6_3_9600_sp0_windows_8_1_NtSignalAndWaitForSingleObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 44 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSignalAndWaitForSingleObject ENDP ; ULONG __stdcall NtShutdownWorkerFactory( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtShutdownWorkerFactory PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 45 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtShutdownWorkerFactory ENDP ; ULONG __stdcall NtShutdownSystem( ULONG arg_01 ); _6_3_9600_sp0_windows_8_1_NtShutdownSystem PROC STDCALL arg_01:DWORD mov eax , 46 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtShutdownSystem ENDP ; ULONG __stdcall NtSetWnfProcessNotificationEvent( ULONG arg_01 ); _6_3_9600_sp0_windows_8_1_NtSetWnfProcessNotificationEvent PROC STDCALL arg_01:DWORD mov eax , 47 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSetWnfProcessNotificationEvent ENDP ; ULONG __stdcall NtSetVolumeInformationFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtSetVolumeInformationFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 48 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSetVolumeInformationFile ENDP ; ULONG __stdcall NtSetValueKey( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); _6_3_9600_sp0_windows_8_1_NtSetValueKey PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 49 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSetValueKey ENDP ; ULONG __stdcall NtSetUuidSeed( ULONG arg_01 ); _6_3_9600_sp0_windows_8_1_NtSetUuidSeed PROC STDCALL arg_01:DWORD mov eax , 50 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSetUuidSeed ENDP ; ULONG __stdcall NtSetTimerResolution( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtSetTimerResolution PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 51 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSetTimerResolution ENDP ; ULONG __stdcall NtSetTimerEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); _6_3_9600_sp0_windows_8_1_NtSetTimerEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 52 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSetTimerEx ENDP ; ULONG __stdcall NtSetTimer( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 ); _6_3_9600_sp0_windows_8_1_NtSetTimer PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD mov eax , 53 call _label_sysenter ret 28 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSetTimer ENDP ; ULONG __stdcall NtSetThreadExecutionState( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtSetThreadExecutionState PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 54 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSetThreadExecutionState ENDP ; ULONG __stdcall NtSetSystemTime( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtSetSystemTime PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 55 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSetSystemTime ENDP ; ULONG __stdcall NtSetSystemPowerState( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtSetSystemPowerState PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 56 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSetSystemPowerState ENDP ; ULONG __stdcall NtSetSystemInformation( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtSetSystemInformation PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 57 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSetSystemInformation ENDP ; ULONG __stdcall NtSetSystemEnvironmentValueEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtSetSystemEnvironmentValueEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 58 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSetSystemEnvironmentValueEx ENDP ; ULONG __stdcall NtSetSystemEnvironmentValue( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtSetSystemEnvironmentValue PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 59 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSetSystemEnvironmentValue ENDP ; ULONG __stdcall NtSetSecurityObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtSetSecurityObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 60 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSetSecurityObject ENDP ; ULONG __stdcall NtSetQuotaInformationFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); _6_3_9600_sp0_windows_8_1_NtSetQuotaInformationFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 61 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSetQuotaInformationFile ENDP ; ULONG __stdcall NtSetLowWaitHighEventPair( ULONG arg_01 ); _6_3_9600_sp0_windows_8_1_NtSetLowWaitHighEventPair PROC STDCALL arg_01:DWORD mov eax , 62 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSetLowWaitHighEventPair ENDP ; ULONG __stdcall NtSetLowEventPair( ULONG arg_01 ); _6_3_9600_sp0_windows_8_1_NtSetLowEventPair PROC STDCALL arg_01:DWORD mov eax , 63 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSetLowEventPair ENDP ; ULONG __stdcall NtSetLdtEntries( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); _6_3_9600_sp0_windows_8_1_NtSetLdtEntries PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 64 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSetLdtEntries ENDP ; ULONG __stdcall NtSetIRTimer( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtSetIRTimer PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 65 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSetIRTimer ENDP ; ULONG __stdcall NtSetTimer2( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); _6_3_9600_sp0_windows_8_1_NtSetTimer2 PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 66 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSetTimer2 ENDP ; ULONG __stdcall NtCancelTimer2( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtCancelTimer2 PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 67 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCancelTimer2 ENDP ; ULONG __stdcall NtSetIoCompletionEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); _6_3_9600_sp0_windows_8_1_NtSetIoCompletionEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 68 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSetIoCompletionEx ENDP ; ULONG __stdcall NtSetIoCompletion( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtSetIoCompletion PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 69 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSetIoCompletion ENDP ; ULONG __stdcall NtSetIntervalProfile( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtSetIntervalProfile PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 70 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSetIntervalProfile ENDP ; ULONG __stdcall NtSetInformationWorkerFactory( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); _6_3_9600_sp0_windows_8_1_NtSetInformationWorkerFactory PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 71 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSetInformationWorkerFactory ENDP ; ULONG __stdcall NtSetInformationTransactionManager( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); _6_3_9600_sp0_windows_8_1_NtSetInformationTransactionManager PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 72 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSetInformationTransactionManager ENDP ; ULONG __stdcall NtSetInformationTransaction( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); _6_3_9600_sp0_windows_8_1_NtSetInformationTransaction PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 73 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSetInformationTransaction ENDP ; ULONG __stdcall NtSetInformationToken( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); _6_3_9600_sp0_windows_8_1_NtSetInformationToken PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 74 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSetInformationToken ENDP ; ULONG __stdcall NtSetInformationThread( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); _6_3_9600_sp0_windows_8_1_NtSetInformationThread PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 75 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSetInformationThread ENDP ; ULONG __stdcall NtSetInformationResourceManager( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); _6_3_9600_sp0_windows_8_1_NtSetInformationResourceManager PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 76 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSetInformationResourceManager ENDP ; ULONG __stdcall NtSetInformationProcess( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); _6_3_9600_sp0_windows_8_1_NtSetInformationProcess PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 77 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSetInformationProcess ENDP ; ULONG __stdcall NtSetInformationObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); _6_3_9600_sp0_windows_8_1_NtSetInformationObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 78 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSetInformationObject ENDP ; ULONG __stdcall NtSetInformationKey( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); _6_3_9600_sp0_windows_8_1_NtSetInformationKey PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 79 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSetInformationKey ENDP ; ULONG __stdcall NtSetInformationJobObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); _6_3_9600_sp0_windows_8_1_NtSetInformationJobObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 80 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSetInformationJobObject ENDP ; ULONG __stdcall NtSetInformationFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtSetInformationFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 81 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSetInformationFile ENDP ; ULONG __stdcall NtSetInformationEnlistment( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); _6_3_9600_sp0_windows_8_1_NtSetInformationEnlistment PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 82 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSetInformationEnlistment ENDP ; ULONG __stdcall NtSetInformationDebugObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtSetInformationDebugObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 83 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSetInformationDebugObject ENDP ; ULONG __stdcall NtSetHighWaitLowEventPair( ULONG arg_01 ); _6_3_9600_sp0_windows_8_1_NtSetHighWaitLowEventPair PROC STDCALL arg_01:DWORD mov eax , 84 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSetHighWaitLowEventPair ENDP ; ULONG __stdcall NtSetHighEventPair( ULONG arg_01 ); _6_3_9600_sp0_windows_8_1_NtSetHighEventPair PROC STDCALL arg_01:DWORD mov eax , 85 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSetHighEventPair ENDP ; ULONG __stdcall NtSetEventBoostPriority( ULONG arg_01 ); _6_3_9600_sp0_windows_8_1_NtSetEventBoostPriority PROC STDCALL arg_01:DWORD mov eax , 86 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSetEventBoostPriority ENDP ; ULONG __stdcall NtSetEvent( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtSetEvent PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 87 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSetEvent ENDP ; ULONG __stdcall NtSetEaFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); _6_3_9600_sp0_windows_8_1_NtSetEaFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 88 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSetEaFile ENDP ; ULONG __stdcall NtSetDriverEntryOrder( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtSetDriverEntryOrder PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 89 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSetDriverEntryOrder ENDP ; ULONG __stdcall NtSetDefaultUILanguage( ULONG arg_01 ); _6_3_9600_sp0_windows_8_1_NtSetDefaultUILanguage PROC STDCALL arg_01:DWORD mov eax , 90 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSetDefaultUILanguage ENDP ; ULONG __stdcall NtSetDefaultLocale( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtSetDefaultLocale PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 91 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSetDefaultLocale ENDP ; ULONG __stdcall NtSetDefaultHardErrorPort( ULONG arg_01 ); _6_3_9600_sp0_windows_8_1_NtSetDefaultHardErrorPort PROC STDCALL arg_01:DWORD mov eax , 92 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSetDefaultHardErrorPort ENDP ; ULONG __stdcall NtSetDebugFilterState( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtSetDebugFilterState PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 93 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSetDebugFilterState ENDP ; ULONG __stdcall NtSetContextThread( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtSetContextThread PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 94 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSetContextThread ENDP ; ULONG __stdcall NtSetCachedSigningLevel( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtSetCachedSigningLevel PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 95 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSetCachedSigningLevel ENDP ; ULONG __stdcall NtSetBootOptions( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtSetBootOptions PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 96 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSetBootOptions ENDP ; ULONG __stdcall NtSetBootEntryOrder( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtSetBootEntryOrder PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 97 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSetBootEntryOrder ENDP ; ULONG __stdcall NtSerializeBoot( ); _6_3_9600_sp0_windows_8_1_NtSerializeBoot PROC STDCALL mov eax , 98 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSerializeBoot ENDP ; ULONG __stdcall NtSecureConnectPort( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 ); _6_3_9600_sp0_windows_8_1_NtSecureConnectPort PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD mov eax , 99 call _label_sysenter ret 36 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSecureConnectPort ENDP ; ULONG __stdcall NtSaveMergedKeys( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtSaveMergedKeys PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 100 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSaveMergedKeys ENDP ; ULONG __stdcall NtSaveKeyEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtSaveKeyEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 101 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSaveKeyEx ENDP ; ULONG __stdcall NtSaveKey( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtSaveKey PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 102 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSaveKey ENDP ; ULONG __stdcall NtRollforwardTransactionManager( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtRollforwardTransactionManager PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 103 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtRollforwardTransactionManager ENDP ; ULONG __stdcall NtRollbackTransaction( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtRollbackTransaction PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 104 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtRollbackTransaction ENDP ; ULONG __stdcall NtRollbackEnlistment( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtRollbackEnlistment PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 105 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtRollbackEnlistment ENDP ; ULONG __stdcall NtRollbackComplete( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtRollbackComplete PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 106 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtRollbackComplete ENDP ; ULONG __stdcall NtResumeThread( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtResumeThread PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 107 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtResumeThread ENDP ; ULONG __stdcall NtResumeProcess( ULONG arg_01 ); _6_3_9600_sp0_windows_8_1_NtResumeProcess PROC STDCALL arg_01:DWORD mov eax , 108 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtResumeProcess ENDP ; ULONG __stdcall NtRestoreKey( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtRestoreKey PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 109 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtRestoreKey ENDP ; ULONG __stdcall NtResetWriteWatch( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtResetWriteWatch PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 110 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtResetWriteWatch ENDP ; ULONG __stdcall NtResetEvent( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtResetEvent PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 111 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtResetEvent ENDP ; ULONG __stdcall NtRequestWaitReplyPort( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtRequestWaitReplyPort PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 112 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtRequestWaitReplyPort ENDP ; ULONG __stdcall NtRequestPort( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtRequestPort PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 113 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtRequestPort ENDP ; ULONG __stdcall NtReplyWaitReplyPort( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtReplyWaitReplyPort PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 114 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtReplyWaitReplyPort ENDP ; ULONG __stdcall NtReplyWaitReceivePortEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtReplyWaitReceivePortEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 115 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtReplyWaitReceivePortEx ENDP ; ULONG __stdcall NtReplyWaitReceivePort( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); _6_3_9600_sp0_windows_8_1_NtReplyWaitReceivePort PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 116 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtReplyWaitReceivePort ENDP ; ULONG __stdcall NtReplyPort( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtReplyPort PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 117 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtReplyPort ENDP ; ULONG __stdcall NtReplacePartitionUnit( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtReplacePartitionUnit PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 118 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtReplacePartitionUnit ENDP ; ULONG __stdcall NtReplaceKey( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtReplaceKey PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 119 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtReplaceKey ENDP ; ULONG __stdcall NtRenameTransactionManager( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtRenameTransactionManager PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 120 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtRenameTransactionManager ENDP ; ULONG __stdcall NtRenameKey( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtRenameKey PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 121 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtRenameKey ENDP ; ULONG __stdcall NtRemoveProcessDebug( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtRemoveProcessDebug PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 122 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtRemoveProcessDebug ENDP ; ULONG __stdcall NtRemoveIoCompletionEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); _6_3_9600_sp0_windows_8_1_NtRemoveIoCompletionEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 123 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtRemoveIoCompletionEx ENDP ; ULONG __stdcall NtRemoveIoCompletion( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtRemoveIoCompletion PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 124 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtRemoveIoCompletion ENDP ; ULONG __stdcall NtReleaseWorkerFactoryWorker( ULONG arg_01 ); _6_3_9600_sp0_windows_8_1_NtReleaseWorkerFactoryWorker PROC STDCALL arg_01:DWORD mov eax , 125 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtReleaseWorkerFactoryWorker ENDP ; ULONG __stdcall NtReleaseSemaphore( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtReleaseSemaphore PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 126 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtReleaseSemaphore ENDP ; ULONG __stdcall NtReleaseMutant( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtReleaseMutant PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 127 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtReleaseMutant ENDP ; ULONG __stdcall NtReleaseKeyedEvent( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); _6_3_9600_sp0_windows_8_1_NtReleaseKeyedEvent PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 128 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtReleaseKeyedEvent ENDP ; ULONG __stdcall NtRegisterThreadTerminatePort( ULONG arg_01 ); _6_3_9600_sp0_windows_8_1_NtRegisterThreadTerminatePort PROC STDCALL arg_01:DWORD mov eax , 129 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtRegisterThreadTerminatePort ENDP ; ULONG __stdcall NtRegisterProtocolAddressInformation( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtRegisterProtocolAddressInformation PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 130 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtRegisterProtocolAddressInformation ENDP ; ULONG __stdcall NtRecoverTransactionManager( ULONG arg_01 ); _6_3_9600_sp0_windows_8_1_NtRecoverTransactionManager PROC STDCALL arg_01:DWORD mov eax , 131 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtRecoverTransactionManager ENDP ; ULONG __stdcall NtRecoverResourceManager( ULONG arg_01 ); _6_3_9600_sp0_windows_8_1_NtRecoverResourceManager PROC STDCALL arg_01:DWORD mov eax , 132 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtRecoverResourceManager ENDP ; ULONG __stdcall NtRecoverEnlistment( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtRecoverEnlistment PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 133 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtRecoverEnlistment ENDP ; ULONG __stdcall NtReadVirtualMemory( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtReadVirtualMemory PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 134 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtReadVirtualMemory ENDP ; ULONG __stdcall NtReadRequestData( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); _6_3_9600_sp0_windows_8_1_NtReadRequestData PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 135 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtReadRequestData ENDP ; ULONG __stdcall NtReadOnlyEnlistment( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtReadOnlyEnlistment PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 136 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtReadOnlyEnlistment ENDP ; ULONG __stdcall NtReadFileScatter( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 ); _6_3_9600_sp0_windows_8_1_NtReadFileScatter PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD mov eax , 137 call _label_sysenter ret 36 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtReadFileScatter ENDP ; ULONG __stdcall NtReadFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 ); _6_3_9600_sp0_windows_8_1_NtReadFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD mov eax , 138 call _label_sysenter ret 36 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtReadFile ENDP ; ULONG __stdcall NtRaiseHardError( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); _6_3_9600_sp0_windows_8_1_NtRaiseHardError PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 139 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtRaiseHardError ENDP ; ULONG __stdcall NtRaiseException( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtRaiseException PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 140 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtRaiseException ENDP ; ULONG __stdcall NtQueueApcThreadEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); _6_3_9600_sp0_windows_8_1_NtQueueApcThreadEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 141 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQueueApcThreadEx ENDP ; ULONG __stdcall NtQueueApcThread( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtQueueApcThread PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 142 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQueueApcThread ENDP ; ULONG __stdcall NtQueryWnfStateData( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); _6_3_9600_sp0_windows_8_1_NtQueryWnfStateData PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 143 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQueryWnfStateData ENDP ; ULONG __stdcall NtQueryWnfStateNameInformation( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtQueryWnfStateNameInformation PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 144 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQueryWnfStateNameInformation ENDP ; ULONG __stdcall NtQueryVolumeInformationFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtQueryVolumeInformationFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 145 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQueryVolumeInformationFile ENDP ; ULONG __stdcall NtQueryVirtualMemory( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); _6_3_9600_sp0_windows_8_1_NtQueryVirtualMemory PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 146 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQueryVirtualMemory ENDP ; ULONG __stdcall NtQueryValueKey( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); _6_3_9600_sp0_windows_8_1_NtQueryValueKey PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 147 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQueryValueKey ENDP ; ULONG __stdcall NtQueryTimerResolution( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtQueryTimerResolution PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 148 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQueryTimerResolution ENDP ; ULONG __stdcall NtQueryTimer( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtQueryTimer PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 149 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQueryTimer ENDP ; ULONG __stdcall NtQuerySystemTime( ULONG arg_01 ); _6_3_9600_sp0_windows_8_1_NtQuerySystemTime PROC STDCALL arg_01:DWORD mov eax , 150 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQuerySystemTime ENDP ; ULONG __stdcall NtQuerySystemInformationEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); _6_3_9600_sp0_windows_8_1_NtQuerySystemInformationEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 151 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQuerySystemInformationEx ENDP ; ULONG __stdcall NtQuerySystemInformation( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); _6_3_9600_sp0_windows_8_1_NtQuerySystemInformation PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 152 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQuerySystemInformation ENDP ; ULONG __stdcall NtQuerySystemEnvironmentValueEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtQuerySystemEnvironmentValueEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 153 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQuerySystemEnvironmentValueEx ENDP ; ULONG __stdcall NtQuerySystemEnvironmentValue( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); _6_3_9600_sp0_windows_8_1_NtQuerySystemEnvironmentValue PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 154 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQuerySystemEnvironmentValue ENDP ; ULONG __stdcall NtQuerySymbolicLinkObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtQuerySymbolicLinkObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 155 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQuerySymbolicLinkObject ENDP ; ULONG __stdcall NtQuerySemaphore( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtQuerySemaphore PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 156 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQuerySemaphore ENDP ; ULONG __stdcall NtQuerySecurityObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtQuerySecurityObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 157 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQuerySecurityObject ENDP ; ULONG __stdcall NtQuerySecurityAttributesToken( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); _6_3_9600_sp0_windows_8_1_NtQuerySecurityAttributesToken PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 158 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQuerySecurityAttributesToken ENDP ; ULONG __stdcall NtQuerySection( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtQuerySection PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 159 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQuerySection ENDP ; ULONG __stdcall NtQueryQuotaInformationFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 ); _6_3_9600_sp0_windows_8_1_NtQueryQuotaInformationFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD mov eax , 160 call _label_sysenter ret 36 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQueryQuotaInformationFile ENDP ; ULONG __stdcall NtQueryPortInformationProcess( ); _6_3_9600_sp0_windows_8_1_NtQueryPortInformationProcess PROC STDCALL mov eax , 161 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQueryPortInformationProcess ENDP ; ULONG __stdcall NtQueryPerformanceCounter( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtQueryPerformanceCounter PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 162 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQueryPerformanceCounter ENDP ; ULONG __stdcall NtQueryOpenSubKeysEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); _6_3_9600_sp0_windows_8_1_NtQueryOpenSubKeysEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 163 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQueryOpenSubKeysEx ENDP ; ULONG __stdcall NtQueryOpenSubKeys( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtQueryOpenSubKeys PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 164 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQueryOpenSubKeys ENDP ; ULONG __stdcall NtQueryObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtQueryObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 165 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQueryObject ENDP ; ULONG __stdcall NtQueryMutant( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtQueryMutant PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 166 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQueryMutant ENDP ; ULONG __stdcall NtQueryMultipleValueKey( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); _6_3_9600_sp0_windows_8_1_NtQueryMultipleValueKey PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 167 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQueryMultipleValueKey ENDP ; ULONG __stdcall NtQueryLicenseValue( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtQueryLicenseValue PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 168 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQueryLicenseValue ENDP ; ULONG __stdcall NtQueryKey( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtQueryKey PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 169 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQueryKey ENDP ; ULONG __stdcall NtQueryIoCompletion( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtQueryIoCompletion PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 170 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQueryIoCompletion ENDP ; ULONG __stdcall NtQueryIntervalProfile( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtQueryIntervalProfile PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 171 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQueryIntervalProfile ENDP ; ULONG __stdcall NtQueryInstallUILanguage( ULONG arg_01 ); _6_3_9600_sp0_windows_8_1_NtQueryInstallUILanguage PROC STDCALL arg_01:DWORD mov eax , 172 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQueryInstallUILanguage ENDP ; ULONG __stdcall NtQueryInformationWorkerFactory( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtQueryInformationWorkerFactory PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 173 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQueryInformationWorkerFactory ENDP ; ULONG __stdcall NtQueryInformationTransactionManager( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtQueryInformationTransactionManager PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 174 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQueryInformationTransactionManager ENDP ; ULONG __stdcall NtQueryInformationTransaction( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtQueryInformationTransaction PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 175 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQueryInformationTransaction ENDP ; ULONG __stdcall NtQueryInformationToken( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtQueryInformationToken PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 176 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQueryInformationToken ENDP ; ULONG __stdcall NtQueryInformationThread( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtQueryInformationThread PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 177 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQueryInformationThread ENDP ; ULONG __stdcall NtQueryInformationResourceManager( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtQueryInformationResourceManager PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 178 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQueryInformationResourceManager ENDP ; ULONG __stdcall NtQueryInformationProcess( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtQueryInformationProcess PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 179 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQueryInformationProcess ENDP ; ULONG __stdcall NtQueryInformationPort( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtQueryInformationPort PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 180 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQueryInformationPort ENDP ; ULONG __stdcall NtQueryInformationJobObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtQueryInformationJobObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 181 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQueryInformationJobObject ENDP ; ULONG __stdcall NtQueryInformationFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtQueryInformationFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 182 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQueryInformationFile ENDP ; ULONG __stdcall NtQueryInformationEnlistment( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtQueryInformationEnlistment PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 183 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQueryInformationEnlistment ENDP ; ULONG __stdcall NtQueryInformationAtom( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtQueryInformationAtom PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 184 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQueryInformationAtom ENDP ; ULONG __stdcall NtQueryFullAttributesFile( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtQueryFullAttributesFile PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 185 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQueryFullAttributesFile ENDP ; ULONG __stdcall NtQueryEvent( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtQueryEvent PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 186 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQueryEvent ENDP ; ULONG __stdcall NtQueryEaFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 ); _6_3_9600_sp0_windows_8_1_NtQueryEaFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD mov eax , 187 call _label_sysenter ret 36 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQueryEaFile ENDP ; ULONG __stdcall NtQueryDriverEntryOrder( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtQueryDriverEntryOrder PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 188 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQueryDriverEntryOrder ENDP ; ULONG __stdcall NtQueryDirectoryObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 ); _6_3_9600_sp0_windows_8_1_NtQueryDirectoryObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD mov eax , 189 call _label_sysenter ret 28 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQueryDirectoryObject ENDP ; ULONG __stdcall NtQueryDirectoryFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 ); _6_3_9600_sp0_windows_8_1_NtQueryDirectoryFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD mov eax , 190 call _label_sysenter ret 44 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQueryDirectoryFile ENDP ; ULONG __stdcall NtQueryDefaultUILanguage( ULONG arg_01 ); _6_3_9600_sp0_windows_8_1_NtQueryDefaultUILanguage PROC STDCALL arg_01:DWORD mov eax , 191 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQueryDefaultUILanguage ENDP ; ULONG __stdcall NtQueryDefaultLocale( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtQueryDefaultLocale PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 192 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQueryDefaultLocale ENDP ; ULONG __stdcall NtQueryDebugFilterState( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtQueryDebugFilterState PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 193 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQueryDebugFilterState ENDP ; ULONG __stdcall NtQueryBootOptions( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtQueryBootOptions PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 194 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQueryBootOptions ENDP ; ULONG __stdcall NtQueryBootEntryOrder( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtQueryBootEntryOrder PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 195 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQueryBootEntryOrder ENDP ; ULONG __stdcall NtQueryAttributesFile( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtQueryAttributesFile PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 196 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtQueryAttributesFile ENDP ; ULONG __stdcall NtPulseEvent( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtPulseEvent PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 197 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtPulseEvent ENDP ; ULONG __stdcall NtProtectVirtualMemory( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtProtectVirtualMemory PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 198 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtProtectVirtualMemory ENDP ; ULONG __stdcall NtPropagationFailed( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtPropagationFailed PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 199 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtPropagationFailed ENDP ; ULONG __stdcall NtPropagationComplete( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); _6_3_9600_sp0_windows_8_1_NtPropagationComplete PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 200 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtPropagationComplete ENDP ; ULONG __stdcall NtPrivilegeObjectAuditAlarm( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); _6_3_9600_sp0_windows_8_1_NtPrivilegeObjectAuditAlarm PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 201 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtPrivilegeObjectAuditAlarm ENDP ; ULONG __stdcall NtPrivilegedServiceAuditAlarm( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtPrivilegedServiceAuditAlarm PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 202 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtPrivilegedServiceAuditAlarm ENDP ; ULONG __stdcall NtPrivilegeCheck( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtPrivilegeCheck PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 203 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtPrivilegeCheck ENDP ; ULONG __stdcall NtSetInformationVirtualMemory( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); _6_3_9600_sp0_windows_8_1_NtSetInformationVirtualMemory PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 204 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtSetInformationVirtualMemory ENDP ; ULONG __stdcall NtPrePrepareEnlistment( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtPrePrepareEnlistment PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 205 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtPrePrepareEnlistment ENDP ; ULONG __stdcall NtPrePrepareComplete( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtPrePrepareComplete PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 206 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtPrePrepareComplete ENDP ; ULONG __stdcall NtPrepareEnlistment( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtPrepareEnlistment PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 207 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtPrepareEnlistment ENDP ; ULONG __stdcall NtPrepareComplete( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtPrepareComplete PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 208 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtPrepareComplete ENDP ; ULONG __stdcall NtPowerInformation( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtPowerInformation PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 209 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtPowerInformation ENDP ; ULONG __stdcall NtPlugPlayControl( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtPlugPlayControl PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 210 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtPlugPlayControl ENDP ; ULONG __stdcall NtOpenTransactionManager( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); _6_3_9600_sp0_windows_8_1_NtOpenTransactionManager PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 211 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtOpenTransactionManager ENDP ; ULONG __stdcall NtOpenTransaction( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtOpenTransaction PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 212 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtOpenTransaction ENDP ; ULONG __stdcall NtOpenTimer( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtOpenTimer PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 213 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtOpenTimer ENDP ; ULONG __stdcall NtOpenThreadTokenEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtOpenThreadTokenEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 214 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtOpenThreadTokenEx ENDP ; ULONG __stdcall NtOpenThreadToken( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); _6_3_9600_sp0_windows_8_1_NtOpenThreadToken PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 215 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtOpenThreadToken ENDP ; ULONG __stdcall NtOpenThread( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); _6_3_9600_sp0_windows_8_1_NtOpenThread PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 216 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtOpenThread ENDP ; ULONG __stdcall NtOpenSymbolicLinkObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtOpenSymbolicLinkObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 217 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtOpenSymbolicLinkObject ENDP ; ULONG __stdcall NtOpenSession( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtOpenSession PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 218 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtOpenSession ENDP ; ULONG __stdcall NtOpenSemaphore( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtOpenSemaphore PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 219 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtOpenSemaphore ENDP ; ULONG __stdcall NtOpenSection( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtOpenSection PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 220 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtOpenSection ENDP ; ULONG __stdcall NtOpenResourceManager( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtOpenResourceManager PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 221 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtOpenResourceManager ENDP ; ULONG __stdcall NtOpenProcessTokenEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); _6_3_9600_sp0_windows_8_1_NtOpenProcessTokenEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 222 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtOpenProcessTokenEx ENDP ; ULONG __stdcall NtOpenProcessToken( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtOpenProcessToken PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 223 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtOpenProcessToken ENDP ; ULONG __stdcall NtOpenProcess( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); _6_3_9600_sp0_windows_8_1_NtOpenProcess PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 224 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtOpenProcess ENDP ; ULONG __stdcall NtOpenPrivateNamespace( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); _6_3_9600_sp0_windows_8_1_NtOpenPrivateNamespace PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 225 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtOpenPrivateNamespace ENDP ; ULONG __stdcall NtOpenObjectAuditAlarm( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 , ULONG arg_12 ); _6_3_9600_sp0_windows_8_1_NtOpenObjectAuditAlarm PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD , arg_12:DWORD mov eax , 226 call _label_sysenter ret 48 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtOpenObjectAuditAlarm ENDP ; ULONG __stdcall NtOpenMutant( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtOpenMutant PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 227 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtOpenMutant ENDP ; ULONG __stdcall NtOpenKeyTransactedEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtOpenKeyTransactedEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 228 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtOpenKeyTransactedEx ENDP ; ULONG __stdcall NtOpenKeyTransacted( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); _6_3_9600_sp0_windows_8_1_NtOpenKeyTransacted PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 229 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtOpenKeyTransacted ENDP ; ULONG __stdcall NtOpenKeyEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); _6_3_9600_sp0_windows_8_1_NtOpenKeyEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 230 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtOpenKeyEx ENDP ; ULONG __stdcall NtOpenKeyedEvent( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtOpenKeyedEvent PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 231 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtOpenKeyedEvent ENDP ; ULONG __stdcall NtOpenKey( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtOpenKey PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 232 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtOpenKey ENDP ; ULONG __stdcall NtOpenJobObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtOpenJobObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 233 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtOpenJobObject ENDP ; ULONG __stdcall NtOpenIoCompletion( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtOpenIoCompletion PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 234 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtOpenIoCompletion ENDP ; ULONG __stdcall NtOpenFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); _6_3_9600_sp0_windows_8_1_NtOpenFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 235 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtOpenFile ENDP ; ULONG __stdcall NtOpenEventPair( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtOpenEventPair PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 236 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtOpenEventPair ENDP ; ULONG __stdcall NtOpenEvent( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtOpenEvent PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 237 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtOpenEvent ENDP ; ULONG __stdcall NtOpenEnlistment( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtOpenEnlistment PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 238 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtOpenEnlistment ENDP ; ULONG __stdcall NtOpenDirectoryObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtOpenDirectoryObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 239 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtOpenDirectoryObject ENDP ; ULONG __stdcall NtNotifyChangeSession( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 ); _6_3_9600_sp0_windows_8_1_NtNotifyChangeSession PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD mov eax , 240 call _label_sysenter ret 32 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtNotifyChangeSession ENDP ; ULONG __stdcall NtNotifyChangeMultipleKeys( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 , ULONG arg_12 ); _6_3_9600_sp0_windows_8_1_NtNotifyChangeMultipleKeys PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD , arg_12:DWORD mov eax , 241 call _label_sysenter ret 48 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtNotifyChangeMultipleKeys ENDP ; ULONG __stdcall NtNotifyChangeKey( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 ); _6_3_9600_sp0_windows_8_1_NtNotifyChangeKey PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD mov eax , 242 call _label_sysenter ret 40 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtNotifyChangeKey ENDP ; ULONG __stdcall NtNotifyChangeDirectoryFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 ); _6_3_9600_sp0_windows_8_1_NtNotifyChangeDirectoryFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD mov eax , 243 call _label_sysenter ret 36 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtNotifyChangeDirectoryFile ENDP ; ULONG __stdcall NtModifyDriverEntry( ULONG arg_01 ); _6_3_9600_sp0_windows_8_1_NtModifyDriverEntry PROC STDCALL arg_01:DWORD mov eax , 244 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtModifyDriverEntry ENDP ; ULONG __stdcall NtModifyBootEntry( ULONG arg_01 ); _6_3_9600_sp0_windows_8_1_NtModifyBootEntry PROC STDCALL arg_01:DWORD mov eax , 245 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtModifyBootEntry ENDP ; ULONG __stdcall NtMapViewOfSection( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 ); _6_3_9600_sp0_windows_8_1_NtMapViewOfSection PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD mov eax , 246 call _label_sysenter ret 40 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtMapViewOfSection ENDP ; ULONG __stdcall NtMapUserPhysicalPagesScatter( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtMapUserPhysicalPagesScatter PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 247 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtMapUserPhysicalPagesScatter ENDP ; ULONG __stdcall NtMapUserPhysicalPages( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtMapUserPhysicalPages PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 248 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtMapUserPhysicalPages ENDP ; ULONG __stdcall NtMapCMFModule( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); _6_3_9600_sp0_windows_8_1_NtMapCMFModule PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 249 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtMapCMFModule ENDP ; ULONG __stdcall NtMakeTemporaryObject( ULONG arg_01 ); _6_3_9600_sp0_windows_8_1_NtMakeTemporaryObject PROC STDCALL arg_01:DWORD mov eax , 250 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtMakeTemporaryObject ENDP ; ULONG __stdcall NtMakePermanentObject( ULONG arg_01 ); _6_3_9600_sp0_windows_8_1_NtMakePermanentObject PROC STDCALL arg_01:DWORD mov eax , 251 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtMakePermanentObject ENDP ; ULONG __stdcall NtLockVirtualMemory( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); _6_3_9600_sp0_windows_8_1_NtLockVirtualMemory PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 252 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtLockVirtualMemory ENDP ; ULONG __stdcall NtLockRegistryKey( ULONG arg_01 ); _6_3_9600_sp0_windows_8_1_NtLockRegistryKey PROC STDCALL arg_01:DWORD mov eax , 253 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtLockRegistryKey ENDP ; ULONG __stdcall NtLockProductActivationKeys( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtLockProductActivationKeys PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 254 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtLockProductActivationKeys ENDP ; ULONG __stdcall NtLockFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 ); _6_3_9600_sp0_windows_8_1_NtLockFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD mov eax , 255 call _label_sysenter ret 40 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtLockFile ENDP ; ULONG __stdcall NtLoadKeyEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 ); _6_3_9600_sp0_windows_8_1_NtLoadKeyEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD mov eax , 256 call _label_sysenter ret 32 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtLoadKeyEx ENDP ; ULONG __stdcall NtLoadKey2( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtLoadKey2 PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 257 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtLoadKey2 ENDP ; ULONG __stdcall NtLoadKey( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtLoadKey PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 258 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtLoadKey ENDP ; ULONG __stdcall NtLoadDriver( ULONG arg_01 ); _6_3_9600_sp0_windows_8_1_NtLoadDriver PROC STDCALL arg_01:DWORD mov eax , 259 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtLoadDriver ENDP ; ULONG __stdcall NtListenPort( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtListenPort PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 260 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtListenPort ENDP ; ULONG __stdcall NtIsUILanguageComitted( ); _6_3_9600_sp0_windows_8_1_NtIsUILanguageComitted PROC STDCALL mov eax , 261 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtIsUILanguageComitted ENDP ; ULONG __stdcall NtIsSystemResumeAutomatic( ); _6_3_9600_sp0_windows_8_1_NtIsSystemResumeAutomatic PROC STDCALL mov eax , 262 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtIsSystemResumeAutomatic ENDP ; ULONG __stdcall NtIsProcessInJob( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtIsProcessInJob PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 263 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtIsProcessInJob ENDP ; ULONG __stdcall NtInitiatePowerAction( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); _6_3_9600_sp0_windows_8_1_NtInitiatePowerAction PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 264 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtInitiatePowerAction ENDP ; ULONG __stdcall NtInitializeRegistry( ULONG arg_01 ); _6_3_9600_sp0_windows_8_1_NtInitializeRegistry PROC STDCALL arg_01:DWORD mov eax , 265 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtInitializeRegistry ENDP ; ULONG __stdcall NtInitializeNlsFiles( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtInitializeNlsFiles PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 266 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtInitializeNlsFiles ENDP ; ULONG __stdcall NtImpersonateThread( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtImpersonateThread PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 267 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtImpersonateThread ENDP ; ULONG __stdcall NtImpersonateClientOfPort( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtImpersonateClientOfPort PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 268 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtImpersonateClientOfPort ENDP ; ULONG __stdcall NtImpersonateAnonymousToken( ULONG arg_01 ); _6_3_9600_sp0_windows_8_1_NtImpersonateAnonymousToken PROC STDCALL arg_01:DWORD mov eax , 269 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtImpersonateAnonymousToken ENDP ; ULONG __stdcall NtGetWriteWatch( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 ); _6_3_9600_sp0_windows_8_1_NtGetWriteWatch PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD mov eax , 270 call _label_sysenter ret 28 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtGetWriteWatch ENDP ; ULONG __stdcall NtGetNotificationResourceManager( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 ); _6_3_9600_sp0_windows_8_1_NtGetNotificationResourceManager PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD mov eax , 271 call _label_sysenter ret 28 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtGetNotificationResourceManager ENDP ; ULONG __stdcall NtGetNlsSectionPtr( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtGetNlsSectionPtr PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 272 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtGetNlsSectionPtr ENDP ; ULONG __stdcall NtGetNextThread( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); _6_3_9600_sp0_windows_8_1_NtGetNextThread PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 273 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtGetNextThread ENDP ; ULONG __stdcall NtGetNextProcess( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtGetNextProcess PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 274 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtGetNextProcess ENDP ; ULONG __stdcall NtGetMUIRegistryInfo( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtGetMUIRegistryInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 275 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtGetMUIRegistryInfo ENDP ; ULONG __stdcall NtGetDevicePowerState( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtGetDevicePowerState PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 276 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtGetDevicePowerState ENDP ; ULONG __stdcall NtGetCurrentProcessorNumber( ); _6_3_9600_sp0_windows_8_1_NtGetCurrentProcessorNumber PROC STDCALL mov eax , 277 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtGetCurrentProcessorNumber ENDP ; ULONG __stdcall NtGetContextThread( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtGetContextThread PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 278 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtGetContextThread ENDP ; ULONG __stdcall NtGetCompleteWnfStateSubscription( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); _6_3_9600_sp0_windows_8_1_NtGetCompleteWnfStateSubscription PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 279 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtGetCompleteWnfStateSubscription ENDP ; ULONG __stdcall NtGetCachedSigningLevel( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); _6_3_9600_sp0_windows_8_1_NtGetCachedSigningLevel PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 280 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtGetCachedSigningLevel ENDP ; ULONG __stdcall NtFsControlFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 ); _6_3_9600_sp0_windows_8_1_NtFsControlFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD mov eax , 281 call _label_sysenter ret 40 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtFsControlFile ENDP ; ULONG __stdcall NtFreezeTransactions( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtFreezeTransactions PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 282 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtFreezeTransactions ENDP ; ULONG __stdcall NtFreezeRegistry( ULONG arg_01 ); _6_3_9600_sp0_windows_8_1_NtFreezeRegistry PROC STDCALL arg_01:DWORD mov eax , 283 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtFreezeRegistry ENDP ; ULONG __stdcall NtFreeVirtualMemory( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); _6_3_9600_sp0_windows_8_1_NtFreeVirtualMemory PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 284 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtFreeVirtualMemory ENDP ; ULONG __stdcall NtFreeUserPhysicalPages( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtFreeUserPhysicalPages PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 285 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtFreeUserPhysicalPages ENDP ; ULONG __stdcall NtFlushWriteBuffer( ); _6_3_9600_sp0_windows_8_1_NtFlushWriteBuffer PROC STDCALL mov eax , 286 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtFlushWriteBuffer ENDP ; ULONG __stdcall NtFlushVirtualMemory( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); _6_3_9600_sp0_windows_8_1_NtFlushVirtualMemory PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 287 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtFlushVirtualMemory ENDP ; ULONG __stdcall NtFlushProcessWriteBuffers( ); _6_3_9600_sp0_windows_8_1_NtFlushProcessWriteBuffers PROC STDCALL mov eax , 288 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtFlushProcessWriteBuffers ENDP ; ULONG __stdcall NtFlushKey( ULONG arg_01 ); _6_3_9600_sp0_windows_8_1_NtFlushKey PROC STDCALL arg_01:DWORD mov eax , 289 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtFlushKey ENDP ; ULONG __stdcall NtFlushInstructionCache( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtFlushInstructionCache PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 290 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtFlushInstructionCache ENDP ; ULONG __stdcall NtFlushInstallUILanguage( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtFlushInstallUILanguage PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 291 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtFlushInstallUILanguage ENDP ; ULONG __stdcall NtFlushBuffersFile( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtFlushBuffersFile PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 292 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtFlushBuffersFile ENDP ; ULONG __stdcall NtFlushBuffersFileEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtFlushBuffersFileEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 293 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtFlushBuffersFileEx ENDP ; ULONG __stdcall NtFindAtom( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtFindAtom PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 294 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtFindAtom ENDP ; ULONG __stdcall NtFilterToken( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); _6_3_9600_sp0_windows_8_1_NtFilterToken PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 295 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtFilterToken ENDP ; ULONG __stdcall NtFilterTokenEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 , ULONG arg_12 , ULONG arg_13 , ULONG arg_14 ); _6_3_9600_sp0_windows_8_1_NtFilterTokenEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD , arg_12:DWORD , arg_13:DWORD , arg_14:DWORD mov eax , 296 call _label_sysenter ret 56 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtFilterTokenEx ENDP ; ULONG __stdcall NtFilterBootOption( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtFilterBootOption PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 297 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtFilterBootOption ENDP ; ULONG __stdcall NtExtendSection( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtExtendSection PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 298 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtExtendSection ENDP ; ULONG __stdcall NtEnumerateValueKey( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); _6_3_9600_sp0_windows_8_1_NtEnumerateValueKey PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 299 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtEnumerateValueKey ENDP ; ULONG __stdcall NtEnumerateTransactionObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtEnumerateTransactionObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 300 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtEnumerateTransactionObject ENDP ; ULONG __stdcall NtEnumerateSystemEnvironmentValuesEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtEnumerateSystemEnvironmentValuesEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 301 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtEnumerateSystemEnvironmentValuesEx ENDP ; ULONG __stdcall NtEnumerateKey( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); _6_3_9600_sp0_windows_8_1_NtEnumerateKey PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 302 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtEnumerateKey ENDP ; ULONG __stdcall NtEnumerateDriverEntries( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtEnumerateDriverEntries PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 303 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtEnumerateDriverEntries ENDP ; ULONG __stdcall NtEnumerateBootEntries( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtEnumerateBootEntries PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 304 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtEnumerateBootEntries ENDP ; ULONG __stdcall NtEnableLastKnownGood( ); _6_3_9600_sp0_windows_8_1_NtEnableLastKnownGood PROC STDCALL mov eax , 305 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtEnableLastKnownGood ENDP ; ULONG __stdcall NtDuplicateToken( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); _6_3_9600_sp0_windows_8_1_NtDuplicateToken PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 306 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtDuplicateToken ENDP ; ULONG __stdcall NtDuplicateObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 ); _6_3_9600_sp0_windows_8_1_NtDuplicateObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD mov eax , 307 call _label_sysenter ret 28 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtDuplicateObject ENDP ; ULONG __stdcall NtDrawText( ULONG arg_01 ); _6_3_9600_sp0_windows_8_1_NtDrawText PROC STDCALL arg_01:DWORD mov eax , 308 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtDrawText ENDP ; ULONG __stdcall NtDisplayString( ULONG arg_01 ); _6_3_9600_sp0_windows_8_1_NtDisplayString PROC STDCALL arg_01:DWORD mov eax , 309 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtDisplayString ENDP ; ULONG __stdcall NtDisableLastKnownGood( ); _6_3_9600_sp0_windows_8_1_NtDisableLastKnownGood PROC STDCALL mov eax , 310 call _label_sysenter ret _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtDisableLastKnownGood ENDP ; ULONG __stdcall NtDeviceIoControlFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 ); _6_3_9600_sp0_windows_8_1_NtDeviceIoControlFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD mov eax , 311 call _label_sysenter ret 40 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtDeviceIoControlFile ENDP ; ULONG __stdcall NtDeleteWnfStateName( ULONG arg_01 ); _6_3_9600_sp0_windows_8_1_NtDeleteWnfStateName PROC STDCALL arg_01:DWORD mov eax , 312 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtDeleteWnfStateName ENDP ; ULONG __stdcall NtDeleteWnfStateData( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtDeleteWnfStateData PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 313 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtDeleteWnfStateData ENDP ; ULONG __stdcall NtDeleteValueKey( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtDeleteValueKey PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 314 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtDeleteValueKey ENDP ; ULONG __stdcall NtDeletePrivateNamespace( ULONG arg_01 ); _6_3_9600_sp0_windows_8_1_NtDeletePrivateNamespace PROC STDCALL arg_01:DWORD mov eax , 315 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtDeletePrivateNamespace ENDP ; ULONG __stdcall NtDeleteObjectAuditAlarm( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtDeleteObjectAuditAlarm PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 316 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtDeleteObjectAuditAlarm ENDP ; ULONG __stdcall NtDeleteKey( ULONG arg_01 ); _6_3_9600_sp0_windows_8_1_NtDeleteKey PROC STDCALL arg_01:DWORD mov eax , 317 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtDeleteKey ENDP ; ULONG __stdcall NtDeleteFile( ULONG arg_01 ); _6_3_9600_sp0_windows_8_1_NtDeleteFile PROC STDCALL arg_01:DWORD mov eax , 318 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtDeleteFile ENDP ; ULONG __stdcall NtDeleteDriverEntry( ULONG arg_01 ); _6_3_9600_sp0_windows_8_1_NtDeleteDriverEntry PROC STDCALL arg_01:DWORD mov eax , 319 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtDeleteDriverEntry ENDP ; ULONG __stdcall NtDeleteBootEntry( ULONG arg_01 ); _6_3_9600_sp0_windows_8_1_NtDeleteBootEntry PROC STDCALL arg_01:DWORD mov eax , 320 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtDeleteBootEntry ENDP ; ULONG __stdcall NtDeleteAtom( ULONG arg_01 ); _6_3_9600_sp0_windows_8_1_NtDeleteAtom PROC STDCALL arg_01:DWORD mov eax , 321 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtDeleteAtom ENDP ; ULONG __stdcall NtDelayExecution( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtDelayExecution PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 322 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtDelayExecution ENDP ; ULONG __stdcall NtDebugContinue( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtDebugContinue PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 323 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtDebugContinue ENDP ; ULONG __stdcall NtDebugActiveProcess( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtDebugActiveProcess PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 324 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtDebugActiveProcess ENDP ; ULONG __stdcall NtCreateWorkerFactory( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 ); _6_3_9600_sp0_windows_8_1_NtCreateWorkerFactory PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD mov eax , 325 call _label_sysenter ret 40 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCreateWorkerFactory ENDP ; ULONG __stdcall NtCreateWnfStateName( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 ); _6_3_9600_sp0_windows_8_1_NtCreateWnfStateName PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD mov eax , 326 call _label_sysenter ret 28 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCreateWnfStateName ENDP ; ULONG __stdcall NtCreateWaitCompletionPacket( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtCreateWaitCompletionPacket PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 327 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCreateWaitCompletionPacket ENDP ; ULONG __stdcall NtCreateWaitablePort( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtCreateWaitablePort PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 328 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCreateWaitablePort ENDP ; ULONG __stdcall NtCreateUserProcess( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 ); _6_3_9600_sp0_windows_8_1_NtCreateUserProcess PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD mov eax , 329 call _label_sysenter ret 44 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCreateUserProcess ENDP ; ULONG __stdcall NtCreateTransactionManager( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); _6_3_9600_sp0_windows_8_1_NtCreateTransactionManager PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 330 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCreateTransactionManager ENDP ; ULONG __stdcall NtCreateTransaction( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 ); _6_3_9600_sp0_windows_8_1_NtCreateTransaction PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD mov eax , 331 call _label_sysenter ret 40 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCreateTransaction ENDP ; ULONG __stdcall NtCreateToken( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 , ULONG arg_12 , ULONG arg_13 ); _6_3_9600_sp0_windows_8_1_NtCreateToken PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD , arg_12:DWORD , arg_13:DWORD mov eax , 332 call _label_sysenter ret 52 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCreateToken ENDP ; ULONG __stdcall NtCreateLowBoxToken( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 ); _6_3_9600_sp0_windows_8_1_NtCreateLowBoxToken PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD mov eax , 333 call _label_sysenter ret 36 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCreateLowBoxToken ENDP ; ULONG __stdcall NtCreateTokenEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 , ULONG arg_12 , ULONG arg_13 , ULONG arg_14 , ULONG arg_15 , ULONG arg_16 , ULONG arg_17 ); _6_3_9600_sp0_windows_8_1_NtCreateTokenEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD , arg_12:DWORD , arg_13:DWORD , arg_14:DWORD , arg_15:DWORD , arg_16:DWORD , arg_17:DWORD mov eax , 334 call _label_sysenter ret 68 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCreateTokenEx ENDP ; ULONG __stdcall NtCreateTimer( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); _6_3_9600_sp0_windows_8_1_NtCreateTimer PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 335 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCreateTimer ENDP ; ULONG __stdcall NtCreateThreadEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 ); _6_3_9600_sp0_windows_8_1_NtCreateThreadEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD mov eax , 336 call _label_sysenter ret 44 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCreateThreadEx ENDP ; ULONG __stdcall NtCreateThread( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 ); _6_3_9600_sp0_windows_8_1_NtCreateThread PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD mov eax , 337 call _label_sysenter ret 32 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCreateThread ENDP ; ULONG __stdcall NtCreateSymbolicLinkObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); _6_3_9600_sp0_windows_8_1_NtCreateSymbolicLinkObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 338 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCreateSymbolicLinkObject ENDP ; ULONG __stdcall NtCreateSemaphore( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtCreateSemaphore PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 339 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCreateSemaphore ENDP ; ULONG __stdcall NtCreateSection( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 ); _6_3_9600_sp0_windows_8_1_NtCreateSection PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD mov eax , 340 call _label_sysenter ret 28 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCreateSection ENDP ; ULONG __stdcall NtCreateResourceManager( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 ); _6_3_9600_sp0_windows_8_1_NtCreateResourceManager PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD mov eax , 341 call _label_sysenter ret 28 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCreateResourceManager ENDP ; ULONG __stdcall NtCreateProfileEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 ); _6_3_9600_sp0_windows_8_1_NtCreateProfileEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD mov eax , 342 call _label_sysenter ret 40 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCreateProfileEx ENDP ; ULONG __stdcall NtCreateProfile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 ); _6_3_9600_sp0_windows_8_1_NtCreateProfile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD mov eax , 343 call _label_sysenter ret 36 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCreateProfile ENDP ; ULONG __stdcall NtCreateProcessEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 ); _6_3_9600_sp0_windows_8_1_NtCreateProcessEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD mov eax , 344 call _label_sysenter ret 36 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCreateProcessEx ENDP ; ULONG __stdcall NtCreateProcess( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 ); _6_3_9600_sp0_windows_8_1_NtCreateProcess PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD mov eax , 345 call _label_sysenter ret 32 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCreateProcess ENDP ; ULONG __stdcall NtCreatePrivateNamespace( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); _6_3_9600_sp0_windows_8_1_NtCreatePrivateNamespace PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 346 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCreatePrivateNamespace ENDP ; ULONG __stdcall NtCreatePort( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtCreatePort PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 347 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCreatePort ENDP ; ULONG __stdcall NtCreatePagingFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); _6_3_9600_sp0_windows_8_1_NtCreatePagingFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 348 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCreatePagingFile ENDP ; ULONG __stdcall NtCreateNamedPipeFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 , ULONG arg_12 , ULONG arg_13 , ULONG arg_14 ); _6_3_9600_sp0_windows_8_1_NtCreateNamedPipeFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD , arg_12:DWORD , arg_13:DWORD , arg_14:DWORD mov eax , 349 call _label_sysenter ret 56 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCreateNamedPipeFile ENDP ; ULONG __stdcall NtCreateMutant( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); _6_3_9600_sp0_windows_8_1_NtCreateMutant PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 350 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCreateMutant ENDP ; ULONG __stdcall NtCreateMailslotFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 ); _6_3_9600_sp0_windows_8_1_NtCreateMailslotFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD mov eax , 351 call _label_sysenter ret 32 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCreateMailslotFile ENDP ; ULONG __stdcall NtCreateKeyTransacted( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 ); _6_3_9600_sp0_windows_8_1_NtCreateKeyTransacted PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD mov eax , 352 call _label_sysenter ret 32 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCreateKeyTransacted ENDP ; ULONG __stdcall NtCreateKeyedEvent( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); _6_3_9600_sp0_windows_8_1_NtCreateKeyedEvent PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 353 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCreateKeyedEvent ENDP ; ULONG __stdcall NtCreateKey( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 ); _6_3_9600_sp0_windows_8_1_NtCreateKey PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD mov eax , 354 call _label_sysenter ret 28 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCreateKey ENDP ; ULONG __stdcall NtCreateJobSet( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtCreateJobSet PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 355 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCreateJobSet ENDP ; ULONG __stdcall NtCreateJobObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtCreateJobObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 356 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCreateJobObject ENDP ; ULONG __stdcall NtCreateIRTimer( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtCreateIRTimer PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 357 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCreateIRTimer ENDP ; ULONG __stdcall NtCreateTimer2( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtCreateTimer2 PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 358 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCreateTimer2 ENDP ; ULONG __stdcall NtCreateIoCompletion( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); _6_3_9600_sp0_windows_8_1_NtCreateIoCompletion PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 359 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCreateIoCompletion ENDP ; ULONG __stdcall NtCreateFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 ); _6_3_9600_sp0_windows_8_1_NtCreateFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD mov eax , 360 call _label_sysenter ret 44 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCreateFile ENDP ; ULONG __stdcall NtCreateEventPair( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtCreateEventPair PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 361 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCreateEventPair ENDP ; ULONG __stdcall NtCreateEvent( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtCreateEvent PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 362 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCreateEvent ENDP ; ULONG __stdcall NtCreateEnlistment( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 ); _6_3_9600_sp0_windows_8_1_NtCreateEnlistment PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD mov eax , 363 call _label_sysenter ret 32 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCreateEnlistment ENDP ; ULONG __stdcall NtCreateDirectoryObjectEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtCreateDirectoryObjectEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 364 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCreateDirectoryObjectEx ENDP ; ULONG __stdcall NtCreateDirectoryObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtCreateDirectoryObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 365 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCreateDirectoryObject ENDP ; ULONG __stdcall NtCreateDebugObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); _6_3_9600_sp0_windows_8_1_NtCreateDebugObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 366 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCreateDebugObject ENDP ; ULONG __stdcall NtContinue( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtContinue PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 367 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtContinue ENDP ; ULONG __stdcall NtConnectPort( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 ); _6_3_9600_sp0_windows_8_1_NtConnectPort PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD mov eax , 368 call _label_sysenter ret 32 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtConnectPort ENDP ; ULONG __stdcall NtCompressKey( ULONG arg_01 ); _6_3_9600_sp0_windows_8_1_NtCompressKey PROC STDCALL arg_01:DWORD mov eax , 369 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCompressKey ENDP ; ULONG __stdcall NtCompleteConnectPort( ULONG arg_01 ); _6_3_9600_sp0_windows_8_1_NtCompleteConnectPort PROC STDCALL arg_01:DWORD mov eax , 370 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCompleteConnectPort ENDP ; ULONG __stdcall NtCompareTokens( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtCompareTokens PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 371 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCompareTokens ENDP ; ULONG __stdcall NtCompactKeys( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtCompactKeys PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 372 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCompactKeys ENDP ; ULONG __stdcall NtCommitTransaction( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtCommitTransaction PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 373 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCommitTransaction ENDP ; ULONG __stdcall NtCommitEnlistment( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtCommitEnlistment PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 374 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCommitEnlistment ENDP ; ULONG __stdcall NtCommitComplete( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtCommitComplete PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 375 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCommitComplete ENDP ; ULONG __stdcall NtCloseObjectAuditAlarm( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtCloseObjectAuditAlarm PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 376 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCloseObjectAuditAlarm ENDP ; ULONG __stdcall NtClose( ULONG arg_01 ); _6_3_9600_sp0_windows_8_1_NtClose PROC STDCALL arg_01:DWORD mov eax , 377 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtClose ENDP ; ULONG __stdcall NtClearEvent( ULONG arg_01 ); _6_3_9600_sp0_windows_8_1_NtClearEvent PROC STDCALL arg_01:DWORD mov eax , 378 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtClearEvent ENDP ; ULONG __stdcall NtCancelWaitCompletionPacket( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtCancelWaitCompletionPacket PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 379 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCancelWaitCompletionPacket ENDP ; ULONG __stdcall NtCancelTimer( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtCancelTimer PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 380 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCancelTimer ENDP ; ULONG __stdcall NtCancelSynchronousIoFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtCancelSynchronousIoFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 381 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCancelSynchronousIoFile ENDP ; ULONG __stdcall NtCancelIoFileEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtCancelIoFileEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 382 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCancelIoFileEx ENDP ; ULONG __stdcall NtCancelIoFile( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtCancelIoFile PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 383 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCancelIoFile ENDP ; ULONG __stdcall NtCallbackReturn( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtCallbackReturn PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 384 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtCallbackReturn ENDP ; ULONG __stdcall NtAssociateWaitCompletionPacket( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 ); _6_3_9600_sp0_windows_8_1_NtAssociateWaitCompletionPacket PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD mov eax , 385 call _label_sysenter ret 32 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtAssociateWaitCompletionPacket ENDP ; ULONG __stdcall NtAssignProcessToJobObject( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtAssignProcessToJobObject PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 386 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtAssignProcessToJobObject ENDP ; ULONG __stdcall NtAreMappedFilesTheSame( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtAreMappedFilesTheSame PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 387 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtAreMappedFilesTheSame ENDP ; ULONG __stdcall NtApphelpCacheControl( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtApphelpCacheControl PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 388 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtApphelpCacheControl ENDP ; ULONG __stdcall NtAlpcSetInformation( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); _6_3_9600_sp0_windows_8_1_NtAlpcSetInformation PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 389 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtAlpcSetInformation ENDP ; ULONG __stdcall NtAlpcSendWaitReceivePort( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 ); _6_3_9600_sp0_windows_8_1_NtAlpcSendWaitReceivePort PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD mov eax , 390 call _label_sysenter ret 32 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtAlpcSendWaitReceivePort ENDP ; ULONG __stdcall NtAlpcRevokeSecurityContext( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtAlpcRevokeSecurityContext PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 391 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtAlpcRevokeSecurityContext ENDP ; ULONG __stdcall NtAlpcQueryInformationMessage( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); _6_3_9600_sp0_windows_8_1_NtAlpcQueryInformationMessage PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 392 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtAlpcQueryInformationMessage ENDP ; ULONG __stdcall NtAlpcQueryInformation( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 ); _6_3_9600_sp0_windows_8_1_NtAlpcQueryInformation PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD mov eax , 393 call _label_sysenter ret 20 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtAlpcQueryInformation ENDP ; ULONG __stdcall NtAlpcOpenSenderThread( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); _6_3_9600_sp0_windows_8_1_NtAlpcOpenSenderThread PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 394 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtAlpcOpenSenderThread ENDP ; ULONG __stdcall NtAlpcOpenSenderProcess( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); _6_3_9600_sp0_windows_8_1_NtAlpcOpenSenderProcess PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 395 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtAlpcOpenSenderProcess ENDP ; ULONG __stdcall NtAlpcImpersonateClientOfPort( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtAlpcImpersonateClientOfPort PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 396 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtAlpcImpersonateClientOfPort ENDP ; ULONG __stdcall NtAlpcDisconnectPort( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtAlpcDisconnectPort PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 397 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtAlpcDisconnectPort ENDP ; ULONG __stdcall NtAlpcDeleteSecurityContext( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtAlpcDeleteSecurityContext PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 398 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtAlpcDeleteSecurityContext ENDP ; ULONG __stdcall NtAlpcDeleteSectionView( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtAlpcDeleteSectionView PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 399 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtAlpcDeleteSectionView ENDP ; ULONG __stdcall NtAlpcDeleteResourceReserve( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtAlpcDeleteResourceReserve PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 400 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtAlpcDeleteResourceReserve ENDP ; ULONG __stdcall NtAlpcDeletePortSection( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtAlpcDeletePortSection PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 401 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtAlpcDeletePortSection ENDP ; ULONG __stdcall NtAlpcCreateSecurityContext( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtAlpcCreateSecurityContext PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 402 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtAlpcCreateSecurityContext ENDP ; ULONG __stdcall NtAlpcCreateSectionView( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtAlpcCreateSectionView PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 403 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtAlpcCreateSectionView ENDP ; ULONG __stdcall NtAlpcCreateResourceReserve( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); _6_3_9600_sp0_windows_8_1_NtAlpcCreateResourceReserve PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 404 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtAlpcCreateResourceReserve ENDP ; ULONG __stdcall NtAlpcCreatePortSection( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); _6_3_9600_sp0_windows_8_1_NtAlpcCreatePortSection PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 405 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtAlpcCreatePortSection ENDP ; ULONG __stdcall NtAlpcCreatePort( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtAlpcCreatePort PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 406 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtAlpcCreatePort ENDP ; ULONG __stdcall NtAlpcConnectPort( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 ); _6_3_9600_sp0_windows_8_1_NtAlpcConnectPort PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD mov eax , 407 call _label_sysenter ret 44 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtAlpcConnectPort ENDP ; ULONG __stdcall NtAlpcConnectPortEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 ); _6_3_9600_sp0_windows_8_1_NtAlpcConnectPortEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD mov eax , 408 call _label_sysenter ret 44 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtAlpcConnectPortEx ENDP ; ULONG __stdcall NtAlpcCancelMessage( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtAlpcCancelMessage PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 409 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtAlpcCancelMessage ENDP ; ULONG __stdcall NtAlpcAcceptConnectPort( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 ); _6_3_9600_sp0_windows_8_1_NtAlpcAcceptConnectPort PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD mov eax , 410 call _label_sysenter ret 36 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtAlpcAcceptConnectPort ENDP ; ULONG __stdcall NtAllocateVirtualMemory( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); _6_3_9600_sp0_windows_8_1_NtAllocateVirtualMemory PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 411 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtAllocateVirtualMemory ENDP ; ULONG __stdcall NtAllocateUuids( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); _6_3_9600_sp0_windows_8_1_NtAllocateUuids PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 412 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtAllocateUuids ENDP ; ULONG __stdcall NtAllocateUserPhysicalPages( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtAllocateUserPhysicalPages PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 413 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtAllocateUserPhysicalPages ENDP ; ULONG __stdcall NtAllocateReserveObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtAllocateReserveObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 414 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtAllocateReserveObject ENDP ; ULONG __stdcall NtAllocateLocallyUniqueId( ULONG arg_01 ); _6_3_9600_sp0_windows_8_1_NtAllocateLocallyUniqueId PROC STDCALL arg_01:DWORD mov eax , 415 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtAllocateLocallyUniqueId ENDP ; ULONG __stdcall NtAlertThreadByThreadId( ULONG arg_01 ); _6_3_9600_sp0_windows_8_1_NtAlertThreadByThreadId PROC STDCALL arg_01:DWORD mov eax , 416 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtAlertThreadByThreadId ENDP ; ULONG __stdcall NtAlertThread( ULONG arg_01 ); _6_3_9600_sp0_windows_8_1_NtAlertThread PROC STDCALL arg_01:DWORD mov eax , 417 call _label_sysenter ret 4 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtAlertThread ENDP ; ULONG __stdcall NtAlertResumeThread( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtAlertResumeThread PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 418 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtAlertResumeThread ENDP ; ULONG __stdcall NtAdjustPrivilegesToken( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); _6_3_9600_sp0_windows_8_1_NtAdjustPrivilegesToken PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 419 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtAdjustPrivilegesToken ENDP ; ULONG __stdcall NtAdjustGroupsToken( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 ); _6_3_9600_sp0_windows_8_1_NtAdjustGroupsToken PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD mov eax , 420 call _label_sysenter ret 24 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtAdjustGroupsToken ENDP ; ULONG __stdcall NtAdjustTokenClaimsAndDeviceGroups( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 , ULONG arg_12 , ULONG arg_13 , ULONG arg_14 , ULONG arg_15 , ULONG arg_16 ); _6_3_9600_sp0_windows_8_1_NtAdjustTokenClaimsAndDeviceGroups PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD , arg_12:DWORD , arg_13:DWORD , arg_14:DWORD , arg_15:DWORD , arg_16:DWORD mov eax , 421 call _label_sysenter ret 64 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtAdjustTokenClaimsAndDeviceGroups ENDP ; ULONG __stdcall NtAddDriverEntry( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtAddDriverEntry PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 422 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtAddDriverEntry ENDP ; ULONG __stdcall NtAddBootEntry( ULONG arg_01 , ULONG arg_02 ); _6_3_9600_sp0_windows_8_1_NtAddBootEntry PROC STDCALL arg_01:DWORD , arg_02:DWORD mov eax , 423 call _label_sysenter ret 8 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtAddBootEntry ENDP ; ULONG __stdcall NtAddAtom( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 ); _6_3_9600_sp0_windows_8_1_NtAddAtom PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD mov eax , 424 call _label_sysenter ret 12 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtAddAtom ENDP ; ULONG __stdcall NtAddAtomEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 ); _6_3_9600_sp0_windows_8_1_NtAddAtomEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD mov eax , 425 call _label_sysenter ret 16 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtAddAtomEx ENDP ; ULONG __stdcall NtAccessCheckByTypeResultListAndAuditAlarmByHandle( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 , ULONG arg_12 , ULONG arg_13 , ULONG arg_14 , ULONG arg_15 , ULONG arg_16 , ULONG arg_17 ); _6_3_9600_sp0_windows_8_1_NtAccessCheckByTypeResultListAndAuditAlarmByHandle PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD , arg_12:DWORD , arg_13:DWORD , arg_14:DWORD , arg_15:DWORD , arg_16:DWORD , arg_17:DWORD mov eax , 426 call _label_sysenter ret 68 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtAccessCheckByTypeResultListAndAuditAlarmByHandle ENDP ; ULONG __stdcall NtAccessCheckByTypeResultListAndAuditAlarm( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 , ULONG arg_12 , ULONG arg_13 , ULONG arg_14 , ULONG arg_15 , ULONG arg_16 ); _6_3_9600_sp0_windows_8_1_NtAccessCheckByTypeResultListAndAuditAlarm PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD , arg_12:DWORD , arg_13:DWORD , arg_14:DWORD , arg_15:DWORD , arg_16:DWORD mov eax , 427 call _label_sysenter ret 64 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtAccessCheckByTypeResultListAndAuditAlarm ENDP ; ULONG __stdcall NtAccessCheckByTypeResultList( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 ); _6_3_9600_sp0_windows_8_1_NtAccessCheckByTypeResultList PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD mov eax , 428 call _label_sysenter ret 44 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtAccessCheckByTypeResultList ENDP ; ULONG __stdcall NtAccessCheckByTypeAndAuditAlarm( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 , ULONG arg_12 , ULONG arg_13 , ULONG arg_14 , ULONG arg_15 , ULONG arg_16 ); _6_3_9600_sp0_windows_8_1_NtAccessCheckByTypeAndAuditAlarm PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD , arg_12:DWORD , arg_13:DWORD , arg_14:DWORD , arg_15:DWORD , arg_16:DWORD mov eax , 429 call _label_sysenter ret 64 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtAccessCheckByTypeAndAuditAlarm ENDP ; ULONG __stdcall NtAccessCheckByType( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 ); _6_3_9600_sp0_windows_8_1_NtAccessCheckByType PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD mov eax , 430 call _label_sysenter ret 44 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtAccessCheckByType ENDP ; ULONG __stdcall NtAccessCheckAndAuditAlarm( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 ); _6_3_9600_sp0_windows_8_1_NtAccessCheckAndAuditAlarm PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD mov eax , 431 call _label_sysenter ret 44 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtAccessCheckAndAuditAlarm ENDP ; ULONG __stdcall NtAccessCheck( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 ); _6_3_9600_sp0_windows_8_1_NtAccessCheck PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD mov eax , 432 call _label_sysenter ret 32 _label_sysenter: mov edx , esp ;sysenter db 0Fh , 34h ret _6_3_9600_sp0_windows_8_1_NtAccessCheck ENDP
22.584553
342
0.792799
[ "BSD-3-Clause" ]
rmusser01/windows-syscall-table
project/ntstub/i386/6_3_9600_sp0_ssdt_sysenter.asm
166,674
Assembly
; A066997: Survivor number for 2nd-order Josephus problem. ; 2,2,3,4,4,4,5,6,7,8,8,8,8,8,9,10,11,12,13,14,15,16,16,16,16,16,16,16,16,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,33,34,35,36,37,38,39,40 mov $2,2 add $2,$0 mov $0,$2 mov $3,1 mov $5,$2 lpb $0,1 trn $5,$3 mov $4,$5 add $4,$3 mov $0,$4 sub $0,2 mov $1,$4 mul $3,2 lpe
22.222222
196
0.6
[ "Apache-2.0" ]
karttu/loda
programs/oeis/066/A066997.asm
400
Assembly
global _string_chomp _string_chomp: push bp mov bp, sp mov ax, [bp+4] call os_string_chomp pop bp ret
10
24
0.615385
[ "BSD-2-Clause" ]
I8087/libm
src/string_chomp.asm
130
Assembly
; *************************************************************************************** ; *************************************************************************************** ; ; Name : vocabulary.asm ; Author : Paul Robson ([email protected]) ; Date : 22nd December 2018 ; Purpose : Core vocabulary ; ; *************************************************************************************** ; *************************************************************************************** opt zxNextReg org $0000 Parameter = $8008 ; *************************************************************************************** ; Stack operations ; *************************************************************************************** ;; a>r core_97_62_114: push hl ;; b>r core_98_62_114: push de ;; ab>r core_97_98_62_114: push de push hl ;; r>a core_114_62_97: pop hl ;; r>b core_114_62_98: pop de ;; r>ab core_114_62_97_98: pop hl pop de ; *************************************************************************************** ; Register to Register ; *************************************************************************************** ;; a>b core_97_62_98: ld d,h ld e,l ;; b>a core_98_62_97: ld h,d ld l,e ;; swap core_115_119_97_112: ex de,hl ;; param! core_112_97_114_97_109_33: ld (Parameter),hl ; *************************************************************************************** ; Binary Operations ; *************************************************************************************** ;; add core_97_100_100: add hl,de ;; and core_97_110_100: ld a,h and d ld h,a ld a,l and e ld l,a ;; or core_111_114: ld a,h or d ld h,a ld a,l or e ld l,a ;; xor core_120_111_114: ld a,h xor d ld h,a ld a,l xor e ld l,a ;; *+ core_42_43: srl b ; shift BC into C rr c jr nc,__SkipMultiply ; if set, add B to A add hl,de __SkipMultiply: ex de,hl ; shift B left add hl,hl ex de,hl ;; = core_61: ld a,l ; L = L ^ E xor e ld l,a ld a,h ; A = H^D | L^E. 0 if equal. xor d or l jr z,__IsEqual ld a,$FF __IsEqual: ; 0 if equal, $FF if different cpl ; $FF if equal 0 if different ld h,a ; put into HL ld l,a ;; < core_60: ld a,h ; check bit 7 different. xor d add a,a ; put into Carry flag jr c,__less_differentsigns ; true if different signs. ex de,hl ; HL = B, DE = A sbc hl,de ; B - A, CS if -ve ld a,0 ; A = $00 sbc a,a ; A = $FF if Carry Set. add hl,de ; fix DE back up ex de,hl jr __less_exit __less_differentsigns: ld a,h ; if H is +ve, then B must be < A add a,a ; so carry set = true ld a,0 ; A = 0 if cc, 255 if cs sbc a,a __less_exit: ld h,a ; put result in HL ld l,a ; *************************************************************************************** ; I/O Memory ; *************************************************************************************** ;; ! core_33: ld (hl),e inc hl ld (hl),d dec hl ;; c! core_99_33: ld (hl),e ;; @ core_64: ld a,(hl) inc hl ld h,(hl) ld l,a ;; c@ core_99_64: ld l,(hl) ld h,0 ;; +! core_43_33: ld a,(hl) add a,e ld (hl),a inc hl ld a,(hl) adc a,d ld (hl),a dec hl ;; p@ core_112_64: in l,(c) ld h,0 ;; p! core_112_33: out (c),l ; *************************************************************************************** ; Unary operations ; *************************************************************************************** ;; 0= core_48_61: ld a,h or l ld hl,$0000 jr nz,__0Equal dec hl __0Equal: ;; - core_45: ld a,h cpl ld h,a ld a,l cpl ld l,a ;; 2* core_50_42: add hl,hl ;; 4* core_52_42: add hl,hl add hl,hl ;; 8* core_56_42: add hl,hl add hl,hl add hl,hl ;; 16* core_49_54_42: add hl,hl add hl,hl add hl,hl add hl,hl ;; 2/ core_50_47: srl h rr l ;; ++ core_43_43: inc hl ;; -- core_45_45: dec hl ;; +++ core_43_43_43: inc hl inc hl ;; --- core_45_45_45: dec hl dec hl ;; negate core_110_101_103_97_116_101: ld a,h cpl ld h,a ld a,l cpl ld l,a inc hl ;; bswap core_98_115_119_97_112: ld a,h ld h,l ld l,a ; *************************************************************************************** ; Miscellany ; *************************************************************************************** ;; copy core_99_111_112_121: ld bc,(Parameter) ldir ; A = source B = target C = count ;; fill core_102_105_108_108: ld bc,(Parameter) ex de,hl ; A = number B = target C = count __fill_loop ld (hl),e inc hl dec bc ld a,b or c jr nz,__fill_loop ;; ; core_59: ret ;; halt core_104_97_108_116: db $DD,$00 ; will cause CSpect to quit if -exit on CLI __halt_loop: di halt jr __halt_loop ;; end_marker core_101_110_100_95_109_97_114_107_101_114:
17.297386
89
0.38806
[ "MIT" ]
paulscottrobson/flat-forth-compiler
vocabulary/__words.asm
5,293
Assembly
.global s_prepare_buffers s_prepare_buffers: push %r13 push %rbx push %rcx push %rdi push %rsi lea addresses_UC_ht+0x6dee, %rsi lea addresses_normal_ht+0xfdee, %rdi nop cmp %rbx, %rbx mov $78, %rcx rep movsq nop nop nop nop nop add $58367, %r13 pop %rsi pop %rdi pop %rcx pop %rbx pop %r13 ret .global s_faulty_load s_faulty_load: push %r10 push %r12 push %r14 push %r15 push %r8 push %rbx push %rcx // Store lea addresses_RW+0x1ee, %r8 nop nop nop nop and %rbx, %rbx movb $0x51, (%r8) nop nop cmp $48189, %r14 // Store lea addresses_A+0x8a8e, %r14 nop nop nop nop nop add %rcx, %rcx mov $0x5152535455565758, %r10 movq %r10, %xmm2 vmovups %ymm2, (%r14) nop nop and $31101, %rbx // Store mov $0x54f0230000000dee, %r8 clflush (%r8) nop nop nop add $7279, %r14 movw $0x5152, (%r8) nop nop nop nop nop xor $2102, %r15 // Store mov $0x54f0230000000dee, %r10 nop dec %rcx movl $0x51525354, (%r10) nop nop nop nop nop dec %r12 // Store lea addresses_A+0xfdbe, %rcx nop nop nop nop and %r10, %r10 mov $0x5152535455565758, %rbx movq %rbx, %xmm4 movups %xmm4, (%rcx) nop nop xor %r15, %r15 // Store lea addresses_WC+0xb7ae, %r12 clflush (%r12) nop inc %rcx mov $0x5152535455565758, %r14 movq %r14, %xmm0 vmovups %ymm0, (%r12) nop nop nop add %rcx, %rcx // Store lea addresses_RW+0xc1ee, %r12 clflush (%r12) add $29650, %r15 movw $0x5152, (%r12) cmp %r8, %r8 // Store lea addresses_A+0x71ee, %rbx nop nop nop sub %r10, %r10 movb $0x51, (%rbx) nop nop cmp $40340, %r10 // Store mov $0x1619ac000000062e, %r12 nop nop nop nop and $53118, %r14 movb $0x51, (%r12) sub %r14, %r14 // Store lea addresses_PSE+0x6b0a, %rbx xor %r10, %r10 movw $0x5152, (%rbx) nop nop and $54623, %r12 // Faulty Load mov $0x54f0230000000dee, %r15 nop nop add $22014, %r10 mov (%r15), %r14 lea oracles, %r8 and $0xff, %r14 shlq $12, %r14 mov (%r8,%r14,1), %r14 pop %rcx pop %rbx pop %r8 pop %r15 pop %r14 pop %r12 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_NC', 'NT': False, 'AVXalign': True, 'size': 4, 'congruent': 0}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_RW', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 9}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_A', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 5}} {'OP': 'STOR', 'dst': {'same': True, 'type': 'addresses_NC', 'NT': True, 'AVXalign': True, 'size': 2, 'congruent': 0}} {'OP': 'STOR', 'dst': {'same': True, 'type': 'addresses_NC', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_A', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 1}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WC', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 5}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_RW', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 10}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_A', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 9}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_NC', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 6}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_PSE', 'NT': False, 'AVXalign': True, 'size': 2, 'congruent': 0}} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_NC', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'REPM', 'src': {'same': False, 'congruent': 8, 'type': 'addresses_UC_ht'}, 'dst': {'same': False, 'congruent': 10, 'type': 'addresses_normal_ht'}} {'00': 504, '54': 15015} 54 54 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 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 00 54 54 54 54 54 54 54 00 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 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 00 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 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 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 00 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 00 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 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 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 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 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 00 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 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 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 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 00 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 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 00 54 54 54 54 54 54 54 54 54 54 54 00 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 00 54 54 54 */
34.061856
2,999
0.64997
[ "MIT" ]
danielmgmi/medusa
Transynther/_processed/NC/_st_zr_sm_/i9-9900K_12_0xca_notsx.log_15519_522.asm
6,608
Assembly
SECTION code_driver SECTION code_driver_terminal_output PUBLIC sms_01_output_terminal_tty_z88dk_stdio_msg_ictl EXTERN asm_vioctl_driver, asm_tty_reset, l_offset_ix_de EXTERN sms_01_output_terminal_stdio_msg_ictl sms_01_output_terminal_tty_z88dk_stdio_msg_ictl: ; enter : de = request ; bc = first parameter ; hl = void *arg (0 if stdio flags) ; ; exit : hl = return value ; carry set if ioctl rejected ; ; uses : af, bc, de, hl ; flag bits managed by stdio? ld a,h or l jp nz, sms_01_output_terminal_stdio_msg_ictl ; if cook mode is being enabled also reset the tty state machine ld a,e and c and $20 jp z, asm_vioctl_driver ; cook mode not being enabled call asm_vioctl_driver ; set flags push hl ; save return value ld hl,28 call l_offset_ix_de ; hl = & tty call asm_tty_reset pop hl ret
21.4
67
0.654206
[ "BSD-2-Clause" ]
ByteProject/Puddle-BuildTools
FictionTools/z88dk/libsrc/_DEVELOPMENT/target/sms/driver/terminal/sms_01_output_terminal_tty_z88dk/sms_01_output_terminal_tty_z88dk_stdio_msg_ictl.asm
963
Assembly
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r13 push %r8 push %rax push %rbp push %rcx push %rdi push %rdx push %rsi lea addresses_normal_ht+0x1ac51, %rdi nop nop nop nop nop xor %rdx, %rdx mov $0x6162636465666768, %rbp movq %rbp, (%rdi) nop add %rbp, %rbp lea addresses_normal_ht+0x11e25, %rax nop nop nop xor %r8, %r8 movw $0x6162, (%rax) nop nop nop nop dec %rax lea addresses_normal_ht+0xc205, %r11 nop and $8801, %r13 mov $0x6162636465666768, %r8 movq %r8, (%r11) xor $54826, %r11 lea addresses_WC_ht+0xd625, %r13 nop nop xor %r11, %r11 mov (%r13), %rbp nop nop nop nop dec %r11 lea addresses_WT_ht+0x1dc25, %rsi lea addresses_WC_ht+0x18825, %rdi nop dec %rbp mov $90, %rcx rep movsb nop nop nop nop sub $12906, %rbp lea addresses_A_ht+0x13275, %r8 nop cmp %r13, %r13 movb (%r8), %al add $44209, %rcx lea addresses_normal_ht+0x6b25, %r8 nop nop sub %rdx, %rdx mov $0x6162636465666768, %r11 movq %r11, %xmm1 vmovups %ymm1, (%r8) xor %rbp, %rbp lea addresses_D_ht+0xd725, %r8 nop xor $6698, %rax vmovups (%r8), %ymm5 vextracti128 $1, %ymm5, %xmm5 vpextrq $0, %xmm5, %rcx nop nop add %rax, %rax lea addresses_UC_ht+0xfc29, %rsi lea addresses_D_ht+0xb67d, %rdi nop nop nop nop nop add %r8, %r8 mov $83, %rcx rep movsl nop nop nop nop xor %rax, %rax pop %rsi pop %rdx pop %rdi pop %rcx pop %rbp pop %rax pop %r8 pop %r13 pop %r11 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r13 push %r15 push %r8 push %rbx push %rdi // Store lea addresses_A+0x1b16b, %r10 nop nop nop add $45796, %rbx movw $0x5152, (%r10) nop nop sub %r10, %r10 // Store mov $0x78c372000000013b, %r11 nop nop add $59614, %r15 movw $0x5152, (%r11) nop nop nop cmp %r8, %r8 // Store lea addresses_A+0x1bf25, %rdi nop nop cmp $8443, %r13 mov $0x5152535455565758, %r15 movq %r15, %xmm0 movups %xmm0, (%rdi) nop nop nop and %r15, %r15 // Store lea addresses_UC+0x1335, %r8 nop nop nop nop nop add $45051, %r10 movb $0x51, (%r8) nop add $61859, %r10 // Store mov $0x425, %r10 nop nop nop nop sub $52620, %rbx mov $0x5152535455565758, %rdi movq %rdi, %xmm0 vmovntdq %ymm0, (%r10) nop nop xor $11638, %rbx // Load lea addresses_normal+0x1e825, %r15 nop cmp %rbx, %rbx movups (%r15), %xmm1 vpextrq $1, %xmm1, %r11 nop xor %r15, %r15 // Store lea addresses_PSE+0x13825, %r8 nop nop nop nop cmp %r15, %r15 movw $0x5152, (%r8) nop nop nop nop sub $54683, %rbx // Load lea addresses_normal+0x1f7ed, %r13 nop cmp %rbx, %rbx movb (%r13), %r11b and %r11, %r11 // Faulty Load lea addresses_normal+0x1e825, %r11 and $30398, %r8 mov (%r11), %r13d lea oracles, %r8 and $0xff, %r13 shlq $12, %r13 mov (%r8,%r13,1), %r13 pop %rdi pop %rbx pop %r8 pop %r15 pop %r13 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_normal', 'AVXalign': False, 'size': 8}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 1, 'type': 'addresses_A', 'AVXalign': False, 'size': 2}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_NC', 'AVXalign': False, 'size': 2}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 5, 'type': 'addresses_A', 'AVXalign': False, 'size': 16}} {'OP': 'STOR', 'dst': {'NT': True, 'same': False, 'congruent': 2, 'type': 'addresses_UC', 'AVXalign': False, 'size': 1}} {'OP': 'STOR', 'dst': {'NT': True, 'same': False, 'congruent': 9, 'type': 'addresses_P', 'AVXalign': False, 'size': 32}} {'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_normal', 'AVXalign': False, 'size': 16}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 10, 'type': 'addresses_PSE', 'AVXalign': False, 'size': 2}} {'src': {'NT': False, 'same': False, 'congruent': 1, 'type': 'addresses_normal', 'AVXalign': False, 'size': 1}, 'OP': 'LOAD'} [Faulty Load] {'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_normal', 'AVXalign': False, 'size': 4}, 'OP': 'LOAD'} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'NT': True, 'same': False, 'congruent': 2, 'type': 'addresses_normal_ht', 'AVXalign': True, 'size': 8}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 8, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 2}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 5, 'type': 'addresses_normal_ht', 'AVXalign': True, 'size': 8}} {'src': {'NT': False, 'same': False, 'congruent': 6, 'type': 'addresses_WC_ht', 'AVXalign': True, 'size': 8}, 'OP': 'LOAD'} {'src': {'same': False, 'congruent': 10, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'same': True, 'congruent': 9, 'type': 'addresses_WC_ht'}} {'src': {'NT': True, 'same': False, 'congruent': 3, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 1}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 7, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 32}} {'src': {'NT': False, 'same': False, 'congruent': 8, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'} {'src': {'same': False, 'congruent': 2, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 3, 'type': 'addresses_D_ht'}} {'34': 21829} 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 */
32.216535
2,999
0.651106
[ "MIT" ]
danielmgmi/medusa
Transynther/_processed/NONE/_xt_/i9-9900K_12_0xa0.log_21829_897.asm
8,183
Assembly
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Copyright(c) 2011-2015 Intel Corporation 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 Intel Corporation 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 ; OWNER 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. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; gf_3vect_dot_prod_avx2(len, vec, *g_tbls, **buffs, **dests); ;;; %include "reg_sizes.asm" %ifidn __OUTPUT_FORMAT__, elf64 %define arg0 rdi %define arg1 rsi %define arg2 rdx %define arg3 rcx %define arg4 r8 %define arg5 r9 %define tmp r11 %define tmp.w r11d %define tmp.b r11b %define tmp2 r10 %define tmp3 r13 ; must be saved and restored %define tmp4 r12 ; must be saved and restored %define return rax %macro SLDR 2 %endmacro %define SSTR SLDR %define PS 8 %define LOG_PS 3 %define func(x) x: %macro FUNC_SAVE 0 push r12 push r13 %endmacro %macro FUNC_RESTORE 0 pop r13 pop r12 %endmacro %endif %ifidn __OUTPUT_FORMAT__, win64 %define arg0 rcx %define arg1 rdx %define arg2 r8 %define arg3 r9 %define arg4 r12 ; must be saved, loaded and restored %define arg5 r15 ; must be saved and restored %define tmp r11 %define tmp.w r11d %define tmp.b r11b %define tmp2 r10 %define tmp3 r13 ; must be saved and restored %define tmp4 r14 ; must be saved and restored %define return rax %macro SLDR 2 %endmacro %define SSTR SLDR %define PS 8 %define LOG_PS 3 %define stack_size 6*16 + 5*8 ; must be an odd multiple of 8 %define arg(x) [rsp + stack_size + PS + PS*x] %define func(x) proc_frame x %macro FUNC_SAVE 0 alloc_stack stack_size vmovdqa [rsp + 0*16], xmm6 vmovdqa [rsp + 1*16], xmm7 vmovdqa [rsp + 2*16], xmm8 vmovdqa [rsp + 3*16], xmm9 vmovdqa [rsp + 4*16], xmm10 vmovdqa [rsp + 5*16], xmm11 save_reg r12, 6*16 + 0*8 save_reg r13, 6*16 + 1*8 save_reg r14, 6*16 + 2*8 save_reg r15, 6*16 + 3*8 end_prolog mov arg4, arg(4) %endmacro %macro FUNC_RESTORE 0 vmovdqa xmm6, [rsp + 0*16] vmovdqa xmm7, [rsp + 1*16] vmovdqa xmm8, [rsp + 2*16] vmovdqa xmm9, [rsp + 3*16] vmovdqa xmm10, [rsp + 4*16] vmovdqa xmm11, [rsp + 5*16] mov r12, [rsp + 6*16 + 0*8] mov r13, [rsp + 6*16 + 1*8] mov r14, [rsp + 6*16 + 2*8] mov r15, [rsp + 6*16 + 3*8] add rsp, stack_size %endmacro %endif %ifidn __OUTPUT_FORMAT__, elf32 ;;;================== High Address; ;;; arg4 ;;; arg3 ;;; arg2 ;;; arg1 ;;; arg0 ;;; return ;;;<================= esp of caller ;;; ebp ;;;<================= ebp = esp ;;; var0 ;;; var1 ;;; esi ;;; edi ;;; ebx ;;;<================= esp of callee ;;; ;;;================== Low Address; %define PS 4 %define LOG_PS 2 %define func(x) x: %define arg(x) [ebp + PS*2 + PS*x] %define var(x) [ebp - PS - PS*x] %define trans ecx %define trans2 esi %define arg0 trans ;trans and trans2 are for the variables in stack %define arg0_m arg(0) %define arg1 ebx %define arg2 arg2_m %define arg2_m arg(2) %define arg3 trans %define arg3_m arg(3) %define arg4 trans %define arg4_m arg(4) %define arg5 trans2 %define tmp edx %define tmp.w edx %define tmp.b dl %define tmp2 edi %define tmp3 trans2 %define tmp3_m var(0) %define tmp4 trans2 %define tmp4_m var(1) %define return eax %macro SLDR 2 ;stack load/restore mov %1, %2 %endmacro %define SSTR SLDR %macro FUNC_SAVE 0 push ebp mov ebp, esp sub esp, PS*2 ;2 local variables push esi push edi push ebx mov arg1, arg(1) %endmacro %macro FUNC_RESTORE 0 pop ebx pop edi pop esi add esp, PS*2 ;2 local variables pop ebp %endmacro %endif ; output formats %define len arg0 %define vec arg1 %define mul_array arg2 %define src arg3 %define dest1 arg4 %define ptr arg5 %define vec_i tmp2 %define dest2 tmp3 %define dest3 tmp4 %define pos return %ifidn PS,4 ;32-bit code %define len_m arg0_m %define src_m arg3_m %define dest1_m arg4_m %define dest2_m tmp3_m %define dest3_m tmp4_m %endif %ifndef EC_ALIGNED_ADDR ;;; Use Un-aligned load/store %define XLDR vmovdqu %define XSTR vmovdqu %else ;;; Use Non-temporal load/stor %ifdef NO_NT_LDST %define XLDR vmovdqa %define XSTR vmovdqa %else %define XLDR vmovntdqa %define XSTR vmovntdq %endif %endif %ifidn PS,8 ;64-bit code default rel [bits 64] %endif section .text %ifidn PS,8 ;64-bit code %define xmask0f ymm11 %define xmask0fx xmm11 %define xgft1_lo ymm10 %define xgft1_hi ymm9 %define xgft2_lo ymm8 %define xgft2_hi ymm7 %define xgft3_lo ymm6 %define xgft3_hi ymm5 %define x0 ymm0 %define xtmpa ymm1 %define xp1 ymm2 %define xp2 ymm3 %define xp3 ymm4 %else %define xmask0f ymm7 %define xmask0fx xmm7 %define xgft1_lo ymm6 %define xgft1_hi ymm5 %define xgft2_lo xgft1_lo %define xgft2_hi xgft1_hi %define xgft3_lo xgft1_lo %define xgft3_hi xgft1_hi %define x0 ymm0 %define xtmpa ymm1 %define xp1 ymm2 %define xp2 ymm3 %define xp3 ymm4 %endif align 16 global gf_3vect_dot_prod_avx2:ISAL_SYM_TYPE_FUNCTION func(gf_3vect_dot_prod_avx2) FUNC_SAVE SLDR len, len_m sub len, 32 SSTR len_m, len jl .return_fail xor pos, pos mov tmp.b, 0x0f vpinsrb xmask0fx, xmask0fx, tmp.w, 0 vpbroadcastb xmask0f, xmask0fx ;Construct mask 0x0f0f0f... sal vec, LOG_PS ;vec *= PS. Make vec_i count by PS SLDR dest1, dest1_m mov dest2, [dest1+PS] SSTR dest2_m, dest2 mov dest3, [dest1+2*PS] SSTR dest3_m, dest3 mov dest1, [dest1] SSTR dest1_m, dest1 .loop32: vpxor xp1, xp1 vpxor xp2, xp2 vpxor xp3, xp3 mov tmp, mul_array xor vec_i, vec_i .next_vect: SLDR src, src_m mov ptr, [src+vec_i] vmovdqu xgft1_lo, [tmp] ;Load array Ax{00}, Ax{01}, ..., Ax{0f} ; " Ax{00}, Ax{10}, ..., Ax{f0} vperm2i128 xgft1_hi, xgft1_lo, xgft1_lo, 0x11 ; swapped to hi | hi vperm2i128 xgft1_lo, xgft1_lo, xgft1_lo, 0x00 ; swapped to lo | lo %ifidn PS,8 ; 64-bit code vmovdqu xgft2_lo, [tmp+vec*(32/PS)] ;Load array Bx{00}, Bx{01}, ..., Bx{0f} ; " Bx{00}, Bx{10}, ..., Bx{f0} vperm2i128 xgft2_hi, xgft2_lo, xgft2_lo, 0x11 ; swapped to hi | hi vperm2i128 xgft2_lo, xgft2_lo, xgft2_lo, 0x00 ; swapped to lo | lo vmovdqu xgft3_lo, [tmp+vec*(64/PS)] ;Load array Cx{00}, Cx{01}, ..., Cx{0f} ; " Cx{00}, Cx{10}, ..., Cx{f0} vperm2i128 xgft3_hi, xgft3_lo, xgft3_lo, 0x11 ; swapped to hi | hi vperm2i128 xgft3_lo, xgft3_lo, xgft3_lo, 0x00 ; swapped to lo | lo add tmp, 32 add vec_i, PS %endif XLDR x0, [ptr+pos] ;Get next source vector vpand xtmpa, x0, xmask0f ;Mask low src nibble in bits 4-0 vpsraw x0, x0, 4 ;Shift to put high nibble into bits 4-0 vpand x0, x0, xmask0f ;Mask high src nibble in bits 4-0 vpshufb xgft1_hi, x0 ;Lookup mul table of high nibble vpshufb xgft1_lo, xtmpa ;Lookup mul table of low nibble vpxor xgft1_hi, xgft1_lo ;GF add high and low partials vpxor xp1, xgft1_hi ;xp1 += partial %ifidn PS,4 ; 32-bit code vmovdqu xgft2_lo, [tmp+vec*(32/PS)] ;Load array Bx{00}, Bx{01}, ..., Bx{0f} ; " Bx{00}, Bx{10}, ..., Bx{f0} vperm2i128 xgft2_hi, xgft2_lo, xgft2_lo, 0x11 ; swapped to hi | hi vperm2i128 xgft2_lo, xgft2_lo, xgft2_lo, 0x00 ; swapped to lo | lo %endif vpshufb xgft2_hi, x0 ;Lookup mul table of high nibble vpshufb xgft2_lo, xtmpa ;Lookup mul table of low nibble vpxor xgft2_hi, xgft2_lo ;GF add high and low partials vpxor xp2, xgft2_hi ;xp2 += partial %ifidn PS,4 ; 32-bit code sal vec, 1 vmovdqu xgft3_lo, [tmp+vec*(32/PS)] ;Load array Cx{00}, Cx{01}, ..., Cx{0f} ; " Cx{00}, Cx{10}, ..., Cx{f0} vperm2i128 xgft3_hi, xgft3_lo, xgft3_lo, 0x11 ; swapped to hi | hi vperm2i128 xgft3_lo, xgft3_lo, xgft3_lo, 0x00 ; swapped to lo | lo sar vec, 1 add tmp, 32 add vec_i, PS %endif vpshufb xgft3_hi, x0 ;Lookup mul table of high nibble vpshufb xgft3_lo, xtmpa ;Lookup mul table of low nibble vpxor xgft3_hi, xgft3_lo ;GF add high and low partials vpxor xp3, xgft3_hi ;xp3 += partial cmp vec_i, vec jl .next_vect SLDR dest1, dest1_m SLDR dest2, dest2_m XSTR [dest1+pos], xp1 XSTR [dest2+pos], xp2 SLDR dest3, dest3_m XSTR [dest3+pos], xp3 SLDR len, len_m add pos, 32 ;Loop on 32 bytes at a time cmp pos, len jle .loop32 lea tmp, [len + 32] cmp pos, tmp je .return_pass ;; Tail len mov pos, len ;Overlapped offset length-16 jmp .loop32 ;Do one more overlap pass .return_pass: mov return, 0 FUNC_RESTORE ret .return_fail: mov return, 1 FUNC_RESTORE ret endproc_frame section .data ;;; func core, ver, snum slversion gf_3vect_dot_prod_avx2, 04, 05, 0197
25.316583
79
0.669115
[ "BSD-3-Clause" ]
Danliran/isa-l
erasure_code/gf_3vect_dot_prod_avx2.asm
10,076
Assembly
; A339051: Even bisection of the infinite Fibonacci word A096270. ; 0,0,1,1,1,0,1,1,1,0,0,1,1,0,0,1,1,0,0,1,1,1,0,1,1,1,0,0,1,1,0,0,1,1,0,0,1,1,1,0,1,1,1,0,1,1,1,0,0,1,1,0,0,1,1,1,0,1,1,1,0,1,1,1,0,0,1,1,0,0,1,1,1,0,1,1,1,0,1,1,1,0,0,1,1,0 mul $0,2 add $0,1 seq $0,189661 ; Fixed point of the morphism 0->010, 1->10 starting with 0. cmp $0,0
42.875
173
0.603499
[ "Apache-2.0" ]
ckrause/cm
programs/oeis/339/A339051.asm
343
Assembly
TIME_TRAVEL_SAVED_EQUIPS: .word 0x00000000 ; B and C buttons .word 0x00000000 ; C button indexes .halfword 0x0000 ; Equipment .halfword 0x0000 ; Owned equipment .align 4 give_master_sword: ; Puts MS in Equipment Only li t0, SAVE_CONTEXT lh t1, 0x9C(t0) ; Equipment ori t2, t1, 2 ; Master Sword flag jr ra sh t2, 0x9C(t0) before_time_travel: li a1, SAVE_CONTEXT ; required by overwritten code li t0, TIME_TRAVEL_SAVED_EQUIPS ; B and C buttons lw t1, 0x68 (a1) sw t1, 0x00 (t0) ; C button indexes lw t1, 0x6C (a1) sw t1, 0x04 (t0) ; Equipment lhu t1, 0x70 (a1) sh t1, 0x08 (t0) ; Owned equipment lhu t1, 0x9C (a1) sh t1, 0x0A (t0) li t0, 0x7E4 ; Offset to secondary save (First unused byte in scene 40 [xD4 + x40 * x1C + x10] addu t0, t0, a1 ; t0 is start of secondary FW li t1, 0xE64 ; Offset to main FW data addu t1, t1, a1 ; t1 is start of main FW data li t2, 0x8 ; Amount of words to store @@swap: lw t3, 0x00 (t0) ; t3 is value in secondary FW lw t4, 0x00 (t1) ; t4 is value in main FW sw t3, 0x00 (t1) ; Store secondary FW to main FW sw t4, 0x00 (t0) ; Store main FW to secondary FW addiu t0, 0x1C ; Increment secondary FW pointer by 1 scene length addiu t1, 0x04 ; Increment main FW pointer by one word addiu t2, -0x01 ; Decrement counter bgtz t2, @@swap nop j 0x06F80C ; Swap Link Ages nop ;================================================================================================== after_time_travel: addiu sp, sp, -0x20 sw s0, 0x10 (sp) sw s1, 0x14 (sp) sw ra, 0x18 (sp) li s0, SAVE_CONTEXT li s1, TIME_TRAVEL_SAVED_EQUIPS lw t0, 0x04 (s0) ; t0 = 1 if going forward in time, 0 if going back beqz t0, @@going_back nop jal after_going_forward nop b @@done nop @@going_back: jal after_going_back nop @@done: jal update_c_button li a0, 0 jal update_c_button li a0, 1 jal update_c_button li a0, 2 lw s0, 0x10 (sp) lw s1, 0x14 (sp) lw ra, 0x18 (sp) addiu sp, sp, 0x20 jr ra nop ;================================================================================================== update_c_button: ; a0 = button index ; s0 = save context addu t0, s0, a0 ; t0 = save context, offset by button index lbu t1, 0x6C (t0) ; t1 = inventory index on this button beq t1, 0xFF, @@return nop addu t1, s0, t1 ; t1 = save context, offset by inventory index lbu t1, 0x74 (t1) ; t1 = inventory contents beq t1, 0x2C, @@return ; Don't equip SOLD OUT nop sb t1, 0x69 (t0) ; update button item @@return: jr ra nop ;================================================================================================== after_going_forward: addiu sp, sp, -0x18 sw ra, 0x10 (sp) ; Save child buttons lw t0, 0x00 (s1) sw t0, 0x40 (s0) lw t0, 0x04 (s1) sw t0, 0x44 (s0) ; Save child equipment lhu t0, 0x08 (s1) sh t0, 0x48 (s0) ; Unset swordless flag sb r0, 0x0F33 (s0) ; Initialize adult equips, if going forward for the first time lbu t0, 0x4A (s0) ; t0 = saved adult B bne t0, 0xFF, @@no_init nop jal initialize_adult nop @@no_init: lw ra, 0x10 (sp) addiu sp, sp, 0x18 jr ra nop ;================================================================================================== after_going_back: ; Restore child buttons lw t0, 0x40 (s0) sw t0, 0x68 (s0) lw t0, 0x44 (s0) sw t0, 0x6C (s0) ; Restore child equipment lhu t0, 0x48 (s0) ; Unequip hylian shield if adult lost it lbu t1, 0x9D (s0) andi t1, 0x20 bnez t1, @@has_shield nop andi t0, t0, 0xFFDF @@has_shield: sh t0, 0x70 (s0) ; Set swordless flag if needed lbu t0, 0x68 (s0) bne t0, 0xFF, @@not_swordless nop li t0, 1 sb t0, 0x0F33 (s0) @@not_swordless: jr ra nop ;================================================================================================== initialize_adult: addiu sp, sp, -0x18 sw ra, 0x10 (sp) ; If we have mirror shield, equip it lhu t0, 0x9C (s0) andi t0, t0, 0x0040 beqz t0, @@no_mirror_shield nop lhu t0, 0x70 (s0) andi t0, t0, 0xFF0F ori t0, t0, 0x0030 sh t0, 0x70 (s0) @@no_mirror_shield: ; Try to preserve child C-button equips lbu t0, 0x01 (s1) sb t0, 0x69 (s0) lhu t0, 0x02 (s1) sh t0, 0x6A (s0) lw t0, 0x04 (s1) sw t0, 0x6C (s0) jal init_adult_button li a0, 0 jal init_adult_button li a0, 1 jal init_adult_button li a0, 2 lw ra, 0x10 (sp) addiu sp, sp, 0x18 jr ra nop ;================================================================================================== init_adult_button: ; a0 = C-button index addu t0, s0, a0 ; t0 = save context (offset by button index) li t1, ADULT_VALID_ITEMS lbu t2, 0x6C (t0) ; t2 = inventory index of item on this button beq t2, 0xFF, @@empty ; If the button is empty, try to initialize it nop addu t1, t1, t2 lbu t1, 0x00 (t1) bnez t1, @@return ; If the existing item is valid for adult, do nothing nop @@empty: li t1, (ADULT_INIT_ITEMS - 1) @@loop: addiu t1, t1, 1 lbu t2, 0x00 (t1) ; t2 = inventory index beqz t2, @@set_empty ; Ran out out of eligible items nop addu t3, s0, t2 ; t3 = save context, offset by inventory index lbu t3, 0x74 (t3) ; t3 = inventory contents beq t3, 0xFF, @@loop ; Item not in inventory nop lbu t4, 0x6C (s0) beq t4, t2, @@loop ; Item already on C-left nop lbu t4, 0x6D (s0) beq t4, t2, @@loop ; Item already on C-down nop lbu t4, 0x6E (s0) beq t4, t2, @@loop ; Item already on C-right nop ; Valid item found, update the button sb t3, 0x69 (t0) sb t2, 0x6C (t0) b @@return nop @@set_empty: ; Ran out out of eligible items, leave the button empty li t1, 0xFF sb t1, 0x69 (t0) sb t1, 0x6C (t0) @@return: jr ra nop ; Items that can populate empty adult C-buttons, by inventory index ADULT_INIT_ITEMS: .byte 0x09 ; Hookshot .byte 0x0F ; Hammer .byte 0x02 ; Bombs .byte 0x03 ; Bow .byte 0x01 ; Deku Nuts .byte 0x0D ; Lens of Truth .byte 0x0B ; Farore's Wind .byte 0x00 ; null terminate .align 4 ADULT_VALID_ITEMS: .byte 0 ; Deku Sticks .byte 1 ; Deku Nuts .byte 1 ; Deku Bombs .byte 1 ; Bow .byte 1 ; Fire Arrows .byte 1 ; Din's Fire .byte 0 ; Slingshot .byte 1 ; Ocarina .byte 1 ; Bombchus .byte 1 ; Hookshot .byte 1 ; Ice Arrows .byte 1 ; Farore's Wind .byte 0 ; Boomerang .byte 1 ; Lens of Truth .byte 0 ; Magic Beans .byte 1 ; Hammer .byte 1 ; Light Arrows .byte 1 ; Nayru's Love .byte 1 ; Bottle 1 .byte 1 ; Bottle 2 .byte 1 ; Bottle 3 .byte 1 ; Bottle 4 .byte 1 ; Adult Trade Item .byte 0 ; Child Trade Item .align 4
24.722772
99
0.522627
[ "MIT" ]
AntiBlueQuirk/OoT-Randomizer
ASM/src/time_travel.asm
7,491
Assembly
; A020083: a(n) = floor( Gamma(n + 3/5)/Gamma(3/5) ). ; Submitted by Jamie Morken(s3) ; 1,0,0,2,8,41,231,1527,11610,99850,958561,10160755,117864768,1485096081,20197306708,294880677941,4600138575887,76362300359740,1343976486331425,24997962645764522,489960067856984638,10093177397853883551,218012631793643884711,4927085478536351794475,116279217293457902349617,2860468745419064397800587,73227999882728048583695046,1947864796880566092326288239,53761068393903624148205555413,1537566556065643650638678884812,45511970059543052058904894990446,1392666283822017393002489786707662 mov $2,1 mov $3,$0 mul $3,5 lpb $3 sub $3,4 mov $5,$3 mul $5,2 add $5,4 mul $2,$5 sub $3,1 lpe mov $4,10 pow $4,$0 div $2,$4 mov $0,$2
35.9
483
0.802228
[ "Apache-2.0" ]
ckrause/loda-programs
oeis/020/A020083.asm
718
Assembly
mov ah, 0x0e ; tty mode mov bp, 0x8000 ; this is an address far away from 0x7c00 so that we don't get overwritten mov sp, bp ; if the stack is empty then sp points to bp push 'A' push 'B' push 'C' ; tug test,bp address is 0x8000 ,I mov 'T' into this address,otherwise it is null ,it wont work ;mov al,'T' ;mov [0x8000],al ; adress 0x8000 data is 'T' ;mov al, [0x8000] ;int 0x10 ; after push ,stack data storage like this ; ... ; 0x8002....... ; 0x8000-->bp ; 0x7FFE-->'A' ; 0x7FFC-->'B' ; 0x7FFA-->'C' -->sp ; 0x7FF8....... ; ... ; to show how the stack grows downwards mov al, [0x7ffe] ; 0x8000 - 2 int 0x10 ; however, don't try to access [0x8000] now, because it won't work ; you can only access the stack top so, at this point, only 0x7ffe (look above) mov al, [0x8000] int 0x10 ; recover our characters using the standard procedure: 'pop' ; We can only pop full words so we need an auxiliary register to manipulate ; the lower byte pop bx mov al, bl int 0x10 ; prints C pop bx mov al, bl int 0x10 ; prints B pop bx mov al, bl int 0x10 ; prints A ; data that has been pop'd from the stack is garbage now mov al, [0x8000] int 0x10 ;stack pop end jmp $ times 510-($-$$) db 0 dw 0xaa55
19.063492
95
0.677769
[ "BSD-3-Clause" ]
BrandWarden/os-tutorial
04-bootsector-stack/boot_sect_stack.asm
1,201
Assembly
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r14 push %r15 push %r8 push %rax push %rcx push %rdi push %rsi lea addresses_WT_ht+0x13d1a, %rax nop nop nop nop xor $62660, %r14 mov $0x6162636465666768, %r8 movq %r8, (%rax) dec %rsi lea addresses_WC_ht+0x232e, %rsi lea addresses_WT_ht+0x311a, %rdi nop nop xor $14738, %r8 mov $40, %rcx rep movsq cmp %rcx, %rcx lea addresses_WC_ht+0x13f5a, %rsi lea addresses_WT_ht+0xfbc4, %rdi nop inc %r11 mov $99, %rcx rep movsb nop nop nop sub $20363, %r11 lea addresses_UC_ht+0x1895a, %rsi lea addresses_UC_ht+0x17b1a, %rdi clflush (%rdi) nop nop cmp %r15, %r15 mov $63, %rcx rep movsl nop nop nop nop inc %r8 lea addresses_WT_ht+0x1a01a, %rdi nop cmp $33575, %rsi mov $0x6162636465666768, %rax movq %rax, %xmm0 vmovups %ymm0, (%rdi) inc %rsi lea addresses_WC_ht+0x1c51a, %rsi lea addresses_D_ht+0xaf1a, %rdi clflush (%rdi) nop cmp $7733, %r11 mov $85, %rcx rep movsl nop and %r8, %r8 lea addresses_WT_ht+0x1e91a, %r14 nop nop inc %rcx mov $0x6162636465666768, %rdi movq %rdi, (%r14) xor %r14, %r14 pop %rsi pop %rdi pop %rcx pop %rax pop %r8 pop %r15 pop %r14 pop %r11 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r13 push %r14 push %r8 push %rax push %rsi // Store lea addresses_UC+0x109a, %rax nop nop nop sub %r10, %r10 mov $0x5152535455565758, %r11 movq %r11, (%rax) add %rax, %rax // Store lea addresses_PSE+0xf3c6, %r13 nop nop nop nop add $30788, %r10 movb $0x51, (%r13) nop and $21823, %r8 // Store lea addresses_UC+0xf64c, %r8 nop nop nop nop sub $40806, %rsi mov $0x5152535455565758, %r11 movq %r11, (%r8) nop nop nop xor $1106, %rsi // Store lea addresses_US+0x1a91a, %rsi nop nop nop nop nop cmp %r10, %r10 mov $0x5152535455565758, %r13 movq %r13, %xmm3 vmovups %ymm3, (%rsi) inc %r13 // Store lea addresses_A+0x10e68, %rax clflush (%rax) nop nop nop nop add %rsi, %rsi movw $0x5152, (%rax) add %rax, %rax // Faulty Load lea addresses_WT+0x191a, %rsi nop nop nop nop dec %rax mov (%rsi), %r11 lea oracles, %rax and $0xff, %r11 shlq $12, %r11 mov (%rax,%r11,1), %r11 pop %rsi pop %rax pop %r8 pop %r14 pop %r13 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_WT', 'size': 16, 'AVXalign': False, 'NT': True, 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_PSE', 'size': 1, 'AVXalign': True, 'NT': False, 'congruent': 2, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_US', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_WT', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 8, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 11, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 1, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 9, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 8, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 9, 'same': True}, 'dst': {'type': 'addresses_D_ht', 'congruent': 5, 'same': True}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': True}} {'58': 115} 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 */
22.331633
344
0.650674
[ "MIT" ]
danielmgmi/medusa
Transynther/_processed/NONE/_st_/i7-8650U_0xd2.log_115_979.asm
4,377
Assembly
;------------------------------------------------------------------- ; Praktikum SMD 2015 ; M.Wahyudin (140310120031) ; ; Name : LATIH29.ASM (SERIKIR) ; Desc : Mengirimkan data serial 0 - 255, baudrate 1200 ; Input : - ; Output: Serial pin P3.0 & P3.1 ;------------------------------------------------------------------- mulai: mov scon, #52h ; aktifkan port serial mode 1 mov tmod, #20h ; timer 1 mode 2 (auto reload) mov th1, #-26 ; nilai reload untuk baudrate 1200 setb tr1 ; aktifkan timer 1 dataser: mov a, #0 ; nilai data awal = 0 kirim: mov sbuf, a ; kirim data a ke port serial mov r0, #0 mov r1, #0 tunda: djnz r0, tunda djnz r1, tunda inc a cjne a, #0, kirim ; kirim terus hingga 255 jmp dataser ; ulang terus end
24.666667
68
0.501229
[ "MIT" ]
hyuwah/fu-praktikum-smd
Modul 6/serikir.asm
814
Assembly
; A028429: Clog sequence in base 8. Right to left concatenation of n, int(log_8(n)),int(log_8(int(log_8(n)))),... in base8. ; 1,2,3,4,5,6,7,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125 mov $2,$0 lpb $0 mov $0,6 mov $1,64 lpe add $1,1 add $1,$2
35.636364
203
0.663265
[ "Apache-2.0" ]
jmorken/loda
programs/oeis/028/A028429.asm
392
Assembly
OPTION DOTNAME .text$ SEGMENT ALIGN(256) 'CODE' PUBLIC ct_is_square_mod_384 ALIGN 32 ct_is_square_mod_384 PROC PUBLIC DB 243,15,30,250 mov QWORD PTR[8+rsp],rdi ;WIN64 prologue mov QWORD PTR[16+rsp],rsi mov r11,rsp $L$SEH_begin_ct_is_square_mod_384:: mov rdi,rcx mov rsi,rdx push rbp push rbx push r12 push r13 push r14 push r15 sub rsp,536 $L$SEH_body_ct_is_square_mod_384:: lea rax,QWORD PTR[((24+255))+rsp] and rax,-256 mov r8,QWORD PTR[rdi] mov r9,QWORD PTR[8+rdi] mov r10,QWORD PTR[16+rdi] mov r11,QWORD PTR[24+rdi] mov r12,QWORD PTR[32+rdi] mov r13,QWORD PTR[40+rdi] mov r14,QWORD PTR[rsi] mov r15,QWORD PTR[8+rsi] mov rbx,QWORD PTR[16+rsi] mov rcx,QWORD PTR[24+rsi] mov rdx,QWORD PTR[32+rsi] mov rdi,QWORD PTR[40+rsi] mov rsi,rax mov QWORD PTR[rax],r8 mov QWORD PTR[8+rax],r9 mov QWORD PTR[16+rax],r10 mov QWORD PTR[24+rax],r11 mov QWORD PTR[32+rax],r12 mov QWORD PTR[40+rax],r13 mov QWORD PTR[48+rax],r14 mov QWORD PTR[56+rax],r15 mov QWORD PTR[64+rax],rbx mov QWORD PTR[72+rax],rcx mov QWORD PTR[80+rax],rdx mov QWORD PTR[88+rax],rdi xor rbp,rbp mov ecx,24 jmp $L$oop_is_square ALIGN 32 $L$oop_is_square:: mov DWORD PTR[16+rsp],ecx call __ab_approximation_30 mov QWORD PTR[rsp],rax mov QWORD PTR[8+rsp],rbx mov rdi,128+8*6 xor rdi,rsi call __smulq_384_n_shift_by_30 mov rdx,QWORD PTR[rsp] mov rcx,QWORD PTR[8+rsp] lea rdi,QWORD PTR[((-48))+rdi] call __smulq_384_n_shift_by_30 mov ecx,DWORD PTR[16+rsp] xor rsi,128 and r14,QWORD PTR[48+rdi] shr r14,1 add rbp,r14 sub ecx,1 jnz $L$oop_is_square mov r9,QWORD PTR[48+rsi] call __inner_loop_48 mov rax,1 and rax,rbp xor rax,1 lea r8,QWORD PTR[536+rsp] mov r15,QWORD PTR[r8] mov r14,QWORD PTR[8+r8] mov r13,QWORD PTR[16+r8] mov r12,QWORD PTR[24+r8] mov rbx,QWORD PTR[32+r8] mov rbp,QWORD PTR[40+r8] lea rsp,QWORD PTR[48+r8] $L$SEH_epilogue_ct_is_square_mod_384:: mov rdi,QWORD PTR[8+rsp] ;WIN64 epilogue mov rsi,QWORD PTR[16+rsp] DB 0F3h,0C3h ;repret $L$SEH_end_ct_is_square_mod_384:: ct_is_square_mod_384 ENDP ALIGN 32 __smulq_384_n_shift_by_30 PROC PRIVATE DB 243,15,30,250 mov r8,QWORD PTR[rsi] mov r9,QWORD PTR[8+rsi] mov r10,QWORD PTR[16+rsi] mov r11,QWORD PTR[24+rsi] mov r12,QWORD PTR[32+rsi] mov r13,QWORD PTR[40+rsi] mov rbx,rdx sar rdx,63 xor rax,rax sub rax,rdx xor rbx,rdx add rbx,rax xor r8,rdx xor r9,rdx xor r10,rdx xor r11,rdx xor r12,rdx xor r13,rdx add rax,r8 adc r9,0 adc r10,0 adc r11,0 adc r12,0 adc r13,0 mov r14,rdx and r14,rbx mul rbx mov r8,rax mov rax,r9 mov r9,rdx mul rbx add r9,rax mov rax,r10 adc rdx,0 mov r10,rdx mul rbx add r10,rax mov rax,r11 adc rdx,0 mov r11,rdx mul rbx add r11,rax mov rax,r12 adc rdx,0 mov r12,rdx mul rbx add r12,rax mov rax,r13 adc rdx,0 mov r13,rdx neg r14 mul rbx add r13,rax adc r14,rdx lea rsi,QWORD PTR[48+rsi] mov rdx,rcx mov QWORD PTR[rdi],r8 mov QWORD PTR[8+rdi],r9 mov QWORD PTR[16+rdi],r10 mov QWORD PTR[24+rdi],r11 mov QWORD PTR[32+rdi],r12 mov QWORD PTR[40+rdi],r13 mov r8,QWORD PTR[rsi] mov r9,QWORD PTR[8+rsi] mov r10,QWORD PTR[16+rsi] mov r11,QWORD PTR[24+rsi] mov r12,QWORD PTR[32+rsi] mov r13,QWORD PTR[40+rsi] mov rbx,rdx sar rdx,63 xor rax,rax sub rax,rdx xor rbx,rdx add rbx,rax xor r8,rdx xor r9,rdx xor r10,rdx xor r11,rdx xor r12,rdx xor r13,rdx add rax,r8 adc r9,0 adc r10,0 adc r11,0 adc r12,0 adc r13,0 mov r15,rdx and r15,rbx mul rbx mov r8,rax mov rax,r9 mov r9,rdx mul rbx add r9,rax mov rax,r10 adc rdx,0 mov r10,rdx mul rbx add r10,rax mov rax,r11 adc rdx,0 mov r11,rdx mul rbx add r11,rax mov rax,r12 adc rdx,0 mov r12,rdx mul rbx add r12,rax mov rax,r13 adc rdx,0 mov r13,rdx neg r15 mul rbx add r13,rax adc r15,rdx lea rsi,QWORD PTR[((-48))+rsi] add r8,QWORD PTR[rdi] adc r9,QWORD PTR[8+rdi] adc r10,QWORD PTR[16+rdi] adc r11,QWORD PTR[24+rdi] adc r12,QWORD PTR[32+rdi] adc r13,QWORD PTR[40+rdi] adc r14,r15 shrd r8,r9,30 shrd r9,r10,30 shrd r10,r11,30 shrd r11,r12,30 shrd r12,r13,30 shrd r13,r14,30 sar r14,63 xor rbx,rbx sub rbx,r14 xor r8,r14 xor r9,r14 xor r10,r14 xor r11,r14 xor r12,r14 xor r13,r14 add r8,rbx adc r9,0 adc r10,0 adc r11,0 adc r12,0 adc r13,0 mov QWORD PTR[rdi],r8 mov QWORD PTR[8+rdi],r9 mov QWORD PTR[16+rdi],r10 mov QWORD PTR[24+rdi],r11 mov QWORD PTR[32+rdi],r12 mov QWORD PTR[40+rdi],r13 DB 0F3h,0C3h ;repret __smulq_384_n_shift_by_30 ENDP ALIGN 32 __ab_approximation_30 PROC PRIVATE DB 243,15,30,250 mov rbx,QWORD PTR[88+rsi] mov r15,QWORD PTR[80+rsi] mov r14,QWORD PTR[72+rsi] mov rax,r13 or rax,rbx cmovz r13,r12 cmovz rbx,r15 cmovz r12,r11 mov r11,QWORD PTR[64+rsi] cmovz r15,r14 mov rax,r13 or rax,rbx cmovz r13,r12 cmovz rbx,r15 cmovz r12,r10 mov r10,QWORD PTR[56+rsi] cmovz r15,r11 mov rax,r13 or rax,rbx cmovz r13,r12 cmovz rbx,r15 cmovz r12,r9 mov r9,QWORD PTR[48+rsi] cmovz r15,r10 mov rax,r13 or rax,rbx cmovz r13,r12 cmovz rbx,r15 cmovz r12,r8 cmovz r15,r9 mov rax,r13 or rax,rbx bsr rcx,rax lea rcx,QWORD PTR[1+rcx] cmovz r13,r8 cmovz rbx,r9 cmovz rcx,rax neg rcx shld r13,r12,cl shld rbx,r15,cl mov rax,0FFFFFFFF00000000h mov r8d,r8d mov r9d,r9d and r13,rax and rbx,rax or r8,r13 or r9,rbx jmp __inner_loop_30 DB 0F3h,0C3h ;repret __ab_approximation_30 ENDP ALIGN 32 __inner_loop_30 PROC PRIVATE DB 243,15,30,250 mov rbx,07FFFFFFF80000000h mov rcx,0800000007FFFFFFFh lea r15,QWORD PTR[((-1))+rbx] mov edi,30 $L$oop_30:: mov rax,r8 and rax,r9 shr rax,1 cmp r8,r9 mov r10,r8 mov r11,r9 lea rax,QWORD PTR[rbp*1+rax] mov r12,rbx mov r13,rcx mov r14,rbp cmovb r8,r9 cmovb r9,r10 cmovb rbx,rcx cmovb rcx,r12 cmovb rbp,rax sub r8,r9 sub rbx,rcx add rbx,r15 test r10,1 cmovz r8,r10 cmovz r9,r11 cmovz rbx,r12 cmovz rcx,r13 cmovz rbp,r14 lea rax,QWORD PTR[2+r9] shr r8,1 shr rax,2 add rcx,rcx lea rbp,QWORD PTR[rbp*1+rax] sub rcx,r15 sub edi,1 jnz $L$oop_30 shr r15,32 mov eax,ebx shr rbx,32 mov edx,ecx shr rcx,32 sub rax,r15 sub rbx,r15 sub rdx,r15 sub rcx,r15 DB 0F3h,0C3h ;repret __inner_loop_30 ENDP ALIGN 32 __inner_loop_48 PROC PRIVATE DB 243,15,30,250 mov edi,48 $L$oop_48:: mov rax,r8 and rax,r9 shr rax,1 cmp r8,r9 mov r10,r8 mov r11,r9 lea rax,QWORD PTR[rbp*1+rax] mov r12,rbp cmovb r8,r9 cmovb r9,r10 cmovb rbp,rax sub r8,r9 test r10,1 cmovz r8,r10 cmovz r9,r11 cmovz rbp,r12 lea rax,QWORD PTR[2+r9] shr r8,1 shr rax,2 add rbp,rax sub edi,1 jnz $L$oop_48 DB 0F3h,0C3h ;repret __inner_loop_48 ENDP .text$ ENDS .pdata SEGMENT READONLY ALIGN(4) ALIGN 4 DD imagerel $L$SEH_begin_ct_is_square_mod_384 DD imagerel $L$SEH_body_ct_is_square_mod_384 DD imagerel $L$SEH_info_ct_is_square_mod_384_prologue DD imagerel $L$SEH_body_ct_is_square_mod_384 DD imagerel $L$SEH_epilogue_ct_is_square_mod_384 DD imagerel $L$SEH_info_ct_is_square_mod_384_body DD imagerel $L$SEH_epilogue_ct_is_square_mod_384 DD imagerel $L$SEH_end_ct_is_square_mod_384 DD imagerel $L$SEH_info_ct_is_square_mod_384_epilogue .pdata ENDS .xdata SEGMENT READONLY ALIGN(8) ALIGN 8 $L$SEH_info_ct_is_square_mod_384_prologue:: DB 1,0,5,00bh DB 0,074h,1,0 DB 0,064h,2,0 DB 0,003h DB 0,0 $L$SEH_info_ct_is_square_mod_384_body:: DB 1,0,18,0 DB 000h,0f4h,043h,000h DB 000h,0e4h,044h,000h DB 000h,0d4h,045h,000h DB 000h,0c4h,046h,000h DB 000h,034h,047h,000h DB 000h,054h,048h,000h DB 000h,074h,04ah,000h DB 000h,064h,04bh,000h DB 000h,001h,049h,000h $L$SEH_info_ct_is_square_mod_384_epilogue:: DB 1,0,4,0 DB 000h,074h,001h,000h DB 000h,064h,002h,000h DB 000h,000h,000h,000h .xdata ENDS END
15.072549
54
0.717575
[ "Apache-2.0" ]
ajsutton/blst
build/win64/ct_is_square_mod_384-x86_64.asm
7,687
Assembly
div16_16: CLR C ;Clear carry initially MOV R4,#00h ;Clear R4 working variable initially MOV R5,#00h ;CLear R5 working variable initially MOV B,#00h ;Clear B since B will count the number of left-shifted bits div1: INC B ;Increment counter for each left shift MOV A,R2 ;Move the current divisor low byte into the accumulator RLC A ;Shift low-byte left, rotate through carry to apply highest bit to high-byte MOV R2,A ;Save the updated divisor low-byte MOV A,R3 ;Move the current divisor high byte into the accumulator RLC A ;Shift high-byte left high, rotating in carry from low-byte MOV R3,A ;Save the updated divisor high-byte JNC div1 ;Repeat until carry flag is set from high-byte div2: ;Shift right the divisor MOV A,R3 ;Move high-byte of divisor into accumulator RRC A ;Rotate high-byte of divisor right and into carry MOV R3,A ;Save updated value of high-byte of divisor MOV A,R2 ;Move low-byte of divisor into accumulator RRC A ;Rotate low-byte of divisor right, with carry from high-byte MOV R2,A ;Save updated value of low-byte of divisor CLR C ;Clear carry, we don't need it anymore MOV 07h,R1 ;Make a safe copy of the dividend high-byte MOV 06h,R0 ;Make a safe copy of the dividend low-byte MOV A,R0 ;Move low-byte of dividend into accumulator SUBB A,R2 ;Dividend - shifted divisor = result bit (no factor, only 0 or 1) MOV R0,A ;Save updated dividend MOV A,R1 ;Move high-byte of dividend into accumulator SUBB A,R3 ;Subtract high-byte of divisor (all together 16-bit substraction) MOV R1,A ;Save updated high-byte back in high-byte of divisor JNC div3 ;If carry flag is NOT set, result is 1 MOV R1,07h ;Otherwise result is 0, save copy of divisor to undo subtraction MOV R0,06h div3: CPL C ;Invert carry, so it can be directly copied into result MOV A,R4 RLC A ;Shift carry flag into temporary result MOV R4,A MOV A,R5 RLC A MOV R5,A DJNZ B,div2 ;Now count backwards and repeat until "B" is zero MOV R3,05h ;Move result to R3/R2 MOV R2,04h ;Move result to R3/R2 RET
47.782609
90
0.694722
[ "MIT" ]
pedroam14/nbody3d
test.asm
2,198
Assembly
.global s_prepare_buffers s_prepare_buffers: push %r13 push %r14 push %r9 push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_D_ht+0xd765, %r13 xor %rsi, %rsi vmovups (%r13), %ymm4 vextracti128 $1, %ymm4, %xmm4 vpextrq $0, %xmm4, %r14 dec %r14 lea addresses_A_ht+0x19fae, %r14 nop nop sub $16940, %rdx movw $0x6162, (%r14) and %rsi, %rsi lea addresses_WT_ht+0x19ad5, %rcx nop nop nop nop cmp $60416, %rbx movb $0x61, (%rcx) nop nop nop add $41265, %rsi lea addresses_WC_ht+0x1158, %rsi lea addresses_A_ht+0x1a2be, %rdi sub %rbx, %rbx mov $81, %rcx rep movsl add %rsi, %rsi lea addresses_normal_ht+0x1bee2, %rsi lea addresses_UC_ht+0x7a2e, %rdi nop nop nop cmp $9101, %r14 mov $31, %rcx rep movsq nop xor %r9, %r9 lea addresses_UC_ht+0x7816, %r13 nop sub $24091, %rdi mov (%r13), %rcx nop add %rbx, %rbx lea addresses_normal_ht+0xbaae, %rsi lea addresses_normal_ht+0x1bcae, %rdi nop nop nop inc %rbx mov $98, %rcx rep movsl nop nop nop nop inc %rdi lea addresses_D_ht+0x1fae, %rdi nop nop nop and $44826, %rbx movl $0x61626364, (%rdi) nop dec %rsi pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %r9 pop %r14 pop %r13 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r15 push %r8 push %r9 push %rbx push %rdx // Load lea addresses_normal+0xfd2e, %r9 nop nop nop dec %r12 mov (%r9), %r11d cmp $57420, %r15 // Load lea addresses_normal+0xfae, %r15 and $30191, %rbx vmovups (%r15), %ymm4 vextracti128 $0, %ymm4, %xmm4 vpextrq $0, %xmm4, %r12 nop nop nop xor %rbx, %rbx // Store lea addresses_normal+0x10bae, %rdx nop nop nop nop nop inc %rbx mov $0x5152535455565758, %r12 movq %r12, (%rdx) nop nop nop nop cmp $2816, %r11 // Store lea addresses_US+0x12e7e, %r9 sub %r11, %r11 mov $0x5152535455565758, %r15 movq %r15, %xmm1 movups %xmm1, (%r9) dec %r15 // Faulty Load lea addresses_normal+0x10bae, %r9 nop nop dec %rdx movb (%r9), %bl lea oracles, %r11 and $0xff, %rbx shlq $12, %rbx mov (%r11,%rbx,1), %rbx pop %rdx pop %rbx pop %r9 pop %r8 pop %r15 pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 4, 'NT': False, 'type': 'addresses_normal'}, 'OP': 'LOAD'} {'src': {'congruent': 6, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_normal'}, 'OP': 'LOAD'} {'src': {'congruent': 8, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_normal'}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 8, 'NT': False, 'type': 'addresses_normal'}} {'OP': 'STOR', 'dst': {'congruent': 4, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_US'}} [Faulty Load] {'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 1, 'NT': False, 'type': 'addresses_normal'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'congruent': 10, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_A_ht'}} {'OP': 'STOR', 'dst': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_WT_ht'}} {'src': {'congruent': 0, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 3, 'same': False, 'type': 'addresses_A_ht'}} {'src': {'congruent': 1, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'congruent': 7, 'same': False, 'type': 'addresses_UC_ht'}} {'src': {'congruent': 2, 'AVXalign': False, 'same': True, 'size': 8, 'NT': False, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 6, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'congruent': 8, 'same': False, 'type': 'addresses_normal_ht'}} {'OP': 'STOR', 'dst': {'congruent': 10, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_D_ht'}} {'58': 21829} 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 */
38.032967
2,999
0.656602
[ "MIT" ]
danielmgmi/medusa
Transynther/_processed/NONE/_xt_sm_/i7-7700_9_0xca.log_21829_1517.asm
6,922
Assembly
; A131731: Period 4: repeat [2, -3, 4, -3]. ; 2,-3,4,-3,2,-3,4,-3,2,-3,4,-3,2,-3,4,-3,2,-3,4,-3,2,-3,4,-3,2,-3,4,-3,2,-3,4,-3,2,-3,4,-3,2,-3,4,-3,2,-3,4,-3,2,-3,4,-3,2,-3,4,-3,2,-3,4,-3,2,-3,4,-3,2,-3,4,-3,2,-3,4,-3,2,-3,4,-3,2,-3,4,-3,2,-3,4,-3,2,-3,4,-3,2,-3,4,-3,2,-3,4,-3 gcd $0,4 pow $0,2 add $0,1 mul $0,4 mov $1,-2 lpb $0,1 sub $0,$1 sub $0,$1 lpb $0,1 sub $0,7 lpe add $1,$0 add $0,1 add $1,$0 sub $0,8 lpe sub $1,1
21.190476
231
0.442697
[ "Apache-2.0" ]
karttu/loda
programs/oeis/131/A131731.asm
445
Assembly
; A224329: Number of idempotent n X n 0..4 matrices of rank n-1. ; 1,18,147,996,6245,37494,218743,1249992,7031241,39062490,214843739,1171874988,6347656237,34179687486,183105468735,976562499984,5187988281233,27465820312482,144958496093731,762939453124980,4005432128906229 mov $3,$0 lpb $0 sub $0,1 mov $2,5 lpe add $1,8 pow $2,$3 mul $2,2 sub $2,1 add $3,1 mul $3,$2 add $1,$3 sub $1,8
22.941176
205
0.746154
[ "Apache-2.0" ]
jmorken/loda
programs/oeis/224/A224329.asm
390
Assembly
_zombie: file format elf32-i386 Disassembly of section .text: 00000000 <main>: #include "stat.h" #include "user.h" int main(void) { 0: 55 push %ebp 1: 89 e5 mov %esp,%ebp 3: 83 e4 f0 and $0xfffffff0,%esp 6: 83 ec 10 sub $0x10,%esp if(fork() > 0) 9: e8 76 02 00 00 call 284 <fork> e: 85 c0 test %eax,%eax 10: 7e 0c jle 1e <main+0x1e> sleep(5); // Let child exit before parent. 12: c7 04 24 05 00 00 00 movl $0x5,(%esp) 19: e8 fe 02 00 00 call 31c <sleep> exit(); 1e: e8 69 02 00 00 call 28c <exit> 23: 90 nop 00000024 <stosb>: "cc"); } static inline void stosb(void *addr, int data, int cnt) { 24: 55 push %ebp 25: 89 e5 mov %esp,%ebp 27: 57 push %edi 28: 53 push %ebx asm volatile("cld; rep stosb" : 29: 8b 4d 08 mov 0x8(%ebp),%ecx 2c: 8b 55 10 mov 0x10(%ebp),%edx 2f: 8b 45 0c mov 0xc(%ebp),%eax 32: 89 cb mov %ecx,%ebx 34: 89 df mov %ebx,%edi 36: 89 d1 mov %edx,%ecx 38: fc cld 39: f3 aa rep stos %al,%es:(%edi) 3b: 89 ca mov %ecx,%edx 3d: 89 fb mov %edi,%ebx 3f: 89 5d 08 mov %ebx,0x8(%ebp) 42: 89 55 10 mov %edx,0x10(%ebp) "=D" (addr), "=c" (cnt) : "0" (addr), "1" (cnt), "a" (data) : "memory", "cc"); } 45: 5b pop %ebx 46: 5f pop %edi 47: 5d pop %ebp 48: c3 ret 00000049 <strcpy>: #include "user.h" #include "x86.h" char* strcpy(char *s, char *t) { 49: 55 push %ebp 4a: 89 e5 mov %esp,%ebp 4c: 83 ec 10 sub $0x10,%esp char *os; os = s; 4f: 8b 45 08 mov 0x8(%ebp),%eax 52: 89 45 fc mov %eax,-0x4(%ebp) while((*s++ = *t++) != 0) 55: 90 nop 56: 8b 45 08 mov 0x8(%ebp),%eax 59: 8d 50 01 lea 0x1(%eax),%edx 5c: 89 55 08 mov %edx,0x8(%ebp) 5f: 8b 55 0c mov 0xc(%ebp),%edx 62: 8d 4a 01 lea 0x1(%edx),%ecx 65: 89 4d 0c mov %ecx,0xc(%ebp) 68: 0f b6 12 movzbl (%edx),%edx 6b: 88 10 mov %dl,(%eax) 6d: 0f b6 00 movzbl (%eax),%eax 70: 84 c0 test %al,%al 72: 75 e2 jne 56 <strcpy+0xd> ; return os; 74: 8b 45 fc mov -0x4(%ebp),%eax } 77: c9 leave 78: c3 ret 00000079 <strcmp>: int strcmp(const char *p, const char *q) { 79: 55 push %ebp 7a: 89 e5 mov %esp,%ebp while(*p && *p == *q) 7c: eb 08 jmp 86 <strcmp+0xd> p++, q++; 7e: 83 45 08 01 addl $0x1,0x8(%ebp) 82: 83 45 0c 01 addl $0x1,0xc(%ebp) } int strcmp(const char *p, const char *q) { while(*p && *p == *q) 86: 8b 45 08 mov 0x8(%ebp),%eax 89: 0f b6 00 movzbl (%eax),%eax 8c: 84 c0 test %al,%al 8e: 74 10 je a0 <strcmp+0x27> 90: 8b 45 08 mov 0x8(%ebp),%eax 93: 0f b6 10 movzbl (%eax),%edx 96: 8b 45 0c mov 0xc(%ebp),%eax 99: 0f b6 00 movzbl (%eax),%eax 9c: 38 c2 cmp %al,%dl 9e: 74 de je 7e <strcmp+0x5> p++, q++; return (uchar)*p - (uchar)*q; a0: 8b 45 08 mov 0x8(%ebp),%eax a3: 0f b6 00 movzbl (%eax),%eax a6: 0f b6 d0 movzbl %al,%edx a9: 8b 45 0c mov 0xc(%ebp),%eax ac: 0f b6 00 movzbl (%eax),%eax af: 0f b6 c0 movzbl %al,%eax b2: 29 c2 sub %eax,%edx b4: 89 d0 mov %edx,%eax } b6: 5d pop %ebp b7: c3 ret 000000b8 <strlen>: uint strlen(char *s) { b8: 55 push %ebp b9: 89 e5 mov %esp,%ebp bb: 83 ec 10 sub $0x10,%esp int n; for(n = 0; s[n]; n++) be: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp) c5: eb 04 jmp cb <strlen+0x13> c7: 83 45 fc 01 addl $0x1,-0x4(%ebp) cb: 8b 55 fc mov -0x4(%ebp),%edx ce: 8b 45 08 mov 0x8(%ebp),%eax d1: 01 d0 add %edx,%eax d3: 0f b6 00 movzbl (%eax),%eax d6: 84 c0 test %al,%al d8: 75 ed jne c7 <strlen+0xf> ; return n; da: 8b 45 fc mov -0x4(%ebp),%eax } dd: c9 leave de: c3 ret 000000df <memset>: void* memset(void *dst, int c, uint n) { df: 55 push %ebp e0: 89 e5 mov %esp,%ebp e2: 83 ec 0c sub $0xc,%esp stosb(dst, c, n); e5: 8b 45 10 mov 0x10(%ebp),%eax e8: 89 44 24 08 mov %eax,0x8(%esp) ec: 8b 45 0c mov 0xc(%ebp),%eax ef: 89 44 24 04 mov %eax,0x4(%esp) f3: 8b 45 08 mov 0x8(%ebp),%eax f6: 89 04 24 mov %eax,(%esp) f9: e8 26 ff ff ff call 24 <stosb> return dst; fe: 8b 45 08 mov 0x8(%ebp),%eax } 101: c9 leave 102: c3 ret 00000103 <strchr>: char* strchr(const char *s, char c) { 103: 55 push %ebp 104: 89 e5 mov %esp,%ebp 106: 83 ec 04 sub $0x4,%esp 109: 8b 45 0c mov 0xc(%ebp),%eax 10c: 88 45 fc mov %al,-0x4(%ebp) for(; *s; s++) 10f: eb 14 jmp 125 <strchr+0x22> if(*s == c) 111: 8b 45 08 mov 0x8(%ebp),%eax 114: 0f b6 00 movzbl (%eax),%eax 117: 3a 45 fc cmp -0x4(%ebp),%al 11a: 75 05 jne 121 <strchr+0x1e> return (char*)s; 11c: 8b 45 08 mov 0x8(%ebp),%eax 11f: eb 13 jmp 134 <strchr+0x31> } char* strchr(const char *s, char c) { for(; *s; s++) 121: 83 45 08 01 addl $0x1,0x8(%ebp) 125: 8b 45 08 mov 0x8(%ebp),%eax 128: 0f b6 00 movzbl (%eax),%eax 12b: 84 c0 test %al,%al 12d: 75 e2 jne 111 <strchr+0xe> if(*s == c) return (char*)s; return 0; 12f: b8 00 00 00 00 mov $0x0,%eax } 134: c9 leave 135: c3 ret 00000136 <gets>: char* gets(char *buf, int max) { 136: 55 push %ebp 137: 89 e5 mov %esp,%ebp 139: 83 ec 28 sub $0x28,%esp int i, cc; char c; for(i=0; i+1 < max; ){ 13c: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) 143: eb 4c jmp 191 <gets+0x5b> cc = read(0, &c, 1); 145: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp) 14c: 00 14d: 8d 45 ef lea -0x11(%ebp),%eax 150: 89 44 24 04 mov %eax,0x4(%esp) 154: c7 04 24 00 00 00 00 movl $0x0,(%esp) 15b: e8 44 01 00 00 call 2a4 <read> 160: 89 45 f0 mov %eax,-0x10(%ebp) if(cc < 1) 163: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 167: 7f 02 jg 16b <gets+0x35> break; 169: eb 31 jmp 19c <gets+0x66> buf[i++] = c; 16b: 8b 45 f4 mov -0xc(%ebp),%eax 16e: 8d 50 01 lea 0x1(%eax),%edx 171: 89 55 f4 mov %edx,-0xc(%ebp) 174: 89 c2 mov %eax,%edx 176: 8b 45 08 mov 0x8(%ebp),%eax 179: 01 c2 add %eax,%edx 17b: 0f b6 45 ef movzbl -0x11(%ebp),%eax 17f: 88 02 mov %al,(%edx) if(c == '\n' || c == '\r') 181: 0f b6 45 ef movzbl -0x11(%ebp),%eax 185: 3c 0a cmp $0xa,%al 187: 74 13 je 19c <gets+0x66> 189: 0f b6 45 ef movzbl -0x11(%ebp),%eax 18d: 3c 0d cmp $0xd,%al 18f: 74 0b je 19c <gets+0x66> gets(char *buf, int max) { int i, cc; char c; for(i=0; i+1 < max; ){ 191: 8b 45 f4 mov -0xc(%ebp),%eax 194: 83 c0 01 add $0x1,%eax 197: 3b 45 0c cmp 0xc(%ebp),%eax 19a: 7c a9 jl 145 <gets+0xf> break; buf[i++] = c; if(c == '\n' || c == '\r') break; } buf[i] = '\0'; 19c: 8b 55 f4 mov -0xc(%ebp),%edx 19f: 8b 45 08 mov 0x8(%ebp),%eax 1a2: 01 d0 add %edx,%eax 1a4: c6 00 00 movb $0x0,(%eax) return buf; 1a7: 8b 45 08 mov 0x8(%ebp),%eax } 1aa: c9 leave 1ab: c3 ret 000001ac <stat>: int stat(char *n, struct stat *st) { 1ac: 55 push %ebp 1ad: 89 e5 mov %esp,%ebp 1af: 83 ec 28 sub $0x28,%esp int fd; int r; fd = open(n, O_RDONLY); 1b2: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 1b9: 00 1ba: 8b 45 08 mov 0x8(%ebp),%eax 1bd: 89 04 24 mov %eax,(%esp) 1c0: e8 07 01 00 00 call 2cc <open> 1c5: 89 45 f4 mov %eax,-0xc(%ebp) if(fd < 0) 1c8: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 1cc: 79 07 jns 1d5 <stat+0x29> return -1; 1ce: b8 ff ff ff ff mov $0xffffffff,%eax 1d3: eb 23 jmp 1f8 <stat+0x4c> r = fstat(fd, st); 1d5: 8b 45 0c mov 0xc(%ebp),%eax 1d8: 89 44 24 04 mov %eax,0x4(%esp) 1dc: 8b 45 f4 mov -0xc(%ebp),%eax 1df: 89 04 24 mov %eax,(%esp) 1e2: e8 fd 00 00 00 call 2e4 <fstat> 1e7: 89 45 f0 mov %eax,-0x10(%ebp) close(fd); 1ea: 8b 45 f4 mov -0xc(%ebp),%eax 1ed: 89 04 24 mov %eax,(%esp) 1f0: e8 bf 00 00 00 call 2b4 <close> return r; 1f5: 8b 45 f0 mov -0x10(%ebp),%eax } 1f8: c9 leave 1f9: c3 ret 000001fa <atoi>: int atoi(const char *s) { 1fa: 55 push %ebp 1fb: 89 e5 mov %esp,%ebp 1fd: 83 ec 10 sub $0x10,%esp int n; n = 0; 200: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp) while('0' <= *s && *s <= '9') 207: eb 25 jmp 22e <atoi+0x34> n = n*10 + *s++ - '0'; 209: 8b 55 fc mov -0x4(%ebp),%edx 20c: 89 d0 mov %edx,%eax 20e: c1 e0 02 shl $0x2,%eax 211: 01 d0 add %edx,%eax 213: 01 c0 add %eax,%eax 215: 89 c1 mov %eax,%ecx 217: 8b 45 08 mov 0x8(%ebp),%eax 21a: 8d 50 01 lea 0x1(%eax),%edx 21d: 89 55 08 mov %edx,0x8(%ebp) 220: 0f b6 00 movzbl (%eax),%eax 223: 0f be c0 movsbl %al,%eax 226: 01 c8 add %ecx,%eax 228: 83 e8 30 sub $0x30,%eax 22b: 89 45 fc mov %eax,-0x4(%ebp) atoi(const char *s) { int n; n = 0; while('0' <= *s && *s <= '9') 22e: 8b 45 08 mov 0x8(%ebp),%eax 231: 0f b6 00 movzbl (%eax),%eax 234: 3c 2f cmp $0x2f,%al 236: 7e 0a jle 242 <atoi+0x48> 238: 8b 45 08 mov 0x8(%ebp),%eax 23b: 0f b6 00 movzbl (%eax),%eax 23e: 3c 39 cmp $0x39,%al 240: 7e c7 jle 209 <atoi+0xf> n = n*10 + *s++ - '0'; return n; 242: 8b 45 fc mov -0x4(%ebp),%eax } 245: c9 leave 246: c3 ret 00000247 <memmove>: void* memmove(void *vdst, void *vsrc, int n) { 247: 55 push %ebp 248: 89 e5 mov %esp,%ebp 24a: 83 ec 10 sub $0x10,%esp char *dst, *src; dst = vdst; 24d: 8b 45 08 mov 0x8(%ebp),%eax 250: 89 45 fc mov %eax,-0x4(%ebp) src = vsrc; 253: 8b 45 0c mov 0xc(%ebp),%eax 256: 89 45 f8 mov %eax,-0x8(%ebp) while(n-- > 0) 259: eb 17 jmp 272 <memmove+0x2b> *dst++ = *src++; 25b: 8b 45 fc mov -0x4(%ebp),%eax 25e: 8d 50 01 lea 0x1(%eax),%edx 261: 89 55 fc mov %edx,-0x4(%ebp) 264: 8b 55 f8 mov -0x8(%ebp),%edx 267: 8d 4a 01 lea 0x1(%edx),%ecx 26a: 89 4d f8 mov %ecx,-0x8(%ebp) 26d: 0f b6 12 movzbl (%edx),%edx 270: 88 10 mov %dl,(%eax) { char *dst, *src; dst = vdst; src = vsrc; while(n-- > 0) 272: 8b 45 10 mov 0x10(%ebp),%eax 275: 8d 50 ff lea -0x1(%eax),%edx 278: 89 55 10 mov %edx,0x10(%ebp) 27b: 85 c0 test %eax,%eax 27d: 7f dc jg 25b <memmove+0x14> *dst++ = *src++; return vdst; 27f: 8b 45 08 mov 0x8(%ebp),%eax } 282: c9 leave 283: c3 ret 00000284 <fork>: name: \ movl $SYS_ ## name, %eax; \ int $T_SYSCALL; \ ret SYSCALL(fork) 284: b8 01 00 00 00 mov $0x1,%eax 289: cd 40 int $0x40 28b: c3 ret 0000028c <exit>: SYSCALL(exit) 28c: b8 02 00 00 00 mov $0x2,%eax 291: cd 40 int $0x40 293: c3 ret 00000294 <wait>: SYSCALL(wait) 294: b8 03 00 00 00 mov $0x3,%eax 299: cd 40 int $0x40 29b: c3 ret 0000029c <pipe>: SYSCALL(pipe) 29c: b8 04 00 00 00 mov $0x4,%eax 2a1: cd 40 int $0x40 2a3: c3 ret 000002a4 <read>: SYSCALL(read) 2a4: b8 05 00 00 00 mov $0x5,%eax 2a9: cd 40 int $0x40 2ab: c3 ret 000002ac <write>: SYSCALL(write) 2ac: b8 10 00 00 00 mov $0x10,%eax 2b1: cd 40 int $0x40 2b3: c3 ret 000002b4 <close>: SYSCALL(close) 2b4: b8 15 00 00 00 mov $0x15,%eax 2b9: cd 40 int $0x40 2bb: c3 ret 000002bc <kill>: SYSCALL(kill) 2bc: b8 06 00 00 00 mov $0x6,%eax 2c1: cd 40 int $0x40 2c3: c3 ret 000002c4 <exec>: SYSCALL(exec) 2c4: b8 07 00 00 00 mov $0x7,%eax 2c9: cd 40 int $0x40 2cb: c3 ret 000002cc <open>: SYSCALL(open) 2cc: b8 0f 00 00 00 mov $0xf,%eax 2d1: cd 40 int $0x40 2d3: c3 ret 000002d4 <mknod>: SYSCALL(mknod) 2d4: b8 11 00 00 00 mov $0x11,%eax 2d9: cd 40 int $0x40 2db: c3 ret 000002dc <unlink>: SYSCALL(unlink) 2dc: b8 12 00 00 00 mov $0x12,%eax 2e1: cd 40 int $0x40 2e3: c3 ret 000002e4 <fstat>: SYSCALL(fstat) 2e4: b8 08 00 00 00 mov $0x8,%eax 2e9: cd 40 int $0x40 2eb: c3 ret 000002ec <link>: SYSCALL(link) 2ec: b8 13 00 00 00 mov $0x13,%eax 2f1: cd 40 int $0x40 2f3: c3 ret 000002f4 <mkdir>: SYSCALL(mkdir) 2f4: b8 14 00 00 00 mov $0x14,%eax 2f9: cd 40 int $0x40 2fb: c3 ret 000002fc <chdir>: SYSCALL(chdir) 2fc: b8 09 00 00 00 mov $0x9,%eax 301: cd 40 int $0x40 303: c3 ret 00000304 <dup>: SYSCALL(dup) 304: b8 0a 00 00 00 mov $0xa,%eax 309: cd 40 int $0x40 30b: c3 ret 0000030c <getpid>: SYSCALL(getpid) 30c: b8 0b 00 00 00 mov $0xb,%eax 311: cd 40 int $0x40 313: c3 ret 00000314 <sbrk>: SYSCALL(sbrk) 314: b8 0c 00 00 00 mov $0xc,%eax 319: cd 40 int $0x40 31b: c3 ret 0000031c <sleep>: SYSCALL(sleep) 31c: b8 0d 00 00 00 mov $0xd,%eax 321: cd 40 int $0x40 323: c3 ret 00000324 <uptime>: SYSCALL(uptime) 324: b8 0e 00 00 00 mov $0xe,%eax 329: cd 40 int $0x40 32b: c3 ret 0000032c <clone>: SYSCALL(clone) 32c: b8 16 00 00 00 mov $0x16,%eax 331: cd 40 int $0x40 333: c3 ret 00000334 <join>: 334: b8 17 00 00 00 mov $0x17,%eax 339: cd 40 int $0x40 33b: c3 ret 0000033c <putc>: #include "stat.h" #include "user.h" static void putc(int fd, char c) { 33c: 55 push %ebp 33d: 89 e5 mov %esp,%ebp 33f: 83 ec 18 sub $0x18,%esp 342: 8b 45 0c mov 0xc(%ebp),%eax 345: 88 45 f4 mov %al,-0xc(%ebp) write(fd, &c, 1); 348: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp) 34f: 00 350: 8d 45 f4 lea -0xc(%ebp),%eax 353: 89 44 24 04 mov %eax,0x4(%esp) 357: 8b 45 08 mov 0x8(%ebp),%eax 35a: 89 04 24 mov %eax,(%esp) 35d: e8 4a ff ff ff call 2ac <write> } 362: c9 leave 363: c3 ret 00000364 <printint>: static void printint(int fd, int xx, int base, int sgn) { 364: 55 push %ebp 365: 89 e5 mov %esp,%ebp 367: 56 push %esi 368: 53 push %ebx 369: 83 ec 30 sub $0x30,%esp static char digits[] = "0123456789ABCDEF"; char buf[16]; int i, neg; uint x; neg = 0; 36c: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) if(sgn && xx < 0){ 373: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 377: 74 17 je 390 <printint+0x2c> 379: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 37d: 79 11 jns 390 <printint+0x2c> neg = 1; 37f: c7 45 f0 01 00 00 00 movl $0x1,-0x10(%ebp) x = -xx; 386: 8b 45 0c mov 0xc(%ebp),%eax 389: f7 d8 neg %eax 38b: 89 45 ec mov %eax,-0x14(%ebp) 38e: eb 06 jmp 396 <printint+0x32> } else { x = xx; 390: 8b 45 0c mov 0xc(%ebp),%eax 393: 89 45 ec mov %eax,-0x14(%ebp) } i = 0; 396: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) do{ buf[i++] = digits[x % base]; 39d: 8b 4d f4 mov -0xc(%ebp),%ecx 3a0: 8d 41 01 lea 0x1(%ecx),%eax 3a3: 89 45 f4 mov %eax,-0xc(%ebp) 3a6: 8b 5d 10 mov 0x10(%ebp),%ebx 3a9: 8b 45 ec mov -0x14(%ebp),%eax 3ac: ba 00 00 00 00 mov $0x0,%edx 3b1: f7 f3 div %ebx 3b3: 89 d0 mov %edx,%eax 3b5: 0f b6 80 a0 0b 00 00 movzbl 0xba0(%eax),%eax 3bc: 88 44 0d dc mov %al,-0x24(%ebp,%ecx,1) }while((x /= base) != 0); 3c0: 8b 75 10 mov 0x10(%ebp),%esi 3c3: 8b 45 ec mov -0x14(%ebp),%eax 3c6: ba 00 00 00 00 mov $0x0,%edx 3cb: f7 f6 div %esi 3cd: 89 45 ec mov %eax,-0x14(%ebp) 3d0: 83 7d ec 00 cmpl $0x0,-0x14(%ebp) 3d4: 75 c7 jne 39d <printint+0x39> if(neg) 3d6: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 3da: 74 10 je 3ec <printint+0x88> buf[i++] = '-'; 3dc: 8b 45 f4 mov -0xc(%ebp),%eax 3df: 8d 50 01 lea 0x1(%eax),%edx 3e2: 89 55 f4 mov %edx,-0xc(%ebp) 3e5: c6 44 05 dc 2d movb $0x2d,-0x24(%ebp,%eax,1) while(--i >= 0) 3ea: eb 1f jmp 40b <printint+0xa7> 3ec: eb 1d jmp 40b <printint+0xa7> putc(fd, buf[i]); 3ee: 8d 55 dc lea -0x24(%ebp),%edx 3f1: 8b 45 f4 mov -0xc(%ebp),%eax 3f4: 01 d0 add %edx,%eax 3f6: 0f b6 00 movzbl (%eax),%eax 3f9: 0f be c0 movsbl %al,%eax 3fc: 89 44 24 04 mov %eax,0x4(%esp) 400: 8b 45 08 mov 0x8(%ebp),%eax 403: 89 04 24 mov %eax,(%esp) 406: e8 31 ff ff ff call 33c <putc> buf[i++] = digits[x % base]; }while((x /= base) != 0); if(neg) buf[i++] = '-'; while(--i >= 0) 40b: 83 6d f4 01 subl $0x1,-0xc(%ebp) 40f: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 413: 79 d9 jns 3ee <printint+0x8a> putc(fd, buf[i]); } 415: 83 c4 30 add $0x30,%esp 418: 5b pop %ebx 419: 5e pop %esi 41a: 5d pop %ebp 41b: c3 ret 0000041c <printf>: // Print to the given fd. Only understands %d, %x, %p, %s. void printf(int fd, char *fmt, ...) { 41c: 55 push %ebp 41d: 89 e5 mov %esp,%ebp 41f: 83 ec 38 sub $0x38,%esp char *s; int c, i, state; uint *ap; state = 0; 422: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp) ap = (uint*)(void*)&fmt + 1; 429: 8d 45 0c lea 0xc(%ebp),%eax 42c: 83 c0 04 add $0x4,%eax 42f: 89 45 e8 mov %eax,-0x18(%ebp) for(i = 0; fmt[i]; i++){ 432: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) 439: e9 7c 01 00 00 jmp 5ba <printf+0x19e> c = fmt[i] & 0xff; 43e: 8b 55 0c mov 0xc(%ebp),%edx 441: 8b 45 f0 mov -0x10(%ebp),%eax 444: 01 d0 add %edx,%eax 446: 0f b6 00 movzbl (%eax),%eax 449: 0f be c0 movsbl %al,%eax 44c: 25 ff 00 00 00 and $0xff,%eax 451: 89 45 e4 mov %eax,-0x1c(%ebp) if(state == 0){ 454: 83 7d ec 00 cmpl $0x0,-0x14(%ebp) 458: 75 2c jne 486 <printf+0x6a> if(c == '%'){ 45a: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp) 45e: 75 0c jne 46c <printf+0x50> state = '%'; 460: c7 45 ec 25 00 00 00 movl $0x25,-0x14(%ebp) 467: e9 4a 01 00 00 jmp 5b6 <printf+0x19a> } else { putc(fd, c); 46c: 8b 45 e4 mov -0x1c(%ebp),%eax 46f: 0f be c0 movsbl %al,%eax 472: 89 44 24 04 mov %eax,0x4(%esp) 476: 8b 45 08 mov 0x8(%ebp),%eax 479: 89 04 24 mov %eax,(%esp) 47c: e8 bb fe ff ff call 33c <putc> 481: e9 30 01 00 00 jmp 5b6 <printf+0x19a> } } else if(state == '%'){ 486: 83 7d ec 25 cmpl $0x25,-0x14(%ebp) 48a: 0f 85 26 01 00 00 jne 5b6 <printf+0x19a> if(c == 'd'){ 490: 83 7d e4 64 cmpl $0x64,-0x1c(%ebp) 494: 75 2d jne 4c3 <printf+0xa7> printint(fd, *ap, 10, 1); 496: 8b 45 e8 mov -0x18(%ebp),%eax 499: 8b 00 mov (%eax),%eax 49b: c7 44 24 0c 01 00 00 movl $0x1,0xc(%esp) 4a2: 00 4a3: c7 44 24 08 0a 00 00 movl $0xa,0x8(%esp) 4aa: 00 4ab: 89 44 24 04 mov %eax,0x4(%esp) 4af: 8b 45 08 mov 0x8(%ebp),%eax 4b2: 89 04 24 mov %eax,(%esp) 4b5: e8 aa fe ff ff call 364 <printint> ap++; 4ba: 83 45 e8 04 addl $0x4,-0x18(%ebp) 4be: e9 ec 00 00 00 jmp 5af <printf+0x193> } else if(c == 'x' || c == 'p'){ 4c3: 83 7d e4 78 cmpl $0x78,-0x1c(%ebp) 4c7: 74 06 je 4cf <printf+0xb3> 4c9: 83 7d e4 70 cmpl $0x70,-0x1c(%ebp) 4cd: 75 2d jne 4fc <printf+0xe0> printint(fd, *ap, 16, 0); 4cf: 8b 45 e8 mov -0x18(%ebp),%eax 4d2: 8b 00 mov (%eax),%eax 4d4: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp) 4db: 00 4dc: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp) 4e3: 00 4e4: 89 44 24 04 mov %eax,0x4(%esp) 4e8: 8b 45 08 mov 0x8(%ebp),%eax 4eb: 89 04 24 mov %eax,(%esp) 4ee: e8 71 fe ff ff call 364 <printint> ap++; 4f3: 83 45 e8 04 addl $0x4,-0x18(%ebp) 4f7: e9 b3 00 00 00 jmp 5af <printf+0x193> } else if(c == 's'){ 4fc: 83 7d e4 73 cmpl $0x73,-0x1c(%ebp) 500: 75 45 jne 547 <printf+0x12b> s = (char*)*ap; 502: 8b 45 e8 mov -0x18(%ebp),%eax 505: 8b 00 mov (%eax),%eax 507: 89 45 f4 mov %eax,-0xc(%ebp) ap++; 50a: 83 45 e8 04 addl $0x4,-0x18(%ebp) if(s == 0) 50e: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 512: 75 09 jne 51d <printf+0x101> s = "(null)"; 514: c7 45 f4 92 08 00 00 movl $0x892,-0xc(%ebp) while(*s != 0){ 51b: eb 1e jmp 53b <printf+0x11f> 51d: eb 1c jmp 53b <printf+0x11f> putc(fd, *s); 51f: 8b 45 f4 mov -0xc(%ebp),%eax 522: 0f b6 00 movzbl (%eax),%eax 525: 0f be c0 movsbl %al,%eax 528: 89 44 24 04 mov %eax,0x4(%esp) 52c: 8b 45 08 mov 0x8(%ebp),%eax 52f: 89 04 24 mov %eax,(%esp) 532: e8 05 fe ff ff call 33c <putc> s++; 537: 83 45 f4 01 addl $0x1,-0xc(%ebp) } else if(c == 's'){ s = (char*)*ap; ap++; if(s == 0) s = "(null)"; while(*s != 0){ 53b: 8b 45 f4 mov -0xc(%ebp),%eax 53e: 0f b6 00 movzbl (%eax),%eax 541: 84 c0 test %al,%al 543: 75 da jne 51f <printf+0x103> 545: eb 68 jmp 5af <printf+0x193> putc(fd, *s); s++; } } else if(c == 'c'){ 547: 83 7d e4 63 cmpl $0x63,-0x1c(%ebp) 54b: 75 1d jne 56a <printf+0x14e> putc(fd, *ap); 54d: 8b 45 e8 mov -0x18(%ebp),%eax 550: 8b 00 mov (%eax),%eax 552: 0f be c0 movsbl %al,%eax 555: 89 44 24 04 mov %eax,0x4(%esp) 559: 8b 45 08 mov 0x8(%ebp),%eax 55c: 89 04 24 mov %eax,(%esp) 55f: e8 d8 fd ff ff call 33c <putc> ap++; 564: 83 45 e8 04 addl $0x4,-0x18(%ebp) 568: eb 45 jmp 5af <printf+0x193> } else if(c == '%'){ 56a: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp) 56e: 75 17 jne 587 <printf+0x16b> putc(fd, c); 570: 8b 45 e4 mov -0x1c(%ebp),%eax 573: 0f be c0 movsbl %al,%eax 576: 89 44 24 04 mov %eax,0x4(%esp) 57a: 8b 45 08 mov 0x8(%ebp),%eax 57d: 89 04 24 mov %eax,(%esp) 580: e8 b7 fd ff ff call 33c <putc> 585: eb 28 jmp 5af <printf+0x193> } else { // Unknown % sequence. Print it to draw attention. putc(fd, '%'); 587: c7 44 24 04 25 00 00 movl $0x25,0x4(%esp) 58e: 00 58f: 8b 45 08 mov 0x8(%ebp),%eax 592: 89 04 24 mov %eax,(%esp) 595: e8 a2 fd ff ff call 33c <putc> putc(fd, c); 59a: 8b 45 e4 mov -0x1c(%ebp),%eax 59d: 0f be c0 movsbl %al,%eax 5a0: 89 44 24 04 mov %eax,0x4(%esp) 5a4: 8b 45 08 mov 0x8(%ebp),%eax 5a7: 89 04 24 mov %eax,(%esp) 5aa: e8 8d fd ff ff call 33c <putc> } state = 0; 5af: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp) int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ 5b6: 83 45 f0 01 addl $0x1,-0x10(%ebp) 5ba: 8b 55 0c mov 0xc(%ebp),%edx 5bd: 8b 45 f0 mov -0x10(%ebp),%eax 5c0: 01 d0 add %edx,%eax 5c2: 0f b6 00 movzbl (%eax),%eax 5c5: 84 c0 test %al,%al 5c7: 0f 85 71 fe ff ff jne 43e <printf+0x22> putc(fd, c); } state = 0; } } } 5cd: c9 leave 5ce: c3 ret 5cf: 90 nop 000005d0 <free>: static Header base; static Header *freep; void free(void *ap) { 5d0: 55 push %ebp 5d1: 89 e5 mov %esp,%ebp 5d3: 83 ec 10 sub $0x10,%esp Header *bp, *p; bp = (Header*)ap - 1; 5d6: 8b 45 08 mov 0x8(%ebp),%eax 5d9: 83 e8 08 sub $0x8,%eax 5dc: 89 45 f8 mov %eax,-0x8(%ebp) for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 5df: a1 bc 0b 00 00 mov 0xbbc,%eax 5e4: 89 45 fc mov %eax,-0x4(%ebp) 5e7: eb 24 jmp 60d <free+0x3d> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 5e9: 8b 45 fc mov -0x4(%ebp),%eax 5ec: 8b 00 mov (%eax),%eax 5ee: 3b 45 fc cmp -0x4(%ebp),%eax 5f1: 77 12 ja 605 <free+0x35> 5f3: 8b 45 f8 mov -0x8(%ebp),%eax 5f6: 3b 45 fc cmp -0x4(%ebp),%eax 5f9: 77 24 ja 61f <free+0x4f> 5fb: 8b 45 fc mov -0x4(%ebp),%eax 5fe: 8b 00 mov (%eax),%eax 600: 3b 45 f8 cmp -0x8(%ebp),%eax 603: 77 1a ja 61f <free+0x4f> free(void *ap) { Header *bp, *p; bp = (Header*)ap - 1; for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 605: 8b 45 fc mov -0x4(%ebp),%eax 608: 8b 00 mov (%eax),%eax 60a: 89 45 fc mov %eax,-0x4(%ebp) 60d: 8b 45 f8 mov -0x8(%ebp),%eax 610: 3b 45 fc cmp -0x4(%ebp),%eax 613: 76 d4 jbe 5e9 <free+0x19> 615: 8b 45 fc mov -0x4(%ebp),%eax 618: 8b 00 mov (%eax),%eax 61a: 3b 45 f8 cmp -0x8(%ebp),%eax 61d: 76 ca jbe 5e9 <free+0x19> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) break; if(bp + bp->s.size == p->s.ptr){ 61f: 8b 45 f8 mov -0x8(%ebp),%eax 622: 8b 40 04 mov 0x4(%eax),%eax 625: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx 62c: 8b 45 f8 mov -0x8(%ebp),%eax 62f: 01 c2 add %eax,%edx 631: 8b 45 fc mov -0x4(%ebp),%eax 634: 8b 00 mov (%eax),%eax 636: 39 c2 cmp %eax,%edx 638: 75 24 jne 65e <free+0x8e> bp->s.size += p->s.ptr->s.size; 63a: 8b 45 f8 mov -0x8(%ebp),%eax 63d: 8b 50 04 mov 0x4(%eax),%edx 640: 8b 45 fc mov -0x4(%ebp),%eax 643: 8b 00 mov (%eax),%eax 645: 8b 40 04 mov 0x4(%eax),%eax 648: 01 c2 add %eax,%edx 64a: 8b 45 f8 mov -0x8(%ebp),%eax 64d: 89 50 04 mov %edx,0x4(%eax) bp->s.ptr = p->s.ptr->s.ptr; 650: 8b 45 fc mov -0x4(%ebp),%eax 653: 8b 00 mov (%eax),%eax 655: 8b 10 mov (%eax),%edx 657: 8b 45 f8 mov -0x8(%ebp),%eax 65a: 89 10 mov %edx,(%eax) 65c: eb 0a jmp 668 <free+0x98> } else bp->s.ptr = p->s.ptr; 65e: 8b 45 fc mov -0x4(%ebp),%eax 661: 8b 10 mov (%eax),%edx 663: 8b 45 f8 mov -0x8(%ebp),%eax 666: 89 10 mov %edx,(%eax) if(p + p->s.size == bp){ 668: 8b 45 fc mov -0x4(%ebp),%eax 66b: 8b 40 04 mov 0x4(%eax),%eax 66e: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx 675: 8b 45 fc mov -0x4(%ebp),%eax 678: 01 d0 add %edx,%eax 67a: 3b 45 f8 cmp -0x8(%ebp),%eax 67d: 75 20 jne 69f <free+0xcf> p->s.size += bp->s.size; 67f: 8b 45 fc mov -0x4(%ebp),%eax 682: 8b 50 04 mov 0x4(%eax),%edx 685: 8b 45 f8 mov -0x8(%ebp),%eax 688: 8b 40 04 mov 0x4(%eax),%eax 68b: 01 c2 add %eax,%edx 68d: 8b 45 fc mov -0x4(%ebp),%eax 690: 89 50 04 mov %edx,0x4(%eax) p->s.ptr = bp->s.ptr; 693: 8b 45 f8 mov -0x8(%ebp),%eax 696: 8b 10 mov (%eax),%edx 698: 8b 45 fc mov -0x4(%ebp),%eax 69b: 89 10 mov %edx,(%eax) 69d: eb 08 jmp 6a7 <free+0xd7> } else p->s.ptr = bp; 69f: 8b 45 fc mov -0x4(%ebp),%eax 6a2: 8b 55 f8 mov -0x8(%ebp),%edx 6a5: 89 10 mov %edx,(%eax) freep = p; 6a7: 8b 45 fc mov -0x4(%ebp),%eax 6aa: a3 bc 0b 00 00 mov %eax,0xbbc } 6af: c9 leave 6b0: c3 ret 000006b1 <morecore>: static Header* morecore(uint nu) { 6b1: 55 push %ebp 6b2: 89 e5 mov %esp,%ebp 6b4: 83 ec 28 sub $0x28,%esp char *p; Header *hp; if(nu < 4096) 6b7: 81 7d 08 ff 0f 00 00 cmpl $0xfff,0x8(%ebp) 6be: 77 07 ja 6c7 <morecore+0x16> nu = 4096; 6c0: c7 45 08 00 10 00 00 movl $0x1000,0x8(%ebp) p = sbrk(nu * sizeof(Header)); 6c7: 8b 45 08 mov 0x8(%ebp),%eax 6ca: c1 e0 03 shl $0x3,%eax 6cd: 89 04 24 mov %eax,(%esp) 6d0: e8 3f fc ff ff call 314 <sbrk> 6d5: 89 45 f4 mov %eax,-0xc(%ebp) if(p == (char*)-1) 6d8: 83 7d f4 ff cmpl $0xffffffff,-0xc(%ebp) 6dc: 75 07 jne 6e5 <morecore+0x34> return 0; 6de: b8 00 00 00 00 mov $0x0,%eax 6e3: eb 22 jmp 707 <morecore+0x56> hp = (Header*)p; 6e5: 8b 45 f4 mov -0xc(%ebp),%eax 6e8: 89 45 f0 mov %eax,-0x10(%ebp) hp->s.size = nu; 6eb: 8b 45 f0 mov -0x10(%ebp),%eax 6ee: 8b 55 08 mov 0x8(%ebp),%edx 6f1: 89 50 04 mov %edx,0x4(%eax) free((void*)(hp + 1)); 6f4: 8b 45 f0 mov -0x10(%ebp),%eax 6f7: 83 c0 08 add $0x8,%eax 6fa: 89 04 24 mov %eax,(%esp) 6fd: e8 ce fe ff ff call 5d0 <free> return freep; 702: a1 bc 0b 00 00 mov 0xbbc,%eax } 707: c9 leave 708: c3 ret 00000709 <malloc>: void* malloc(uint nbytes) { 709: 55 push %ebp 70a: 89 e5 mov %esp,%ebp 70c: 83 ec 28 sub $0x28,%esp Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; 70f: 8b 45 08 mov 0x8(%ebp),%eax 712: 83 c0 07 add $0x7,%eax 715: c1 e8 03 shr $0x3,%eax 718: 83 c0 01 add $0x1,%eax 71b: 89 45 ec mov %eax,-0x14(%ebp) if((prevp = freep) == 0){ 71e: a1 bc 0b 00 00 mov 0xbbc,%eax 723: 89 45 f0 mov %eax,-0x10(%ebp) 726: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 72a: 75 23 jne 74f <malloc+0x46> base.s.ptr = freep = prevp = &base; 72c: c7 45 f0 b4 0b 00 00 movl $0xbb4,-0x10(%ebp) 733: 8b 45 f0 mov -0x10(%ebp),%eax 736: a3 bc 0b 00 00 mov %eax,0xbbc 73b: a1 bc 0b 00 00 mov 0xbbc,%eax 740: a3 b4 0b 00 00 mov %eax,0xbb4 base.s.size = 0; 745: c7 05 b8 0b 00 00 00 movl $0x0,0xbb8 74c: 00 00 00 } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ 74f: 8b 45 f0 mov -0x10(%ebp),%eax 752: 8b 00 mov (%eax),%eax 754: 89 45 f4 mov %eax,-0xc(%ebp) if(p->s.size >= nunits){ 757: 8b 45 f4 mov -0xc(%ebp),%eax 75a: 8b 40 04 mov 0x4(%eax),%eax 75d: 3b 45 ec cmp -0x14(%ebp),%eax 760: 72 4d jb 7af <malloc+0xa6> if(p->s.size == nunits) 762: 8b 45 f4 mov -0xc(%ebp),%eax 765: 8b 40 04 mov 0x4(%eax),%eax 768: 3b 45 ec cmp -0x14(%ebp),%eax 76b: 75 0c jne 779 <malloc+0x70> prevp->s.ptr = p->s.ptr; 76d: 8b 45 f4 mov -0xc(%ebp),%eax 770: 8b 10 mov (%eax),%edx 772: 8b 45 f0 mov -0x10(%ebp),%eax 775: 89 10 mov %edx,(%eax) 777: eb 26 jmp 79f <malloc+0x96> else { p->s.size -= nunits; 779: 8b 45 f4 mov -0xc(%ebp),%eax 77c: 8b 40 04 mov 0x4(%eax),%eax 77f: 2b 45 ec sub -0x14(%ebp),%eax 782: 89 c2 mov %eax,%edx 784: 8b 45 f4 mov -0xc(%ebp),%eax 787: 89 50 04 mov %edx,0x4(%eax) p += p->s.size; 78a: 8b 45 f4 mov -0xc(%ebp),%eax 78d: 8b 40 04 mov 0x4(%eax),%eax 790: c1 e0 03 shl $0x3,%eax 793: 01 45 f4 add %eax,-0xc(%ebp) p->s.size = nunits; 796: 8b 45 f4 mov -0xc(%ebp),%eax 799: 8b 55 ec mov -0x14(%ebp),%edx 79c: 89 50 04 mov %edx,0x4(%eax) } freep = prevp; 79f: 8b 45 f0 mov -0x10(%ebp),%eax 7a2: a3 bc 0b 00 00 mov %eax,0xbbc return (void*)(p + 1); 7a7: 8b 45 f4 mov -0xc(%ebp),%eax 7aa: 83 c0 08 add $0x8,%eax 7ad: eb 38 jmp 7e7 <malloc+0xde> } if(p == freep) 7af: a1 bc 0b 00 00 mov 0xbbc,%eax 7b4: 39 45 f4 cmp %eax,-0xc(%ebp) 7b7: 75 1b jne 7d4 <malloc+0xcb> if((p = morecore(nunits)) == 0) 7b9: 8b 45 ec mov -0x14(%ebp),%eax 7bc: 89 04 24 mov %eax,(%esp) 7bf: e8 ed fe ff ff call 6b1 <morecore> 7c4: 89 45 f4 mov %eax,-0xc(%ebp) 7c7: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 7cb: 75 07 jne 7d4 <malloc+0xcb> return 0; 7cd: b8 00 00 00 00 mov $0x0,%eax 7d2: eb 13 jmp 7e7 <malloc+0xde> nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; if((prevp = freep) == 0){ base.s.ptr = freep = prevp = &base; base.s.size = 0; } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ 7d4: 8b 45 f4 mov -0xc(%ebp),%eax 7d7: 89 45 f0 mov %eax,-0x10(%ebp) 7da: 8b 45 f4 mov -0xc(%ebp),%eax 7dd: 8b 00 mov (%eax),%eax 7df: 89 45 f4 mov %eax,-0xc(%ebp) return (void*)(p + 1); } if(p == freep) if((p = morecore(nunits)) == 0) return 0; } 7e2: e9 70 ff ff ff jmp 757 <malloc+0x4e> } 7e7: c9 leave 7e8: c3 ret 7e9: 66 90 xchg %ax,%ax 7eb: 90 nop 000007ec <xchg>: asm volatile("sti"); } static inline uint xchg(volatile uint *addr, uint newval) { 7ec: 55 push %ebp 7ed: 89 e5 mov %esp,%ebp 7ef: 83 ec 10 sub $0x10,%esp uint result; // The + in "+m" denotes a read-modify-write operand. asm volatile("lock; xchgl %0, %1" : 7f2: 8b 55 08 mov 0x8(%ebp),%edx 7f5: 8b 45 0c mov 0xc(%ebp),%eax 7f8: 8b 4d 08 mov 0x8(%ebp),%ecx 7fb: f0 87 02 lock xchg %eax,(%edx) 7fe: 89 45 fc mov %eax,-0x4(%ebp) "+m" (*addr), "=a" (result) : "1" (newval) : "cc"); return result; 801: 8b 45 fc mov -0x4(%ebp),%eax } 804: c9 leave 805: c3 ret 00000806 <mutex_init>: #include "types.h" #include "user.h" #include "x86.h" #include "threadlib.h" void mutex_init(mutex_t *m) { 806: 55 push %ebp 807: 89 e5 mov %esp,%ebp // 0 indicates that lock is available, 1 that it is held by a thread m->flag = 0; 809: 8b 45 08 mov 0x8(%ebp),%eax 80c: c7 00 00 00 00 00 movl $0x0,(%eax) } 812: 5d pop %ebp 813: c3 ret 00000814 <mutex_lock>: void mutex_lock(mutex_t *m) { 814: 55 push %ebp 815: 89 e5 mov %esp,%ebp 817: 83 ec 08 sub $0x8,%esp while (xchg(&m->flag, 1) == 1); // spin-wait (do nothing) 81a: 90 nop 81b: 8b 45 08 mov 0x8(%ebp),%eax 81e: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp) 825: 00 826: 89 04 24 mov %eax,(%esp) 829: e8 be ff ff ff call 7ec <xchg> 82e: 83 f8 01 cmp $0x1,%eax 831: 74 e8 je 81b <mutex_lock+0x7> } 833: c9 leave 834: c3 ret 00000835 <mutex_unlock>: void mutex_unlock(mutex_t *m) { 835: 55 push %ebp 836: 89 e5 mov %esp,%ebp m->flag = 0; 838: 8b 45 08 mov 0x8(%ebp),%eax 83b: c7 00 00 00 00 00 movl $0x0,(%eax) } 841: 5d pop %ebp 842: c3 ret 00000843 <thread_create>: if(!pid) (*start_routine)(arg); else return pid; }*/ int thread_create(void(*child)(void*), void *arg_ptr) { 843: 55 push %ebp 844: 89 e5 mov %esp,%ebp 846: 83 ec 28 sub $0x28,%esp void *stack = malloc(4096); 849: c7 04 24 00 10 00 00 movl $0x1000,(%esp) 850: e8 b4 fe ff ff call 709 <malloc> 855: 89 45 f4 mov %eax,-0xc(%ebp) int clone_pid = clone(child, arg_ptr, stack); 858: 8b 45 f4 mov -0xc(%ebp),%eax 85b: 89 44 24 08 mov %eax,0x8(%esp) 85f: 8b 45 0c mov 0xc(%ebp),%eax 862: 89 44 24 04 mov %eax,0x4(%esp) 866: 8b 45 08 mov 0x8(%ebp),%eax 869: 89 04 24 mov %eax,(%esp) 86c: e8 bb fa ff ff call 32c <clone> 871: 89 45 f0 mov %eax,-0x10(%ebp) return clone_pid; 874: 8b 45 f0 mov -0x10(%ebp),%eax } 877: c9 leave 878: c3 ret 00000879 <thread_join>: int thread_join(void) { 879: 55 push %ebp 87a: 89 e5 mov %esp,%ebp 87c: 83 ec 28 sub $0x28,%esp void *join_s; int join_pid = join(&join_s); 87f: 8d 45 f0 lea -0x10(%ebp),%eax 882: 89 04 24 mov %eax,(%esp) 885: e8 aa fa ff ff call 334 <join> 88a: 89 45 f4 mov %eax,-0xc(%ebp) return join_pid; 88d: 8b 45 f4 mov -0xc(%ebp),%eax 890: c9 leave 891: c3 ret
33.82804
70
0.427574
[ "Apache-2.0", "MIT-0" ]
KaushikKPDARE/xv6-Clone-System-Call
zombie.asm
43,672
Assembly
; A010167: Continued fraction for sqrt(96). ; 9,1,3,1,18,1,3,1,18,1,3,1,18,1,3,1,18,1,3,1,18,1,3,1,18,1,3,1,18,1,3,1,18,1,3,1,18,1,3,1,18,1,3,1,18,1,3,1,18,1,3,1,18,1,3,1,18,1,3,1,18,1,3,1,18,1,3,1,18,1,3,1,18,1,3,1,18,1,3,1,18,1,3,1,18,1,3,1,18,1,3,1,18,1,3,1,18,1,3,1 seq $0,40304 ; Continued fraction for sqrt(322). dif $0,4 div $0,2 add $0,1
43.375
225
0.599424
[ "Apache-2.0" ]
ckrause/cm
programs/oeis/010/A010167.asm
347
Assembly
; A168964: Number of reduced words of length n in Coxeter group on 47 generators S_i with relations (S_i)^2 = (S_i S_j)^22 = I. ; 1,47,2162,99452,4574792,210440432,9680259872,445291954112,20483429889152,942237774900992,43342937645445632,1993775131690499072,91713656057762957312,4218828178657096036352,194066096218226417672192 add $0,1 mov $3,1 lpb $0 sub $0,1 add $2,$3 div $3,$2 mul $2,46 lpe mov $0,$2 div $0,46
30.214286
197
0.763593
[ "Apache-2.0" ]
ckrause/loda-programs
oeis/168/A168964.asm
423
Assembly
/****************************************************************** * Copyright (C) 2015-2021 Henrik Holmdahl <[email protected]> ******************************************************************/ .filenamespace AnimationTrigger // .segment Zeropage "AnimationTrigger zeropage data" zpBoundaryDataLo: .fill 1, 0 zpBoundaryDataHi: .fill 1, 0 zpAnimationIndexLo: .fill 1, 0 zpAnimationIndexHi: .fill 1, 0 zpAnimationInstanceLo: .fill 1,0 zpAnimationInstanceHi: .fill 1,0 // .segment Code "AnimationTrigger code" .const kTriggerQueueSize = 8 // Must be power of 2. .const kActivationScreenWidth = kScreenWidthPixels .const kTriggerWindowPadding = 4 // Find max number of Animations for any level. .var kMaxAnimations = 0 .for (var level = 0; level < AnimationsPerLevel.size(); level++) { .eval kMaxAnimations = max(kMaxAnimations, AnimationsPerLevel.get(level).size()) } .const kNumAnimationStatuses = (kMaxAnimations + 7) / 8 // Store AnimationIndex hi-byte in topmost N bits of boundary x hi-byte. .const kMaxAnimationIndices = 1024 // Must be power of 2. .const kNumAnimationIndexHiBits = round(log10(kMaxAnimationIndices)/log10(2)) - 8 .const kAnimationIndexHiShift = 8 - kNumAnimationIndexHiBits .const kAnimationIndexHiBits = ((1 << kNumAnimationIndexHiBits) - 1) << kAnimationIndexHiShift .const kAnimationIndexHiDiv8Shift = kAnimationIndexHiShift - 5 // Number of Animation update slots. .const kMaxUpdateSlots = 8 // Boundary = Animation instance index (per level), position (x), which side (min or max) of bounding area and type of Animation. .struct Boundary { animationIndex, x, isMin, typeIndex } // These values are used as offsets into struct. .enum { kAnimationIndexLo, kBoundaryLo, kBoundaryHiAnimationIndexHi, kBoundarySize } // Add Animation boundaries per level. .var BoundariesPerLevel = List() .for (var level = 0; level < AnimationsPerLevel.size(); level++) { .var levelAnimations = AnimationsPerLevel.get(level) .var animationBoundaries = List() .eval BoundariesPerLevel.add(animationBoundaries) .for (var i = 0; i < levelAnimations.size(); i++) { // Find bounding interval in x. .var instance = levelAnimations.get(i) .var animation = AnimationByName.get(instance.animationName) .var type = animation.getStructName() .var typeIndex = AnimationTypeToTypeIndex.get(type) .var rangeX = PositionRange(0,0) .eval rangeX = GetClipAnimationRange(rangeX, animation) .eval rangeX = GetFormationClipAnimationRange(rangeX, animation) .eval rangeX = GetMegaSpriteAnimationRange(rangeX, animation) .eval rangeX = GetGameAnimationRange(rangeX, animation) .if (rangeX.maxX > kMaxPosX) { .error "Position X out of range (max is " + kMaxPosX + "): " + animation.animationName } .var minX = rangeX.minX + instance.originX - kTriggerWindowPadding .var maxX = rangeX.maxX + instance.originX + kTriggerWindowPadding .eval minX = minX < kActivationScreenWidth ? 0 : minX - kActivationScreenWidth .eval maxX = maxX + kSpriteWidth .eval animationBoundaries.add(Boundary(i, minX, true, typeIndex)) .eval animationBoundaries.add(Boundary(i, maxX, false, typeIndex)) } } // Sort boundaries per level in ascending order. .for (var level = 0; level < BoundariesPerLevel.size(); level++) { .var animationBoundaries = BoundariesPerLevel.get(level) .for (var i = 0; i < animationBoundaries.size() - 1; i++) { .var minX = animationBoundaries.get(i).x .for (var j = i + 1; j < animationBoundaries.size(); j++) { .var x = animationBoundaries.get(j).x .if (x < minX) { .var boundary = animationBoundaries.get(i) .eval animationBoundaries.set(i, animationBoundaries.get(j)) .eval animationBoundaries.set(j, boundary) .eval minX = x } } } // Verify that we don't use more Animators than available at any point in time. .var numActiveAnimators = 0 .for (var i = 0; i < animationBoundaries.size(); i++) { .var boundary = animationBoundaries.get(i) /* .if ((boundary.typeIndex == AnimationTypeToTypeIndex.get("ClipAnimation")) || (boundary.typeIndex == AnimationTypeToTypeIndex.get("FormationClipAnimation"))) */ { .if (boundary.isMin) { .eval numActiveAnimators = numActiveAnimators + 1 .if (numActiveAnimators > Animator.kNumSlots) { .error "Too many Animators used (max " + Animator.kNumSlots + ")" } } else { .eval numActiveAnimators = numActiveAnimators - 1 } } } // Add begin/end boundary markers first/last in list. .eval animationBoundaries.reverse() .eval animationBoundaries.add(Boundary(0, 0, false, 0)) .eval animationBoundaries.reverse() .eval animationBoundaries.add(Boundary(0, $ffff, true, 0)) } // Init: { lda #0 ldy #kNumAnimationStatuses ClearStatus:dey sta AnimationStatuses,y bne ClearStatus sta QueueTail sta QueueHead ldy #kMaxUpdateSlots lda #kUndefined ClearSlot: dey sta UpdateAnimationIndicesLo,y sta UpdateAnimationIndicesHi,y bne ClearSlot // Must be done after setting initial Camera position. ldy.zp LevelData.zpCurrent lda BoundaryDataLo,y sta zpBoundaryDataLo lda BoundaryDataHi,y sta zpBoundaryDataHi Try: jsr TryNextBoundary bcc Done jsr NextBoundary jsr GetAnimationIndexDiv8 tax ldy #kAnimationIndexLo lda (zpBoundaryDataLo),y and #7 tay lda Bits,y eor AnimationStatuses,x sta AnimationStatuses,x jmp Try // bra Done: // Activate all active animations. ldy #0 Next: lda AnimationStatuses,y beq Skip tya pha lda #0 sta zpAnimationIndexHi tya asl // x8 rol zpAnimationIndexHi asl rol zpAnimationIndexHi asl rol zpAnimationIndexHi sta zpAnimationIndexLo lda AnimationStatuses,y NextAnim: lsr bcc SkipAnim pha jsr GetAnimationInstance jsr ActivateAnimation pla SkipAnim: inc zpAnimationIndexLo tay bne NextAnim pla tay Skip: iny cpy #kNumAnimationStatuses bne Next rts } // NextBoundary: { // c = 1 lda zpBoundaryDataLo adc #kBoundarySize - 1 // c = 1 sta zpBoundaryDataLo bcc Done inc zpBoundaryDataHi Done: rts } // TryNextBoundary: { // Returns c = 1 if entered next boundary, c = 0 otherwise. ldy #kBoundaryHiAnimationIndexHi + kBoundarySize lda (zpBoundaryDataLo),y and #~kAnimationIndexHiBits tsx pha lda Camera.PositionXDiv2Hi cmp kStackAdr,x txs bne Done ldy #kBoundaryLo + kBoundarySize lda Camera.PositionXDiv2Lo cmp (zpBoundaryDataLo),y Done: rts } // // Update runs on main task. Update: { Right: { Try: jsr TryNextBoundary bcc Left jsr NextBoundary // Todo: First check if ToggleAnimator successful? jsr ToggleAnimator // Enter/exit handler here. jmp Try } Left: { Try: ldy #kBoundaryHiAnimationIndexHi lda (zpBoundaryDataLo),y and #~kAnimationIndexHiBits tsx pha lda Camera.PositionXDiv2Hi cmp kStackAdr,x txs bne Decide lda Camera.PositionXDiv2Lo ldy #kBoundaryLo cmp (zpBoundaryDataLo),y Decide: bcs Done jsr ToggleAnimator lda zpBoundaryDataLo sec sbc #kBoundarySize sta zpBoundaryDataLo bcs Try dec zpBoundaryDataHi bcc Try // bra } Done: rts } // .macro UpdateSlot() { Start: ldy Instance:#kUndefined bmi Skip .label CodeLo = * + 1 .label CodeHi = * + 2 jsr kDefaultAdr Skip: .label Size = * - Start } UpdateActive: { Slot: UpdateSlot() .for (var i = 1; i < kMaxUpdateSlots; i++) { UpdateSlot() } rts } // GetAnimationInstance: { // Address of animation instance data. lda zpAnimationIndexLo // x6 = kAnimationInstanceSize ldy zpAnimationIndexHi sty zpAnimationInstanceHi asl rol zpAnimationInstanceHi adc zpAnimationIndexLo sta zpAnimationInstanceLo lda zpAnimationInstanceHi adc zpAnimationIndexHi sta zpAnimationInstanceHi lda zpAnimationInstanceLo asl rol zpAnimationInstanceHi ldy.zp LevelData.zpCurrent adc AnimationData.LevelAnimationsLo,y sta zpAnimationInstanceLo lda zpAnimationInstanceHi adc AnimationData.LevelAnimationsHi,y sta zpAnimationInstanceHi ldy #0 // kTypeAnimationIndexHi lda (zpAnimationInstanceLo),y // a, x = type index. lsr tax rts } // GetAnimationIndexDiv8: { ldy #kAnimationIndexLo lda (zpBoundaryDataLo),y lsr lsr lsr sta LoBits ldy #kBoundaryHiAnimationIndexHi lda (zpBoundaryDataLo),y and #kAnimationIndexHiBits .for (var i = 0; i < kAnimationIndexHiDiv8Shift; i++) { lsr } ora LoBits:#0 rts } // GetAnimationIndexHi: { ldy #kBoundaryHiAnimationIndexHi lda (zpBoundaryDataLo),y and #kAnimationIndexHiBits asl .for (var i = 0; i < kAnimationIndexHiShift; i++) { rol } rts } // ToggleAnimator: { // Add animation index to head of queue. lda QueueHead and #kTriggerQueueSize - 1 tax inc QueueHead ldy #kBoundaryHiAnimationIndexHi lda (zpBoundaryDataLo),y and #kAnimationIndexHiBits asl .for (var i = 0; i < kAnimationIndexHiShift; i++) { rol } sta QueueAnimationIndicesHi,x ldy #kAnimationIndexLo lda (zpBoundaryDataLo),y sta QueueAnimationIndicesLo,x and #7 tax jsr GetAnimationIndexDiv8 tay lda AnimationStatuses,y eor Bits,x sta AnimationStatuses,y and Bits,x beq Deactivate TaskInput(ActivateAnimationTask) bne AddTask // bra Deactivate: TaskInput(DeactivateAnimationTask) AddTask: jmp Task.AddLowPriority } // Dequeue: { lda QueueTail and #kTriggerQueueSize - 1 tax lda QueueAnimationIndicesHi,x sta zpAnimationIndexHi lda QueueAnimationIndicesLo,x sta zpAnimationIndexLo jsr GetAnimationInstance inc QueueTail rts } // ActivateAnimationTask: { jsr Dequeue jsr ActivateAnimation ReturnFromTask() } // DeactivateAnimationTask: { jsr Dequeue jsr DeactivateAnimation ReturnFromTask() } // ActivateAnimation: { // zpAnimationInstanceLo/Hi // a, x = type index. pha lda #>(Return - 1) pha lda #<(Return - 1) pha lda ActivateHi,x pha lda ActivateLo,x pha rts // Call Activate. Return: // x = type instance index (e.g. animator slot). // Find free update slot. ldy #kMaxUpdateSlots - 1 TrySlot: lda UpdateAnimationIndicesHi,y bmi Found dey bpl TrySlot Found: lda zpAnimationIndexLo sta UpdateAnimationIndicesLo,y lda zpAnimationIndexHi sta UpdateAnimationIndicesHi,y // Add to UpdateActive. lda MulUpdateSlotCodeSize,y tay txa // x = type instance index sta UpdateActive.Slot.Instance,y pla tax // x = type index. lda UpdateLo,x sta UpdateActive.Slot.CodeLo,y lda UpdateHi,x sta UpdateActive.Slot.CodeHi,y rts } // DeactivateAnimation: { // zpAnimationInstanceLo/Hi // a, x = type index. lda DeactivateHi,x pha lda DeactivateLo,x pha ldy #kMaxUpdateSlots - 1 TrySlot: lda zpAnimationIndexLo cmp UpdateAnimationIndicesLo,y bne Next lda zpAnimationIndexHi cmp UpdateAnimationIndicesHi,y beq Found Next: dey bpl TrySlot Found: // Remove from UpdateActive. ldx MulUpdateSlotCodeSize,y lda UpdateActive.Slot.Instance,x pha lda #kUndefined sta UpdateAnimationIndicesLo,y sta UpdateAnimationIndicesHi,y sta UpdateActive.Slot.Instance,x pla tay // y = type instance index (e.g. animator slot index) rts // Call Deactivate. } // .segment Code "AnimationTrigger const data" // AOS to support more than 256 boundaries. // Todo: Multiple sets of boundaries for different types to trigger (animations, audio etc.)? // Boundary data per level. .var BoundaryDataPerLevel = List() .for (var level = 0; level < BoundariesPerLevel.size(); level++) { .eval BoundaryDataPerLevel.add(*) .var animationBoundaries = BoundariesPerLevel.get(level) .for (var i = 0; i < animationBoundaries.size(); i++) { .var boundary = animationBoundaries.get(i) .var x = boundary.x // Store at lower precision to gain one bit for storing animation index. .if (boundary.isMin) { .eval x = floor(x / 2) } else { .eval x = ceil(x / 2) } // kAnimationIndexLo .byte <boundary.animationIndex // kBoundaryLo, kBoundaryHiAnimationIndexHi .byte <x, (>x) + ((>boundary.animationIndex) << kAnimationIndexHiShift) } } // Start address of boundary data per level. BoundaryDataLo: .for (var i = 0; i < BoundaryDataPerLevel.size(); i++) { .byte <BoundaryDataPerLevel.get(i) } BoundaryDataHi: .for (var i = 0; i < BoundaryDataPerLevel.size(); i++) { .byte >BoundaryDataPerLevel.get(i) } // Type callbacks, "methods". .for (var i = 0; i < AnimationTypes.size(); i++) { .var typeName = AnimationTypes.get(i) .if (!AnimationTypeCallbacks.containsKey(typeName)) { .error "Missing animation callbacks for type " + typeName } } ActivateLo: .for (var i = 0; i < AnimationTypes.size(); i++) { .byte <(AnimationTypeCallbacks.get(AnimationTypes.get(i)).activate - 1)} ActivateHi: .for (var i = 0; i < AnimationTypes.size(); i++) { .byte >(AnimationTypeCallbacks.get(AnimationTypes.get(i)).activate - 1)} DeactivateLo: .for (var i = 0; i < AnimationTypes.size(); i++) { .byte <(AnimationTypeCallbacks.get(AnimationTypes.get(i)).deactivate - 1)} DeactivateHi: .for (var i = 0; i < AnimationTypes.size(); i++) { .byte >(AnimationTypeCallbacks.get(AnimationTypes.get(i)).deactivate - 1)} UpdateLo: .for (var i = 0; i < AnimationTypes.size(); i++) { .byte <(AnimationTypeCallbacks.get(AnimationTypes.get(i)).update - 0)} UpdateHi: .for (var i = 0; i < AnimationTypes.size(); i++) { .byte >(AnimationTypeCallbacks.get(AnimationTypes.get(i)).update - 0)} MulUpdateSlotCodeSize: .for (var i = 0; i < kMaxUpdateSlots; i++) { .byte i * UpdateActive.Slot.Size } .label Bits = CharTileMap.Bits // .segment BSS2 "AnimationTrigger data" // Todo: Interleave bits to represent status of multiple Animation types. AnimationStatuses: .fill kNumAnimationStatuses, 0 // Tail (index of next element to process). QueueTail: .byte 0 // Head (index of where to add next element). QueueHead: .byte 0 QueueAnimationIndicesLo: .fill kTriggerQueueSize, 0 QueueAnimationIndicesHi: .fill kTriggerQueueSize, 0 UpdateAnimationIndicesLo: .fill kMaxUpdateSlots, 0 UpdateAnimationIndicesHi: .fill kMaxUpdateSlots, 0
29.214178
130
0.518457
[ "MIT" ]
hhprg/C64Engine
Source/AnimationTrigger.asm
19,369
Assembly
; A005752: a(n) = n^2 + n*floor(n*tau) - floor(n*tau)^2. ; 0,1,1,5,4,1,9,5,16,11,4,19,11,1,20,9,31,19,5,31,16,45,29,11,44,25,4,41,19,59,36,11,55,29,1,49,20,71,41,9,64,31,89,55,19,81,44,5,71,31,100,59,16,89,45,121,76,29,109 mov $1,$0 pow $0,2 lpb $0,1 mov $3,$0 add $0,3 add $1,2 sub $0,$1 trn $0,2 mov $2,$3 lpe mov $1,4 add $1,$2 add $1,$2 sub $1,4 div $1,2
19.578947
165
0.561828
[ "Apache-2.0" ]
karttu/loda
programs/oeis/005/A005752.asm
372
Assembly
; $Id: ASMCpuId.asm 69111 2017-10-17 14:26:02Z vboxsync $ ;; @file ; IPRT - ASMCpuIdExSlow(). ; ; ; Copyright (C) 2012-2017 Oracle Corporation ; ; This file is part of VirtualBox Open Source Edition (OSE), as ; available from http://www.virtualbox.org. This file is free software; ; you can redistribute it and/or modify it under the terms of the GNU ; General Public License (GPL) as published by the Free Software ; Foundation, in version 2 as it comes in the "COPYING" file of the ; VirtualBox OSE distribution. VirtualBox OSE is distributed in the ; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. ; ; The contents of this file may alternatively be used under the terms ; of the Common Development and Distribution License Version 1.0 ; (CDDL) only, as it comes in the "COPYING.CDDL" file of the ; VirtualBox OSE distribution, in which case the provisions of the ; CDDL are applicable instead of those of the GPL. ; ; You may elect to license modified versions of this file under the ; terms and conditions of either the GPL or the CDDL or both. ; ;******************************************************************************* ;* Header Files * ;******************************************************************************* %include "iprt/asmdefs.mac" BEGINCODE ;; ; CPUID with EAX input, returning ALL output registers (no NULL checking). ; ; @param uOperator 8086:bp+4 x86:ebp+8 gcc:rdi msc:rcx ; @param pvEAX 8086:bp+8 x86:ebp+0c gcc:rsi msc:rdx ; @param pvEBX 8086:bp+0c x86:ebp+10 gcc:rdx msc:r8 ; @param pvECX 8086:bp+10 x86:ebp+14 gcc:rcx msc:r9 ; @param pvEDX 8086:bp+14 x86:ebp+18 gcc:r8 msc:rbp+30h ; ; DECLASM(void) ASMCpuId(uint32_t uOperator, void *pvEAX, void *pvEBX, void *pvECX, void *pvEDX); ; BEGINPROC_EXPORTED ASMCpuId push xBP mov xBP, xSP push xBX %ifdef ASM_CALL64_MSC %if ARCH_BITS != 64 %error ARCH_BITS mismatch? %endif mov eax, ecx mov r10, rdx cpuid mov [r10], eax mov [r8], ebx mov [r9], ecx mov r10, [rbp+30h] mov [r10], edx %elifdef ASM_CALL64_GCC mov eax, edi mov r10, rdx mov r11, rcx cpuid mov [rsi], eax mov [r10], ebx mov [r11], ecx mov [r8], edx %elif ARCH_BITS == 32 mov eax, [xBP + 08h] cpuid push edx mov edx, [xBP + 0ch] mov [edx], eax mov edx, [xBP + 10h] mov [edx], ebx mov edx, [xBP + 14h] mov [edx], ecx mov edx, [xBP + 18h] pop dword [edx] %elif ARCH_BITS == 16 push es push di mov eax, [xBP + 04h] cpuid les di, [xBP + 08h] mov [di], eax les di, [xBP + 0ch] mov [di], ebx les di, [xBP + 10h] mov [di], ecx les di, [xBP + 14h] mov [di], edx pop di pop es %else %error unsupported arch %endif pop xBX leave ret ENDPROC ASMCpuId
29.241071
97
0.534046
[ "MIT" ]
Nurzamal/rest_api_docker
vbox/src/VBox/Runtime/common/asm/ASMCpuId.asm
3,275
Assembly
; A119282: Alternating sum of the first n Fibonacci numbers. ; 0,-1,0,-2,1,-4,4,-9,12,-22,33,-56,88,-145,232,-378,609,-988,1596,-2585,4180,-6766,10945,-17712,28656,-46369,75024,-121394,196417,-317812,514228,-832041,1346268,-2178310,3524577,-5702888,9227464,-14930353,24157816,-39088170,63245985,-102334156,165580140,-267914297,433494436,-701408734,1134903169,-1836311904,2971215072,-4807526977,7778742048,-12586269026,20365011073,-32951280100,53316291172,-86267571273,139583862444,-225851433718,365435296161,-591286729880,956722026040,-1548008755921,2504730781960,-4052739537882,6557470319841,-10610209857724,17167680177564,-27777890035289,44945570212852,-72723460248142,117669030460993,-190392490709136,308061521170128,-498454011879265,806515533049392,-1304969544928658,2111485077978049,-3416454622906708,5527939700884756,-8944394323791465 mov $2,$0 lpb $2 sub $2,1 sub $4,$3 mov $3,$4 sub $3,1 add $1,$3 add $3,$1 mov $4,0 lpe
67.428571
779
0.797669
[ "Apache-2.0" ]
jmorken/loda
programs/oeis/119/A119282.asm
944
Assembly
; subroutine for reading the contents of a "struct sp1_pss" into registers ; 02.2008 aralbrec ; ts2068 hi-res version PUBLIC SP1PSPOP ; enter : de = & string to print (or something else) ; hl = & struct sp1_pss to read ; ; exit : hl = address of string to print ; e = flags (bit 0 = invalidate?, bit 1 = xwrap?, bit 2 = yinc?, bit3 = ywrap?) ; b = current x coordinate (relative to bounds rect IY) ; c = current y coordinate (relative to bounds rect IY) ; de' = current struct sp1_update * ; ix = visit function ; iy = bounds rectangle .SP1PSPOP ld a,(hl) ld iyl,a inc hl ld a,(hl) ld iyh,a ; iy = & bounds rectangle inc hl ld a,(hl) ; a = flags inc hl ld b,(hl) ; b = x coordinate inc hl ld c,(hl) ; c = y coordinate inc hl push hl ex de,hl ; hl = & string ld e,a ; e = flags exx pop hl ld e,(hl) inc hl ld d,(hl) ; de' = & struct sp1_update inc hl ld a,(hl) ld ixl,a inc hl ld a,(hl) ld ixh,a ; ix = visit function exx ret
24.673469
88
0.509512
[ "BSD-2-Clause" ]
ByteProject/Puddle-BuildTools
FictionTools/z88dk/libsrc/sprites/software/sp1/ts2068hr/tiles/SP1PSPOP.asm
1,209
Assembly
; A185346: a(n) = 2^n - 9. ; -8,-7,-5,-1,7,23,55,119,247,503,1015,2039,4087,8183,16375,32759,65527,131063,262135,524279,1048567,2097143,4194295,8388599,16777207,33554423,67108855,134217719,268435447,536870903,1073741815,2147483639,4294967287,8589934583,17179869175,34359738359,68719476727,137438953463,274877906935,549755813879,1099511627767,2199023255543,4398046511095,8796093022199,17592186044407,35184372088823,70368744177655,140737488355319,281474976710647,562949953421303,1125899906842615,2251799813685239,4503599627370487,9007199254740983 mov $1,2 pow $1,$0 sub $1,9
82
517
0.844948
[ "Apache-2.0" ]
jmorken/loda
programs/oeis/185/A185346.asm
574
Assembly
; int ilogb(float x) __z88dk_fastcall SECTION code_clib SECTION code_fp_math48 PUBLIC cm48_sdccix_ilogb_fastcall EXTERN cm48_sdccixp_dx2m48, am48_ilogb cm48_sdccix_ilogb_fastcall: call cm48_sdccixp_dx2m48 jp am48_ilogb
14.6875
38
0.829787
[ "BSD-2-Clause" ]
ByteProject/Puddle-BuildTools
FictionTools/z88dk/libsrc/_DEVELOPMENT/math/float/math48/c/sdcc_ix/cm48_sdccix_ilogb_fastcall.asm
235
Assembly
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Copyright(c) 2011-2015 Intel Corporation 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 Intel Corporation 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 ; OWNER 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. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; gf_4vect_dot_prod_avx(len, vec, *g_tbls, **buffs, **dests); ;;; %ifidn __OUTPUT_FORMAT__, elf64 %define arg0 rdi %define arg1 rsi %define arg2 rdx %define arg3 rcx %define arg4 r8 %define arg5 r9 %define tmp r11 %define tmp2 r10 %define tmp3 r13 ; must be saved and restored %define tmp4 r12 ; must be saved and restored %define tmp5 r14 ; must be saved and restored %define tmp6 r15 ; must be saved and restored %define return rax %macro SLDR 2 %endmacro %define SSTR SLDR %define PS 8 %define LOG_PS 3 %define func(x) x: %macro FUNC_SAVE 0 push r12 push r13 push r14 push r15 %endmacro %macro FUNC_RESTORE 0 pop r15 pop r14 pop r13 pop r12 %endmacro %endif %ifidn __OUTPUT_FORMAT__, win64 %define arg0 rcx %define arg1 rdx %define arg2 r8 %define arg3 r9 %define arg4 r12 ; must be saved, loaded and restored %define arg5 r15 ; must be saved and restored %define tmp r11 %define tmp2 r10 %define tmp3 r13 ; must be saved and restored %define tmp4 r14 ; must be saved and restored %define tmp5 rdi ; must be saved and restored %define tmp6 rsi ; must be saved and restored %define return rax %macro SLDR 2 %endmacro %define SSTR SLDR %define PS 8 %define LOG_PS 3 %define stack_size 9*16 + 7*8 ; must be an odd multiple of 8 %define arg(x) [rsp + stack_size + PS + PS*x] %define func(x) proc_frame x %macro FUNC_SAVE 0 alloc_stack stack_size save_xmm128 xmm6, 0*16 save_xmm128 xmm7, 1*16 save_xmm128 xmm8, 2*16 save_xmm128 xmm9, 3*16 save_xmm128 xmm10, 4*16 save_xmm128 xmm11, 5*16 save_xmm128 xmm12, 6*16 save_xmm128 xmm13, 7*16 save_xmm128 xmm14, 8*16 save_reg r12, 9*16 + 0*8 save_reg r13, 9*16 + 1*8 save_reg r14, 9*16 + 2*8 save_reg r15, 9*16 + 3*8 save_reg rdi, 9*16 + 4*8 save_reg rsi, 9*16 + 5*8 end_prolog mov arg4, arg(4) %endmacro %macro FUNC_RESTORE 0 vmovdqa xmm6, [rsp + 0*16] vmovdqa xmm7, [rsp + 1*16] vmovdqa xmm8, [rsp + 2*16] vmovdqa xmm9, [rsp + 3*16] vmovdqa xmm10, [rsp + 4*16] vmovdqa xmm11, [rsp + 5*16] vmovdqa xmm12, [rsp + 6*16] vmovdqa xmm13, [rsp + 7*16] vmovdqa xmm14, [rsp + 8*16] mov r12, [rsp + 9*16 + 0*8] mov r13, [rsp + 9*16 + 1*8] mov r14, [rsp + 9*16 + 2*8] mov r15, [rsp + 9*16 + 3*8] mov rdi, [rsp + 9*16 + 4*8] mov rsi, [rsp + 9*16 + 5*8] add rsp, stack_size %endmacro %endif %ifidn __OUTPUT_FORMAT__, elf32 ;;;================== High Address; ;;; arg4 ;;; arg3 ;;; arg2 ;;; arg1 ;;; arg0 ;;; return ;;;<================= esp of caller ;;; ebp ;;;<================= ebp = esp ;;; var0 ;;; var1 ;;; var2 ;;; var3 ;;; esi ;;; edi ;;; ebx ;;;<================= esp of callee ;;; ;;;================== Low Address; %define PS 4 %define LOG_PS 2 %define func(x) x: %define arg(x) [ebp + PS*2 + PS*x] %define var(x) [ebp - PS - PS*x] %define trans ecx %define trans2 esi %define arg0 trans ;trans and trans2 are for the variables in stack %define arg0_m arg(0) %define arg1 ebx %define arg2 arg2_m %define arg2_m arg(2) %define arg3 trans %define arg3_m arg(3) %define arg4 trans %define arg4_m arg(4) %define arg5 trans2 %define tmp edx %define tmp2 edi %define tmp3 trans2 %define tmp3_m var(0) %define tmp4 trans2 %define tmp4_m var(1) %define tmp5 trans2 %define tmp5_m var(2) %define tmp6 trans2 %define tmp6_m var(3) %define return eax %macro SLDR 2 ;stack load/restore mov %1, %2 %endmacro %define SSTR SLDR %macro FUNC_SAVE 0 push ebp mov ebp, esp sub esp, PS*4 ;4 local variables push esi push edi push ebx mov arg1, arg(1) %endmacro %macro FUNC_RESTORE 0 pop ebx pop edi pop esi add esp, PS*4 ;4 local variables pop ebp %endmacro %endif ; output formats %define len arg0 %define vec arg1 %define mul_array arg2 %define src arg3 %define dest1 arg4 %define ptr arg5 %define vec_i tmp2 %define dest2 tmp3 %define dest3 tmp4 %define dest4 tmp5 %define vskip3 tmp6 %define pos return %ifidn PS,4 ;32-bit code %define len_m arg0_m %define src_m arg3_m %define dest1_m arg4_m %define dest2_m tmp3_m %define dest3_m tmp4_m %define dest4_m tmp5_m %define vskip3_m tmp6_m %endif %ifndef EC_ALIGNED_ADDR ;;; Use Un-aligned load/store %define XLDR vmovdqu %define XSTR vmovdqu %else ;;; Use Non-temporal load/stor %ifdef NO_NT_LDST %define XLDR vmovdqa %define XSTR vmovdqa %else %define XLDR vmovntdqa %define XSTR vmovntdq %endif %endif %ifidn PS,8 ; 64-bit code default rel [bits 64] %endif section .text %ifidn PS,8 ;64-bit code %define xmask0f xmm14 %define xgft1_lo xmm13 %define xgft1_hi xmm12 %define xgft2_lo xmm11 %define xgft2_hi xmm10 %define xgft3_lo xmm9 %define xgft3_hi xmm8 %define xgft4_lo xmm7 %define xgft4_hi xmm6 %define x0 xmm0 %define xtmpa xmm1 %define xp1 xmm2 %define xp2 xmm3 %define xp3 xmm4 %define xp4 xmm5 %else %define xmm_trans xmm7 ;reuse xmask0f and xgft1_lo %define xmask0f xmm_trans %define xgft1_lo xmm_trans %define xgft1_hi xmm6 %define xgft2_lo xgft1_lo %define xgft2_hi xgft1_hi %define xgft3_lo xgft1_lo %define xgft3_hi xgft1_hi %define xgft4_lo xgft1_lo %define xgft4_hi xgft1_hi %define x0 xmm0 %define xtmpa xmm1 %define xp1 xmm2 %define xp2 xmm3 %define xp3 xmm4 %define xp4 xmm5 %endif align 16 global gf_4vect_dot_prod_avx:function func(gf_4vect_dot_prod_avx) FUNC_SAVE SLDR len, len_m sub len, 16 SSTR len_m, len jl .return_fail xor pos, pos vmovdqa xmask0f, [mask0f] ;Load mask of lower nibble in each byte mov vskip3, vec imul vskip3, 96 SSTR vskip3_m, vskip3 sal vec, LOG_PS ;vec *= PS. Make vec_i count by PS SLDR dest1, dest1_m mov dest2, [dest1+PS] SSTR dest2_m, dest2 mov dest3, [dest1+2*PS] SSTR dest3_m, dest3 mov dest4, [dest1+3*PS] SSTR dest4_m, dest4 mov dest1, [dest1] SSTR dest1_m, dest1 .loop16: vpxor xp1, xp1 vpxor xp2, xp2 vpxor xp3, xp3 vpxor xp4, xp4 mov tmp, mul_array xor vec_i, vec_i .next_vect: SLDR src, src_m mov ptr, [src+vec_i] %ifidn PS,8 ;64-bit code vmovdqu xgft1_lo, [tmp] ;Load array Ax{00}, Ax{01}, ..., Ax{0f} vmovdqu xgft1_hi, [tmp+16] ; " Ax{00}, Ax{10}, ..., Ax{f0} vmovdqu xgft2_lo, [tmp+vec*(32/PS)] ;Load array Bx{00}, Bx{01}, ..., Bx{0f} vmovdqu xgft2_hi, [tmp+vec*(32/PS)+16] ; " Bx{00}, Bx{10}, ..., Bx{f0} vmovdqu xgft3_lo, [tmp+vec*(64/PS)] ;Load array Cx{00}, Cx{01}, ..., Cx{0f} vmovdqu xgft3_hi, [tmp+vec*(64/PS)+16] ; " Cx{00}, Cx{10}, ..., Cx{f0} vmovdqu xgft4_lo, [tmp+vskip3] ;Load array Dx{00}, Dx{01}, ..., Dx{0f} vmovdqu xgft4_hi, [tmp+vskip3+16] ; " Dx{00}, Dx{10}, ..., Dx{f0} XLDR x0, [ptr+pos] ;Get next source vector add tmp, 32 add vec_i, PS vpand xtmpa, x0, xmask0f ;Mask low src nibble in bits 4-0 vpsraw x0, x0, 4 ;Shift to put high nibble into bits 4-0 vpand x0, x0, xmask0f ;Mask high src nibble in bits 4-0 %else ;32-bit code XLDR x0, [ptr+pos] ;Get next source vector vmovdqa xmask0f, [mask0f] ;Load mask of lower nibble in each byte vpand xtmpa, x0, xmask0f ;Mask low src nibble in bits 4-0 vpsraw x0, x0, 4 ;Shift to put high nibble into bits 4-0 vpand x0, x0, xmask0f ;Mask high src nibble in bits 4-0 vmovdqu xgft1_lo, [tmp] ;Load array Ax{00}, Ax{01}, ..., Ax{0f} vmovdqu xgft1_hi, [tmp+16] ; " Ax{00}, Ax{10}, ..., Ax{f0} %endif vpshufb xgft1_hi, x0 ;Lookup mul table of high nibble vpshufb xgft1_lo, xtmpa ;Lookup mul table of low nibble vpxor xgft1_hi, xgft1_lo ;GF add high and low partials vpxor xp1, xgft1_hi ;xp1 += partial %ifidn PS,4 ;32-bit code vmovdqu xgft2_lo, [tmp+vec*(32/PS)] ;Load array Bx{00}, Bx{01}, ..., Bx{0f} vmovdqu xgft2_hi, [tmp+vec*(32/PS)+16] ; " Bx{00}, Bx{10}, ..., Bx{f0} %endif vpshufb xgft2_hi, x0 ;Lookup mul table of high nibble vpshufb xgft2_lo, xtmpa ;Lookup mul table of low nibble vpxor xgft2_hi, xgft2_lo ;GF add high and low partials vpxor xp2, xgft2_hi ;xp2 += partial %ifidn PS,4 ;32-bit code sal vec, 1 vmovdqu xgft3_lo, [tmp+vec*(32/PS)] ;Load array Cx{00}, Cx{01}, ..., Cx{0f} vmovdqu xgft3_hi, [tmp+vec*(32/PS)+16] ; " Cx{00}, Cx{10}, ..., Cx{f0} sar vec, 1 %endif vpshufb xgft3_hi, x0 ;Lookup mul table of high nibble vpshufb xgft3_lo, xtmpa ;Lookup mul table of low nibble vpxor xgft3_hi, xgft3_lo ;GF add high and low partials vpxor xp3, xgft3_hi ;xp3 += partial %ifidn PS,4 ;32-bit code SLDR vskip3, vskip3_m vmovdqu xgft4_lo, [tmp+vskip3] ;Load array Dx{00}, Dx{01}, ..., Dx{0f} vmovdqu xgft4_hi, [tmp+vskip3+16] ; " Dx{00}, Dx{10}, ..., Dx{f0} add tmp, 32 add vec_i, PS %endif vpshufb xgft4_hi, x0 ;Lookup mul table of high nibble vpshufb xgft4_lo, xtmpa ;Lookup mul table of low nibble vpxor xgft4_hi, xgft4_lo ;GF add high and low partials vpxor xp4, xgft4_hi ;xp4 += partial cmp vec_i, vec jl .next_vect SLDR dest1, dest1_m SLDR dest2, dest2_m XSTR [dest1+pos], xp1 XSTR [dest2+pos], xp2 SLDR dest3, dest3_m XSTR [dest3+pos], xp3 SLDR dest4, dest4_m XSTR [dest4+pos], xp4 SLDR len, len_m add pos, 16 ;Loop on 16 bytes at a time cmp pos, len jle .loop16 lea tmp, [len + 16] cmp pos, tmp je .return_pass ;; Tail len mov pos, len ;Overlapped offset length-16 jmp .loop16 ;Do one more overlap pass .return_pass: mov return, 0 FUNC_RESTORE ret .return_fail: mov return, 1 FUNC_RESTORE ret endproc_frame section .data align 16 mask0f: ddq 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f %macro slversion 4 global %1_slver_%2%3%4 global %1_slver %1_slver: %1_slver_%2%3%4: dw 0x%4 db 0x%3, 0x%2 %endmacro ;;; func core, ver, snum slversion gf_4vect_dot_prod_avx, 02, 04, 0193
25.705357
79
0.670372
[ "BSD-3-Clause" ]
steinwurf/storage-benchmarks
isa-l_open_src_2.13/isa/gf_4vect_dot_prod_avx.asm
11,516
Assembly
bits 64 aesenc xmm0,xmm4 vaesenc zmm0,zmm0,zmm4 vpclmullqlqdq zmm1,zmm1,zmm5 vpclmulqdq zmm0, zmm1, zmm2, 0 vaesenclast zmm0, zmm1, zmm2 bits 32 aesenc xmm0,xmm4 vaesenc zmm0,zmm0,zmm4 vpclmullqlqdq zmm1,zmm1,zmm5 vpclmulqdq zmm0, zmm1, zmm2, 0 vaesenclast zmm0, zmm1, zmm2 bits 16 aesenc xmm0,xmm4 vaesenc zmm0,zmm0,zmm4 vpclmullqlqdq zmm1,zmm1,zmm5 vpclmulqdq zmm0, zmm1, zmm2, 0 vaesenclast zmm0, zmm1, zmm2
20.52381
31
0.765661
[ "BSD-2-Clause" ]
ElyesH/nasm
travis/test/vaesenc.asm
431
Assembly
; ; jsimdcpu.asm - SIMD instruction support check ; ; Copyright 2009 Pierre Ossman <[email protected]> for Cendio AB ; Copyright (C) 2016, D. R. Commander. ; ; Based on ; x86 SIMD extension for IJG JPEG library ; Copyright (C) 1999-2006, MIYASAKA Masaru. ; For conditions of distribution and use, see copyright notice in jsimdext.inc ; ; This file should be assembled with NASM (Netwide Assembler), ; can *not* be assembled with Microsoft's MASM or any compatible ; assembler (including Borland's Turbo Assembler). ; NASM is available from http://nasm.sourceforge.net/ or ; http://sourceforge.net/project/showfiles.php?group_id=6208 ; ; [TAB8] %include "jsimdext.inc" ; -------------------------------------------------------------------------- SECTION SEG_TEXT BITS 64 ; ; Check if the CPU supports SIMD instructions ; ; GLOBAL(unsigned int) ; jpeg_simd_cpu_support(void) ; align 32 GLOBAL_FUNCTION(jpeg_simd_cpu_support) EXTN(jpeg_simd_cpu_support): push rbx push rdi xor rdi, rdi ; simd support flag ; Check for AVX2 instruction support mov rax, 7 xor rcx, rcx cpuid mov rax, rbx ; rax = Extended feature flags or rdi, JSIMD_SSE2 or rdi, JSIMD_SSE test rax, 1<<5 ; bit5:AVX2 jz short .return ; Check for AVX2 O/S support mov rax, 1 xor rcx, rcx cpuid test rcx, 1<<27 jz short .return ; O/S does not support XSAVE test rcx, 1<<28 jz short .return ; CPU does not support AVX2 xor rcx, rcx xgetbv and rax, 6 cmp rax, 6 ; O/S does not manage XMM/YMM state ; using XSAVE jnz short .return or rdi, JSIMD_AVX2 .return: mov rax, rdi pop rdi pop rbx ret ; For some reason, the OS X linker does not honor the request to align the ; segment unless we do this. align 32
26.875
78
0.553023
[ "Apache-2.0" ]
DeviceFarmer/android-libjpeg-turbo
jni/vendor/libjpeg-turbo/libjpeg-turbo-2.0.1/simd/x86_64/jsimdcpu.asm
2,150
Assembly
MOV A,#02 ;Move 1st data in accumulator MOV B,#04 ;Move 2nd data in accumulator MUL AB ;Multiply both data MOV dptr,#4150 ;Load the address of data pointer MOVX @dptr, A ;Store the lower byte INC dptr ;Increment data pointer MOV A,B ;Move content of B to A MOVX @dptr, A ;Store the result in memory HERE: SJMP HERE ;Stop the program
45.444444
53
0.613692
[ "MIT" ]
iamvk1437k/mpmc
8051/14arith/mul.asm
409
Assembly
;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> ; This program and the accompanying materials ; are licensed and made available under the terms and conditions of the BSD License ; which accompanies this distribution. The full text of the license may be found at ; http://opensource.org/licenses/bsd-license.php. ; ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. ; ; Module Name: ; ; CopyMem.asm ; ; Abstract: ; ; CopyMem function ; ; Notes: ; ;------------------------------------------------------------------------------ .686 .model flat,C .mmx .code ;------------------------------------------------------------------------------ ; VOID * ; EFIAPI ; InternalMemCopyMem ( ; IN VOID *Destination, ; IN VOID *Source, ; IN UINTN Count ; ); ;------------------------------------------------------------------------------ InternalMemCopyMem PROC USES esi edi mov esi, [esp + 16] ; esi <- Source mov edi, [esp + 12] ; edi <- Destination mov edx, [esp + 20] ; edx <- Count lea eax, [esi + edx - 1] ; eax <- End of Source cmp esi, edi jae @F cmp eax, edi ; Overlapped? jae @CopyBackward ; Copy backward if overlapped @@: mov ecx, edx and edx, 7 shr ecx, 3 ; ecx <- # of Qwords to copy jz @CopyBytes push eax push eax movq [esp], mm0 ; save mm0 @@: movq mm0, [esi] movq [edi], mm0 add esi, 8 add edi, 8 loop @B movq mm0, [esp] ; restore mm0 pop ecx ; stack cleanup pop ecx ; stack cleanup jmp @CopyBytes @CopyBackward: mov esi, eax ; esi <- Last byte in Source lea edi, [edi + edx - 1] ; edi <- Last byte in Destination std @CopyBytes: mov ecx, edx rep movsb cld mov eax, [esp + 12] ret InternalMemCopyMem ENDP END
30.628205
85
0.438259
[ "BSD-2-Clause" ]
AidenFeng/EDKII
MdePkg/Library/BaseMemoryLibMmx/Ia32/CopyMem.asm
2,389
Assembly
%include "common.asm" ;The first six integer or pointer arguments are passed in registers ;RDI, RSI, RDX, RCX, R8, and R9 ;int ;cpuid_amd64(int eax_in, int ecx_in, int *eax, int *ebx, int *ecx, int *edx) PROC cpuid_amd64 ; save registers push rbx push rdx push rcx push r8 push r9 mov rax, rdi mov rcx, rsi cpuid pop rdi mov [rdi], edx pop rdi mov [rdi], ecx pop rdi mov [rdi], ebx pop rdi mov [rdi], eax mov rax, 0 ; restore registers pop rbx ret END_OF_FILE
16.147059
76
0.608379
[ "Apache-2.0" ]
abm-osing/xrdp
librfxcodec/src/amd64/cpuid_amd64.asm
549
Assembly
test_device(): sub rsp, 24 call rand mov rax, QWORD PTR [rsp] mov edx, DWORD PTR [rsp] shr rax, 12 and edx, -258049 add eax, 1 and eax, 63 mov ecx, eax sal ecx, 12 or edx, ecx mov DWORD PTR [rsp], edx mov DWORD PTR [rsp+12], eax add rsp, 24 ret
23.444444
39
0.398104
[ "MIT" ]
Deaod/bitfields
codegen-tests/native-bitfield/gcc5.3.0/11-pre-increment.asm
422
Assembly
INCLUDE "hardware.inc" ;============================================================== ; rst handlers as routines ;============================================================== CALL_HL EQU $30 RST_38 EQU $38 ;============================================================== ; structs ;============================================================== ; each scanline gets some data, structured like so: RSRESET RASTER_SCRY RB 1 ; data for rSCY RASTER_SCRX RB 1 ; data for rSCX sizeof_RASTER RB 0 sizeof_RASTER_TABLE EQU ((SCRN_Y+1)*sizeof_RASTER) ; the +1 is because data is needed to display raster 0 ; (think of it as an HBlank handler happening on raster '-1' ROLL_SIZE EQU 32 ;============================================================== ; macros ;============================================================== ; breakpoint (halt the debugger) BREAKPOINT: MACRO ld b,b ENDM ;-------------------------------------------------------------- ; display a log message LOGMESSAGE: MACRO ld d,d jr .end\@ DW $6464 DW $0000 DB \1 .end\@: ENDM ;-------------------------------------------------------------- ; wait for the start of the next vblank WaitVBlankStart: MACRO .waitvbl\@ ldh a,[rLY] cp SCRN_Y jr nz,.waitvbl\@ ENDM ;-------------------------------------------------------------- SwapBuffers: MACRO ASSERT(LOW(wRasterTableA) == LOW(wRasterTableB)) ; the README uses hardcoded addresses, but any two aligned addresses work ldh a,[hFillBuffer] ldh [hDrawBuffer],a xor HIGH(wRasterTableA) ^ HIGH(wRasterTableB) ldh [hFillBuffer],a ENDM ;-------------------------------------------------------------- ; set the change tutorial part flag SetChangePartFlag: MACRO ld a,1 ld [wChangePart],a ENDM ;-------------------------------------------------------------- ; SetProcessFunc <funcptr> SetProcessFunc: MACRO ld hl,wProcessFunc ld bc,\1 ld a,c ld [hl+],a ld [hl],b ENDM ;============================================================== ; RST handlers ;============================================================== SECTION "RST $30",ROM0[CALL_HL] ; call the function pointed to by hl CallHL:: jp hl ; ------------------------------------------------------------- SECTION "RST $38",ROM0[RST_38] Rst_38:: BREAKPOINT ret ;============================================================== ; interrupt handlers ;============================================================== SECTION "VBlank Handler",ROM0[$40] VBlankHandler:: push af ld a,1 ld [wVBlankDone],a jr VBlankContinued ; ------------------------------------------------------------- SECTION "HBlank Handler",ROM0[$48] HBlankHandler:: ; 40 cycles push af ; 4 push hl ; 4 ;------------------------------- ; obtain the pointer to the data pair ldh a,[rLY] ; 3 inc a ; 1 add a,a ; 1 ; double the offset since each line uses 2 bytes ld l,a ; 1 ldh a,[hDrawBuffer] ; 3 adc 0 ; 2 ld h,a ; 1 ; hl now points to somewhere in the draw buffer ; set the scroll registers ld a,[hl+] ; 2 ldh [rSCY],a ; 3 ld a,[hl+] ; 2 ldh [rSCX],a ; 3 pop hl ; 3 pop af ; 3 reti ; 4 ; ------------------------------------------------------------- VBlankContinued:: pop af pop af ; remove WaitForVBlankInt's ret from the stack to avoid a race condition reti ;============================================================== ; cartridge header ;============================================================== SECTION "ROM Header",ROM0[$100] ROMHeader:: nop jp Start NINTENDO_LOGO DB "DeadCScroll" ; game title DB "BObj" ; product code DB CART_COMPATIBLE_DMG DW $00 ; license code DB CART_INDICATOR_GB DB CART_ROM_MBC5 DB CART_ROM_32K DB CART_SRAM_NONE DB CART_DEST_NON_JAPANESE DB $33 ; licensee code DB $00 ; mask ROM version DB $00 ; complement check DW $00 ; cartridge checksum ;============================================================== ; starting point ;============================================================== SECTION "Start",ROM0[$150] Start:: call Initialize mainloop: ; call the process function and handle any part transition ld hl,wProcessFunc ld a,[hl+] ld h,[hl] ld l,a rst CALL_HL call ProcessPartTransition ; change parts (if necessary) ;-------------------------------------- call WaitForVBlankDone ; clear the vblank done flag xor a ld [wVBlankDone],a ;-------------------------------------- SwapBuffers call PrepRaster0 ;-------------------------------------- ; update the frame counter ld hl,wFrameCounter inc [hl] jr mainloop ;============================================================== ; support routines (bank 0) ;============================================================== SECTION "WaitForVBlank",ROM0 ; wait for the vblank handler to set the flag ; done as a routine instead of a macro to avoid a halt race condition WaitForVBlankDone:: .waitloop: halt ld a,[wVBlankDone] and a jr z,.waitloop ret ; ------------------------------------------------------------- SECTION "PrepRaster0",ROM0 ; emulate the HBlank handler as if LY=-1 (to render the 0th scanline's worth of pixels correctly) PrepRaster0:: ldh a,[hDrawBuffer] ld h,a ld l,0 ; set the scroll registers ld a,[hl+] ldh [rSCY],a ld a,[hl+] ldh [rSCX],a ret ; ------------------------------------------------------------- SECTION "Tutorial Driver",ROM0 ProcessPartTransition:: ; see if the transition flag is set ld a,[wChangePart] and a ret z ; not set, exit early ; clear the flag xor a ld [wChangePart],a ; put the actual pointer in hl ld hl,wTutePartPtr ld a,[hl+] ld h,[hl] ld l,a ; put the init function pointer in de ld a,[hl+] ld e,a ld a,[hl+] ld d,a push de ; 'jp de' prep (see the ret below) ; update the ptr for the next transition ld d,h ld e,l ld hl,wTutePartPtr ld a,e ld [hl+],a ld [hl],d ; reset the frame counter so each part starts at 0 xor a ld hl,wFrameCounter ld [hl],a ; the ret here actually calls the init function because of the push earlier ; i.e. simulate 'jp de' ret TutePartInitFuncTable: DW InitShowDelay DW InitXSine DW InitShowDelay DW InitYSine DW InitShowDelay DW InitXYSine DW InitShowDelay DW InitSmearOff DW InitLightDelay DW InitSmearOn DW InitShowDelay DW InitRollOff DW InitDarkDelay DW InitRollOn DW InitRestart ; ------------------------------------------------------------- SECTION "Part - X Sine",ROM0 InitXSine: LOGMESSAGE "InitXSine" ; set the progression line to the first raster ld hl,wProgressLine ld a,SCRN_Y ld [hl],a ; set the data pointer (technically an offset) to the end of a raster buffer ; the pointer will be resolved later ld hl,sizeof_RASTER_TABLE-sizeof_RASTER ld a,l ld [wDataPtr],a ld a,h ld [wDataPtr+1],a ; start with subpart 0 ld hl,wFlags xor a ld [hl+],a ; hl = wCounter ; set the counter to 0 ld [hl],a SetProcessFunc ProcessXSine ret ProcessXSine: ; check the flags ld hl,wFlags ld a,[hl] and a jr z,.subpart0 dec a jr z,.subpart1 ; ending (diminish the sine up the screen) .subpart2 call UpdateXSine2 ; update the table index ld hl,wTableIndex inc [hl] ld hl,wProgressLine ld a,[hl] dec a jr z,.subpart2done ld [hl],a ret .subpart2done SetChangePartFlag ret ; middle (watch the sine for a bit) .subpart1 call UpdateXSine1 ; update the table index ld hl,wTableIndex inc [hl] ret ; beginning (progress the sine up the screen) .subpart0 call UpdateXSine0 ld hl,wProgressLine ld a,[hl] dec a cp $FF jr z,.subpart0done ld [hl],a ret .subpart0done ; move to the next subpart ld hl,wFlags inc [hl] ; reset the timer ld hl,wFrameCounter xor a ld [hl],a ; start the sine from 0 ld hl,wTableIndex ld [hl],a ret UpdateXSine0: ld hl,wProgressLine ld a,[hl] cpl add SCRN_Y+2 ld e,a ; e=num iterations ; obtain a pointer into the fill buffer ld hl,wDataPtr ld a,[hl+] ld c,a ld b,[hl] ldh a,[hFillBuffer] ld h,a ld l,0 add hl,bc ; set up loop constants ld bc,XSineTable .loop ; store y value ld a,ROLL_SIZE ld [hl+],a ; store x value ld a,[bc] inc c ld [hl+],a ; loop delimiter (stop at the bottom of the screen) dec e jr nz,.loop ; update the data pointer for next time ld hl,wDataPtr ld a,[hl+] ld h,[hl] ld l,a ; assume that sizeof_RASTER is 2, alas dec hl dec hl ; store the new pointer ld a,l ld [wDataPtr],a ld a,h ld [wDataPtr+1],a ret ; just a straight sine table lookup and fill the entire buffer ; (use this one if you don't need a progression effect like sub-part 0/2) UpdateXSine1: ld hl,wTableIndex ld a,[hl] ld c,a ld b,HIGH(XSineTable) ldh a,[hFillBuffer] ld h,a ld l,0 ld e,SCRN_Y+1 .loop ; store y value ld a,ROLL_SIZE ld [hl+],a ; store x value ld a,[bc] inc c ld [hl+],a ; loop delimiter (stop at the bottom of the screen) dec e jr nz,.loop ; see if the last raster was 0 ; if it was update a counter ; when the counter reaches 3, move to the next subpart ld a,c and a ret nz ld hl,wCounter ld a,[hl] inc a cp 3 jr z,.subpart1done ld [hl],a ret .subpart1done ; move to the next subpart ld hl,wFlags inc [hl] ; reset the progress line to the bottom of the screen ld hl,wProgressLine ld a,SCRN_Y ld [hl],a ret UpdateXSine2: ld hl,wProgressLine ld a,[hl] ld e,a ld hl,wTableIndex ld a,[hl] ld c,a ld b,HIGH(XSineTable) ldh a,[hFillBuffer] ld h,a ld l,0 .loop ; store y value ld a,ROLL_SIZE ld [hl+],a ; store x value ld a,[bc] inc c ld [hl+],a ; loop delimiter (stop at the bottom of the screen) dec e jr nz,.loop ; below (or equal) the line ; only two lines need to be cleared ld bc,(ROLL_SIZE<<8) ld a,b ld [hl+],a ld a,c ld [hl+],a ld a,b ld [hl+],a ld a,c ld [hl+],a ret ; ------------------------------------------------------------- SECTION "Part - Y Sine",ROM0 InitYSine: LOGMESSAGE "InitYSine" ; set the progression line to the last raster ld hl,wProgressLine ld a,SCRN_Y ld [hl],a ; set the data pointer (technically an offset) to the end of a raster buffer ; the pointer will be resolved later ld hl,sizeof_RASTER_TABLE-sizeof_RASTER ld a,l ld [wDataPtr],a ld a,h ld [wDataPtr+1],a ; start with subpart 0 ld hl,wFlags xor a ld [hl+],a ; hl = wCounter ; set the counter to 0 ld [hl],a SetProcessFunc ProcessYSine ret ProcessYSine: ; check the flags ld hl,wFlags ld a,[hl] and a jr z,.subpart0 dec a jr z,.subpart1 ; ending (diminish the sine up the screen) .subpart2 call UpdateYSine2 ; update the table index ld hl,wTableIndex inc [hl] ld hl,wProgressLine ld a,[hl] dec a jr z,.subpart2done ld [hl],a ret .subpart2done SetChangePartFlag ret ; middle (watch the sine for a bit) .subpart1 call UpdateYSine1 ; update the table index ld hl,wTableIndex inc [hl] ret ; beginning (progress the sine up the screen) .subpart0 call UpdateYSine0 ld hl,wProgressLine ld a,[hl] dec a cp $FF jr z,.subpart0done ld [hl],a ret .subpart0done ; move to the next subpart ld hl,wFlags inc [hl] ; reset the timer ld hl,wFrameCounter xor a ld [hl],a ; start the sine from 0 ld hl,wTableIndex ld [hl],a ret UpdateYSine0: ld hl,wProgressLine ld a,[hl] cpl add SCRN_Y+2 ld e,a ; e=num iterations ; obtain a pointer into the fill buffer ld hl,wDataPtr ld a,[hl+] ld c,a ld b,[hl] ldh a,[hFillBuffer] ld h,a ld l,0 add hl,bc ; set up loop constants ld bc,YSineTable .loop ; store y value ld a,[bc] inc c add ROLL_SIZE ld [hl+],a ; store x value xor a ld [hl+],a ; loop delimiter (stop at the bottom of the screen) dec e jr nz,.loop ; update the data pointer for next time ld hl,wDataPtr ld a,[hl+] ld h,[hl] ld l,a ; assume that sizeof_RASTER is 2, alas dec hl dec hl ; store the new pointer ld a,l ld [wDataPtr],a ld a,h ld [wDataPtr+1],a ret ; just a straight sine table lookup and fill the entire buffer ; (use this one if you don't need a progression effect like sub-part 0/2) UpdateYSine1: ld hl,wTableIndex ld a,[hl] ld c,a ld b,HIGH(YSineTable) ldh a,[hFillBuffer] ld h,a ld l,0 ld e,SCRN_Y+1 .loop ; store y value ld a,[bc] inc c add ROLL_SIZE ld [hl+],a ; store x value xor a ld [hl+],a ; loop delimiter (stop at the bottom of the screen) dec e jr nz,.loop ; see if the last raster was 0 ; if it was update a counter ; when the counter reaches 2, move to the next subpart ld a,c and a ret nz ld hl,wCounter ld a,[hl] inc a cp 2 jr z,.subpart1done ld [hl],a ret .subpart1done ; move to the next subpart ld hl,wFlags inc [hl] ; reset the progress line to the bottom of the screen ld hl,wProgressLine ld a,SCRN_Y ld [hl],a ret UpdateYSine2: ld hl,wProgressLine ld a,[hl] ld e,a ld hl,wTableIndex ld a,[hl] ld c,a ld b,HIGH(YSineTable) ldh a,[hFillBuffer] ld h,a ld l,0 .loop ; store y value ld a,[bc] inc c add ROLL_SIZE ld [hl+],a ; store x value xor a ld [hl+],a ; loop delimiter (stop at the bottom of the screen) dec e jr nz,.loop ; below (or equal) the line ; only two lines need to be cleared ld bc,(ROLL_SIZE<<8) ld a,b ld [hl+],a ld a,c ld [hl+],a ld a,b ld [hl+],a ld a,c ld [hl+],a ret ; ------------------------------------------------------------- SECTION "Part - XY Sine",ROM0 InitXYSine: LOGMESSAGE "InitXYSine" ; set the progression line to the first raster ld hl,wProgressLine ld a,SCRN_Y ld [hl],a ; set the data pointer (technically an offset) to the end of a raster buffer ; the pointer will be resolved later ld hl,sizeof_RASTER_TABLE-sizeof_RASTER ld a,l ld [wDataPtr],a ld a,h ld [wDataPtr+1],a ; start with subpart 0 ld hl,wFlags xor a ld [hl+],a ; hl = wCounter ; set the counter to 0 ld [hl],a SetProcessFunc ProcessXYSine ret ProcessXYSine: ; check the flags ld hl,wFlags ld a,[hl] and a jr z,.subpart0 dec a jr z,.subpart1 ; ending (diminish the sine up the screen) .subpart2 call UpdateXYSine2 ; update the table index ld hl,wTableIndex inc [hl] ld hl,wProgressLine ld a,[hl] dec a jr z,.subpart2done ld [hl],a ret .subpart2done SetChangePartFlag ret ; middle (watch the sine for a bit) .subpart1 call UpdateXYSine1 ; update the table index ld hl,wTableIndex inc [hl] ret ; beginning (progress the sine up the screen) .subpart0 call UpdateXYSine0 ld hl,wProgressLine ld a,[hl] dec a cp $FF jr z,.subpart0done ld [hl],a ret .subpart0done ; move to the next subpart ld hl,wFlags inc [hl] ; reset the timer ld hl,wFrameCounter xor a ld [hl],a ; start the sine from 0 ld hl,wTableIndex ld [hl],a ret UpdateXYSine0: ld hl,wProgressLine ld a,[hl] cpl add SCRN_Y+2 ld e,a ; e=num iterations ; obtain a pointer into the fill buffer ld hl,wDataPtr ld a,[hl+] ld c,a ld b,[hl] ldh a,[hFillBuffer] ld h,a ld l,0 add hl,bc ; set up loop constants ld c,0 .loop ; store y value ld b,HIGH(YSineTable) ld a,[bc] add ROLL_SIZE ld [hl+],a ; store x value ld b,HIGH(XSineTable) ld a,[bc] ld [hl+],a inc c ; loop delimiter (stop at the bottom of the screen) dec e jr nz,.loop ; update the data pointer for next time ld hl,wDataPtr ld a,[hl+] ld h,[hl] ld l,a ; assume that sizeof_RASTER is 2, alas dec hl dec hl ; store the new pointer ld a,l ld [wDataPtr],a ld a,h ld [wDataPtr+1],a ret ; just a straight sine table lookup and fill the entire buffer ; (use this one if you don't need a progression effect like sub-part 0/2) UpdateXYSine1: ld hl,wTableIndex ld a,[hl] ld c,a ldh a,[hFillBuffer] ld h,a ld l,0 ld e,SCRN_Y+1 .loop ; store y value ld b,HIGH(YSineTable) ld a,[bc] add ROLL_SIZE ld [hl+],a ; store x value ld b,HIGH(XSineTable) ld a,[bc] ld [hl+],a inc c ; loop delimiter (stop at the bottom of the screen) dec e jr nz,.loop ; see if the last raster was 0 ; if it was update a counter ; when the counter reaches 3, move to the next subpart ld a,c and a ret nz ld hl,wCounter ld a,[hl] inc a cp 3 jr z,.subpart1done ld [hl],a ret .subpart1done ; move to the next subpart ld hl,wFlags inc [hl] ; reset the progress line to the bottom of the screen ld hl,wProgressLine ld a,SCRN_Y ld [hl],a ret UpdateXYSine2: ld hl,wProgressLine ld a,[hl] ld e,a ld hl,wTableIndex ld a,[hl] ld c,a ldh a,[hFillBuffer] ld h,a ld l,0 .loop ; store y value ld b,HIGH(YSineTable) ld a,[bc] add ROLL_SIZE ld [hl+],a ; store x value ld b,HIGH(XSineTable) ld a,[bc] ld [hl+],a inc c ; loop delimiter (stop at the bottom of the screen) dec e jr nz,.loop ; below (or equal) the line ; only two lines need to be cleared ld bc,(ROLL_SIZE<<8) ld a,b ld [hl+],a ld a,c ld [hl+],a ld a,b ld [hl+],a ld a,c ld [hl+],a ret ; ------------------------------------------------------------- SECTION "Part - Smear On",ROM0 ; smear on (bottom to top) InitSmearOn: LOGMESSAGE "InitSmearOn" ; set the progression line to the last raster ld hl,wProgressLine ld a,SCRN_Y ld [hl],a SetProcessFunc ProcessSmearOn ret ProcessSmearOn: ld hl,wProgressLine ld a,[hl] dec a jr z,.done ld [hl],a call UpdateSmear ret .done SetChangePartFlag ret ; ------------------------------------------------------------- SECTION "Part - Smear Off",ROM0 ; smear off (top to bottom) InitSmearOff: LOGMESSAGE "InitSmearOff" ; set the progression line to the first raster ld hl,wProgressLine xor a ld [hl],a SetProcessFunc ProcessSmearOff ret ProcessSmearOff: ld hl,wProgressLine ld a,[hl] inc a cp SCRN_Y jr z,.done ld [hl],a call UpdateSmear ret .done SetChangePartFlag ret ; a = wProgressLine UpdateSmear: ; only y data is updated here ; from the top of the screen to wProgressLine, set the value to wProgressLine ; below wProgressLine is 0 ld e,a ; copy wProgressLine ldh a,[hFillBuffer] ld h,a ld l,0 ; above the line ld c,l ld b,e ; b = wProgressLine, c = scroll x ld d,c .loop ld a,b add ROLL_SIZE ld [hl+],a ; store scroll y value ld a,c ld [hl+],a ; store scroll x value dec b inc d ld a,d cp e jr nz,.loop ; below (or equal) the line ; only two lines need to be cleared ld bc,(ROLL_SIZE<<8) ld a,b ld [hl+],a ld a,c ld [hl+],a ld a,b ld [hl+],a ld a,c ld [hl+],a ret ; ------------------------------------------------------------- SECTION "Part - Roll Off",ROM0 ; roll off (bottom to top) InitRollOff: LOGMESSAGE "InitRollOff" ; set the progression line to the last raster ld hl,wProgressLine ld a,SCRN_Y+ROLL_SIZE ld [hl],a ; set the data pointer (technically an offset) to the end of a raster buffer ; the pointer will be resolved later ld hl,sizeof_RASTER_TABLE-sizeof_RASTER ld a,l ld [wDataPtr],a ld a,h ld [wDataPtr+1],a SetProcessFunc ProcessRollOff ret ProcessRollOff: ld hl,wProgressLine ld a,[hl] dec a jr z,.done ld [hl],a call UpdateRollOff ret .done SetChangePartFlag ret ; a=wProgressLine UpdateRollOff: ld b,a ; b=progress line ; obtain a pointer into the fill buffer ld hl,wDataPtr ld a,[hl+] ld e,a ld d,[hl] ldh a,[hFillBuffer] ld h,a ld l,0 add hl,de ; for the height of the roll, use the table as a displacement from the current raster ld c,ROLL_SIZE ld de,RollTable .rollloop ; don't update if the current progress line is off-screen (above raster 0) ld a,b cp ROLL_SIZE jr c,.skipstore ; store y value ld a,[de] add ROLL_SIZE ld [hl+],a ; store x value (always 0) xor a ld [hl+],a .skipstore inc de ; prevent going off the end of the buffer inc b ld a,b cp SCRN_Y+ROLL_SIZE jr z,.updatedataptr ; loop delimiter dec c jr nz,.rollloop ; below (or equal) the line ld c,b ld a,b sub ROLL_SIZE ld b,a ld de,SCRN_Y+12+ROLL_SIZE ld a,e sub b ld e,a .clearloop ld a,e ld [hl+],a ld a,d ld [hl+],a dec e inc c ld a,c cp SCRN_Y+ROLL_SIZE jr nz,.clearloop .updatedataptr ; update the data pointer for next time ld hl,wDataPtr ld a,[hl+] ld h,[hl] ld l,a ; prevent a buffer underrun or h ret z ; assume that sizeof_RASTER is 2, alas dec hl dec hl ; store the new pointer ld a,l ld [wDataPtr],a ld a,h ld [wDataPtr+1],a ret ; ------------------------------------------------------------- SECTION "Part - Roll On",ROM0 ; roll on (top to bottom) InitRollOn: LOGMESSAGE "InitRollOn" ; set the progression line to the first raster ld hl,wProgressLine xor a ld [hl],a SetProcessFunc ProcessRollOn ret ProcessRollOn: ld hl,wProgressLine ld a,[hl] inc a cp SCRN_Y+ROLL_SIZE jr z,.done ld [hl],a call UpdateRollOn ret .done SetChangePartFlag ret ; a=wProgressLine UpdateRollOn: ld b,a ; b=progress line ldh a,[hFillBuffer] ld h,a xor a ld l,a ld a,b cp ROLL_SIZE jr z,.doroll jr nc,.dofill jr .doroll ; fill the buffer with $3200 up to the progress line .dofill ld a,b sub ROLL_SIZE ld c,a ld de,(ROLL_SIZE<<8) ; y=32, x=0 .zeroloop ld a,d ld [hl+],a ld a,e ld [hl+],a dec c jr nz,.zeroloop .doroll ; for the height of the roll, use the table as a displacement from the current raster ld c,ROLL_SIZE ld de,RollTable .rollloop cp ROLL_SIZE jr nc,.dostore jr z,.dostore jr .loopend .dostore ; store y value ld a,[de] add ROLL_SIZE ld [hl+],a ; store x value (always 0) xor a ld [hl+],a .loopend inc de ; prevent going off the end of the buffer inc b ld a,b cp SCRN_Y+ROLL_SIZE ret z ; loop delimiter dec c jr nz,.rollloop ret ; ------------------------------------------------------------- SECTION "Part - Show Delay",ROM0 InitShowDelay: LOGMESSAGE "InitShowDelay" ; clear the raster tables to 0,0 for every raster ld hl,wRasterTableA ld b,SCRN_Y+1 call BlankScreenMem ld hl,wRasterTableB ld b,SCRN_Y+1 call BlankScreenMem SetProcessFunc ProcessDelay ret ; 'clear' memory so the normal screen is positioned correctly ; (it starts 4 tiles down instead of at 0,0) BlankScreenMem: ld de,(ROLL_SIZE<<8) ; y=32, x=0 .loop ld a,d ld [hl+],a ld a,e ld [hl+],a dec b jr nz,.loop ret ; ------------------------------------------------------------- SECTION "Part - Light Delay",ROM0 InitLightDelay: LOGMESSAGE "InitLightDelay" ; clear the raster tables to offscreen for every raster ld hl,wRasterTableA ld b,SCRN_Y+1 ld de,SCRN_Y+4+ROLL_SIZE call InitBlankRasterBuffer ld hl,wRasterTableB ld b,SCRN_Y+1 ld de,SCRN_Y+4+ROLL_SIZE call InitBlankRasterBuffer SetProcessFunc ProcessDelay ret ; ------------------------------------------------------------- SECTION "Part - Dark Delay",ROM0 InitDarkDelay: LOGMESSAGE "InitDarkDelay" ; clear the raster tables to offscreen for every raster ld hl,wRasterTableA ld b,SCRN_Y+1 ld de,SCRN_Y+12+ROLL_SIZE call InitBlankRasterBuffer ld hl,wRasterTableB ld b,SCRN_Y+1 ld de,SCRN_Y+12+ROLL_SIZE call InitBlankRasterBuffer SetProcessFunc ProcessDelay ret ProcessDelay: ld hl,wFrameCounter ld a,[hl] cp 150 ; ~2.5 seconds ret nz SetChangePartFlag ret ; b = num buffer entry (pairs) to set ; d = x value (always 0) ; e = y value InitBlankRasterBuffer: .loop ld a,e ld [hl+],a ld a,d ld [hl+],a dec e ; offset by LY dec b jr nz,.loop ret ; ------------------------------------------------------------- SECTION "Part - Restart",ROM0 InitRestart: LOGMESSAGE "InitRestart" SetProcessFunc ProcessRestart ret ProcessRestart: call InitFirstPart ret ;============================================================== ; support routines (bank 2) ;============================================================== SECTION "Bank 1 Routines",ROMX,BANK[1] Initialize: di ;-------------------------------------- ; turn off the screen after entering a vblank WaitVBlankStart ; clear LCD control registers and disable audio xor a ldh [rLCDC],a ldh [rIE],a ldh [rIF],a ldh [rSTAT],a ldh [rAUDENA],a ; disable the audio ;-------------------------------------- ; initialize the window position to 255,255 dec a ldh [rWY],a ldh [rWX],a ;-------------------------------------- ; set the bg palette ld a,$E4 ldh [rBGP],a ;-------------------------------------- ; copy the tile map to vram ld de,BGTileMap ; source ld hl,_SCRN0+(ROLL_SIZE*4) ; dest ld bc,(BGTileMapEnd - BGTileMap) ; num bytes call CopyMem ;-------------------------------------- ; copy the bg tiles to vram ld de,BGTiles ; source ld hl,_VRAM8000 ; dest ld bc,(BGTilesEnd - BGTiles) ; num bytes call CopyMem ;-------------------------------------- ; set up the initial state call InitVariables call InitFirstPart ;-------------------------------------- ; turn on the display ld a,LCDCF_ON|LCDCF_BG8000|LCDCF_BG9800|LCDCF_OBJOFF|LCDCF_BGON ldh [rLCDC],a WaitVBlankStart ;------------------------------- ; set up the lcdc int ld a,STATF_MODE00 ldh [rSTAT],a ;-------------------------------------- ; enable the interrupts ld a,IEF_VBLANK|IEF_LCDC ldh [rIE],a xor a ei ldh [rIF],a ret ;-------------------------------------------------------------- ; copy bc bytes from de to hl CopyMem: .loop ld a,[de] ld [hl+],a inc de dec bc ld a,b or c jr nz,.loop ret ;-------------------------------------------------------------- InitVariables: ld hl,wVBlankDone xor a ld [hl+],a ; wVBlankDone ld [hl+],a ; wFrameCounter ld [hl+],a ; wChangePart ; set up the double-buffering system ld a,HIGH(wRasterTableA) ldh [hDrawBuffer],a xor $02 ldh [hFillBuffer],a ; hDrawBuffer=wRasterTableA ; hFillBuffer=wRasterTableB ret ;-------------------------------------------------------------- InitFirstPart: ; init the part pointer to the start of the table ld de,TutePartInitFuncTable ld hl,wTutePartPtr ld a,e ld [hl+],a ld [hl],d ; prep the first part SetChangePartFlag call ProcessPartTransition call PrepRaster0 ret ;============================================================== ; work ram ;============================================================== SECTION "Raster Table A",WRAM0[$C000] wRasterTableA:: DS sizeof_RASTER_TABLE SECTION "Raster Table B",WRAM0[$C200] wRasterTableB:: DS sizeof_RASTER_TABLE SECTION "Tutorial Part Variables",WRAM0,ALIGN[3] wProcessFunc:: DS 2 ; pointer to a function to call towards the start of a frame wTutePartPtr:: DS 2 ; pointer in TutorialPartInitFuncTable for the next part SECTION "Variables",WRAM0 wVBlankDone: DS 1 wFrameCounter: DS 1 ; a simple frame counter wChangePart: DS 1 wTableIndex: DS 1 ; general-purpose index into a table wProgressLine: DS 1 ; current raster used as a progressive scan wFlags: DS 1 ; a holder of misc flags/data for part's use wCounter: DS 1 ; general-purpose counter for part's use wDataPtr: DS 2 ; (part use) pointer to somewhere in wRasterTableA/wRasterTableB ;============================================================== ; high ram ;============================================================== SECTION "HRAM Variables",HRAM ; buffer offsets (put in h, l=00) ; $C0 = Table A / $C2 = Table B hDrawBuffer:: DS 1 ; the buffer currently being drawn (the inverse of hFillBuffer) hFillBuffer:: DS 1 ; the buffer currently being filled (the inverse of hDrawBuffer) ;============================================================== ; bank 1 data (put down here so it's out of the way) ;============================================================== SECTION "Bank 1 Data",ROMX,BANK[1] BGTileMap: DB $00,$00,$00,$00,$00,$01,$00,$00,$00,$00,$00,$00,$00,$02,$03,$00,$00,$00,$00,$04,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 DB $05,$06,$07,$07,$08,$09,$0a,$07,$07,$07,$0b,$0c,$0d,$09,$0a,$07,$07,$08,$0e,$0f,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 DB $00,$10,$11,$11,$12,$13,$14,$15,$16,$11,$17,$18,$19,$13,$14,$11,$11,$12,$13,$1a,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 DB $00,$1b,$1c,$00,$00,$1d,$00,$1e,$1f,$00,$20,$1d,$21,$1d,$00,$1c,$22,$23,$1d,$1a,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 DB $02,$24,$1d,$00,$00,$1d,$00,$25,$26,$27,$28,$1d,$29,$1d,$2a,$1d,$2b,$2c,$1d,$1a,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 DB $00,$1b,$1d,$2d,$2e,$2f,$30,$31,$32,$33,$34,$1d,$35,$1d,$29,$1d,$2d,$2e,$2f,$1a,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 DB $00,$1b,$1d,$36,$37,$38,$39,$3a,$3a,$3a,$3b,$3c,$3d,$3e,$3f,$1d,$36,$37,$38,$40,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 DB $00,$1b,$37,$38,$41,$00,$00,$42,$43,$44,$45,$46,$47,$48,$49,$37,$4a,$4b,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 DB $00,$4c,$4d,$30,$4e,$00,$4f,$50,$51,$52,$53,$54,$55,$56,$57,$58,$59,$5a,$02,$03,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 DB $00,$00,$00,$5b,$5c,$00,$5d,$1d,$5e,$31,$5f,$60,$61,$1d,$1d,$62,$00,$63,$64,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 DB $00,$00,$00,$65,$66,$00,$67,$5d,$68,$69,$6a,$1d,$1d,$1d,$6b,$6c,$6d,$6e,$1f,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 DB $00,$01,$00,$6f,$70,$00,$00,$71,$72,$73,$63,$1d,$1d,$1d,$74,$75,$73,$25,$76,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 DB $00,$00,$00,$00,$77,$00,$00,$00,$78,$79,$00,$7a,$7b,$7c,$1d,$7d,$7e,$31,$76,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 DB $7f,$80,$7f,$80,$77,$81,$82,$83,$84,$85,$86,$87,$88,$89,$8a,$8b,$8c,$1d,$8d,$20,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 DB $8e,$8f,$8e,$8f,$90,$91,$92,$93,$94,$95,$96,$97,$98,$1d,$1d,$99,$9a,$1d,$9b,$8f,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 DB $9c,$9d,$9c,$9d,$9e,$9f,$a0,$a1,$a2,$a3,$31,$a4,$1d,$1d,$1d,$1d,$1d,$a5,$a6,$9d,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 DB $a7,$a8,$a7,$a8,$a7,$a8,$a9,$aa,$ab,$ac,$ad,$5d,$1d,$1d,$1d,$1d,$1d,$ae,$a7,$a8,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 DB $af,$af,$af,$af,$af,$af,$af,$af,$af,$af,$af,$b0,$1d,$1d,$1d,$b1,$b2,$b3,$af,$af,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 DB $af,$af,$af,$af,$af,$af,$af,$af,$af,$af,$af,$af,$af,$af,$af,$af,$af,$af,$af,$af,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 BGTileMapEnd: BGTiles: DB $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff DB $fb,$c7,$fd,$83,$ef,$b7,$ff,$b7,$fd,$83,$bb,$ef,$db,$e7,$ff,$ff DB $ff,$f8,$ff,$f0,$ef,$f0,$ff,$ec,$ee,$fd,$fe,$f3,$f7,$eb,$ff,$ff DB $ff,$7f,$ff,$3f,$ff,$3f,$bf,$7f,$7f,$ff,$ff,$ff,$ff,$ff,$ff,$ff DB $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$f7,$8f,$fb,$07,$df,$6f,$ff,$6f DB $fc,$fc,$fc,$fc,$fc,$fc,$fe,$fe,$fe,$fe,$ff,$ff,$ff,$ff,$ff,$ff DB $00,$00,$00,$00,$7f,$7f,$7f,$7f,$3f,$30,$3f,$30,$18,$1f,$98,$9f DB $00,$00,$00,$00,$ff,$ff,$ff,$ff,$ff,$00,$ff,$00,$00,$ff,$00,$ff DB $01,$01,$00,$00,$fc,$fc,$ff,$ff,$ff,$03,$ff,$00,$07,$f8,$01,$fe DB $fc,$fc,$7c,$7c,$1c,$1c,$06,$06,$c0,$c0,$f0,$f0,$fc,$3c,$ff,$0f DB $00,$00,$00,$00,$7f,$7f,$7f,$7f,$3f,$30,$3f,$30,$18,$1f,$18,$1f DB $00,$00,$00,$00,$fe,$fe,$fe,$fe,$fc,$0c,$fc,$0c,$18,$f8,$18,$f8 DB $3f,$3f,$3e,$3e,$38,$38,$60,$60,$03,$03,$0f,$0f,$3f,$3c,$ff,$f0 DB $81,$81,$00,$00,$3c,$3c,$ff,$ff,$ff,$c3,$ff,$00,$e7,$18,$81,$7e DB $ff,$ff,$7f,$7f,$1f,$1f,$07,$07,$c1,$c1,$f0,$f0,$fc,$3c,$ff,$0f DB $fb,$07,$77,$df,$b7,$cf,$ff,$ff,$ff,$ff,$7f,$7f,$1f,$1f,$0f,$0f DB $8c,$8f,$cc,$cf,$c6,$c7,$e6,$e7,$e3,$e3,$f3,$f3,$f3,$f3,$f3,$f3 DB $00,$ff,$00,$ff,$00,$ff,$00,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff DB $00,$ff,$00,$ff,$00,$ff,$00,$ff,$f0,$ff,$fc,$ff,$ff,$ff,$ff,$ff DB $7f,$83,$1f,$e0,$07,$f8,$01,$fe,$00,$ff,$00,$ff,$00,$ff,$00,$ff DB $cc,$cf,$fc,$ff,$fe,$ff,$fe,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff DB $00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$80,$ff,$80,$ff DB $00,$ff,$00,$ff,$00,$ff,$00,$ff,$7f,$ff,$7f,$ff,$3f,$ff,$3f,$ff DB $33,$f3,$3f,$ff,$7f,$ff,$7f,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff DB $fe,$c1,$f8,$07,$e0,$1f,$80,$7f,$00,$ff,$00,$ff,$00,$ff,$00,$ff DB $00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$3c,$ff,$ff,$ff,$ff,$ff DB $cf,$cf,$cf,$cf,$cf,$cf,$cf,$cf,$cf,$cf,$cf,$cf,$cf,$cf,$cf,$cf DB $f3,$f3,$f3,$f3,$f3,$f3,$f3,$f3,$f3,$f3,$f3,$f3,$f3,$f3,$f3,$f3 DB $ff,$3f,$ff,$0f,$7f,$83,$1f,$e0,$07,$f8,$01,$fe,$00,$ff,$00,$ff DB $00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff DB $c0,$ff,$c0,$ff,$e0,$ff,$e0,$ff,$f0,$ff,$f0,$ff,$f8,$ff,$f8,$ff DB $1f,$ff,$1f,$ff,$0f,$ff,$0f,$ff,$07,$ff,$07,$ff,$03,$ff,$03,$ff DB $ff,$ff,$ff,$ff,$ff,$ff,$fb,$ff,$f7,$ff,$f3,$ff,$f3,$ff,$27,$ff DB $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$df,$ff,$c3,$ff DB $ff,$ff,$ff,$ff,$fc,$ff,$c0,$ff,$c1,$ff,$c0,$ff,$e0,$ff,$f8,$ff DB $ff,$ff,$ff,$ff,$7f,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$7f,$ff,$1f,$ff DB $f3,$73,$f3,$33,$f3,$33,$b3,$73,$73,$f3,$f3,$f3,$f3,$f3,$f3,$f3 DB $f8,$ff,$f8,$ff,$f0,$ff,$f0,$ff,$e0,$ff,$e0,$ff,$c0,$ff,$c0,$ff DB $03,$ff,$03,$ff,$07,$ff,$07,$ff,$0f,$ff,$0f,$ff,$1f,$ff,$1f,$ff DB $80,$ff,$c0,$ff,$e1,$ff,$fb,$ff,$ff,$ff,$fc,$ff,$f8,$ff,$f8,$ff DB $7f,$ff,$ff,$ff,$ff,$ff,$e3,$ff,$03,$ff,$03,$ff,$03,$ff,$03,$ff DB $c3,$ff,$c3,$ff,$c3,$ff,$c3,$ff,$c3,$ff,$c3,$ff,$c3,$ff,$c3,$ff DB $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$f3,$ff,$c3,$ff,$c3,$ff DB $fe,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$c7,$ff,$c0,$ff,$fc,$ff DB $0f,$ff,$87,$ff,$c3,$ff,$c3,$ff,$c3,$ff,$c3,$ff,$03,$ff,$03,$ff DB $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$fc,$ff,$f0,$ff DB $ff,$ff,$ff,$ff,$fc,$ff,$f0,$ff,$c0,$ff,$00,$ff,$00,$ff,$00,$ff DB $00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$03,$ff DB $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$fe,$ff,$fe,$ff,$fc,$ff,$fc,$ff DB $80,$ff,$80,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff DB $3f,$ff,$3f,$ff,$7f,$ff,$7f,$ff,$7f,$80,$7f,$80,$00,$ff,$00,$ff DB $f8,$ff,$fe,$ff,$ff,$ff,$ff,$ff,$ff,$00,$ff,$00,$00,$ff,$00,$ff DB $03,$f3,$03,$c3,$c3,$c3,$c3,$c3,$e3,$63,$e3,$63,$33,$f3,$33,$f3 DB $c3,$ff,$fb,$c7,$ff,$c3,$ff,$c3,$ff,$c3,$cf,$c3,$c7,$c3,$c7,$c3 DB $c0,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$03,$ff DB $00,$ff,$00,$ff,$00,$ff,$03,$ff,$0f,$ff,$3c,$fc,$f0,$f0,$c1,$c1 DB $0f,$ff,$3c,$fc,$f0,$f0,$c1,$c1,$07,$07,$1f,$1f,$7f,$7f,$ff,$ff DB $f8,$ff,$38,$3f,$30,$3f,$30,$3f,$3f,$3f,$3f,$3f,$00,$00,$00,$00 DB $00,$ff,$00,$ff,$00,$ff,$00,$ff,$ff,$ff,$ff,$ff,$00,$00,$00,$00 DB $1f,$ff,$1f,$ff,$0c,$fc,$0c,$fc,$fc,$fc,$fc,$fc,$00,$00,$00,$00 DB $00,$ff,$c0,$ff,$f0,$ff,$3c,$3f,$0f,$0f,$83,$83,$e0,$e0,$f8,$f8 DB $c7,$c3,$c7,$c3,$ff,$ff,$ff,$ff,$c3,$c3,$c3,$c3,$00,$00,$00,$00 DB $00,$ff,$03,$ff,$0f,$ff,$3c,$fc,$f0,$f0,$c1,$c1,$07,$07,$1e,$1f DB $ff,$ff,$ff,$ff,$03,$03,$03,$03,$73,$73,$f3,$f3,$b3,$f3,$33,$f3 DB $0f,$0f,$1f,$1f,$7f,$7f,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff DB $07,$07,$1f,$1f,$7f,$7f,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff DB $ff,$ff,$ff,$ff,$c0,$ff,$e0,$ff,$e0,$ff,$e0,$ff,$e0,$ff,$e0,$ff DB $ff,$ff,$ff,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff DB $ff,$ff,$ff,$ff,$1f,$fe,$0f,$fe,$0f,$fe,$0f,$ff,$0f,$ff,$07,$ff DB $ff,$ff,$ff,$ff,$32,$c3,$02,$e3,$22,$e3,$03,$c3,$01,$c0,$60,$60 DB $9f,$ff,$8f,$ff,$1c,$f0,$18,$f0,$38,$e0,$e0,$c0,$c0,$00,$01,$00 DB $ff,$ff,$ff,$ff,$0f,$00,$0f,$00,$1e,$01,$1c,$03,$30,$0f,$f0,$0f DB $f8,$ff,$f0,$ff,$18,$ff,$18,$ff,$18,$ff,$18,$ff,$38,$ff,$38,$ff DB $33,$f3,$33,$f3,$33,$f3,$33,$f3,$33,$f3,$33,$f3,$33,$f3,$33,$f3 DB $0f,$ff,$3c,$fc,$f0,$f0,$c1,$c1,$07,$07,$1e,$1f,$78,$7f,$e0,$ff DB $07,$07,$1e,$1f,$78,$7f,$e1,$ff,$83,$ff,$07,$ff,$07,$ff,$0f,$ff DB $f0,$f0,$f0,$f0,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff DB $07,$07,$1f,$1f,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff DB $7f,$ff,$7f,$ff,$7f,$ff,$7f,$ff,$7f,$ff,$3f,$ff,$bf,$7f,$d7,$3f DB $ff,$ff,$ff,$ff,$ff,$ff,$fe,$ff,$f8,$ff,$f0,$ff,$c0,$ff,$80,$ff DB $c0,$ff,$80,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff DB $00,$ff,$00,$ff,$00,$ff,$20,$ff,$10,$ff,$1c,$ff,$0f,$ff,$0f,$ff DB $02,$fe,$00,$fe,$00,$fe,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$c0,$ff DB $00,$18,$01,$0e,$0f,$00,$0e,$80,$06,$f1,$00,$f0,$00,$f0,$00,$f2 DB $0f,$08,$8d,$0e,$85,$06,$05,$46,$47,$06,$5c,$3f,$5e,$bc,$04,$f0 DB $70,$0f,$30,$0f,$b3,$0f,$9f,$0f,$9f,$0f,$9f,$0f,$0f,$1f,$2f,$1f DB $f8,$ff,$f0,$ff,$f0,$ff,$f0,$ff,$e0,$ff,$c0,$ff,$80,$ff,$00,$ff DB $30,$f0,$30,$f0,$3f,$ff,$3f,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff DB $07,$07,$1e,$1f,$f8,$ff,$e0,$ff,$00,$ff,$07,$ff,$0f,$ff,$1f,$ff DB $80,$ff,$00,$ff,$00,$ff,$00,$ff,$1f,$ff,$ff,$ff,$ff,$ff,$ff,$ff DB $07,$ff,$07,$ff,$03,$ff,$03,$ff,$c1,$ff,$e0,$ff,$e0,$ff,$f0,$ff DB $ff,$fc,$fb,$fc,$fe,$f8,$fe,$f0,$fc,$f0,$fc,$f0,$fc,$f0,$fc,$f8 DB $d7,$3f,$ff,$1f,$7f,$0f,$3f,$0f,$1f,$07,$1f,$07,$1f,$07,$3f,$0f DB $00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$80,$ff DB $07,$ff,$07,$ff,$0f,$f3,$19,$e7,$1d,$e3,$1c,$e3,$3c,$c3,$3e,$c1 DB $0d,$f2,$04,$fb,$00,$f9,$00,$f8,$00,$fc,$00,$fc,$00,$ff,$00,$ff DB $20,$c0,$80,$60,$00,$21,$2c,$83,$84,$03,$00,$07,$80,$07,$00,$8f DB $06,$3f,$0c,$7f,$0c,$ff,$0c,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff DB $1f,$ff,$3f,$ff,$3f,$fb,$3f,$f9,$40,$c0,$40,$c0,$40,$c0,$00,$80 DB $f0,$ff,$f8,$ff,$f8,$ff,$f8,$ff,$fc,$ff,$fc,$ff,$fc,$ff,$fe,$ff DB $7f,$ff,$7f,$ff,$3f,$ff,$3f,$ff,$3f,$ff,$1f,$ff,$1f,$ff,$1f,$ff DB $fc,$fc,$fb,$fb,$fb,$fb,$fc,$f8,$ff,$fc,$fd,$fc,$fe,$fc,$fe,$ff DB $1f,$1f,$6f,$6f,$ef,$6f,$9f,$8f,$3f,$0f,$7f,$1f,$3f,$1f,$1f,$ff DB $80,$ff,$e0,$ff,$e0,$ff,$f0,$ff,$f8,$ff,$fc,$ff,$ff,$ff,$ff,$ff DB $3e,$c1,$3f,$c0,$3f,$c0,$3f,$c0,$3f,$c0,$3f,$c0,$3f,$c0,$3f,$c0 DB $00,$ff,$01,$ff,$07,$ff,$1f,$ff,$ff,$7f,$ff,$7f,$ff,$3f,$ff,$3f DB $80,$ff,$c0,$ff,$c0,$ff,$e0,$ff,$e0,$ff,$e0,$ff,$e0,$ff,$f0,$ff DB $00,$ff,$00,$ff,$00,$ff,$01,$fe,$03,$fc,$07,$f8,$07,$f8,$07,$f8 DB $00,$80,$80,$00,$e1,$00,$e1,$00,$e1,$00,$e1,$00,$e0,$00,$f0,$00 DB $ff,$ff,$ff,$ff,$ff,$7f,$ff,$7f,$ff,$7f,$ff,$7f,$ff,$3f,$ff,$3f DB $fe,$ff,$fe,$ff,$fe,$ff,$fe,$ff,$fc,$ff,$fc,$ff,$fc,$ff,$fc,$ff DB $fe,$fc,$ff,$fe,$fe,$ff,$fe,$fe,$ff,$fe,$ff,$ff,$ff,$ff,$ff,$ff DB $1f,$0f,$3f,$1f,$df,$3f,$1f,$1f,$3f,$1f,$ff,$3f,$3f,$3f,$3f,$3f DB $e0,$ff,$f0,$ff,$fe,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff DB $1f,$e0,$1f,$e0,$1f,$e0,$1f,$e0,$1f,$e0,$1f,$e0,$3f,$c0,$3f,$c0 DB $ff,$3f,$ff,$1f,$ff,$1f,$ff,$1f,$ff,$1f,$ff,$0f,$ff,$0f,$ff,$0f DB $07,$f8,$03,$fc,$01,$fe,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff DB $f0,$00,$f0,$00,$f8,$00,$f8,$00,$fc,$00,$7c,$80,$3c,$c0,$1e,$e0 DB $03,$ff,$03,$ff,$03,$ff,$03,$ff,$03,$ff,$03,$ff,$03,$ff,$03,$ff DB $ff,$3f,$3f,$ff,$3f,$ff,$3f,$ff,$3f,$ff,$3f,$ff,$3f,$ff,$3f,$ff DB $ff,$c0,$ff,$c0,$ff,$c0,$ff,$c0,$ff,$c0,$ff,$c0,$ff,$c0,$ff,$e0 DB $ff,$0f,$ff,$0f,$f7,$0f,$f3,$0f,$f1,$0f,$f0,$0f,$f1,$0f,$e1,$1f DB $c0,$ff,$fe,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$fc,$fc,$f8,$f8 DB $00,$ff,$00,$ff,$80,$ff,$c0,$ff,$e0,$ff,$a0,$b0,$30,$00,$30,$00 DB $00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$1f,$00,$01 DB $1e,$e0,$0e,$f0,$07,$f8,$07,$f8,$03,$fc,$01,$fe,$01,$fe,$00,$ff DB $7f,$0f,$7f,$0f,$7f,$0f,$7c,$0f,$78,$07,$f8,$07,$f8,$07,$f8,$07 DB $fd,$ff,$fc,$ff,$fc,$ff,$fe,$ff,$ef,$ff,$9f,$ff,$3e,$ff,$3f,$ff DB $ff,$ff,$ff,$ff,$3f,$ff,$1d,$ff,$1b,$ff,$19,$ff,$39,$ff,$f3,$ff DB $ff,$ff,$ff,$f3,$ff,$e1,$ff,$c0,$ff,$c0,$ff,$80,$ff,$80,$ff,$00 DB $fd,$ff,$fc,$ff,$fc,$ff,$fe,$7f,$ff,$7f,$ff,$1f,$ff,$0f,$ff,$06 DB $ff,$ff,$ff,$ff,$7f,$f8,$7f,$e0,$ff,$c0,$ff,$c1,$ff,$83,$ff,$03 DB $ff,$c0,$ff,$00,$ff,$00,$ff,$00,$ff,$78,$f7,$f8,$fd,$f2,$e8,$f7 DB $c1,$3f,$81,$7f,$81,$7f,$01,$ff,$01,$ff,$01,$ff,$01,$ff,$01,$ff DB $ff,$bf,$ff,$8f,$e3,$02,$c0,$00,$88,$00,$bf,$00,$fe,$30,$fc,$b8 DB $f0,$f0,$e0,$c0,$e0,$00,$41,$00,$00,$09,$1b,$00,$72,$00,$46,$00 DB $2c,$00,$67,$00,$c7,$00,$cc,$0b,$1c,$83,$9c,$03,$1c,$03,$00,$1f DB $00,$00,$f8,$00,$f7,$08,$f0,$0f,$0f,$f0,$03,$fc,$00,$ff,$00,$ff DB $00,$1f,$00,$03,$00,$00,$00,$c0,$c0,$38,$86,$01,$70,$80,$04,$f8 DB $00,$ff,$00,$ff,$00,$7f,$00,$0f,$00,$00,$00,$00,$80,$60,$18,$07 DB $f8,$07,$cc,$03,$cc,$03,$c4,$03,$44,$03,$00,$03,$80,$03,$c0,$01 DB $03,$ff,$03,$ff,$03,$ff,$03,$ff,$41,$ff,$31,$ff,$18,$ff,$18,$ff DB $9f,$ff,$ff,$ff,$ff,$ff,$ef,$ff,$cf,$ff,$8f,$ff,$87,$ff,$83,$ff DB $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ef,$ff,$e7,$ff,$c3,$ff,$c7,$ff DB $ff,$fc,$ff,$f8,$ff,$f0,$ff,$e1,$ff,$c1,$ff,$c1,$ff,$c1,$ff,$e1 DB $ff,$38,$ff,$7c,$ff,$ff,$ff,$e0,$7f,$e0,$ff,$e0,$bf,$e0,$bf,$f1 DB $ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$c0 DB $ff,$07,$ff,$0f,$ff,$1f,$ff,$3e,$ff,$3c,$ff,$0d,$ff,$01,$ff,$03 DB $d8,$e7,$e0,$9f,$c0,$3f,$80,$7f,$80,$ff,$80,$ff,$80,$ff,$80,$ff DB $01,$ff,$03,$ff,$03,$ff,$03,$ff,$03,$ff,$06,$ff,$06,$ff,$04,$ff DB $f0,$f8,$f0,$f0,$e0,$f0,$e0,$f8,$40,$f8,$c0,$fc,$c0,$fe,$80,$fe DB $4a,$04,$40,$86,$40,$86,$00,$c6,$80,$47,$80,$47,$00,$47,$00,$67 DB $00,$1f,$00,$0f,$00,$0f,$00,$0f,$00,$0f,$00,$87,$00,$c3,$00,$e3 DB $81,$00,$1c,$e0,$03,$fc,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff DB $e0,$01,$20,$01,$e1,$00,$0f,$f0,$00,$ff,$00,$ff,$00,$ff,$00,$ff DB $0f,$ff,$0f,$ff,$07,$ff,$07,$ff,$07,$ff,$0f,$ff,$0f,$ff,$0b,$ff DB $00,$ff,$00,$ff,$03,$fc,$47,$b8,$27,$d8,$67,$98,$63,$9c,$30,$cf DB $4f,$bf,$ce,$3f,$c6,$3f,$82,$7f,$08,$f7,$06,$f9,$83,$7c,$03,$fc DB $3f,$e1,$3f,$e1,$3f,$f1,$5f,$b1,$3f,$dd,$67,$9f,$63,$9c,$30,$cf DB $5f,$b0,$df,$38,$cf,$38,$8f,$7c,$0f,$f4,$07,$fe,$83,$7f,$03,$fc DB $ff,$c0,$ff,$80,$ff,$80,$ff,$80,$ff,$80,$ff,$c0,$ff,$c0,$7f,$fc DB $ff,$73,$ff,$e3,$be,$ef,$ba,$ff,$88,$f7,$c6,$f9,$e3,$7c,$f3,$3c DB $80,$ff,$80,$ff,$c0,$ff,$40,$ff,$60,$ff,$60,$bf,$70,$bf,$30,$df DB $0c,$ff,$0f,$ff,$0f,$ff,$1b,$ff,$19,$f7,$17,$f9,$13,$fd,$13,$fd DB $04,$63,$0c,$73,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff DB $00,$ff,$00,$ff,$00,$ff,$00,$ff,$03,$ff,$02,$ff,$01,$ff,$01,$ff DB $0c,$ff,$06,$ff,$03,$fe,$03,$fe,$f3,$fe,$7f,$9e,$63,$9c,$30,$cf DB $00,$ff,$18,$e7,$0c,$f3,$1c,$e3,$3c,$c3,$fe,$01,$ff,$00,$ff,$00 DB $26,$d9,$10,$ef,$1c,$e3,$1e,$e1,$3f,$c0,$7f,$80,$ff,$00,$ff,$00 DB $07,$ff,$19,$e7,$0c,$f3,$1c,$e3,$3c,$c3,$fe,$01,$ff,$00,$ff,$00 DB $f6,$19,$f0,$df,$7c,$f3,$1e,$e1,$3f,$c0,$7f,$80,$ff,$00,$ff,$00 DB $18,$ff,$18,$ef,$0c,$ff,$1c,$e7,$3c,$c7,$fe,$07,$ff,$03,$ff,$00 DB $36,$f9,$30,$ef,$3c,$e3,$3e,$e1,$3f,$e0,$3f,$e0,$bf,$e0,$ff,$e0 DB $80,$ff,$c0,$ff,$60,$ff,$20,$ff,$30,$ff,$fc,$1f,$fe,$07,$ff,$03 DB $01,$ff,$01,$ff,$01,$ff,$01,$ff,$01,$ff,$01,$ff,$01,$ff,$03,$ff DB $ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$00 DB $c0,$ff,$e0,$7f,$f0,$3f,$f8,$1f,$fc,$0f,$fc,$07,$f8,$0f,$f8,$0f DB $00,$ff,$00,$ff,$00,$ff,$00,$ff,$00,$ff,$02,$ff,$03,$ff,$07,$fd DB $00,$ff,$00,$ff,$00,$ff,$00,$ff,$01,$ff,$07,$ff,$0f,$fc,$bf,$f8 DB $03,$fe,$07,$fe,$1f,$fc,$3f,$f0,$ff,$e0,$ff,$00,$ff,$00,$ff,$00 BGTilesEnd: ; ------------------------------------------------------------- SECTION "X Sine Table",ROMX,BANK[1],ALIGN[8] XSineTable: DB $00,$00,$FF,$FE,$FD,$FD,$FC,$FB,$FA,$F9,$F9,$F8,$F7,$F6,$F6,$F5 DB $F4,$F4,$F3,$F2,$F1,$F1,$F0,$EF,$EF,$EE,$ED,$ED,$EC,$EC,$EB,$EA DB $EA,$E9,$E9,$E8,$E8,$E7,$E7,$E6,$E6,$E5,$E5,$E5,$E4,$E4,$E4,$E3 DB $E3,$E3,$E2,$E2,$E2,$E2,$E1,$E1,$E1,$E1,$E1,$E1,$E1,$E1,$E1,$E1 DB $E0,$E1,$E1,$E1,$E1,$E1,$E1,$E1,$E1,$E1,$E1,$E2,$E2,$E2,$E2,$E3 DB $E3,$E3,$E4,$E4,$E4,$E5,$E5,$E5,$E6,$E6,$E7,$E7,$E8,$E8,$E9,$E9 DB $EA,$EA,$EB,$EC,$EC,$ED,$ED,$EE,$EF,$EF,$F0,$F1,$F1,$F2,$F3,$F4 DB $F4,$F5,$F6,$F6,$F7,$F8,$F9,$F9,$FA,$FB,$FC,$FD,$FD,$FE,$FF,$00 DB $00,$00,$01,$02,$03,$03,$04,$05,$06,$07,$07,$08,$09,$0A,$0A,$0B DB $0C,$0C,$0D,$0E,$0F,$0F,$10,$11,$11,$12,$13,$13,$14,$14,$15,$16 DB $16,$17,$17,$18,$18,$19,$19,$1A,$1A,$1B,$1B,$1B,$1C,$1C,$1C,$1D DB $1D,$1D,$1E,$1E,$1E,$1E,$1F,$1F,$1F,$1F,$1F,$1F,$1F,$1F,$1F,$1F DB $20,$1F,$1F,$1F,$1F,$1F,$1F,$1F,$1F,$1F,$1F,$1E,$1E,$1E,$1E,$1D DB $1D,$1D,$1C,$1C,$1C,$1B,$1B,$1B,$1A,$1A,$19,$19,$18,$18,$17,$17 DB $16,$16,$15,$14,$14,$13,$13,$12,$11,$11,$10,$0F,$0F,$0E,$0D,$0C DB $0C,$0B,$0A,$0A,$09,$08,$07,$07,$06,$05,$04,$03,$03,$02,$01,$00 SECTION "Y Sine Table",ROMX,BANK[1],ALIGN[8] YSineTable: DB $00,$00,$01,$01,$02,$02,$03,$03,$04,$04,$05,$05,$06,$06,$06,$07 DB $07,$07,$07,$07,$07,$08,$07,$07,$07,$07,$07,$07,$06,$06,$06,$05 DB $05,$04,$04,$03,$03,$02,$02,$01,$01,$00,$00,$00,$FF,$FF,$FE,$FE DB $FD,$FC,$FC,$FC,$FB,$FB,$FA,$FA,$FA,$F9,$F9,$F9,$F9,$F9,$F9,$F8 DB $F9,$F9,$F9,$F9,$F9,$F9,$FA,$FA,$FA,$FB,$FB,$FC,$FC,$FD,$FD,$FE DB $FE,$FF,$FF,$00 DB $00,$00,$01,$01,$02,$02,$03,$03,$04,$04,$05,$05,$06,$06,$06,$07 DB $07,$07,$07,$07,$07,$08,$07,$07,$07,$07,$07,$07,$06,$06,$06,$05 DB $05,$04,$04,$03,$03,$02,$02,$01,$01,$00,$00,$00,$FF,$FF,$FE,$FE DB $FD,$FC,$FC,$FC,$FB,$FB,$FA,$FA,$FA,$F9,$F9,$F9,$F9,$F9,$F9,$F8 DB $F9,$F9,$F9,$F9,$F9,$F9,$FA,$FA,$FA,$FB,$FB,$FC,$FC,$FD,$FD,$FE DB $FE,$FF,$FF,$00 DB $00,$00,$01,$01,$02,$02,$03,$03,$04,$04,$05,$05,$06,$06,$06,$07 DB $07,$07,$07,$07,$07,$08,$07,$07,$07,$07,$07,$07,$06,$06,$06,$05 DB $05,$04,$04,$03,$03,$02,$02,$01,$01,$00,$00,$00,$FF,$FF,$FE,$FE DB $FD,$FC,$FC,$FC,$FB,$FB,$FA,$FA,$FA,$F9,$F9,$F9,$F9,$F9,$F9,$F8 DB $F9,$F9,$F9,$F9,$F9,$F9,$FA,$FA,$FA,$FB,$FB,$FC,$FC,$FD,$FD,$FE DB $FE,$FF,$FF,$00 DB $00 SECTION "Roll Table",ROMX,BANK[1],ALIGN[8] RollTable: DB 64,60,58,56,54,52,50,48,46,44,43,41,39,38,36,34 DB 33,31,29,27,26,24,22,21,19,17,15,13,11, 9, 7, 5
25.764345
132
0.543041
[ "Unlicense" ]
ISSOtm/DeadCScroll
DeadCScroll.asm
46,247
Assembly
; ******************************************************************************************** ; ******************************************************************************************** ; ; Name : const.asm ; Purpose : .. ; Created : 15th Nov 1991 ; Updated : 4th Jan 2021 ; Authors : Fred Bowen ; ; ******************************************************************************************** ; ******************************************************************************************** ; Constants used by LOG, EXP, TRIG, and others. fr4 !text 127,0,0,0,0 ; 1/4 neghlf !text 128,128,0,0,0 ; -0.5 fhalf !text 128,0,0,0,0 ; 0.5 tenc !text 132,32,0,0,0 ; 10.0 pival !text 130,73,15,218,161 ; pi pi2 !text 129,73,15,218,162 ; pi/2 twopi !text 131,73,15,218,162 ; pi*2 n0999 !text $9b,$3e,$bc,$1f,$fd n9999 !text $9e,$6e,$6b,$27,$fd nmil !text $9e,$6e,$6b,$28,$00 foutbl ; powers of 10 !text 250,10,31,0 ; -100,000,000 !text 0,152,150,128 ; 10,000,000 !text 255,240,189,192 ; -1,000,000 !text 0,1,134,160 ; 100,000 !text 255,255,216,240 ; -10,000 !text 0,0,3,232 ; 1,000 !text 255,255,255,156 ; -100 !text 0,0,0,10 ; 10 !text 255,255,255,255 ; -1 fdcend ; .byte @377,@337,@012,@200 ;-2,160,000 for time converter removed [901014] ; .byte @000,@003,@113,@300 ; 216,000 ; .byte @377,@377,@163,@140 ; -36,000 ; .byte @000,@000,@016,@020 ; 3,600 ; .byte @377,@377,@375,@250 ; -600 ; .byte @000,@000,@000,@074 ; 60 ;timend logcn2 !text 3 ; degree-1 !text 127,94,86,203,121 ; 0.43425594188 !text 128,19,155,11,100 ; 0.57658454134 !text 128,118,56,147,22 ; 0.96180075921 !text 130,56,170,59,32 ; 2.8853900728 expcon !text 7 ; degree-1 !text 113,52,88,62,86 ; 0.000021498763697 !text 116,22,126,179,27 ; 0.00014352314036 !text 119,47,238,227,133 ; 0.0013422634824 !text 122,29,132,28,42 ; 0.0096140170199 !text 124,99,89,88,10 ; 0.055505126860 !text 126,117,253,231,198 ; 0.24022638462 !text 128,49,114,24,16 ; 0.69314718600 fone !text 129,0,0,0,0 ; 1.0 logeb2 !text 129,56,170,59,41 ; log(e) base 2 sqr05 !text 128,53,4,243,52 ; 0.707106781 sqr(0.5) sqr20 !text 129,53,4,243,52 ; 1.41421356 sqr(2.0) log2 !text 128,49,114,23,248 ; 0.693147181 ln(2) sincon !text 5 ; degree-1 trig !text 132,230,26,45,27 !text 134,40,7,251,248 !text 135,153,104,137,1 !text 135,35,53,223,225 !text 134,165,93,231,40 !text 131,73,15,218,162 atncon !text 11 ; degree-1 !text 118,179,131,189,211 !text 121,30,244,166,245 !text 123,131,252,176,16 !text 124,12,31,103,202 !text 124,222,83,203,193 !text 125,20,100,112,76 !text 125,183,234,81,122 !text 125,99,48,136,126 !text 126,146,68,153,58 !text 126,76,204,145,199 !text 127,170,170,170,19 !text 129,0,0,0,0 ; ******************************************************************************************** ; ; Date Changes ; ==== ======= ; ; ********************************************************************************************
44.72
94
0.340564
[ "MIT" ]
mega65dev/rom-assembler
source/math/const.asm
4,472
Assembly
<% from pwnlib.shellcraft.mips.linux import syscall %> <%page args="epfd, events, maxevents, timeout, ss"/> <%docstring> Invokes the syscall epoll_pwait. See 'man 2 epoll_pwait' for more information. Arguments: epfd(int): epfd events(epoll_event): events maxevents(int): maxevents timeout(int): timeout ss(sigset_t): ss </%docstring> ${syscall('SYS_epoll_pwait', epfd, events, maxevents, timeout, ss)}
24.111111
79
0.698157
[ "MIT" ]
FDlucifer/binjitsu
pwnlib/shellcraft/templates/mips/linux/epoll_pwait.asm
434
Assembly
; A216985: Number of city-block distance 1, pressure limit 2 movements in an n X 2 array with each element moving exactly one horizontally or vertically, no element acquiring more than two neighbors, and without 2-loops. ; Submitted by Christian Krause ; 0,2,14,80,436,2346,12578,67368,360720,1931306,10340030,55359176,296385268,1586804322,8495522018,45483800496,243513709632,1303737284978,6980021408654,37370028005408,200073740644948,1071165953874618,5734868039323202,30703656431035800,164382948617216400,880082600480515802,4711835322239698814,25226486799970465880,135058972300116487636,723086260223320919346,3871299557662168512578,20726379533925407801568,110966046978741658917120,594096212603525110718306,3180705444949926252575630 lpb $0 sub $0,1 add $2,2 sub $3,$4 add $3,$2 add $3,$2 add $4,$2 add $2,$3 add $2,$3 lpe mov $0,$4
53.0625
479
0.822144
[ "Apache-2.0" ]
ckrause/loda-programs
oeis/216/A216985.asm
849
Assembly
; A072057: Sum of divisors of 2*prime(n)+1. ; Submitted by Christian Krause ; 6,8,12,24,24,40,48,56,48,60,104,124,84,120,120,108,144,168,240,168,228,216,168,180,336,240,312,264,296,228,432,264,372,416,336,408,624,440,408,348,360,532,384,572,480,640,624,600,672,720,468,480,768,504,624,576,684,728,912,564,968,588,1008,720,960,768,1008,1240,840,936,816,720,1368,1092,1152,840,840,1296,888,1456,840,1128,864,1228,1176,888,960,1488,1008,1352,1296,1104,1736,984,1520,1080,1020,1200,1400,1524 seq $0,6005 ; The odd prime numbers together with 1. max $0,2 mul $0,2 seq $0,203 ; a(n) = sigma(n), the sum of the divisors of n. Also called sigma_1(n).
71.555556
411
0.729814
[ "Apache-2.0" ]
ckrause/loda-programs
oeis/072/A072057.asm
644
Assembly
.segment "ZEROPAGE" nmi_ready: .res 1 palette_init: .res 1 .segment "CODE" nmi: pha ; make sure we don't clobber the A register lda nmi_ready ; check the nmi_ready flag bne nmi_go ; if nmi_ready set to 1 we can execute the nmi code pla rti nmi_go: ; set the player metasprite with a proc ; call the oam dma with a macro jsr oam_dma printf_nmi "HELLO WORLD", 80, 96 lda PPU_STATUS ; $2002 set PPU_SCROLL, #0 ; scroll_x sta PPU_SCROLL ; , #0 set nmi_ready, #0 pla rti
18.9375
72
0.572607
[ "MIT" ]
battlelinegames/nes-hello-world
src/vectors/nmi.asm
606
Assembly
SECTION code_clib PUBLIC fabandon PUBLIC _fabandon .fabandon ._fabandon ret
9.666667
19
0.747126
[ "BSD-2-Clause" ]
ByteProject/Puddle-BuildTools
FictionTools/z88dk/libsrc/target/nc100/fcntl/fabandon.asm
87
Assembly
SECTION code_fp_math16 PUBLIC cm16_sdcc___schar2h EXTERN asm_f24_i16 EXTERN asm_f16_f24 .cm16_sdcc___schar2h pop bc ;return pop hl ;value push hl push bc ld a,l rlca sbc a ld h,a call asm_f24_i16 jp asm_f16_f24
10.809524
26
0.77533
[ "Unlicense" ]
drunkfly/gamemyx
Tools/z88dk/libsrc/_DEVELOPMENT/math/float/math16/c/sdcc/cm16_sdcc___schar2h.asm
227
Assembly
<% import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft import six %> <%docstring>socketcall_setsockopt(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4) -> str Invokes the syscall socketcall_setsockopt. See 'man 2 socketcall_setsockopt' for more information. Arguments: vararg(int): vararg Returns: long </%docstring> <%page args="vararg_0=None, vararg_1=None, vararg_2=None, vararg_3=None, vararg_4=None"/> <% abi = pwnlib.abi.ABI.syscall() stack = abi.stack regs = abi.register_arguments[1:] allregs = pwnlib.shellcraft.registers.current() can_pushstr = [] can_pushstr_array = [] argument_names = ['vararg_0', 'vararg_1', 'vararg_2', 'vararg_3', 'vararg_4'] argument_values = [vararg_0, vararg_1, vararg_2, vararg_3, vararg_4] # Load all of the arguments into their destination registers / stack slots. register_arguments = dict() stack_arguments = collections.OrderedDict() string_arguments = dict() dict_arguments = dict() array_arguments = dict() syscall_repr = [] for name, arg in zip(argument_names, argument_values): if arg is not None: syscall_repr.append('%s=%r' % (name, arg)) # If the argument itself (input) is a register... if arg in allregs: index = argument_names.index(name) if index < len(regs): target = regs[index] register_arguments[target] = arg elif arg is not None: stack_arguments[index] = arg # The argument is not a register. It is a string value, and we # are expecting a string value elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): if isinstance(arg, six.text_type): arg = arg.encode('utf-8') string_arguments[name] = arg # The argument is not a register. It is a dictionary, and we are # expecting K:V paris. elif name in can_pushstr_array and isinstance(arg, dict): array_arguments[name] = ['%s=%s' % (k,v) for (k,v) in arg.items()] # The arguent is not a register. It is a list, and we are expecting # a list of arguments. elif name in can_pushstr_array and isinstance(arg, (list, tuple)): array_arguments[name] = arg # The argument is not a register, string, dict, or list. # It could be a constant string ('O_RDONLY') for an integer argument, # an actual integer value, or a constant. else: index = argument_names.index(name) if index < len(regs): target = regs[index] register_arguments[target] = arg elif arg is not None: stack_arguments[target] = arg # Some syscalls have different names on various architectures. # Determine which syscall number to use for the current architecture. for syscall in ['SYS_socketcall_setsockopt']: if hasattr(pwnlib.constants, syscall): break else: raise Exception("Could not locate any syscalls: %r" % syscalls) %> /* socketcall_setsockopt(${', '.join(syscall_repr)}) */ %for name, arg in string_arguments.items(): ${pwnlib.shellcraft.pushstr(arg, append_null=(b'\x00' not in arg))} ${pwnlib.shellcraft.mov(regs[argument_names.index(name)], abi.stack)} %endfor %for name, arg in array_arguments.items(): ${pwnlib.shellcraft.pushstr_array(regs[argument_names.index(name)], arg)} %endfor %for name, arg in stack_arguments.items(): ${pwnlib.shellcraft.push(arg)} %endfor ${pwnlib.shellcraft.setregs(register_arguments)} ${pwnlib.shellcraft.syscall(syscall)}
36.851485
90
0.649382
[ "MIT" ]
0xd3xt3r/pwntools
pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_setsockopt.asm
3,722
Assembly
include bls_vdp.inc _main_wscr_init_vdp ; TODO ; Create the plane pattern in vram ; ; Example for 256x152 screen: ; ; 00 19 38 551 570 589 ; 01 20 571 590 ; 02 591 ; ; 16 605 ; 17 36 587 606 ; 18 37 56 569 588 607 movem.l d5-d7/a4-a5, -(sp) move.l 24(sp), d7 ; Read parameter to d7 move.l 28(sp), d0 ; Read second parameter beq.b .no_vbl move.w #$4EB9, wscr_vblank_callback ; JSR.L move.l d0, wscr_vblank_callback + 2 .no_vbl move.l 32(sp), d0 ; Read second parameter beq.b .no_vbl_miss move.w #$4EB9, wscr_vblank_miss_callback ; JSR.L move.l d0, wscr_vblank_miss_callback + 2 .no_vbl_miss VDPSETADDRREG VDPSETAUTOINCR 2 VDPSETWRITE wscr_fbuf_plane, VRAM ; d1 contains line countdown ; d6 contains cell count per column moveq #(wscr_h / 8), d1 move.w d1, d6 ; d5 contains empty cell data move.w d7, d5 ori.w #wscr_fbuf_chr / $20 + wscr_w * wscr_h / 64, d5 ; d7 contains current cell data ori.w #wscr_fbuf_chr / $20, d7 subq.w #1, d1 .gen_line ; Generate one line of plane data ; Left border moveq #((320-wscr_w)/8/2)-1, d0 .left_border VDPWRITEW d5 dbra d0, .left_border ; Generate one line of framebuffer moveq #(wscr_w/8)-1, d0 .gen_chr VDPWRITEW d7 add.w d6, d7 dbra d0, .gen_chr ; Compute offset of the first cell of next line subi.w #(wscr_w * wscr_h / 64) - 1, d7 ; Right border moveq #(64 - ((320-wscr_w)/8/2))-1, d0 .right_border VDPWRITEW d5 dbra d0, .right_border dbra d1, .gen_line moveq #0, d1 ; Reset horizontal scrolling VDPSETWRITE wscr_hscroll, VRAM VDPWRITEL d1 ; d1.l == 0 at this point ; Reset vertical scrolling VDPSETWRITE 0, VSRAM VDPWRITEL #wscr_topline << 16 | wscr_topline ; The 2 planes must be offset by wscr_topline lines VDPUSEADDR movem.l (sp)+, d5-d7/a4-a5 rts _main_wscr_hblank VDPSETREG 1, VDPR01 | VDPDMAEN ; Disable display ori #$0600, sr VDPSETBG #$400 HAS_WRAM_2M bne.w wscr_no_frame_available ; Oops, the sub CPU did not have time to render ! movem.l d0-d1/a0-a1/a4-a5, -(sp) VDPSETADDRREG ; Patched by JSR <addr>.l by wscr_init_vdp if there is a vblank callback wscr_vblank_callback moveq #$01, d0 moveq #$01, d0 moveq #$01, d0 ; End of patch ; Upload the framebuffer to VRAM using DMA tst.w d0 beq.b .no_refresh VDPDMASEND wscr_framebuffer_addr, wscr_fbuf_chr, wscr_w * wscr_h / 2, VRAM .no_refresh ; Wait for the correct display line and reenable display move.w VDPHV, -(sp) ; Query current line tst.b (sp) ; Test if negative addq.l #2, (sp) bgt.b .tophalf ; line is in the top half of the screen VDPWAITLINE wscr_topline bra.b .enable_display .tophalf VDPUNTILLINE wscr_topline .enable_display VDPSETREG 1, VDPR01 | VDPDISPEN | VDPDMAEN ; Enable display ; Poll gamepads lea CDATA1 - 1, a0 lea GA_COMMOUT, a1 move.l (a0), (a1) ; Switch SEL line on gamepads if BDACTRL != CCTRL1 bclr #CSEL_BIT, CCTRL1 endif if BDACTRL != CCTRL2 bclr #CSEL_BIT, CCTRL1 endif ; Update missed frame counter while pads are stabilizing move.w wscr_miss_count(pc), 4(a1) clr.w wscr_miss_count(pc) ; Poll second half of gamepads movep.w 1(a0), d0 movep.w d0, (a1) ; Reset SEL line for next frame if BDACTRL != CCTRL1 bclr #CSEL_BIT, CCTRL1 endif if BDACTRL != CCTRL2 bclr #CSEL_BIT, CCTRL1 endif ; Give memory back to sub CPU SEND_WRAM_2M ; Generate the VBL interrupt for sub CPU SUB_INTERRUPT st.b wscr_vbl_flag(pc) ; Set VBL flag VDPSETBG #$000 movem.l (sp)+, d0-d1/a0-a1/a4-a5 rte wscr_no_frame_available addi.w #1, wscr_miss_count ; Count missed frames VDPSETBG #$004 VDPWAITLINE wscr_topline ; Wait until the end of extended vblank VDPSETREG 1, VDPR01 | VDPDISPEN | VDPDMAEN ; Enable display rte wscr_miss_count dw 0 wscr_vbl_flag db 0 db 0 ; vim: ts=8 sw=8 sts=8 et
33.775862
112
0.457036
[ "MIT" ]
retro16/blastsdk
src/wscr.asm
5,877
Assembly
; A266448: Total number of ON (black) cells after n iterations of the "Rule 25" elementary cellular automaton starting with a single ON (black) cell. ; 1,2,4,7,11,17,21,31,35,49,53,71,75,97,101,127,131,161,165,199,203,241,245,287,291,337,341,391,395,449,453,511,515,577,581,647,651,721,725,799,803,881,885,967,971,1057,1061,1151,1155,1249,1253,1351,1355,1457,1461,1567,1571,1681,1685,1799,1803,1921,1925,2047,2051,2177,2181,2311,2315,2449,2453,2591,2595,2737,2741,2887,2891,3041,3045,3199,3203,3361,3365,3527,3531,3697,3701,3871,3875,4049,4053,4231,4235,4417,4421,4607,4611,4801,4805,4999 lpb $0 mov $2,$0 sub $0,1 seq $2,266447 ; Number of ON (black) cells in the n-th iteration of the "Rule 25" elementary cellular automaton starting with a single ON (black) cell. add $1,$2 lpe add $1,1 mov $0,$1
67.416667
438
0.741656
[ "Apache-2.0" ]
ckrause/cm
programs/oeis/266/A266448.asm
809
Assembly
; A322029: Denominator of least value of the squared diameters of the enclosing circles of all strictly convex lattice n-gons with minimal area given by A070911. Numerators are A321693. ; 1,1,9,1,1,1,49,1,1,1,1,1,1,1,169,1,1,1,1,1,1,1,1,1 mov $3,2 mov $7,$0 lpb $3,1 mov $0,$7 sub $3,1 add $0,$3 trn $0,1 add $0,2 log $0,2 mov $2,$3 mov $5,$0 add $5,4 mov $6,$5 bin $6,6 mov $4,$6 lpb $2,1 mov $1,$4 sub $2,1 lpe lpe lpb $7,1 sub $1,$4 mov $7,0 lpe mul $1,8 add $1,1
16.933333
185
0.596457
[ "Apache-2.0" ]
karttu/loda
programs/oeis/322/A322029.asm
508
Assembly
; A083031: Numbers that are congruent to {0, 3, 7} mod 12. ; 0,3,7,12,15,19,24,27,31,36,39,43,48,51,55,60,63,67,72,75,79,84,87,91,96,99,103,108,111,115,120,123,127,132,135,139,144,147,151,156,159,163,168,171,175,180,183,187,192,195,199,204,207,211,216,219 mul $0,16 mov $1,$0 div $0,6 div $1,12 add $0,$1
34
196
0.673203
[ "Apache-2.0" ]
ckrause/cm
programs/oeis/083/A083031.asm
306
Assembly
; A020785: Decimal expansion of 1/sqrt(28). ; Submitted by Jamie Morken(s2) ; 1,8,8,9,8,2,2,3,6,5,0,4,6,1,3,6,1,3,6,0,7,2,5,8,2,6,8,1,1,7,0,9,0,0,3,0,4,0,7,8,7,5,6,5,5,9,3,4,4,6,0,7,2,7,1,6,9,1,6,6,7,4,7,0,8,5,7,9,0,6,3,0,2,3,0,7,3,4,5,4,4,8,4,0,0,2,8,0,6,3,3,1,9,6,1,0,2,5,7,9 add $0,1 mov $1,1 mov $2,1 mov $3,$0 add $3,6 mov $4,$0 mul $4,2 mov $7,10 pow $7,$4 mov $9,10 lpb $3 mov $4,$2 pow $4,2 mul $4,28 mov $5,$1 pow $5,2 add $4,$5 mov $6,$1 mov $1,$4 mul $6,$2 mul $6,2 mov $2,$6 mov $8,$4 div $8,$7 max $8,2 div $1,$8 div $2,$8 sub $3,2 lpe mov $3,$9 pow $3,$0 div $2,$3 mov $0,$2 mod $0,10
16.25641
201
0.515773
[ "Apache-2.0" ]
ckrause/loda-programs
oeis/020/A020785.asm
634
Assembly
addi r1,r0,#2 # r1 = 2 subi r2,r1,#1 # r2 = 1 addi r3,r1,#-4 # r3 = -2 subi r4,r3,#-1 # r4 = -1 addi r5,r1,#4 # r5 = 6 subi r6,r5,#3 # r6 = 3 add r7,r1,r2 # r7 = 3 sub r8,r5,r6 # r8 = 3 add r9,r6,r1 # r9 = 5 sge r10,r1,r2 # r10= 1 sge r10,r2,r1 # r10= 0 sge r10,r1,r1 # r10= 1 sle r10,r1,r2 # r10= 0 sle r10,r2,r1 # r10= 1 sle r10,r1,r1 # r10= 1 sne r10,r1,r1 # r10= 0 sne r10,r1,r2 # r10= 1 seq r10,r1,r2 # r10= 0 seq r10,r1,r1 # r10= 1 sgt r10,r2,r1 # r10= 0 sgt r10,r1,r2 # r10= 1 slt r10,r2,r1 # r10= 1 slt r10,r1,r2 # r10= 0 sgei r10,r1,#4 # r10= 0 sgei r10,r1,#1 # r10= 1 slei r10,r1,#0 # r10= 0 seqi r10,r1,#0 # r10= 0 seqi r10,r1,#2 # r10= 1 sgti r10,r1,#3 # r10= 0 sgti r10,r1,#1 # r10= 1 slti r10,r1,#1 # r10= 0 slti r10,r1,#3 # r10= 1 nop nop nop nop nop nop
19.74359
24
0.581818
[ "MIT" ]
ChrisitianFotso/DLX
asm_example/alu.asm
770
Assembly
; A047838: a(n) = floor(n^2/2) - 1. ; 1,3,7,11,17,23,31,39,49,59,71,83,97,111,127,143,161,179,199,219,241,263,287,311,337,363,391,419,449,479,511,543,577,611,647,683,721,759,799,839,881,923,967,1011,1057,1103,1151,1199,1249,1299,1351,1403,1457,1511,1567,1623,1681,1739,1799,1859,1921,1983,2047,2111,2177,2243,2311,2379,2449,2519,2591,2663,2737,2811,2887,2963,3041,3119,3199,3279,3361,3443,3527,3611,3697,3783,3871,3959,4049,4139,4231,4323,4417,4511,4607,4703,4801,4899,4999,5099 add $0,2 pow $0,2 sub $0,2 div $0,2
64.5
442
0.734496
[ "Apache-2.0" ]
ckrause/cm
programs/oeis/047/A047838.asm
516
Assembly