hexsha
stringlengths 40
40
| size
int64 6
1.05M
| ext
stringclasses 3
values | lang
stringclasses 1
value | max_stars_repo_path
stringlengths 4
232
| max_stars_repo_name
stringlengths 7
106
| max_stars_repo_head_hexsha
stringlengths 40
40
| max_stars_repo_licenses
listlengths 1
7
| max_stars_count
int64 1
33.5k
⌀ | max_stars_repo_stars_event_min_datetime
stringlengths 24
24
⌀ | max_stars_repo_stars_event_max_datetime
stringlengths 24
24
⌀ | max_issues_repo_path
stringlengths 4
232
| max_issues_repo_name
stringlengths 7
106
| max_issues_repo_head_hexsha
stringlengths 40
40
| max_issues_repo_licenses
listlengths 1
7
| max_issues_count
int64 1
37.5k
⌀ | max_issues_repo_issues_event_min_datetime
stringlengths 24
24
⌀ | max_issues_repo_issues_event_max_datetime
stringlengths 24
24
⌀ | max_forks_repo_path
stringlengths 4
232
| max_forks_repo_name
stringlengths 7
106
| max_forks_repo_head_hexsha
stringlengths 40
40
| max_forks_repo_licenses
listlengths 1
7
| max_forks_count
int64 1
12.6k
⌀ | max_forks_repo_forks_event_min_datetime
stringlengths 24
24
⌀ | max_forks_repo_forks_event_max_datetime
stringlengths 24
24
⌀ | content
stringlengths 6
1.05M
| avg_line_length
float64 1.16
19.7k
| max_line_length
int64 2
938k
| alphanum_fraction
float64 0
1
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d8ffbdce895f1cd3a156c0bcdf098f0cc52bc04b
| 1,617
|
asm
|
Assembly
|
Core/Hal/src/hal.asm
|
lochnessdragon/OS
|
6603cd66380a5eb15262f86be96ad239e275cac9
|
[
"MIT"
] | null | null | null |
Core/Hal/src/hal.asm
|
lochnessdragon/OS
|
6603cd66380a5eb15262f86be96ad239e275cac9
|
[
"MIT"
] | null | null | null |
Core/Hal/src/hal.asm
|
lochnessdragon/OS
|
6603cd66380a5eb15262f86be96ad239e275cac9
|
[
"MIT"
] | null | null | null |
# hal.asm
# includes hal assembly functions
bits 32
global geninterrupt ; makes geninterrupt avialable from outside this file.
global outportb ; make the label outportb visible outside this file
global inportb ; make the label inportb visible outside this file
global enable_interrupts
global disable_interrupts
; geninterrupt: calls the int function with a custom number
; stack: [ esp + 4 ] interrupt to generate
; [ esp ] return address
geninterrupt:
mov al, byte [esp+4]
mov byte [genint+1], al
jmp genint
genint:
int 0
ret
; outportb - send a byte to an I/O port
; stack: [esp + 8] the data byte
; [esp + 4] the I/O port
; [esp ] return address
outportb:
; I think argumnts are passed on stack, so let's pop it?
;pop dx
;pop al
mov dx, word [esp+4] ; move the address of the I/O port into the dx register
mov al, byte [esp+8] ; move the data to be sent into the al register
;pusha ; save registers
out dx, al ; send the data to the I/O port
;popa ; load registers
ret ; return to the calling function
; inportb - read a byte from an I/O port and returns it
; stack: [esp + 4] the I/O port
; [esp ] return address
inportb:
push dx ; save registers
mov dx, [esp + 4] ; move the address of the I/O port into the dx register.
in ax, dx ; read the byte from the I/O port
pop dx ; load registers
ret
; enable_interrupts - enables hardware interrupts
enable_interrupts:
sti
ret
; disable_interrupts - disables hardware interrupts
disable_interrupts:
cli
ret
| 27.87931
| 83
| 0.66914
|
91a61c2d2869224711d466340b3526c472644ec5
| 1,003
|
asm
|
Assembly
|
src/asm/GDT.asm
|
geenvenstersos/tinu-tom-OS
|
b73e7a77baf9ae5601a5d2e413df4981141e97e0
|
[
"MIT"
] | null | null | null |
src/asm/GDT.asm
|
geenvenstersos/tinu-tom-OS
|
b73e7a77baf9ae5601a5d2e413df4981141e97e0
|
[
"MIT"
] | null | null | null |
src/asm/GDT.asm
|
geenvenstersos/tinu-tom-OS
|
b73e7a77baf9ae5601a5d2e413df4981141e97e0
|
[
"MIT"
] | null | null | null |
[org 0x7c00]
[bits 16]
;Switch To Protected Mode
cli ; Turns Interrupts off
lgdt [GDT_DESC] ; Loads Our GDT
mov eax , cr0
or eax , 0x1
mov cr0 , eax ; Switch To Protected Mode
jmp CODE_SEG:INIT_PM ; Jumps To Our 32 bit Code
;Forces the cpu to flush out contents in cache memory
[bits 32]
INIT_PM:
mov ax , DATA_SEG
mov ds , ax
mov ss , ax
mov es , ax
mov fs , ax
mov gs , ax
mov ebp , 0x90000
mov esp , ebp ; Updates Stack Segment
jmp $ ;Hang , Remove This To Start Doing Things In 32 bit Mode
GDT_BEGIN:
GDT_NULL_DESC: ;The Mandatory Null Descriptor
dd 0x0
dd 0x0
GDT_CODE_SEG:
dw 0xffff ;Limit
dw 0x0 ;Base
db 0x0 ;Base
db 10011010b ;Flags
db 11001111b ;Flags
db 0x0 ;Base
GDT_DATA_SEG:
dw 0xffff ;Limit
dw 0x0 ;Base
db 0x0 ;Base
db 10010010b ;Flags
db 11001111b ;Flags
db 0x0 ;Base
GDT_END:
GDT_DESC:
dw GDT_END - GDT_BEGIN - 1
dd GDT_BEGIN
CODE_SEG equ GDT_CODE_SEG - GDT_BEGIN
DATA_SEG equ GDT_DATA_SEG - GDT_BEGIN
times 510-($-$$) db 0
dw 0xaa55
| 15.920635
| 62
| 0.706879
|
91cad3dd81952f1913217c4d257036d6c81c1fa3
| 88,082
|
asm
|
Assembly
|
reports/00_orig.combine.asm
|
arnaudroger/re2j-benchmark
|
ecfb2d6975948a1fbb53ccf101b285655b850058
|
[
"MIT"
] | null | null | null |
reports/00_orig.combine.asm
|
arnaudroger/re2j-benchmark
|
ecfb2d6975948a1fbb53ccf101b285655b850058
|
[
"MIT"
] | null | null | null |
reports/00_orig.combine.asm
|
arnaudroger/re2j-benchmark
|
ecfb2d6975948a1fbb53ccf101b285655b850058
|
[
"MIT"
] | null | null | null |
# JMH version: 1.19
# VM version: JDK 1.8.0_131, VM 25.131-b11
# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java
# VM options: <none>
# Warmup: 20 iterations, 1 s each
# Measurement: 20 iterations, 1 s each
# Timeout: 10 min per iteration
# Threads: 1 thread, will synchronize iterations
# Benchmark mode: Throughput, ops/time
# Benchmark: com.github.arnaudroger.re2j.Re2jFindRegex.testCombine
# Run progress: 0.00% complete, ETA 00:00:40
# Fork: 1 of 1
# Preparing profilers: LinuxPerfAsmProfiler
# Profilers consume stdout and stderr from target VM, use -v EXTRA to copy to console
# Warmup Iteration 1: 812.468 ops/s
# Warmup Iteration 2: 1514.953 ops/s
# Warmup Iteration 3: 1507.805 ops/s
# Warmup Iteration 4: 1506.338 ops/s
# Warmup Iteration 5: 1506.852 ops/s
# Warmup Iteration 6: 1507.050 ops/s
# Warmup Iteration 7: 1503.612 ops/s
# Warmup Iteration 8: 1526.924 ops/s
# Warmup Iteration 9: 1525.309 ops/s
# Warmup Iteration 10: 1527.912 ops/s
# Warmup Iteration 11: 1527.215 ops/s
# Warmup Iteration 12: 1527.639 ops/s
# Warmup Iteration 13: 1528.016 ops/s
# Warmup Iteration 14: 1527.500 ops/s
# Warmup Iteration 15: 1523.844 ops/s
# Warmup Iteration 16: 1510.890 ops/s
# Warmup Iteration 17: 1525.969 ops/s
# Warmup Iteration 18: 1526.989 ops/s
# Warmup Iteration 19: 1527.006 ops/s
# Warmup Iteration 20: 1526.847 ops/s
Iteration 1: 1526.860 ops/s
Iteration 2: 1526.561 ops/s
Iteration 3: 1527.056 ops/s
Iteration 4: 1524.494 ops/s
Iteration 5: 1528.250 ops/s
Iteration 6: 1527.415 ops/s
Iteration 7: 1528.345 ops/s
Iteration 8: 1528.389 ops/s
Iteration 9: 1528.641 ops/s
Iteration 10: 1528.225 ops/s
Iteration 11: 1528.330 ops/s
Iteration 12: 1509.192 ops/s
Iteration 13: 1511.091 ops/s
Iteration 14: 1510.356 ops/s
Iteration 15: 1510.801 ops/s
Iteration 16: 1510.551 ops/s
Iteration 17: 1510.755 ops/s
Iteration 18: 1510.350 ops/s
Iteration 19: 1510.768 ops/s
Iteration 20: 1518.251 ops/s
# Processing profiler results: LinuxPerfAsmProfiler
Result "com.github.arnaudroger.re2j.Re2jFindRegex.testCombine":
1520.234 ±(99.9%) 7.357 ops/s [Average]
(min, avg, max) = (1509.192, 1520.234, 1528.641), stdev = 8.472
CI (99.9%): [1512.877, 1527.591] (assumes normal distribution)
Secondary result "com.github.arnaudroger.re2j.Re2jFindRegex.testCombine:·asm":
PrintAssembly processed: 189916 total address lines.
Perf output processed (skipped 23.229 seconds):
Column 1: cycles (20448 events)
Column 2: instructions (20434 events)
Hottest code regions (>10.00% "cycles" events):
....[Hottest Region 1]..............................................................................
C2, level 4, com.google.re2j.Machine::add, version 490 (463 bytes)
# parm4: rdi = int
# parm5: [sp+0x70] = 'com/google/re2j/Machine$Thread' (sp of caller)
0x00007fd379217c40: mov 0x8(%rsi),%r10d ; {no_reloc}
0x00007fd379217c44: shl $0x3,%r10
0x00007fd379217c48: cmp %r10,%rax
0x00007fd379217c4b: jne 0x00007fd379045e20 ; {runtime_call}
0x00007fd379217c51: data16 xchg %ax,%ax
0x00007fd379217c54: nopl 0x0(%rax,%rax,1)
0x00007fd379217c5c: data16 data16 xchg %ax,%ax
[Verified Entry Point]
0.42% 0.46% 0x00007fd379217c60: mov %eax,-0x14000(%rsp)
0.45% 0.31% 0x00007fd379217c67: push %rbp
0.21% 0.15% 0x00007fd379217c68: sub $0x60,%rsp ;*synchronization entry
; - com.google.re2j.Machine::add@-1 (line 341)
0.26% 0.42% 0x00007fd379217c6c: mov %edi,0x28(%rsp)
0.25% 0.11% 0x00007fd379217c70: mov %r9,0x20(%rsp)
0.27% 0.16% 0x00007fd379217c75: mov %r8d,0x1c(%rsp)
0.27% 0.35% 0x00007fd379217c7a: mov %rsi,0x8(%rsp)
0.10% 0.14% 0x00007fd379217c7f: mov %ecx,0x40(%rsp)
0.36% 0.10% 0x00007fd379217c83: test %ecx,%ecx
0x00007fd379217c85: je 0x00007fd379218281 ;*ifne
; - com.google.re2j.Machine::add@1 (line 341)
0.22% 0.23% 0x00007fd379217c8b: mov %rdx,0x48(%rsp)
0.27% 0.29% 0x00007fd379217c90: mov 0x14(%rdx),%r9d ;*getfield sparse
; - com.google.re2j.Machine$Queue::contains@1 (line 48)
; - com.google.re2j.Machine::add@9 (line 344)
; implicit exception: dispatches to 0x00007fd379218485
0.11% 0.06% 0x00007fd379217c94: mov 0xc(%r12,%r9,8),%r10d ; implicit exception: dispatches to 0x00007fd379218499
0.45% 0.17% 0x00007fd379217c99: cmp %r10d,%ecx
0x00007fd379217c9c: jae 0x00007fd379218102 ;*iaload
; - com.google.re2j.Machine$Queue::contains@5 (line 48)
; - com.google.re2j.Machine::add@9 (line 344)
0.18% 0.24% 0x00007fd379217ca2: mov 0x10(%rdx),%ecx ;*getfield dense
; - com.google.re2j.Machine$Queue::contains@18 (line 52)
; - com.google.re2j.Machine::add@9 (line 344)
0.22% 0.15% 0x00007fd379217ca5: mov 0xc(%rdx),%r8d ;*getfield size
; - com.google.re2j.Machine$Queue::contains@9 (line 49)
; - com.google.re2j.Machine::add@9 (line 344)
0.10% 0.13% 0x00007fd379217ca9: lea (%r12,%r9,8),%rdi
0.26% 0.30% 0x00007fd379217cad: mov 0x40(%rsp),%r11d
0.34% 0.25% 0x00007fd379217cb2: mov 0x10(%rdi,%r11,4),%ebp ;*iaload
; - com.google.re2j.Machine$Queue::contains@5 (line 48)
; - com.google.re2j.Machine::add@9 (line 344)
0.33% 0.31% 0x00007fd379217cb7: cmp %r8d,%ebp
╭ 0x00007fd379217cba: jl 0x00007fd379217e0f ;*iastore
│ ; - com.google.re2j.Machine$Queue::add@18 (line 60)
│ ; - com.google.re2j.Machine::add@20 (line 347)
0.18% 0.21% │ ↗ 0x00007fd379217cc0: mov %r8d,%r11d
0.34% 0.06% │ │ 0x00007fd379217cc3: inc %r11d
0.22% 0.07% │ │ 0x00007fd379217cc6: mov %r11d,0xc(%rdx) ;*putfield size
│ │ ; - com.google.re2j.Machine$Queue::add@8 (line 59)
│ │ ; - com.google.re2j.Machine::add@20 (line 347)
0.21% 0.25% │ │ 0x00007fd379217cca: mov 0x40(%rsp),%ebx
0.26% 0.22% │ │ 0x00007fd379217cce: cmp %r10d,%ebx
│ │ 0x00007fd379217cd1: jae 0x00007fd379218141
0.24% 0.03% │ │ 0x00007fd379217cd7: mov %r8d,0x10(%rdi,%rbx,4) ;*iastore
│ │ ; - com.google.re2j.Machine$Queue::add@18 (line 60)
│ │ ; - com.google.re2j.Machine::add@20 (line 347)
0.32% 0.13% │ │ 0x00007fd379217cdc: mov 0xc(%r12,%rcx,8),%r10d ; implicit exception: dispatches to 0x00007fd3792184ad
0.18% 0.25% │ │ 0x00007fd379217ce1: cmp %r10d,%r8d
│ │ 0x00007fd379217ce4: jae 0x00007fd37921818d ;*aaload
│ │ ; - com.google.re2j.Machine$Queue::add@24 (line 61)
│ │ ; - com.google.re2j.Machine::add@20 (line 347)
0.12% 0.12% │ │ 0x00007fd379217cea: lea (%r12,%rcx,8),%r10 ;*getfield dense
│ │ ; - com.google.re2j.Machine$Queue::contains@18 (line 52)
│ │ ; - com.google.re2j.Machine::add@9 (line 344)
0.26% 0.06% │ │ 0x00007fd379217cee: mov %r10,0x38(%rsp)
0.22% 0.26% │ │ 0x00007fd379217cf3: lea 0x10(%r10,%r8,4),%rbp
0.19% 0.24% │ │ 0x00007fd379217cf8: mov 0x0(%rbp),%r11d ;*aaload
│ │ ; - com.google.re2j.Machine$Queue::add@24 (line 61)
│ │ ; - com.google.re2j.Machine::add@20 (line 347)
0.17% 0.10% │ │ 0x00007fd379217cfc: test %r11d,%r11d
│╭│ 0x00007fd379217cff: je 0x00007fd379217e42 ;*ifnonnull
│││ ; - com.google.re2j.Machine$Queue::add@27 (line 62)
│││ ; - com.google.re2j.Machine::add@20 (line 347)
0.24% 0.16% │││ 0x00007fd379217d05: lea (%r12,%r11,8),%rbx ;*aload_3
│││ ; - com.google.re2j.Machine$Queue::add@45 (line 65)
│││ ; - com.google.re2j.Machine::add@20 (line 347)
0.18% 0.28% │││ 0x00007fd379217d09: mov 0x40(%rsp),%r11d
0.15% 0.22% │││ 0x00007fd379217d0e: mov %r11d,0xc(%rbx) ;*putfield pc
│││ ; - com.google.re2j.Machine$Queue::add@52 (line 66)
│││ ; - com.google.re2j.Machine::add@20 (line 347)
0.21% 0.18% │││ 0x00007fd379217d12: mov 0x8(%rsp),%r10
0.32% 0.15% │││ 0x00007fd379217d17: mov 0x14(%r10),%r10d ;*getfield prog
│││ ; - com.google.re2j.Machine::add@26 (line 348)
0.28% 0.32% │││ 0x00007fd379217d1b: mov %r12d,0x10(%rbx) ;*putfield thread
│││ ; - com.google.re2j.Machine$Queue::add@47 (line 65)
│││ ; - com.google.re2j.Machine::add@20 (line 347)
0.19% 0.21% │││ 0x00007fd379217d1f: mov 0x14(%r12,%r10,8),%ebp ;*getfield inst
│││ ; - com.google.re2j.Prog::getInst@1 (line 29)
│││ ; - com.google.re2j.Machine::add@30 (line 348)
│││ ; implicit exception: dispatches to 0x00007fd3792184c1
0.21% 0.23% │││ 0x00007fd379217d24: mov 0x8(%r12,%rbp,8),%r11d ; implicit exception: dispatches to 0x00007fd3792184d5
0.62% 0.69% │││ 0x00007fd379217d29: cmp $0xf8002f22,%r11d ; {metadata('java/util/ArrayList')}
│││ 0x00007fd379217d30: jne 0x00007fd379218259
0.39% 0.32% │││ 0x00007fd379217d36: lea (%r12,%rbp,8),%r11 ;*invokeinterface get
│││ ; - com.google.re2j.Prog::getInst@5 (line 29)
│││ ; - com.google.re2j.Machine::add@30 (line 348)
0.19% 0.14% │││ 0x00007fd379217d3a: mov 0x10(%r11),%ebp ;*getfield size
│││ ; - java.util.ArrayList::rangeCheck@2 (line 652)
│││ ; - java.util.ArrayList::get@2 (line 429)
│││ ; - com.google.re2j.Prog::getInst@5 (line 29)
│││ ; - com.google.re2j.Machine::add@30 (line 348)
0.09% 0.09% │││ 0x00007fd379217d3e: mov 0x40(%rsp),%r10d
0.31% 0.18% │││ 0x00007fd379217d43: cmp %ebp,%r10d
│││ 0x00007fd379217d46: jge 0x00007fd3792182a9 ;*if_icmplt
│││ ; - java.util.ArrayList::rangeCheck@5 (line 652)
│││ ; - java.util.ArrayList::get@2 (line 429)
│││ ; - com.google.re2j.Prog::getInst@5 (line 29)
│││ ; - com.google.re2j.Machine::add@30 (line 348)
0.41% 0.37% │││ 0x00007fd379217d4c: mov 0x14(%r11),%ebp ;*getfield elementData
│││ ; - java.util.ArrayList::elementData@1 (line 418)
│││ ; - java.util.ArrayList::get@7 (line 431)
│││ ; - com.google.re2j.Prog::getInst@5 (line 29)
│││ ; - com.google.re2j.Machine::add@30 (line 348)
0.16% 0.17% │││ 0x00007fd379217d50: mov 0xc(%r12,%rbp,8),%r11d ; implicit exception: dispatches to 0x00007fd3792184e9
0.64% 0.72% │││ 0x00007fd379217d55: cmp %r11d,%r10d
│││ 0x00007fd379217d58: jae 0x00007fd3792181d1
0.56% 0.33% │││ 0x00007fd379217d5e: lea (%r12,%rbp,8),%r10
0.17% 0.12% │││ 0x00007fd379217d62: mov 0x40(%rsp),%r11d
0.16% 0.13% │││ 0x00007fd379217d67: mov 0x10(%r10,%r11,4),%ebp ;*aaload
│││ ; - java.util.ArrayList::elementData@5 (line 418)
│││ ; - java.util.ArrayList::get@7 (line 431)
│││ ; - com.google.re2j.Prog::getInst@5 (line 29)
│││ ; - com.google.re2j.Machine::add@30 (line 348)
0.03% 0.08% │││ 0x00007fd379217d6c: mov 0x8(%r12,%rbp,8),%r10d ; implicit exception: dispatches to 0x00007fd3792184fd
1.14% 0.81% │││ 0x00007fd379217d71: cmp $0xf8019844,%r10d ; {metadata('com/google/re2j/Inst')}
│││ 0x00007fd379217d78: jne 0x00007fd379218448
0.37% 0.39% │││ 0x00007fd379217d7e: lea (%r12,%rbp,8),%r10 ;*checkcast
│││ ; - com.google.re2j.Prog::getInst@10 (line 29)
│││ ; - com.google.re2j.Machine::add@30 (line 348)
0.12% 0.09% │││ 0x00007fd379217d82: mov %r10,0x38(%rsp)
0.03% 0.05% │││ 0x00007fd379217d87: mov 0x14(%r10),%r11d ;*getfield op
│││ ; - com.google.re2j.Inst::op@4 (line 44)
│││ ; - com.google.re2j.Machine::add@40 (line 349)
0.40% 0.12% │││ 0x00007fd379217d8b: mov 0xc(%r12,%r11,8),%ebp ;*getfield ordinal
│││ ; - java.lang.Enum::ordinal@1 (line 103)
│││ ; - com.google.re2j.Inst::op@7 (line 44)
│││ ; - com.google.re2j.Machine::add@40 (line 349)
│││ ; implicit exception: dispatches to 0x00007fd37921852d
1.61% 1.49% │││ 0x00007fd379217d90: cmp $0xb,%ebp
│││ 0x00007fd379217d93: jae 0x00007fd3792181f9 ;*iaload
│││ ; - com.google.re2j.Inst::op@10 (line 44)
│││ ; - com.google.re2j.Machine::add@40 (line 349)
0.43% 0.37% │││ 0x00007fd379217d99: mov %r11,%r10
0.02% 0.01% │││ 0x00007fd379217d9c: shl $0x3,%r10
0.26% 0.29% │││ 0x00007fd379217da0: movabs $0x76dd36790,%r11 ; {oop([I)}
0.16% 0.16% │││ 0x00007fd379217daa: mov 0x10(%r11,%rbp,4),%r11d
1.77% 1.68% │││ 0x00007fd379217daf: dec %r11d
0.53% 0.54% │││ 0x00007fd379217db2: movabs $0x76dd29e18,%r8 ; {oop(a 'com/google/re2j/Inst$Op')}
0.17% 0.27% │││ 0x00007fd379217dbc: cmp $0x3,%r11d
0.61% 0.60% │││ 0x00007fd379217dc0: cmovb %r8,%r10 ;*invokevirtual ordinal
│││ ; - com.google.re2j.Machine::add@43 (line 349)
1.14% 1.27% │││ 0x00007fd379217dc4: mov 0xc(%r10),%ebp ;*getfield ordinal
│││ ; - java.lang.Enum::ordinal@1 (line 103)
│││ ; - com.google.re2j.Machine::add@43 (line 349)
3.57% 3.82% │││ 0x00007fd379217dc8: cmp $0xb,%ebp
│││ 0x00007fd379217dcb: jae 0x00007fd379218221
0.80% 0.69% │││ 0x00007fd379217dd1: movabs $0x76dd58ca0,%r10 ; {oop([I)}
│││ 0x00007fd379217ddb: mov 0x10(%r10,%rbp,4),%r10d ;*iaload
│││ ; - com.google.re2j.Machine::add@46 (line 349)
3.09% 3.34% │││ 0x00007fd379217de0: mov %r10d,%r8d
0.04% 0.05% │││ 0x00007fd379217de3: dec %r8d
0.82% 0.65% │││ 0x00007fd379217de6: cmp $0xb,%r8d
│││ 0x00007fd379217dea: jae 0x00007fd379218249 ;*tableswitch
│││ ; - com.google.re2j.Machine::add@47 (line 349)
0.99% 0.57% │││ 0x00007fd379217df0: mov 0x38(%rsp),%r11
│││ 0x00007fd379217df5: mov 0xc(%r11),%ecx ;*getfield out
│││ ; - com.google.re2j.Machine::add@279 (line 379)
0.03% 0.06% │││ 0x00007fd379217df9: mov 0x10(%r11),%r9d ;*getfield arg
│││ ; - com.google.re2j.Machine::add@217 (line 373)
0.00% │││ 0x00007fd379217dfd: movslq %r10d,%r10
0.84% 0.57% │││ 0x00007fd379217e00: movabs $0x7fd379217be0,%r11 ; {section_word}
│││ 0x00007fd379217e0a: jmpq *-0x8(%r11,%r10,8) ;*tableswitch
│││ ; - com.google.re2j.Machine::add@47 (line 349)
0.03% 0.03% ↘││ 0x00007fd379217e0f: mov 0xc(%r12,%rcx,8),%r11d ; implicit exception: dispatches to 0x00007fd3792185b5
0.03% 0.01% ││ 0x00007fd379217e14: cmp %r11d,%ebp
││ 0x00007fd379217e17: jae 0x00007fd3792183c5
0.01% 0.01% ││ 0x00007fd379217e1d: lea (%r12,%rcx,8),%r11
0.01% 0.06% ││ 0x00007fd379217e21: mov 0x10(%r11,%rbp,4),%ebp ;*aaload
││ ; - com.google.re2j.Machine$Queue::contains@22 (line 52)
││ ; - com.google.re2j.Machine::add@9 (line 344)
0.03% 0.01% ││ 0x00007fd379217e26: mov 0xc(%r12,%rbp,8),%r11d ; implicit exception: dispatches to 0x00007fd3792185c5
0.06% 0.08% ││ 0x00007fd379217e2b: mov 0x40(%rsp),%ebx
0.01% 0.01% ││ 0x00007fd379217e2f: cmp %ebx,%r11d
│╰ 0x00007fd379217e32: jne 0x00007fd379217cc0
│ 0x00007fd379217e38: mov 0x70(%rsp),%rax
│ 0x00007fd379217e3d: jmpq 0x00007fd3792180b3
↘ 0x00007fd379217e42: mov 0x60(%r15),%rbx
0x00007fd379217e46: mov %rbx,%r10
0x00007fd379217e49: add $0x18,%r10
0x00007fd379217e4d: cmp 0x70(%r15),%r10
0x00007fd379217e51: jae 0x00007fd379218415
0x00007fd379217e57: mov %r10,0x60(%r15)
0x00007fd379217e5b: prefetchnta 0xc0(%r10)
....................................................................................................
32.58% 29.55% <total for region 1>
....[Hottest Region 2]..............................................................................
C2, level 4, com.google.re2j.Machine::step, version 500 (624 bytes)
0x00007fd37921bca6: jge 0x00007fd37921bcb0
0x00007fd37921bca8: mov %r14d,%ecx
0x00007fd37921bcab: jmpq 0x00007fd37921c008 ;*if_icmpge
; - com.google.re2j.Machine::step@250 (line 293)
0x00007fd37921bcb0: mov 0x8(%rsp),%r11
0x00007fd37921bcb5: mov %r12d,0xc(%r11) ;*putfield size
; - com.google.re2j.Machine::step@293 (line 300)
0x00007fd37921bcb9: mov 0x28(%rsp),%r11
0x00007fd37921bcbe: movb $0x1,0xc(%r11) ;*putfield matched
; - com.google.re2j.Machine::step@298 (line 302)
0.00% 0x00007fd37921bcc3: mov 0x20(%rsp),%ecx ;*goto
; - com.google.re2j.Machine::step@313 (line 307)
0.01% 0.03% ↗ 0x00007fd37921bcc7: mov %r9,0x50(%rsp) ;*aload
│ ; - com.google.re2j.Machine::step@399 (line 327)
0.16% 0.11% │ 0x00007fd37921bccc: mov 0x28(%rsp),%r11
0.05% 0.08% │ 0x00007fd37921bcd1: mov 0x20(%r11),%ebp ;*getfield pool
│ ; - com.google.re2j.Machine::step@405 (line 329)
0.21% 0.26% │ 0x00007fd37921bcd5: mov 0x8(%r12,%rbp,8),%r11d ; implicit exception: dispatches to 0x00007fd37921cfd5
0.01% 0.01% │ 0x00007fd37921bcda: cmp $0xf8002f22,%r11d ; {metadata('java/util/ArrayList')}
│ 0x00007fd37921bce1: jne 0x00007fd37921c721
0.10% 0.12% │ 0x00007fd37921bce7: lea (%r12,%rbp,8),%r11 ;*invokeinterface add
│ ; - com.google.re2j.Machine::step@410 (line 329)
0.06% 0.08% │ 0x00007fd37921bceb: mov 0x14(%r11),%edi ;*getfield elementData
│ ; - java.util.ArrayList::ensureCapacityInternal@1 (line 223)
│ ; - java.util.ArrayList::add@7 (line 458)
│ ; - com.google.re2j.Machine::step@410 (line 329)
0.23% 0.25% │ 0x00007fd37921bcef: mov 0x10(%r11),%ebp ;*getfield size
│ ; - java.util.ArrayList::add@16 (line 459)
│ ; - com.google.re2j.Machine::step@410 (line 329)
0.02% 0.02% │ 0x00007fd37921bcf3: mov %ebp,%ebx
0.08% 0.13% │ 0x00007fd37921bcf5: inc %ebx ;*iadd
│ ; - java.util.ArrayList::add@21 (line 459)
│ ; - com.google.re2j.Machine::step@410 (line 329)
0.07% 0.06% │ 0x00007fd37921bcf7: cmp $0xed9f0db7,%edi ; {oop(a 'java/lang/Object'[0] )}
│ 0x00007fd37921bcfd: je 0x00007fd37921c485 ;*if_acmpne
│ ; - java.util.ArrayList::ensureCapacityInternal@7 (line 223)
│ ; - java.util.ArrayList::add@7 (line 458)
│ ; - com.google.re2j.Machine::step@410 (line 329)
0.22% 0.19% │ 0x00007fd37921bd03: mov %ebx,%esi ;*aload_0
│ ; - java.util.ArrayList::ensureCapacityInternal@17 (line 227)
│ ; - java.util.ArrayList::add@7 (line 458)
│ ; - com.google.re2j.Machine::step@410 (line 329)
0.03% 0.02% │ 0x00007fd37921bd05: mov 0xc(%r11),%r9d ;*getfield modCount
│ ; - java.util.ArrayList::ensureExplicitCapacity@2 (line 231)
│ ; - java.util.ArrayList::ensureCapacityInternal@19 (line 227)
│ ; - java.util.ArrayList::add@7 (line 458)
│ ; - com.google.re2j.Machine::step@410 (line 329)
0.08% 0.09% │ 0x00007fd37921bd09: inc %r9d
0.10% 0.05% │ 0x00007fd37921bd0c: mov %r9d,0xc(%r11) ;*putfield modCount
│ ; - java.util.ArrayList::ensureExplicitCapacity@7 (line 231)
│ ; - java.util.ArrayList::ensureCapacityInternal@19 (line 227)
│ ; - java.util.ArrayList::add@7 (line 458)
│ ; - com.google.re2j.Machine::step@410 (line 329)
0.23% 0.19% │ 0x00007fd37921bd10: mov 0xc(%r12,%rdi,8),%r8d ;*arraylength
│ ; - java.util.ArrayList::ensureExplicitCapacity@15 (line 234)
│ ; - java.util.ArrayList::ensureCapacityInternal@19 (line 227)
│ ; - java.util.ArrayList::add@7 (line 458)
│ ; - com.google.re2j.Machine::step@410 (line 329)
│ ; implicit exception: dispatches to 0x00007fd37921cfe5
0.02% 0.02% │ 0x00007fd37921bd15: mov %esi,%edx
0.06% 0.08% │ 0x00007fd37921bd17: sub %r8d,%edx
0.10% 0.02% │ 0x00007fd37921bd1a: test %edx,%edx
│ 0x00007fd37921bd1c: jg 0x00007fd37921c1e0 ;*ifle
│ ; - java.util.ArrayList::ensureExplicitCapacity@17 (line 234)
│ ; - java.util.ArrayList::ensureCapacityInternal@19 (line 227)
│ ; - java.util.ArrayList::add@7 (line 458)
│ ; - com.google.re2j.Machine::step@410 (line 329)
0.22% 0.23% │ 0x00007fd37921bd22: mov %ebx,0x10(%r11) ;*putfield size
│ ; - java.util.ArrayList::add@22 (line 459)
│ ; - com.google.re2j.Machine::step@410 (line 329)
0.03% 0.00% │ 0x00007fd37921bd26: mov %rdi,%r11
0.10% 0.07% │ 0x00007fd37921bd29: shl $0x3,%r11 ;*return
│ ; - java.util.ArrayList::ensureExplicitCapacity@25 (line 236)
│ ; - java.util.ArrayList::ensureCapacityInternal@19 (line 227)
│ ; - java.util.ArrayList::add@7 (line 458)
│ ; - com.google.re2j.Machine::step@410 (line 329)
0.05% 0.01% │ 0x00007fd37921bd2d: mov 0xc(%r11),%r9d
0.17% 0.13% │ 0x00007fd37921bd31: cmp %r9d,%ebp
│ 0x00007fd37921bd34: jae 0x00007fd37921c6dd
0.02% 0.01% │ 0x00007fd37921bd3a: mov 0x8(%r11),%r9d
0.11% 0.06% │ 0x00007fd37921bd3e: cmp $0xf80022f5,%r9d ; {metadata('java/lang/Object'[])}
│ 0x00007fd37921bd45: jne 0x00007fd37921c75d
0.08% 0.01% │ 0x00007fd37921bd4b: lea 0x10(%r11,%rbp,4),%r10
0.28% 0.16% │ 0x00007fd37921bd50: mov 0x50(%rsp),%r11
0.04% 0.00% │ 0x00007fd37921bd55: mov %r11,%r8
0.13% 0.04% │ 0x00007fd37921bd58: shr $0x3,%r8
0.09% 0.04% │ 0x00007fd37921bd5c: mov %r8d,(%r10)
0.20% 0.12% │ 0x00007fd37921bd5f: shr $0x9,%r10
0.05% 0.02% │ 0x00007fd37921bd63: movabs $0x7fd374dee000,%r11
0.10% 0.02% │ 0x00007fd37921bd6d: mov %r12b,(%r11,%r10,1) ;*aastore
│ ; - java.util.ArrayList::add@26 (line 459)
│ ; - com.google.re2j.Machine::step@410 (line 329)
0.08% 0.06% │ 0x00007fd37921bd71: xor %r11d,%r11d ; OopMap{[8]=Oop [24]=Oop [40]=Oop off=820}
│ ;*goto
│ ; - com.google.re2j.Machine::step@419 (line 264)
0.30% 0.23% ↗│ 0x00007fd37921bd74: test %eax,0x164e4286(%rip) # 0x00007fd38f700000
││ ;*goto
││ ; - com.google.re2j.Machine::step@419 (line 264)
││ ; {poll}
0.20% 0.16% ││ 0x00007fd37921bd7a: mov 0x8(%rsp),%r10
0.13% 0.09% ││ 0x00007fd37921bd7f: mov 0xc(%r10),%r11d
0.17% 0.18% ││ 0x00007fd37921bd83: cmp %r11d,%r14d
╭ ││ 0x00007fd37921bd86: jge 0x00007fd37921be53
0.24% 0.10% │ ││ 0x00007fd37921bd8c: mov %ecx,0x20(%rsp)
0.15% 0.19% │ ││ 0x00007fd37921bd90: mov %r14d,%r10d ;*aload_1
│ ││ ; - com.google.re2j.Machine::step@21 (line 265)
0.18% 0.09% │ ││ 0x00007fd37921bd93: mov 0x8(%rsp),%r11
0.10% 0.16% │ ││ 0x00007fd37921bd98: mov 0x10(%r11),%r8d ;*getfield dense
│ ││ ; - com.google.re2j.Machine::step@22 (line 265)
0.34% 0.30% │ ││ 0x00007fd37921bd9c: mov 0xc(%r12,%r8,8),%r11d ; implicit exception: dispatches to 0x00007fd37921cf91
0.39% 0.31% │ ││ 0x00007fd37921bda1: cmp %r11d,%r10d
│ ││ 0x00007fd37921bda4: jae 0x00007fd37921c5b9
0.22% 0.29% │ ││ 0x00007fd37921bdaa: lea (%r12,%r8,8),%r11
0.15% 0.16% │ ││ 0x00007fd37921bdae: mov 0x10(%r11,%r10,4),%r8d ;*aaload
│ ││ ; - com.google.re2j.Machine::step@27 (line 265)
0.26% 0.45% │ ││ 0x00007fd37921bdb3: mov 0x10(%r12,%r8,8),%r11d ;*getfield thread
│ ││ ; - com.google.re2j.Machine::step@40 (line 269)
│ ││ ; implicit exception: dispatches to 0x00007fd37921d005
0.37% 0.46% │ ││ 0x00007fd37921bdb8: mov %r10d,%r14d
0.11% 0.26% │ ││ 0x00007fd37921bdbb: inc %r14d ;*iadd
│ ││ ; - com.google.re2j.Machine::step@241 (line 293)
0.18% 0.18% │ ││ 0x00007fd37921bdbe: test %r11d,%r11d
│╭││ 0x00007fd37921bdc1: jne 0x00007fd37921bdce ;*ifnonnull
││││ ; - com.google.re2j.Machine::step@47 (line 270)
0.18% 0.16% ││││ 0x00007fd37921bdc3: mov 0x24(%rsp),%r11d
0.04% 0.09% ││││ 0x00007fd37921bdc8: mov 0x20(%rsp),%ecx
0.06% 0.05% ││╰│ 0x00007fd37921bdcc: jmp 0x00007fd37921bd74
0.18% 0.23% │↘ │ 0x00007fd37921bdce: mov 0x24(%rsp),%r9d
0.14% 0.15% │ │ 0x00007fd37921bdd3: test %r9d,%r9d
│ │ 0x00007fd37921bdd6: jne 0x00007fd37921c8c9 ;*ifeq
│ │ ; - com.google.re2j.Machine::step@55 (line 273)
0.11% 0.16% │ │ 0x00007fd37921bddc: mov 0x10(%r12,%r11,8),%r8d ;*getfield inst
│ │ ; - com.google.re2j.Machine::step@107 (line 278)
0.60% 0.79% │ │ 0x00007fd37921bde1: mov 0x14(%r12,%r8,8),%r9d ;*getfield op
│ │ ; - com.google.re2j.Machine::step@120 (line 280)
│ │ ; implicit exception: dispatches to 0x00007fd37921cfb5
1.48% 2.15% │ │ 0x00007fd37921bde6: mov 0xc(%r12,%r9,8),%ebp ;*getfield ordinal
│ │ ; - java.lang.Enum::ordinal@1 (line 103)
│ │ ; - com.google.re2j.Machine::step@123 (line 280)
│ │ ; implicit exception: dispatches to 0x00007fd37921cfc5
1.98% 2.51% │ │ 0x00007fd37921bdeb: cmp $0xb,%ebp
│ │ 0x00007fd37921bdee: jae 0x00007fd37921c699
0.40% 0.51% │ │ 0x00007fd37921bdf4: movabs $0x76dd58ca0,%r9 ; {oop([I)}
0.00% 0.01% │ │ 0x00007fd37921bdfe: mov 0x10(%r9,%rbp,4),%ecx ;*iaload
│ │ ; - com.google.re2j.Machine::step@126 (line 280)
2.05% 2.52% │ │ 0x00007fd37921be03: mov 0x18(%r12,%r8,8),%edi ;*getfield runes
│ │ ; - com.google.re2j.Machine::step@320 (line 310)
0.02% │ │ 0x00007fd37921be08: mov 0xc(%r12,%r11,8),%edx ;*getfield cap
│ │ ; - com.google.re2j.Machine::step@176 (line 287)
│ │ 0x00007fd37921be0d: lea (%r12,%r11,8),%r9 ;*getfield thread
│ │ ; - com.google.re2j.Machine::step@40 (line 269)
0.02% │ │ 0x00007fd37921be11: cmp $0x3,%ecx
│ │ 0x00007fd37921be14: jne 0x00007fd37921bab0 ;*tableswitch
│ │ ; - com.google.re2j.Machine::step@127 (line 280)
0.11% 0.12% │ │ 0x00007fd37921be1a: mov 0xc(%r12,%rdi,8),%ecx ; implicit exception: dispatches to 0x00007fd37921d09d
│ │ 0x00007fd37921be1f: test %ecx,%ecx
│ │ 0x00007fd37921be21: jbe 0x00007fd37921c87d ;*iaload
│ │ ; - com.google.re2j.Machine::step@324 (line 310)
│ │ 0x00007fd37921be27: mov 0x10(%r12,%rdi,8),%r11d
│ │ 0x00007fd37921be2c: mov 0x20(%rsp),%ecx
0.06% 0.13% │ │ 0x00007fd37921be30: cmp %r11d,%ecx
│ ╰ 0x00007fd37921be33: jne 0x00007fd37921bcc7 ;*if_icmpne
│ ; - com.google.re2j.Machine::step@325 (line 310)
0.00% 0.00% │ 0x00007fd37921be39: mov %r10d,0x94(%rsp)
│ 0x00007fd37921be41: mov %r14d,0x9c(%rsp)
│ 0x00007fd37921be49: mov %edx,%eax
│ 0x00007fd37921be4b: mov %r9,%r13
│ 0x00007fd37921be4e: jmpq 0x00007fd37921bb00 ;*if_icmpge
│ ; - com.google.re2j.Machine::step@18 (line 264)
0.05% 0.05% ↘ 0x00007fd37921be53: mov 0x8(%rsp),%r10
0.00% 0x00007fd37921be58: mov %r12d,0xc(%r10) ;*getfield size
; - com.google.re2j.Machine::step@15 (line 264)
0.00% 0.00% 0x00007fd37921be5c: add $0x80,%rsp
0.03% 0.06% 0x00007fd37921be63: pop %rbp
0.04% 0.03% 0x00007fd37921be64: test %eax,0x164e4196(%rip) # 0x00007fd38f700000
; {poll_return}
0.02% 0.01% 0x00007fd37921be6a: retq
0x00007fd37921be6b: nopl 0x0(%rax,%rax,1)
0.49% 0.50% ↗ 0x00007fd37921be70: mov %r8d,%r14d
0.40% 0.42% │ 0x00007fd37921be73: vmovd %ebx,%xmm1
0.38% 0.39% │ 0x00007fd37921be77: mov %ebx,%r8d
0.52% 0.50% │ 0x00007fd37921be7a: sub %r14d,%r8d ;*isub
│ ; - com.google.re2j.Unicode::simpleFold@15 (line 208)
│ ; - com.google.re2j.Inst::matchRune@33 (line 65)
│ ; - com.google.re2j.Machine::step@308 (line 306)
0.48% 0.32% │ 0x00007fd37921be7d: mov %r8d,%r10d
0.32% 0.27% │ 0x00007fd37921be80: sar $0x1f,%r10d
0.43% 0.45% │ 0x00007fd37921be84: shr $0x1f,%r10d
0.50% 0.43% │ 0x00007fd37921be88: add %r8d,%r10d
0.41% 0.51% │ 0x00007fd37921be8b: sar %r10d
0.32% 0.55% │ 0x00007fd37921be8e: mov %r14d,%ebx
0.33% 0.42% │ 0x00007fd37921be91: add %r10d,%ebx ;*idiv
│ ; - com.google.re2j.Unicode::simpleFold@17 (line 208)
│ ; - com.google.re2j.Inst::matchRune@33 (line 65)
│ ; - com.google.re2j.Machine::step@308 (line 306)
0.53% 0.46% │ 0x00007fd37921be94: cmp $0x3f,%ebx
│ 0x00007fd37921be97: jae 0x00007fd37921c7a1
0.51% 0.58% │ 0x00007fd37921be9d: movslq %r14d,%r11
0.43% 0.64% │ 0x00007fd37921bea0: movslq %r10d,%r10
0.46% 0.48% │ 0x00007fd37921bea3: add %r10,%r11
0.61% 0.52% │ 0x00007fd37921bea6: mov 0x10(%r9,%r11,4),%ebp ;*aaload
│ ; - com.google.re2j.Unicode::simpleFold@24 (line 209)
│ ; - com.google.re2j.Inst::matchRune@33 (line 65)
│ ; - com.google.re2j.Machine::step@308 (line 306)
0.47% 0.47% │ 0x00007fd37921beab: mov 0xc(%r12,%rbp,8),%r10d ; implicit exception: dispatches to 0x00007fd37921cff5
0.34% 0.46% │ 0x00007fd37921beb0: test %r10d,%r10d
│ 0x00007fd37921beb3: jbe 0x00007fd37921c7f1 ;*iaload
│ ; - com.google.re2j.Unicode::simpleFold@26 (line 209)
│ ; - com.google.re2j.Inst::matchRune@33 (line 65)
│ ; - com.google.re2j.Machine::step@308 (line 306)
0.54% 0.60% │ 0x00007fd37921beb9: mov 0x10(%r12,%rbp,8),%r10d
0.59% 0.64% │ 0x00007fd37921bebe: cmp 0x20(%rsp),%r10d
│ 0x00007fd37921bec3: jl 0x00007fd37921bf78 ;*if_icmpge
│ ; - com.google.re2j.Unicode::simpleFold@28 (line 209)
│ ; - com.google.re2j.Inst::matchRune@33 (line 65)
│ ; - com.google.re2j.Machine::step@308 (line 306)
0.39% 0.53% │ 0x00007fd37921bec9: mov %r14d,%r8d ; OopMap{r9=Oop rdi=NarrowOop rdx=NarrowOop rax=NarrowOop r13=Oop xmm0=Oop [8]=Oop [24]=Oop [40]=Oop off=1164}
│ ;*goto
│ ; - com.google.re2j.Unicode::simpleFold@40 (line 214)
│ ; - com.google.re2j.Inst::matchRune@33 (line 65)
│ ; - com.google.re2j.Machine::step@308 (line 306)
0.37% 0.68% │ 0x00007fd37921becc: test %eax,0x164e412e(%rip) # 0x00007fd38f700000
│ ;*goto
│ ; - com.google.re2j.Unicode::simpleFold@40 (line 214)
│ ; - com.google.re2j.Inst::matchRune@33 (line 65)
│ ; - com.google.re2j.Machine::step@308 (line 306)
│ ; {poll}
0.44% 0.74% │ 0x00007fd37921bed2: cmp %ebx,%r8d
╰ 0x00007fd37921bed5: jl 0x00007fd37921be70 ;*if_icmpge
; - com.google.re2j.Unicode::simpleFold@9 (line 207)
; - com.google.re2j.Inst::matchRune@33 (line 65)
; - com.google.re2j.Machine::step@308 (line 306)
0.11% 0.13% 0x00007fd37921bed7: cmp $0x3f,%r8d
0x00007fd37921bedb: jge 0x00007fd37921cd09 ;*if_icmpge
; - com.google.re2j.Unicode::simpleFold@48 (line 215)
; - com.google.re2j.Inst::matchRune@33 (line 65)
; - com.google.re2j.Machine::step@308 (line 306)
0.10% 0.15% 0x00007fd37921bee1: cmp $0x3f,%r8d
0x00007fd37921bee5: jae 0x00007fd37921c9c1
0.06% 0.05% 0x00007fd37921beeb: mov 0x10(%r9,%r8,4),%ebp ;*aaload
; - com.google.re2j.Unicode::simpleFold@55 (line 215)
; - com.google.re2j.Inst::matchRune@33 (line 65)
; - com.google.re2j.Machine::step@308 (line 306)
0.06% 0.05% 0x00007fd37921bef0: mov 0xc(%r12,%rbp,8),%r10d ; implicit exception: dispatches to 0x00007fd37921d0ed
0.10% 0.12% 0x00007fd37921bef5: test %r10d,%r10d
0x00007fd37921bef8: jbe 0x00007fd37921ca55
0.10% 0.17% 0x00007fd37921befe: mov 0x10(%r12,%rbp,8),%ebp ;*iaload
; - com.google.re2j.Unicode::simpleFold@57 (line 215)
; - com.google.re2j.Inst::matchRune@33 (line 65)
; - com.google.re2j.Machine::step@308 (line 306)
0.04% 0.05% 0x00007fd37921bf03: cmp 0x20(%rsp),%ebp
0x00007fd37921bf07: je 0x00007fd37921cd51 ;*if_icmpne
; - com.google.re2j.Unicode::simpleFold@59 (line 215)
; - com.google.re2j.Inst::matchRune@33 (line 65)
; - com.google.re2j.Machine::step@308 (line 306)
0.05% 0.07% 0x00007fd37921bf0d: mov 0x20(%rsp),%r11d
0.11% 0.11% 0x00007fd37921bf12: cmp $0x7f,%r11d
0x00007fd37921bf16: jg 0x00007fd37921cd89 ;*if_icmpgt
; - com.google.re2j.Unicode::toLower@3 (line 177)
; - com.google.re2j.Unicode::simpleFold@71 (line 223)
; - com.google.re2j.Inst::matchRune@33 (line 65)
; - com.google.re2j.Machine::step@308 (line 306)
0.10% 0.13% 0x00007fd37921bf1c: cmp $0x41,%r11d
0x00007fd37921bf20: jl 0x00007fd37921cc05 ;*if_icmpgt
; - com.google.re2j.Unicode::toLower@9 (line 178)
; - com.google.re2j.Unicode::simpleFold@71 (line 223)
; - com.google.re2j.Inst::matchRune@33 (line 65)
; - com.google.re2j.Machine::step@308 (line 306)
0.07% 0.09% 0x00007fd37921bf26: cmp $0x5a,%r11d
╭ 0x00007fd37921bf2a: jg 0x00007fd37921bf3c ;*if_icmpgt
│ ; - com.google.re2j.Unicode::toLower@15 (line 178)
│ ; - com.google.re2j.Unicode::simpleFold@71 (line 223)
│ ; - com.google.re2j.Inst::matchRune@33 (line 65)
│ ; - com.google.re2j.Machine::step@308 (line 306)
0.05% 0.07% │ 0x00007fd37921bf2c: mov %r11d,%r10d
0.15% 0.23% │ 0x00007fd37921bf2f: add $0x20,%r10d ;*iinc
│ ; - com.google.re2j.Unicode::toLower@18 (line 179)
│ ; - com.google.re2j.Unicode::simpleFold@71 (line 223)
│ ; - com.google.re2j.Inst::matchRune@33 (line 65)
│ ; - com.google.re2j.Machine::step@308 (line 306)
0.15% 0.17% │ 0x00007fd37921bf33: cmp %r11d,%r10d
│ 0x00007fd37921bf36: jne 0x00007fd37921c188 ;*if_icmpeq
│ ; - com.google.re2j.Unicode::simpleFold@77 (line 224)
│ ; - com.google.re2j.Inst::matchRune@33 (line 65)
│ ; - com.google.re2j.Machine::step@308 (line 306)
↘ 0x00007fd37921bf3c: cmp $0x61,%r11d
0x00007fd37921bf40: jl 0x00007fd37921ce6d ;*if_icmpgt
....................................................................................................
26.16% 29.34% <total for region 2>
....[Hottest Region 3]..............................................................................
C2, level 4, com.google.re2j.Machine::step, version 500 (330 bytes)
0x00007fd37921c07a: mov %r8d,0x24(%rsp)
0x00007fd37921c07f: mov %ecx,0x30(%rsp)
0x00007fd37921c083: mov %edi,0x34(%rsp)
0x00007fd37921c087: callq 0x00007fd3790051a0 ; OopMap{rbp=NarrowOop [8]=Oop [24]=Oop [32]=NarrowOop [36]=NarrowOop [40]=Oop [52]=NarrowOop off=1612}
;*invokeinterface add
; - com.google.re2j.Machine::step@279 (line 297)
; {runtime_call}
0x00007fd37921c08c: callq 0x00007fd38e3edc50 ;*invokeinterface add
; - com.google.re2j.Machine::step@279 (line 297)
; {runtime_call}
0.47% 0.79% ↗ 0x00007fd37921c091: mov %r8d,%r11d
0.34% 0.60% │ 0x00007fd37921c094: sub 0x20(%rsp),%r11d ;*isub
│ ; - com.google.re2j.Unicode::simpleFold@15 (line 208)
│ ; - com.google.re2j.Inst::matchRune@50 (line 67)
│ ; - com.google.re2j.Machine::step@308 (line 306)
0.34% 0.53% │ 0x00007fd37921c099: mov %r11d,%esi
0.32% 0.73% │ 0x00007fd37921c09c: sar $0x1f,%esi
0.48% 0.55% │ 0x00007fd37921c09f: shr $0x1f,%esi
0.35% 0.51% │ 0x00007fd37921c0a2: add %r11d,%esi
0.37% 0.53% │ 0x00007fd37921c0a5: sar %esi ;*idiv
│ ; - com.google.re2j.Unicode::simpleFold@17 (line 208)
│ ; - com.google.re2j.Inst::matchRune@50 (line 67)
│ ; - com.google.re2j.Machine::step@308 (line 306)
0.42% 0.69% │ 0x00007fd37921c0a7: add %esi,%r10d ;*iadd
│ ; - com.google.re2j.Unicode::simpleFold@18 (line 208)
│ ; - com.google.re2j.Inst::matchRune@50 (line 67)
│ ; - com.google.re2j.Machine::step@308 (line 306)
0.57% 0.69% │ 0x00007fd37921c0aa: vmovd %r8d,%xmm2
0.28% 0.45% │ 0x00007fd37921c0af: mov %r10d,%r8d ;*idiv
│ ; - com.google.re2j.Unicode::simpleFold@17 (line 208)
│ ; - com.google.re2j.Inst::matchRune@50 (line 67)
│ ; - com.google.re2j.Machine::step@308 (line 306)
0.43% 0.63% │ ↗ 0x00007fd37921c0b2: cmp $0x3f,%r8d
│ │ 0x00007fd37921c0b6: jae 0x00007fd37921c5f9
0.51% 0.76% │ │ 0x00007fd37921c0bc: movslq 0x20(%rsp),%r10
0.60% 0.91% │ │ 0x00007fd37921c0c1: movslq %esi,%r11
0.35% 0.49% │ │ 0x00007fd37921c0c4: add %r11,%r10
0.45% 0.70% │ │ 0x00007fd37921c0c7: mov 0x10(%r9,%r10,4),%ebp ;*aaload
│ │ ; - com.google.re2j.Unicode::simpleFold@24 (line 209)
│ │ ; - com.google.re2j.Inst::matchRune@50 (line 67)
│ │ ; - com.google.re2j.Machine::step@308 (line 306)
0.69% 1.10% │ │ 0x00007fd37921c0cc: mov 0xc(%r12,%rbp,8),%r10d ; implicit exception: dispatches to 0x00007fd37921cfa5
1.95% 2.59% │ │ 0x00007fd37921c0d1: test %r10d,%r10d
│ │ 0x00007fd37921c0d4: jbe 0x00007fd37921c651 ;*iaload
│ │ ; - com.google.re2j.Unicode::simpleFold@26 (line 209)
│ │ ; - com.google.re2j.Inst::matchRune@50 (line 67)
│ │ ; - com.google.re2j.Machine::step@308 (line 306)
0.97% 1.30% │ │ 0x00007fd37921c0da: mov 0x10(%r12,%rbp,8),%r11d
0.35% 0.53% │ │ 0x00007fd37921c0df: cmp %r14d,%r11d
╭│ │ 0x00007fd37921c0e2: jl 0x00007fd37921c1ba ; OopMap{r9=Oop rdi=NarrowOop rdx=NarrowOop rax=NarrowOop r13=Oop xmm0=Oop [8]=Oop [24]=Oop [40]=Oop off=1704}
││ │ ;*goto
││ │ ; - com.google.re2j.Unicode::simpleFold@40 (line 214)
││ │ ; - com.google.re2j.Inst::matchRune@50 (line 67)
││ │ ; - com.google.re2j.Machine::step@308 (line 306)
0.62% 0.98% ││ │↗ 0x00007fd37921c0e8: test %eax,0x164e3f12(%rip) # 0x00007fd38f700000
││ ││ ;*goto
││ ││ ; - com.google.re2j.Unicode::simpleFold@40 (line 214)
││ ││ ; - com.google.re2j.Inst::matchRune@50 (line 67)
││ ││ ; - com.google.re2j.Machine::step@308 (line 306)
││ ││ ; {poll}
0.28% 0.43% ││ ││ 0x00007fd37921c0ee: mov 0x20(%rsp),%r10d
0.60% 0.86% ││ ││ 0x00007fd37921c0f3: cmp %r8d,%r10d
│╰ ││ 0x00007fd37921c0f6: jl 0x00007fd37921c091 ;*if_icmpge
│ ││ ; - com.google.re2j.Unicode::simpleFold@9 (line 207)
│ ││ ; - com.google.re2j.Inst::matchRune@50 (line 67)
│ ││ ; - com.google.re2j.Machine::step@308 (line 306)
│ ││ 0x00007fd37921c0f8: mov 0x20(%rsp),%r8d
0.17% 0.18% │ ││ 0x00007fd37921c0fd: cmp $0x3f,%r10d
│ ││ 0x00007fd37921c101: jge 0x00007fd37921cadd ;*if_icmpge
│ ││ ; - com.google.re2j.Unicode::simpleFold@48 (line 215)
│ ││ ; - com.google.re2j.Inst::matchRune@50 (line 67)
│ ││ ; - com.google.re2j.Machine::step@308 (line 306)
0.01% │ ││ 0x00007fd37921c107: cmp $0x3f,%r10d
│ ││ 0x00007fd37921c10b: jae 0x00007fd37921c915
0.11% 0.22% │ ││ 0x00007fd37921c111: mov 0x10(%r9,%r10,4),%ebp ;*aaload
│ ││ ; - com.google.re2j.Unicode::simpleFold@55 (line 215)
│ ││ ; - com.google.re2j.Inst::matchRune@50 (line 67)
│ ││ ; - com.google.re2j.Machine::step@308 (line 306)
0.01% 0.00% │ ││ 0x00007fd37921c116: mov 0xc(%r12,%rbp,8),%r10d ; implicit exception: dispatches to 0x00007fd37921d0cd
0.24% 0.28% │ ││ 0x00007fd37921c11b: test %r10d,%r10d
│ ││ 0x00007fd37921c11e: jbe 0x00007fd37921c965
0.07% 0.04% │ ││ 0x00007fd37921c124: mov 0x10(%r12,%rbp,8),%ebp ;*iaload
│ ││ ; - com.google.re2j.Unicode::simpleFold@57 (line 215)
│ ││ ; - com.google.re2j.Inst::matchRune@50 (line 67)
│ ││ ; - com.google.re2j.Machine::step@308 (line 306)
0.07% 0.08% │ ││ 0x00007fd37921c129: cmp %r14d,%ebp
│ ││ 0x00007fd37921c12c: je 0x00007fd37921cb2d ;*if_icmpne
│ ││ ; - com.google.re2j.Unicode::simpleFold@59 (line 215)
│ ││ ; - com.google.re2j.Inst::matchRune@50 (line 67)
│ ││ ; - com.google.re2j.Machine::step@308 (line 306)
0.07% 0.08% │ ││ 0x00007fd37921c132: mov %r14d,%r8d
0.17% 0.10% │ ││ 0x00007fd37921c135: cmp $0x7f,%r8d
│ ││ 0x00007fd37921c139: jg 0x00007fd37921cb7d ;*if_icmpgt
│ ││ ; - com.google.re2j.Unicode::toLower@3 (line 177)
│ ││ ; - com.google.re2j.Unicode::simpleFold@71 (line 223)
│ ││ ; - com.google.re2j.Inst::matchRune@50 (line 67)
│ ││ ; - com.google.re2j.Machine::step@308 (line 306)
0.00% 0.02% │ ││ 0x00007fd37921c13f: cmp $0x41,%r8d
│ ││ 0x00007fd37921c143: jl 0x00007fd37921ca8d ;*if_icmpgt
│ ││ ; - com.google.re2j.Unicode::toLower@9 (line 178)
│ ││ ; - com.google.re2j.Unicode::simpleFold@71 (line 223)
│ ││ ; - com.google.re2j.Inst::matchRune@50 (line 67)
│ ││ ; - com.google.re2j.Machine::step@308 (line 306)
0.10% 0.16% │ ││ 0x00007fd37921c149: cmp $0x5a,%r8d
│ ╭ ││ 0x00007fd37921c14d: jg 0x00007fd37921c15b ;*if_icmpgt
│ │ ││ ; - com.google.re2j.Unicode::toLower@15 (line 178)
│ │ ││ ; - com.google.re2j.Unicode::simpleFold@71 (line 223)
│ │ ││ ; - com.google.re2j.Inst::matchRune@50 (line 67)
│ │ ││ ; - com.google.re2j.Machine::step@308 (line 306)
│ │ ││ 0x00007fd37921c14f: mov %r8d,%r10d
│ │ ││ 0x00007fd37921c152: add $0x20,%r10d ;*iinc
│ │ ││ ; - com.google.re2j.Unicode::toLower@18 (line 179)
│ │ ││ ; - com.google.re2j.Unicode::simpleFold@71 (line 223)
│ │ ││ ; - com.google.re2j.Inst::matchRune@50 (line 67)
│ │ ││ ; - com.google.re2j.Machine::step@308 (line 306)
│ │ ││ 0x00007fd37921c156: cmp %r8d,%r10d
│ │╭││ 0x00007fd37921c159: jne 0x00007fd37921c176 ;*if_icmpeq
│ ││││ ; - com.google.re2j.Unicode::simpleFold@77 (line 224)
│ ││││ ; - com.google.re2j.Inst::matchRune@50 (line 67)
│ ││││ ; - com.google.re2j.Machine::step@308 (line 306)
0.07% 0.06% │ ↘│││ 0x00007fd37921c15b: cmp $0x61,%r8d
│ │││ 0x00007fd37921c15f: jl 0x00007fd37921cdd5 ;*if_icmpgt
│ │││ ; - com.google.re2j.Unicode::toUpper@9 (line 167)
│ │││ ; - com.google.re2j.Unicode::simpleFold@83 (line 227)
│ │││ ; - com.google.re2j.Inst::matchRune@50 (line 67)
│ │││ ; - com.google.re2j.Machine::step@308 (line 306)
0.10% 0.13% │ │││ 0x00007fd37921c165: cmp $0x7a,%r8d
│ │││ 0x00007fd37921c169: jg 0x00007fd37921ce21 ;*if_icmpgt
│ │││ ; - com.google.re2j.Unicode::toUpper@15 (line 167)
│ │││ ; - com.google.re2j.Unicode::simpleFold@83 (line 227)
│ │││ ; - com.google.re2j.Inst::matchRune@50 (line 67)
│ │││ ; - com.google.re2j.Machine::step@308 (line 306)
0.00% 0.01% │ │││ 0x00007fd37921c16f: mov %r8d,%r10d
0.11% 0.10% │ │││ 0x00007fd37921c172: add $0xffffffe0,%r10d ; OopMap{r9=Oop rdi=NarrowOop rdx=NarrowOop rax=NarrowOop r13=Oop xmm0=Oop [8]=Oop [24]=Oop [40]=Oop off=1846}
│ │││ ;*goto
│ │││ ; - com.google.re2j.Inst::matchRune@54 (line 67)
│ │││ ; - com.google.re2j.Machine::step@308 (line 306)
0.09% 0.08% │ ↘││ 0x00007fd37921c176: test %eax,0x164e3e84(%rip) # 0x00007fd38f700000
│ ││ ;*goto
│ ││ ; - com.google.re2j.Inst::matchRune@54 (line 67)
│ ││ ; - com.google.re2j.Machine::step@308 (line 306)
│ ││ ; {poll}
0.08% 0.12% │ ││ 0x00007fd37921c17c: cmp %ebx,%r10d
│ ││ 0x00007fd37921c17f: je 0x00007fd37921bf60 ;*if_icmpeq
│ ││ ; - com.google.re2j.Inst::matchRune@39 (line 66)
│ ││ ; - com.google.re2j.Machine::step@308 (line 306)
│ ││ 0x00007fd37921c185: mov %ebx,%r11d ;*iload_1
│ ││ ; - com.google.re2j.Inst::matchRune@42 (line 68)
│ ││ ; - com.google.re2j.Machine::step@308 (line 306)
0.05% 0.07% │ ││ 0x00007fd37921c188: cmp %r10d,%ecx
│ ││ 0x00007fd37921c18b: je 0x00007fd37921c4b1 ;*if_icmpne
│ ││ ; - com.google.re2j.Inst::matchRune@44 (line 68)
│ ││ ; - com.google.re2j.Machine::step@308 (line 306)
0.03% 0.06% │ ││ 0x00007fd37921c191: mov %r10d,%r14d
0.08% 0.11% │ ││ 0x00007fd37921c194: mov %r11d,%ebx
0.13% 0.18% │ ││ 0x00007fd37921c197: mov $0x1f,%esi
0.06% 0.12% │ ││ 0x00007fd37921c19c: mov $0x1f,%r8d
0.05% 0.06% │ ││ 0x00007fd37921c1a2: xor %r10d,%r10d
0.07% 0.16% │ ││ 0x00007fd37921c1a5: mov $0x3f,%r11d
0.12% 0.20% │ ││ 0x00007fd37921c1ab: mov %r10d,0x20(%rsp)
0.06% 0.11% │ ││ 0x00007fd37921c1b0: vmovd %r11d,%xmm2
0.02% 0.08% │ ╰│ 0x00007fd37921c1b5: jmpq 0x00007fd37921c0b2
0.22% 0.28% ↘ │ 0x00007fd37921c1ba: inc %r8d ;*iadd
│ ; - com.google.re2j.Unicode::simpleFold@33 (line 210)
│ ; - com.google.re2j.Inst::matchRune@50 (line 67)
│ ; - com.google.re2j.Machine::step@308 (line 306)
0.03% 0.03% │ 0x00007fd37921c1bd: mov %r8d,0x20(%rsp)
0.14% 0.22% │ 0x00007fd37921c1c2: vmovd %xmm2,%r8d
0.02% 0.03% ╰ 0x00007fd37921c1c7: jmpq 0x00007fd37921c0e8
0.08% 0.06% 0x00007fd37921c1cc: xor %r11d,%r11d
0x00007fd37921c1cf: mov 0x20(%rsp),%ecx
0x00007fd37921c1d3: mov 0x9c(%rsp),%r14d
0.05% 0.05% 0x00007fd37921c1db: jmpq 0x00007fd37921bd74
0x00007fd37921c1e0: mov %r8d,%r9d
0x00007fd37921c1e3: sar %r9d
0x00007fd37921c1e6: add %r8d,%r9d ;*iadd
; - java.util.ArrayList::grow@10 (line 255)
; - java.util.ArrayList::ensureExplicitCapacity@22 (line 235)
; - java.util.ArrayList::ensureCapacityInternal@19 (line 227)
; - java.util.ArrayList::add@7 (line 458)
; - com.google.re2j.Machine::step@410 (line 329)
0x00007fd37921c1e9: mov %r9d,%ebx
0x00007fd37921c1ec: sub %esi,%ebx
....................................................................................................
14.46% 20.85% <total for region 3>
....[Hottest Region 4]..............................................................................
C2, level 4, com.google.re2j.Machine::add, version 490 (390 bytes)
0x00007fd379217f2a: mov %r10,(%rsp)
0x00007fd379217f2e: nop
0x00007fd379217f2f: callq 0x00007fd379046020 ; OopMap{off=756}
;*invokespecial add
; - com.google.re2j.Machine::add@207 (line 369)
; {optimized virtual_call}
╭ 0x00007fd379217f34: jmpq 0x00007fd3792180b3
│ 0x00007fd379217f39: mov 0x70(%rsp),%rax
│╭ 0x00007fd379217f3e: jmpq 0x00007fd3792180b3 ;*tableswitch
││ ; - com.google.re2j.Machine::add@47 (line 349)
1.19% 0.86% ││ 0x00007fd379217f43: mov 0x8(%rsp),%rsi
││ 0x00007fd379217f48: mov 0x48(%rsp),%rdx
││ 0x00007fd379217f4d: mov 0x1c(%rsp),%r8d
0.03% 0.00% ││ 0x00007fd379217f52: mov 0x20(%rsp),%r9
0.33% 0.18% ││ 0x00007fd379217f57: mov 0x28(%rsp),%edi
││ 0x00007fd379217f5b: mov 0x70(%rsp),%r10
││ 0x00007fd379217f60: mov %r10,(%rsp)
0.00% 0.01% ││ 0x00007fd379217f64: mov %rsi,%rbp
0.23% 0.15% ││ 0x00007fd379217f67: callq 0x00007fd379046020 ; OopMap{rbp=Oop [32]=Oop [56]=Oop [72]=Oop off=812}
││ ;*invokespecial add
││ ; - com.google.re2j.Machine::add@131 (line 358)
││ ; {optimized virtual_call}
0.01% ││ 0x00007fd379217f6c: mov 0x38(%rsp),%r10
0.18% 0.09% ││ 0x00007fd379217f71: mov 0x10(%r10),%ecx ;*getfield arg
││ ; - com.google.re2j.Machine::add@140 (line 359)
0.15% 0.24% ││ 0x00007fd379217f75: mov %rbp,%rsi
││ 0x00007fd379217f78: mov 0x48(%rsp),%rdx
0.02% 0.01% ││ 0x00007fd379217f7d: mov 0x1c(%rsp),%r8d
0.14% 0.16% ││ 0x00007fd379217f82: mov 0x20(%rsp),%r9
0.18% 0.25% ││ 0x00007fd379217f87: mov 0x28(%rsp),%edi
0.00% ││ 0x00007fd379217f8b: mov %rax,(%rsp)
0.00% ││ 0x00007fd379217f8f: callq 0x00007fd379046020 ; OopMap{off=852}
││ ;*invokespecial add
││ ; - com.google.re2j.Machine::add@150 (line 359)
││ ; {optimized virtual_call}
││╭ 0x00007fd379217f94: jmpq 0x00007fd3792180b3 ;*aload
│││ ; - com.google.re2j.Machine::add@297 (line 388)
2.06% 1.16% │││ 0x00007fd379217f99: mov 0x38(%rsp),%r10
│││ 0x00007fd379217f9e: mov %r10,%rcx
│││ 0x00007fd379217fa1: shr $0x3,%rcx ;*putfield inst
│││ ; - com.google.re2j.Machine::alloc@47 (line 151)
│││ ; - com.google.re2j.Machine::add@305 (line 389)
0.03% │││ 0x00007fd379217fa5: mov 0x70(%rsp),%rbp
0.46% 0.14% │││ 0x00007fd379217faa: test %rbp,%rbp
│││╭ 0x00007fd379217fad: jne 0x00007fd3792180bf ;*ifnonnull
││││ ; - com.google.re2j.Machine::add@299 (line 388)
││││ 0x00007fd379217fb3: mov 0x8(%rsp),%r10
││││ 0x00007fd379217fb8: mov 0x20(%r10),%ebp ;*getfield pool
││││ ; - com.google.re2j.Machine::alloc@1 (line 147)
││││ ; - com.google.re2j.Machine::add@305 (line 389)
││││ 0x00007fd379217fbc: mov 0x8(%r12,%rbp,8),%r11d ; implicit exception: dispatches to 0x00007fd37921854d
0.48% 0.08% ││││ 0x00007fd379217fc1: cmp $0xf8002f22,%r11d ; {metadata('java/util/ArrayList')}
││││ 0x00007fd379217fc8: jne 0x00007fd37921831d
││││ 0x00007fd379217fce: lea (%r12,%rbp,8),%r9 ;*invokeinterface size
││││ ; - com.google.re2j.Machine::alloc@4 (line 147)
││││ ; - com.google.re2j.Machine::add@305 (line 389)
││││ 0x00007fd379217fd2: mov 0x10(%r9),%r8d ;*getfield size
││││ ; - java.util.ArrayList::size@1 (line 278)
││││ ; - com.google.re2j.Machine::alloc@4 (line 147)
││││ ; - com.google.re2j.Machine::add@305 (line 389)
0.00% ││││ 0x00007fd379217fd6: test %r8d,%r8d
││││ 0x00007fd379217fd9: jle 0x00007fd379218371 ;*ifle
││││ ; - com.google.re2j.Machine::alloc@11 (line 148)
││││ ; - com.google.re2j.Machine::add@305 (line 389)
0.43% 0.03% ││││ 0x00007fd379217fdf: mov %r8d,%r10d
││││ 0x00007fd379217fe2: dec %r10d ;*isub
││││ ; - com.google.re2j.Machine::alloc@20 (line 148)
││││ ; - com.google.re2j.Machine::add@305 (line 389)
││││ 0x00007fd379217fe5: cmp %r8d,%r10d
││││ 0x00007fd379217fe8: jge 0x00007fd379218395 ;*if_icmplt
││││ ; - java.util.ArrayList::rangeCheck@5 (line 652)
││││ ; - java.util.ArrayList::remove@2 (line 492)
││││ ; - com.google.re2j.Machine::alloc@21 (line 149)
││││ ; - com.google.re2j.Machine::add@305 (line 389)
0.00% ││││ 0x00007fd379217fee: incl 0xc(%r9) ;*putfield modCount
││││ ; - java.util.ArrayList::remove@12 (line 494)
││││ ; - com.google.re2j.Machine::alloc@21 (line 149)
││││ ; - com.google.re2j.Machine::add@305 (line 389)
0.39% 0.03% ││││ 0x00007fd379217ff2: mov 0x14(%r9),%ebp ;*getfield elementData
││││ ; - java.util.ArrayList::elementData@1 (line 418)
││││ ; - java.util.ArrayList::remove@17 (line 495)
││││ ; - com.google.re2j.Machine::alloc@21 (line 149)
││││ ; - com.google.re2j.Machine::add@305 (line 389)
││││ 0x00007fd379217ff6: mov 0xc(%r12,%rbp,8),%r11d ; implicit exception: dispatches to 0x00007fd37921855d
0.47% 0.03% ││││ 0x00007fd379217ffb: cmp %r11d,%r10d
││││ 0x00007fd379217ffe: jae 0x00007fd3792182f5 ;*aaload
││││ ; - java.util.ArrayList::elementData@5 (line 418)
││││ ; - java.util.ArrayList::remove@17 (line 495)
││││ ; - com.google.re2j.Machine::alloc@21 (line 149)
││││ ; - com.google.re2j.Machine::add@305 (line 389)
││││ 0x00007fd379218004: mov %r10d,0x10(%r9) ;*putfield size
││││ ; - java.util.ArrayList::remove@62 (line 501)
││││ ; - com.google.re2j.Machine::alloc@21 (line 149)
││││ ; - com.google.re2j.Machine::add@305 (line 389)
││││ 0x00007fd379218008: lea (%r12,%rbp,8),%r10
││││ 0x00007fd37921800c: mov 0xc(%r10,%r8,4),%ebp ;*aaload
││││ ; - java.util.ArrayList::elementData@5 (line 418)
││││ ; - java.util.ArrayList::remove@17 (line 495)
││││ ; - com.google.re2j.Machine::alloc@21 (line 149)
││││ ; - com.google.re2j.Machine::add@305 (line 389)
0.39% 0.21% ││││ 0x00007fd379218011: mov %r12d,0xc(%r10,%r8,4) ;*aastore
││││ ; - java.util.ArrayList::remove@66 (line 501)
││││ ; - com.google.re2j.Machine::alloc@21 (line 149)
││││ ; - com.google.re2j.Machine::add@305 (line 389)
││││ 0x00007fd379218016: mov 0x8(%r12,%rbp,8),%r11d ; implicit exception: dispatches to 0x00007fd379218571
││││ 0x00007fd37921801b: cmp $0xf8019c51,%r11d ; {metadata('com/google/re2j/Machine$Thread')}
││││ 0x00007fd379218022: jne 0x00007fd379218471
0.00% 0.00% ││││ 0x00007fd379218028: shl $0x3,%rbp ;*checkcast
││││ ; - com.google.re2j.Machine::alloc@26 (line 149)
││││ ; - com.google.re2j.Machine::add@305 (line 389)
0.40% 0.28% ││││ 0x00007fd37921802c: mov %ecx,0x10(%rbp)
││││ 0x00007fd37921802f: mov %rbp,%r10
││││ 0x00007fd379218032: shr $0x9,%r10
0.00% 0.00% ││││ 0x00007fd379218036: movabs $0x7fd374dee000,%r11
0.42% ││││ 0x00007fd379218040: mov %r12b,(%r11,%r10,1) ;*aload
││││ ; - com.google.re2j.Machine::add@320 (line 393)
0.01% 0.01% ││││ ↗ 0x00007fd379218044: mov 0x20(%rsp),%rdi
0.06% 0.03% ││││ │ 0x00007fd379218049: mov 0xc(%rdi),%r10d ;*arraylength
││││ │ ; - com.google.re2j.Machine::add@322 (line 393)
││││ │ ; implicit exception: dispatches to 0x00007fd37921853d
0.01% ││││ │ 0x00007fd37921804d: test %r10d,%r10d
││││ │ 0x00007fd379218050: jle 0x00007fd379218356 ;*ifle
││││ │ ; - com.google.re2j.Machine::add@323 (line 393)
0.39% 0.02% ││││ │ 0x00007fd379218056: mov 0xc(%rbp),%r11d ;*getfield cap
││││ │ ; - com.google.re2j.Machine::add@328 (line 393)
0.00% ││││ │ 0x00007fd37921805a: mov %r11,%r8
0.07% 0.01% ││││ │ 0x00007fd37921805d: shl $0x3,%r8
││││ │ 0x00007fd379218061: cmp %rdi,%r8
││││╭│ 0x00007fd379218064: je 0x00007fd379218091 ;*if_acmpeq
││││││ ; - com.google.re2j.Machine::add@333 (line 393)
0.36% 0.04% ││││││ 0x00007fd379218066: mov 0xc(%r12,%r11,8),%r9d ; implicit exception: dispatches to 0x00007fd37921858d
0.01% ││││││ 0x00007fd37921806b: lea (%r12,%r11,8),%rcx ;*getfield cap
││││││ ; - com.google.re2j.Machine::add@328 (line 393)
││││││ 0x00007fd37921806f: cmp %r10d,%r9d
││││││ 0x00007fd379218072: jb 0x00007fd379218331
0.01% 0.00% ││││││ 0x00007fd379218078: lea 0x10(%r12,%r11,8),%rsi
0.46% 0.17% ││││││ 0x00007fd37921807d: add $0x10,%rdi
││││││ 0x00007fd379218081: movslq %r10d,%rdx
││││││ 0x00007fd379218084: movabs $0x7fd379052640,%r10
││││││ 0x00007fd37921808e: callq *%r10 ;*aload
││││││ ; - com.google.re2j.Machine::add@351 (line 396)
││││↘│ 0x00007fd379218091: mov %rbx,%r10
0.00% 0.00% ││││ │ 0x00007fd379218094: mov %rbp,%r11
0.06% 0.00% ││││ │ 0x00007fd379218097: shr $0x3,%r11
0.39% 0.61% ││││ │ 0x00007fd37921809b: mov %r11d,0x10(%rbx)
││││ │ 0x00007fd37921809f: shr $0x9,%r10
0.00% 0.01% ││││ │ 0x00007fd3792180a3: movabs $0x7fd374dee000,%r11
0.06% 0.03% ││││ │ 0x00007fd3792180ad: mov %r12b,(%r11,%r10,1) ;*putfield thread
││││ │ ; - com.google.re2j.Machine::add@355 (line 396)
0.38% 0.66% ││││ │ 0x00007fd3792180b1: xor %eax,%eax ;*synchronization entry
││││ │ ; - com.google.re2j.Machine::add@-1 (line 341)
0.41% 0.27% ↘↘↘│ │ 0x00007fd3792180b3: add $0x60,%rsp
0.00% 0.00% │ │ 0x00007fd3792180b7: pop %rbp
0.54% 0.75% │ │ 0x00007fd3792180b8: test %eax,0x164e7f42(%rip) # 0x00007fd38f700000
│ │ ; {poll_return}
0.36% 0.53% │ │ 0x00007fd3792180be: retq
↘ │ 0x00007fd3792180bf: mov %ecx,0x10(%rbp)
│ 0x00007fd3792180c2: mov %rbp,%r10
0.01% 0.01% │ 0x00007fd3792180c5: shr $0x9,%r10
0.03% 0.03% │ 0x00007fd3792180c9: movabs $0x7fd374dee000,%r11
│ 0x00007fd3792180d3: mov %r12b,(%r11,%r10,1) ;*putfield inst
│ ; - com.google.re2j.Machine::add@317 (line 391)
╰ 0x00007fd3792180d7: jmpq 0x00007fd379218044 ;*tableswitch
; - com.google.re2j.Machine::add@47 (line 349)
0x00007fd3792180dc: mov 0x8(%rsp),%rsi
0x00007fd3792180e1: mov 0x48(%rsp),%rdx
0x00007fd3792180e6: mov 0x1c(%rsp),%r8d
0x00007fd3792180eb: mov 0x20(%rsp),%r9
0x00007fd3792180f0: mov %ebx,%edi
0x00007fd3792180f2: mov 0x70(%rsp),%r10
....................................................................................................
11.62% 7.19% <total for region 4>
....[Hottest Regions]...............................................................................
32.58% 29.55% C2, level 4 com.google.re2j.Machine::add, version 490 (463 bytes)
26.16% 29.34% C2, level 4 com.google.re2j.Machine::step, version 500 (624 bytes)
14.46% 20.85% C2, level 4 com.google.re2j.Machine::step, version 500 (330 bytes)
11.62% 7.19% C2, level 4 com.google.re2j.Machine::add, version 490 (390 bytes)
4.57% 5.61% C2, level 4 com.google.re2j.Machine::match, version 543 (877 bytes)
2.90% 1.44% C2, level 4 com.google.re2j.Machine::step, version 500 (266 bytes)
2.78% 1.49% runtime stub StubRoutines::jint_disjoint_arraycopy (116 bytes)
1.02% 0.92% C2, level 4 com.google.re2j.Machine::step, version 500 (89 bytes)
0.57% 0.57% [kernel.kallsyms] [unknown] (6 bytes)
0.43% 0.56% C2, level 4 com.google.re2j.Machine::step, version 500 (34 bytes)
0.22% 0.19% C2, level 4 com.google.re2j.Machine::add, version 490 (40 bytes)
0.16% 0.05% C2, level 4 com.google.re2j.Machine::init, version 547 (109 bytes)
0.12% 0.01% [kernel.kallsyms] [unknown] (1 bytes)
0.10% [kernel.kallsyms] [unknown] (74 bytes)
0.09% 0.01% C2, level 4 com.google.re2j.Machine::init, version 547 (76 bytes)
0.08% 0.01% [kernel.kallsyms] [unknown] (0 bytes)
0.06% 0.03% C2, level 4 com.google.re2j.Machine::step, version 500 (20 bytes)
0.05% 0.02% [kernel.kallsyms] [unknown] (14 bytes)
0.04% 0.15% C2, level 4 com.google.re2j.Machine::match, version 543 (89 bytes)
0.04% 0.03% libjvm.so _ZN10fileStream5writeEPKcm (44 bytes)
1.93% 1.96% <...other 452 warm regions...>
....................................................................................................
100.00% 100.00% <totals>
....[Hottest Methods (after inlining)]..............................................................
45.03% 53.15% C2, level 4 com.google.re2j.Machine::step, version 500
44.42% 36.93% C2, level 4 com.google.re2j.Machine::add, version 490
4.69% 5.80% C2, level 4 com.google.re2j.Machine::match, version 543
2.78% 1.49% runtime stub StubRoutines::jint_disjoint_arraycopy
1.71% 1.45% [kernel.kallsyms] [unknown]
0.34% 0.10% C2, level 4 com.google.re2j.Machine::init, version 547
0.08% 0.05% C2, level 4 com.google.re2j.Matcher::find, version 567
0.04% 0.02% C2, level 4 com.github.arnaudroger.re2j.Re2jFindRegex::testCombine, version 597
0.04% 0.04% hsdis-amd64.so decode_instructions
0.04% 0.04% libjvm.so _ZN10fileStream5writeEPKcm
0.04% 0.00% libpthread-2.26.so __libc_write
0.04% 0.11% libc-2.26.so vfprintf
0.02% 0.03% libc-2.26.so __strlen_avx2
0.02% 0.03% libc-2.26.so _IO_fwrite
0.02% 0.08% libjvm.so _ZN13RelocIterator10initializeEP7nmethodPhS2_
0.02% 0.01% libc-2.26.so _IO_fflush
0.02% 0.02% libc-2.26.so _IO_default_xsputn
0.02% interpreter invoke return entry points
0.02% 0.01% [vdso] [unknown]
0.01% 0.00% libjvm.so _ZN13defaultStream4holdEl
0.56% 0.34% <...other 90 warm methods...>
....................................................................................................
100.00% 99.73% <totals>
....[Distribution by Source]........................................................................
94.66% 96.07% C2, level 4
2.79% 1.49% runtime stub
1.71% 1.45% [kernel.kallsyms]
0.39% 0.52% libjvm.so
0.21% 0.31% libc-2.26.so
0.09% 0.05% interpreter
0.07% 0.04% libpthread-2.26.so
0.05% 0.04% hsdis-amd64.so
0.02% 0.01% [vdso]
0.00% Unknown, level 0
0.00% 0.00% C1, level 3
....................................................................................................
100.00% 100.00% <totals>
# Run complete. Total time: 00:00:45
Benchmark Mode Cnt Score Error Units
Re2jFindRegex.testCombine thrpt 20 1520.234 ± 7.357 ops/s
Re2jFindRegex.testCombine:·asm thrpt NaN ---
| 87.818544
| 183
| 0.412933
|
ee98da252d9752acf8abe7057d0f12a137c5ef93
| 313
|
asm
|
Assembly
|
programs/oeis/097/A097388.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/097/A097388.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/097/A097388.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A097388: 2n-th derivative of the Gaussian exp(-x^2) evaluated at x=0.
; 1,-2,12,-120,1680,-30240,665280,-17297280,518918400,-17643225600,670442572800,-28158588057600,1295295050649600,-64764752532480000,3497296636753920000,-202843204931727360000,12576278705767096320000
mul $0,2
seq $0,67994 ; Hermite numbers.
| 52.166667
| 198
| 0.805112
|
bef17d0d2b8b407ae3483d3776258e159fb4e101
| 518
|
asm
|
Assembly
|
libsrc/_DEVELOPMENT/stdlib/c/sccz80/ulltoa.asm
|
ahjelm/z88dk
|
c4de367f39a76b41f6390ceeab77737e148178fa
|
[
"ClArtistic"
] | 640
|
2017-01-14T23:33:45.000Z
|
2022-03-30T11:28:42.000Z
|
libsrc/_DEVELOPMENT/stdlib/c/sccz80/ulltoa.asm
|
ahjelm/z88dk
|
c4de367f39a76b41f6390ceeab77737e148178fa
|
[
"ClArtistic"
] | 1,600
|
2017-01-15T16:12:02.000Z
|
2022-03-31T12:11:12.000Z
|
libsrc/_DEVELOPMENT/stdlib/c/sccz80/ulltoa.asm
|
ahjelm/z88dk
|
c4de367f39a76b41f6390ceeab77737e148178fa
|
[
"ClArtistic"
] | 215
|
2017-01-17T10:43:03.000Z
|
2022-03-23T17:25:02.000Z
|
; char *ulltoa(uint64_t num, char *buf, int radix)
SECTION code_clib
SECTION code_stdlib
PUBLIC ulltoa
EXTERN asm_ulltoa
ulltoa:
pop af ;ret
pop bc ;radix
exx
pop bc ;buf
exx
pop hl ;num
pop de ;num
exx
pop hl ;num
pop de ;num
exx
push bc
push bc
push de
push hl
push de
push hl
push af
exx
push bc
exx
ex (sp),ix
call asm_ulltoa
pop ix
ret
; SDCC bridge for Classic
IF __CLASSIC
PUBLIC _ulltoa
defc _ulltoa = ulltoa
ENDIF
| 10.791667
| 50
| 0.621622
|
325f3541cc046e7eb02fcec4dec66ef5dfacacbf
| 1,071
|
asm
|
Assembly
|
programs/oeis/098/A098486.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | 1
|
2021-03-15T11:38:20.000Z
|
2021-03-15T11:38:20.000Z
|
programs/oeis/098/A098486.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/098/A098486.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | null | null | null |
; A098486: Odd numbers with replacement of all prime factors 3 by 2.
; 1,2,5,7,4,11,13,10,17,19,14,23,25,8,29,31,22,35,37,26,41,43,20,47,49,34,53,55,38,59,61,28,65,67,46,71,73,50,77,79,16,83,85,58,89,91,62,95,97,44,101,103,70,107,109,74,113,115,52,119,121,82,125,127,86,131,133,40,137,139,94,143,145,98,149,151,68,155,157,106,161,163,110,167,169,76,173,175,118,179,181,122,185,187,56,191,193,130,197,199,134,203,205,92,209,211,142,215,217,146,221,223,100,227,229,154,233,235,158,239,241,32,245,247,166,251,253,170,257,259,116,263,265,178,269,271,182,275,277,124,281,283,190,287,289,194,293,295,88,299,301,202,305,307,206,311,313,140,317,319,214,323,325,218,329,331,148,335,337,226,341,343,230,347,349,104,353,355,238,359,361,242,365,367,164,371,373,250,377,379,254,383,385,172,389,391,262,395,397,266,401,403,80,407,409,274,413,415,278,419,421,188,425,427,286,431,433,290,437,439,196,443,445,298,449,451,302,455,457,136,461,463,310,467,469,314,473,475,212,479,481,322,485,487,326,491,493,220,497,499
mul $0,8
add $0,4
lpb $0
mul $0,2
dif $0,3
lpe
mov $1,$0
div $1,4
| 89.25
| 930
| 0.718021
|
dc9a251d15b6ce6309cc0207103bdf2804284692
| 604
|
asm
|
Assembly
|
oeis/239/A239798.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/239/A239798.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/239/A239798.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A239798: Decimal expansion of the midsphere radius in a regular dodecahedron with unit edges.
; Submitted by Christian Krause
; 1,3,0,9,0,1,6,9,9,4,3,7,4,9,4,7,4,2,4,1,0,2,2,9,3,4,1,7,1,8,2,8,1,9,0,5,8,8,6,0,1,5,4,5,8,9,9,0,2,8,8,1,4,3,1,0,6,7,7,2,4,3,1,1,3,5,2,6,3,0,2,3,1,4,0,9,4,5,1,2,2,4,8,5,3,6,0,3,6,0,2,0,9,4,6,9,5,5,6,8
mov $1,1
mov $3,$0
mul $3,4
sub $3,1
lpb $3
mul $1,$3
mul $2,$3
add $1,$2
mov $5,$0
cmp $5,0
add $0,$5
div $1,$0
div $2,$0
add $2,$1
sub $3,1
lpe
mul $2,2
mov $4,10
pow $4,$0
div $2,$4
mov $5,$4
cmp $5,0
cmp $5,0
add $2,$5
div $1,$2
mod $1,10
mov $0,$1
| 18.875
| 201
| 0.559603
|
bc349037213159a4a40c99a19bda175455a2f032
| 175
|
asm
|
Assembly
|
code/5-S-6.asm
|
gdzhang2012/Assembly-Language-by-Wangshuang
|
7c53cfc60d83c19165e674d66015759f49663985
|
[
"Apache-2.0"
] | null | null | null |
code/5-S-6.asm
|
gdzhang2012/Assembly-Language-by-Wangshuang
|
7c53cfc60d83c19165e674d66015759f49663985
|
[
"Apache-2.0"
] | null | null | null |
code/5-S-6.asm
|
gdzhang2012/Assembly-Language-by-Wangshuang
|
7c53cfc60d83c19165e674d66015759f49663985
|
[
"Apache-2.0"
] | null | null | null |
assume cs:code
code segment
mov ax,0ffffh
mov ds,ax
mov bx,0
mov dx,0
mov cx,12
s: mov al,[bx]
mov ah,0
add dx,ax
inc bx
loop s
mov ax,4c00h
int 21h
code ends
end
| 9.722222
| 14
| 0.674286
|
d88b52b07f42acbe277ca91e28d6dea1899b2a2f
| 1,939
|
asm
|
Assembly
|
lib/target/rex/classic/rex_crt0.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 640
|
2017-01-14T23:33:45.000Z
|
2022-03-30T11:28:42.000Z
|
lib/target/rex/classic/rex_crt0.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 1,600
|
2017-01-15T16:12:02.000Z
|
2022-03-31T12:11:12.000Z
|
lib/target/rex/classic/rex_crt0.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 215
|
2017-01-17T10:43:03.000Z
|
2022-03-23T17:25:02.000Z
|
; Startup Code for Xircom Rex 6000
;
; djm 6/3/2001
;
; $Id: rex_crt0.asm,v 1.27 2016-07-13 22:12:25 dom Exp $
;
MODULE rex_crt0
defc crt0 = 1
INCLUDE "zcc_opt.def"
;--------
; Some scope declarations
;--------
EXTERN _main ;main() is always external to crt0
IF (startup=2) ; Library ?
EXTERN _LibMain
ENDIF
PUBLIC l_dcal ;jp(hl) instruction
PUBLIC cleanup
; defm "ApplicationName:Addin",10,13
; defm "[program name - 10 chars?]",10,13
; defb 0
; defw endprof-begprog
; defb 0,0
; Prior to $8000 we have a 40x32 icon
;--------
; Main code starts here
;--------
defc TAR__clib_exit_stack_size = 32
defc TAR__register_sp = 65535
defc __CPU_CLOCK = 4300000
INCLUDE "crt/classic/crt_rules.inc"
org $8000
jp start ;addin signature jump
IF (startup=2) ; Library ?
signature:
defm "XXX"
lib:
ld hl,farret
push hl
jp _LibMain
start:
INCLUDE "crt/classic/crt_init_sp.asm"
INCLUDE "crt/classic/crt_init_atexit.asm"
call crt0_init_bss
ld (exitsp),sp ;Store atexit() stack
; Entry to the user code
call _main ;Call the users code
cleanup:
ld de,$42 ;DS_ADDIN_TERMINATE
ld ($c000),de
rst $10 ;Exit the addin
endloop:
jr endloop
l_dcal: jp (hl) ;Used for call by function pointer
farret: ;Used for farcall logic
pop bc
ld a,c
jp $26ea
ELSE
start:
INCLUDE "crt/classic/crt_init_sp.asm"
INCLUDE "crt/classic/crt_init_atexit.asm"
call crt0_init_bss
ld (exitsp),sp ;Store atexit() stack
; Entry to the user code
call _main ;Call the users code
cleanup:
ld de,$42 ;DS_ADDIN_TERMINATE
ld ($c000),de
rst $10 ;Exit the addin
endloop:
jr endloop
l_dcal: jp (hl) ;Used for call by function pointer
ENDIF
; INCLUDE "crt/classic/crt_runtime_selection.asm"
defc __crt_org_bss = $f033
INCLUDE "crt/classic/crt_section.asm"
| 19.009804
| 62
| 0.645694
|
6ba6c07a29285986115338ab36720008efccce8e
| 57
|
asm
|
Assembly
|
test/cst-crc.asm
|
esovm/asmbf
|
d132f59813259314cf996d9f83b4dca8bea238eb
|
[
"MIT"
] | 1
|
2020-07-22T16:29:07.000Z
|
2020-07-22T16:29:07.000Z
|
test/cst-crc.asm
|
esovm/asmbf
|
d132f59813259314cf996d9f83b4dca8bea238eb
|
[
"MIT"
] | null | null | null |
test/cst-crc.asm
|
esovm/asmbf
|
d132f59813259314cf996d9f83b4dca8bea238eb
|
[
"MIT"
] | null | null | null |
#!/bin/asmbf/bfmake
ceq r1, 0
cst r1, .0
crc r2, 0
out r2
| 11.4
| 19
| 0.649123
|
2304e311ba80dc2187a64740ee63d4cbf753c28e
| 567
|
asm
|
Assembly
|
oeis/247/A247473.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/247/A247473.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/247/A247473.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A247473: Numbers of the form 2^k (k>=0) that are a sum of divisors of n for some n.
; Submitted by Jon Maiga
; 1,4,8,32,128,256,512,1024,4096,8192,16384,32768,65536,131072,262144,524288,1048576,2097152,4194304,8388608,16777216,33554432,67108864,134217728,268435456,536870912,1073741824,2147483648,4294967296,8589934592,17179869184,34359738368
mov $1,$0
trn $0,1
seq $0,180221 ; Numbers that can be written as sum of one or more distinct elements of A000043. Numbers k for which sigma(A180162(k))=2^k, k>=2.
cmp $1,0
cmp $1,0
mul $0,$1
mov $2,2
pow $2,$0
mov $0,$2
| 40.5
| 233
| 0.749559
|
36545ec2f8a980a8f0068575d3d0db2932a93a0e
| 224
|
asm
|
Assembly
|
programs/oeis/168/A168553.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/168/A168553.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/168/A168553.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A168553: a(n) = 1 if it is possible to place n sets of n queens on an n X n chessboard with no two queens of the same set attacking each other.
; 1,0,0,0,1,0,1,0,0,0,1,1
lpb $0
add $0,1
dif $0,3
lpe
add $0,1
mod $0,2
| 22.4
| 145
| 0.651786
|
d841a6f23ed714084a256f59b428d6c37544fc78
| 5,836
|
asm
|
Assembly
|
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_295.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_295.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_295.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 3
|
2020-07-14T17:07:07.000Z
|
2022-03-21T01:12:22.000Z
|
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r11
push %r15
push %rax
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_UC_ht+0x2042, %rsi
lea addresses_D_ht+0x11142, %rdi
clflush (%rdi)
nop
nop
nop
nop
nop
cmp %r11, %r11
mov $122, %rcx
rep movsb
nop
nop
nop
cmp $18291, %rsi
lea addresses_WC_ht+0x3042, %rsi
lea addresses_UC_ht+0x2242, %rdi
nop
nop
nop
cmp $61629, %r10
mov $21, %rcx
rep movsb
nop
nop
nop
add $65329, %rcx
lea addresses_A_ht+0x18154, %rcx
nop
nop
cmp %r10, %r10
movb (%rcx), %al
nop
nop
nop
nop
nop
sub %rsi, %rsi
lea addresses_WT_ht+0x1c6c, %rsi
lea addresses_normal_ht+0x1dd9e, %rdi
clflush (%rdi)
nop
nop
nop
nop
add %rdx, %rdx
mov $115, %rcx
rep movsl
nop
nop
inc %rsi
lea addresses_UC_ht+0x14522, %rsi
lea addresses_WT_ht+0x6242, %rdi
nop
sub %r15, %r15
mov $74, %rcx
rep movsb
nop
nop
nop
nop
sub $43001, %rdx
lea addresses_WC_ht+0x1c2, %rdi
sub $9429, %rax
vmovups (%rdi), %ymm5
vextracti128 $1, %ymm5, %xmm5
vpextrq $0, %xmm5, %rsi
nop
nop
nop
nop
inc %rax
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rax
pop %r15
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r15
push %r9
push %rax
push %rbp
push %rcx
push %rsi
// Store
lea addresses_RW+0x5b6a, %r12
nop
nop
nop
nop
and %rcx, %rcx
movl $0x51525354, (%r12)
nop
nop
cmp $53909, %rax
// Faulty Load
lea addresses_normal+0xb242, %rax
nop
xor $54211, %r9
mov (%rax), %r15w
lea oracles, %r9
and $0xff, %r15
shlq $12, %r15
mov (%r9,%r15,1), %r15
pop %rsi
pop %rcx
pop %rbp
pop %rax
pop %r9
pop %r15
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_normal', 'same': False, 'size': 8, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_RW', 'same': False, 'size': 4, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
[Faulty Load]
{'src': {'type': 'addresses_normal', 'same': True, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_UC_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 7, 'same': True}, 'OP': 'REPM'}
{'src': {'type': 'addresses_WC_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 9, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_A_ht', 'same': False, 'size': 1, 'congruent': 1, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WT_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 2, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_UC_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 11, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_WC_ht', 'same': False, 'size': 32, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'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
*/
| 38.906667
| 2,999
| 0.661926
|
cfa71d8defb639f8e973681efbf71ab57f6b207b
| 365
|
asm
|
Assembly
|
data/mapObjects/FuchsiaMart.asm
|
AmateurPanda92/pokemon-rby-dx
|
f7ba1cc50b22d93ed176571e074a52d73360da93
|
[
"MIT"
] | 9
|
2020-07-12T19:44:21.000Z
|
2022-03-03T23:32:40.000Z
|
data/mapObjects/FuchsiaMart.asm
|
JStar-debug2020/pokemon-rby-dx
|
c2fdd8145d96683addbd8d9075f946a68d1527a1
|
[
"MIT"
] | 7
|
2020-07-16T10:48:52.000Z
|
2021-01-28T18:32:02.000Z
|
data/mapObjects/FuchsiaMart.asm
|
JStar-debug2020/pokemon-rby-dx
|
c2fdd8145d96683addbd8d9075f946a68d1527a1
|
[
"MIT"
] | 2
|
2021-03-28T18:33:43.000Z
|
2021-05-06T13:12:09.000Z
|
FuchsiaMart_Object:
db $0 ; border block
db 2 ; warps
warp 3, 7, 0, -1
warp 4, 7, 0, -1
db 0 ; signs
db 3 ; objects
object SPRITE_MART_GUY, 0, 5, STAY, RIGHT, 1 ; person
object SPRITE_FAT_BALD_GUY, 4, 2, STAY, NONE, 2 ; person
object SPRITE_LASS, 6, 5, WALK, 1, 3 ; person
; warp-to
warp_to 3, 7, FUCHSIA_MART_WIDTH
warp_to 4, 7, FUCHSIA_MART_WIDTH
| 20.277778
| 57
| 0.673973
|
58c0d7cc395477fae1a3d89ce7787dd22ef27632
| 277
|
asm
|
Assembly
|
libsrc/_DEVELOPMENT/adt/bv_priority_queue/c/sccz80/bv_priority_queue_shrink_to_fit.asm
|
teknoplop/z88dk
|
bb03fbfd6b2ab0f397a1358559089f9cd3706485
|
[
"ClArtistic"
] | 8
|
2017-01-18T12:02:17.000Z
|
2021-06-12T09:40:28.000Z
|
libsrc/_DEVELOPMENT/adt/bv_priority_queue/c/sccz80/bv_priority_queue_shrink_to_fit.asm
|
teknoplop/z88dk
|
bb03fbfd6b2ab0f397a1358559089f9cd3706485
|
[
"ClArtistic"
] | 1
|
2017-03-06T07:41:56.000Z
|
2017-03-06T07:41:56.000Z
|
libsrc/_DEVELOPMENT/adt/bv_priority_queue/c/sccz80/bv_priority_queue_shrink_to_fit.asm
|
teknoplop/z88dk
|
bb03fbfd6b2ab0f397a1358559089f9cd3706485
|
[
"ClArtistic"
] | 3
|
2017-03-07T03:19:40.000Z
|
2021-09-15T17:59:19.000Z
|
; int bv_priority_queue_shrink_to_fit(bv_priority_queue_t *q)
SECTION code_clib
SECTION code_adt_bv_priority_queue
PUBLIC bv_priority_queue_shrink_to_fit
EXTERN asm_bv_priority_queue_shrink_to_fit
defc bv_priority_queue_shrink_to_fit = asm_bv_priority_queue_shrink_to_fit
| 23.083333
| 74
| 0.906137
|
8c42c222438410c3d20f9b950f5ecdda67b42269
| 806
|
asm
|
Assembly
|
oeis/014/A014228.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/014/A014228.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/014/A014228.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A014228: Product of 3 successive Catalan numbers.
; Submitted by Jon Maiga
; 2,10,140,2940,77616,2378376,80978040,2982691140,116776877360,4800591267472,205384736883872,9084324900632800,413286869105712000,19262120149391220000,916763612521908006000,44440565510927197408500,2189466044883038600910000,109434890559153981999870000,5540861300942427930730260000,283821625236066548628393396000,14692056078566706330918460176000,767848662050783693520036915720000,40482316852294795946191163652264000,2151479439480805732247959612873015200,115189841415539179792464775116022452096
mov $2,$0
seq $0,108 ; Catalan numbers: C(n) = binomial(2n,n)/(n+1) = (2n)!/(n!(n+1)!).
seq $2,356 ; Number of rooted cubic maps with 2n nodes and a distinguished Hamiltonian cycle: (2n)!(2n+1)! / (n!^2*(n+1)!(n+2)!).
mul $0,$2
mul $0,2
| 80.6
| 490
| 0.825062
|
864ab0209a1d666d6909dba18d5a37cef888c611
| 1,267
|
asm
|
Assembly
|
circ/microcode.asm
|
SimonFJ20/jdh-8
|
33fb336858f3253bca3a3e5e7ce2970c402fbbee
|
[
"MIT"
] | 911
|
2021-06-13T15:11:54.000Z
|
2022-03-31T16:43:01.000Z
|
circ/microcode.asm
|
SimonFJ20/jdh-8
|
33fb336858f3253bca3a3e5e7ce2970c402fbbee
|
[
"MIT"
] | 33
|
2021-06-13T16:40:47.000Z
|
2022-01-31T15:33:17.000Z
|
circ/microcode.asm
|
SimonFJ20/jdh-8
|
33fb336858f3253bca3a3e5e7ce2970c402fbbee
|
[
"MIT"
] | 88
|
2021-06-13T17:34:49.000Z
|
2022-03-29T14:04:40.000Z
|
; JDH-8 MICROCODE
; FOR BOTH LOGISIM AND PHYSICAL CIRCUIT
@microcode
mw:
.const:
eop1, ~sel, lreg
.reg:
ereg, sel, ldy
ealu, ~sel, lreg
lw:
.const:
aimm, ~sel, emem, lreg
.reg:
ahl, ~sel, emem, lreg
sw:
.const:
aimm, ~sel, ereg, lmem
.reg:
ahl, ~sel, ereg, lmem
push:
.const:
asp, eop1, lmem
spdec
.reg:
asp, ~sel, ereg, lmem
spdec
pop:
.const:
.reg:
spinc
asp, ~sel, emem, lreg
lda:
.const:
eop1, ldl
eop2, ldh
.reg:
jnz:
.const:
eop1, jnz
.reg:
~sel, ereg, jnz
inb:
.const:
eop1, lprt
edev, ~sel, lreg
.reg:
sel, ereg, lprt
edev, ~sel, lreg
outb:
.const:
eop1, lprt
~sel, ereg, ldev
.reg:
sel, ereg, lprt
~sel, ereg, ldev
cmp:
.const:
~sel, ereg, ldx
eop1, ldy
ldf
.reg:
~sel, ereg, ldx
sel, ereg, ldy
ldf
@macro
a_const:
~sel, ereg, ldx
eop1, ldy
~sel, ealu, lreg
@macro
a_reg:
~sel, ereg, ldx
sel, ereg, ldy
~sel, ealu, lreg
add:
.const:
a_const
ldf
.reg:
a_reg
ldf
adc:
.const:
a_const
ldf
.reg:
a_reg
ldf
and:
.const:
a_const
.reg:
a_reg
or:
.const:
a_const
.reg:
a_reg
nor:
.const:
a_const
.reg:
a_reg
sbb:
.const:
a_const
ldf
.reg:
a_reg
ldf
| 9.746154
| 39
| 0.551697
|
ebba9bc99184a0b3bafe33390d87ea17d3492fd4
| 1,104
|
asm
|
Assembly
|
programs/oeis/274/A274251.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/274/A274251.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/274/A274251.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A274251: Number of partitions of n^3 into at most three parts.
; 1,1,10,75,374,1365,3997,9976,22102,44652,83834,148296,249697,403333,628834,950907,1400150,2013921,2837269,3923920,5337334,7151808,9453650,12342408,15932161,20352865,25751770,32294883,40168502,49580805,60763501,73973536,89494870,107640300,128753354,153210240,181421857,213835861,250938802,293258307,341365334,395876481,457456357,526820008,604735414,692026032,789573410,898319856,1019271169,1153499425,1302145834,1466423643,1647621110,1847104533,2066321341,2306803240,2570169430,2858129868,3172488602,3515147160,3888108001,4293478021,4733472130,5210416875,5726754134,6285044865,6887972917,7538348896,8239114102,8993344512,9804254834,10675202616,11609692417,12611380033,13684076794,14831753907,16058546870,17368759941,18766870669,20257534480,21845589334,23536060428,25334164970,27245317008,29275132321,31429433365,33714254290,36135846003,38700681302,41415460065,44287114501,47322814456,50529972790,53916250800,57489563714,61258086240,65230258177,69414790081,73820669002,78457164267
pow $0,3
mov $1,$0
add $0,6
mul $0,$1
div $0,12
add $0,1
| 110.4
| 980
| 0.868659
|
be09716a9ee5e517f3c81cddfa926d5233aac4b4
| 1,930
|
asm
|
Assembly
|
Lista2/Lista2/Parte2/Programa17.asm
|
GustavoLR548/ACII-GLR
|
135690945f5e29938ef640a3d5475f8a12dbd76c
|
[
"MIT"
] | 1
|
2021-11-03T17:22:02.000Z
|
2021-11-03T17:22:02.000Z
|
Lista2/Lista2/Parte2/Programa17.asm
|
GustavoLR548/ACII-GLR
|
135690945f5e29938ef640a3d5475f8a12dbd76c
|
[
"MIT"
] | null | null | null |
Lista2/Lista2/Parte2/Programa17.asm
|
GustavoLR548/ACII-GLR
|
135690945f5e29938ef640a3d5475f8a12dbd76c
|
[
"MIT"
] | null | null | null |
.data
x: .word 3
.text
main:
ori $t0,$zero,0x1001 # t0 = 1001
sll $t0,$t0,16 # t0 *= 2^16 | t0 = 10010000
addi $t1,$zero,1 # t1 = 0 + 1 |t1 = count = 1
addi $t2, $zero,2 # t2 = 0 + 2 | t2 = expoente1 = 2
addi $t3, $zero,3 # t3 = 0 + 3 | t3 = expoente2 = 3
addi $t4, $zero,4 # t4 = 0 + 4 | t4 = expoente3 = 4
addi $t5, $zero,5 # t5 = 0 + 5 | t5 = expoente4 = 5
lw $s0, 0($t0) # Carregar o conteudo em 0 para s0 | s0 = x = 10
lw $s1, 0($t0) # Carregar o conteudo em 0 para s1 | s1 = x = 10
lw $s2, 0($t0) # Carregar o conteudo em 0 para s2 | s2 = x = 10
lw $s3, 0($t0) # Carregar o conteudo em 0 para s3 | s3 = x = 10
div $s0,$t2 # Dividir s0 por t2
mfhi $t6 # Mover o conteudo do HI para t6
bne $t6, $zero, impar # Ir para "impar" se t6 for igual a 0
par: # funcao "par"
addi $t1,$t1,1 # t1 += 1
mult $s1,$s0 # Multiplicar s1 por s0
mflo $s1 # Mover o conteudo de LO para s1 | s2 = k = (x y)
bne $t1, $t4, par # Ir para "par" se t1 for igual a t4
addi $t1,$zero,1 # t1 += 1
par2:
addi $t1,$t1,1 # t1 += 1
mult $s2,$s0 # Multiplicar s2 por s0
mflo $s2 # Mover o conteudo de LO para s2
bne $t1, $t3, par2 # Ir para "par2" se t1 for igual a t3
addi $t1,$zero,1 # t1 += 1
par3:
addi $t1,$t1,1 # t1 += 1
mult $s3,$s0 # Multiplicar s3 por s0 |
mflo $s3 # Mover o conteudo de LO para s3
sll $s3, $s3, 1 # s3 *= 2^1
add $s1,$s1,$s2 # s1 += s2
sub $s1,$s1,$s3 # s1 += s3
j fim # ir para "fim"
impar:
addi $t1,$t1,1 # t1 += 1
mult $s1,$s0 # (s1 * s0)
mflo $s1
bne $t1, $t5, impar
addi $t1,$zero,1 # t1 = 1
impar2:
addi $t1,$t1,1 # t1 = t1 + 1
mult $s2,$s0 # Multiplicar s1 por s0
mflo $s2 # Mover o conteudo de LO para s2
bne $t1, $t3, impar2 # Ir para "impar2" se t1 for igual a t3
sub $s1,$s1,$s2 # s1 -= s2
addi $s1, $s1, 1 # s1 += 1
fim:
sw $s1,4($t0) #Salvando o valor de k na memoria
| 28.382353
| 66
| 0.545078
|
e15bd9eb4d95a26c51c7f2c6044ffd5f87e0ccef
| 348
|
asm
|
Assembly
|
oeis/021/A021122.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/021/A021122.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/021/A021122.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A021122: Decimal expansion of 1/118.
; Submitted by Jon Maiga
; 0,0,8,4,7,4,5,7,6,2,7,1,1,8,6,4,4,0,6,7,7,9,6,6,1,0,1,6,9,4,9,1,5,2,5,4,2,3,7,2,8,8,1,3,5,5,9,3,2,2,0,3,3,8,9,8,3,0,5,0,8,4,7,4,5,7,6,2,7,1,1,8,6,4,4,0,6,7,7,9,6,6,1,0,1,6,9,4,9,1,5,2,5,4,2,3,7,2,8
seq $0,42 ; Unary representation of natural numbers.
mul $0,9
div $0,118
mod $0,10
| 38.666667
| 199
| 0.591954
|
d8e51b9c0a065293d9db7f6f62feedcbc313ece0
| 435
|
asm
|
Assembly
|
programs/oeis/075/A075363.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/075/A075363.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/075/A075363.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A075363: Triangle read by rows, in which n-th row gives n smallest powers of n.
; 1,2,4,3,9,27,4,16,64,256,5,25,125,625,3125,6,36,216,1296,7776,46656,7,49,343,2401,16807,117649,823543,8,64,512,4096,32768,262144,2097152,16777216,9,81,729,6561,59049,531441,4782969,43046721,387420489,10,100,1000,10000,100000,1000000,10000000,100000000,1000000000,10000000000
mov $1,1
lpb $0
add $1,1
mov $2,$0
trn $0,$1
lpe
pow $1,$2
mov $0,$1
| 36.25
| 276
| 0.731034
|
61dc231fb0c751b4d3621f2a1c108616a277cda8
| 8,444
|
asm
|
Assembly
|
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_1646.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_1646.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_1646.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 3
|
2020-07-14T17:07:07.000Z
|
2022-03-21T01:12:22.000Z
|
.global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r12
push %r15
push %r9
push %rax
push %rcx
push %rdi
push %rsi
lea addresses_D_ht+0x1aa6d, %rsi
lea addresses_UC_ht+0x12577, %rdi
nop
nop
add $12847, %r11
mov $8, %rcx
rep movsw
nop
nop
nop
xor %r12, %r12
lea addresses_normal_ht+0x112ed, %rdi
xor $63176, %rax
movl $0x61626364, (%rdi)
nop
nop
dec %rsi
lea addresses_UC_ht+0x34b5, %rsi
nop
nop
nop
sub $41520, %r11
movl $0x61626364, (%rsi)
nop
nop
nop
and $53202, %rdi
lea addresses_A_ht+0xdb2d, %r11
nop
nop
xor %r15, %r15
movb (%r11), %al
nop
nop
nop
nop
xor %r11, %r11
lea addresses_UC_ht+0x16395, %r15
dec %rsi
movb $0x61, (%r15)
xor $1161, %r15
lea addresses_normal_ht+0x5f6d, %rsi
lea addresses_D_ht+0x41dd, %rdi
xor %r9, %r9
mov $42, %rcx
rep movsw
nop
nop
nop
nop
dec %r11
lea addresses_D_ht+0x7845, %rdi
nop
nop
nop
nop
dec %rsi
mov (%rdi), %rcx
nop
and $44755, %rdi
lea addresses_D_ht+0x12af1, %rsi
lea addresses_WC_ht+0x1c9ed, %rdi
clflush (%rdi)
nop
nop
nop
xor $21248, %r11
mov $92, %rcx
rep movsw
inc %r12
lea addresses_WC_ht+0x5a6d, %r11
nop
cmp %rdi, %rdi
movb $0x61, (%r11)
dec %r11
lea addresses_A_ht+0x678d, %rsi
lea addresses_normal_ht+0xc4a9, %rdi
nop
nop
nop
nop
nop
cmp $54998, %r11
mov $10, %rcx
rep movsb
cmp $45994, %rcx
lea addresses_A_ht+0x1ad, %r9
nop
xor $45484, %r12
mov (%r9), %edi
nop
nop
sub %rsi, %rsi
lea addresses_UC_ht+0x937d, %rsi
lea addresses_D_ht+0x122ad, %rdi
clflush (%rdi)
nop
nop
sub %r15, %r15
mov $90, %rcx
rep movsl
sub %rcx, %rcx
lea addresses_normal_ht+0xd3cd, %rsi
clflush (%rsi)
nop
cmp $30045, %r15
mov (%rsi), %rdi
and $1616, %rcx
pop %rsi
pop %rdi
pop %rcx
pop %rax
pop %r9
pop %r15
pop %r12
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r13
push %r14
push %r9
push %rax
push %rbp
push %rcx
push %rdi
push %rsi
// Store
lea addresses_A+0xf2ed, %r9
nop
nop
nop
sub %r13, %r13
mov $0x5152535455565758, %r14
movq %r14, %xmm2
vmovups %ymm2, (%r9)
nop
nop
nop
nop
nop
xor %rax, %rax
// Store
lea addresses_D+0x326d, %rdi
nop
nop
xor %rbp, %rbp
mov $0x5152535455565758, %r9
movq %r9, (%rdi)
add %rdi, %rdi
// Store
lea addresses_A+0x2a6d, %rax
nop
nop
nop
nop
mfence
mov $0x5152535455565758, %r14
movq %r14, (%rax)
nop
nop
nop
nop
nop
and %rbp, %rbp
// REPMOV
lea addresses_WC+0x1766d, %rsi
lea addresses_RW+0x4ad, %rdi
sub $10672, %r13
mov $7, %rcx
rep movsl
nop
nop
xor %rbp, %rbp
// Store
lea addresses_normal+0xc186, %r11
nop
add $50655, %r14
movb $0x51, (%r11)
nop
nop
nop
nop
nop
add %rsi, %rsi
// Faulty Load
lea addresses_normal+0xb26d, %r14
and %rcx, %rcx
mov (%r14), %r13
lea oracles, %r14
and $0xff, %r13
shlq $12, %r13
mov (%r14,%r13,1), %r13
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r9
pop %r14
pop %r13
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0, 'same': False, 'type': 'addresses_normal'}, 'OP': 'LOAD'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 7, 'same': False, 'type': 'addresses_A'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 9, 'same': False, 'type': 'addresses_D'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 8, 'same': False, 'type': 'addresses_A'}, 'OP': 'STOR'}
{'src': {'congruent': 10, 'same': False, 'type': 'addresses_WC'}, 'dst': {'congruent': 4, 'same': False, 'type': 'addresses_RW'}, 'OP': 'REPM'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 0, 'same': False, 'type': 'addresses_normal'}, 'OP': 'STOR'}
[Faulty Load]
{'src': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 0, 'same': True, 'type': 'addresses_normal'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'congruent': 11, 'same': False, 'type': 'addresses_D_ht'}, 'dst': {'congruent': 1, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 7, 'same': True, 'type': 'addresses_normal_ht'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 3, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'STOR'}
{'src': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 6, 'same': True, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 2, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'STOR'}
{'src': {'congruent': 7, 'same': False, 'type': 'addresses_normal_ht'}, 'dst': {'congruent': 2, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'REPM'}
{'src': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 1, 'same': True, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 2, 'same': True, 'type': 'addresses_D_ht'}, 'dst': {'congruent': 7, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 11, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'STOR'}
{'src': {'congruent': 3, 'same': False, 'type': 'addresses_A_ht'}, 'dst': {'congruent': 0, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'REPM'}
{'src': {'NT': True, 'AVXalign': False, 'size': 4, 'congruent': 6, 'same': True, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 4, 'same': False, 'type': 'addresses_UC_ht'}, 'dst': {'congruent': 5, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'REPM'}
{'src': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 5, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'}
{'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
*/
| 33.641434
| 2,999
| 0.653837
|
23c1685e720d2b63e7bc3d1f20ea07ac0d91d44e
| 755
|
asm
|
Assembly
|
data/tms.asm
|
AmateurPanda92/pokemon-rby-dx
|
f7ba1cc50b22d93ed176571e074a52d73360da93
|
[
"MIT"
] | 9
|
2020-07-12T19:44:21.000Z
|
2022-03-03T23:32:40.000Z
|
data/tms.asm
|
JStar-debug2020/pokemon-rby-dx
|
c2fdd8145d96683addbd8d9075f946a68d1527a1
|
[
"MIT"
] | 7
|
2020-07-16T10:48:52.000Z
|
2021-01-28T18:32:02.000Z
|
data/tms.asm
|
JStar-debug2020/pokemon-rby-dx
|
c2fdd8145d96683addbd8d9075f946a68d1527a1
|
[
"MIT"
] | 2
|
2021-03-28T18:33:43.000Z
|
2021-05-06T13:12:09.000Z
|
TechnicalMachines:
db MEGA_PUNCH
db RAZOR_WIND
db SWORDS_DANCE
db WHIRLWIND
db MEGA_KICK
db TOXIC
db HORN_DRILL
db BODY_SLAM
db TAKE_DOWN
db DOUBLE_EDGE
db BUBBLEBEAM
db WATER_GUN
db ICE_BEAM
db BLIZZARD
db HYPER_BEAM
db PAY_DAY
db SUBMISSION
db COUNTER
db SEISMIC_TOSS
db RAGE
db MEGA_DRAIN
db SOLARBEAM
db DRAGON_RAGE
db THUNDERBOLT
db THUNDER
db EARTHQUAKE
db FISSURE
db DIG
db PSYCHIC_M
db TELEPORT
db MIMIC
db DOUBLE_TEAM
db REFLECT
db BIDE
db METRONOME
db SELFDESTRUCT
db EGG_BOMB
db FIRE_BLAST
db SWIFT
db SKULL_BASH
db SOFTBOILED
db DREAM_EATER
db SKY_ATTACK
db REST
db THUNDER_WAVE
db PSYWAVE
db EXPLOSION
db ROCK_SLIDE
db TRI_ATTACK
db SUBSTITUTE
db CUT
db FLY
db SURF
db STRENGTH
db FLASH
| 13.245614
| 18
| 0.778808
|
2a7978bedca54e491d131ee412f22ee88bd85086
| 432
|
asm
|
Assembly
|
programs/oeis/024/A024029.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | 1
|
2021-03-15T11:38:20.000Z
|
2021-03-15T11:38:20.000Z
|
programs/oeis/024/A024029.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/024/A024029.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
; A024029: a(n) = 3^n-n^6.
; 1,2,-55,-702,-4015,-15382,-45927,-115462,-255583,-511758,-940951,-1594414,-2454543,-3232486,-2746567,2958282,26269505,105002594,353408265,1115215586,3422784401,10374587082,31267679705,93995142938,282238433505,847044468818,2541556912553,7625210064498,22876310564657,68629782541562,205890403094649,617672508780266,1853019115110017,5559059275087554
mov $1,3
pow $1,$0
pow $0,6
add $0,1
sub $1,$0
add $1,1
| 43.2
| 347
| 0.791667
|
3656a61db43846f0bfc1e5a00aec6099d8f94af6
| 159
|
asm
|
Assembly
|
oeis/031/A031401.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/031/A031401.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/031/A031401.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A031401: Period of continued fraction for sqrt(A031400(n)).
; 1,2,4,8,4,4,4,4,4,4,4
lpb $0
gcd $0,3
mul $0,2
lpe
mov $1,2
pow $1,$0
mov $0,$1
mod $0,10
| 13.25
| 61
| 0.603774
|
ad56db0bbf7ef7ff388c6ebb8baf32855887e051
| 251
|
asm
|
Assembly
|
assembly/lab6/src/task1/dos.asm
|
sabertazimi/hust-lab
|
dc3425b6afe75ac3c1b48bb62fdd27c425284a0f
|
[
"MIT"
] | 29
|
2017-07-30T07:46:11.000Z
|
2021-11-21T15:51:04.000Z
|
assembly/lab6/src/task1/dos.asm
|
sabertazimi/hust-lab
|
dc3425b6afe75ac3c1b48bb62fdd27c425284a0f
|
[
"MIT"
] | 2
|
2018-03-22T10:09:35.000Z
|
2021-09-12T16:08:35.000Z
|
assembly/lab6/src/task1/dos.asm
|
sabertazimi/hust-lab
|
dc3425b6afe75ac3c1b48bb62fdd27c425284a0f
|
[
"MIT"
] | 9
|
2018-09-03T13:14:08.000Z
|
2021-06-25T17:00:46.000Z
|
.386
code segment use16 para public 'code'
assume cs: code
start:
mov ax, 3510h ; 获取10h的中断矢量
int 21h ; 段址保存在 es, 偏移址保存在 bx
mov ah, 4ch
int 21h
code ends
end start
| 20.916667
| 49
| 0.482072
|
362b1d6828b22f6fbf9cfd14c6d9f98eb58327ec
| 15,868
|
asm
|
Assembly
|
src/main/resources/Examples/Games/snake.asm
|
jimw278/MIPS
|
13d666f46ad945f038514768d975150d89cd612b
|
[
"Apache-2.0"
] | 3
|
2020-11-04T00:03:41.000Z
|
2020-11-30T00:35:39.000Z
|
src/main/resources/Examples/Games/snake.asm
|
jimw278/MIPS
|
13d666f46ad945f038514768d975150d89cd612b
|
[
"Apache-2.0"
] | 27
|
2020-09-01T00:44:10.000Z
|
2021-05-10T15:59:46.000Z
|
src/main/resources/Examples/Games/snake.asm
|
jimw278/MIPS
|
13d666f46ad945f038514768d975150d89cd612b
|
[
"Apache-2.0"
] | 1
|
2020-12-05T00:14:11.000Z
|
2020-12-05T00:14:11.000Z
|
main:
;add $1, $31, $0
;jal pushAll
;jal function
;jal popAll
;add $31, $1, $0
;use this when calling functions outside of main loop
jal 3
#define lol 5
#define loll 7
#define loll 7
trap lol
trap loll
#undef lol
#define lol 10
trap lol
lw $4, screenSizeX($0) ; setScreenSize
lw $5, screenSizeY($0)
trap 150
add $29, $0, $0;sets stack pointer to 0
addi $4, $0, 2
sw $4, snakeSize($0) ;sets starting size and direction
addi $4, $0, 1
sw $4, snakeCurrentSize($0)
addi $4, $0, 0
sw $4, snakeDirection($0)
addi $4, $0, 0 ;head
addi $8, $0, 2
lw $5, screenSizeX($0)
div $5, $8
mflo $5 ;middle of screen
addi $8, $0, 2
lw $6, screenSizeY($0)
div $6, $8
mflo $6 ;middle of screen
lw $7, snakeSize($0)
jal writeSnakeArray ;calls write snake array
jal newFoodPos ;set food position
jal drawScreen ;draws the first instance of the screen
loop:
jal userInput
jal collision ;checks snake collision with self and wall
lb $3, snakeRainbow($0)
bgtz $3, 1
bgtz $4, gameOver ;breaks if collision returns 1
jal snakeStep ;updates snake
jal checkFood ;checks if you ate food
jal drawScreen; draws screen
addi $4, $0, 40
trap 106
j loop
gameOver:
jal clearScreen;clears screen
jal printGameOverMessage ;prints game over message
jal userInput
j main
trap 0 ; end of program
printGameOverMessage:
lw $8, snakeSize($0) ;gets size
addi $8, $8, -2 ;subtracts one (the head)
lw $9, foodWorth($0)
div $8, $9 ;divides length by food worth to get points scored
mflo $4
trap 1
addi $4, $0, 10
trap 101
jr $31;returns
collision: ;checks collision all collision for snake
;returns 1 in register 4 if snake has hit something
add $1, $31, $0
jal pushAll
jal wallCollision ;reads snake head
jal popAll
add $31, $1, $0
bgtz $4, collisionReturnOne
add $1, $31, $0
jal pushAll
jal selfColision ;reads snake head
jal popAll
add $31, $1, $0
jr $31;returns
collisionReturnOne:
addi $4, $0, 1
jr $31 ;returns
selfColision: ;checks collision with self
add $4, $0, $0
add $1, $31, $0
jal pushAll
jal readSnakeArray ;reads snake head
jal popAll
add $31, $1, $0
add $10, $4, $0;puts head x and y in register 10 and 11
add $11, $5, $0
lw $8, snakeCurrentSize($0)
addi $8, $8, -1
beq $8, $0, selfColisionReturnZero
selfCollisionLoop:
add $4, $8, $0;puts loop index in register 4
add $1, $31, $0
jal pushAll
jal readSnakeArray ;reads snake head
jal popAll
add $31, $1, $0
sub $4, $4, $10 ; is zero when both x x position and y y positions are the same
sub $5, $5, $11
or $4, $4, $5
beq $4, $0, selfColisionReturnOne
addi $8, $8, -1
bgtz $8, selfCollisionLoop
selfColisionReturnZero:
add $4, $0, $0
jr $31 ;returns
selfColisionReturnOne:
addi $4, $0, 1
jr $31 ;returns
wallCollision: ;checks if the snake has hit the wall
;returns 1 in register 4 if snake has hit something
add $4, $0, $0
add $1, $31, $0
jal pushAll
jal readSnakeArray ;reads snake head
jal popAll
add $31, $1, $0
lw $8, screenSizeX($0)
addi $8, $8, -1
lw $9, screenSizeY($0)
addi $9, $9, -1
addi $10, $0, 1
beq $6, $10, wallCollisionUp
addi $10, $0, 0
beq $6, $10, wallCollisionRight
addi $10, $0, 3
beq $6, $10, wallCollisionDown
addi $10, $0, 2
beq $6, $10, wallCollisionLeft
wallCollisionUp:
bne $5, $0, wallCollisionReturnFalse
j wallCollisionReturnTrue
wallCollisionRight:
bne $4, $8, wallCollisionReturnFalse
j wallCollisionReturnTrue
wallCollisionDown:
bne $5, $9, wallCollisionReturnFalse
j wallCollisionReturnTrue
wallCollisionLeft:
bne $4, $0, wallCollisionReturnFalse
j wallCollisionReturnTrue
wallCollisionReturnFalse:
add $4, $0, $0
jr $31;returns 0
wallCollisionReturnTrue:
addi $4, $0, 1
jr $31; returns 1
userInput:
addi $8, $0, 10
lw $7, snakeDirection($0)
addi $4, $0, 114 ;r for rainbow
trap 104 ;gets user input
addi $4, $0, 1
blez $2, 1
sb $4, snakeRainbow($0)
addi $4, $0, 110 ;n for noraml
trap 104 ;gets user input
blez $2, 1
sb $0, snakeRainbow($0)
addi $4, $0, 100 ;right (0) aka d
trap 104 ;gets user input
addi $6, $0, 2
beq $7, $6, 1 ;skips if left
bgtz $2, userInputRight
addi $4, $0, 119 ;up (1) aka w
trap 104 ;gets user input
addi $6, $0, 3
beq $7, $6, 1 ;skips if down
bgtz $2, userInputUp
addi $4, $0, 97 ;left (2) aka a
trap 104 ;gets user input
addi $6, $0, 0
beq $7, $6, 1 ;skips if right
bgtz $2, userInputLeft
addi $4, $0, 115 ;down (3) aka s
trap 104 ;gets user input
addi $6, $0, 1
beq $7, $6, 1 ;skips if up
bgtz $2, userInputDown
j endUserInput
userInputRight:
addi $4, $0, 0
sw $4, snakeDirection($0) ;saves key code
j endUserInput
userInputUp:
addi $4, $0, 1
sw $4, snakeDirection($0) ;saves key code
j endUserInput
userInputLeft:
addi $4, $0, 2
sw $4, snakeDirection($0) ;saves key code
j endUserInput
userInputDown:
addi $4, $0, 3
sw $4, snakeDirection($0) ;saves key code
j endUserInput
endUserInput:
add $4, $0, $0
add $1, $31, $0
jal pushAll
jal readSnakeArray ;reads snake head
jal popAll
add $31, $1, $0
lw $7, snakeDirection($0) ;loads new direction into register 6
add $6, $5, $0 ;puts y in register 6
add $5, $4, $0 ;puts x in register 5
add $4, $0, $0 ;sets index to 0
add $1, $31, $0
jal pushAll
jal writeSnakeArray ;writes new snake head
jal popAll
add $31, $1, $0
jr $31 ;returns
checkFood:
add $4, $0, $0 ;sets index to zero
add $1, $31, $0
jal pushAll
jal readSnakeArray ;calls read snake array
jal popAll
add $31, $1, $0
add $8, $4, $0;sets register 8 to x
add $9, $5, $0;sets register 9 to y
add $1, $31, $0
jal pushAll
jal getFoodPos ;calls read snake array
jal popAll
add $31, $1, $0
bne $8, $4, checkFoodReturn ;returns x if not equal
bne $9, $5, checkFoodReturn ;returns y if not equal
lw $10, snakeSize($0);loads size
lw $11, foodWorth($0);loads how much to grow
add $10, $10, $11;adds one
sw $10, snakeSize($0)
add $1, $31, $0
jal pushAll
jal newFoodPos ;calls read snake array
jal popAll
add $31, $1, $0
checkFoodReturn:
jr $31;returns
newFoodPos: ;sets food pos to a random location
lw $8, screenSizeX($0)
addi $8, $8, -1
lw $9, screenSizeY($0)
addi $9, $9, -1
add $4, $0, $0
add $5, $8, $0
trap 99
add $10, $2, $0 ;sets register 10 to random x location
add $4, $0, $0
add $5, $9, $0
trap 99
add $11, $2, $0 ;sets register 11 to random y location
add $4, $10, $0 ;puts x and y in register 4 and 5
add $5, $11, $0
add $1, $31, $0
jal pushAll
jal setFoodPos ;calls read snake array
jal popAll
add $31, $1, $0
jr $31;returns
drawFood: ;draws food on screen
add $1, $31, $0
jal pushAll
jal getFoodPos ;calls read snake array
jal popAll
add $31, $1, $0
add $11, $4, $0
add $12, $5, $0
lb $10, snakeRainbow($0)
bgtz $10, 2 ; red food
addi $6, $0, 255
sll $6, $6, 16
blez $10, 8 ; ranbow food
trap 130
sra $4, $2, 3
;addi $8, $0, 1023
;div $2, $8
;mfhi $4
addi $5, $0, 255
addi $6, $0, 255
trap 155
add $6, $4, $0
add $4, $11, $0
add $5, $12, $0
trap 151
jr $31;returns
getFoodPos:;returns food x pos in register 4
;returns foox y pos in register 5
lw $4, foodPos($0)
sra $5, $4, 8
andi $4, $4, 255
andi $5, $5, 255
jr $31;returns
setFoodPos: ;register 4 is x
;register 5 is y
sll $5, $5, 8
or $4, $4, $5
sw $4, foodPos($0) ;saves food pos
jr $31;returns
snakeStep: ;moves snake one step
lw $8, snakeCurrentSize($0)
addi $8, $8, -1 ;size includes head at index 0
add $1, $31, $0
jal pushAll
jal grow ;calls read snake array
jal popAll
add $31, $1, $0
snakeStepLoop:
add $4, $8, $0 ;puts register 8 in register 4
add $1, $31, $0
jal pushAll
jal snakeSingleStep ;calls read snake array
jal popAll
add $31, $1, $0
addi $8, $8, -1 ;subtracts one from index
addi $9, $8, 1
bgtz $9, snakeStepLoop ;jump if greater or equal to zero
jr $31 ;returns
grow: ;checks if the snake has to grow and do so if true
lw $8, snakeCurrentSize($0)
lw $9, snakeSize($0)
beq $8, $9, growReturn ;returns if snake deosnt have to grow
addi $4, $8, -1 ;puts last snake index into register 4
add $1, $31, $0
jal pushAll
jal readSnakeArray ;calls read snake array
jal popAll
add $31, $1, $0
add $7, $6, $0 ;puts direction in reg 7
add $6, $5, $0 ;puts y in reg 6
add $5, $4, $0 ;puts x in reg 5
add $4, $8, $0 ;puts index in reg 4
add $1, $31, $0
jal pushAll
jal writeSnakeArray ;writes old tail into further index
jal popAll
add $31, $1, $0
addi $4, $8, 1
sw $4, snakeCurrentSize($0)
growReturn:
jr $31
snakeSingleStep: ;register 4 is index to step
add $16, $4, $0 ;saves index for later
blez $16, snakeSingleStepDirectionIndexZero ;special case for head aka zero index
addi $4, $4, -1 ;next value in snake array (closer to head)
add $1, $31, $0
jal pushAll
jal readSnakeArray ;gets direction from previouse sname position
jal popAll
add $31, $1, $0
add $7, $6, $0 ;puts next snake direction in register 7
add $6, $5, $0 ;puts x in register 5
add $5, $4, $0 ;puts y in register 6
addi $4, $16, 0
add $1, $31, $0
jal pushAll
jal writeSnakeArray
jal popAll
add $31, $1, $0
jr $31 ;returns
snakeSingleStepDirectionIndexZero:
add $1, $31, $0
jal pushAll
jal readSnakeArray ;calls read snake array
jal popAll
add $31, $1, $0
lw $10, screenSizeX($0)
addi $10, $10, -1
lw $11, screenSizeY($0)
addi $11, $11, -1
addi $7, $0, 0
beq $6, $7, snakeSingleStepRight
addi $7, $0, 1
beq $6, $7, snakeSingleStepUp
addi $7, $0, 2
beq $6, $7, snakeSingleStepLeft
addi $7, $0, 3
beq $6, $7, snakeSingleStepDown
snakeSingleStepRight:
bne $4, $10, 2
add $4, $0, $0
j snakeSingleStepDirection
beq $4, $10, 1
addi $4, $4, 1 ;adds one to x
j snakeSingleStepDirection
snakeSingleStepUp:
bne $5, $0, 2
add $5, $11, $0
j snakeSingleStepDirection
beq $5, $0, 1
addi $5, $5, -1 ;adds one to x
j snakeSingleStepDirection
snakeSingleStepLeft:
bne $4, $0, 2
add $4, $10, $0
j snakeSingleStepDirection
beq $4, $0, 1
addi $4, $4, -1 ;adds one to x
j snakeSingleStepDirection
snakeSingleStepDown:
bne $5, $11, 2
add $5, $0, $0
j snakeSingleStepDirection
beq $5, $11, 1
addi $5, $5, 1 ;adds one to x
j snakeSingleStepDirection
snakeSingleStepDirection:
add $17, $4, $0 ;saves x for later
add $18, $5, $0 ;saves y for later
add $4, $16, $0 ;puts index in register 4
add $5, $17, $0 ;puts x in register 5
add $6, $18, $0 ;puts y in register 6
lw $7, snakeDirection($0) ;puts user snake direction in register 7
add $1, $31, $0
jal pushAll
jal writeSnakeArray
jal popAll
add $31, $1, $0
jr $31 ;returns
writeSnakeArray: ;index in register 4
;x pos in register 5
;y pos in register 6
;direction in register 7
sll $6, $6, 8
sll $7, $7, 16
or $5, $5, $6
or $5, $5, $7
addi $8, $0, 4 ;multiplys index by 4 because its a word 32 bits 4 bytes
mult $4, $8
mflo $4
sw $5, snake($4)
jr $31 ; returns
readSnakeArray: ; register 4 is the index head starts at index 0
;returns x in register 4
;returns y in register 5
;returns direction in register 6
;
addi $8, $0, 4 ;multiplys index by 4 because its a word 32 bits 4 bytes
mult $4, $8
mflo $4
lw $8, snake($4) ;loads value into register 8
andi $4, $8, 255
sra $5, $8, 8
andi $5, $5, 255
sra $6, $8, 16
andi $6, $6, 255
jr $31 ;returns
drawScreen:
add $1, $31, $0
jal pushAll
jal clearScreen ;clears screen
jal popAll
add $31, $1, $0
add $1, $31, $0
jal pushAll
jal drawSnake ;clears screen
jal popAll
add $31, $1, $0
add $1, $31, $0
jal pushAll
jal drawFood ;clears screen
jal popAll
add $31, $1, $0
trap 153
jr $31 ;returns
drawSnake:
lw $8, snakeCurrentSize($0)
addi $8, $8, -1 ;size includes head at index 0
blez $8, drawSnakeReturn
drawSnakeLoop:
add $4, $8, $0 ;puts register 8 in register 4
add $1, $31, $0
jal pushAll
jal readSnakeArray ;calls read snake array
jal popAll
add $31, $1, $0
lw $10, snakeCurrentSize($0) ;; color fading code
;sub $12, $10, $8
addi $11, $0, 2
div $10, $11
mflo $11
add $10, $11, $10
lb $12, snakeRainbow($0)
addi $6, $0, 255
blez $12, 1
sub $11, $8, $10
bgtz $12, 1
sub $11, $10, $8
mult $6, $11
mflo $6
div $6, $10 ;divice index by snake size
mflo $6
lb $12, snakeRainbow($0)
blez $12, noRainbow
add $10, $4, $0
add $11, $5, $0
addi $4, $6, 0
addi $5, $0, 255
addi $6, $0, 255
trap 155
add $6, $4, $0
add $4, $10, $0
add $5, $11, $0
noRainbow:
lb $12, snakeRainbow($0)
bgtz $12, 1
sll $6, $6, 8
trap 151
addi $8, $8, -1 ;subtracts one from index
addi $9, $8, 0
bgtz $9, drawSnakeLoop ;jump if greater or equal to zero
drawSnakeReturn:
add $4, $0, $0 ;putsindex 0 into register 4
add $1, $31, $0
jal pushAll
jal readSnakeArray ;calls read snake array
jal popAll
add $31, $1, $0
addi $6, $0, 255
lb $12, snakeRainbow($0)
blez $12, 1
sll $6, $6, 16
bgtz $12, 1
sll $6, $6, 8
trap 151
jr $31;returns
clearScreen: ;no arguments and arguments dont change
lw $9, screenSizeY($0) ;loops throught all of screen code
clearScreenYLoop:
lw $8, screenSizeX($0)
clearScreenXLoop:
add $6, $0, $0 ;puts 0 in register 6
addi $4, $8, -1 ;puts x index in register 4
addi $5, $9, -1 ;puts x index in register 5
trap 151
addi $8, $8, -1
bgtz $8, clearScreenXLoop
addi $9, $9, -1
bgtz $9, clearScreenYLoop
jr $31 ;returns
if: ; needs $5, $6, $7 register 5 and 6 are the two values being compaired
;register 7 is what type of compairison is being used
;0 (5 == 6), 1(5 != 6), 2 (5 < 6), 3 (5 > 6), 4 (5 <= 6), 5 (5 >= 6)
;returns 1 if true or 0 if not in register 7
addi $8, $0, 0
beq $7, $8, ifEqual ;calls the method the user choose
addi $8, $0, 1
beq $7, $8, ifNotEqual
addi $8, $0, 2
beq $7, $8, ifLessThan
addi $8, $0, 3
beq $7, $8, ifGreaterThan
addi $8, $0, 4
beq $7, $8, ifLessThanOrEqual
addi $8, $0, 5
beq $7, $8, ifGreaterThanOrEqual
ifEqual:
beq $5, $6, ifReturnOne
j ifReturnZero
ifNotEqual:
bne $5, $6, ifReturnOne
j ifReturnZero
ifLessThan:
slt $8, $5, $6
bgtz $8, ifReturnOne
j ifReturnZero
ifGreaterThan:
slt $8, $6, $5
bgtz $8, ifReturnOne
j ifReturnZero
ifLessThanOrEqual:
addi $6, $6, 1
slt $8, $5, $6
bgtz $8, ifReturnOne
j ifReturnZero
ifGreaterThanOrEqual:
addi $5, $5, 1
slt $8, $6, $5
bgtz $8, ifReturnOne
j ifReturnZero
ifReturnZero:
addi $7, $0, 0 ; puts 0 in return register
jr $31 ; returns
ifReturnOne:
addi $7, $0, 1 ; puts 1 in return register
jr $31 ; returns
pushAll: ;pushes all data to stack
addi $29, $29, 4 ;increments stack pointer
sw $1, stack($29) ;puts register 1 (previous return address) into stack
addi $29, $29, 4 ;increments stack pointer
sw $8, stack($29) ;puts register 1 (previous return address) into stack
addi $29, $29, 4 ;increments stack pointer
sw $9, stack($29) ;puts register 1 (previous return address) into stack
addi $29, $29, 4 ;increments stack pointer
sw $10, stack($29) ;puts register 1 (previous return address) into stack
addi $29, $29, 4 ;increments stack pointer
sw $11, stack($29) ;puts register 1 (previous return address) into stack
jr $31;return
popAll: ;pops all data to stack
lw $11, stack($29) ;puts (previous return address) into register 1
addi $29, $29, -4 ;decrements stack pointer
lw $10, stack($29) ;puts (previous return address) into register 1
addi $29, $29, -4 ;decrements stack pointer
lw $9, stack($29) ;puts (previous return address) into register 1
addi $29, $29, -4 ;decrements stack pointer
lw $8, stack($29) ;puts (previous return address) into register 1
addi $29, $29, -4 ;decrements stack pointer
lw $1, stack($29) ;puts (previous return address) into register 1
addi $29, $29, -4 ;decrements stack pointer
jr $31;return
data: ;data section
screenSizeX: ;screen size x
.word 62
screenSizeY: ;screen size y
.word 40
snakeSize: ;size of the snake or size the snake must grow to
.word 1
snakeCurrentSize: ; must be 1 or more zero is always a part of the snake
.word 1
snakeDirection: ;right is 0, up is 1, 2 is left and 3 is down
.word 0
foodPos: ;food position
.word 0
foodWorth: ;the ammount the snake grows by every time he eats
.word 4
stack: ;stack space
.space 400
snake: ;snake data
.space 5000
.space 3
snakeRainbow:
.byte 0
| 18.472643
| 81
| 0.667822
|
ba0b0147d49a4eebc37dfab0041bae90bd78caa5
| 1,216
|
asm
|
Assembly
|
programs/oeis/001/A001287.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/001/A001287.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/001/A001287.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A001287: a(n) = binomial coefficient C(n,10).
; 1,11,66,286,1001,3003,8008,19448,43758,92378,184756,352716,646646,1144066,1961256,3268760,5311735,8436285,13123110,20030010,30045015,44352165,64512240,92561040,131128140,183579396,254186856,348330136,472733756,635745396,847660528,1121099408,1471442973,1917334783,2481256778,3190187286,4076350421,5178066751,6540715896,8217822536,10272278170,12777711870,15820024220,19499099620,23930713170,29248649430,35607051480,43183019880,52179482355,62828356305,75394027566,90177170226,107518933731,127805525001,151473214816,179013799328,210980549208,247994680648,290752384208,340032449328,396704524216,461738052776,536211932256,621324937376,718406958841,828931106355,954526728530,1096993404430,1258315963905,1440680596355,1646492110120,1878392407320,2139280241670,2432332329570,2761025887620,3129162672636,3540894603246,4000751045226,4513667845896,5085018206136,5720645481903,6426898010533,7210666060598,8079421007658,9041256841903,10104934117421,11279926456656,12576469727536,14005614014756,15579278510796,17310309456440,19212541264840,21300860967540,23591276125340,26100986351440,28848458598960,31853506369685,35137373005735,38722819230810,42634215112710
add $0,10
bin $0,10
| 202.666667
| 1,146
| 0.895559
|
9343485801ff5d39ddb856af0b2fb161ea292135
| 282
|
asm
|
Assembly
|
oeis/301/A301587.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/301/A301587.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/301/A301587.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A301587: Positive integers m such that whenever n is in the range of the Euler totient function, so is m*n.
; 1,2,4,6,8,12,16,18,20,24
mul $0,2
mov $4,1
lpb $0
mov $2,$0
sub $0,2
seq $2,127973 ; a(2n)=A060632(n); a(2n+1)=A048896(n)/2.
add $3,$2
mov $4,$3
lpe
mov $0,$4
| 20.142857
| 109
| 0.620567
|
32e168d3460ac2522e77788d353654df679f27db
| 3,477
|
asm
|
Assembly
|
programs/oeis/030/A030180.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | 1
|
2021-03-15T11:38:20.000Z
|
2021-03-15T11:38:20.000Z
|
programs/oeis/030/A030180.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/030/A030180.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
; A030180: a(n) = (n^7 - n)/42.
; 0,0,3,52,390,1860,6665,19608,49932,113880,238095,463980,853138,1494012,2509845,4068080,6391320,9769968,14576667,21282660,30476190,42883060,59389473,81067272,109201700,145321800,191233575,249056028,321260202,410711340,520714285,655062240,818089008,1014724832,1250555955,1531888020,1865813430,2260282788,2724180537,3267404920,3900952380,4637006520,5489031743,6471871692,7601852610,8896891740,10376610885,12062455248,13977817672,16148168400,18601190475,21366920900,24477897678,27969312852,31879171665,36248457960,41121305940,46545178408,52571051607,59253606780,66651428570,74827210380,83847966813,93785253312,104715393120,116719711680,129884778595,144302657268,160071162342,177294125060,196081666665,216550479960,238824119148,263033298072,289316196975,317818777900,348695108850,382107696828,418227829877,457235928240,499321904760,544685534640,593536834683,646096452132,702596063230,763278781620,828399576705,898225702088,973037134212,1053127021320,1138802142855,1230383379420,1328206193418,1432621120492,1543994271885,1662707847840,1789160662160,1923768678048,2066965555347,2219203209300,2380952380950,2552703219300,2734965875353,2928271108152,3133170902940,3350239101560,3580072045215,3823289229708,4080533973282,4352474097180,4639802619045,4943238459280,5263527160488,5601441620112,5957782836395,6333380667780,6729094605870,7145814562068,7584461668017,8045989089960,8531382857140,9041662704360,9577882928823,10141133261372,10732539752250,11353265671500,12004512424125,12687520480128,13403570319552,14153983392640,14940123095235,15763395759540,16625251660358,17527186036932,18470740130505,19457502237720,20489108779980,21567245388888,22693648007887,23870104010220,25098453333330,26380589629820,27718461435093,29114073351792,30569487251160,32086823491440,33668262153435,35316044293348,37032473213022,38819915747700,40680803571425,42617634520200,44632973933028,46729456010952,48909785194215,51176737557660,53533162224490,55981982798508,58526198814957,61168887210080,63913203809520,66762384835680,69719748434163,72788696219412,75972714839670,79275377561380,82700345873145,86251371109368,89932296093692,93747056802360,97699684047615,101794305181260,106035145818498,110426531582172,114972889867525,119678751627600,124548753179400,129587638030928,134800258729227,140191578729540,145766674285710,151530736361940,157489072566033,163647109104232,170010392757780,176584592881320,183375503423255,190389044968188,197631266801562,205108348996620,212826604523805,220792481382720,229012564756768,237493579190592,246242390790435,255266009447540,264571591084710,274166439926148,284058010790697,294253911408600,304761904761900,315589911448600,326746012070703,338238449646252,350075632045490,362266134451260,374818701843765,387742251509808,401045875576632,414738843570480,428830604999995,443330791964580,458249221787838,473595899676212,489381021402945,505614976017480,522308348580420,539471922924168,557116684439367,575253822887260,593894735238090,613051028535660,632734522788173,652957253885472,673731476542800,695069667271200,716984527374675,739488985974228,762596203058902,786319572563940,810672725476185,835669532966840,861324109551708,887650816279032,914664263945055,942379316337420,970811093506530,999974975064988,1029886603515237,1060561887605520,1092017005714280,1124268409263120,1157332826158443,1191227264261892,1225969014889710,1261575656341140,1298065057455985,1335455381201448,1373765088288372,1413012940817000
mov $1,$0
pow $1,7
sub $1,$0
div $1,42
| 434.625
| 3,404
| 0.916882
|
dc836de343d63d3a2936d070647edd11a092b299
| 7,281
|
asm
|
Assembly
|
Transynther/x86/_processed/US/_zr_/i7-7700_9_0x48.log_21829_1457.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/US/_zr_/i7-7700_9_0x48.log_21829_1457.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/US/_zr_/i7-7700_9_0x48.log_21829_1457.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 3
|
2020-07-14T17:07:07.000Z
|
2022-03-21T01:12:22.000Z
|
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r13
push %r9
push %rax
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_A_ht+0xaf94, %rsi
lea addresses_WT_ht+0x19fd4, %rdi
nop
nop
nop
nop
nop
inc %r13
mov $3, %rcx
rep movsl
nop
nop
inc %rax
lea addresses_UC_ht+0x881c, %rsi
lea addresses_UC_ht+0x1db94, %rdi
nop
nop
xor %r9, %r9
mov $73, %rcx
rep movsw
nop
nop
inc %r9
lea addresses_WT_ht+0xa394, %rdi
nop
sub %r9, %r9
mov $0x6162636465666768, %rcx
movq %rcx, %xmm6
movups %xmm6, (%rdi)
nop
nop
nop
nop
nop
and $64406, %rdi
lea addresses_normal_ht+0x1823c, %rdi
nop
inc %r10
mov (%rdi), %rsi
inc %rdi
lea addresses_WT_ht+0x12094, %rsi
lea addresses_WC_ht+0x1df94, %rdi
clflush (%rdi)
nop
cmp %rdx, %rdx
mov $121, %rcx
rep movsb
xor %rdx, %rdx
lea addresses_A_ht+0x1448c, %r13
nop
nop
nop
nop
nop
cmp $60161, %rsi
mov (%r13), %di
nop
nop
nop
dec %r13
lea addresses_UC_ht+0x16994, %rsi
lea addresses_normal_ht+0x1e154, %rdi
nop
nop
xor %rax, %rax
mov $26, %rcx
rep movsl
nop
nop
cmp %rdx, %rdx
lea addresses_WT_ht+0x16e94, %rsi
lea addresses_WC_ht+0xce94, %rdi
nop
nop
nop
nop
sub %rdx, %rdx
mov $124, %rcx
rep movsw
nop
cmp %rdx, %rdx
lea addresses_normal_ht+0x3f94, %r9
nop
nop
nop
nop
nop
and %rsi, %rsi
movw $0x6162, (%r9)
nop
nop
nop
nop
sub %rax, %rax
lea addresses_WC_ht+0x1c0c9, %rax
nop
nop
nop
add %r9, %r9
movl $0x61626364, (%rax)
and $12861, %r9
lea addresses_UC_ht+0x73ea, %rax
and %r10, %r10
mov (%rax), %dx
nop
nop
nop
sub %rdi, %rdi
lea addresses_WT_ht+0x1f94, %rdx
clflush (%rdx)
nop
nop
nop
xor $15434, %r13
mov $0x6162636465666768, %rax
movq %rax, %xmm6
vmovups %ymm6, (%rdx)
nop
nop
sub %rdx, %rdx
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rax
pop %r9
pop %r13
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r13
push %r14
push %r8
push %r9
push %rax
push %rcx
push %rdi
// Load
lea addresses_PSE+0x1ff94, %r14
nop
dec %rdi
mov (%r14), %rcx
add $38920, %r8
// Faulty Load
lea addresses_US+0xc794, %r13
clflush (%r13)
nop
xor $29081, %r9
vmovups (%r13), %ymm2
vextracti128 $0, %ymm2, %xmm2
vpextrq $0, %xmm2, %r14
lea oracles, %r9
and $0xff, %r14
shlq $12, %r14
mov (%r9,%r14,1), %r14
pop %rdi
pop %rcx
pop %rax
pop %r9
pop %r8
pop %r14
pop %r13
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_US', 'AVXalign': False, 'congruent': 0, 'size': 32, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'AVXalign': False, 'congruent': 11, 'size': 8, 'same': False, 'NT': True}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_US', 'AVXalign': False, 'congruent': 0, 'size': 32, 'same': True, 'NT': False}}
<gen_prepare_buffer>
{'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 4, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 10, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 10, 'size': 16, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 2, 'size': 8, 'same': False, 'NT': True}}
{'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 11, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 3, 'size': 2, 'same': False, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 6, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 8, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 11, 'size': 2, 'same': False, 'NT': True}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 0, 'size': 4, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 1, 'size': 2, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 8, 'size': 32, 'same': False, 'NT': False}}
{'00': 21829}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
| 36.044554
| 2,999
| 0.658014
|
274e6ab117e536b17527153df35ba8acd350ae61
| 358
|
asm
|
Assembly
|
fileManagement/seek.asm
|
slowy07/learnAsm
|
d278573eecd96e0e56f720c92fe7783d33528e43
|
[
"MIT"
] | 1
|
2021-10-14T06:35:29.000Z
|
2021-10-14T06:35:29.000Z
|
fileManagement/seek.asm
|
coderzhaxor/asmSourceCode
|
95a349e5b6e4fb52d29528f15635708d2273e676
|
[
"MIT"
] | null | null | null |
fileManagement/seek.asm
|
coderzhaxor/asmSourceCode
|
95a349e5b6e4fb52d29528f15635708d2273e676
|
[
"MIT"
] | 1
|
2021-09-30T03:22:35.000Z
|
2021-09-30T03:22:35.000Z
|
section .text
global _start
section .data
fileName db 'impFile.txt', 0h
contentFile db 'make magic! --res--', 0h
_start:
mov ecx, 1
mov ebx, fileName
mov eax, 5
int 80h
mov edx, 2
mov ecx, 0
mov ebx, eax
mov eax, 19
int 80h
mov edx, 9
mov ecx, contentFile
mov eax, 4
int 80h
call quit
| 13.769231
| 44
| 0.572626
|
787ec62210c4370ab38a9c75fa0514e709ea14f9
| 1,045,087
|
asm
|
Assembly
|
kernel.asm
|
reubenct/OSproject-xv6
|
5257baa562465aa1a7402bf422ea94211e0e6687
|
[
"MIT-0"
] | 1
|
2017-05-16T11:41:39.000Z
|
2017-05-16T11:41:39.000Z
|
kernel.asm
|
reubenct/OSproject-xv6
|
5257baa562465aa1a7402bf422ea94211e0e6687
|
[
"MIT-0"
] | null | null | null |
kernel.asm
|
reubenct/OSproject-xv6
|
5257baa562465aa1a7402bf422ea94211e0e6687
|
[
"MIT-0"
] | null | null | null |
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>:
8010000c: 0f 20 e0 mov %cr4,%eax
8010000f: 83 c8 10 or $0x10,%eax
80100012: 0f 22 e0 mov %eax,%cr4
80100015: b8 00 90 10 00 mov $0x109000,%eax
8010001a: 0f 22 d8 mov %eax,%cr3
8010001d: 0f 20 c0 mov %cr0,%eax
80100020: 0d 00 00 01 80 or $0x80010000,%eax
80100025: 0f 22 c0 mov %eax,%cr0
80100028: bc d0 b5 10 80 mov $0x8010b5d0,%esp
8010002d: b8 50 2e 10 80 mov $0x80102e50,%eax
80100032: ff e0 jmp *%eax
80100034: 66 90 xchg %ax,%ax
80100036: 66 90 xchg %ax,%ax
80100038: 66 90 xchg %ax,%ax
8010003a: 66 90 xchg %ax,%ax
8010003c: 66 90 xchg %ax,%ax
8010003e: 66 90 xchg %ax,%ax
80100040 <binit>:
struct buf head;
} bcache;
void
binit(void)
{
80100040: 55 push %ebp
80100041: 89 e5 mov %esp,%ebp
80100043: 53 push %ebx
//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++){
80100044: bb 14 b6 10 80 mov $0x8010b614,%ebx
struct buf head;
} bcache;
void
binit(void)
{
80100049: 83 ec 14 sub $0x14,%esp
struct buf *b;
initlock(&bcache.lock, "bcache");
<<<<<<< HEAD
8010004c: 68 40 73 10 80 push $0x80107340
80100051: 68 e0 b5 10 80 push $0x8010b5e0
80100056: e8 95 44 00 00 call 801044f0 <initlock>
=======
8010004c: c7 44 24 04 c0 70 10 movl $0x801070c0,0x4(%esp)
80100053: 80
80100054: c7 04 24 e0 b5 10 80 movl $0x8010b5e0,(%esp)
8010005b: e8 a0 42 00 00 call 80104300 <initlock>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
//PAGEBREAK!
// Create linked list of buffers
bcache.head.prev = &bcache.head;
bcache.head.next = &bcache.head;
<<<<<<< HEAD
for(b = bcache.buf; b < bcache.buf+NBUF; b++){
b->next = bcache.head.next;
80100088: 89 53 54 mov %edx,0x54(%ebx)
b->prev = &bcache.head;
8010008b: c7 43 50 dc fc 10 80 movl $0x8010fcdc,0x50(%ebx)
initsleeplock(&b->lock, "buffer");
80100092: 68 47 73 10 80 push $0x80107347
80100097: 50 push %eax
80100098: e8 43 43 00 00 call 801043e0 <initsleeplock>
bcache.head.next->prev = b;
8010009d: a1 30 fd 10 80 mov 0x8010fd30,%eax
=======
80100060: ba dc fc 10 80 mov $0x8010fcdc,%edx
initlock(&bcache.lock, "bcache");
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
//PAGEBREAK!
// Create linked list of buffers
bcache.head.prev = &bcache.head;
80100065: c7 05 2c fd 10 80 dc movl $0x8010fcdc,0x8010fd2c
8010006c: fc 10 80
bcache.head.next = &bcache.head;
8010006f: c7 05 30 fd 10 80 dc movl $0x8010fcdc,0x8010fd30
80100076: fc 10 80
80100079: eb 09 jmp 80100084 <binit+0x44>
8010007b: 90 nop
8010007c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80100080: 89 da mov %ebx,%edx
for(b = bcache.buf; b < bcache.buf+NBUF; b++){
80100082: 89 c3 mov %eax,%ebx
80100084: 8d 43 0c lea 0xc(%ebx),%eax
b->next = bcache.head.next;
80100087: 89 53 54 mov %edx,0x54(%ebx)
b->prev = &bcache.head;
8010008a: c7 43 50 dc fc 10 80 movl $0x8010fcdc,0x50(%ebx)
initsleeplock(&b->lock, "buffer");
80100091: 89 04 24 mov %eax,(%esp)
80100094: c7 44 24 04 c7 70 10 movl $0x801070c7,0x4(%esp)
8010009b: 80
8010009c: e8 4f 41 00 00 call 801041f0 <initsleeplock>
bcache.head.next->prev = b;
801000a1: a1 30 fd 10 80 mov 0x8010fd30,%eax
801000a6: 89 58 50 mov %ebx,0x50(%eax)
//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++){
801000a9: 8d 83 5c 02 00 00 lea 0x25c(%ebx),%eax
801000af: 3d dc fc 10 80 cmp $0x8010fcdc,%eax
b->next = bcache.head.next;
b->prev = &bcache.head;
initsleeplock(&b->lock, "buffer");
bcache.head.next->prev = b;
bcache.head.next = b;
801000b4: 89 1d 30 fd 10 80 mov %ebx,0x8010fd30
//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++){
801000ba: 75 c4 jne 80100080 <binit+0x40>
b->prev = &bcache.head;
initsleeplock(&b->lock, "buffer");
bcache.head.next->prev = b;
bcache.head.next = b;
}
}
801000bc: 83 c4 14 add $0x14,%esp
801000bf: 5b pop %ebx
801000c0: 5d pop %ebp
801000c1: c3 ret
801000c2: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801000c9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801000d0 <bread>:
}
// Return a locked buf with the contents of the indicated block.
struct buf*
bread(uint dev, uint blockno)
{
801000d0: 55 push %ebp
801000d1: 89 e5 mov %esp,%ebp
801000d3: 57 push %edi
801000d4: 56 push %esi
801000d5: 53 push %ebx
801000d6: 83 ec 1c sub $0x1c,%esp
801000d9: 8b 75 08 mov 0x8(%ebp),%esi
static struct buf*
bget(uint dev, uint blockno)
{
struct buf *b;
acquire(&bcache.lock);
<<<<<<< HEAD
801000df: 68 e0 b5 10 80 push $0x8010b5e0
801000e4: e8 27 44 00 00 call 80104510 <acquire>
=======
801000dc: c7 04 24 e0 b5 10 80 movl $0x8010b5e0,(%esp)
}
// Return a locked buf with the contents of the indicated block.
struct buf*
bread(uint dev, uint blockno)
{
801000e3: 8b 7d 0c mov 0xc(%ebp),%edi
static struct buf*
bget(uint dev, uint blockno)
{
struct buf *b;
acquire(&bcache.lock);
801000e6: e8 95 42 00 00 call 80104380 <acquire>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// Is the block already cached?
for(b = bcache.head.next; b != &bcache.head; b = b->next){
801000eb: 8b 1d 30 fd 10 80 mov 0x8010fd30,%ebx
801000f1: 81 fb dc fc 10 80 cmp $0x8010fcdc,%ebx
801000f7: 75 12 jne 8010010b <bread+0x3b>
801000f9: eb 25 jmp 80100120 <bread+0x50>
801000fb: 90 nop
801000fc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80100100: 8b 5b 54 mov 0x54(%ebx),%ebx
80100103: 81 fb dc fc 10 80 cmp $0x8010fcdc,%ebx
80100109: 74 15 je 80100120 <bread+0x50>
if(b->dev == dev && b->blockno == blockno){
8010010b: 3b 73 04 cmp 0x4(%ebx),%esi
8010010e: 75 f0 jne 80100100 <bread+0x30>
80100110: 3b 7b 08 cmp 0x8(%ebx),%edi
80100113: 75 eb jne 80100100 <bread+0x30>
b->refcnt++;
80100115: 83 43 4c 01 addl $0x1,0x4c(%ebx)
80100119: eb 3f jmp 8010015a <bread+0x8a>
8010011b: 90 nop
8010011c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
}
// Not cached; recycle some unused buffer and clean buffer
// "clean" because B_DIRTY and not locked means log.c
// hasn't yet committed the changes to the buffer.
for(b = bcache.head.prev; b != &bcache.head; b = b->prev){
80100120: 8b 1d 2c fd 10 80 mov 0x8010fd2c,%ebx
80100126: 81 fb dc fc 10 80 cmp $0x8010fcdc,%ebx
8010012c: 75 0d jne 8010013b <bread+0x6b>
8010012e: eb 58 jmp 80100188 <bread+0xb8>
80100130: 8b 5b 50 mov 0x50(%ebx),%ebx
80100133: 81 fb dc fc 10 80 cmp $0x8010fcdc,%ebx
80100139: 74 4d je 80100188 <bread+0xb8>
if(b->refcnt == 0 && (b->flags & B_DIRTY) == 0) {
8010013b: 8b 43 4c mov 0x4c(%ebx),%eax
8010013e: 85 c0 test %eax,%eax
80100140: 75 ee jne 80100130 <bread+0x60>
80100142: f6 03 04 testb $0x4,(%ebx)
80100145: 75 e9 jne 80100130 <bread+0x60>
b->dev = dev;
80100147: 89 73 04 mov %esi,0x4(%ebx)
b->blockno = blockno;
8010014a: 89 7b 08 mov %edi,0x8(%ebx)
b->flags = 0;
8010014d: c7 03 00 00 00 00 movl $0x0,(%ebx)
b->refcnt = 1;
80100153: c7 43 4c 01 00 00 00 movl $0x1,0x4c(%ebx)
release(&bcache.lock);
<<<<<<< HEAD
8010015a: 83 ec 0c sub $0xc,%esp
8010015d: 68 e0 b5 10 80 push $0x8010b5e0
80100162: e8 89 45 00 00 call 801046f0 <release>
acquiresleep(&b->lock);
80100167: 8d 43 0c lea 0xc(%ebx),%eax
8010016a: 89 04 24 mov %eax,(%esp)
8010016d: e8 ae 42 00 00 call 80104420 <acquiresleep>
80100172: 83 c4 10 add $0x10,%esp
=======
8010015a: c7 04 24 e0 b5 10 80 movl $0x8010b5e0,(%esp)
80100161: e8 4a 43 00 00 call 801044b0 <release>
acquiresleep(&b->lock);
80100166: 8d 43 0c lea 0xc(%ebx),%eax
80100169: 89 04 24 mov %eax,(%esp)
8010016c: e8 bf 40 00 00 call 80104230 <acquiresleep>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
bread(uint dev, uint blockno)
{
struct buf *b;
b = bget(dev, blockno);
if(!(b->flags & B_VALID)) {
80100171: f6 03 02 testb $0x2,(%ebx)
80100174: 75 08 jne 8010017e <bread+0xae>
iderw(b);
80100176: 89 1c 24 mov %ebx,(%esp)
80100179: e8 92 1f 00 00 call 80102110 <iderw>
}
return b;
}
8010017e: 83 c4 1c add $0x1c,%esp
80100181: 89 d8 mov %ebx,%eax
80100183: 5b pop %ebx
80100184: 5e pop %esi
80100185: 5f pop %edi
80100186: 5d pop %ebp
80100187: c3 ret
release(&bcache.lock);
acquiresleep(&b->lock);
return b;
}
}
panic("bget: no buffers");
<<<<<<< HEAD
80100190: 83 ec 0c sub $0xc,%esp
80100193: 68 4e 73 10 80 push $0x8010734e
80100198: e8 d3 01 00 00 call 80100370 <panic>
8010019d: 8d 76 00 lea 0x0(%esi),%esi
=======
80100188: c7 04 24 ce 70 10 80 movl $0x801070ce,(%esp)
8010018f: e8 cc 01 00 00 call 80100360 <panic>
80100194: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
8010019a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
801001a0 <bwrite>:
}
// Write b's contents to disk. Must be locked.
void
bwrite(struct buf *b)
{
801001a0: 55 push %ebp
801001a1: 89 e5 mov %esp,%ebp
801001a3: 53 push %ebx
801001a4: 83 ec 14 sub $0x14,%esp
801001a7: 8b 5d 08 mov 0x8(%ebp),%ebx
if(!holdingsleep(&b->lock))
801001aa: 8d 43 0c lea 0xc(%ebx),%eax
<<<<<<< HEAD
801001ad: 50 push %eax
801001ae: e8 0d 43 00 00 call 801044c0 <holdingsleep>
801001b3: 83 c4 10 add $0x10,%esp
801001b6: 85 c0 test %eax,%eax
801001b8: 74 0f je 801001c9 <bwrite+0x29>
=======
801001ad: 89 04 24 mov %eax,(%esp)
801001b0: e8 1b 41 00 00 call 801042d0 <holdingsleep>
801001b5: 85 c0 test %eax,%eax
801001b7: 74 10 je 801001c9 <bwrite+0x29>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
panic("bwrite");
b->flags |= B_DIRTY;
801001b9: 83 0b 04 orl $0x4,(%ebx)
iderw(b);
801001bc: 89 5d 08 mov %ebx,0x8(%ebp)
}
801001bf: 83 c4 14 add $0x14,%esp
801001c2: 5b pop %ebx
801001c3: 5d pop %ebp
bwrite(struct buf *b)
{
if(!holdingsleep(&b->lock))
panic("bwrite");
b->flags |= B_DIRTY;
iderw(b);
801001c4: e9 47 1f 00 00 jmp 80102110 <iderw>
// Write b's contents to disk. Must be locked.
void
bwrite(struct buf *b)
{
if(!holdingsleep(&b->lock))
panic("bwrite");
<<<<<<< HEAD
801001c9: 83 ec 0c sub $0xc,%esp
801001cc: 68 5f 73 10 80 push $0x8010735f
801001d1: e8 9a 01 00 00 call 80100370 <panic>
801001d6: 8d 76 00 lea 0x0(%esi),%esi
=======
801001c9: c7 04 24 df 70 10 80 movl $0x801070df,(%esp)
801001d0: e8 8b 01 00 00 call 80100360 <panic>
801001d5: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
801001d9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801001e0 <brelse>:
// Release a locked buffer.
// Move to the head of the MRU list.
void
brelse(struct buf *b)
{
801001e0: 55 push %ebp
801001e1: 89 e5 mov %esp,%ebp
801001e3: 56 push %esi
801001e4: 53 push %ebx
801001e5: 83 ec 10 sub $0x10,%esp
801001e8: 8b 5d 08 mov 0x8(%ebp),%ebx
if(!holdingsleep(&b->lock))
801001eb: 8d 73 0c lea 0xc(%ebx),%esi
<<<<<<< HEAD
801001ee: 56 push %esi
801001ef: e8 cc 42 00 00 call 801044c0 <holdingsleep>
801001f4: 83 c4 10 add $0x10,%esp
801001f7: 85 c0 test %eax,%eax
801001f9: 74 66 je 80100261 <brelse+0x81>
panic("brelse");
releasesleep(&b->lock);
801001fb: 83 ec 0c sub $0xc,%esp
801001fe: 56 push %esi
801001ff: e8 7c 42 00 00 call 80104480 <releasesleep>
acquire(&bcache.lock);
80100204: c7 04 24 e0 b5 10 80 movl $0x8010b5e0,(%esp)
8010020b: e8 00 43 00 00 call 80104510 <acquire>
=======
801001ee: 89 34 24 mov %esi,(%esp)
801001f1: e8 da 40 00 00 call 801042d0 <holdingsleep>
801001f6: 85 c0 test %eax,%eax
801001f8: 74 5b je 80100255 <brelse+0x75>
panic("brelse");
releasesleep(&b->lock);
801001fa: 89 34 24 mov %esi,(%esp)
801001fd: e8 8e 40 00 00 call 80104290 <releasesleep>
acquire(&bcache.lock);
80100202: c7 04 24 e0 b5 10 80 movl $0x8010b5e0,(%esp)
80100209: e8 72 41 00 00 call 80104380 <acquire>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
b->refcnt--;
if (b->refcnt == 0) {
8010020e: 83 6b 4c 01 subl $0x1,0x4c(%ebx)
80100212: 75 2f jne 80100243 <brelse+0x63>
// no one is waiting for it.
b->next->prev = b->prev;
80100214: 8b 43 54 mov 0x54(%ebx),%eax
80100217: 8b 53 50 mov 0x50(%ebx),%edx
8010021a: 89 50 50 mov %edx,0x50(%eax)
b->prev->next = b->next;
8010021d: 8b 43 50 mov 0x50(%ebx),%eax
80100220: 8b 53 54 mov 0x54(%ebx),%edx
80100223: 89 50 54 mov %edx,0x54(%eax)
b->next = bcache.head.next;
80100226: a1 30 fd 10 80 mov 0x8010fd30,%eax
b->prev = &bcache.head;
8010022b: c7 43 50 dc fc 10 80 movl $0x8010fcdc,0x50(%ebx)
b->refcnt--;
if (b->refcnt == 0) {
// no one is waiting for it.
b->next->prev = b->prev;
b->prev->next = b->next;
b->next = bcache.head.next;
80100232: 89 43 54 mov %eax,0x54(%ebx)
b->prev = &bcache.head;
bcache.head.next->prev = b;
80100235: a1 30 fd 10 80 mov 0x8010fd30,%eax
8010023a: 89 58 50 mov %ebx,0x50(%eax)
bcache.head.next = b;
8010023d: 89 1d 30 fd 10 80 mov %ebx,0x8010fd30
}
release(&bcache.lock);
80100243: c7 45 08 e0 b5 10 80 movl $0x8010b5e0,0x8(%ebp)
}
8010024a: 83 c4 10 add $0x10,%esp
8010024d: 5b pop %ebx
8010024e: 5e pop %esi
8010024f: 5d pop %ebp
b->prev = &bcache.head;
bcache.head.next->prev = b;
bcache.head.next = b;
}
release(&bcache.lock);
<<<<<<< HEAD
8010025c: e9 8f 44 00 00 jmp 801046f0 <release>
=======
80100250: e9 5b 42 00 00 jmp 801044b0 <release>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// Move to the head of the MRU list.
void
brelse(struct buf *b)
{
if(!holdingsleep(&b->lock))
panic("brelse");
<<<<<<< HEAD
80100261: 83 ec 0c sub $0xc,%esp
80100264: 68 66 73 10 80 push $0x80107366
80100269: e8 02 01 00 00 call 80100370 <panic>
8010026e: 66 90 xchg %ax,%ax
=======
80100255: c7 04 24 e6 70 10 80 movl $0x801070e6,(%esp)
8010025c: e8 ff 00 00 00 call 80100360 <panic>
80100261: 66 90 xchg %ax,%ax
80100263: 66 90 xchg %ax,%ax
80100265: 66 90 xchg %ax,%ax
80100267: 66 90 xchg %ax,%ax
80100269: 66 90 xchg %ax,%ax
8010026b: 66 90 xchg %ax,%ax
8010026d: 66 90 xchg %ax,%ax
8010026f: 90 nop
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
80100270 <consoleread>:
}
}
int
consoleread(struct inode *ip, char *dst, int n)
{
80100270: 55 push %ebp
80100271: 89 e5 mov %esp,%ebp
80100273: 57 push %edi
80100274: 56 push %esi
80100275: 53 push %ebx
80100276: 83 ec 1c sub $0x1c,%esp
80100279: 8b 7d 08 mov 0x8(%ebp),%edi
8010027c: 8b 75 0c mov 0xc(%ebp),%esi
uint target;
int c;
iunlock(ip);
8010027f: 89 3c 24 mov %edi,(%esp)
80100282: e8 f9 14 00 00 call 80101780 <iunlock>
target = n;
acquire(&cons.lock);
<<<<<<< HEAD
80100285: c7 04 24 20 a5 10 80 movl $0x8010a520,(%esp)
8010028c: e8 7f 42 00 00 call 80104510 <acquire>
=======
80100287: c7 04 24 20 a5 10 80 movl $0x8010a520,(%esp)
8010028e: e8 ed 40 00 00 call 80104380 <acquire>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
while(n > 0){
80100293: 8b 55 10 mov 0x10(%ebp),%edx
80100296: 85 d2 test %edx,%edx
80100298: 0f 8e bc 00 00 00 jle 8010035a <consoleread+0xea>
8010029e: 8b 5d 10 mov 0x10(%ebp),%ebx
801002a1: eb 26 jmp 801002c9 <consoleread+0x59>
801002a3: 90 nop
801002a4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
while(input.r == input.w){
if(proc->killed){
801002a8: 65 a1 04 00 00 00 mov %gs:0x4,%eax
801002ae: 8b 40 24 mov 0x24(%eax),%eax
801002b1: 85 c0 test %eax,%eax
801002b3: 75 73 jne 80100328 <consoleread+0xb8>
release(&cons.lock);
ilock(ip);
return -1;
}
sleep(&input.r, &cons.lock);
<<<<<<< HEAD
801002b0: 83 ec 08 sub $0x8,%esp
801002b3: 68 20 a5 10 80 push $0x8010a520
801002b8: 68 c0 ff 10 80 push $0x8010ffc0
801002bd: e8 8e 3c 00 00 call 80103f50 <sleep>
=======
801002b5: c7 44 24 04 20 a5 10 movl $0x8010a520,0x4(%esp)
801002bc: 80
801002bd: c7 04 24 c0 ff 10 80 movl $0x8010ffc0,(%esp)
801002c4: e8 77 3a 00 00 call 80103d40 <sleep>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
iunlock(ip);
target = n;
acquire(&cons.lock);
while(n > 0){
while(input.r == input.w){
<<<<<<< HEAD
801002c2: a1 c0 ff 10 80 mov 0x8010ffc0,%eax
801002c7: 83 c4 10 add $0x10,%esp
801002ca: 3b 05 c4 ff 10 80 cmp 0x8010ffc4,%eax
801002d0: 75 36 jne 80100308 <consoleread+0x98>
if(proc->killed){
801002d2: 65 a1 04 00 00 00 mov %gs:0x4,%eax
801002d8: 8b 40 24 mov 0x24(%eax),%eax
801002db: 85 c0 test %eax,%eax
801002dd: 74 d1 je 801002b0 <consoleread+0x40>
release(&cons.lock);
801002df: 83 ec 0c sub $0xc,%esp
801002e2: 68 20 a5 10 80 push $0x8010a520
801002e7: e8 04 44 00 00 call 801046f0 <release>
ilock(ip);
801002ec: 89 3c 24 mov %edi,(%esp)
801002ef: e8 5c 13 00 00 call 80101650 <ilock>
return -1;
801002f4: 83 c4 10 add $0x10,%esp
801002f7: b8 ff ff ff ff mov $0xffffffff,%eax
}
release(&cons.lock);
ilock(ip);
return target - n;
}
801002fc: 8d 65 f4 lea -0xc(%ebp),%esp
801002ff: 5b pop %ebx
80100300: 5e pop %esi
80100301: 5f pop %edi
80100302: 5d pop %ebp
80100303: c3 ret
80100304: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
=======
801002c9: a1 c0 ff 10 80 mov 0x8010ffc0,%eax
801002ce: 3b 05 c4 ff 10 80 cmp 0x8010ffc4,%eax
801002d4: 74 d2 je 801002a8 <consoleread+0x38>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
ilock(ip);
return -1;
}
sleep(&input.r, &cons.lock);
}
c = input.buf[input.r++ % INPUT_BUF];
801002d6: 8d 50 01 lea 0x1(%eax),%edx
801002d9: 89 15 c0 ff 10 80 mov %edx,0x8010ffc0
801002df: 89 c2 mov %eax,%edx
801002e1: 83 e2 7f and $0x7f,%edx
801002e4: 0f b6 8a 40 ff 10 80 movzbl -0x7fef00c0(%edx),%ecx
801002eb: 0f be d1 movsbl %cl,%edx
if(c == C('D')){ // EOF
801002ee: 83 fa 04 cmp $0x4,%edx
801002f1: 74 56 je 80100349 <consoleread+0xd9>
// caller gets a 0-byte result.
input.r--;
}
break;
}
*dst++ = c;
801002f3: 83 c6 01 add $0x1,%esi
--n;
801002f6: 83 eb 01 sub $0x1,%ebx
if(c == '\n')
801002f9: 83 fa 0a cmp $0xa,%edx
// caller gets a 0-byte result.
input.r--;
}
break;
}
*dst++ = c;
801002fc: 88 4e ff mov %cl,-0x1(%esi)
--n;
if(c == '\n')
801002ff: 74 52 je 80100353 <consoleread+0xe3>
int c;
iunlock(ip);
target = n;
acquire(&cons.lock);
while(n > 0){
80100301: 85 db test %ebx,%ebx
80100303: 75 c4 jne 801002c9 <consoleread+0x59>
80100305: 8b 45 10 mov 0x10(%ebp),%eax
*dst++ = c;
--n;
if(c == '\n')
break;
}
release(&cons.lock);
<<<<<<< HEAD
8010033b: 83 ec 0c sub $0xc,%esp
8010033e: 89 45 e4 mov %eax,-0x1c(%ebp)
80100341: 68 20 a5 10 80 push $0x8010a520
80100346: e8 a5 43 00 00 call 801046f0 <release>
=======
80100308: c7 04 24 20 a5 10 80 movl $0x8010a520,(%esp)
8010030f: 89 45 e4 mov %eax,-0x1c(%ebp)
80100312: e8 99 41 00 00 call 801044b0 <release>
ilock(ip);
80100317: 89 3c 24 mov %edi,(%esp)
8010031a: e8 91 13 00 00 call 801016b0 <ilock>
8010031f: 8b 45 e4 mov -0x1c(%ebp),%eax
return target - n;
80100322: eb 1d jmp 80100341 <consoleread+0xd1>
80100324: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
target = n;
acquire(&cons.lock);
while(n > 0){
while(input.r == input.w){
if(proc->killed){
release(&cons.lock);
80100328: c7 04 24 20 a5 10 80 movl $0x8010a520,(%esp)
8010032f: e8 7c 41 00 00 call 801044b0 <release>
ilock(ip);
80100334: 89 3c 24 mov %edi,(%esp)
80100337: e8 74 13 00 00 call 801016b0 <ilock>
return -1;
8010033c: b8 ff ff ff ff mov $0xffffffff,%eax
}
release(&cons.lock);
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
ilock(ip);
return target - n;
}
80100341: 83 c4 1c add $0x1c,%esp
80100344: 5b pop %ebx
80100345: 5e pop %esi
80100346: 5f pop %edi
80100347: 5d pop %ebp
80100348: c3 ret
}
sleep(&input.r, &cons.lock);
}
c = input.buf[input.r++ % INPUT_BUF];
if(c == C('D')){ // EOF
if(n < target){
80100349: 39 5d 10 cmp %ebx,0x10(%ebp)
8010034c: 76 05 jbe 80100353 <consoleread+0xe3>
// Save ^D for next time, to make sure
// caller gets a 0-byte result.
input.r--;
8010034e: a3 c0 ff 10 80 mov %eax,0x8010ffc0
80100353: 8b 45 10 mov 0x10(%ebp),%eax
80100356: 29 d8 sub %ebx,%eax
80100358: eb ae jmp 80100308 <consoleread+0x98>
int c;
iunlock(ip);
target = n;
acquire(&cons.lock);
while(n > 0){
8010035a: 31 c0 xor %eax,%eax
8010035c: eb aa jmp 80100308 <consoleread+0x98>
8010035e: 66 90 xchg %ax,%ax
80100360 <panic>:
release(&cons.lock);
}
void
panic(char *s)
{
80100360: 55 push %ebp
80100361: 89 e5 mov %esp,%ebp
80100363: 56 push %esi
80100364: 53 push %ebx
80100365: 83 ec 40 sub $0x40,%esp
}
static inline void
cli(void)
{
asm volatile("cli");
80100368: fa cli
int i;
uint pcs[10];
cli();
cons.locking = 0;
cprintf("cpu with apicid %d: panic: ", cpu->apicid);
80100369: 65 a1 00 00 00 00 mov %gs:0x0,%eax
cprintf(s);
cprintf("\n");
getcallerpcs(&s, pcs);
8010036f: 8d 5d d0 lea -0x30(%ebp),%ebx
{
int i;
uint pcs[10];
cli();
cons.locking = 0;
80100372: c7 05 54 a5 10 80 00 movl $0x0,0x8010a554
80100379: 00 00 00
8010037c: 8d 75 f8 lea -0x8(%ebp),%esi
cprintf("cpu with apicid %d: panic: ", cpu->apicid);
<<<<<<< HEAD
8010038f: 0f b6 00 movzbl (%eax),%eax
80100392: 50 push %eax
80100393: 68 6d 73 10 80 push $0x8010736d
80100398: e8 c3 02 00 00 call 80100660 <cprintf>
=======
8010037f: 0f b6 00 movzbl (%eax),%eax
80100382: c7 04 24 ed 70 10 80 movl $0x801070ed,(%esp)
80100389: 89 44 24 04 mov %eax,0x4(%esp)
8010038d: e8 be 02 00 00 call 80100650 <cprintf>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
cprintf(s);
80100392: 8b 45 08 mov 0x8(%ebp),%eax
80100395: 89 04 24 mov %eax,(%esp)
80100398: e8 b3 02 00 00 call 80100650 <cprintf>
cprintf("\n");
<<<<<<< HEAD
801003a6: c7 04 24 66 78 10 80 movl $0x80107866,(%esp)
801003ad: e8 ae 02 00 00 call 80100660 <cprintf>
getcallerpcs(&s, pcs);
801003b2: 5a pop %edx
801003b3: 8d 45 08 lea 0x8(%ebp),%eax
801003b6: 59 pop %ecx
801003b7: 53 push %ebx
801003b8: 50 push %eax
801003b9: e8 22 42 00 00 call 801045e0 <getcallerpcs>
801003be: 83 c4 10 add $0x10,%esp
801003c1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
for(i=0; i<10; i++)
cprintf(" %p", pcs[i]);
801003c8: 83 ec 08 sub $0x8,%esp
801003cb: ff 33 pushl (%ebx)
801003cd: 83 c3 04 add $0x4,%ebx
801003d0: 68 89 73 10 80 push $0x80107389
801003d5: e8 86 02 00 00 call 80100660 <cprintf>
=======
8010039d: c7 04 24 e6 75 10 80 movl $0x801075e6,(%esp)
801003a4: e8 a7 02 00 00 call 80100650 <cprintf>
getcallerpcs(&s, pcs);
801003a9: 8d 45 08 lea 0x8(%ebp),%eax
801003ac: 89 5c 24 04 mov %ebx,0x4(%esp)
801003b0: 89 04 24 mov %eax,(%esp)
801003b3: e8 68 3f 00 00 call 80104320 <getcallerpcs>
for(i=0; i<10; i++)
cprintf(" %p", pcs[i]);
801003b8: 8b 03 mov (%ebx),%eax
801003ba: 83 c3 04 add $0x4,%ebx
801003bd: c7 04 24 09 71 10 80 movl $0x80107109,(%esp)
801003c4: 89 44 24 04 mov %eax,0x4(%esp)
801003c8: e8 83 02 00 00 call 80100650 <cprintf>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
cons.locking = 0;
cprintf("cpu with apicid %d: panic: ", cpu->apicid);
cprintf(s);
cprintf("\n");
getcallerpcs(&s, pcs);
for(i=0; i<10; i++)
801003cd: 39 f3 cmp %esi,%ebx
801003cf: 75 e7 jne 801003b8 <panic+0x58>
cprintf(" %p", pcs[i]);
panicked = 1; // freeze other CPU
801003d1: c7 05 58 a5 10 80 01 movl $0x1,0x8010a558
801003d8: 00 00 00
801003db: eb fe jmp 801003db <panic+0x7b>
801003dd: 8d 76 00 lea 0x0(%esi),%esi
801003e0 <consputc>:
}
void
consputc(int c)
{
if(panicked){
801003e0: 8b 15 58 a5 10 80 mov 0x8010a558,%edx
801003e6: 85 d2 test %edx,%edx
801003e8: 74 06 je 801003f0 <consputc+0x10>
801003ea: fa cli
801003eb: eb fe jmp 801003eb <consputc+0xb>
801003ed: 8d 76 00 lea 0x0(%esi),%esi
crt[pos] = ' ' | 0x0700;
}
void
consputc(int c)
{
801003f0: 55 push %ebp
801003f1: 89 e5 mov %esp,%ebp
801003f3: 57 push %edi
801003f4: 56 push %esi
801003f5: 53 push %ebx
801003f6: 89 c3 mov %eax,%ebx
801003f8: 83 ec 1c sub $0x1c,%esp
cli();
for(;;)
;
}
if(c == BACKSPACE){
801003fb: 3d 00 01 00 00 cmp $0x100,%eax
80100400: 0f 84 ac 00 00 00 je 801004b2 <consputc+0xd2>
uartputc('\b'); uartputc(' '); uartputc('\b');
} else
uartputc(c);
<<<<<<< HEAD
80100416: 83 ec 0c sub $0xc,%esp
80100419: 50 push %eax
8010041a: e8 f1 5a 00 00 call 80105f10 <uartputc>
8010041f: 83 c4 10 add $0x10,%esp
=======
80100406: 89 04 24 mov %eax,(%esp)
80100409: e8 b2 57 00 00 call 80105bc0 <uartputc>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
}
static inline void
outb(ushort port, uchar data)
{
asm volatile("out %0,%1" : : "a" (data), "d" (port));
8010040e: bf d4 03 00 00 mov $0x3d4,%edi
80100413: b8 0e 00 00 00 mov $0xe,%eax
80100418: 89 fa mov %edi,%edx
8010041a: ee out %al,(%dx)
static inline uchar
inb(ushort port)
{
uchar data;
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
8010041b: be d5 03 00 00 mov $0x3d5,%esi
80100420: 89 f2 mov %esi,%edx
80100422: ec in (%dx),%al
{
int pos;
// Cursor position: col + 80*row.
outb(CRTPORT, 14);
pos = inb(CRTPORT+1) << 8;
80100423: 0f b6 c8 movzbl %al,%ecx
}
static inline void
outb(ushort port, uchar data)
{
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80100426: 89 fa mov %edi,%edx
80100428: c1 e1 08 shl $0x8,%ecx
8010042b: b8 0f 00 00 00 mov $0xf,%eax
80100430: ee out %al,(%dx)
static inline uchar
inb(ushort port)
{
uchar data;
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80100431: 89 f2 mov %esi,%edx
80100433: ec in (%dx),%al
outb(CRTPORT, 15);
pos |= inb(CRTPORT+1);
80100434: 0f b6 c0 movzbl %al,%eax
80100437: 09 c1 or %eax,%ecx
if(c == '\n')
80100439: 83 fb 0a cmp $0xa,%ebx
8010043c: 0f 84 0d 01 00 00 je 8010054f <consputc+0x16f>
pos += 80 - pos%80;
else if(c == BACKSPACE){
80100442: 81 fb 00 01 00 00 cmp $0x100,%ebx
80100448: 0f 84 e8 00 00 00 je 80100536 <consputc+0x156>
if(pos > 0) --pos;
} else
crt[pos++] = (c&0xff) | 0x0700; // black on white
8010044e: 0f b6 db movzbl %bl,%ebx
80100451: 80 cf 07 or $0x7,%bh
80100454: 8d 79 01 lea 0x1(%ecx),%edi
80100457: 66 89 9c 09 00 80 0b mov %bx,-0x7ff48000(%ecx,%ecx,1)
8010045e: 80
if(pos < 0 || pos > 25*80)
8010045f: 81 ff d0 07 00 00 cmp $0x7d0,%edi
80100465: 0f 87 bf 00 00 00 ja 8010052a <consputc+0x14a>
panic("pos under/overflow");
if((pos/80) >= 24){ // Scroll up.
8010046b: 81 ff 7f 07 00 00 cmp $0x77f,%edi
80100471: 7f 68 jg 801004db <consputc+0xfb>
80100473: 89 f8 mov %edi,%eax
80100475: 89 fb mov %edi,%ebx
80100477: c1 e8 08 shr $0x8,%eax
8010047a: 89 c6 mov %eax,%esi
8010047c: 8d 8c 3f 00 80 0b 80 lea -0x7ff48000(%edi,%edi,1),%ecx
}
static inline void
outb(ushort port, uchar data)
{
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80100483: bf d4 03 00 00 mov $0x3d4,%edi
80100488: b8 0e 00 00 00 mov $0xe,%eax
8010048d: 89 fa mov %edi,%edx
8010048f: ee out %al,(%dx)
80100490: 89 f0 mov %esi,%eax
80100492: b2 d5 mov $0xd5,%dl
80100494: ee out %al,(%dx)
80100495: b8 0f 00 00 00 mov $0xf,%eax
8010049a: 89 fa mov %edi,%edx
8010049c: ee out %al,(%dx)
8010049d: 89 d8 mov %ebx,%eax
8010049f: b2 d5 mov $0xd5,%dl
801004a1: ee out %al,(%dx)
outb(CRTPORT, 14);
outb(CRTPORT+1, pos>>8);
outb(CRTPORT, 15);
outb(CRTPORT+1, pos);
crt[pos] = ' ' | 0x0700;
801004a2: b8 20 07 00 00 mov $0x720,%eax
801004a7: 66 89 01 mov %ax,(%ecx)
if(c == BACKSPACE){
uartputc('\b'); uartputc(' '); uartputc('\b');
} else
uartputc(c);
cgaputc(c);
}
801004aa: 83 c4 1c add $0x1c,%esp
801004ad: 5b pop %ebx
801004ae: 5e pop %esi
801004af: 5f pop %edi
801004b0: 5d pop %ebp
801004b1: c3 ret
for(;;)
;
}
if(c == BACKSPACE){
uartputc('\b'); uartputc(' '); uartputc('\b');
<<<<<<< HEAD
801004ce: 83 ec 0c sub $0xc,%esp
801004d1: 6a 08 push $0x8
801004d3: e8 38 5a 00 00 call 80105f10 <uartputc>
801004d8: c7 04 24 20 00 00 00 movl $0x20,(%esp)
801004df: e8 2c 5a 00 00 call 80105f10 <uartputc>
801004e4: c7 04 24 08 00 00 00 movl $0x8,(%esp)
801004eb: e8 20 5a 00 00 call 80105f10 <uartputc>
801004f0: 83 c4 10 add $0x10,%esp
801004f3: e9 2a ff ff ff jmp 80100422 <consputc+0x32>
=======
801004b2: c7 04 24 08 00 00 00 movl $0x8,(%esp)
801004b9: e8 02 57 00 00 call 80105bc0 <uartputc>
801004be: c7 04 24 20 00 00 00 movl $0x20,(%esp)
801004c5: e8 f6 56 00 00 call 80105bc0 <uartputc>
801004ca: c7 04 24 08 00 00 00 movl $0x8,(%esp)
801004d1: e8 ea 56 00 00 call 80105bc0 <uartputc>
801004d6: e9 33 ff ff ff jmp 8010040e <consputc+0x2e>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
if(pos < 0 || pos > 25*80)
panic("pos under/overflow");
if((pos/80) >= 24){ // Scroll up.
memmove(crt, crt+80, sizeof(crt[0])*23*80);
801004db: c7 44 24 08 60 0e 00 movl $0xe60,0x8(%esp)
801004e2: 00
pos -= 80;
801004e3: 8d 5f b0 lea -0x50(%edi),%ebx
if(pos < 0 || pos > 25*80)
panic("pos under/overflow");
if((pos/80) >= 24){ // Scroll up.
memmove(crt, crt+80, sizeof(crt[0])*23*80);
801004e6: c7 44 24 04 a0 80 0b movl $0x800b80a0,0x4(%esp)
801004ed: 80
pos -= 80;
memset(crt+pos, 0, sizeof(crt[0])*(24*80 - pos));
801004ee: 8d b4 1b 00 80 0b 80 lea -0x7ff48000(%ebx,%ebx,1),%esi
if(pos < 0 || pos > 25*80)
panic("pos under/overflow");
if((pos/80) >= 24){ // Scroll up.
memmove(crt, crt+80, sizeof(crt[0])*23*80);
<<<<<<< HEAD
80100514: e8 d7 42 00 00 call 801047f0 <memmove>
pos -= 80;
memset(crt+pos, 0, sizeof(crt[0])*(24*80 - pos));
80100519: b8 80 07 00 00 mov $0x780,%eax
8010051e: 83 c4 0c add $0xc,%esp
80100521: 29 d8 sub %ebx,%eax
80100523: 01 c0 add %eax,%eax
80100525: 50 push %eax
80100526: 6a 00 push $0x0
80100528: 56 push %esi
80100529: e8 12 42 00 00 call 80104740 <memset>
8010052e: 89 f1 mov %esi,%ecx
80100530: 83 c4 10 add $0x10,%esp
80100533: be 07 00 00 00 mov $0x7,%esi
80100538: e9 5c ff ff ff jmp 80100499 <consputc+0xa9>
=======
801004f5: c7 04 24 00 80 0b 80 movl $0x800b8000,(%esp)
801004fc: e8 9f 40 00 00 call 801045a0 <memmove>
pos -= 80;
memset(crt+pos, 0, sizeof(crt[0])*(24*80 - pos));
80100501: b8 d0 07 00 00 mov $0x7d0,%eax
80100506: 29 f8 sub %edi,%eax
80100508: 01 c0 add %eax,%eax
8010050a: 89 34 24 mov %esi,(%esp)
8010050d: 89 44 24 08 mov %eax,0x8(%esp)
80100511: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
80100518: 00
80100519: e8 e2 3f 00 00 call 80104500 <memset>
8010051e: 89 f1 mov %esi,%ecx
80100520: be 07 00 00 00 mov $0x7,%esi
80100525: e9 59 ff ff ff jmp 80100483 <consputc+0xa3>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
if(pos > 0) --pos;
} else
crt[pos++] = (c&0xff) | 0x0700; // black on white
if(pos < 0 || pos > 25*80)
panic("pos under/overflow");
<<<<<<< HEAD
8010053d: 83 ec 0c sub $0xc,%esp
80100540: 68 8d 73 10 80 push $0x8010738d
80100545: e8 26 fe ff ff call 80100370 <panic>
=======
8010052a: c7 04 24 0d 71 10 80 movl $0x8010710d,(%esp)
80100531: e8 2a fe ff ff call 80100360 <panic>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
pos |= inb(CRTPORT+1);
if(c == '\n')
pos += 80 - pos%80;
else if(c == BACKSPACE){
if(pos > 0) --pos;
80100536: 85 c9 test %ecx,%ecx
80100538: 8d 79 ff lea -0x1(%ecx),%edi
8010053b: 0f 85 1e ff ff ff jne 8010045f <consputc+0x7f>
80100541: b9 00 80 0b 80 mov $0x800b8000,%ecx
80100546: 31 db xor %ebx,%ebx
80100548: 31 f6 xor %esi,%esi
8010054a: e9 34 ff ff ff jmp 80100483 <consputc+0xa3>
pos = inb(CRTPORT+1) << 8;
outb(CRTPORT, 15);
pos |= inb(CRTPORT+1);
if(c == '\n')
pos += 80 - pos%80;
8010054f: 89 c8 mov %ecx,%eax
80100551: ba 67 66 66 66 mov $0x66666667,%edx
80100556: f7 ea imul %edx
80100558: c1 ea 05 shr $0x5,%edx
8010055b: 8d 04 92 lea (%edx,%edx,4),%eax
8010055e: c1 e0 04 shl $0x4,%eax
80100561: 8d 78 50 lea 0x50(%eax),%edi
80100564: e9 f6 fe ff ff jmp 8010045f <consputc+0x7f>
80100569: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80100570 <printint>:
int locking;
} cons;
static void
printint(int xx, int base, int sign)
{
80100570: 55 push %ebp
80100571: 89 e5 mov %esp,%ebp
80100573: 57 push %edi
80100574: 56 push %esi
80100575: 89 d6 mov %edx,%esi
80100577: 53 push %ebx
80100578: 83 ec 1c sub $0x1c,%esp
static char digits[] = "0123456789abcdef";
char buf[16];
int i;
uint x;
if(sign && (sign = xx < 0))
8010057b: 85 c9 test %ecx,%ecx
8010057d: 74 61 je 801005e0 <printint+0x70>
8010057f: 85 c0 test %eax,%eax
80100581: 79 5d jns 801005e0 <printint+0x70>
x = -xx;
80100583: f7 d8 neg %eax
80100585: bf 01 00 00 00 mov $0x1,%edi
else
x = xx;
i = 0;
8010058a: 31 c9 xor %ecx,%ecx
8010058c: eb 04 jmp 80100592 <printint+0x22>
8010058e: 66 90 xchg %ax,%ax
do{
buf[i++] = digits[x % base];
80100590: 89 d9 mov %ebx,%ecx
80100592: 31 d2 xor %edx,%edx
80100594: f7 f6 div %esi
80100596: 8d 59 01 lea 0x1(%ecx),%ebx
80100599: 0f b6 92 38 71 10 80 movzbl -0x7fef8ec8(%edx),%edx
}while((x /= base) != 0);
801005a0: 85 c0 test %eax,%eax
else
x = xx;
i = 0;
do{
buf[i++] = digits[x % base];
<<<<<<< HEAD
801005a8: 89 cf mov %ecx,%edi
801005aa: 31 d2 xor %edx,%edx
801005ac: 8d 4f 01 lea 0x1(%edi),%ecx
801005af: f7 f6 div %esi
801005b1: 0f b6 92 b8 73 10 80 movzbl -0x7fef8c48(%edx),%edx
=======
801005a2: 88 54 1d d7 mov %dl,-0x29(%ebp,%ebx,1)
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
}while((x /= base) != 0);
801005a6: 75 e8 jne 80100590 <printint+0x20>
if(sign)
801005a8: 85 ff test %edi,%edi
else
x = xx;
i = 0;
do{
buf[i++] = digits[x % base];
801005aa: 89 d8 mov %ebx,%eax
}while((x /= base) != 0);
if(sign)
801005ac: 74 08 je 801005b6 <printint+0x46>
buf[i++] = '-';
801005ae: 8d 59 02 lea 0x2(%ecx),%ebx
801005b1: c6 44 05 d8 2d movb $0x2d,-0x28(%ebp,%eax,1)
while(--i >= 0)
801005b6: 83 eb 01 sub $0x1,%ebx
801005b9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
consputc(buf[i]);
801005c0: 0f be 44 1d d8 movsbl -0x28(%ebp,%ebx,1),%eax
}while((x /= base) != 0);
if(sign)
buf[i++] = '-';
while(--i >= 0)
801005c5: 83 eb 01 sub $0x1,%ebx
consputc(buf[i]);
801005c8: e8 13 fe ff ff call 801003e0 <consputc>
}while((x /= base) != 0);
if(sign)
buf[i++] = '-';
while(--i >= 0)
801005cd: 83 fb ff cmp $0xffffffff,%ebx
801005d0: 75 ee jne 801005c0 <printint+0x50>
consputc(buf[i]);
}
801005d2: 83 c4 1c add $0x1c,%esp
801005d5: 5b pop %ebx
801005d6: 5e pop %esi
801005d7: 5f pop %edi
801005d8: 5d pop %ebp
801005d9: c3 ret
801005da: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
uint x;
if(sign && (sign = xx < 0))
x = -xx;
else
x = xx;
801005e0: 31 ff xor %edi,%edi
801005e2: eb a6 jmp 8010058a <printint+0x1a>
801005e4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801005ea: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
801005f0 <consolewrite>:
return target - n;
}
int
consolewrite(struct inode *ip, char *buf, int n)
{
801005f0: 55 push %ebp
801005f1: 89 e5 mov %esp,%ebp
801005f3: 57 push %edi
801005f4: 56 push %esi
801005f5: 53 push %ebx
801005f6: 83 ec 1c sub $0x1c,%esp
int i;
iunlock(ip);
801005f9: 8b 45 08 mov 0x8(%ebp),%eax
return target - n;
}
int
consolewrite(struct inode *ip, char *buf, int n)
{
801005fc: 8b 75 10 mov 0x10(%ebp),%esi
int i;
iunlock(ip);
801005ff: 89 04 24 mov %eax,(%esp)
80100602: e8 79 11 00 00 call 80101780 <iunlock>
acquire(&cons.lock);
<<<<<<< HEAD
80100614: c7 04 24 20 a5 10 80 movl $0x8010a520,(%esp)
8010061b: e8 f0 3e 00 00 call 80104510 <acquire>
80100620: 8b 7d 0c mov 0xc(%ebp),%edi
=======
80100607: c7 04 24 20 a5 10 80 movl $0x8010a520,(%esp)
8010060e: e8 6d 3d 00 00 call 80104380 <acquire>
80100613: 8b 7d 0c mov 0xc(%ebp),%edi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
for(i = 0; i < n; i++)
80100616: 85 f6 test %esi,%esi
80100618: 8d 1c 37 lea (%edi,%esi,1),%ebx
8010061b: 7e 12 jle 8010062f <consolewrite+0x3f>
8010061d: 8d 76 00 lea 0x0(%esi),%esi
consputc(buf[i] & 0xff);
80100620: 0f b6 07 movzbl (%edi),%eax
80100623: 83 c7 01 add $0x1,%edi
80100626: e8 b5 fd ff ff call 801003e0 <consputc>
{
int i;
iunlock(ip);
acquire(&cons.lock);
for(i = 0; i < n; i++)
8010062b: 39 df cmp %ebx,%edi
8010062d: 75 f1 jne 80100620 <consolewrite+0x30>
consputc(buf[i] & 0xff);
release(&cons.lock);
<<<<<<< HEAD
8010063f: 83 ec 0c sub $0xc,%esp
80100642: 68 20 a5 10 80 push $0x8010a520
80100647: e8 a4 40 00 00 call 801046f0 <release>
=======
8010062f: c7 04 24 20 a5 10 80 movl $0x8010a520,(%esp)
80100636: e8 75 3e 00 00 call 801044b0 <release>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
ilock(ip);
8010063b: 8b 45 08 mov 0x8(%ebp),%eax
8010063e: 89 04 24 mov %eax,(%esp)
80100641: e8 6a 10 00 00 call 801016b0 <ilock>
return n;
}
80100646: 83 c4 1c add $0x1c,%esp
80100649: 89 f0 mov %esi,%eax
8010064b: 5b pop %ebx
8010064c: 5e pop %esi
8010064d: 5f pop %edi
8010064e: 5d pop %ebp
8010064f: c3 ret
80100650 <cprintf>:
//PAGEBREAK: 50
// Print to the console. only understands %d, %x, %p, %s.
void
cprintf(char *fmt, ...)
{
80100650: 55 push %ebp
80100651: 89 e5 mov %esp,%ebp
80100653: 57 push %edi
80100654: 56 push %esi
80100655: 53 push %ebx
80100656: 83 ec 1c sub $0x1c,%esp
int i, c, locking;
uint *argp;
char *s;
locking = cons.locking;
80100659: a1 54 a5 10 80 mov 0x8010a554,%eax
if(locking)
8010065e: 85 c0 test %eax,%eax
{
int i, c, locking;
uint *argp;
char *s;
locking = cons.locking;
80100660: 89 45 e0 mov %eax,-0x20(%ebp)
if(locking)
80100663: 0f 85 27 01 00 00 jne 80100790 <cprintf+0x140>
acquire(&cons.lock);
if (fmt == 0)
80100669: 8b 45 08 mov 0x8(%ebp),%eax
8010066c: 85 c0 test %eax,%eax
8010066e: 89 c1 mov %eax,%ecx
80100670: 0f 84 2b 01 00 00 je 801007a1 <cprintf+0x151>
panic("null fmt");
argp = (uint*)(void*)(&fmt + 1);
for(i = 0; (c = fmt[i] & 0xff) != 0; i++){
80100676: 0f b6 00 movzbl (%eax),%eax
80100679: 31 db xor %ebx,%ebx
8010067b: 89 cf mov %ecx,%edi
8010067d: 8d 75 0c lea 0xc(%ebp),%esi
80100680: 85 c0 test %eax,%eax
80100682: 75 4c jne 801006d0 <cprintf+0x80>
80100684: eb 5f jmp 801006e5 <cprintf+0x95>
80100686: 66 90 xchg %ax,%ax
if(c != '%'){
consputc(c);
continue;
}
c = fmt[++i] & 0xff;
80100688: 83 c3 01 add $0x1,%ebx
8010068b: 0f b6 14 1f movzbl (%edi,%ebx,1),%edx
if(c == 0)
8010068f: 85 d2 test %edx,%edx
80100691: 74 52 je 801006e5 <cprintf+0x95>
break;
switch(c){
80100693: 83 fa 70 cmp $0x70,%edx
80100696: 74 72 je 8010070a <cprintf+0xba>
80100698: 7f 66 jg 80100700 <cprintf+0xb0>
8010069a: 83 fa 25 cmp $0x25,%edx
8010069d: 8d 76 00 lea 0x0(%esi),%esi
801006a0: 0f 84 a2 00 00 00 je 80100748 <cprintf+0xf8>
801006a6: 83 fa 64 cmp $0x64,%edx
801006a9: 75 7d jne 80100728 <cprintf+0xd8>
case 'd':
printint(*argp++, 10, 1);
801006ab: 8d 46 04 lea 0x4(%esi),%eax
801006ae: b9 01 00 00 00 mov $0x1,%ecx
801006b3: 89 45 e4 mov %eax,-0x1c(%ebp)
801006b6: 8b 06 mov (%esi),%eax
801006b8: ba 0a 00 00 00 mov $0xa,%edx
801006bd: e8 ae fe ff ff call 80100570 <printint>
801006c2: 8b 75 e4 mov -0x1c(%ebp),%esi
if (fmt == 0)
panic("null fmt");
argp = (uint*)(void*)(&fmt + 1);
for(i = 0; (c = fmt[i] & 0xff) != 0; i++){
801006c5: 83 c3 01 add $0x1,%ebx
801006c8: 0f b6 04 1f movzbl (%edi,%ebx,1),%eax
801006cc: 85 c0 test %eax,%eax
801006ce: 74 15 je 801006e5 <cprintf+0x95>
if(c != '%'){
801006d0: 83 f8 25 cmp $0x25,%eax
801006d3: 74 b3 je 80100688 <cprintf+0x38>
consputc('%');
break;
default:
// Print unknown % sequence to draw attention.
consputc('%');
consputc(c);
801006d5: e8 06 fd ff ff call 801003e0 <consputc>
if (fmt == 0)
panic("null fmt");
argp = (uint*)(void*)(&fmt + 1);
for(i = 0; (c = fmt[i] & 0xff) != 0; i++){
801006da: 83 c3 01 add $0x1,%ebx
801006dd: 0f b6 04 1f movzbl (%edi,%ebx,1),%eax
801006e1: 85 c0 test %eax,%eax
801006e3: 75 eb jne 801006d0 <cprintf+0x80>
consputc(c);
break;
}
}
if(locking)
801006e5: 8b 45 e0 mov -0x20(%ebp),%eax
801006e8: 85 c0 test %eax,%eax
801006ea: 74 0c je 801006f8 <cprintf+0xa8>
release(&cons.lock);
<<<<<<< HEAD
80100705: 83 ec 0c sub $0xc,%esp
80100708: 68 20 a5 10 80 push $0x8010a520
8010070d: e8 de 3f 00 00 call 801046f0 <release>
80100712: 83 c4 10 add $0x10,%esp
}
80100715: 8d 65 f4 lea -0xc(%ebp),%esp
80100718: 5b pop %ebx
80100719: 5e pop %esi
8010071a: 5f pop %edi
8010071b: 5d pop %ebp
8010071c: c3 ret
8010071d: 8d 76 00 lea 0x0(%esi),%esi
=======
801006ec: c7 04 24 20 a5 10 80 movl $0x8010a520,(%esp)
801006f3: e8 b8 3d 00 00 call 801044b0 <release>
}
801006f8: 83 c4 1c add $0x1c,%esp
801006fb: 5b pop %ebx
801006fc: 5e pop %esi
801006fd: 5f pop %edi
801006fe: 5d pop %ebp
801006ff: c3 ret
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
continue;
}
c = fmt[++i] & 0xff;
if(c == 0)
break;
switch(c){
80100700: 83 fa 73 cmp $0x73,%edx
80100703: 74 53 je 80100758 <cprintf+0x108>
80100705: 83 fa 78 cmp $0x78,%edx
80100708: 75 1e jne 80100728 <cprintf+0xd8>
case 'd':
printint(*argp++, 10, 1);
break;
case 'x':
case 'p':
printint(*argp++, 16, 0);
8010070a: 8d 46 04 lea 0x4(%esi),%eax
8010070d: 31 c9 xor %ecx,%ecx
8010070f: 89 45 e4 mov %eax,-0x1c(%ebp)
80100712: 8b 06 mov (%esi),%eax
80100714: ba 10 00 00 00 mov $0x10,%edx
80100719: e8 52 fe ff ff call 80100570 <printint>
8010071e: 8b 75 e4 mov -0x1c(%ebp),%esi
break;
80100721: eb a2 jmp 801006c5 <cprintf+0x75>
80100723: 90 nop
80100724: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
case '%':
consputc('%');
break;
default:
// Print unknown % sequence to draw attention.
consputc('%');
80100728: b8 25 00 00 00 mov $0x25,%eax
8010072d: 89 55 e4 mov %edx,-0x1c(%ebp)
80100730: e8 ab fc ff ff call 801003e0 <consputc>
consputc(c);
80100735: 8b 55 e4 mov -0x1c(%ebp),%edx
80100738: 89 d0 mov %edx,%eax
8010073a: e8 a1 fc ff ff call 801003e0 <consputc>
8010073f: eb 99 jmp 801006da <cprintf+0x8a>
80100741: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
s = "(null)";
for(; *s; s++)
consputc(*s);
break;
case '%':
consputc('%');
80100748: b8 25 00 00 00 mov $0x25,%eax
8010074d: e8 8e fc ff ff call 801003e0 <consputc>
break;
80100752: e9 6e ff ff ff jmp 801006c5 <cprintf+0x75>
80100757: 90 nop
case 'x':
case 'p':
printint(*argp++, 16, 0);
break;
case 's':
if((s = (char*)*argp++) == 0)
80100758: 8d 46 04 lea 0x4(%esi),%eax
8010075b: 8b 36 mov (%esi),%esi
8010075d: 89 45 e4 mov %eax,-0x1c(%ebp)
s = "(null)";
<<<<<<< HEAD
80100788: b8 a0 73 10 80 mov $0x801073a0,%eax
8010078d: 85 f6 test %esi,%esi
8010078f: 0f 44 f0 cmove %eax,%esi
=======
80100760: b8 20 71 10 80 mov $0x80107120,%eax
80100765: 85 f6 test %esi,%esi
80100767: 0f 44 f0 cmove %eax,%esi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
for(; *s; s++)
8010076a: 0f be 06 movsbl (%esi),%eax
8010076d: 84 c0 test %al,%al
8010076f: 74 16 je 80100787 <cprintf+0x137>
80100771: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80100778: 83 c6 01 add $0x1,%esi
consputc(*s);
8010077b: e8 60 fc ff ff call 801003e0 <consputc>
printint(*argp++, 16, 0);
break;
case 's':
if((s = (char*)*argp++) == 0)
s = "(null)";
for(; *s; s++)
80100780: 0f be 06 movsbl (%esi),%eax
80100783: 84 c0 test %al,%al
80100785: 75 f1 jne 80100778 <cprintf+0x128>
case 'x':
case 'p':
printint(*argp++, 16, 0);
break;
case 's':
if((s = (char*)*argp++) == 0)
80100787: 8b 75 e4 mov -0x1c(%ebp),%esi
8010078a: e9 36 ff ff ff jmp 801006c5 <cprintf+0x75>
8010078f: 90 nop
uint *argp;
char *s;
locking = cons.locking;
if(locking)
acquire(&cons.lock);
<<<<<<< HEAD
801007c0: 83 ec 0c sub $0xc,%esp
801007c3: 68 20 a5 10 80 push $0x8010a520
801007c8: e8 43 3d 00 00 call 80104510 <acquire>
801007cd: 83 c4 10 add $0x10,%esp
801007d0: e9 a4 fe ff ff jmp 80100679 <cprintf+0x19>
if (fmt == 0)
panic("null fmt");
801007d5: 83 ec 0c sub $0xc,%esp
801007d8: 68 a7 73 10 80 push $0x801073a7
801007dd: e8 8e fb ff ff call 80100370 <panic>
801007e2: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801007e9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
=======
80100790: c7 04 24 20 a5 10 80 movl $0x8010a520,(%esp)
80100797: e8 e4 3b 00 00 call 80104380 <acquire>
8010079c: e9 c8 fe ff ff jmp 80100669 <cprintf+0x19>
if (fmt == 0)
panic("null fmt");
801007a1: c7 04 24 27 71 10 80 movl $0x80107127,(%esp)
801007a8: e8 b3 fb ff ff call 80100360 <panic>
801007ad: 8d 76 00 lea 0x0(%esi),%esi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
801007b0 <consoleintr>:
#define C(x) ((x)-'@') // Control-x
void
consoleintr(int (*getc)(void))
{
801007b0: 55 push %ebp
801007b1: 89 e5 mov %esp,%ebp
801007b3: 57 push %edi
801007b4: 56 push %esi
int c, doprocdump = 0;
801007b5: 31 f6 xor %esi,%esi
#define C(x) ((x)-'@') // Control-x
void
consoleintr(int (*getc)(void))
{
801007b7: 53 push %ebx
801007b8: 83 ec 1c sub $0x1c,%esp
801007bb: 8b 5d 08 mov 0x8(%ebp),%ebx
int c, doprocdump = 0;
acquire(&cons.lock);
<<<<<<< HEAD
801007fe: 68 20 a5 10 80 push $0x8010a520
80100803: e8 08 3d 00 00 call 80104510 <acquire>
=======
801007be: c7 04 24 20 a5 10 80 movl $0x8010a520,(%esp)
801007c5: e8 b6 3b 00 00 call 80104380 <acquire>
801007ca: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
while((c = getc()) >= 0){
801007d0: ff d3 call *%ebx
801007d2: 85 c0 test %eax,%eax
801007d4: 89 c7 mov %eax,%edi
801007d6: 78 48 js 80100820 <consoleintr+0x70>
switch(c){
801007d8: 83 ff 10 cmp $0x10,%edi
801007db: 0f 84 2f 01 00 00 je 80100910 <consoleintr+0x160>
801007e1: 7e 5d jle 80100840 <consoleintr+0x90>
801007e3: 83 ff 15 cmp $0x15,%edi
801007e6: 0f 84 d4 00 00 00 je 801008c0 <consoleintr+0x110>
801007ec: 83 ff 7f cmp $0x7f,%edi
801007ef: 90 nop
801007f0: 75 53 jne 80100845 <consoleintr+0x95>
input.e--;
consputc(BACKSPACE);
}
break;
case C('H'): case '\x7f': // Backspace
if(input.e != input.w){
801007f2: a1 c8 ff 10 80 mov 0x8010ffc8,%eax
801007f7: 3b 05 c4 ff 10 80 cmp 0x8010ffc4,%eax
801007fd: 74 d1 je 801007d0 <consoleintr+0x20>
input.e--;
801007ff: 83 e8 01 sub $0x1,%eax
80100802: a3 c8 ff 10 80 mov %eax,0x8010ffc8
consputc(BACKSPACE);
80100807: b8 00 01 00 00 mov $0x100,%eax
8010080c: e8 cf fb ff ff call 801003e0 <consputc>
consoleintr(int (*getc)(void))
{
int c, doprocdump = 0;
acquire(&cons.lock);
while((c = getc()) >= 0){
80100811: ff d3 call *%ebx
80100813: 85 c0 test %eax,%eax
80100815: 89 c7 mov %eax,%edi
80100817: 79 bf jns 801007d8 <consoleintr+0x28>
80100819: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
}
}
break;
}
}
release(&cons.lock);
<<<<<<< HEAD
80100860: 83 ec 0c sub $0xc,%esp
80100863: 68 20 a5 10 80 push $0x8010a520
80100868: e8 83 3e 00 00 call 801046f0 <release>
=======
80100820: c7 04 24 20 a5 10 80 movl $0x8010a520,(%esp)
80100827: e8 84 3c 00 00 call 801044b0 <release>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
if(doprocdump) {
8010082c: 85 f6 test %esi,%esi
8010082e: 0f 85 ec 00 00 00 jne 80100920 <consoleintr+0x170>
procdump(); // now call procdump() wo. cons.lock held
}
}
80100834: 83 c4 1c add $0x1c,%esp
80100837: 5b pop %ebx
80100838: 5e pop %esi
80100839: 5f pop %edi
8010083a: 5d pop %ebp
8010083b: c3 ret
8010083c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
{
int c, doprocdump = 0;
acquire(&cons.lock);
while((c = getc()) >= 0){
switch(c){
80100840: 83 ff 08 cmp $0x8,%edi
80100843: 74 ad je 801007f2 <consoleintr+0x42>
input.e--;
consputc(BACKSPACE);
}
break;
default:
if(c != 0 && input.e-input.r < INPUT_BUF){
80100845: 85 ff test %edi,%edi
80100847: 74 87 je 801007d0 <consoleintr+0x20>
80100849: a1 c8 ff 10 80 mov 0x8010ffc8,%eax
8010084e: 89 c2 mov %eax,%edx
80100850: 2b 15 c0 ff 10 80 sub 0x8010ffc0,%edx
80100856: 83 fa 7f cmp $0x7f,%edx
80100859: 0f 87 71 ff ff ff ja 801007d0 <consoleintr+0x20>
c = (c == '\r') ? '\n' : c;
input.buf[input.e++ % INPUT_BUF] = c;
8010085f: 8d 50 01 lea 0x1(%eax),%edx
80100862: 83 e0 7f and $0x7f,%eax
consputc(BACKSPACE);
}
break;
default:
if(c != 0 && input.e-input.r < INPUT_BUF){
c = (c == '\r') ? '\n' : c;
80100865: 83 ff 0d cmp $0xd,%edi
input.buf[input.e++ % INPUT_BUF] = c;
80100868: 89 15 c8 ff 10 80 mov %edx,0x8010ffc8
consputc(BACKSPACE);
}
break;
default:
if(c != 0 && input.e-input.r < INPUT_BUF){
c = (c == '\r') ? '\n' : c;
8010086e: 0f 84 b8 00 00 00 je 8010092c <consoleintr+0x17c>
input.buf[input.e++ % INPUT_BUF] = c;
80100874: 89 f9 mov %edi,%ecx
80100876: 88 88 40 ff 10 80 mov %cl,-0x7fef00c0(%eax)
consputc(c);
8010087c: 89 f8 mov %edi,%eax
8010087e: e8 5d fb ff ff call 801003e0 <consputc>
if(c == '\n' || c == C('D') || input.e == input.r+INPUT_BUF){
80100883: 83 ff 04 cmp $0x4,%edi
80100886: a1 c8 ff 10 80 mov 0x8010ffc8,%eax
8010088b: 74 19 je 801008a6 <consoleintr+0xf6>
8010088d: 83 ff 0a cmp $0xa,%edi
80100890: 74 14 je 801008a6 <consoleintr+0xf6>
80100892: 8b 0d c0 ff 10 80 mov 0x8010ffc0,%ecx
80100898: 8d 91 80 00 00 00 lea 0x80(%ecx),%edx
8010089e: 39 d0 cmp %edx,%eax
801008a0: 0f 85 2a ff ff ff jne 801007d0 <consoleintr+0x20>
input.w = input.e;
wakeup(&input.r);
801008a6: c7 04 24 c0 ff 10 80 movl $0x8010ffc0,(%esp)
if(c != 0 && input.e-input.r < INPUT_BUF){
c = (c == '\r') ? '\n' : c;
input.buf[input.e++ % INPUT_BUF] = c;
consputc(c);
if(c == '\n' || c == C('D') || input.e == input.r+INPUT_BUF){
input.w = input.e;
801008ad: a3 c4 ff 10 80 mov %eax,0x8010ffc4
wakeup(&input.r);
<<<<<<< HEAD
801008f1: 68 c0 ff 10 80 push $0x8010ffc0
801008f6: e8 f5 37 00 00 call 801040f0 <wakeup>
801008fb: 83 c4 10 add $0x10,%esp
801008fe: e9 0d ff ff ff jmp 80100810 <consoleintr+0x20>
80100903: 90 nop
80100904: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
=======
801008b2: e8 29 36 00 00 call 80103ee0 <wakeup>
801008b7: e9 14 ff ff ff jmp 801007d0 <consoleintr+0x20>
801008bc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
case C('P'): // Process listing.
// procdump() locks cons.lock indirectly; invoke later
doprocdump = 1;
break;
case C('U'): // Kill line.
while(input.e != input.w &&
801008c0: a1 c8 ff 10 80 mov 0x8010ffc8,%eax
801008c5: 3b 05 c4 ff 10 80 cmp 0x8010ffc4,%eax
801008cb: 75 2b jne 801008f8 <consoleintr+0x148>
801008cd: e9 fe fe ff ff jmp 801007d0 <consoleintr+0x20>
801008d2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
input.buf[(input.e-1) % INPUT_BUF] != '\n'){
input.e--;
801008d8: a3 c8 ff 10 80 mov %eax,0x8010ffc8
consputc(BACKSPACE);
801008dd: b8 00 01 00 00 mov $0x100,%eax
801008e2: e8 f9 fa ff ff call 801003e0 <consputc>
case C('P'): // Process listing.
// procdump() locks cons.lock indirectly; invoke later
doprocdump = 1;
break;
case C('U'): // Kill line.
while(input.e != input.w &&
801008e7: a1 c8 ff 10 80 mov 0x8010ffc8,%eax
801008ec: 3b 05 c4 ff 10 80 cmp 0x8010ffc4,%eax
801008f2: 0f 84 d8 fe ff ff je 801007d0 <consoleintr+0x20>
input.buf[(input.e-1) % INPUT_BUF] != '\n'){
801008f8: 83 e8 01 sub $0x1,%eax
801008fb: 89 c2 mov %eax,%edx
801008fd: 83 e2 7f and $0x7f,%edx
case C('P'): // Process listing.
// procdump() locks cons.lock indirectly; invoke later
doprocdump = 1;
break;
case C('U'): // Kill line.
while(input.e != input.w &&
80100900: 80 ba 40 ff 10 80 0a cmpb $0xa,-0x7fef00c0(%edx)
80100907: 75 cf jne 801008d8 <consoleintr+0x128>
80100909: e9 c2 fe ff ff jmp 801007d0 <consoleintr+0x20>
8010090e: 66 90 xchg %ax,%ax
acquire(&cons.lock);
while((c = getc()) >= 0){
switch(c){
case C('P'): // Process listing.
// procdump() locks cons.lock indirectly; invoke later
doprocdump = 1;
80100910: be 01 00 00 00 mov $0x1,%esi
80100915: e9 b6 fe ff ff jmp 801007d0 <consoleintr+0x20>
8010091a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
}
release(&cons.lock);
if(doprocdump) {
procdump(); // now call procdump() wo. cons.lock held
}
}
80100920: 83 c4 1c add $0x1c,%esp
80100923: 5b pop %ebx
80100924: 5e pop %esi
80100925: 5f pop %edi
80100926: 5d pop %ebp
break;
}
}
release(&cons.lock);
if(doprocdump) {
procdump(); // now call procdump() wo. cons.lock held
<<<<<<< HEAD
80100977: e9 64 38 00 00 jmp 801041e0 <procdump>
=======
80100927: e9 94 36 00 00 jmp 80103fc0 <procdump>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
}
break;
default:
if(c != 0 && input.e-input.r < INPUT_BUF){
c = (c == '\r') ? '\n' : c;
input.buf[input.e++ % INPUT_BUF] = c;
8010092c: c6 80 40 ff 10 80 0a movb $0xa,-0x7fef00c0(%eax)
consputc(c);
80100933: b8 0a 00 00 00 mov $0xa,%eax
80100938: e8 a3 fa ff ff call 801003e0 <consputc>
8010093d: a1 c8 ff 10 80 mov 0x8010ffc8,%eax
80100942: e9 5f ff ff ff jmp 801008a6 <consoleintr+0xf6>
80100947: 89 f6 mov %esi,%esi
80100949: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80100950 <consoleinit>:
return n;
}
void
consoleinit(void)
{
80100950: 55 push %ebp
80100951: 89 e5 mov %esp,%ebp
80100953: 83 ec 18 sub $0x18,%esp
initlock(&cons.lock, "console");
<<<<<<< HEAD
801009a6: 68 b0 73 10 80 push $0x801073b0
801009ab: 68 20 a5 10 80 push $0x8010a520
801009b0: e8 3b 3b 00 00 call 801044f0 <initlock>
=======
80100956: c7 44 24 04 30 71 10 movl $0x80107130,0x4(%esp)
8010095d: 80
8010095e: c7 04 24 20 a5 10 80 movl $0x8010a520,(%esp)
80100965: e8 96 39 00 00 call 80104300 <initlock>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
devsw[CONSOLE].write = consolewrite;
devsw[CONSOLE].read = consoleread;
cons.locking = 1;
picenable(IRQ_KBD);
8010096a: c7 04 24 01 00 00 00 movl $0x1,(%esp)
void
consoleinit(void)
{
initlock(&cons.lock, "console");
devsw[CONSOLE].write = consolewrite;
80100971: c7 05 8c 09 11 80 f0 movl $0x801005f0,0x8011098c
80100978: 05 10 80
devsw[CONSOLE].read = consoleread;
8010097b: c7 05 88 09 11 80 70 movl $0x80100270,0x80110988
80100982: 02 10 80
cons.locking = 1;
80100985: c7 05 54 a5 10 80 01 movl $0x1,0x8010a554
8010098c: 00 00 00
picenable(IRQ_KBD);
8010098f: e8 5c 28 00 00 call 801031f0 <picenable>
ioapicenable(IRQ_KBD, 0);
80100994: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
8010099b: 00
8010099c: c7 04 24 01 00 00 00 movl $0x1,(%esp)
801009a3: e8 f8 18 00 00 call 801022a0 <ioapicenable>
}
801009a8: c9 leave
801009a9: c3 ret
801009aa: 66 90 xchg %ax,%ax
801009ac: 66 90 xchg %ax,%ax
801009ae: 66 90 xchg %ax,%ax
801009b0 <exec>:
#include "x86.h"
#include "elf.h"
int
exec(char *path, char **argv)
{
801009b0: 55 push %ebp
801009b1: 89 e5 mov %esp,%ebp
801009b3: 57 push %edi
801009b4: 56 push %esi
801009b5: 53 push %ebx
801009b6: 81 ec 1c 01 00 00 sub $0x11c,%esp
struct elfhdr elf;
struct inode *ip;
struct proghdr ph;
pde_t *pgdir, *oldpgdir;
begin_op();
801009bc: e8 bf 21 00 00 call 80102b80 <begin_op>
if((ip = namei(path)) == 0){
801009c1: 8b 45 08 mov 0x8(%ebp),%eax
801009c4: 89 04 24 mov %eax,(%esp)
801009c7: e8 14 15 00 00 call 80101ee0 <namei>
801009cc: 85 c0 test %eax,%eax
801009ce: 89 c3 mov %eax,%ebx
801009d0: 74 37 je 80100a09 <exec+0x59>
end_op();
return -1;
}
ilock(ip);
801009d2: 89 04 24 mov %eax,(%esp)
801009d5: e8 d6 0c 00 00 call 801016b0 <ilock>
pgdir = 0;
// Check ELF header
if(readi(ip, (char*)&elf, 0, sizeof(elf)) != sizeof(elf))
801009da: 8d 85 24 ff ff ff lea -0xdc(%ebp),%eax
801009e0: c7 44 24 0c 34 00 00 movl $0x34,0xc(%esp)
801009e7: 00
801009e8: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
801009ef: 00
801009f0: 89 44 24 04 mov %eax,0x4(%esp)
801009f4: 89 1c 24 mov %ebx,(%esp)
801009f7: e8 44 0f 00 00 call 80101940 <readi>
801009fc: 83 f8 34 cmp $0x34,%eax
801009ff: 74 1f je 80100a20 <exec+0x70>
bad:
if(pgdir)
freevm(pgdir);
if(ip){
iunlockput(ip);
80100a01: 89 1c 24 mov %ebx,(%esp)
80100a04: e8 e7 0e 00 00 call 801018f0 <iunlockput>
end_op();
80100a09: e8 e2 21 00 00 call 80102bf0 <end_op>
}
return -1;
80100a0e: b8 ff ff ff ff mov $0xffffffff,%eax
}
80100a13: 81 c4 1c 01 00 00 add $0x11c,%esp
80100a19: 5b pop %ebx
80100a1a: 5e pop %esi
80100a1b: 5f pop %edi
80100a1c: 5d pop %ebp
80100a1d: c3 ret
80100a1e: 66 90 xchg %ax,%ax
pgdir = 0;
// Check ELF header
if(readi(ip, (char*)&elf, 0, sizeof(elf)) != sizeof(elf))
goto bad;
if(elf.magic != ELF_MAGIC)
80100a20: 81 bd 24 ff ff ff 7f cmpl $0x464c457f,-0xdc(%ebp)
80100a27: 45 4c 46
80100a2a: 75 d5 jne 80100a01 <exec+0x51>
goto bad;
if((pgdir = setupkvm()) == 0)
<<<<<<< HEAD
80100a6c: e8 5f 62 00 00 call 80106cd0 <setupkvm>
80100a71: 85 c0 test %eax,%eax
80100a73: 89 85 f4 fe ff ff mov %eax,-0x10c(%ebp)
80100a79: 74 c0 je 80100a3b <exec+0x4b>
=======
80100a2c: e8 1f 60 00 00 call 80106a50 <setupkvm>
80100a31: 85 c0 test %eax,%eax
80100a33: 89 85 f4 fe ff ff mov %eax,-0x10c(%ebp)
80100a39: 74 c6 je 80100a01 <exec+0x51>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
goto bad;
// Load program into memory.
sz = 0;
for(i=0, off=elf.phoff; i<elf.phnum; i++, off+=sizeof(ph)){
80100a3b: 66 83 bd 50 ff ff ff cmpw $0x0,-0xb0(%ebp)
80100a42: 00
80100a43: 8b b5 40 ff ff ff mov -0xc0(%ebp),%esi
if((pgdir = setupkvm()) == 0)
goto bad;
// Load program into memory.
sz = 0;
80100a49: c7 85 f0 fe ff ff 00 movl $0x0,-0x110(%ebp)
80100a50: 00 00 00
for(i=0, off=elf.phoff; i<elf.phnum; i++, off+=sizeof(ph)){
80100a53: 0f 84 da 00 00 00 je 80100b33 <exec+0x183>
80100a59: 31 ff xor %edi,%edi
80100a5b: eb 18 jmp 80100a75 <exec+0xc5>
80100a5d: 8d 76 00 lea 0x0(%esi),%esi
80100a60: 0f b7 85 50 ff ff ff movzwl -0xb0(%ebp),%eax
80100a67: 83 c7 01 add $0x1,%edi
80100a6a: 83 c6 20 add $0x20,%esi
80100a6d: 39 f8 cmp %edi,%eax
80100a6f: 0f 8e be 00 00 00 jle 80100b33 <exec+0x183>
if(readi(ip, (char*)&ph, off, sizeof(ph)) != sizeof(ph))
80100a75: 8d 85 04 ff ff ff lea -0xfc(%ebp),%eax
80100a7b: c7 44 24 0c 20 00 00 movl $0x20,0xc(%esp)
80100a82: 00
80100a83: 89 74 24 08 mov %esi,0x8(%esp)
80100a87: 89 44 24 04 mov %eax,0x4(%esp)
80100a8b: 89 1c 24 mov %ebx,(%esp)
80100a8e: e8 ad 0e 00 00 call 80101940 <readi>
80100a93: 83 f8 20 cmp $0x20,%eax
80100a96: 0f 85 84 00 00 00 jne 80100b20 <exec+0x170>
goto bad;
if(ph.type != ELF_PROG_LOAD)
80100a9c: 83 bd 04 ff ff ff 01 cmpl $0x1,-0xfc(%ebp)
80100aa3: 75 bb jne 80100a60 <exec+0xb0>
continue;
if(ph.memsz < ph.filesz)
80100aa5: 8b 85 18 ff ff ff mov -0xe8(%ebp),%eax
80100aab: 3b 85 14 ff ff ff cmp -0xec(%ebp),%eax
80100ab1: 72 6d jb 80100b20 <exec+0x170>
goto bad;
if(ph.vaddr + ph.memsz < ph.vaddr)
80100ab3: 03 85 0c ff ff ff add -0xf4(%ebp),%eax
80100ab9: 72 65 jb 80100b20 <exec+0x170>
goto bad;
if((sz = allocuvm(pgdir, sz, ph.vaddr + ph.memsz)) == 0)
<<<<<<< HEAD
80100aec: 83 ec 04 sub $0x4,%esp
80100aef: 50 push %eax
80100af0: ff b5 f0 fe ff ff pushl -0x110(%ebp)
80100af6: ff b5 f4 fe ff ff pushl -0x10c(%ebp)
80100afc: e8 8f 64 00 00 call 80106f90 <allocuvm>
80100b01: 83 c4 10 add $0x10,%esp
80100b04: 85 c0 test %eax,%eax
80100b06: 89 85 f0 fe ff ff mov %eax,-0x110(%ebp)
80100b0c: 74 3a je 80100b48 <exec+0x158>
=======
80100abb: 89 44 24 08 mov %eax,0x8(%esp)
80100abf: 8b 85 f0 fe ff ff mov -0x110(%ebp),%eax
80100ac5: 89 44 24 04 mov %eax,0x4(%esp)
80100ac9: 8b 85 f4 fe ff ff mov -0x10c(%ebp),%eax
80100acf: 89 04 24 mov %eax,(%esp)
80100ad2: e8 39 62 00 00 call 80106d10 <allocuvm>
80100ad7: 85 c0 test %eax,%eax
80100ad9: 89 85 f0 fe ff ff mov %eax,-0x110(%ebp)
80100adf: 74 3f je 80100b20 <exec+0x170>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
goto bad;
if(ph.vaddr % PGSIZE != 0)
80100ae1: 8b 85 0c ff ff ff mov -0xf4(%ebp),%eax
80100ae7: a9 ff 0f 00 00 test $0xfff,%eax
80100aec: 75 32 jne 80100b20 <exec+0x170>
goto bad;
if(loaduvm(pgdir, (char*)ph.vaddr, ip, ph.off, ph.filesz) < 0)
<<<<<<< HEAD
80100b1b: 83 ec 0c sub $0xc,%esp
80100b1e: ff b5 14 ff ff ff pushl -0xec(%ebp)
80100b24: ff b5 08 ff ff ff pushl -0xf8(%ebp)
80100b2a: 53 push %ebx
80100b2b: 50 push %eax
80100b2c: ff b5 f4 fe ff ff pushl -0x10c(%ebp)
80100b32: e8 99 63 00 00 call 80106ed0 <loaduvm>
80100b37: 83 c4 20 add $0x20,%esp
80100b3a: 85 c0 test %eax,%eax
80100b3c: 0f 89 5e ff ff ff jns 80100aa0 <exec+0xb0>
80100b42: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
=======
80100aee: 8b 95 14 ff ff ff mov -0xec(%ebp),%edx
80100af4: 89 44 24 04 mov %eax,0x4(%esp)
80100af8: 8b 85 f4 fe ff ff mov -0x10c(%ebp),%eax
80100afe: 89 5c 24 08 mov %ebx,0x8(%esp)
80100b02: 89 54 24 10 mov %edx,0x10(%esp)
80100b06: 8b 95 08 ff ff ff mov -0xf8(%ebp),%edx
80100b0c: 89 04 24 mov %eax,(%esp)
80100b0f: 89 54 24 0c mov %edx,0xc(%esp)
80100b13: e8 38 61 00 00 call 80106c50 <loaduvm>
80100b18: 85 c0 test %eax,%eax
80100b1a: 0f 89 40 ff ff ff jns 80100a60 <exec+0xb0>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
freevm(oldpgdir);
return 0;
bad:
if(pgdir)
freevm(pgdir);
<<<<<<< HEAD
80100b48: 83 ec 0c sub $0xc,%esp
80100b4b: ff b5 f4 fe ff ff pushl -0x10c(%ebp)
80100b51: e8 6a 65 00 00 call 801070c0 <freevm>
80100b56: 83 c4 10 add $0x10,%esp
80100b59: e9 dd fe ff ff jmp 80100a3b <exec+0x4b>
=======
80100b20: 8b 85 f4 fe ff ff mov -0x10c(%ebp),%eax
80100b26: 89 04 24 mov %eax,(%esp)
80100b29: e8 12 63 00 00 call 80106e40 <freevm>
80100b2e: e9 ce fe ff ff jmp 80100a01 <exec+0x51>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
if(ph.vaddr % PGSIZE != 0)
goto bad;
if(loaduvm(pgdir, (char*)ph.vaddr, ip, ph.off, ph.filesz) < 0)
goto bad;
}
iunlockput(ip);
80100b33: 89 1c 24 mov %ebx,(%esp)
80100b36: e8 b5 0d 00 00 call 801018f0 <iunlockput>
80100b3b: 90 nop
80100b3c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
end_op();
80100b40: e8 ab 20 00 00 call 80102bf0 <end_op>
ip = 0;
// Allocate two pages at the next page boundary.
// Make the first inaccessible. Use the second as the user stack.
sz = PGROUNDUP(sz);
80100b45: 8b 85 f0 fe ff ff mov -0x110(%ebp),%eax
80100b4b: 05 ff 0f 00 00 add $0xfff,%eax
80100b50: 25 00 f0 ff ff and $0xfffff000,%eax
if((sz = allocuvm(pgdir, sz, sz + 2*PGSIZE)) == 0)
<<<<<<< HEAD
80100b7f: 8d 90 00 20 00 00 lea 0x2000(%eax),%edx
80100b85: 52 push %edx
80100b86: 50 push %eax
80100b87: ff b5 f4 fe ff ff pushl -0x10c(%ebp)
80100b8d: e8 fe 63 00 00 call 80106f90 <allocuvm>
80100b92: 83 c4 10 add $0x10,%esp
80100b95: 85 c0 test %eax,%eax
80100b97: 89 c6 mov %eax,%esi
80100b99: 75 2a jne 80100bc5 <exec+0x1d5>
=======
80100b55: 8d 90 00 20 00 00 lea 0x2000(%eax),%edx
80100b5b: 89 44 24 04 mov %eax,0x4(%esp)
80100b5f: 8b 85 f4 fe ff ff mov -0x10c(%ebp),%eax
80100b65: 89 54 24 08 mov %edx,0x8(%esp)
80100b69: 89 04 24 mov %eax,(%esp)
80100b6c: e8 9f 61 00 00 call 80106d10 <allocuvm>
80100b71: 85 c0 test %eax,%eax
80100b73: 89 85 ec fe ff ff mov %eax,-0x114(%ebp)
80100b79: 75 18 jne 80100b93 <exec+0x1e3>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
freevm(oldpgdir);
return 0;
bad:
if(pgdir)
freevm(pgdir);
<<<<<<< HEAD
80100b9b: 83 ec 0c sub $0xc,%esp
80100b9e: ff b5 f4 fe ff ff pushl -0x10c(%ebp)
80100ba4: e8 17 65 00 00 call 801070c0 <freevm>
80100ba9: 83 c4 10 add $0x10,%esp
=======
80100b7b: 8b 85 f4 fe ff ff mov -0x10c(%ebp),%eax
80100b81: 89 04 24 mov %eax,(%esp)
80100b84: e8 b7 62 00 00 call 80106e40 <freevm>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
if(ip){
iunlockput(ip);
end_op();
}
return -1;
80100b89: b8 ff ff ff ff mov $0xffffffff,%eax
80100b8e: e9 80 fe ff ff jmp 80100a13 <exec+0x63>
// 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;
clearpteu(pgdir, (char*)(sz - 2*PGSIZE));
<<<<<<< HEAD
80100bd2: 50 push %eax
80100bd3: ff b5 f4 fe ff ff pushl -0x10c(%ebp)
80100bd9: e8 62 65 00 00 call 80107140 <clearpteu>
=======
80100b93: 8b 9d ec fe ff ff mov -0x114(%ebp),%ebx
80100b99: 89 d8 mov %ebx,%eax
80100b9b: 2d 00 20 00 00 sub $0x2000,%eax
80100ba0: 89 44 24 04 mov %eax,0x4(%esp)
80100ba4: 8b 85 f4 fe ff ff mov -0x10c(%ebp),%eax
80100baa: 89 04 24 mov %eax,(%esp)
80100bad: e8 0e 63 00 00 call 80106ec0 <clearpteu>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
sp = sz;
// Push argument strings, prepare rest of stack in ustack.
for(argc = 0; argv[argc]; argc++) {
<<<<<<< HEAD
80100bde: 8b 45 0c mov 0xc(%ebp),%eax
80100be1: 83 c4 10 add $0x10,%esp
80100be4: 8d 95 58 ff ff ff lea -0xa8(%ebp),%edx
80100bea: 8b 00 mov (%eax),%eax
80100bec: 85 c0 test %eax,%eax
80100bee: 74 6d je 80100c5d <exec+0x26d>
80100bf0: 89 b5 f0 fe ff ff mov %esi,-0x110(%ebp)
80100bf6: 8b b5 f4 fe ff ff mov -0x10c(%ebp),%esi
80100bfc: eb 07 jmp 80100c05 <exec+0x215>
80100bfe: 66 90 xchg %ax,%ax
if(argc >= MAXARG)
80100c00: 83 ff 20 cmp $0x20,%edi
80100c03: 74 96 je 80100b9b <exec+0x1ab>
goto bad;
sp = (sp - (strlen(argv[argc]) + 1)) & ~3;
80100c05: 83 ec 0c sub $0xc,%esp
80100c08: 50 push %eax
80100c09: e8 72 3d 00 00 call 80104980 <strlen>
80100c0e: f7 d0 not %eax
80100c10: 01 c3 add %eax,%ebx
if(copyout(pgdir, sp, argv[argc], strlen(argv[argc]) + 1) < 0)
80100c12: 8b 45 0c mov 0xc(%ebp),%eax
80100c15: 5a pop %edx
// Push argument strings, prepare rest of stack in ustack.
for(argc = 0; argv[argc]; argc++) {
=======
80100bb2: 8b 45 0c mov 0xc(%ebp),%eax
80100bb5: 8b 00 mov (%eax),%eax
80100bb7: 85 c0 test %eax,%eax
80100bb9: 0f 84 66 01 00 00 je 80100d25 <exec+0x375>
80100bbf: 8b 7d 0c mov 0xc(%ebp),%edi
80100bc2: 31 f6 xor %esi,%esi
80100bc4: 8b 4d 0c mov 0xc(%ebp),%ecx
80100bc7: 89 f2 mov %esi,%edx
80100bc9: 89 fe mov %edi,%esi
80100bcb: 89 d7 mov %edx,%edi
80100bcd: 83 c1 04 add $0x4,%ecx
80100bd0: eb 0e jmp 80100be0 <exec+0x230>
80100bd2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80100bd8: 83 c1 04 add $0x4,%ecx
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
if(argc >= MAXARG)
80100bdb: 83 ff 20 cmp $0x20,%edi
80100bde: 74 9b je 80100b7b <exec+0x1cb>
goto bad;
sp = (sp - (strlen(argv[argc]) + 1)) & ~3;
80100be0: 89 04 24 mov %eax,(%esp)
80100be3: 89 8d f0 fe ff ff mov %ecx,-0x110(%ebp)
80100be9: e8 32 3b 00 00 call 80104720 <strlen>
80100bee: f7 d0 not %eax
80100bf0: 01 c3 add %eax,%ebx
if(copyout(pgdir, sp, argv[argc], strlen(argv[argc]) + 1) < 0)
<<<<<<< HEAD
80100c19: ff 34 b8 pushl (%eax,%edi,4)
80100c1c: e8 5f 3d 00 00 call 80104980 <strlen>
80100c21: 83 c0 01 add $0x1,%eax
80100c24: 50 push %eax
80100c25: 8b 45 0c mov 0xc(%ebp),%eax
80100c28: ff 34 b8 pushl (%eax,%edi,4)
80100c2b: 53 push %ebx
80100c2c: 56 push %esi
80100c2d: e8 6e 66 00 00 call 801072a0 <copyout>
80100c32: 83 c4 20 add $0x20,%esp
80100c35: 85 c0 test %eax,%eax
80100c37: 0f 88 5e ff ff ff js 80100b9b <exec+0x1ab>
goto bad;
clearpteu(pgdir, (char*)(sz - 2*PGSIZE));
sp = sz;
=======
80100bf2: 8b 06 mov (%esi),%eax
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// Push argument strings, prepare rest of stack in ustack.
for(argc = 0; argv[argc]; argc++) {
if(argc >= MAXARG)
goto bad;
sp = (sp - (strlen(argv[argc]) + 1)) & ~3;
80100bf4: 83 e3 fc and $0xfffffffc,%ebx
if(copyout(pgdir, sp, argv[argc], strlen(argv[argc]) + 1) < 0)
80100bf7: 89 04 24 mov %eax,(%esp)
80100bfa: e8 21 3b 00 00 call 80104720 <strlen>
80100bff: 83 c0 01 add $0x1,%eax
80100c02: 89 44 24 0c mov %eax,0xc(%esp)
80100c06: 8b 06 mov (%esi),%eax
80100c08: 89 5c 24 04 mov %ebx,0x4(%esp)
80100c0c: 89 44 24 08 mov %eax,0x8(%esp)
80100c10: 8b 85 f4 fe ff ff mov -0x10c(%ebp),%eax
80100c16: 89 04 24 mov %eax,(%esp)
80100c19: e8 02 64 00 00 call 80107020 <copyout>
80100c1e: 85 c0 test %eax,%eax
80100c20: 0f 88 55 ff ff ff js 80100b7b <exec+0x1cb>
goto bad;
clearpteu(pgdir, (char*)(sz - 2*PGSIZE));
sp = sz;
// Push argument strings, prepare rest of stack in ustack.
for(argc = 0; argv[argc]; argc++) {
80100c26: 8b 8d f0 fe ff ff mov -0x110(%ebp),%ecx
if(argc >= MAXARG)
goto bad;
sp = (sp - (strlen(argv[argc]) + 1)) & ~3;
if(copyout(pgdir, sp, argv[argc], strlen(argv[argc]) + 1) < 0)
goto bad;
ustack[3+argc] = sp;
80100c2c: 8d 95 58 ff ff ff lea -0xa8(%ebp),%edx
80100c32: 89 9c bd 64 ff ff ff mov %ebx,-0x9c(%ebp,%edi,4)
goto bad;
clearpteu(pgdir, (char*)(sz - 2*PGSIZE));
sp = sz;
// Push argument strings, prepare rest of stack in ustack.
for(argc = 0; argv[argc]; argc++) {
80100c39: 83 c7 01 add $0x1,%edi
80100c3c: 8b 01 mov (%ecx),%eax
80100c3e: 89 ce mov %ecx,%esi
80100c40: 85 c0 test %eax,%eax
80100c42: 75 94 jne 80100bd8 <exec+0x228>
80100c44: 89 fe mov %edi,%esi
}
ustack[3+argc] = 0;
ustack[0] = 0xffffffff; // fake return PC
ustack[1] = argc;
ustack[2] = sp - (argc+1)*4; // argv pointer
80100c46: 8d 04 b5 04 00 00 00 lea 0x4(,%esi,4),%eax
80100c4d: 89 d9 mov %ebx,%ecx
80100c4f: 29 c1 sub %eax,%ecx
sp -= (3+argc+1) * 4;
80100c51: 83 c0 0c add $0xc,%eax
80100c54: 29 c3 sub %eax,%ebx
if(copyout(pgdir, sp, ustack, (3+argc+1)*4) < 0)
80100c56: 89 44 24 0c mov %eax,0xc(%esp)
80100c5a: 8b 85 f4 fe ff ff mov -0x10c(%ebp),%eax
80100c60: 89 54 24 08 mov %edx,0x8(%esp)
80100c64: 89 5c 24 04 mov %ebx,0x4(%esp)
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;
80100c68: c7 84 b5 64 ff ff ff movl $0x0,-0x9c(%ebp,%esi,4)
80100c6f: 00 00 00 00
ustack[0] = 0xffffffff; // fake return PC
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)
80100c73: 89 04 24 mov %eax,(%esp)
goto bad;
ustack[3+argc] = sp;
}
ustack[3+argc] = 0;
ustack[0] = 0xffffffff; // fake return PC
80100c76: c7 85 58 ff ff ff ff movl $0xffffffff,-0xa8(%ebp)
80100c7d: ff ff ff
ustack[1] = argc;
80100c80: 89 b5 5c ff ff ff mov %esi,-0xa4(%ebp)
ustack[2] = sp - (argc+1)*4; // argv pointer
80100c86: 89 8d 60 ff ff ff mov %ecx,-0xa0(%ebp)
sp -= (3+argc+1) * 4;
if(copyout(pgdir, sp, ustack, (3+argc+1)*4) < 0)
<<<<<<< HEAD
80100c97: e8 04 66 00 00 call 801072a0 <copyout>
80100c9c: 83 c4 10 add $0x10,%esp
80100c9f: 85 c0 test %eax,%eax
80100ca1: 0f 88 f4 fe ff ff js 80100b9b <exec+0x1ab>
=======
80100c8c: e8 8f 63 00 00 call 80107020 <copyout>
80100c91: 85 c0 test %eax,%eax
80100c93: 0f 88 e2 fe ff ff js 80100b7b <exec+0x1cb>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
goto bad;
// Save program name for debugging.
for(last=s=path; *s; s++)
80100c99: 8b 45 08 mov 0x8(%ebp),%eax
80100c9c: 0f b6 10 movzbl (%eax),%edx
80100c9f: 84 d2 test %dl,%dl
80100ca1: 74 19 je 80100cbc <exec+0x30c>
80100ca3: 8b 4d 08 mov 0x8(%ebp),%ecx
80100ca6: 83 c0 01 add $0x1,%eax
if(*s == '/')
last = s+1;
80100ca9: 80 fa 2f cmp $0x2f,%dl
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++)
80100cac: 0f b6 10 movzbl (%eax),%edx
if(*s == '/')
last = s+1;
80100caf: 0f 44 c8 cmove %eax,%ecx
80100cb2: 83 c0 01 add $0x1,%eax
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++)
80100cb5: 84 d2 test %dl,%dl
80100cb7: 75 f0 jne 80100ca9 <exec+0x2f9>
80100cb9: 89 4d 08 mov %ecx,0x8(%ebp)
if(*s == '/')
last = s+1;
safestrcpy(proc->name, last, sizeof(proc->name));
80100cbc: 8b 45 08 mov 0x8(%ebp),%eax
80100cbf: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp)
80100cc6: 00
80100cc7: 89 44 24 04 mov %eax,0x4(%esp)
80100ccb: 65 a1 04 00 00 00 mov %gs:0x4,%eax
<<<<<<< HEAD
80100cd1: 6a 10 push $0x10
80100cd3: ff 75 08 pushl 0x8(%ebp)
80100cd6: 83 c0 6c add $0x6c,%eax
80100cd9: 50 push %eax
80100cda: e8 61 3c 00 00 call 80104940 <safestrcpy>
=======
80100cd1: 83 c0 6c add $0x6c,%eax
80100cd4: 89 04 24 mov %eax,(%esp)
80100cd7: e8 04 3a 00 00 call 801046e0 <safestrcpy>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// Commit to the user image.
oldpgdir = proc->pgdir;
80100cdc: 65 a1 04 00 00 00 mov %gs:0x4,%eax
proc->pgdir = pgdir;
80100ce2: 8b 8d f4 fe ff ff mov -0x10c(%ebp),%ecx
if(*s == '/')
last = s+1;
safestrcpy(proc->name, last, sizeof(proc->name));
// Commit to the user image.
oldpgdir = proc->pgdir;
80100ce8: 8b 70 04 mov 0x4(%eax),%esi
proc->pgdir = pgdir;
80100ceb: 89 48 04 mov %ecx,0x4(%eax)
proc->sz = sz;
80100cee: 8b 8d ec fe ff ff mov -0x114(%ebp),%ecx
80100cf4: 89 08 mov %ecx,(%eax)
proc->tf->eip = elf.entry; // main
80100cf6: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80100cfc: 8b 8d 3c ff ff ff mov -0xc4(%ebp),%ecx
80100d02: 8b 50 18 mov 0x18(%eax),%edx
80100d05: 89 4a 38 mov %ecx,0x38(%edx)
proc->tf->esp = sp;
80100d08: 8b 50 18 mov 0x18(%eax),%edx
80100d0b: 89 5a 44 mov %ebx,0x44(%edx)
switchuvm(proc);
<<<<<<< HEAD
80100d0b: 89 04 24 mov %eax,(%esp)
80100d0e: e8 6d 60 00 00 call 80106d80 <switchuvm>
freevm(oldpgdir);
80100d13: 89 3c 24 mov %edi,(%esp)
80100d16: e8 a5 63 00 00 call 801070c0 <freevm>
=======
80100d0e: 89 04 24 mov %eax,(%esp)
80100d11: e8 ea 5d 00 00 call 80106b00 <switchuvm>
freevm(oldpgdir);
80100d16: 89 34 24 mov %esi,(%esp)
80100d19: e8 22 61 00 00 call 80106e40 <freevm>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
return 0;
80100d1e: 31 c0 xor %eax,%eax
80100d20: e9 ee fc ff ff jmp 80100a13 <exec+0x63>
goto bad;
clearpteu(pgdir, (char*)(sz - 2*PGSIZE));
sp = sz;
// Push argument strings, prepare rest of stack in ustack.
for(argc = 0; argv[argc]; argc++) {
80100d25: 8b 9d ec fe ff ff mov -0x114(%ebp),%ebx
80100d2b: 31 f6 xor %esi,%esi
80100d2d: 8d 95 58 ff ff ff lea -0xa8(%ebp),%edx
80100d33: e9 0e ff ff ff jmp 80100c46 <exec+0x296>
80100d38: 66 90 xchg %ax,%ax
80100d3a: 66 90 xchg %ax,%ax
80100d3c: 66 90 xchg %ax,%ax
80100d3e: 66 90 xchg %ax,%ax
80100d40 <fileinit>:
struct file file[NFILE];
} ftable;
void
fileinit(void)
{
80100d40: 55 push %ebp
80100d41: 89 e5 mov %esp,%ebp
80100d43: 83 ec 18 sub $0x18,%esp
initlock(&ftable.lock, "ftable");
<<<<<<< HEAD
80100d36: 68 c9 73 10 80 push $0x801073c9
80100d3b: 68 e0 ff 10 80 push $0x8010ffe0
80100d40: e8 ab 37 00 00 call 801044f0 <initlock>
=======
80100d46: c7 44 24 04 49 71 10 movl $0x80107149,0x4(%esp)
80100d4d: 80
80100d4e: c7 04 24 e0 ff 10 80 movl $0x8010ffe0,(%esp)
80100d55: e8 a6 35 00 00 call 80104300 <initlock>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
}
80100d5a: c9 leave
80100d5b: c3 ret
80100d5c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80100d60 <filealloc>:
// Allocate a file structure.
struct file*
filealloc(void)
{
80100d60: 55 push %ebp
80100d61: 89 e5 mov %esp,%ebp
80100d63: 53 push %ebx
struct file *f;
acquire(&ftable.lock);
for(f = ftable.file; f < ftable.file + NFILE; f++){
80100d64: bb 14 00 11 80 mov $0x80110014,%ebx
}
// Allocate a file structure.
struct file*
filealloc(void)
{
80100d69: 83 ec 14 sub $0x14,%esp
struct file *f;
acquire(&ftable.lock);
<<<<<<< HEAD
80100d5c: 68 e0 ff 10 80 push $0x8010ffe0
80100d61: e8 aa 37 00 00 call 80104510 <acquire>
80100d66: 83 c4 10 add $0x10,%esp
80100d69: eb 10 jmp 80100d7b <filealloc+0x2b>
80100d6b: 90 nop
80100d6c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
=======
80100d6c: c7 04 24 e0 ff 10 80 movl $0x8010ffe0,(%esp)
80100d73: e8 08 36 00 00 call 80104380 <acquire>
80100d78: eb 11 jmp 80100d8b <filealloc+0x2b>
80100d7a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
for(f = ftable.file; f < ftable.file + NFILE; f++){
80100d80: 83 c3 18 add $0x18,%ebx
80100d83: 81 fb 74 09 11 80 cmp $0x80110974,%ebx
80100d89: 74 25 je 80100db0 <filealloc+0x50>
if(f->ref == 0){
80100d8b: 8b 43 04 mov 0x4(%ebx),%eax
80100d8e: 85 c0 test %eax,%eax
80100d90: 75 ee jne 80100d80 <filealloc+0x20>
f->ref = 1;
release(&ftable.lock);
80100d92: c7 04 24 e0 ff 10 80 movl $0x8010ffe0,(%esp)
struct file *f;
acquire(&ftable.lock);
for(f = ftable.file; f < ftable.file + NFILE; f++){
if(f->ref == 0){
f->ref = 1;
80100d99: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx)
release(&ftable.lock);
80100da0: e8 0b 37 00 00 call 801044b0 <release>
return f;
}
}
release(&ftable.lock);
return 0;
}
80100da5: 83 c4 14 add $0x14,%esp
acquire(&ftable.lock);
for(f = ftable.file; f < ftable.file + NFILE; f++){
if(f->ref == 0){
f->ref = 1;
release(&ftable.lock);
<<<<<<< HEAD
80100d8c: 68 e0 ff 10 80 push $0x8010ffe0
80100d91: e8 5a 39 00 00 call 801046f0 <release>
=======
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
return f;
80100da8: 89 d8 mov %ebx,%eax
}
}
release(&ftable.lock);
return 0;
}
80100daa: 5b pop %ebx
80100dab: 5d pop %ebp
80100dac: c3 ret
80100dad: 8d 76 00 lea 0x0(%esi),%esi
f->ref = 1;
release(&ftable.lock);
return f;
}
}
release(&ftable.lock);
<<<<<<< HEAD
80100da0: 83 ec 0c sub $0xc,%esp
80100da3: 68 e0 ff 10 80 push $0x8010ffe0
80100da8: e8 43 39 00 00 call 801046f0 <release>
=======
80100db0: c7 04 24 e0 ff 10 80 movl $0x8010ffe0,(%esp)
80100db7: e8 f4 36 00 00 call 801044b0 <release>
return 0;
}
80100dbc: 83 c4 14 add $0x14,%esp
release(&ftable.lock);
return f;
}
}
release(&ftable.lock);
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
return 0;
80100dbf: 31 c0 xor %eax,%eax
}
80100dc1: 5b pop %ebx
80100dc2: 5d pop %ebp
80100dc3: c3 ret
80100dc4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80100dca: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
80100dd0 <filedup>:
// Increment ref count for file f.
struct file*
filedup(struct file *f)
{
<<<<<<< HEAD
80100dc0: 55 push %ebp
80100dc1: 89 e5 mov %esp,%ebp
80100dc3: 53 push %ebx
80100dc4: 83 ec 10 sub $0x10,%esp
80100dc7: 8b 5d 08 mov 0x8(%ebp),%ebx
acquire(&ftable.lock);
80100dca: 68 e0 ff 10 80 push $0x8010ffe0
80100dcf: e8 3c 37 00 00 call 80104510 <acquire>
if(f->ref < 1)
80100dd4: 8b 43 04 mov 0x4(%ebx),%eax
80100dd7: 83 c4 10 add $0x10,%esp
80100dda: 85 c0 test %eax,%eax
80100ddc: 7e 1a jle 80100df8 <filedup+0x38>
panic("filedup");
f->ref++;
80100dde: 83 c0 01 add $0x1,%eax
release(&ftable.lock);
80100de1: 83 ec 0c sub $0xc,%esp
filedup(struct file *f)
{
=======
80100dd0: 55 push %ebp
80100dd1: 89 e5 mov %esp,%ebp
80100dd3: 53 push %ebx
80100dd4: 83 ec 14 sub $0x14,%esp
80100dd7: 8b 5d 08 mov 0x8(%ebp),%ebx
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
acquire(&ftable.lock);
80100dda: c7 04 24 e0 ff 10 80 movl $0x8010ffe0,(%esp)
80100de1: e8 9a 35 00 00 call 80104380 <acquire>
if(f->ref < 1)
80100de6: 8b 43 04 mov 0x4(%ebx),%eax
80100de9: 85 c0 test %eax,%eax
80100deb: 7e 1a jle 80100e07 <filedup+0x37>
panic("filedup");
f->ref++;
80100ded: 83 c0 01 add $0x1,%eax
80100df0: 89 43 04 mov %eax,0x4(%ebx)
release(&ftable.lock);
<<<<<<< HEAD
80100de7: 68 e0 ff 10 80 push $0x8010ffe0
80100dec: e8 ff 38 00 00 call 801046f0 <release>
=======
80100df3: c7 04 24 e0 ff 10 80 movl $0x8010ffe0,(%esp)
80100dfa: e8 b1 36 00 00 call 801044b0 <release>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
return f;
}
80100dff: 83 c4 14 add $0x14,%esp
80100e02: 89 d8 mov %ebx,%eax
80100e04: 5b pop %ebx
80100e05: 5d pop %ebp
80100e06: c3 ret
struct file*
filedup(struct file *f)
{
acquire(&ftable.lock);
if(f->ref < 1)
panic("filedup");
<<<<<<< HEAD
80100df8: 83 ec 0c sub $0xc,%esp
80100dfb: 68 d0 73 10 80 push $0x801073d0
80100e00: e8 6b f5 ff ff call 80100370 <panic>
80100e05: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80100e09: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
=======
80100e07: c7 04 24 50 71 10 80 movl $0x80107150,(%esp)
80100e0e: e8 4d f5 ff ff call 80100360 <panic>
80100e13: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80100e19: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
80100e20 <fileclose>:
}
// Close file f. (Decrement ref count, close when reaches 0.)
void
fileclose(struct file *f)
{
80100e20: 55 push %ebp
80100e21: 89 e5 mov %esp,%ebp
80100e23: 57 push %edi
80100e24: 56 push %esi
80100e25: 53 push %ebx
80100e26: 83 ec 1c sub $0x1c,%esp
80100e29: 8b 7d 08 mov 0x8(%ebp),%edi
struct file ff;
acquire(&ftable.lock);
<<<<<<< HEAD
80100e1c: 68 e0 ff 10 80 push $0x8010ffe0
80100e21: e8 ea 36 00 00 call 80104510 <acquire>
=======
80100e2c: c7 04 24 e0 ff 10 80 movl $0x8010ffe0,(%esp)
80100e33: e8 48 35 00 00 call 80104380 <acquire>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
if(f->ref < 1)
80100e38: 8b 57 04 mov 0x4(%edi),%edx
80100e3b: 85 d2 test %edx,%edx
80100e3d: 0f 8e 89 00 00 00 jle 80100ecc <fileclose+0xac>
panic("fileclose");
if(--f->ref > 0){
80100e43: 83 ea 01 sub $0x1,%edx
80100e46: 85 d2 test %edx,%edx
80100e48: 89 57 04 mov %edx,0x4(%edi)
80100e4b: 74 13 je 80100e60 <fileclose+0x40>
release(&ftable.lock);
80100e4d: c7 45 08 e0 ff 10 80 movl $0x8010ffe0,0x8(%ebp)
else if(ff.type == FD_INODE){
begin_op();
iput(ff.ip);
end_op();
}
}
80100e54: 83 c4 1c add $0x1c,%esp
80100e57: 5b pop %ebx
80100e58: 5e pop %esi
80100e59: 5f pop %edi
80100e5a: 5d pop %ebp
acquire(&ftable.lock);
if(f->ref < 1)
panic("fileclose");
if(--f->ref > 0){
release(&ftable.lock);
<<<<<<< HEAD
80100e4c: e9 9f 38 00 00 jmp 801046f0 <release>
80100e51: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
return;
}
ff = *f;
80100e58: 0f b6 47 09 movzbl 0x9(%edi),%eax
80100e5c: 8b 1f mov (%edi),%ebx
f->ref = 0;
f->type = FD_NONE;
release(&ftable.lock);
80100e5e: 83 ec 0c sub $0xc,%esp
panic("fileclose");
if(--f->ref > 0){
release(&ftable.lock);
=======
80100e5b: e9 50 36 00 00 jmp 801044b0 <release>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
return;
}
ff = *f;
80100e60: 0f b6 47 09 movzbl 0x9(%edi),%eax
80100e64: 8b 37 mov (%edi),%esi
80100e66: 8b 5f 0c mov 0xc(%edi),%ebx
f->ref = 0;
f->type = FD_NONE;
80100e69: c7 07 00 00 00 00 movl $0x0,(%edi)
panic("fileclose");
if(--f->ref > 0){
release(&ftable.lock);
return;
}
ff = *f;
80100e6f: 88 45 e7 mov %al,-0x19(%ebp)
80100e72: 8b 47 10 mov 0x10(%edi),%eax
f->ref = 0;
f->type = FD_NONE;
release(&ftable.lock);
80100e75: c7 04 24 e0 ff 10 80 movl $0x8010ffe0,(%esp)
panic("fileclose");
if(--f->ref > 0){
release(&ftable.lock);
return;
}
ff = *f;
80100e7c: 89 45 e0 mov %eax,-0x20(%ebp)
f->ref = 0;
f->type = FD_NONE;
release(&ftable.lock);
<<<<<<< HEAD
80100e78: e8 73 38 00 00 call 801046f0 <release>
=======
80100e7f: e8 2c 36 00 00 call 801044b0 <release>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
if(ff.type == FD_PIPE)
80100e84: 83 fe 01 cmp $0x1,%esi
80100e87: 74 0f je 80100e98 <fileclose+0x78>
pipeclose(ff.pipe, ff.writable);
else if(ff.type == FD_INODE){
80100e89: 83 fe 02 cmp $0x2,%esi
80100e8c: 74 22 je 80100eb0 <fileclose+0x90>
begin_op();
iput(ff.ip);
end_op();
}
}
80100e8e: 83 c4 1c add $0x1c,%esp
80100e91: 5b pop %ebx
80100e92: 5e pop %esi
80100e93: 5f pop %edi
80100e94: 5d pop %ebp
80100e95: c3 ret
80100e96: 66 90 xchg %ax,%ax
f->ref = 0;
f->type = FD_NONE;
release(&ftable.lock);
if(ff.type == FD_PIPE)
pipeclose(ff.pipe, ff.writable);
80100e98: 0f be 75 e7 movsbl -0x19(%ebp),%esi
80100e9c: 89 1c 24 mov %ebx,(%esp)
80100e9f: 89 74 24 04 mov %esi,0x4(%esp)
80100ea3: e8 f8 24 00 00 call 801033a0 <pipeclose>
80100ea8: eb e4 jmp 80100e8e <fileclose+0x6e>
80100eaa: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
else if(ff.type == FD_INODE){
begin_op();
80100eb0: e8 cb 1c 00 00 call 80102b80 <begin_op>
iput(ff.ip);
80100eb5: 8b 45 e0 mov -0x20(%ebp),%eax
80100eb8: 89 04 24 mov %eax,(%esp)
80100ebb: e8 00 09 00 00 call 801017c0 <iput>
end_op();
}
}
80100ec0: 83 c4 1c add $0x1c,%esp
80100ec3: 5b pop %ebx
80100ec4: 5e pop %esi
80100ec5: 5f pop %edi
80100ec6: 5d pop %ebp
if(ff.type == FD_PIPE)
pipeclose(ff.pipe, ff.writable);
else if(ff.type == FD_INODE){
begin_op();
iput(ff.ip);
end_op();
80100ec7: e9 24 1d 00 00 jmp 80102bf0 <end_op>
{
struct file ff;
acquire(&ftable.lock);
if(f->ref < 1)
panic("fileclose");
<<<<<<< HEAD
80100ecf: 83 ec 0c sub $0xc,%esp
80100ed2: 68 d8 73 10 80 push $0x801073d8
80100ed7: e8 94 f4 ff ff call 80100370 <panic>
80100edc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
=======
80100ecc: c7 04 24 58 71 10 80 movl $0x80107158,(%esp)
80100ed3: e8 88 f4 ff ff call 80100360 <panic>
80100ed8: 90 nop
80100ed9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
80100ee0 <filestat>:
}
// Get metadata about file f.
int
filestat(struct file *f, struct stat *st)
{
80100ee0: 55 push %ebp
80100ee1: 89 e5 mov %esp,%ebp
80100ee3: 53 push %ebx
80100ee4: 83 ec 14 sub $0x14,%esp
80100ee7: 8b 5d 08 mov 0x8(%ebp),%ebx
if(f->type == FD_INODE){
80100eea: 83 3b 02 cmpl $0x2,(%ebx)
80100eed: 75 31 jne 80100f20 <filestat+0x40>
ilock(f->ip);
80100eef: 8b 43 10 mov 0x10(%ebx),%eax
80100ef2: 89 04 24 mov %eax,(%esp)
80100ef5: e8 b6 07 00 00 call 801016b0 <ilock>
stati(f->ip, st);
80100efa: 8b 45 0c mov 0xc(%ebp),%eax
80100efd: 89 44 24 04 mov %eax,0x4(%esp)
80100f01: 8b 43 10 mov 0x10(%ebx),%eax
80100f04: 89 04 24 mov %eax,(%esp)
80100f07: e8 04 0a 00 00 call 80101910 <stati>
iunlock(f->ip);
80100f0c: 8b 43 10 mov 0x10(%ebx),%eax
80100f0f: 89 04 24 mov %eax,(%esp)
80100f12: e8 69 08 00 00 call 80101780 <iunlock>
return 0;
}
return -1;
}
80100f17: 83 c4 14 add $0x14,%esp
{
if(f->type == FD_INODE){
ilock(f->ip);
stati(f->ip, st);
iunlock(f->ip);
return 0;
80100f1a: 31 c0 xor %eax,%eax
}
return -1;
}
80100f1c: 5b pop %ebx
80100f1d: 5d pop %ebp
80100f1e: c3 ret
80100f1f: 90 nop
80100f20: 83 c4 14 add $0x14,%esp
ilock(f->ip);
stati(f->ip, st);
iunlock(f->ip);
return 0;
}
return -1;
80100f23: b8 ff ff ff ff mov $0xffffffff,%eax
}
80100f28: 5b pop %ebx
80100f29: 5d pop %ebp
80100f2a: c3 ret
80100f2b: 90 nop
80100f2c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80100f30 <fileread>:
// Read from file f.
int
fileread(struct file *f, char *addr, int n)
{
80100f30: 55 push %ebp
80100f31: 89 e5 mov %esp,%ebp
80100f33: 57 push %edi
80100f34: 56 push %esi
80100f35: 53 push %ebx
80100f36: 83 ec 1c sub $0x1c,%esp
80100f39: 8b 5d 08 mov 0x8(%ebp),%ebx
80100f3c: 8b 75 0c mov 0xc(%ebp),%esi
80100f3f: 8b 7d 10 mov 0x10(%ebp),%edi
int r;
if(f->readable == 0)
80100f42: 80 7b 08 00 cmpb $0x0,0x8(%ebx)
80100f46: 74 68 je 80100fb0 <fileread+0x80>
return -1;
if(f->type == FD_PIPE)
80100f48: 8b 03 mov (%ebx),%eax
80100f4a: 83 f8 01 cmp $0x1,%eax
80100f4d: 74 49 je 80100f98 <fileread+0x68>
return piperead(f->pipe, addr, n);
if(f->type == FD_INODE){
80100f4f: 83 f8 02 cmp $0x2,%eax
80100f52: 75 63 jne 80100fb7 <fileread+0x87>
ilock(f->ip);
80100f54: 8b 43 10 mov 0x10(%ebx),%eax
80100f57: 89 04 24 mov %eax,(%esp)
80100f5a: e8 51 07 00 00 call 801016b0 <ilock>
if((r = readi(f->ip, addr, f->off, n)) > 0)
80100f5f: 89 7c 24 0c mov %edi,0xc(%esp)
80100f63: 8b 43 14 mov 0x14(%ebx),%eax
80100f66: 89 74 24 04 mov %esi,0x4(%esp)
80100f6a: 89 44 24 08 mov %eax,0x8(%esp)
80100f6e: 8b 43 10 mov 0x10(%ebx),%eax
80100f71: 89 04 24 mov %eax,(%esp)
80100f74: e8 c7 09 00 00 call 80101940 <readi>
80100f79: 85 c0 test %eax,%eax
80100f7b: 89 c6 mov %eax,%esi
80100f7d: 7e 03 jle 80100f82 <fileread+0x52>
f->off += r;
80100f7f: 01 43 14 add %eax,0x14(%ebx)
iunlock(f->ip);
80100f82: 8b 43 10 mov 0x10(%ebx),%eax
80100f85: 89 04 24 mov %eax,(%esp)
80100f88: e8 f3 07 00 00 call 80101780 <iunlock>
return -1;
if(f->type == FD_PIPE)
return piperead(f->pipe, addr, n);
if(f->type == FD_INODE){
ilock(f->ip);
if((r = readi(f->ip, addr, f->off, n)) > 0)
80100f8d: 89 f0 mov %esi,%eax
f->off += r;
iunlock(f->ip);
return r;
}
panic("fileread");
}
80100f8f: 83 c4 1c add $0x1c,%esp
80100f92: 5b pop %ebx
80100f93: 5e pop %esi
80100f94: 5f pop %edi
80100f95: 5d pop %ebp
80100f96: c3 ret
80100f97: 90 nop
int r;
if(f->readable == 0)
return -1;
if(f->type == FD_PIPE)
return piperead(f->pipe, addr, n);
80100f98: 8b 43 0c mov 0xc(%ebx),%eax
80100f9b: 89 45 08 mov %eax,0x8(%ebp)
f->off += r;
iunlock(f->ip);
return r;
}
panic("fileread");
}
80100f9e: 83 c4 1c add $0x1c,%esp
80100fa1: 5b pop %ebx
80100fa2: 5e pop %esi
80100fa3: 5f pop %edi
80100fa4: 5d pop %ebp
int r;
if(f->readable == 0)
return -1;
if(f->type == FD_PIPE)
return piperead(f->pipe, addr, n);
80100fa5: e9 a6 25 00 00 jmp 80103550 <piperead>
80100faa: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
fileread(struct file *f, char *addr, int n)
{
int r;
if(f->readable == 0)
return -1;
80100fb0: b8 ff ff ff ff mov $0xffffffff,%eax
80100fb5: eb d8 jmp 80100f8f <fileread+0x5f>
if((r = readi(f->ip, addr, f->off, n)) > 0)
f->off += r;
iunlock(f->ip);
return r;
}
panic("fileread");
<<<<<<< HEAD
80100faf: 83 ec 0c sub $0xc,%esp
80100fb2: 68 e2 73 10 80 push $0x801073e2
80100fb7: e8 b4 f3 ff ff call 80100370 <panic>
80100fbc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
=======
80100fb7: c7 04 24 62 71 10 80 movl $0x80107162,(%esp)
80100fbe: e8 9d f3 ff ff call 80100360 <panic>
80100fc3: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80100fc9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
80100fd0 <filewrite>:
//PAGEBREAK!
// Write to file f.
int
filewrite(struct file *f, char *addr, int n)
{
80100fd0: 55 push %ebp
80100fd1: 89 e5 mov %esp,%ebp
80100fd3: 57 push %edi
80100fd4: 56 push %esi
80100fd5: 53 push %ebx
80100fd6: 83 ec 2c sub $0x2c,%esp
80100fd9: 8b 45 0c mov 0xc(%ebp),%eax
80100fdc: 8b 7d 08 mov 0x8(%ebp),%edi
80100fdf: 89 45 dc mov %eax,-0x24(%ebp)
80100fe2: 8b 45 10 mov 0x10(%ebp),%eax
int r;
if(f->writable == 0)
80100fe5: 80 7f 09 00 cmpb $0x0,0x9(%edi)
//PAGEBREAK!
// Write to file f.
int
filewrite(struct file *f, char *addr, int n)
{
80100fe9: 89 45 e4 mov %eax,-0x1c(%ebp)
int r;
if(f->writable == 0)
80100fec: 0f 84 ae 00 00 00 je 801010a0 <filewrite+0xd0>
return -1;
if(f->type == FD_PIPE)
80100ff2: 8b 07 mov (%edi),%eax
80100ff4: 83 f8 01 cmp $0x1,%eax
80100ff7: 0f 84 c2 00 00 00 je 801010bf <filewrite+0xef>
return pipewrite(f->pipe, addr, n);
if(f->type == FD_INODE){
80100ffd: 83 f8 02 cmp $0x2,%eax
80101000: 0f 85 d7 00 00 00 jne 801010dd <filewrite+0x10d>
// 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){
80101006: 8b 45 e4 mov -0x1c(%ebp),%eax
80101009: 31 db xor %ebx,%ebx
8010100b: 85 c0 test %eax,%eax
8010100d: 7f 31 jg 80101040 <filewrite+0x70>
8010100f: e9 9c 00 00 00 jmp 801010b0 <filewrite+0xe0>
80101014: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
begin_op();
ilock(f->ip);
if ((r = writei(f->ip, addr + i, f->off, n1)) > 0)
f->off += r;
iunlock(f->ip);
80101018: 8b 4f 10 mov 0x10(%edi),%ecx
n1 = max;
begin_op();
ilock(f->ip);
if ((r = writei(f->ip, addr + i, f->off, n1)) > 0)
f->off += r;
8010101b: 01 47 14 add %eax,0x14(%edi)
8010101e: 89 45 e0 mov %eax,-0x20(%ebp)
iunlock(f->ip);
80101021: 89 0c 24 mov %ecx,(%esp)
80101024: e8 57 07 00 00 call 80101780 <iunlock>
end_op();
80101029: e8 c2 1b 00 00 call 80102bf0 <end_op>
8010102e: 8b 45 e0 mov -0x20(%ebp),%eax
if(r < 0)
break;
if(r != n1)
80101031: 39 f0 cmp %esi,%eax
80101033: 0f 85 98 00 00 00 jne 801010d1 <filewrite+0x101>
panic("short filewrite");
i += r;
80101039: 01 c3 add %eax,%ebx
// 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){
8010103b: 39 5d e4 cmp %ebx,-0x1c(%ebp)
8010103e: 7e 70 jle 801010b0 <filewrite+0xe0>
int n1 = n - i;
80101040: 8b 75 e4 mov -0x1c(%ebp),%esi
80101043: b8 00 1a 00 00 mov $0x1a00,%eax
80101048: 29 de sub %ebx,%esi
8010104a: 81 fe 00 1a 00 00 cmp $0x1a00,%esi
80101050: 0f 4f f0 cmovg %eax,%esi
if(n1 > max)
n1 = max;
begin_op();
80101053: e8 28 1b 00 00 call 80102b80 <begin_op>
ilock(f->ip);
80101058: 8b 47 10 mov 0x10(%edi),%eax
8010105b: 89 04 24 mov %eax,(%esp)
8010105e: e8 4d 06 00 00 call 801016b0 <ilock>
if ((r = writei(f->ip, addr + i, f->off, n1)) > 0)
80101063: 89 74 24 0c mov %esi,0xc(%esp)
80101067: 8b 47 14 mov 0x14(%edi),%eax
8010106a: 89 44 24 08 mov %eax,0x8(%esp)
8010106e: 8b 45 dc mov -0x24(%ebp),%eax
80101071: 01 d8 add %ebx,%eax
80101073: 89 44 24 04 mov %eax,0x4(%esp)
80101077: 8b 47 10 mov 0x10(%edi),%eax
8010107a: 89 04 24 mov %eax,(%esp)
8010107d: e8 be 09 00 00 call 80101a40 <writei>
80101082: 85 c0 test %eax,%eax
80101084: 7f 92 jg 80101018 <filewrite+0x48>
f->off += r;
iunlock(f->ip);
80101086: 8b 4f 10 mov 0x10(%edi),%ecx
80101089: 89 45 e0 mov %eax,-0x20(%ebp)
8010108c: 89 0c 24 mov %ecx,(%esp)
8010108f: e8 ec 06 00 00 call 80101780 <iunlock>
end_op();
80101094: e8 57 1b 00 00 call 80102bf0 <end_op>
if(r < 0)
80101099: 8b 45 e0 mov -0x20(%ebp),%eax
8010109c: 85 c0 test %eax,%eax
8010109e: 74 91 je 80101031 <filewrite+0x61>
i += r;
}
return i == n ? n : -1;
}
panic("filewrite");
}
801010a0: 83 c4 2c add $0x2c,%esp
filewrite(struct file *f, char *addr, int n)
{
int r;
if(f->writable == 0)
return -1;
801010a3: b8 ff ff ff ff mov $0xffffffff,%eax
i += r;
}
return i == n ? n : -1;
}
panic("filewrite");
}
801010a8: 5b pop %ebx
801010a9: 5e pop %esi
801010aa: 5f pop %edi
801010ab: 5d pop %ebp
801010ac: c3 ret
801010ad: 8d 76 00 lea 0x0(%esi),%esi
break;
if(r != n1)
panic("short filewrite");
i += r;
}
return i == n ? n : -1;
801010b0: 3b 5d e4 cmp -0x1c(%ebp),%ebx
801010b3: 89 d8 mov %ebx,%eax
801010b5: 75 e9 jne 801010a0 <filewrite+0xd0>
}
panic("filewrite");
}
801010b7: 83 c4 2c add $0x2c,%esp
801010ba: 5b pop %ebx
801010bb: 5e pop %esi
801010bc: 5f pop %edi
801010bd: 5d pop %ebp
801010be: c3 ret
int r;
if(f->writable == 0)
return -1;
if(f->type == FD_PIPE)
return pipewrite(f->pipe, addr, n);
801010bf: 8b 47 0c mov 0xc(%edi),%eax
801010c2: 89 45 08 mov %eax,0x8(%ebp)
i += r;
}
return i == n ? n : -1;
}
panic("filewrite");
}
801010c5: 83 c4 2c add $0x2c,%esp
801010c8: 5b pop %ebx
801010c9: 5e pop %esi
801010ca: 5f pop %edi
801010cb: 5d pop %ebp
int r;
if(f->writable == 0)
return -1;
if(f->type == FD_PIPE)
return pipewrite(f->pipe, addr, n);
801010cc: e9 5f 23 00 00 jmp 80103430 <pipewrite>
end_op();
if(r < 0)
break;
if(r != n1)
panic("short filewrite");
<<<<<<< HEAD
801010c1: 83 ec 0c sub $0xc,%esp
801010c4: 68 eb 73 10 80 push $0x801073eb
801010c9: e8 a2 f2 ff ff call 80100370 <panic>
=======
801010d1: c7 04 24 6b 71 10 80 movl $0x8010716b,(%esp)
801010d8: e8 83 f2 ff ff call 80100360 <panic>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
i += r;
}
return i == n ? n : -1;
}
panic("filewrite");
<<<<<<< HEAD
801010ce: 83 ec 0c sub $0xc,%esp
801010d1: 68 f1 73 10 80 push $0x801073f1
801010d6: e8 95 f2 ff ff call 80100370 <panic>
801010db: 66 90 xchg %ax,%ax
801010dd: 66 90 xchg %ax,%ax
801010df: 90 nop
801010e0 <balloc>:
=======
801010dd: c7 04 24 71 71 10 80 movl $0x80107171,(%esp)
801010e4: e8 77 f2 ff ff call 80100360 <panic>
801010e9: 66 90 xchg %ax,%ax
801010eb: 66 90 xchg %ax,%ax
801010ed: 66 90 xchg %ax,%ax
801010ef: 90 nop
801010f0 <balloc>:
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// Blocks.
// Allocate a zeroed disk block.
static uint
balloc(uint dev)
{
801010f0: 55 push %ebp
801010f1: 89 e5 mov %esp,%ebp
801010f3: 57 push %edi
801010f4: 56 push %esi
801010f5: 53 push %ebx
801010f6: 83 ec 2c sub $0x2c,%esp
801010f9: 89 45 d8 mov %eax,-0x28(%ebp)
int b, bi, m;
struct buf *bp;
bp = 0;
for(b = 0; b < sb.size; b += BPB){
801010fc: a1 e0 09 11 80 mov 0x801109e0,%eax
80101101: 85 c0 test %eax,%eax
80101103: 0f 84 8c 00 00 00 je 80101195 <balloc+0xa5>
80101109: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp)
bp = bread(dev, BBLOCK(b, sb));
80101110: 8b 75 dc mov -0x24(%ebp),%esi
80101113: 89 f0 mov %esi,%eax
80101115: c1 f8 0c sar $0xc,%eax
80101118: 03 05 f8 09 11 80 add 0x801109f8,%eax
8010111e: 89 44 24 04 mov %eax,0x4(%esp)
80101122: 8b 45 d8 mov -0x28(%ebp),%eax
80101125: 89 04 24 mov %eax,(%esp)
80101128: e8 a3 ef ff ff call 801000d0 <bread>
8010112d: 89 45 e4 mov %eax,-0x1c(%ebp)
80101130: a1 e0 09 11 80 mov 0x801109e0,%eax
80101135: 89 45 e0 mov %eax,-0x20(%ebp)
for(bi = 0; bi < BPB && b + bi < sb.size; bi++){
80101138: 31 c0 xor %eax,%eax
8010113a: eb 33 jmp 8010116f <balloc+0x7f>
8010113c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
m = 1 << (bi % 8);
if((bp->data[bi/8] & m) == 0){ // Is block free?
80101140: 8b 5d e4 mov -0x1c(%ebp),%ebx
80101143: 89 c2 mov %eax,%edx
bp = 0;
for(b = 0; b < sb.size; b += BPB){
bp = bread(dev, BBLOCK(b, sb));
for(bi = 0; bi < BPB && b + bi < sb.size; bi++){
m = 1 << (bi % 8);
80101145: 89 c1 mov %eax,%ecx
if((bp->data[bi/8] & m) == 0){ // Is block free?
80101147: c1 fa 03 sar $0x3,%edx
bp = 0;
for(b = 0; b < sb.size; b += BPB){
bp = bread(dev, BBLOCK(b, sb));
for(bi = 0; bi < BPB && b + bi < sb.size; bi++){
m = 1 << (bi % 8);
8010114a: 83 e1 07 and $0x7,%ecx
8010114d: bf 01 00 00 00 mov $0x1,%edi
80101152: d3 e7 shl %cl,%edi
if((bp->data[bi/8] & m) == 0){ // Is block free?
80101154: 0f b6 5c 13 5c movzbl 0x5c(%ebx,%edx,1),%ebx
bp = 0;
for(b = 0; b < sb.size; b += BPB){
bp = bread(dev, BBLOCK(b, sb));
for(bi = 0; bi < BPB && b + bi < sb.size; bi++){
m = 1 << (bi % 8);
80101159: 89 f9 mov %edi,%ecx
if((bp->data[bi/8] & m) == 0){ // Is block free?
8010115b: 0f b6 fb movzbl %bl,%edi
8010115e: 85 cf test %ecx,%edi
80101160: 74 46 je 801011a8 <balloc+0xb8>
struct buf *bp;
bp = 0;
for(b = 0; b < sb.size; b += BPB){
bp = bread(dev, BBLOCK(b, sb));
for(bi = 0; bi < BPB && b + bi < sb.size; bi++){
80101162: 83 c0 01 add $0x1,%eax
80101165: 83 c6 01 add $0x1,%esi
80101168: 3d 00 10 00 00 cmp $0x1000,%eax
8010116d: 74 05 je 80101174 <balloc+0x84>
8010116f: 3b 75 e0 cmp -0x20(%ebp),%esi
80101172: 72 cc jb 80101140 <balloc+0x50>
brelse(bp);
bzero(dev, b + bi);
return b + bi;
}
}
brelse(bp);
80101174: 8b 45 e4 mov -0x1c(%ebp),%eax
80101177: 89 04 24 mov %eax,(%esp)
8010117a: e8 61 f0 ff ff call 801001e0 <brelse>
{
int b, bi, m;
struct buf *bp;
bp = 0;
for(b = 0; b < sb.size; b += BPB){
8010117f: 81 45 dc 00 10 00 00 addl $0x1000,-0x24(%ebp)
80101186: 8b 45 dc mov -0x24(%ebp),%eax
80101189: 3b 05 e0 09 11 80 cmp 0x801109e0,%eax
8010118f: 0f 82 7b ff ff ff jb 80101110 <balloc+0x20>
return b + bi;
}
}
brelse(bp);
}
panic("balloc: out of blocks");
<<<<<<< HEAD
8010117f: 83 ec 0c sub $0xc,%esp
80101182: 68 fb 73 10 80 push $0x801073fb
80101187: e8 e4 f1 ff ff call 80100370 <panic>
8010118c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
for(b = 0; b < sb.size; b += BPB){
bp = bread(dev, BBLOCK(b, sb));
for(bi = 0; bi < BPB && b + bi < sb.size; bi++){
m = 1 << (bi % 8);
if((bp->data[bi/8] & m) == 0){ // Is block free?
bp->data[bi/8] |= m; // Mark block in use.
80101190: 09 fa or %edi,%edx
80101192: 8b 7d e4 mov -0x1c(%ebp),%edi
log_write(bp);
80101195: 83 ec 0c sub $0xc,%esp
=======
80101195: c7 04 24 7b 71 10 80 movl $0x8010717b,(%esp)
8010119c: e8 bf f1 ff ff call 80100360 <panic>
801011a1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
for(b = 0; b < sb.size; b += BPB){
bp = bread(dev, BBLOCK(b, sb));
for(bi = 0; bi < BPB && b + bi < sb.size; bi++){
m = 1 << (bi % 8);
if((bp->data[bi/8] & m) == 0){ // Is block free?
bp->data[bi/8] |= m; // Mark block in use.
801011a8: 09 d9 or %ebx,%ecx
801011aa: 8b 5d e4 mov -0x1c(%ebp),%ebx
801011ad: 88 4c 13 5c mov %cl,0x5c(%ebx,%edx,1)
log_write(bp);
801011b1: 89 1c 24 mov %ebx,(%esp)
801011b4: e8 67 1b 00 00 call 80102d20 <log_write>
brelse(bp);
801011b9: 89 1c 24 mov %ebx,(%esp)
801011bc: e8 1f f0 ff ff call 801001e0 <brelse>
static void
bzero(int dev, int bno)
{
struct buf *bp;
bp = bread(dev, bno);
801011c1: 8b 45 d8 mov -0x28(%ebp),%eax
801011c4: 89 74 24 04 mov %esi,0x4(%esp)
801011c8: 89 04 24 mov %eax,(%esp)
801011cb: e8 00 ef ff ff call 801000d0 <bread>
memset(bp->data, 0, BSIZE);
801011d0: c7 44 24 08 00 02 00 movl $0x200,0x8(%esp)
801011d7: 00
801011d8: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
801011df: 00
static void
bzero(int dev, int bno)
{
struct buf *bp;
bp = bread(dev, bno);
801011e0: 89 c3 mov %eax,%ebx
memset(bp->data, 0, BSIZE);
<<<<<<< HEAD
801011b7: 8d 40 5c lea 0x5c(%eax),%eax
801011ba: 83 c4 0c add $0xc,%esp
801011bd: 68 00 02 00 00 push $0x200
801011c2: 6a 00 push $0x0
801011c4: 50 push %eax
801011c5: e8 76 35 00 00 call 80104740 <memset>
=======
801011e2: 8d 40 5c lea 0x5c(%eax),%eax
801011e5: 89 04 24 mov %eax,(%esp)
801011e8: e8 13 33 00 00 call 80104500 <memset>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
log_write(bp);
801011ed: 89 1c 24 mov %ebx,(%esp)
801011f0: e8 2b 1b 00 00 call 80102d20 <log_write>
brelse(bp);
801011f5: 89 1c 24 mov %ebx,(%esp)
801011f8: e8 e3 ef ff ff call 801001e0 <brelse>
}
}
brelse(bp);
}
panic("balloc: out of blocks");
}
801011fd: 83 c4 2c add $0x2c,%esp
80101200: 89 f0 mov %esi,%eax
80101202: 5b pop %ebx
80101203: 5e pop %esi
80101204: 5f pop %edi
80101205: 5d pop %ebp
80101206: c3 ret
80101207: 89 f6 mov %esi,%esi
80101209: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80101210 <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)
{
80101210: 55 push %ebp
80101211: 89 e5 mov %esp,%ebp
80101213: 57 push %edi
80101214: 89 c7 mov %eax,%edi
80101216: 56 push %esi
struct inode *ip, *empty;
acquire(&icache.lock);
// Is the inode already cached?
empty = 0;
80101217: 31 f6 xor %esi,%esi
// 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)
{
80101219: 53 push %ebx
acquire(&icache.lock);
// Is the inode already cached?
empty = 0;
for(ip = &icache.inode[0]; ip < &icache.inode[NINODE]; ip++){
8010121a: bb 34 0a 11 80 mov $0x80110a34,%ebx
// 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)
{
8010121f: 83 ec 1c sub $0x1c,%esp
struct inode *ip, *empty;
acquire(&icache.lock);
80101222: c7 04 24 00 0a 11 80 movl $0x80110a00,(%esp)
// 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)
{
80101229: 89 55 e4 mov %edx,-0x1c(%ebp)
struct inode *ip, *empty;
acquire(&icache.lock);
<<<<<<< HEAD
80101205: 68 00 0a 11 80 push $0x80110a00
8010120a: e8 01 33 00 00 call 80104510 <acquire>
8010120f: 83 c4 10 add $0x10,%esp
=======
8010122c: e8 4f 31 00 00 call 80104380 <acquire>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// Is the inode already cached?
empty = 0;
for(ip = &icache.inode[0]; ip < &icache.inode[NINODE]; ip++){
80101231: 8b 55 e4 mov -0x1c(%ebp),%edx
80101234: eb 14 jmp 8010124a <iget+0x3a>
80101236: 66 90 xchg %ax,%ax
if(ip->ref > 0 && ip->dev == dev && ip->inum == inum){
ip->ref++;
release(&icache.lock);
return ip;
}
if(empty == 0 && ip->ref == 0) // Remember empty slot.
80101238: 85 f6 test %esi,%esi
8010123a: 74 3c je 80101278 <iget+0x68>
acquire(&icache.lock);
// Is the inode already cached?
empty = 0;
for(ip = &icache.inode[0]; ip < &icache.inode[NINODE]; ip++){
8010123c: 81 c3 90 00 00 00 add $0x90,%ebx
80101242: 81 fb 54 26 11 80 cmp $0x80112654,%ebx
80101248: 74 46 je 80101290 <iget+0x80>
if(ip->ref > 0 && ip->dev == dev && ip->inum == inum){
8010124a: 8b 4b 08 mov 0x8(%ebx),%ecx
8010124d: 85 c9 test %ecx,%ecx
8010124f: 7e e7 jle 80101238 <iget+0x28>
80101251: 39 3b cmp %edi,(%ebx)
80101253: 75 e3 jne 80101238 <iget+0x28>
80101255: 39 53 04 cmp %edx,0x4(%ebx)
80101258: 75 de jne 80101238 <iget+0x28>
ip->ref++;
8010125a: 83 c1 01 add $0x1,%ecx
release(&icache.lock);
return ip;
8010125d: 89 de mov %ebx,%esi
// Is the inode already cached?
empty = 0;
for(ip = &icache.inode[0]; ip < &icache.inode[NINODE]; ip++){
if(ip->ref > 0 && ip->dev == dev && ip->inum == inum){
ip->ref++;
release(&icache.lock);
8010125f: c7 04 24 00 0a 11 80 movl $0x80110a00,(%esp)
// Is the inode already cached?
empty = 0;
for(ip = &icache.inode[0]; ip < &icache.inode[NINODE]; ip++){
if(ip->ref > 0 && ip->dev == dev && ip->inum == inum){
ip->ref++;
80101266: 89 4b 08 mov %ecx,0x8(%ebx)
release(&icache.lock);
<<<<<<< HEAD
80101252: e8 99 34 00 00 call 801046f0 <release>
return ip;
80101257: 83 c4 10 add $0x10,%esp
=======
80101269: e8 42 32 00 00 call 801044b0 <release>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
ip->ref = 1;
ip->flags = 0;
release(&icache.lock);
return ip;
}
8010126e: 83 c4 1c add $0x1c,%esp
80101271: 89 f0 mov %esi,%eax
80101273: 5b pop %ebx
80101274: 5e pop %esi
80101275: 5f pop %edi
80101276: 5d pop %ebp
80101277: c3 ret
80101278: 85 c9 test %ecx,%ecx
8010127a: 0f 44 f3 cmove %ebx,%esi
acquire(&icache.lock);
// Is the inode already cached?
empty = 0;
for(ip = &icache.inode[0]; ip < &icache.inode[NINODE]; ip++){
8010127d: 81 c3 90 00 00 00 add $0x90,%ebx
80101283: 81 fb 54 26 11 80 cmp $0x80112654,%ebx
80101289: 75 bf jne 8010124a <iget+0x3a>
8010128b: 90 nop
8010128c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if(empty == 0 && ip->ref == 0) // Remember empty slot.
empty = ip;
}
// Recycle an inode cache entry.
if(empty == 0)
80101290: 85 f6 test %esi,%esi
80101292: 74 29 je 801012bd <iget+0xad>
panic("iget: no inodes");
ip = empty;
ip->dev = dev;
80101294: 89 3e mov %edi,(%esi)
ip->inum = inum;
80101296: 89 56 04 mov %edx,0x4(%esi)
ip->ref = 1;
80101299: c7 46 08 01 00 00 00 movl $0x1,0x8(%esi)
ip->flags = 0;
801012a0: c7 46 4c 00 00 00 00 movl $0x0,0x4c(%esi)
release(&icache.lock);
<<<<<<< HEAD
8010129a: 68 00 0a 11 80 push $0x80110a00
8010129f: e8 4c 34 00 00 call 801046f0 <release>
=======
801012a7: c7 04 24 00 0a 11 80 movl $0x80110a00,(%esp)
801012ae: e8 fd 31 00 00 call 801044b0 <release>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
return ip;
}
801012b3: 83 c4 1c add $0x1c,%esp
801012b6: 89 f0 mov %esi,%eax
801012b8: 5b pop %ebx
801012b9: 5e pop %esi
801012ba: 5f pop %edi
801012bb: 5d pop %ebp
801012bc: c3 ret
empty = ip;
}
// Recycle an inode cache entry.
if(empty == 0)
panic("iget: no inodes");
<<<<<<< HEAD
801012b1: 83 ec 0c sub $0xc,%esp
801012b4: 68 11 74 10 80 push $0x80107411
801012b9: e8 b2 f0 ff ff call 80100370 <panic>
801012be: 66 90 xchg %ax,%ax
=======
801012bd: c7 04 24 91 71 10 80 movl $0x80107191,(%esp)
801012c4: e8 97 f0 ff ff call 80100360 <panic>
801012c9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
801012d0 <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)
{
801012d0: 55 push %ebp
801012d1: 89 e5 mov %esp,%ebp
801012d3: 57 push %edi
801012d4: 56 push %esi
801012d5: 53 push %ebx
801012d6: 89 c3 mov %eax,%ebx
801012d8: 83 ec 1c sub $0x1c,%esp
uint addr, *a;
struct buf *bp;
if(bn < NDIRECT){
801012db: 83 fa 0b cmp $0xb,%edx
801012de: 77 18 ja 801012f8 <bmap+0x28>
801012e0: 8d 34 90 lea (%eax,%edx,4),%esi
if((addr = ip->addrs[bn]) == 0)
801012e3: 8b 46 5c mov 0x5c(%esi),%eax
801012e6: 85 c0 test %eax,%eax
801012e8: 74 66 je 80101350 <bmap+0x80>
brelse(bp);
return addr;
}
panic("bmap: out of range");
}
801012ea: 83 c4 1c add $0x1c,%esp
801012ed: 5b pop %ebx
801012ee: 5e pop %esi
801012ef: 5f pop %edi
801012f0: 5d pop %ebp
801012f1: c3 ret
801012f2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
if(bn < NDIRECT){
if((addr = ip->addrs[bn]) == 0)
ip->addrs[bn] = addr = balloc(ip->dev);
return addr;
}
bn -= NDIRECT;
801012f8: 8d 72 f4 lea -0xc(%edx),%esi
if(bn < NINDIRECT){
801012fb: 83 fe 7f cmp $0x7f,%esi
801012fe: 77 77 ja 80101377 <bmap+0xa7>
// Load indirect block, allocating if necessary.
if((addr = ip->addrs[NDIRECT]) == 0)
80101300: 8b 80 8c 00 00 00 mov 0x8c(%eax),%eax
80101306: 85 c0 test %eax,%eax
80101308: 74 5e je 80101368 <bmap+0x98>
ip->addrs[NDIRECT] = addr = balloc(ip->dev);
bp = bread(ip->dev, addr);
8010130a: 89 44 24 04 mov %eax,0x4(%esp)
8010130e: 8b 03 mov (%ebx),%eax
80101310: 89 04 24 mov %eax,(%esp)
80101313: e8 b8 ed ff ff call 801000d0 <bread>
a = (uint*)bp->data;
if((addr = a[bn]) == 0){
80101318: 8d 54 b0 5c lea 0x5c(%eax,%esi,4),%edx
if(bn < NINDIRECT){
// Load indirect block, allocating if necessary.
if((addr = ip->addrs[NDIRECT]) == 0)
ip->addrs[NDIRECT] = addr = balloc(ip->dev);
bp = bread(ip->dev, addr);
8010131c: 89 c7 mov %eax,%edi
a = (uint*)bp->data;
if((addr = a[bn]) == 0){
8010131e: 8b 32 mov (%edx),%esi
80101320: 85 f6 test %esi,%esi
80101322: 75 19 jne 8010133d <bmap+0x6d>
a[bn] = addr = balloc(ip->dev);
80101324: 8b 03 mov (%ebx),%eax
80101326: 89 55 e4 mov %edx,-0x1c(%ebp)
80101329: e8 c2 fd ff ff call 801010f0 <balloc>
8010132e: 8b 55 e4 mov -0x1c(%ebp),%edx
80101331: 89 02 mov %eax,(%edx)
80101333: 89 c6 mov %eax,%esi
log_write(bp);
80101335: 89 3c 24 mov %edi,(%esp)
80101338: e8 e3 19 00 00 call 80102d20 <log_write>
}
brelse(bp);
8010133d: 89 3c 24 mov %edi,(%esp)
80101340: e8 9b ee ff ff call 801001e0 <brelse>
return addr;
}
panic("bmap: out of range");
}
80101345: 83 c4 1c add $0x1c,%esp
a = (uint*)bp->data;
if((addr = a[bn]) == 0){
a[bn] = addr = balloc(ip->dev);
log_write(bp);
}
brelse(bp);
80101348: 89 f0 mov %esi,%eax
return addr;
}
panic("bmap: out of range");
}
8010134a: 5b pop %ebx
8010134b: 5e pop %esi
8010134c: 5f pop %edi
8010134d: 5d pop %ebp
8010134e: c3 ret
8010134f: 90 nop
uint addr, *a;
struct buf *bp;
if(bn < NDIRECT){
if((addr = ip->addrs[bn]) == 0)
ip->addrs[bn] = addr = balloc(ip->dev);
80101350: 8b 03 mov (%ebx),%eax
80101352: e8 99 fd ff ff call 801010f0 <balloc>
80101357: 89 46 5c mov %eax,0x5c(%esi)
brelse(bp);
return addr;
}
panic("bmap: out of range");
}
8010135a: 83 c4 1c add $0x1c,%esp
8010135d: 5b pop %ebx
8010135e: 5e pop %esi
8010135f: 5f pop %edi
80101360: 5d pop %ebp
80101361: c3 ret
80101362: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
bn -= NDIRECT;
if(bn < NINDIRECT){
// Load indirect block, allocating if necessary.
if((addr = ip->addrs[NDIRECT]) == 0)
ip->addrs[NDIRECT] = addr = balloc(ip->dev);
80101368: 8b 03 mov (%ebx),%eax
8010136a: e8 81 fd ff ff call 801010f0 <balloc>
8010136f: 89 83 8c 00 00 00 mov %eax,0x8c(%ebx)
80101375: eb 93 jmp 8010130a <bmap+0x3a>
}
brelse(bp);
return addr;
}
panic("bmap: out of range");
<<<<<<< HEAD
80101377: 83 ec 0c sub $0xc,%esp
8010137a: 68 21 74 10 80 push $0x80107421
8010137f: e8 ec ef ff ff call 80100370 <panic>
80101384: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
8010138a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
=======
80101377: c7 04 24 a1 71 10 80 movl $0x801071a1,(%esp)
8010137e: e8 dd ef ff ff call 80100360 <panic>
80101383: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80101389: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
80101390 <readsb>:
struct superblock sb;
// Read the super block.
void
readsb(int dev, struct superblock *sb)
{
80101390: 55 push %ebp
80101391: 89 e5 mov %esp,%ebp
80101393: 56 push %esi
80101394: 53 push %ebx
80101395: 83 ec 10 sub $0x10,%esp
struct buf *bp;
bp = bread(dev, 1);
80101398: 8b 45 08 mov 0x8(%ebp),%eax
8010139b: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
801013a2: 00
struct superblock sb;
// Read the super block.
void
readsb(int dev, struct superblock *sb)
{
801013a3: 8b 75 0c mov 0xc(%ebp),%esi
struct buf *bp;
bp = bread(dev, 1);
801013a6: 89 04 24 mov %eax,(%esp)
801013a9: e8 22 ed ff ff call 801000d0 <bread>
memmove(sb, bp->data, sizeof(*sb));
801013ae: 89 34 24 mov %esi,(%esp)
801013b1: c7 44 24 08 1c 00 00 movl $0x1c,0x8(%esp)
801013b8: 00
void
readsb(int dev, struct superblock *sb)
{
struct buf *bp;
bp = bread(dev, 1);
801013b9: 89 c3 mov %eax,%ebx
memmove(sb, bp->data, sizeof(*sb));
<<<<<<< HEAD
801013a7: 8d 40 5c lea 0x5c(%eax),%eax
801013aa: 83 c4 0c add $0xc,%esp
801013ad: 6a 1c push $0x1c
801013af: 50 push %eax
801013b0: 56 push %esi
801013b1: e8 3a 34 00 00 call 801047f0 <memmove>
=======
801013bb: 8d 40 5c lea 0x5c(%eax),%eax
801013be: 89 44 24 04 mov %eax,0x4(%esp)
801013c2: e8 d9 31 00 00 call 801045a0 <memmove>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
brelse(bp);
801013c7: 89 5d 08 mov %ebx,0x8(%ebp)
}
801013ca: 83 c4 10 add $0x10,%esp
801013cd: 5b pop %ebx
801013ce: 5e pop %esi
801013cf: 5d pop %ebp
{
struct buf *bp;
bp = bread(dev, 1);
memmove(sb, bp->data, sizeof(*sb));
brelse(bp);
801013d0: e9 0b ee ff ff jmp 801001e0 <brelse>
801013d5: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801013d9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801013e0 <bfree>:
}
// Free a disk block.
static void
bfree(int dev, uint b)
{
801013e0: 55 push %ebp
801013e1: 89 e5 mov %esp,%ebp
801013e3: 57 push %edi
801013e4: 89 d7 mov %edx,%edi
801013e6: 56 push %esi
801013e7: 53 push %ebx
801013e8: 89 c3 mov %eax,%ebx
801013ea: 83 ec 1c sub $0x1c,%esp
struct buf *bp;
int bi, m;
readsb(dev, &sb);
801013ed: 89 04 24 mov %eax,(%esp)
801013f0: c7 44 24 04 e0 09 11 movl $0x801109e0,0x4(%esp)
801013f7: 80
801013f8: e8 93 ff ff ff call 80101390 <readsb>
bp = bread(dev, BBLOCK(b, sb));
801013fd: 89 fa mov %edi,%edx
801013ff: c1 ea 0c shr $0xc,%edx
80101402: 03 15 f8 09 11 80 add 0x801109f8,%edx
80101408: 89 1c 24 mov %ebx,(%esp)
bi = b % BPB;
m = 1 << (bi % 8);
8010140b: bb 01 00 00 00 mov $0x1,%ebx
{
struct buf *bp;
int bi, m;
readsb(dev, &sb);
bp = bread(dev, BBLOCK(b, sb));
80101410: 89 54 24 04 mov %edx,0x4(%esp)
80101414: e8 b7 ec ff ff call 801000d0 <bread>
bi = b % BPB;
m = 1 << (bi % 8);
80101419: 89 f9 mov %edi,%ecx
struct buf *bp;
int bi, m;
readsb(dev, &sb);
bp = bread(dev, BBLOCK(b, sb));
bi = b % BPB;
8010141b: 81 e7 ff 0f 00 00 and $0xfff,%edi
80101421: 89 fa mov %edi,%edx
m = 1 << (bi % 8);
80101423: 83 e1 07 and $0x7,%ecx
if((bp->data[bi/8] & m) == 0)
80101426: c1 fa 03 sar $0x3,%edx
int bi, m;
readsb(dev, &sb);
bp = bread(dev, BBLOCK(b, sb));
bi = b % BPB;
m = 1 << (bi % 8);
80101429: d3 e3 shl %cl,%ebx
{
struct buf *bp;
int bi, m;
readsb(dev, &sb);
bp = bread(dev, BBLOCK(b, sb));
8010142b: 89 c6 mov %eax,%esi
bi = b % BPB;
m = 1 << (bi % 8);
if((bp->data[bi/8] & m) == 0)
8010142d: 0f b6 44 10 5c movzbl 0x5c(%eax,%edx,1),%eax
80101432: 0f b6 c8 movzbl %al,%ecx
80101435: 85 d9 test %ebx,%ecx
80101437: 74 20 je 80101459 <bfree+0x79>
panic("freeing free block");
bp->data[bi/8] &= ~m;
80101439: f7 d3 not %ebx
8010143b: 21 c3 and %eax,%ebx
8010143d: 88 5c 16 5c mov %bl,0x5c(%esi,%edx,1)
log_write(bp);
80101441: 89 34 24 mov %esi,(%esp)
80101444: e8 d7 18 00 00 call 80102d20 <log_write>
brelse(bp);
80101449: 89 34 24 mov %esi,(%esp)
8010144c: e8 8f ed ff ff call 801001e0 <brelse>
}
80101451: 83 c4 1c add $0x1c,%esp
80101454: 5b pop %ebx
80101455: 5e pop %esi
80101456: 5f pop %edi
80101457: 5d pop %ebp
80101458: c3 ret
readsb(dev, &sb);
bp = bread(dev, BBLOCK(b, sb));
bi = b % BPB;
m = 1 << (bi % 8);
if((bp->data[bi/8] & m) == 0)
panic("freeing free block");
<<<<<<< HEAD
80101443: 83 ec 0c sub $0xc,%esp
80101446: 68 34 74 10 80 push $0x80107434
8010144b: e8 20 ef ff ff call 80100370 <panic>
=======
80101459: c7 04 24 b4 71 10 80 movl $0x801071b4,(%esp)
80101460: e8 fb ee ff ff call 80100360 <panic>
80101465: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80101469: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
80101470 <iinit>:
struct inode inode[NINODE];
} icache;
void
iinit(int dev)
{
80101470: 55 push %ebp
80101471: 89 e5 mov %esp,%ebp
80101473: 53 push %ebx
80101474: bb 40 0a 11 80 mov $0x80110a40,%ebx
80101479: 83 ec 24 sub $0x24,%esp
int i = 0;
initlock(&icache.lock, "icache");
<<<<<<< HEAD
8010145c: 68 47 74 10 80 push $0x80107447
80101461: 68 00 0a 11 80 push $0x80110a00
80101466: e8 85 30 00 00 call 801044f0 <initlock>
8010146b: 83 c4 10 add $0x10,%esp
8010146e: 66 90 xchg %ax,%ax
for(i = 0; i < NINODE; i++) {
initsleeplock(&icache.inode[i].lock, "inode");
80101470: 83 ec 08 sub $0x8,%esp
80101473: 68 4e 74 10 80 push $0x8010744e
80101478: 53 push %ebx
80101479: 81 c3 90 00 00 00 add $0x90,%ebx
8010147f: e8 5c 2f 00 00 call 801043e0 <initsleeplock>
=======
8010147c: c7 44 24 04 c7 71 10 movl $0x801071c7,0x4(%esp)
80101483: 80
80101484: c7 04 24 00 0a 11 80 movl $0x80110a00,(%esp)
8010148b: e8 70 2e 00 00 call 80104300 <initlock>
for(i = 0; i < NINODE; i++) {
initsleeplock(&icache.inode[i].lock, "inode");
80101490: 89 1c 24 mov %ebx,(%esp)
80101493: 81 c3 90 00 00 00 add $0x90,%ebx
80101499: c7 44 24 04 ce 71 10 movl $0x801071ce,0x4(%esp)
801014a0: 80
801014a1: e8 4a 2d 00 00 call 801041f0 <initsleeplock>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
iinit(int dev)
{
int i = 0;
initlock(&icache.lock, "icache");
for(i = 0; i < NINODE; i++) {
801014a6: 81 fb 60 26 11 80 cmp $0x80112660,%ebx
801014ac: 75 e2 jne 80101490 <iinit+0x20>
initsleeplock(&icache.inode[i].lock, "inode");
}
readsb(dev, &sb);
801014ae: 8b 45 08 mov 0x8(%ebp),%eax
801014b1: c7 44 24 04 e0 09 11 movl $0x801109e0,0x4(%esp)
801014b8: 80
801014b9: 89 04 24 mov %eax,(%esp)
801014bc: e8 cf fe ff ff call 80101390 <readsb>
cprintf("sb: size %d nblocks %d ninodes %d nlog %d logstart %d\
<<<<<<< HEAD
8010149f: ff 35 f8 09 11 80 pushl 0x801109f8
801014a5: ff 35 f4 09 11 80 pushl 0x801109f4
801014ab: ff 35 f0 09 11 80 pushl 0x801109f0
801014b1: ff 35 ec 09 11 80 pushl 0x801109ec
801014b7: ff 35 e8 09 11 80 pushl 0x801109e8
801014bd: ff 35 e4 09 11 80 pushl 0x801109e4
801014c3: ff 35 e0 09 11 80 pushl 0x801109e0
801014c9: 68 a4 74 10 80 push $0x801074a4
801014ce: e8 8d f1 ff ff call 80100660 <cprintf>
=======
801014c1: a1 f8 09 11 80 mov 0x801109f8,%eax
801014c6: c7 04 24 24 72 10 80 movl $0x80107224,(%esp)
801014cd: 89 44 24 1c mov %eax,0x1c(%esp)
801014d1: a1 f4 09 11 80 mov 0x801109f4,%eax
801014d6: 89 44 24 18 mov %eax,0x18(%esp)
801014da: a1 f0 09 11 80 mov 0x801109f0,%eax
801014df: 89 44 24 14 mov %eax,0x14(%esp)
801014e3: a1 ec 09 11 80 mov 0x801109ec,%eax
801014e8: 89 44 24 10 mov %eax,0x10(%esp)
801014ec: a1 e8 09 11 80 mov 0x801109e8,%eax
801014f1: 89 44 24 0c mov %eax,0xc(%esp)
801014f5: a1 e4 09 11 80 mov 0x801109e4,%eax
801014fa: 89 44 24 08 mov %eax,0x8(%esp)
801014fe: a1 e0 09 11 80 mov 0x801109e0,%eax
80101503: 89 44 24 04 mov %eax,0x4(%esp)
80101507: e8 44 f1 ff ff call 80100650 <cprintf>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
inodestart %d bmap start %d\n", sb.size, sb.nblocks,
sb.ninodes, sb.nlog, sb.logstart, sb.inodestart,
sb.bmapstart);
}
8010150c: 83 c4 24 add $0x24,%esp
8010150f: 5b pop %ebx
80101510: 5d pop %ebp
80101511: c3 ret
80101512: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80101519: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80101520 <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)
{
80101520: 55 push %ebp
80101521: 89 e5 mov %esp,%ebp
80101523: 57 push %edi
80101524: 56 push %esi
80101525: 53 push %ebx
80101526: 83 ec 2c sub $0x2c,%esp
80101529: 8b 45 0c mov 0xc(%ebp),%eax
int inum;
struct buf *bp;
struct dinode *dip;
for(inum = 1; inum < sb.ninodes; inum++){
8010152c: 83 3d e8 09 11 80 01 cmpl $0x1,0x801109e8
//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)
{
80101533: 8b 7d 08 mov 0x8(%ebp),%edi
80101536: 89 45 e4 mov %eax,-0x1c(%ebp)
int inum;
struct buf *bp;
struct dinode *dip;
for(inum = 1; inum < sb.ninodes; inum++){
80101539: 0f 86 a2 00 00 00 jbe 801015e1 <ialloc+0xc1>
8010153f: be 01 00 00 00 mov $0x1,%esi
80101544: bb 01 00 00 00 mov $0x1,%ebx
80101549: eb 1a jmp 80101565 <ialloc+0x45>
8010154b: 90 nop
8010154c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
dip->type = type;
log_write(bp); // mark it allocated on the disk
brelse(bp);
return iget(dev, inum);
}
brelse(bp);
80101550: 89 14 24 mov %edx,(%esp)
{
int inum;
struct buf *bp;
struct dinode *dip;
for(inum = 1; inum < sb.ninodes; inum++){
80101553: 83 c3 01 add $0x1,%ebx
dip->type = type;
log_write(bp); // mark it allocated on the disk
brelse(bp);
return iget(dev, inum);
}
brelse(bp);
80101556: e8 85 ec ff ff call 801001e0 <brelse>
{
int inum;
struct buf *bp;
struct dinode *dip;
for(inum = 1; inum < sb.ninodes; inum++){
8010155b: 89 de mov %ebx,%esi
8010155d: 3b 1d e8 09 11 80 cmp 0x801109e8,%ebx
80101563: 73 7c jae 801015e1 <ialloc+0xc1>
bp = bread(dev, IBLOCK(inum, sb));
80101565: 89 f0 mov %esi,%eax
80101567: c1 e8 03 shr $0x3,%eax
8010156a: 03 05 f4 09 11 80 add 0x801109f4,%eax
80101570: 89 3c 24 mov %edi,(%esp)
80101573: 89 44 24 04 mov %eax,0x4(%esp)
80101577: e8 54 eb ff ff call 801000d0 <bread>
8010157c: 89 c2 mov %eax,%edx
dip = (struct dinode*)bp->data + inum%IPB;
8010157e: 89 f0 mov %esi,%eax
80101580: 83 e0 07 and $0x7,%eax
80101583: c1 e0 06 shl $0x6,%eax
80101586: 8d 4c 02 5c lea 0x5c(%edx,%eax,1),%ecx
if(dip->type == 0){ // a free inode
8010158a: 66 83 39 00 cmpw $0x0,(%ecx)
8010158e: 75 c0 jne 80101550 <ialloc+0x30>
memset(dip, 0, sizeof(*dip));
80101590: 89 0c 24 mov %ecx,(%esp)
80101593: c7 44 24 08 40 00 00 movl $0x40,0x8(%esp)
8010159a: 00
8010159b: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
801015a2: 00
801015a3: 89 55 dc mov %edx,-0x24(%ebp)
801015a6: 89 4d e0 mov %ecx,-0x20(%ebp)
801015a9: e8 52 2f 00 00 call 80104500 <memset>
dip->type = type;
801015ae: 0f b7 45 e4 movzwl -0x1c(%ebp),%eax
log_write(bp); // mark it allocated on the disk
801015b2: 8b 55 dc mov -0x24(%ebp),%edx
for(inum = 1; inum < sb.ninodes; inum++){
bp = bread(dev, IBLOCK(inum, sb));
dip = (struct dinode*)bp->data + inum%IPB;
if(dip->type == 0){ // a free inode
memset(dip, 0, sizeof(*dip));
dip->type = type;
801015b5: 8b 4d e0 mov -0x20(%ebp),%ecx
log_write(bp); // mark it allocated on the disk
801015b8: 89 55 e4 mov %edx,-0x1c(%ebp)
for(inum = 1; inum < sb.ninodes; inum++){
bp = bread(dev, IBLOCK(inum, sb));
dip = (struct dinode*)bp->data + inum%IPB;
if(dip->type == 0){ // a free inode
memset(dip, 0, sizeof(*dip));
<<<<<<< HEAD
80101553: 83 ec 04 sub $0x4,%esp
80101556: 89 4d e0 mov %ecx,-0x20(%ebp)
80101559: 6a 40 push $0x40
8010155b: 6a 00 push $0x0
8010155d: 51 push %ecx
8010155e: e8 dd 31 00 00 call 80104740 <memset>
=======
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
dip->type = type;
801015bb: 66 89 01 mov %ax,(%ecx)
log_write(bp); // mark it allocated on the disk
801015be: 89 14 24 mov %edx,(%esp)
801015c1: e8 5a 17 00 00 call 80102d20 <log_write>
brelse(bp);
801015c6: 8b 55 e4 mov -0x1c(%ebp),%edx
801015c9: 89 14 24 mov %edx,(%esp)
801015cc: e8 0f ec ff ff call 801001e0 <brelse>
return iget(dev, inum);
}
brelse(bp);
}
panic("ialloc: no inodes");
}
801015d1: 83 c4 2c add $0x2c,%esp
if(dip->type == 0){ // a free inode
memset(dip, 0, sizeof(*dip));
dip->type = type;
log_write(bp); // mark it allocated on the disk
brelse(bp);
return iget(dev, inum);
801015d4: 89 f2 mov %esi,%edx
}
brelse(bp);
}
panic("ialloc: no inodes");
}
801015d6: 5b pop %ebx
if(dip->type == 0){ // a free inode
memset(dip, 0, sizeof(*dip));
dip->type = type;
log_write(bp); // mark it allocated on the disk
brelse(bp);
return iget(dev, inum);
801015d7: 89 f8 mov %edi,%eax
}
brelse(bp);
}
panic("ialloc: no inodes");
}
801015d9: 5e pop %esi
801015da: 5f pop %edi
801015db: 5d pop %ebp
if(dip->type == 0){ // a free inode
memset(dip, 0, sizeof(*dip));
dip->type = type;
log_write(bp); // mark it allocated on the disk
brelse(bp);
return iget(dev, inum);
801015dc: e9 2f fc ff ff jmp 80101210 <iget>
}
brelse(bp);
}
panic("ialloc: no inodes");
<<<<<<< HEAD
80101590: 83 ec 0c sub $0xc,%esp
80101593: 68 54 74 10 80 push $0x80107454
80101598: e8 d3 ed ff ff call 80100370 <panic>
8010159d: 8d 76 00 lea 0x0(%esi),%esi
=======
801015e1: c7 04 24 d4 71 10 80 movl $0x801071d4,(%esp)
801015e8: e8 73 ed ff ff call 80100360 <panic>
801015ed: 8d 76 00 lea 0x0(%esi),%esi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
801015f0 <iupdate>:
}
// Copy a modified in-memory inode to disk.
void
iupdate(struct inode *ip)
{
801015f0: 55 push %ebp
801015f1: 89 e5 mov %esp,%ebp
801015f3: 56 push %esi
801015f4: 53 push %ebx
801015f5: 83 ec 10 sub $0x10,%esp
801015f8: 8b 5d 08 mov 0x8(%ebp),%ebx
struct buf *bp;
struct dinode *dip;
bp = bread(ip->dev, IBLOCK(ip->inum, sb));
801015fb: 8b 43 04 mov 0x4(%ebx),%eax
dip->type = ip->type;
dip->major = ip->major;
dip->minor = ip->minor;
dip->nlink = ip->nlink;
dip->size = ip->size;
memmove(dip->addrs, ip->addrs, sizeof(ip->addrs));
801015fe: 83 c3 5c add $0x5c,%ebx
iupdate(struct inode *ip)
{
struct buf *bp;
struct dinode *dip;
bp = bread(ip->dev, IBLOCK(ip->inum, sb));
80101601: c1 e8 03 shr $0x3,%eax
80101604: 03 05 f4 09 11 80 add 0x801109f4,%eax
8010160a: 89 44 24 04 mov %eax,0x4(%esp)
8010160e: 8b 43 a4 mov -0x5c(%ebx),%eax
80101611: 89 04 24 mov %eax,(%esp)
80101614: e8 b7 ea ff ff call 801000d0 <bread>
dip = (struct dinode*)bp->data + ip->inum%IPB;
80101619: 8b 53 a8 mov -0x58(%ebx),%edx
8010161c: 83 e2 07 and $0x7,%edx
8010161f: c1 e2 06 shl $0x6,%edx
80101622: 8d 54 10 5c lea 0x5c(%eax,%edx,1),%edx
iupdate(struct inode *ip)
{
struct buf *bp;
struct dinode *dip;
bp = bread(ip->dev, IBLOCK(ip->inum, sb));
80101626: 89 c6 mov %eax,%esi
dip = (struct dinode*)bp->data + ip->inum%IPB;
dip->type = ip->type;
80101628: 0f b7 43 f4 movzwl -0xc(%ebx),%eax
dip->major = ip->major;
dip->minor = ip->minor;
dip->nlink = ip->nlink;
dip->size = ip->size;
memmove(dip->addrs, ip->addrs, sizeof(ip->addrs));
8010162c: 83 c2 0c add $0xc,%edx
struct buf *bp;
struct dinode *dip;
bp = bread(ip->dev, IBLOCK(ip->inum, sb));
dip = (struct dinode*)bp->data + ip->inum%IPB;
dip->type = ip->type;
8010162f: 66 89 42 f4 mov %ax,-0xc(%edx)
dip->major = ip->major;
80101633: 0f b7 43 f6 movzwl -0xa(%ebx),%eax
80101637: 66 89 42 f6 mov %ax,-0xa(%edx)
dip->minor = ip->minor;
8010163b: 0f b7 43 f8 movzwl -0x8(%ebx),%eax
8010163f: 66 89 42 f8 mov %ax,-0x8(%edx)
dip->nlink = ip->nlink;
80101643: 0f b7 43 fa movzwl -0x6(%ebx),%eax
80101647: 66 89 42 fa mov %ax,-0x6(%edx)
dip->size = ip->size;
8010164b: 8b 43 fc mov -0x4(%ebx),%eax
8010164e: 89 42 fc mov %eax,-0x4(%edx)
memmove(dip->addrs, ip->addrs, sizeof(ip->addrs));
<<<<<<< HEAD
801015fd: 6a 34 push $0x34
801015ff: 53 push %ebx
80101600: 50 push %eax
80101601: e8 ea 31 00 00 call 801047f0 <memmove>
=======
80101651: 89 5c 24 04 mov %ebx,0x4(%esp)
80101655: 89 14 24 mov %edx,(%esp)
80101658: c7 44 24 08 34 00 00 movl $0x34,0x8(%esp)
8010165f: 00
80101660: e8 3b 2f 00 00 call 801045a0 <memmove>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
log_write(bp);
80101665: 89 34 24 mov %esi,(%esp)
80101668: e8 b3 16 00 00 call 80102d20 <log_write>
brelse(bp);
8010166d: 89 75 08 mov %esi,0x8(%ebp)
}
80101670: 83 c4 10 add $0x10,%esp
80101673: 5b pop %ebx
80101674: 5e pop %esi
80101675: 5d pop %ebp
dip->minor = ip->minor;
dip->nlink = ip->nlink;
dip->size = ip->size;
memmove(dip->addrs, ip->addrs, sizeof(ip->addrs));
log_write(bp);
brelse(bp);
80101676: e9 65 eb ff ff jmp 801001e0 <brelse>
8010167b: 90 nop
8010167c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80101680 <idup>:
// Increment reference count for ip.
// Returns ip to enable ip = idup(ip1) idiom.
struct inode*
idup(struct inode *ip)
{
80101680: 55 push %ebp
80101681: 89 e5 mov %esp,%ebp
80101683: 53 push %ebx
80101684: 83 ec 14 sub $0x14,%esp
80101687: 8b 5d 08 mov 0x8(%ebp),%ebx
acquire(&icache.lock);
<<<<<<< HEAD
8010162a: 68 00 0a 11 80 push $0x80110a00
8010162f: e8 dc 2e 00 00 call 80104510 <acquire>
=======
8010168a: c7 04 24 00 0a 11 80 movl $0x80110a00,(%esp)
80101691: e8 ea 2c 00 00 call 80104380 <acquire>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
ip->ref++;
80101696: 83 43 08 01 addl $0x1,0x8(%ebx)
release(&icache.lock);
<<<<<<< HEAD
80101638: c7 04 24 00 0a 11 80 movl $0x80110a00,(%esp)
8010163f: e8 ac 30 00 00 call 801046f0 <release>
=======
8010169a: c7 04 24 00 0a 11 80 movl $0x80110a00,(%esp)
801016a1: e8 0a 2e 00 00 call 801044b0 <release>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
return ip;
}
801016a6: 83 c4 14 add $0x14,%esp
801016a9: 89 d8 mov %ebx,%eax
801016ab: 5b pop %ebx
801016ac: 5d pop %ebp
801016ad: c3 ret
801016ae: 66 90 xchg %ax,%ax
801016b0 <ilock>:
// Lock the given inode.
// Reads the inode from disk if necessary.
void
ilock(struct inode *ip)
{
801016b0: 55 push %ebp
801016b1: 89 e5 mov %esp,%ebp
801016b3: 56 push %esi
801016b4: 53 push %ebx
801016b5: 83 ec 10 sub $0x10,%esp
801016b8: 8b 5d 08 mov 0x8(%ebp),%ebx
struct buf *bp;
struct dinode *dip;
if(ip == 0 || ip->ref < 1)
801016bb: 85 db test %ebx,%ebx
801016bd: 0f 84 b0 00 00 00 je 80101773 <ilock+0xc3>
801016c3: 8b 43 08 mov 0x8(%ebx),%eax
801016c6: 85 c0 test %eax,%eax
801016c8: 0f 8e a5 00 00 00 jle 80101773 <ilock+0xc3>
panic("ilock");
acquiresleep(&ip->lock);
<<<<<<< HEAD
8010166b: 8d 43 0c lea 0xc(%ebx),%eax
8010166e: 83 ec 0c sub $0xc,%esp
80101671: 50 push %eax
80101672: e8 a9 2d 00 00 call 80104420 <acquiresleep>
=======
801016ce: 8d 43 0c lea 0xc(%ebx),%eax
801016d1: 89 04 24 mov %eax,(%esp)
801016d4: e8 57 2b 00 00 call 80104230 <acquiresleep>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
if(!(ip->flags & I_VALID)){
801016d9: f6 43 4c 02 testb $0x2,0x4c(%ebx)
801016dd: 74 09 je 801016e8 <ilock+0x38>
brelse(bp);
ip->flags |= I_VALID;
if(ip->type == 0)
panic("ilock: no type");
}
}
801016df: 83 c4 10 add $0x10,%esp
801016e2: 5b pop %ebx
801016e3: 5e pop %esi
801016e4: 5d pop %ebp
801016e5: c3 ret
801016e6: 66 90 xchg %ax,%ax
panic("ilock");
acquiresleep(&ip->lock);
if(!(ip->flags & I_VALID)){
bp = bread(ip->dev, IBLOCK(ip->inum, sb));
801016e8: 8b 43 04 mov 0x4(%ebx),%eax
801016eb: c1 e8 03 shr $0x3,%eax
801016ee: 03 05 f4 09 11 80 add 0x801109f4,%eax
801016f4: 89 44 24 04 mov %eax,0x4(%esp)
801016f8: 8b 03 mov (%ebx),%eax
801016fa: 89 04 24 mov %eax,(%esp)
801016fd: e8 ce e9 ff ff call 801000d0 <bread>
dip = (struct dinode*)bp->data + ip->inum%IPB;
80101702: 8b 53 04 mov 0x4(%ebx),%edx
80101705: 83 e2 07 and $0x7,%edx
80101708: c1 e2 06 shl $0x6,%edx
8010170b: 8d 54 10 5c lea 0x5c(%eax,%edx,1),%edx
panic("ilock");
acquiresleep(&ip->lock);
if(!(ip->flags & I_VALID)){
bp = bread(ip->dev, IBLOCK(ip->inum, sb));
8010170f: 89 c6 mov %eax,%esi
dip = (struct dinode*)bp->data + ip->inum%IPB;
ip->type = dip->type;
80101711: 0f b7 02 movzwl (%edx),%eax
ip->major = dip->major;
ip->minor = dip->minor;
ip->nlink = dip->nlink;
ip->size = dip->size;
memmove(ip->addrs, dip->addrs, sizeof(ip->addrs));
80101714: 83 c2 0c add $0xc,%edx
acquiresleep(&ip->lock);
if(!(ip->flags & I_VALID)){
bp = bread(ip->dev, IBLOCK(ip->inum, sb));
dip = (struct dinode*)bp->data + ip->inum%IPB;
ip->type = dip->type;
80101717: 66 89 43 50 mov %ax,0x50(%ebx)
ip->major = dip->major;
8010171b: 0f b7 42 f6 movzwl -0xa(%edx),%eax
8010171f: 66 89 43 52 mov %ax,0x52(%ebx)
ip->minor = dip->minor;
80101723: 0f b7 42 f8 movzwl -0x8(%edx),%eax
80101727: 66 89 43 54 mov %ax,0x54(%ebx)
ip->nlink = dip->nlink;
8010172b: 0f b7 42 fa movzwl -0x6(%edx),%eax
8010172f: 66 89 43 56 mov %ax,0x56(%ebx)
ip->size = dip->size;
80101733: 8b 42 fc mov -0x4(%edx),%eax
80101736: 89 43 58 mov %eax,0x58(%ebx)
memmove(ip->addrs, dip->addrs, sizeof(ip->addrs));
<<<<<<< HEAD
801016e1: 6a 34 push $0x34
801016e3: 50 push %eax
801016e4: 8d 43 5c lea 0x5c(%ebx),%eax
801016e7: 50 push %eax
801016e8: e8 03 31 00 00 call 801047f0 <memmove>
=======
80101739: 8d 43 5c lea 0x5c(%ebx),%eax
8010173c: 89 54 24 04 mov %edx,0x4(%esp)
80101740: c7 44 24 08 34 00 00 movl $0x34,0x8(%esp)
80101747: 00
80101748: 89 04 24 mov %eax,(%esp)
8010174b: e8 50 2e 00 00 call 801045a0 <memmove>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
brelse(bp);
80101750: 89 34 24 mov %esi,(%esp)
80101753: e8 88 ea ff ff call 801001e0 <brelse>
ip->flags |= I_VALID;
80101758: 83 4b 4c 02 orl $0x2,0x4c(%ebx)
if(ip->type == 0)
8010175c: 66 83 7b 50 00 cmpw $0x0,0x50(%ebx)
80101761: 0f 85 78 ff ff ff jne 801016df <ilock+0x2f>
panic("ilock: no type");
<<<<<<< HEAD
80101707: 83 ec 0c sub $0xc,%esp
8010170a: 68 6c 74 10 80 push $0x8010746c
8010170f: e8 5c ec ff ff call 80100370 <panic>
=======
80101767: c7 04 24 ec 71 10 80 movl $0x801071ec,(%esp)
8010176e: e8 ed eb ff ff call 80100360 <panic>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
{
struct buf *bp;
struct dinode *dip;
if(ip == 0 || ip->ref < 1)
panic("ilock");
<<<<<<< HEAD
80101714: 83 ec 0c sub $0xc,%esp
80101717: 68 66 74 10 80 push $0x80107466
8010171c: e8 4f ec ff ff call 80100370 <panic>
80101721: eb 0d jmp 80101730 <iunlock>
80101723: 90 nop
80101724: 90 nop
80101725: 90 nop
80101726: 90 nop
80101727: 90 nop
80101728: 90 nop
80101729: 90 nop
8010172a: 90 nop
8010172b: 90 nop
8010172c: 90 nop
8010172d: 90 nop
8010172e: 90 nop
8010172f: 90 nop
80101730 <iunlock>:
=======
80101773: c7 04 24 e6 71 10 80 movl $0x801071e6,(%esp)
8010177a: e8 e1 eb ff ff call 80100360 <panic>
8010177f: 90 nop
80101780 <iunlock>:
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
}
// Unlock the given inode.
void
iunlock(struct inode *ip)
{
80101780: 55 push %ebp
80101781: 89 e5 mov %esp,%ebp
80101783: 56 push %esi
80101784: 53 push %ebx
80101785: 83 ec 10 sub $0x10,%esp
80101788: 8b 5d 08 mov 0x8(%ebp),%ebx
if(ip == 0 || !holdingsleep(&ip->lock) || ip->ref < 1)
<<<<<<< HEAD
80101738: 85 db test %ebx,%ebx
8010173a: 74 28 je 80101764 <iunlock+0x34>
8010173c: 8d 73 0c lea 0xc(%ebx),%esi
8010173f: 83 ec 0c sub $0xc,%esp
80101742: 56 push %esi
80101743: e8 78 2d 00 00 call 801044c0 <holdingsleep>
80101748: 83 c4 10 add $0x10,%esp
8010174b: 85 c0 test %eax,%eax
8010174d: 74 15 je 80101764 <iunlock+0x34>
8010174f: 8b 43 08 mov 0x8(%ebx),%eax
80101752: 85 c0 test %eax,%eax
80101754: 7e 0e jle 80101764 <iunlock+0x34>
=======
8010178b: 85 db test %ebx,%ebx
8010178d: 74 24 je 801017b3 <iunlock+0x33>
8010178f: 8d 73 0c lea 0xc(%ebx),%esi
80101792: 89 34 24 mov %esi,(%esp)
80101795: e8 36 2b 00 00 call 801042d0 <holdingsleep>
8010179a: 85 c0 test %eax,%eax
8010179c: 74 15 je 801017b3 <iunlock+0x33>
8010179e: 8b 43 08 mov 0x8(%ebx),%eax
801017a1: 85 c0 test %eax,%eax
801017a3: 7e 0e jle 801017b3 <iunlock+0x33>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
panic("iunlock");
releasesleep(&ip->lock);
801017a5: 89 75 08 mov %esi,0x8(%ebp)
}
801017a8: 83 c4 10 add $0x10,%esp
801017ab: 5b pop %ebx
801017ac: 5e pop %esi
801017ad: 5d pop %ebp
iunlock(struct inode *ip)
{
if(ip == 0 || !holdingsleep(&ip->lock) || ip->ref < 1)
panic("iunlock");
releasesleep(&ip->lock);
<<<<<<< HEAD
8010175f: e9 1c 2d 00 00 jmp 80104480 <releasesleep>
=======
801017ae: e9 dd 2a 00 00 jmp 80104290 <releasesleep>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// Unlock the given inode.
void
iunlock(struct inode *ip)
{
if(ip == 0 || !holdingsleep(&ip->lock) || ip->ref < 1)
panic("iunlock");
<<<<<<< HEAD
80101764: 83 ec 0c sub $0xc,%esp
80101767: 68 7b 74 10 80 push $0x8010747b
8010176c: e8 ff eb ff ff call 80100370 <panic>
80101771: eb 0d jmp 80101780 <iput>
80101773: 90 nop
80101774: 90 nop
80101775: 90 nop
80101776: 90 nop
80101777: 90 nop
80101778: 90 nop
80101779: 90 nop
8010177a: 90 nop
8010177b: 90 nop
8010177c: 90 nop
8010177d: 90 nop
8010177e: 90 nop
8010177f: 90 nop
=======
801017b3: c7 04 24 fb 71 10 80 movl $0x801071fb,(%esp)
801017ba: e8 a1 eb ff ff call 80100360 <panic>
801017bf: 90 nop
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
801017c0 <iput>:
// to it, free the inode (and its content) on disk.
// All calls to iput() must be inside a transaction in
// case it has to free the inode.
void
iput(struct inode *ip)
{
801017c0: 55 push %ebp
801017c1: 89 e5 mov %esp,%ebp
801017c3: 57 push %edi
801017c4: 56 push %esi
801017c5: 53 push %ebx
801017c6: 83 ec 1c sub $0x1c,%esp
801017c9: 8b 75 08 mov 0x8(%ebp),%esi
acquire(&icache.lock);
<<<<<<< HEAD
8010178c: 68 00 0a 11 80 push $0x80110a00
80101791: e8 7a 2d 00 00 call 80104510 <acquire>
=======
801017cc: c7 04 24 00 0a 11 80 movl $0x80110a00,(%esp)
801017d3: e8 a8 2b 00 00 call 80104380 <acquire>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
if(ip->ref == 1 && (ip->flags & I_VALID) && ip->nlink == 0){
801017d8: 8b 46 08 mov 0x8(%esi),%eax
801017db: 83 f8 01 cmp $0x1,%eax
801017de: 74 20 je 80101800 <iput+0x40>
ip->type = 0;
iupdate(ip);
acquire(&icache.lock);
ip->flags = 0;
}
ip->ref--;
801017e0: 83 e8 01 sub $0x1,%eax
801017e3: 89 46 08 mov %eax,0x8(%esi)
release(&icache.lock);
801017e6: c7 45 08 00 0a 11 80 movl $0x80110a00,0x8(%ebp)
}
801017ed: 83 c4 1c add $0x1c,%esp
801017f0: 5b pop %ebx
801017f1: 5e pop %esi
801017f2: 5f pop %edi
801017f3: 5d pop %ebp
iupdate(ip);
acquire(&icache.lock);
ip->flags = 0;
}
ip->ref--;
release(&icache.lock);
<<<<<<< HEAD
801017b5: e9 36 2f 00 00 jmp 801046f0 <release>
801017ba: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
=======
801017f4: e9 b7 2c 00 00 jmp 801044b0 <release>
801017f9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// case it has to free the inode.
void
iput(struct inode *ip)
{
acquire(&icache.lock);
if(ip->ref == 1 && (ip->flags & I_VALID) && ip->nlink == 0){
80101800: f6 46 4c 02 testb $0x2,0x4c(%esi)
80101804: 74 da je 801017e0 <iput+0x20>
80101806: 66 83 7e 56 00 cmpw $0x0,0x56(%esi)
8010180b: 75 d3 jne 801017e0 <iput+0x20>
// inode has no links and no other references: truncate and free.
release(&icache.lock);
<<<<<<< HEAD
801017cd: 83 ec 0c sub $0xc,%esp
801017d0: 8d 5e 5c lea 0x5c(%esi),%ebx
801017d3: 8d be 8c 00 00 00 lea 0x8c(%esi),%edi
801017d9: 68 00 0a 11 80 push $0x80110a00
801017de: e8 0d 2f 00 00 call 801046f0 <release>
801017e3: 83 c4 10 add $0x10,%esp
801017e6: eb 0f jmp 801017f7 <iput+0x77>
801017e8: 90 nop
801017e9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801017f0: 83 c3 04 add $0x4,%ebx
=======
8010180d: c7 04 24 00 0a 11 80 movl $0x80110a00,(%esp)
80101814: 89 f3 mov %esi,%ebx
80101816: e8 95 2c 00 00 call 801044b0 <release>
8010181b: 8d 7e 30 lea 0x30(%esi),%edi
8010181e: eb 07 jmp 80101827 <iput+0x67>
80101820: 83 c3 04 add $0x4,%ebx
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
{
int i, j;
struct buf *bp;
uint *a;
for(i = 0; i < NDIRECT; i++){
80101823: 39 fb cmp %edi,%ebx
80101825: 74 19 je 80101840 <iput+0x80>
if(ip->addrs[i]){
80101827: 8b 53 5c mov 0x5c(%ebx),%edx
8010182a: 85 d2 test %edx,%edx
8010182c: 74 f2 je 80101820 <iput+0x60>
bfree(ip->dev, ip->addrs[i]);
8010182e: 8b 06 mov (%esi),%eax
80101830: e8 ab fb ff ff call 801013e0 <bfree>
ip->addrs[i] = 0;
80101835: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx)
8010183c: eb e2 jmp 80101820 <iput+0x60>
8010183e: 66 90 xchg %ax,%ax
}
}
if(ip->addrs[NDIRECT]){
80101840: 8b 86 8c 00 00 00 mov 0x8c(%esi),%eax
80101846: 85 c0 test %eax,%eax
80101848: 75 3e jne 80101888 <iput+0xc8>
brelse(bp);
bfree(ip->dev, ip->addrs[NDIRECT]);
ip->addrs[NDIRECT] = 0;
}
ip->size = 0;
8010184a: c7 46 58 00 00 00 00 movl $0x0,0x58(%esi)
iupdate(ip);
80101851: 89 34 24 mov %esi,(%esp)
80101854: e8 97 fd ff ff call 801015f0 <iupdate>
acquire(&icache.lock);
if(ip->ref == 1 && (ip->flags & I_VALID) && ip->nlink == 0){
// inode has no links and no other references: truncate and free.
release(&icache.lock);
itrunc(ip);
ip->type = 0;
80101859: 31 c0 xor %eax,%eax
8010185b: 66 89 46 50 mov %ax,0x50(%esi)
iupdate(ip);
8010185f: 89 34 24 mov %esi,(%esp)
80101862: e8 89 fd ff ff call 801015f0 <iupdate>
acquire(&icache.lock);
<<<<<<< HEAD
80101838: c7 04 24 00 0a 11 80 movl $0x80110a00,(%esp)
8010183f: e8 cc 2c 00 00 call 80104510 <acquire>
=======
80101867: c7 04 24 00 0a 11 80 movl $0x80110a00,(%esp)
8010186e: e8 0d 2b 00 00 call 80104380 <acquire>
80101873: 8b 46 08 mov 0x8(%esi),%eax
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
ip->flags = 0;
80101876: c7 46 4c 00 00 00 00 movl $0x0,0x4c(%esi)
8010187d: e9 5e ff ff ff jmp 801017e0 <iput+0x20>
80101882: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
ip->addrs[i] = 0;
}
}
if(ip->addrs[NDIRECT]){
bp = bread(ip->dev, ip->addrs[NDIRECT]);
80101888: 89 44 24 04 mov %eax,0x4(%esp)
8010188c: 8b 06 mov (%esi),%eax
a = (uint*)bp->data;
for(j = 0; j < NINDIRECT; j++){
8010188e: 31 db xor %ebx,%ebx
ip->addrs[i] = 0;
}
}
if(ip->addrs[NDIRECT]){
bp = bread(ip->dev, ip->addrs[NDIRECT]);
80101890: 89 04 24 mov %eax,(%esp)
80101893: e8 38 e8 ff ff call 801000d0 <bread>
80101898: 89 45 e4 mov %eax,-0x1c(%ebp)
a = (uint*)bp->data;
8010189b: 8d 78 5c lea 0x5c(%eax),%edi
for(j = 0; j < NINDIRECT; j++){
8010189e: 31 c0 xor %eax,%eax
801018a0: eb 13 jmp 801018b5 <iput+0xf5>
801018a2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801018a8: 83 c3 01 add $0x1,%ebx
801018ab: 81 fb 80 00 00 00 cmp $0x80,%ebx
801018b1: 89 d8 mov %ebx,%eax
801018b3: 74 10 je 801018c5 <iput+0x105>
if(a[j])
801018b5: 8b 14 87 mov (%edi,%eax,4),%edx
801018b8: 85 d2 test %edx,%edx
801018ba: 74 ec je 801018a8 <iput+0xe8>
bfree(ip->dev, a[j]);
801018bc: 8b 06 mov (%esi),%eax
801018be: e8 1d fb ff ff call 801013e0 <bfree>
801018c3: eb e3 jmp 801018a8 <iput+0xe8>
}
brelse(bp);
801018c5: 8b 45 e4 mov -0x1c(%ebp),%eax
801018c8: 89 04 24 mov %eax,(%esp)
801018cb: e8 10 e9 ff ff call 801001e0 <brelse>
bfree(ip->dev, ip->addrs[NDIRECT]);
801018d0: 8b 96 8c 00 00 00 mov 0x8c(%esi),%edx
801018d6: 8b 06 mov (%esi),%eax
801018d8: e8 03 fb ff ff call 801013e0 <bfree>
ip->addrs[NDIRECT] = 0;
801018dd: c7 86 8c 00 00 00 00 movl $0x0,0x8c(%esi)
801018e4: 00 00 00
801018e7: e9 5e ff ff ff jmp 8010184a <iput+0x8a>
801018ec: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801018f0 <iunlockput>:
}
// Common idiom: unlock, then put.
void
iunlockput(struct inode *ip)
{
801018f0: 55 push %ebp
801018f1: 89 e5 mov %esp,%ebp
801018f3: 53 push %ebx
801018f4: 83 ec 14 sub $0x14,%esp
801018f7: 8b 5d 08 mov 0x8(%ebp),%ebx
iunlock(ip);
801018fa: 89 1c 24 mov %ebx,(%esp)
801018fd: e8 7e fe ff ff call 80101780 <iunlock>
iput(ip);
80101902: 89 5d 08 mov %ebx,0x8(%ebp)
}
80101905: 83 c4 14 add $0x14,%esp
80101908: 5b pop %ebx
80101909: 5d pop %ebp
// Common idiom: unlock, then put.
void
iunlockput(struct inode *ip)
{
iunlock(ip);
iput(ip);
8010190a: e9 b1 fe ff ff jmp 801017c0 <iput>
8010190f: 90 nop
80101910 <stati>:
}
// Copy stat information from inode.
void
stati(struct inode *ip, struct stat *st)
{
80101910: 55 push %ebp
80101911: 89 e5 mov %esp,%ebp
80101913: 8b 55 08 mov 0x8(%ebp),%edx
80101916: 8b 45 0c mov 0xc(%ebp),%eax
st->dev = ip->dev;
80101919: 8b 0a mov (%edx),%ecx
8010191b: 89 48 04 mov %ecx,0x4(%eax)
st->ino = ip->inum;
8010191e: 8b 4a 04 mov 0x4(%edx),%ecx
80101921: 89 48 08 mov %ecx,0x8(%eax)
st->type = ip->type;
80101924: 0f b7 4a 50 movzwl 0x50(%edx),%ecx
80101928: 66 89 08 mov %cx,(%eax)
st->nlink = ip->nlink;
8010192b: 0f b7 4a 56 movzwl 0x56(%edx),%ecx
8010192f: 66 89 48 0c mov %cx,0xc(%eax)
st->size = ip->size;
80101933: 8b 52 58 mov 0x58(%edx),%edx
80101936: 89 50 10 mov %edx,0x10(%eax)
}
80101939: 5d pop %ebp
8010193a: c3 ret
8010193b: 90 nop
8010193c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80101940 <readi>:
//PAGEBREAK!
// Read data from inode.
int
readi(struct inode *ip, char *dst, uint off, uint n)
{
80101940: 55 push %ebp
80101941: 89 e5 mov %esp,%ebp
80101943: 57 push %edi
80101944: 56 push %esi
80101945: 53 push %ebx
80101946: 83 ec 2c sub $0x2c,%esp
80101949: 8b 45 0c mov 0xc(%ebp),%eax
8010194c: 8b 7d 08 mov 0x8(%ebp),%edi
8010194f: 8b 75 10 mov 0x10(%ebp),%esi
80101952: 89 45 e0 mov %eax,-0x20(%ebp)
80101955: 8b 45 14 mov 0x14(%ebp),%eax
uint tot, m;
struct buf *bp;
if(ip->type == T_DEV){
80101958: 66 83 7f 50 03 cmpw $0x3,0x50(%edi)
//PAGEBREAK!
// Read data from inode.
int
readi(struct inode *ip, char *dst, uint off, uint n)
{
8010195d: 89 45 e4 mov %eax,-0x1c(%ebp)
uint tot, m;
struct buf *bp;
if(ip->type == T_DEV){
80101960: 0f 84 aa 00 00 00 je 80101a10 <readi+0xd0>
if(ip->major < 0 || ip->major >= NDEV || !devsw[ip->major].read)
return -1;
return devsw[ip->major].read(ip, dst, n);
}
if(off > ip->size || off + n < off)
80101966: 8b 47 58 mov 0x58(%edi),%eax
80101969: 39 f0 cmp %esi,%eax
8010196b: 0f 82 c7 00 00 00 jb 80101a38 <readi+0xf8>
80101971: 8b 5d e4 mov -0x1c(%ebp),%ebx
80101974: 89 da mov %ebx,%edx
80101976: 01 f2 add %esi,%edx
80101978: 0f 82 ba 00 00 00 jb 80101a38 <readi+0xf8>
return -1;
if(off + n > ip->size)
n = ip->size - off;
8010197e: 89 c1 mov %eax,%ecx
80101980: 29 f1 sub %esi,%ecx
80101982: 39 d0 cmp %edx,%eax
80101984: 0f 43 cb cmovae %ebx,%ecx
for(tot=0; tot<n; tot+=m, off+=m, dst+=m){
80101987: 31 c0 xor %eax,%eax
80101989: 85 c9 test %ecx,%ecx
}
if(off > ip->size || off + n < off)
return -1;
if(off + n > ip->size)
n = ip->size - off;
8010198b: 89 4d e4 mov %ecx,-0x1c(%ebp)
for(tot=0; tot<n; tot+=m, off+=m, dst+=m){
8010198e: 74 70 je 80101a00 <readi+0xc0>
80101990: 89 7d d8 mov %edi,-0x28(%ebp)
80101993: 89 c7 mov %eax,%edi
80101995: 8d 76 00 lea 0x0(%esi),%esi
bp = bread(ip->dev, bmap(ip, off/BSIZE));
80101998: 8b 5d d8 mov -0x28(%ebp),%ebx
8010199b: 89 f2 mov %esi,%edx
8010199d: c1 ea 09 shr $0x9,%edx
801019a0: 89 d8 mov %ebx,%eax
801019a2: e8 29 f9 ff ff call 801012d0 <bmap>
801019a7: 89 44 24 04 mov %eax,0x4(%esp)
801019ab: 8b 03 mov (%ebx),%eax
m = min(n - tot, BSIZE - off%BSIZE);
801019ad: bb 00 02 00 00 mov $0x200,%ebx
return -1;
if(off + n > ip->size)
n = ip->size - off;
for(tot=0; tot<n; tot+=m, off+=m, dst+=m){
bp = bread(ip->dev, bmap(ip, off/BSIZE));
801019b2: 89 04 24 mov %eax,(%esp)
801019b5: e8 16 e7 ff ff call 801000d0 <bread>
m = min(n - tot, BSIZE - off%BSIZE);
801019ba: 8b 4d e4 mov -0x1c(%ebp),%ecx
801019bd: 29 f9 sub %edi,%ecx
return -1;
if(off + n > ip->size)
n = ip->size - off;
for(tot=0; tot<n; tot+=m, off+=m, dst+=m){
bp = bread(ip->dev, bmap(ip, off/BSIZE));
801019bf: 89 c2 mov %eax,%edx
m = min(n - tot, BSIZE - off%BSIZE);
801019c1: 89 f0 mov %esi,%eax
801019c3: 25 ff 01 00 00 and $0x1ff,%eax
801019c8: 29 c3 sub %eax,%ebx
for (int j = 0; j < min(m, 10); j++) {
cprintf("%x ", bp->data[off%BSIZE+j]);
}
cprintf("\n");
*/
memmove(dst, bp->data + off%BSIZE, m);
801019ca: 8d 44 02 5c lea 0x5c(%edx,%eax,1),%eax
if(off + n > ip->size)
n = ip->size - off;
for(tot=0; tot<n; tot+=m, off+=m, dst+=m){
bp = bread(ip->dev, bmap(ip, off/BSIZE));
m = min(n - tot, BSIZE - off%BSIZE);
801019ce: 39 cb cmp %ecx,%ebx
for (int j = 0; j < min(m, 10); j++) {
cprintf("%x ", bp->data[off%BSIZE+j]);
}
cprintf("\n");
*/
memmove(dst, bp->data + off%BSIZE, m);
801019d0: 89 44 24 04 mov %eax,0x4(%esp)
801019d4: 8b 45 e0 mov -0x20(%ebp),%eax
if(off + n > ip->size)
n = ip->size - off;
for(tot=0; tot<n; tot+=m, off+=m, dst+=m){
bp = bread(ip->dev, bmap(ip, off/BSIZE));
m = min(n - tot, BSIZE - off%BSIZE);
801019d7: 0f 47 d9 cmova %ecx,%ebx
for (int j = 0; j < min(m, 10); j++) {
cprintf("%x ", bp->data[off%BSIZE+j]);
}
cprintf("\n");
*/
memmove(dst, bp->data + off%BSIZE, m);
801019da: 89 5c 24 08 mov %ebx,0x8(%esp)
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){
801019de: 01 df add %ebx,%edi
801019e0: 01 de add %ebx,%esi
for (int j = 0; j < min(m, 10); j++) {
cprintf("%x ", bp->data[off%BSIZE+j]);
}
cprintf("\n");
*/
memmove(dst, bp->data + off%BSIZE, m);
<<<<<<< HEAD
801019b4: 50 push %eax
801019b5: ff 75 e0 pushl -0x20(%ebp)
801019b8: e8 33 2e 00 00 call 801047f0 <memmove>
=======
801019e2: 89 55 dc mov %edx,-0x24(%ebp)
801019e5: 89 04 24 mov %eax,(%esp)
801019e8: e8 b3 2b 00 00 call 801045a0 <memmove>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
brelse(bp);
801019ed: 8b 55 dc mov -0x24(%ebp),%edx
801019f0: 89 14 24 mov %edx,(%esp)
801019f3: e8 e8 e7 ff ff call 801001e0 <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){
801019f8: 01 5d e0 add %ebx,-0x20(%ebp)
801019fb: 39 7d e4 cmp %edi,-0x1c(%ebp)
801019fe: 77 98 ja 80101998 <readi+0x58>
cprintf("\n");
*/
memmove(dst, bp->data + off%BSIZE, m);
brelse(bp);
}
return n;
80101a00: 8b 45 e4 mov -0x1c(%ebp),%eax
}
80101a03: 83 c4 2c add $0x2c,%esp
80101a06: 5b pop %ebx
80101a07: 5e pop %esi
80101a08: 5f pop %edi
80101a09: 5d pop %ebp
80101a0a: c3 ret
80101a0b: 90 nop
80101a0c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
{
uint tot, m;
struct buf *bp;
if(ip->type == T_DEV){
if(ip->major < 0 || ip->major >= NDEV || !devsw[ip->major].read)
80101a10: 0f bf 47 52 movswl 0x52(%edi),%eax
80101a14: 66 83 f8 09 cmp $0x9,%ax
80101a18: 77 1e ja 80101a38 <readi+0xf8>
80101a1a: 8b 04 c5 80 09 11 80 mov -0x7feef680(,%eax,8),%eax
80101a21: 85 c0 test %eax,%eax
80101a23: 74 13 je 80101a38 <readi+0xf8>
return -1;
return devsw[ip->major].read(ip, dst, n);
80101a25: 8b 75 e4 mov -0x1c(%ebp),%esi
80101a28: 89 75 10 mov %esi,0x10(%ebp)
*/
memmove(dst, bp->data + off%BSIZE, m);
brelse(bp);
}
return n;
}
80101a2b: 83 c4 2c add $0x2c,%esp
80101a2e: 5b pop %ebx
80101a2f: 5e pop %esi
80101a30: 5f pop %edi
80101a31: 5d pop %ebp
struct buf *bp;
if(ip->type == T_DEV){
if(ip->major < 0 || ip->major >= NDEV || !devsw[ip->major].read)
return -1;
return devsw[ip->major].read(ip, dst, n);
80101a32: ff e0 jmp *%eax
80101a34: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
uint tot, m;
struct buf *bp;
if(ip->type == T_DEV){
if(ip->major < 0 || ip->major >= NDEV || !devsw[ip->major].read)
return -1;
80101a38: b8 ff ff ff ff mov $0xffffffff,%eax
80101a3d: eb c4 jmp 80101a03 <readi+0xc3>
80101a3f: 90 nop
80101a40 <writei>:
// PAGEBREAK!
// Write data to inode.
int
writei(struct inode *ip, char *src, uint off, uint n)
{
80101a40: 55 push %ebp
80101a41: 89 e5 mov %esp,%ebp
80101a43: 57 push %edi
80101a44: 56 push %esi
80101a45: 53 push %ebx
80101a46: 83 ec 2c sub $0x2c,%esp
80101a49: 8b 45 08 mov 0x8(%ebp),%eax
80101a4c: 8b 75 0c mov 0xc(%ebp),%esi
80101a4f: 8b 4d 14 mov 0x14(%ebp),%ecx
uint tot, m;
struct buf *bp;
if(ip->type == T_DEV){
80101a52: 66 83 78 50 03 cmpw $0x3,0x50(%eax)
// PAGEBREAK!
// Write data to inode.
int
writei(struct inode *ip, char *src, uint off, uint n)
{
80101a57: 89 75 dc mov %esi,-0x24(%ebp)
80101a5a: 8b 75 10 mov 0x10(%ebp),%esi
80101a5d: 89 45 d8 mov %eax,-0x28(%ebp)
80101a60: 89 4d e0 mov %ecx,-0x20(%ebp)
uint tot, m;
struct buf *bp;
if(ip->type == T_DEV){
80101a63: 0f 84 b7 00 00 00 je 80101b20 <writei+0xe0>
if(ip->major < 0 || ip->major >= NDEV || !devsw[ip->major].write)
return -1;
return devsw[ip->major].write(ip, src, n);
}
if(off > ip->size || off + n < off)
80101a69: 8b 45 d8 mov -0x28(%ebp),%eax
80101a6c: 39 70 58 cmp %esi,0x58(%eax)
80101a6f: 0f 82 e3 00 00 00 jb 80101b58 <writei+0x118>
80101a75: 8b 4d e0 mov -0x20(%ebp),%ecx
80101a78: 89 c8 mov %ecx,%eax
80101a7a: 01 f0 add %esi,%eax
80101a7c: 0f 82 d6 00 00 00 jb 80101b58 <writei+0x118>
return -1;
if(off + n > MAXFILE*BSIZE)
80101a82: 3d 00 18 01 00 cmp $0x11800,%eax
80101a87: 0f 87 cb 00 00 00 ja 80101b58 <writei+0x118>
return -1;
for(tot=0; tot<n; tot+=m, off+=m, src+=m){
80101a8d: 85 c9 test %ecx,%ecx
80101a8f: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
80101a96: 74 77 je 80101b0f <writei+0xcf>
bp = bread(ip->dev, bmap(ip, off/BSIZE));
80101a98: 8b 7d d8 mov -0x28(%ebp),%edi
80101a9b: 89 f2 mov %esi,%edx
m = min(n - tot, BSIZE - off%BSIZE);
80101a9d: bb 00 02 00 00 mov $0x200,%ebx
return -1;
if(off + n > MAXFILE*BSIZE)
return -1;
for(tot=0; tot<n; tot+=m, off+=m, src+=m){
bp = bread(ip->dev, bmap(ip, off/BSIZE));
80101aa2: c1 ea 09 shr $0x9,%edx
80101aa5: 89 f8 mov %edi,%eax
80101aa7: e8 24 f8 ff ff call 801012d0 <bmap>
80101aac: 89 44 24 04 mov %eax,0x4(%esp)
80101ab0: 8b 07 mov (%edi),%eax
80101ab2: 89 04 24 mov %eax,(%esp)
80101ab5: e8 16 e6 ff ff call 801000d0 <bread>
m = min(n - tot, BSIZE - off%BSIZE);
80101aba: 8b 4d e0 mov -0x20(%ebp),%ecx
80101abd: 2b 4d e4 sub -0x1c(%ebp),%ecx
memmove(bp->data + off%BSIZE, src, m);
80101ac0: 8b 55 dc mov -0x24(%ebp),%edx
return -1;
if(off + n > MAXFILE*BSIZE)
return -1;
for(tot=0; tot<n; tot+=m, off+=m, src+=m){
bp = bread(ip->dev, bmap(ip, off/BSIZE));
80101ac3: 89 c7 mov %eax,%edi
m = min(n - tot, BSIZE - off%BSIZE);
80101ac5: 89 f0 mov %esi,%eax
80101ac7: 25 ff 01 00 00 and $0x1ff,%eax
80101acc: 29 c3 sub %eax,%ebx
80101ace: 39 cb cmp %ecx,%ebx
80101ad0: 0f 47 d9 cmova %ecx,%ebx
memmove(bp->data + off%BSIZE, src, m);
80101ad3: 8d 44 07 5c lea 0x5c(%edi,%eax,1),%eax
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){
80101ad7: 01 de add %ebx,%esi
bp = bread(ip->dev, bmap(ip, off/BSIZE));
m = min(n - tot, BSIZE - off%BSIZE);
memmove(bp->data + off%BSIZE, src, m);
<<<<<<< HEAD
80101ab3: 50 push %eax
80101ab4: e8 37 2d 00 00 call 801047f0 <memmove>
=======
80101ad9: 89 54 24 04 mov %edx,0x4(%esp)
80101add: 89 5c 24 08 mov %ebx,0x8(%esp)
80101ae1: 89 04 24 mov %eax,(%esp)
80101ae4: e8 b7 2a 00 00 call 801045a0 <memmove>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
log_write(bp);
80101ae9: 89 3c 24 mov %edi,(%esp)
80101aec: e8 2f 12 00 00 call 80102d20 <log_write>
brelse(bp);
80101af1: 89 3c 24 mov %edi,(%esp)
80101af4: e8 e7 e6 ff ff call 801001e0 <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){
80101af9: 01 5d e4 add %ebx,-0x1c(%ebp)
80101afc: 8b 45 e4 mov -0x1c(%ebp),%eax
80101aff: 01 5d dc add %ebx,-0x24(%ebp)
80101b02: 39 45 e0 cmp %eax,-0x20(%ebp)
80101b05: 77 91 ja 80101a98 <writei+0x58>
memmove(bp->data + off%BSIZE, src, m);
log_write(bp);
brelse(bp);
}
if(n > 0 && off > ip->size){
80101b07: 8b 45 d8 mov -0x28(%ebp),%eax
80101b0a: 39 70 58 cmp %esi,0x58(%eax)
80101b0d: 72 39 jb 80101b48 <writei+0x108>
ip->size = off;
iupdate(ip);
}
return n;
80101b0f: 8b 45 e0 mov -0x20(%ebp),%eax
}
80101b12: 83 c4 2c add $0x2c,%esp
80101b15: 5b pop %ebx
80101b16: 5e pop %esi
80101b17: 5f pop %edi
80101b18: 5d pop %ebp
80101b19: c3 ret
80101b1a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
{
uint tot, m;
struct buf *bp;
if(ip->type == T_DEV){
if(ip->major < 0 || ip->major >= NDEV || !devsw[ip->major].write)
80101b20: 0f bf 40 52 movswl 0x52(%eax),%eax
80101b24: 66 83 f8 09 cmp $0x9,%ax
80101b28: 77 2e ja 80101b58 <writei+0x118>
80101b2a: 8b 04 c5 84 09 11 80 mov -0x7feef67c(,%eax,8),%eax
80101b31: 85 c0 test %eax,%eax
80101b33: 74 23 je 80101b58 <writei+0x118>
return -1;
return devsw[ip->major].write(ip, src, n);
80101b35: 89 4d 10 mov %ecx,0x10(%ebp)
if(n > 0 && off > ip->size){
ip->size = off;
iupdate(ip);
}
return n;
}
80101b38: 83 c4 2c add $0x2c,%esp
80101b3b: 5b pop %ebx
80101b3c: 5e pop %esi
80101b3d: 5f pop %edi
80101b3e: 5d pop %ebp
struct buf *bp;
if(ip->type == T_DEV){
if(ip->major < 0 || ip->major >= NDEV || !devsw[ip->major].write)
return -1;
return devsw[ip->major].write(ip, src, n);
80101b3f: ff e0 jmp *%eax
80101b41: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
log_write(bp);
brelse(bp);
}
if(n > 0 && off > ip->size){
ip->size = off;
80101b48: 8b 45 d8 mov -0x28(%ebp),%eax
80101b4b: 89 70 58 mov %esi,0x58(%eax)
iupdate(ip);
80101b4e: 89 04 24 mov %eax,(%esp)
80101b51: e8 9a fa ff ff call 801015f0 <iupdate>
80101b56: eb b7 jmp 80101b0f <writei+0xcf>
}
return n;
}
80101b58: 83 c4 2c add $0x2c,%esp
uint tot, m;
struct buf *bp;
if(ip->type == T_DEV){
if(ip->major < 0 || ip->major >= NDEV || !devsw[ip->major].write)
return -1;
80101b5b: b8 ff ff ff ff mov $0xffffffff,%eax
if(n > 0 && off > ip->size){
ip->size = off;
iupdate(ip);
}
return n;
}
80101b60: 5b pop %ebx
80101b61: 5e pop %esi
80101b62: 5f pop %edi
80101b63: 5d pop %ebp
80101b64: c3 ret
80101b65: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80101b69: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80101b70 <namecmp>:
//PAGEBREAK!
// Directories
int
namecmp(const char *s, const char *t)
{
80101b70: 55 push %ebp
80101b71: 89 e5 mov %esp,%ebp
80101b73: 83 ec 18 sub $0x18,%esp
return strncmp(s, t, DIRSIZ);
<<<<<<< HEAD
80101b46: 6a 0e push $0xe
80101b48: ff 75 0c pushl 0xc(%ebp)
80101b4b: ff 75 08 pushl 0x8(%ebp)
80101b4e: e8 1d 2d 00 00 call 80104870 <strncmp>
=======
80101b76: 8b 45 0c mov 0xc(%ebp),%eax
80101b79: c7 44 24 08 0e 00 00 movl $0xe,0x8(%esp)
80101b80: 00
80101b81: 89 44 24 04 mov %eax,0x4(%esp)
80101b85: 8b 45 08 mov 0x8(%ebp),%eax
80101b88: 89 04 24 mov %eax,(%esp)
80101b8b: e8 90 2a 00 00 call 80104620 <strncmp>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
}
80101b90: c9 leave
80101b91: c3 ret
80101b92: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80101b99: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80101ba0 <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)
{
80101ba0: 55 push %ebp
80101ba1: 89 e5 mov %esp,%ebp
80101ba3: 57 push %edi
80101ba4: 56 push %esi
80101ba5: 53 push %ebx
80101ba6: 83 ec 2c sub $0x2c,%esp
80101ba9: 8b 5d 08 mov 0x8(%ebp),%ebx
uint off, inum;
struct dirent de;
if(dp->type != T_DIR)
80101bac: 66 83 7b 50 01 cmpw $0x1,0x50(%ebx)
80101bb1: 0f 85 97 00 00 00 jne 80101c4e <dirlookup+0xae>
panic("dirlookup not DIR");
for(off = 0; off < dp->size; off += sizeof(de)){
80101bb7: 8b 53 58 mov 0x58(%ebx),%edx
80101bba: 31 ff xor %edi,%edi
80101bbc: 8d 75 d8 lea -0x28(%ebp),%esi
80101bbf: 85 d2 test %edx,%edx
80101bc1: 75 0d jne 80101bd0 <dirlookup+0x30>
80101bc3: eb 73 jmp 80101c38 <dirlookup+0x98>
80101bc5: 8d 76 00 lea 0x0(%esi),%esi
80101bc8: 83 c7 10 add $0x10,%edi
80101bcb: 39 7b 58 cmp %edi,0x58(%ebx)
80101bce: 76 68 jbe 80101c38 <dirlookup+0x98>
if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
80101bd0: c7 44 24 0c 10 00 00 movl $0x10,0xc(%esp)
80101bd7: 00
80101bd8: 89 7c 24 08 mov %edi,0x8(%esp)
80101bdc: 89 74 24 04 mov %esi,0x4(%esp)
80101be0: 89 1c 24 mov %ebx,(%esp)
80101be3: e8 58 fd ff ff call 80101940 <readi>
80101be8: 83 f8 10 cmp $0x10,%eax
80101beb: 75 55 jne 80101c42 <dirlookup+0xa2>
panic("dirlink read");
if(de.inum == 0)
80101bed: 66 83 7d d8 00 cmpw $0x0,-0x28(%ebp)
80101bf2: 74 d4 je 80101bc8 <dirlookup+0x28>
// Directories
int
namecmp(const char *s, const char *t)
{
return strncmp(s, t, DIRSIZ);
<<<<<<< HEAD
80101ba9: 8d 45 da lea -0x26(%ebp),%eax
80101bac: 83 ec 04 sub $0x4,%esp
80101baf: 6a 0e push $0xe
80101bb1: 50 push %eax
80101bb2: ff 75 0c pushl 0xc(%ebp)
80101bb5: e8 b6 2c 00 00 call 80104870 <strncmp>
=======
80101bf4: 8d 45 da lea -0x26(%ebp),%eax
80101bf7: 89 44 24 04 mov %eax,0x4(%esp)
80101bfb: 8b 45 0c mov 0xc(%ebp),%eax
80101bfe: c7 44 24 08 0e 00 00 movl $0xe,0x8(%esp)
80101c05: 00
80101c06: 89 04 24 mov %eax,(%esp)
80101c09: e8 12 2a 00 00 call 80104620 <strncmp>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
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;
if(namecmp(name, de.name) == 0){
80101c0e: 85 c0 test %eax,%eax
80101c10: 75 b6 jne 80101bc8 <dirlookup+0x28>
// entry matches path element
if(poff)
80101c12: 8b 45 10 mov 0x10(%ebp),%eax
80101c15: 85 c0 test %eax,%eax
80101c17: 74 05 je 80101c1e <dirlookup+0x7e>
*poff = off;
80101c19: 8b 45 10 mov 0x10(%ebp),%eax
80101c1c: 89 38 mov %edi,(%eax)
inum = de.inum;
80101c1e: 0f b7 55 d8 movzwl -0x28(%ebp),%edx
return iget(dp->dev, inum);
80101c22: 8b 03 mov (%ebx),%eax
80101c24: e8 e7 f5 ff ff call 80101210 <iget>
}
}
return 0;
}
80101c29: 83 c4 2c add $0x2c,%esp
80101c2c: 5b pop %ebx
80101c2d: 5e pop %esi
80101c2e: 5f pop %edi
80101c2f: 5d pop %ebp
80101c30: c3 ret
80101c31: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80101c38: 83 c4 2c add $0x2c,%esp
inum = de.inum;
return iget(dp->dev, inum);
}
}
return 0;
80101c3b: 31 c0 xor %eax,%eax
}
80101c3d: 5b pop %ebx
80101c3e: 5e pop %esi
80101c3f: 5f pop %edi
80101c40: 5d pop %ebp
80101c41: c3 ret
if(dp->type != T_DIR)
panic("dirlookup not DIR");
for(off = 0; off < dp->size; off += sizeof(de)){
if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
panic("dirlink read");
<<<<<<< HEAD
80101bea: 83 ec 0c sub $0xc,%esp
80101bed: 68 95 74 10 80 push $0x80107495
80101bf2: e8 79 e7 ff ff call 80100370 <panic>
=======
80101c42: c7 04 24 15 72 10 80 movl $0x80107215,(%esp)
80101c49: e8 12 e7 ff ff call 80100360 <panic>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
{
uint off, inum;
struct dirent de;
if(dp->type != T_DIR)
panic("dirlookup not DIR");
<<<<<<< HEAD
80101bf7: 83 ec 0c sub $0xc,%esp
80101bfa: 68 83 74 10 80 push $0x80107483
80101bff: e8 6c e7 ff ff call 80100370 <panic>
80101c04: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80101c0a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
=======
80101c4e: c7 04 24 03 72 10 80 movl $0x80107203,(%esp)
80101c55: e8 06 e7 ff ff call 80100360 <panic>
80101c5a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
80101c60 <namex>:
// If parent != 0, return the inode for the parent and copy the final
// path element into name, which must have room for DIRSIZ bytes.
// Must be called inside a transaction since it calls iput().
static struct inode*
namex(char *path, int nameiparent, char *name)
{
80101c60: 55 push %ebp
80101c61: 89 e5 mov %esp,%ebp
80101c63: 57 push %edi
80101c64: 89 cf mov %ecx,%edi
80101c66: 56 push %esi
80101c67: 53 push %ebx
80101c68: 89 c3 mov %eax,%ebx
80101c6a: 83 ec 2c sub $0x2c,%esp
struct inode *ip, *next;
if(*path == '/')
80101c6d: 80 38 2f cmpb $0x2f,(%eax)
// If parent != 0, return the inode for the parent and copy the final
// path element into name, which must have room for DIRSIZ bytes.
// Must be called inside a transaction since it calls iput().
static struct inode*
namex(char *path, int nameiparent, char *name)
{
80101c70: 89 55 e0 mov %edx,-0x20(%ebp)
struct inode *ip, *next;
if(*path == '/')
80101c73: 0f 84 51 01 00 00 je 80101dca <namex+0x16a>
ip = iget(ROOTDEV, ROOTINO);
else
ip = idup(proc->cwd);
80101c79: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80101c7f: 8b 70 68 mov 0x68(%eax),%esi
// Increment reference count for ip.
// Returns ip to enable ip = idup(ip1) idiom.
struct inode*
idup(struct inode *ip)
{
acquire(&icache.lock);
<<<<<<< HEAD
80101c35: 68 00 0a 11 80 push $0x80110a00
80101c3a: e8 d1 28 00 00 call 80104510 <acquire>
=======
80101c82: c7 04 24 00 0a 11 80 movl $0x80110a00,(%esp)
80101c89: e8 f2 26 00 00 call 80104380 <acquire>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
ip->ref++;
80101c8e: 83 46 08 01 addl $0x1,0x8(%esi)
release(&icache.lock);
<<<<<<< HEAD
80101c43: c7 04 24 00 0a 11 80 movl $0x80110a00,(%esp)
80101c4a: e8 a1 2a 00 00 call 801046f0 <release>
80101c4f: 83 c4 10 add $0x10,%esp
80101c52: eb 07 jmp 80101c5b <namex+0x4b>
80101c54: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
=======
80101c92: c7 04 24 00 0a 11 80 movl $0x80110a00,(%esp)
80101c99: e8 12 28 00 00 call 801044b0 <release>
80101c9e: eb 03 jmp 80101ca3 <namex+0x43>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
{
char *s;
int len;
while(*path == '/')
path++;
80101ca0: 83 c3 01 add $0x1,%ebx
skipelem(char *path, char *name)
{
char *s;
int len;
while(*path == '/')
80101ca3: 0f b6 03 movzbl (%ebx),%eax
80101ca6: 3c 2f cmp $0x2f,%al
80101ca8: 74 f6 je 80101ca0 <namex+0x40>
path++;
if(*path == 0)
80101caa: 84 c0 test %al,%al
80101cac: 0f 84 ed 00 00 00 je 80101d9f <namex+0x13f>
return 0;
s = path;
while(*path != '/' && *path != 0)
80101cb2: 0f b6 03 movzbl (%ebx),%eax
80101cb5: 89 da mov %ebx,%edx
80101cb7: 84 c0 test %al,%al
80101cb9: 0f 84 b1 00 00 00 je 80101d70 <namex+0x110>
80101cbf: 3c 2f cmp $0x2f,%al
80101cc1: 75 0f jne 80101cd2 <namex+0x72>
80101cc3: e9 a8 00 00 00 jmp 80101d70 <namex+0x110>
80101cc8: 3c 2f cmp $0x2f,%al
80101cca: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80101cd0: 74 0a je 80101cdc <namex+0x7c>
path++;
80101cd2: 83 c2 01 add $0x1,%edx
while(*path == '/')
path++;
if(*path == 0)
return 0;
s = path;
while(*path != '/' && *path != 0)
<<<<<<< HEAD
80101c87: 0f b6 02 movzbl (%edx),%eax
80101c8a: 3c 2f cmp $0x2f,%al
80101c8c: 75 f2 jne 80101c80 <namex+0x70>
80101c8e: 89 d1 mov %edx,%ecx
80101c90: 29 d9 sub %ebx,%ecx
path++;
len = path - s;
if(len >= DIRSIZ)
80101c92: 83 f9 0d cmp $0xd,%ecx
80101c95: 0f 8e 8d 00 00 00 jle 80101d28 <namex+0x118>
memmove(name, s, DIRSIZ);
80101c9b: 83 ec 04 sub $0x4,%esp
80101c9e: 89 55 e4 mov %edx,-0x1c(%ebp)
80101ca1: 6a 0e push $0xe
80101ca3: 53 push %ebx
80101ca4: 57 push %edi
80101ca5: e8 46 2b 00 00 call 801047f0 <memmove>
path++;
if(*path == 0)
return 0;
s = path;
while(*path != '/' && *path != 0)
=======
80101cd5: 0f b6 02 movzbl (%edx),%eax
80101cd8: 84 c0 test %al,%al
80101cda: 75 ec jne 80101cc8 <namex+0x68>
80101cdc: 89 d1 mov %edx,%ecx
80101cde: 29 d9 sub %ebx,%ecx
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
path++;
len = path - s;
if(len >= DIRSIZ)
80101ce0: 83 f9 0d cmp $0xd,%ecx
80101ce3: 0f 8e 8f 00 00 00 jle 80101d78 <namex+0x118>
memmove(name, s, DIRSIZ);
80101ce9: 89 5c 24 04 mov %ebx,0x4(%esp)
80101ced: c7 44 24 08 0e 00 00 movl $0xe,0x8(%esp)
80101cf4: 00
80101cf5: 89 3c 24 mov %edi,(%esp)
80101cf8: 89 55 e4 mov %edx,-0x1c(%ebp)
80101cfb: e8 a0 28 00 00 call 801045a0 <memmove>
path++;
if(*path == 0)
return 0;
s = path;
while(*path != '/' && *path != 0)
path++;
80101d00: 8b 55 e4 mov -0x1c(%ebp),%edx
80101d03: 89 d3 mov %edx,%ebx
memmove(name, s, DIRSIZ);
else {
memmove(name, s, len);
name[len] = 0;
}
while(*path == '/')
80101d05: 80 3a 2f cmpb $0x2f,(%edx)
80101d08: 75 0e jne 80101d18 <namex+0xb8>
80101d0a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
path++;
80101d10: 83 c3 01 add $0x1,%ebx
memmove(name, s, DIRSIZ);
else {
memmove(name, s, len);
name[len] = 0;
}
while(*path == '/')
80101d13: 80 3b 2f cmpb $0x2f,(%ebx)
80101d16: 74 f8 je 80101d10 <namex+0xb0>
ip = iget(ROOTDEV, ROOTINO);
else
ip = idup(proc->cwd);
while((path = skipelem(path, name)) != 0){
ilock(ip);
80101d18: 89 34 24 mov %esi,(%esp)
80101d1b: e8 90 f9 ff ff call 801016b0 <ilock>
if(ip->type != T_DIR){
80101d20: 66 83 7e 50 01 cmpw $0x1,0x50(%esi)
80101d25: 0f 85 85 00 00 00 jne 80101db0 <namex+0x150>
iunlockput(ip);
return 0;
}
if(nameiparent && *path == '\0'){
80101d2b: 8b 55 e0 mov -0x20(%ebp),%edx
80101d2e: 85 d2 test %edx,%edx
80101d30: 74 09 je 80101d3b <namex+0xdb>
80101d32: 80 3b 00 cmpb $0x0,(%ebx)
80101d35: 0f 84 a5 00 00 00 je 80101de0 <namex+0x180>
// Stop one level early.
iunlock(ip);
return ip;
}
if((next = dirlookup(ip, name, 0)) == 0){
80101d3b: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
80101d42: 00
80101d43: 89 7c 24 04 mov %edi,0x4(%esp)
80101d47: 89 34 24 mov %esi,(%esp)
80101d4a: e8 51 fe ff ff call 80101ba0 <dirlookup>
80101d4f: 85 c0 test %eax,%eax
80101d51: 74 5d je 80101db0 <namex+0x150>
// Common idiom: unlock, then put.
void
iunlockput(struct inode *ip)
{
iunlock(ip);
80101d53: 89 34 24 mov %esi,(%esp)
80101d56: 89 45 e4 mov %eax,-0x1c(%ebp)
80101d59: e8 22 fa ff ff call 80101780 <iunlock>
iput(ip);
80101d5e: 89 34 24 mov %esi,(%esp)
80101d61: e8 5a fa ff ff call 801017c0 <iput>
if((next = dirlookup(ip, name, 0)) == 0){
iunlockput(ip);
return 0;
}
iunlockput(ip);
ip = next;
80101d66: 8b 45 e4 mov -0x1c(%ebp),%eax
80101d69: 89 c6 mov %eax,%esi
80101d6b: e9 33 ff ff ff jmp 80101ca3 <namex+0x43>
while(*path == '/')
path++;
if(*path == 0)
return 0;
s = path;
while(*path != '/' && *path != 0)
80101d70: 31 c9 xor %ecx,%ecx
80101d72: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
path++;
len = path - s;
if(len >= DIRSIZ)
memmove(name, s, DIRSIZ);
else {
memmove(name, s, len);
<<<<<<< HEAD
80101d28: 83 ec 04 sub $0x4,%esp
80101d2b: 89 55 dc mov %edx,-0x24(%ebp)
80101d2e: 89 4d e4 mov %ecx,-0x1c(%ebp)
80101d31: 51 push %ecx
80101d32: 53 push %ebx
80101d33: 57 push %edi
80101d34: e8 b7 2a 00 00 call 801047f0 <memmove>
=======
80101d78: 89 4c 24 08 mov %ecx,0x8(%esp)
80101d7c: 89 5c 24 04 mov %ebx,0x4(%esp)
80101d80: 89 3c 24 mov %edi,(%esp)
80101d83: 89 55 dc mov %edx,-0x24(%ebp)
80101d86: 89 4d e4 mov %ecx,-0x1c(%ebp)
80101d89: e8 12 28 00 00 call 801045a0 <memmove>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
name[len] = 0;
80101d8e: 8b 4d e4 mov -0x1c(%ebp),%ecx
80101d91: 8b 55 dc mov -0x24(%ebp),%edx
80101d94: c6 04 0f 00 movb $0x0,(%edi,%ecx,1)
80101d98: 89 d3 mov %edx,%ebx
80101d9a: e9 66 ff ff ff jmp 80101d05 <namex+0xa5>
return 0;
}
iunlockput(ip);
ip = next;
}
if(nameiparent){
80101d9f: 8b 45 e0 mov -0x20(%ebp),%eax
80101da2: 85 c0 test %eax,%eax
80101da4: 75 4c jne 80101df2 <namex+0x192>
80101da6: 89 f0 mov %esi,%eax
iput(ip);
return 0;
}
return ip;
}
80101da8: 83 c4 2c add $0x2c,%esp
80101dab: 5b pop %ebx
80101dac: 5e pop %esi
80101dad: 5f pop %edi
80101dae: 5d pop %ebp
80101daf: c3 ret
// Common idiom: unlock, then put.
void
iunlockput(struct inode *ip)
{
iunlock(ip);
80101db0: 89 34 24 mov %esi,(%esp)
80101db3: e8 c8 f9 ff ff call 80101780 <iunlock>
iput(ip);
80101db8: 89 34 24 mov %esi,(%esp)
80101dbb: e8 00 fa ff ff call 801017c0 <iput>
if(nameiparent){
iput(ip);
return 0;
}
return ip;
}
80101dc0: 83 c4 2c add $0x2c,%esp
iunlock(ip);
return ip;
}
if((next = dirlookup(ip, name, 0)) == 0){
iunlockput(ip);
return 0;
80101dc3: 31 c0 xor %eax,%eax
if(nameiparent){
iput(ip);
return 0;
}
return ip;
}
80101dc5: 5b pop %ebx
80101dc6: 5e pop %esi
80101dc7: 5f pop %edi
80101dc8: 5d pop %ebp
80101dc9: c3 ret
namex(char *path, int nameiparent, char *name)
{
struct inode *ip, *next;
if(*path == '/')
ip = iget(ROOTDEV, ROOTINO);
80101dca: ba 01 00 00 00 mov $0x1,%edx
80101dcf: b8 01 00 00 00 mov $0x1,%eax
80101dd4: e8 37 f4 ff ff call 80101210 <iget>
80101dd9: 89 c6 mov %eax,%esi
80101ddb: e9 c3 fe ff ff jmp 80101ca3 <namex+0x43>
iunlockput(ip);
return 0;
}
if(nameiparent && *path == '\0'){
// Stop one level early.
iunlock(ip);
80101de0: 89 34 24 mov %esi,(%esp)
80101de3: e8 98 f9 ff ff call 80101780 <iunlock>
if(nameiparent){
iput(ip);
return 0;
}
return ip;
}
80101de8: 83 c4 2c add $0x2c,%esp
return 0;
}
if(nameiparent && *path == '\0'){
// Stop one level early.
iunlock(ip);
return ip;
80101deb: 89 f0 mov %esi,%eax
if(nameiparent){
iput(ip);
return 0;
}
return ip;
}
80101ded: 5b pop %ebx
80101dee: 5e pop %esi
80101def: 5f pop %edi
80101df0: 5d pop %ebp
80101df1: c3 ret
}
iunlockput(ip);
ip = next;
}
if(nameiparent){
iput(ip);
80101df2: 89 34 24 mov %esi,(%esp)
80101df5: e8 c6 f9 ff ff call 801017c0 <iput>
return 0;
80101dfa: 31 c0 xor %eax,%eax
80101dfc: eb aa jmp 80101da8 <namex+0x148>
80101dfe: 66 90 xchg %ax,%ax
80101e00 <dirlink>:
}
// Write a new directory entry (name, inum) into the directory dp.
int
dirlink(struct inode *dp, char *name, uint inum)
{
80101e00: 55 push %ebp
80101e01: 89 e5 mov %esp,%ebp
80101e03: 57 push %edi
80101e04: 56 push %esi
80101e05: 53 push %ebx
80101e06: 83 ec 2c sub $0x2c,%esp
80101e09: 8b 5d 08 mov 0x8(%ebp),%ebx
int off;
struct dirent de;
struct inode *ip;
// Check that name is not present.
if((ip = dirlookup(dp, name, 0)) != 0){
80101e0c: 8b 45 0c mov 0xc(%ebp),%eax
80101e0f: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
80101e16: 00
80101e17: 89 1c 24 mov %ebx,(%esp)
80101e1a: 89 44 24 04 mov %eax,0x4(%esp)
80101e1e: e8 7d fd ff ff call 80101ba0 <dirlookup>
80101e23: 85 c0 test %eax,%eax
80101e25: 0f 85 8b 00 00 00 jne 80101eb6 <dirlink+0xb6>
iput(ip);
return -1;
}
// Look for an empty dirent.
for(off = 0; off < dp->size; off += sizeof(de)){
80101e2b: 8b 43 58 mov 0x58(%ebx),%eax
80101e2e: 31 ff xor %edi,%edi
80101e30: 8d 75 d8 lea -0x28(%ebp),%esi
80101e33: 85 c0 test %eax,%eax
80101e35: 75 13 jne 80101e4a <dirlink+0x4a>
80101e37: eb 35 jmp 80101e6e <dirlink+0x6e>
80101e39: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80101e40: 8d 57 10 lea 0x10(%edi),%edx
80101e43: 39 53 58 cmp %edx,0x58(%ebx)
80101e46: 89 d7 mov %edx,%edi
80101e48: 76 24 jbe 80101e6e <dirlink+0x6e>
if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
80101e4a: c7 44 24 0c 10 00 00 movl $0x10,0xc(%esp)
80101e51: 00
80101e52: 89 7c 24 08 mov %edi,0x8(%esp)
80101e56: 89 74 24 04 mov %esi,0x4(%esp)
80101e5a: 89 1c 24 mov %ebx,(%esp)
80101e5d: e8 de fa ff ff call 80101940 <readi>
80101e62: 83 f8 10 cmp $0x10,%eax
80101e65: 75 5e jne 80101ec5 <dirlink+0xc5>
panic("dirlink read");
if(de.inum == 0)
80101e67: 66 83 7d d8 00 cmpw $0x0,-0x28(%ebp)
80101e6c: 75 d2 jne 80101e40 <dirlink+0x40>
break;
}
strncpy(de.name, name, DIRSIZ);
<<<<<<< HEAD
80101e11: 8d 45 da lea -0x26(%ebp),%eax
80101e14: 83 ec 04 sub $0x4,%esp
80101e17: 6a 0e push $0xe
80101e19: ff 75 0c pushl 0xc(%ebp)
80101e1c: 50 push %eax
80101e1d: e8 be 2a 00 00 call 801048e0 <strncpy>
=======
80101e6e: 8b 45 0c mov 0xc(%ebp),%eax
80101e71: c7 44 24 08 0e 00 00 movl $0xe,0x8(%esp)
80101e78: 00
80101e79: 89 44 24 04 mov %eax,0x4(%esp)
80101e7d: 8d 45 da lea -0x26(%ebp),%eax
80101e80: 89 04 24 mov %eax,(%esp)
80101e83: e8 08 28 00 00 call 80104690 <strncpy>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
de.inum = inum;
80101e88: 8b 45 10 mov 0x10(%ebp),%eax
if(writei(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
80101e8b: c7 44 24 0c 10 00 00 movl $0x10,0xc(%esp)
80101e92: 00
80101e93: 89 7c 24 08 mov %edi,0x8(%esp)
80101e97: 89 74 24 04 mov %esi,0x4(%esp)
80101e9b: 89 1c 24 mov %ebx,(%esp)
if(de.inum == 0)
break;
}
strncpy(de.name, name, DIRSIZ);
de.inum = inum;
80101e9e: 66 89 45 d8 mov %ax,-0x28(%ebp)
if(writei(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
80101ea2: e8 99 fb ff ff call 80101a40 <writei>
80101ea7: 83 f8 10 cmp $0x10,%eax
80101eaa: 75 25 jne 80101ed1 <dirlink+0xd1>
panic("dirlink");
return 0;
80101eac: 31 c0 xor %eax,%eax
}
80101eae: 83 c4 2c add $0x2c,%esp
80101eb1: 5b pop %ebx
80101eb2: 5e pop %esi
80101eb3: 5f pop %edi
80101eb4: 5d pop %ebp
80101eb5: c3 ret
struct dirent de;
struct inode *ip;
// Check that name is not present.
if((ip = dirlookup(dp, name, 0)) != 0){
iput(ip);
80101eb6: 89 04 24 mov %eax,(%esp)
80101eb9: e8 02 f9 ff ff call 801017c0 <iput>
return -1;
80101ebe: b8 ff ff ff ff mov $0xffffffff,%eax
80101ec3: eb e9 jmp 80101eae <dirlink+0xae>
}
// Look for an empty dirent.
for(off = 0; off < dp->size; off += sizeof(de)){
if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
panic("dirlink read");
<<<<<<< HEAD
80101e58: 83 ec 0c sub $0xc,%esp
80101e5b: 68 95 74 10 80 push $0x80107495
80101e60: e8 0b e5 ff ff call 80100370 <panic>
=======
80101ec5: c7 04 24 15 72 10 80 movl $0x80107215,(%esp)
80101ecc: e8 8f e4 ff ff call 80100360 <panic>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
}
strncpy(de.name, name, DIRSIZ);
de.inum = inum;
if(writei(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
panic("dirlink");
<<<<<<< HEAD
80101e65: 83 ec 0c sub $0xc,%esp
80101e68: 68 ce 7a 10 80 push $0x80107ace
80101e6d: e8 fe e4 ff ff call 80100370 <panic>
80101e72: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80101e79: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
=======
80101ed1: c7 04 24 6e 78 10 80 movl $0x8010786e,(%esp)
80101ed8: e8 83 e4 ff ff call 80100360 <panic>
80101edd: 8d 76 00 lea 0x0(%esi),%esi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
80101ee0 <namei>:
return ip;
}
struct inode*
namei(char *path)
{
80101ee0: 55 push %ebp
char name[DIRSIZ];
return namex(path, 0, name);
80101ee1: 31 d2 xor %edx,%edx
return ip;
}
struct inode*
namei(char *path)
{
80101ee3: 89 e5 mov %esp,%ebp
80101ee5: 83 ec 18 sub $0x18,%esp
char name[DIRSIZ];
return namex(path, 0, name);
80101ee8: 8b 45 08 mov 0x8(%ebp),%eax
80101eeb: 8d 4d ea lea -0x16(%ebp),%ecx
80101eee: e8 6d fd ff ff call 80101c60 <namex>
}
80101ef3: c9 leave
80101ef4: c3 ret
80101ef5: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80101ef9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80101f00 <nameiparent>:
struct inode*
nameiparent(char *path, char *name)
{
80101f00: 55 push %ebp
return namex(path, 1, name);
80101f01: ba 01 00 00 00 mov $0x1,%edx
return namex(path, 0, name);
}
struct inode*
nameiparent(char *path, char *name)
{
80101f06: 89 e5 mov %esp,%ebp
return namex(path, 1, name);
80101f08: 8b 4d 0c mov 0xc(%ebp),%ecx
80101f0b: 8b 45 08 mov 0x8(%ebp),%eax
}
80101f0e: 5d pop %ebp
}
struct inode*
nameiparent(char *path, char *name)
{
return namex(path, 1, name);
80101f0f: e9 4c fd ff ff jmp 80101c60 <namex>
80101f14: 66 90 xchg %ax,%ax
80101f16: 66 90 xchg %ax,%ax
80101f18: 66 90 xchg %ax,%ax
80101f1a: 66 90 xchg %ax,%ax
80101f1c: 66 90 xchg %ax,%ax
80101f1e: 66 90 xchg %ax,%ax
80101f20 <idestart>:
}
// Start the request for b. Caller must hold idelock.
static void
idestart(struct buf *b)
{
80101f20: 55 push %ebp
80101f21: 89 e5 mov %esp,%ebp
80101f23: 56 push %esi
80101f24: 89 c6 mov %eax,%esi
80101f26: 53 push %ebx
80101f27: 83 ec 10 sub $0x10,%esp
if(b == 0)
80101f2a: 85 c0 test %eax,%eax
80101f2c: 0f 84 99 00 00 00 je 80101fcb <idestart+0xab>
panic("idestart");
if(b->blockno >= FSSIZE)
80101f32: 8b 48 08 mov 0x8(%eax),%ecx
80101f35: 81 f9 e7 03 00 00 cmp $0x3e7,%ecx
80101f3b: 0f 87 7e 00 00 00 ja 80101fbf <idestart+0x9f>
static inline uchar
inb(ushort port)
{
uchar data;
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80101f41: ba f7 01 00 00 mov $0x1f7,%edx
80101f46: 66 90 xchg %ax,%ax
80101f48: ec in (%dx),%al
static int
idewait(int checkerr)
{
int r;
while(((r = inb(0x1f7)) & (IDE_BSY|IDE_DRDY)) != IDE_DRDY)
80101f49: 83 e0 c0 and $0xffffffc0,%eax
80101f4c: 3c 40 cmp $0x40,%al
80101f4e: 75 f8 jne 80101f48 <idestart+0x28>
}
static inline void
outb(ushort port, uchar data)
{
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80101f50: 31 db xor %ebx,%ebx
80101f52: ba f6 03 00 00 mov $0x3f6,%edx
80101f57: 89 d8 mov %ebx,%eax
80101f59: ee out %al,(%dx)
80101f5a: ba f2 01 00 00 mov $0x1f2,%edx
80101f5f: b8 01 00 00 00 mov $0x1,%eax
80101f64: ee out %al,(%dx)
80101f65: 0f b6 c1 movzbl %cl,%eax
80101f68: b2 f3 mov $0xf3,%dl
80101f6a: ee out %al,(%dx)
idewait(0);
outb(0x3f6, 0); // generate interrupt
outb(0x1f2, sector_per_block); // number of sectors
outb(0x1f3, sector & 0xff);
outb(0x1f4, (sector >> 8) & 0xff);
80101f6b: 89 c8 mov %ecx,%eax
80101f6d: b2 f4 mov $0xf4,%dl
80101f6f: c1 f8 08 sar $0x8,%eax
80101f72: ee out %al,(%dx)
80101f73: b2 f5 mov $0xf5,%dl
80101f75: 89 d8 mov %ebx,%eax
80101f77: ee out %al,(%dx)
outb(0x1f5, (sector >> 16) & 0xff);
outb(0x1f6, 0xe0 | ((b->dev&1)<<4) | ((sector>>24)&0x0f));
80101f78: 0f b6 46 04 movzbl 0x4(%esi),%eax
80101f7c: b2 f6 mov $0xf6,%dl
80101f7e: 83 e0 01 and $0x1,%eax
80101f81: c1 e0 04 shl $0x4,%eax
80101f84: 83 c8 e0 or $0xffffffe0,%eax
80101f87: ee out %al,(%dx)
if(b->flags & B_DIRTY){
80101f88: f6 06 04 testb $0x4,(%esi)
80101f8b: 75 13 jne 80101fa0 <idestart+0x80>
80101f8d: ba f7 01 00 00 mov $0x1f7,%edx
80101f92: b8 20 00 00 00 mov $0x20,%eax
80101f97: ee out %al,(%dx)
outb(0x1f7, write_cmd);
outsl(0x1f0, b->data, BSIZE/4);
} else {
outb(0x1f7, read_cmd);
}
}
80101f98: 83 c4 10 add $0x10,%esp
80101f9b: 5b pop %ebx
80101f9c: 5e pop %esi
80101f9d: 5d pop %ebp
80101f9e: c3 ret
80101f9f: 90 nop
80101fa0: b2 f7 mov $0xf7,%dl
80101fa2: b8 30 00 00 00 mov $0x30,%eax
80101fa7: ee out %al,(%dx)
}
static inline void
outsl(int port, const void *addr, int cnt)
{
asm volatile("cld; rep outsl" :
80101fa8: b9 80 00 00 00 mov $0x80,%ecx
outb(0x1f4, (sector >> 8) & 0xff);
outb(0x1f5, (sector >> 16) & 0xff);
outb(0x1f6, 0xe0 | ((b->dev&1)<<4) | ((sector>>24)&0x0f));
if(b->flags & B_DIRTY){
outb(0x1f7, write_cmd);
outsl(0x1f0, b->data, BSIZE/4);
80101fad: 83 c6 5c add $0x5c,%esi
80101fb0: ba f0 01 00 00 mov $0x1f0,%edx
80101fb5: fc cld
80101fb6: f3 6f rep outsl %ds:(%esi),(%dx)
} else {
outb(0x1f7, read_cmd);
}
}
80101fb8: 83 c4 10 add $0x10,%esp
80101fbb: 5b pop %ebx
80101fbc: 5e pop %esi
80101fbd: 5d pop %ebp
80101fbe: c3 ret
idestart(struct buf *b)
{
if(b == 0)
panic("idestart");
if(b->blockno >= FSSIZE)
panic("incorrect blockno");
<<<<<<< HEAD
80101f6d: 83 ec 0c sub $0xc,%esp
80101f70: 68 00 75 10 80 push $0x80107500
80101f75: e8 f6 e3 ff ff call 80100370 <panic>
=======
80101fbf: c7 04 24 80 72 10 80 movl $0x80107280,(%esp)
80101fc6: e8 95 e3 ff ff call 80100360 <panic>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// Start the request for b. Caller must hold idelock.
static void
idestart(struct buf *b)
{
if(b == 0)
panic("idestart");
<<<<<<< HEAD
80101f7a: 83 ec 0c sub $0xc,%esp
80101f7d: 68 f7 74 10 80 push $0x801074f7
80101f82: e8 e9 e3 ff ff call 80100370 <panic>
80101f87: 89 f6 mov %esi,%esi
80101f89: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
=======
80101fcb: c7 04 24 77 72 10 80 movl $0x80107277,(%esp)
80101fd2: e8 89 e3 ff ff call 80100360 <panic>
80101fd7: 89 f6 mov %esi,%esi
80101fd9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
80101fe0 <ideinit>:
return 0;
}
void
ideinit(void)
{
80101fe0: 55 push %ebp
80101fe1: 89 e5 mov %esp,%ebp
80101fe3: 83 ec 18 sub $0x18,%esp
int i;
initlock(&idelock, "ide");
<<<<<<< HEAD
80101f96: 68 12 75 10 80 push $0x80107512
80101f9b: 68 80 a5 10 80 push $0x8010a580
80101fa0: e8 4b 25 00 00 call 801044f0 <initlock>
=======
80101fe6: c7 44 24 04 92 72 10 movl $0x80107292,0x4(%esp)
80101fed: 80
80101fee: c7 04 24 80 a5 10 80 movl $0x8010a580,(%esp)
80101ff5: e8 06 23 00 00 call 80104300 <initlock>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
picenable(IRQ_IDE);
80101ffa: c7 04 24 0e 00 00 00 movl $0xe,(%esp)
80102001: e8 ea 11 00 00 call 801031f0 <picenable>
ioapicenable(IRQ_IDE, ncpu - 1);
80102006: a1 80 2d 11 80 mov 0x80112d80,%eax
8010200b: c7 04 24 0e 00 00 00 movl $0xe,(%esp)
80102012: 83 e8 01 sub $0x1,%eax
80102015: 89 44 24 04 mov %eax,0x4(%esp)
80102019: e8 82 02 00 00 call 801022a0 <ioapicenable>
static inline uchar
inb(ushort port)
{
uchar data;
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
8010201e: ba f7 01 00 00 mov $0x1f7,%edx
80102023: 90 nop
80102024: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80102028: ec in (%dx),%al
static int
idewait(int checkerr)
{
int r;
while(((r = inb(0x1f7)) & (IDE_BSY|IDE_DRDY)) != IDE_DRDY)
80102029: 83 e0 c0 and $0xffffffc0,%eax
8010202c: 3c 40 cmp $0x40,%al
8010202e: 75 f8 jne 80102028 <ideinit+0x48>
}
static inline void
outb(ushort port, uchar data)
{
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80102030: ba f6 01 00 00 mov $0x1f6,%edx
80102035: b8 f0 ff ff ff mov $0xfffffff0,%eax
8010203a: ee out %al,(%dx)
8010203b: b9 e8 03 00 00 mov $0x3e8,%ecx
static inline uchar
inb(ushort port)
{
uchar data;
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102040: b2 f7 mov $0xf7,%dl
80102042: eb 09 jmp 8010204d <ideinit+0x6d>
80102044: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
ioapicenable(IRQ_IDE, ncpu - 1);
idewait(0);
// Check if disk 1 is present
outb(0x1f6, 0xe0 | (1<<4));
for(i=0; i<1000; i++){
80102048: 83 e9 01 sub $0x1,%ecx
8010204b: 74 0f je 8010205c <ideinit+0x7c>
8010204d: ec in (%dx),%al
if(inb(0x1f7) != 0){
8010204e: 84 c0 test %al,%al
80102050: 74 f6 je 80102048 <ideinit+0x68>
havedisk1 = 1;
80102052: c7 05 60 a5 10 80 01 movl $0x1,0x8010a560
80102059: 00 00 00
}
static inline void
outb(ushort port, uchar data)
{
asm volatile("out %0,%1" : : "a" (data), "d" (port));
8010205c: ba f6 01 00 00 mov $0x1f6,%edx
80102061: b8 e0 ff ff ff mov $0xffffffe0,%eax
80102066: ee out %al,(%dx)
}
}
// Switch back to disk 0.
outb(0x1f6, 0xe0 | (0<<4));
}
80102067: c9 leave
80102068: c3 ret
80102069: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80102070 <ideintr>:
}
// Interrupt handler.
void
ideintr(void)
{
80102070: 55 push %ebp
80102071: 89 e5 mov %esp,%ebp
80102073: 57 push %edi
80102074: 56 push %esi
80102075: 53 push %ebx
80102076: 83 ec 1c sub $0x1c,%esp
struct buf *b;
// First queued buffer is the active request.
acquire(&idelock);
<<<<<<< HEAD
80102029: 68 80 a5 10 80 push $0x8010a580
8010202e: e8 dd 24 00 00 call 80104510 <acquire>
=======
80102079: c7 04 24 80 a5 10 80 movl $0x8010a580,(%esp)
80102080: e8 fb 22 00 00 call 80104380 <acquire>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
if((b = idequeue) == 0){
80102085: 8b 1d 64 a5 10 80 mov 0x8010a564,%ebx
8010208b: 85 db test %ebx,%ebx
8010208d: 74 30 je 801020bf <ideintr+0x4f>
release(&idelock);
// cprintf("spurious IDE interrupt\n");
return;
}
idequeue = b->qnext;
8010208f: 8b 43 58 mov 0x58(%ebx),%eax
80102092: a3 64 a5 10 80 mov %eax,0x8010a564
// Read data if needed.
if(!(b->flags & B_DIRTY) && idewait(1) >= 0)
80102097: 8b 33 mov (%ebx),%esi
80102099: f7 c6 04 00 00 00 test $0x4,%esi
8010209f: 74 37 je 801020d8 <ideintr+0x68>
insl(0x1f0, b->data, BSIZE/4);
// Wake process waiting for this buf.
b->flags |= B_VALID;
b->flags &= ~B_DIRTY;
801020a1: 83 e6 fb and $0xfffffffb,%esi
801020a4: 83 ce 02 or $0x2,%esi
801020a7: 89 33 mov %esi,(%ebx)
wakeup(b);
<<<<<<< HEAD
8010205d: 53 push %ebx
8010205e: e8 8d 20 00 00 call 801040f0 <wakeup>
=======
801020a9: 89 1c 24 mov %ebx,(%esp)
801020ac: e8 2f 1e 00 00 call 80103ee0 <wakeup>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// Start disk on next buf in queue.
if(idequeue != 0)
801020b1: a1 64 a5 10 80 mov 0x8010a564,%eax
801020b6: 85 c0 test %eax,%eax
801020b8: 74 05 je 801020bf <ideintr+0x4f>
idestart(idequeue);
801020ba: e8 61 fe ff ff call 80101f20 <idestart>
struct buf *b;
// First queued buffer is the active request.
acquire(&idelock);
if((b = idequeue) == 0){
release(&idelock);
<<<<<<< HEAD
80102074: 83 ec 0c sub $0xc,%esp
80102077: 68 80 a5 10 80 push $0x8010a580
8010207c: e8 6f 26 00 00 call 801046f0 <release>
=======
801020bf: c7 04 24 80 a5 10 80 movl $0x8010a580,(%esp)
801020c6: e8 e5 23 00 00 call 801044b0 <release>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// Start disk on next buf in queue.
if(idequeue != 0)
idestart(idequeue);
release(&idelock);
}
801020cb: 83 c4 1c add $0x1c,%esp
801020ce: 5b pop %ebx
801020cf: 5e pop %esi
801020d0: 5f pop %edi
801020d1: 5d pop %ebp
801020d2: c3 ret
801020d3: 90 nop
801020d4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
static inline uchar
inb(ushort port)
{
uchar data;
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
801020d8: ba f7 01 00 00 mov $0x1f7,%edx
801020dd: 8d 76 00 lea 0x0(%esi),%esi
801020e0: ec in (%dx),%al
static int
idewait(int checkerr)
{
int r;
while(((r = inb(0x1f7)) & (IDE_BSY|IDE_DRDY)) != IDE_DRDY)
801020e1: 89 c1 mov %eax,%ecx
801020e3: 83 e1 c0 and $0xffffffc0,%ecx
801020e6: 80 f9 40 cmp $0x40,%cl
801020e9: 75 f5 jne 801020e0 <ideintr+0x70>
;
if(checkerr && (r & (IDE_DF|IDE_ERR)) != 0)
801020eb: a8 21 test $0x21,%al
801020ed: 75 b2 jne 801020a1 <ideintr+0x31>
}
idequeue = b->qnext;
// Read data if needed.
if(!(b->flags & B_DIRTY) && idewait(1) >= 0)
insl(0x1f0, b->data, BSIZE/4);
801020ef: 8d 7b 5c lea 0x5c(%ebx),%edi
}
static inline void
insl(int port, void *addr, int cnt)
{
asm volatile("cld; rep insl" :
801020f2: b9 80 00 00 00 mov $0x80,%ecx
801020f7: ba f0 01 00 00 mov $0x1f0,%edx
801020fc: fc cld
801020fd: f3 6d rep insl (%dx),%es:(%edi)
801020ff: 8b 33 mov (%ebx),%esi
80102101: eb 9e jmp 801020a1 <ideintr+0x31>
80102103: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80102109: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80102110 <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)
{
80102110: 55 push %ebp
80102111: 89 e5 mov %esp,%ebp
80102113: 53 push %ebx
80102114: 83 ec 14 sub $0x14,%esp
80102117: 8b 5d 08 mov 0x8(%ebp),%ebx
struct buf **pp;
if(!holdingsleep(&b->lock))
<<<<<<< HEAD
801020ca: 8d 43 0c lea 0xc(%ebx),%eax
801020cd: 50 push %eax
801020ce: e8 ed 23 00 00 call 801044c0 <holdingsleep>
801020d3: 83 c4 10 add $0x10,%esp
801020d6: 85 c0 test %eax,%eax
801020d8: 0f 84 ad 00 00 00 je 8010218b <iderw+0xcb>
=======
8010211a: 8d 43 0c lea 0xc(%ebx),%eax
8010211d: 89 04 24 mov %eax,(%esp)
80102120: e8 ab 21 00 00 call 801042d0 <holdingsleep>
80102125: 85 c0 test %eax,%eax
80102127: 0f 84 9e 00 00 00 je 801021cb <iderw+0xbb>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
panic("iderw: buf not locked");
if((b->flags & (B_VALID|B_DIRTY)) == B_VALID)
8010212d: 8b 03 mov (%ebx),%eax
8010212f: 83 e0 06 and $0x6,%eax
80102132: 83 f8 02 cmp $0x2,%eax
80102135: 0f 84 a8 00 00 00 je 801021e3 <iderw+0xd3>
panic("iderw: nothing to do");
if(b->dev != 0 && !havedisk1)
8010213b: 8b 53 04 mov 0x4(%ebx),%edx
8010213e: 85 d2 test %edx,%edx
80102140: 74 0d je 8010214f <iderw+0x3f>
80102142: a1 60 a5 10 80 mov 0x8010a560,%eax
80102147: 85 c0 test %eax,%eax
80102149: 0f 84 88 00 00 00 je 801021d7 <iderw+0xc7>
panic("iderw: ide disk 1 not present");
acquire(&idelock); //DOC:acquire-lock
<<<<<<< HEAD
80102100: 83 ec 0c sub $0xc,%esp
80102103: 68 80 a5 10 80 push $0x8010a580
80102108: e8 03 24 00 00 call 80104510 <acquire>
=======
8010214f: c7 04 24 80 a5 10 80 movl $0x8010a580,(%esp)
80102156: e8 25 22 00 00 call 80104380 <acquire>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// Append b to idequeue.
b->qnext = 0;
for(pp=&idequeue; *pp; pp=&(*pp)->qnext) //DOC:insert-queue
8010215b: a1 64 a5 10 80 mov 0x8010a564,%eax
panic("iderw: ide disk 1 not present");
acquire(&idelock); //DOC:acquire-lock
// Append b to idequeue.
b->qnext = 0;
80102160: c7 43 58 00 00 00 00 movl $0x0,0x58(%ebx)
for(pp=&idequeue; *pp; pp=&(*pp)->qnext) //DOC:insert-queue
80102167: 85 c0 test %eax,%eax
80102169: 75 07 jne 80102172 <iderw+0x62>
8010216b: eb 4e jmp 801021bb <iderw+0xab>
8010216d: 8d 76 00 lea 0x0(%esi),%esi
80102170: 89 d0 mov %edx,%eax
80102172: 8b 50 58 mov 0x58(%eax),%edx
80102175: 85 d2 test %edx,%edx
80102177: 75 f7 jne 80102170 <iderw+0x60>
80102179: 83 c0 58 add $0x58,%eax
;
*pp = b;
8010217c: 89 18 mov %ebx,(%eax)
// Start disk if necessary.
if(idequeue == b)
8010217e: 39 1d 64 a5 10 80 cmp %ebx,0x8010a564
80102184: 74 3c je 801021c2 <iderw+0xb2>
idestart(b);
// Wait for request to finish.
while((b->flags & (B_VALID|B_DIRTY)) != B_VALID){
80102186: 8b 03 mov (%ebx),%eax
80102188: 83 e0 06 and $0x6,%eax
8010218b: 83 f8 02 cmp $0x2,%eax
8010218e: 74 1a je 801021aa <iderw+0x9a>
sleep(b, &idelock);
<<<<<<< HEAD
80102150: 83 ec 08 sub $0x8,%esp
80102153: 68 80 a5 10 80 push $0x8010a580
80102158: 53 push %ebx
80102159: e8 f2 1d 00 00 call 80103f50 <sleep>
=======
80102190: c7 44 24 04 80 a5 10 movl $0x8010a580,0x4(%esp)
80102197: 80
80102198: 89 1c 24 mov %ebx,(%esp)
8010219b: e8 a0 1b 00 00 call 80103d40 <sleep>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// Start disk if necessary.
if(idequeue == b)
idestart(b);
// Wait for request to finish.
while((b->flags & (B_VALID|B_DIRTY)) != B_VALID){
801021a0: 8b 13 mov (%ebx),%edx
801021a2: 83 e2 06 and $0x6,%edx
801021a5: 83 fa 02 cmp $0x2,%edx
801021a8: 75 e6 jne 80102190 <iderw+0x80>
sleep(b, &idelock);
}
release(&idelock);
801021aa: c7 45 08 80 a5 10 80 movl $0x8010a580,0x8(%ebp)
}
801021b1: 83 c4 14 add $0x14,%esp
801021b4: 5b pop %ebx
801021b5: 5d pop %ebp
// Wait for request to finish.
while((b->flags & (B_VALID|B_DIRTY)) != B_VALID){
sleep(b, &idelock);
}
release(&idelock);
<<<<<<< HEAD
80102176: e9 75 25 00 00 jmp 801046f0 <release>
=======
801021b6: e9 f5 22 00 00 jmp 801044b0 <release>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
acquire(&idelock); //DOC:acquire-lock
// Append b to idequeue.
b->qnext = 0;
for(pp=&idequeue; *pp; pp=&(*pp)->qnext) //DOC:insert-queue
801021bb: b8 64 a5 10 80 mov $0x8010a564,%eax
801021c0: eb ba jmp 8010217c <iderw+0x6c>
;
*pp = b;
// Start disk if necessary.
if(idequeue == b)
idestart(b);
801021c2: 89 d8 mov %ebx,%eax
801021c4: e8 57 fd ff ff call 80101f20 <idestart>
801021c9: eb bb jmp 80102186 <iderw+0x76>
iderw(struct buf *b)
{
struct buf **pp;
if(!holdingsleep(&b->lock))
panic("iderw: buf not locked");
<<<<<<< HEAD
8010218b: 83 ec 0c sub $0xc,%esp
8010218e: 68 16 75 10 80 push $0x80107516
80102193: e8 d8 e1 ff ff call 80100370 <panic>
=======
801021cb: c7 04 24 96 72 10 80 movl $0x80107296,(%esp)
801021d2: e8 89 e1 ff ff call 80100360 <panic>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
if((b->flags & (B_VALID|B_DIRTY)) == B_VALID)
panic("iderw: nothing to do");
if(b->dev != 0 && !havedisk1)
panic("iderw: ide disk 1 not present");
<<<<<<< HEAD
80102198: 83 ec 0c sub $0xc,%esp
8010219b: 68 41 75 10 80 push $0x80107541
801021a0: e8 cb e1 ff ff call 80100370 <panic>
=======
801021d7: c7 04 24 c1 72 10 80 movl $0x801072c1,(%esp)
801021de: e8 7d e1 ff ff call 80100360 <panic>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
struct buf **pp;
if(!holdingsleep(&b->lock))
panic("iderw: buf not locked");
if((b->flags & (B_VALID|B_DIRTY)) == B_VALID)
panic("iderw: nothing to do");
<<<<<<< HEAD
801021a5: 83 ec 0c sub $0xc,%esp
801021a8: 68 2c 75 10 80 push $0x8010752c
801021ad: e8 be e1 ff ff call 80100370 <panic>
801021b2: 66 90 xchg %ax,%ax
801021b4: 66 90 xchg %ax,%ax
801021b6: 66 90 xchg %ax,%ax
801021b8: 66 90 xchg %ax,%ax
801021ba: 66 90 xchg %ax,%ax
801021bc: 66 90 xchg %ax,%ax
801021be: 66 90 xchg %ax,%ax
801021c0 <ioapicinit>:
=======
801021e3: c7 04 24 ac 72 10 80 movl $0x801072ac,(%esp)
801021ea: e8 71 e1 ff ff call 80100360 <panic>
801021ef: 90 nop
801021f0 <ioapicinit>:
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
void
ioapicinit(void)
{
int i, id, maxintr;
if(!ismp)
801021f0: a1 84 27 11 80 mov 0x80112784,%eax
801021f5: 85 c0 test %eax,%eax
801021f7: 0f 84 9b 00 00 00 je 80102298 <ioapicinit+0xa8>
ioapic->data = data;
}
void
ioapicinit(void)
{
801021fd: 55 push %ebp
801021fe: 89 e5 mov %esp,%ebp
80102200: 56 push %esi
80102201: 53 push %ebx
80102202: 83 ec 10 sub $0x10,%esp
int i, id, maxintr;
if(!ismp)
return;
ioapic = (volatile struct ioapic*)IOAPIC;
80102205: c7 05 54 26 11 80 00 movl $0xfec00000,0x80112654
8010220c: 00 c0 fe
};
static uint
ioapicread(int reg)
{
ioapic->reg = reg;
8010220f: c7 05 00 00 c0 fe 01 movl $0x1,0xfec00000
80102216: 00 00 00
return ioapic->data;
80102219: 8b 15 54 26 11 80 mov 0x80112654,%edx
8010221f: 8b 42 10 mov 0x10(%edx),%eax
};
static uint
ioapicread(int reg)
{
ioapic->reg = reg;
80102222: c7 02 00 00 00 00 movl $0x0,(%edx)
return ioapic->data;
80102228: 8b 1d 54 26 11 80 mov 0x80112654,%ebx
return;
ioapic = (volatile struct ioapic*)IOAPIC;
maxintr = (ioapicread(REG_VER) >> 16) & 0xFF;
id = ioapicread(REG_ID) >> 24;
if(id != ioapicid)
8010222e: 0f b6 15 80 27 11 80 movzbl 0x80112780,%edx
if(!ismp)
return;
ioapic = (volatile struct ioapic*)IOAPIC;
maxintr = (ioapicread(REG_VER) >> 16) & 0xFF;
80102235: c1 e8 10 shr $0x10,%eax
80102238: 0f b6 f0 movzbl %al,%esi
static uint
ioapicread(int reg)
{
ioapic->reg = reg;
return ioapic->data;
8010223b: 8b 43 10 mov 0x10(%ebx),%eax
if(!ismp)
return;
ioapic = (volatile struct ioapic*)IOAPIC;
maxintr = (ioapicread(REG_VER) >> 16) & 0xFF;
id = ioapicread(REG_ID) >> 24;
8010223e: c1 e8 18 shr $0x18,%eax
if(id != ioapicid)
80102241: 39 c2 cmp %eax,%edx
80102243: 74 12 je 80102257 <ioapicinit+0x67>
cprintf("ioapicinit: id isn't equal to ioapicid; not a MP\n");
<<<<<<< HEAD
80102214: 83 ec 0c sub $0xc,%esp
80102217: 68 60 75 10 80 push $0x80107560
8010221c: e8 3f e4 ff ff call 80100660 <cprintf>
80102221: 8b 0d 54 26 11 80 mov 0x80112654,%ecx
80102227: 83 c4 10 add $0x10,%esp
8010222a: 83 c6 21 add $0x21,%esi
ioapic->data = data;
}
void
ioapicinit(void)
{
8010222d: ba 10 00 00 00 mov $0x10,%edx
80102232: b8 20 00 00 00 mov $0x20,%eax
80102237: 89 f6 mov %esi,%esi
80102239: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
=======
80102245: c7 04 24 e0 72 10 80 movl $0x801072e0,(%esp)
8010224c: e8 ff e3 ff ff call 80100650 <cprintf>
80102251: 8b 1d 54 26 11 80 mov 0x80112654,%ebx
80102257: ba 10 00 00 00 mov $0x10,%edx
8010225c: 31 c0 xor %eax,%eax
8010225e: eb 02 jmp 80102262 <ioapicinit+0x72>
80102260: 89 cb mov %ecx,%ebx
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
}
static void
ioapicwrite(int reg, uint data)
{
ioapic->reg = reg;
80102262: 89 13 mov %edx,(%ebx)
ioapic->data = data;
80102264: 8b 1d 54 26 11 80 mov 0x80112654,%ebx
8010226a: 8d 48 20 lea 0x20(%eax),%ecx
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++){
ioapicwrite(REG_TABLE+2*i, INT_DISABLED | (T_IRQ0 + i));
8010226d: 81 c9 00 00 01 00 or $0x10000,%ecx
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++){
80102273: 83 c0 01 add $0x1,%eax
static void
ioapicwrite(int reg, uint data)
{
ioapic->reg = reg;
ioapic->data = data;
80102276: 89 4b 10 mov %ecx,0x10(%ebx)
80102279: 8d 4a 01 lea 0x1(%edx),%ecx
8010227c: 83 c2 02 add $0x2,%edx
}
static void
ioapicwrite(int reg, uint data)
{
ioapic->reg = reg;
8010227f: 89 0b mov %ecx,(%ebx)
ioapic->data = data;
80102281: 8b 0d 54 26 11 80 mov 0x80112654,%ecx
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++){
80102287: 39 c6 cmp %eax,%esi
static void
ioapicwrite(int reg, uint data)
{
ioapic->reg = reg;
ioapic->data = data;
80102289: c7 41 10 00 00 00 00 movl $0x0,0x10(%ecx)
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++){
80102290: 7d ce jge 80102260 <ioapicinit+0x70>
ioapicwrite(REG_TABLE+2*i, INT_DISABLED | (T_IRQ0 + i));
ioapicwrite(REG_TABLE+2*i+1, 0);
}
}
80102292: 83 c4 10 add $0x10,%esp
80102295: 5b pop %ebx
80102296: 5e pop %esi
80102297: 5d pop %ebp
80102298: f3 c3 repz ret
8010229a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801022a0 <ioapicenable>:
void
ioapicenable(int irq, int cpunum)
{
if(!ismp)
801022a0: 8b 15 84 27 11 80 mov 0x80112784,%edx
}
}
void
ioapicenable(int irq, int cpunum)
{
801022a6: 55 push %ebp
801022a7: 89 e5 mov %esp,%ebp
801022a9: 8b 45 08 mov 0x8(%ebp),%eax
if(!ismp)
801022ac: 85 d2 test %edx,%edx
801022ae: 74 29 je 801022d9 <ioapicenable+0x39>
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);
801022b0: 8d 48 20 lea 0x20(%eax),%ecx
801022b3: 8d 54 00 10 lea 0x10(%eax,%eax,1),%edx
}
static void
ioapicwrite(int reg, uint data)
{
ioapic->reg = reg;
801022b7: a1 54 26 11 80 mov 0x80112654,%eax
801022bc: 89 10 mov %edx,(%eax)
ioapic->data = data;
801022be: a1 54 26 11 80 mov 0x80112654,%eax
// 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);
801022c3: 83 c2 01 add $0x1,%edx
static void
ioapicwrite(int reg, uint data)
{
ioapic->reg = reg;
ioapic->data = data;
801022c6: 89 48 10 mov %ecx,0x10(%eax)
// 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);
801022c9: 8b 4d 0c mov 0xc(%ebp),%ecx
}
static void
ioapicwrite(int reg, uint data)
{
ioapic->reg = reg;
801022cc: 89 10 mov %edx,(%eax)
ioapic->data = data;
801022ce: a1 54 26 11 80 mov 0x80112654,%eax
// 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);
801022d3: c1 e1 18 shl $0x18,%ecx
static void
ioapicwrite(int reg, uint data)
{
ioapic->reg = reg;
ioapic->data = data;
801022d6: 89 48 10 mov %ecx,0x10(%eax)
// 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);
}
801022d9: 5d pop %ebp
801022da: c3 ret
801022db: 66 90 xchg %ax,%ax
801022dd: 66 90 xchg %ax,%ax
801022df: 90 nop
801022e0 <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)
{
801022e0: 55 push %ebp
801022e1: 89 e5 mov %esp,%ebp
801022e3: 53 push %ebx
801022e4: 83 ec 14 sub $0x14,%esp
801022e7: 8b 5d 08 mov 0x8(%ebp),%ebx
struct run *r;
if((uint)v % PGSIZE || v < end || V2P(v) >= PHYSTOP)
801022ea: f7 c3 ff 0f 00 00 test $0xfff,%ebx
801022f0: 75 7c jne 8010236e <kfree+0x8e>
801022f2: 81 fb 28 56 11 80 cmp $0x80115628,%ebx
801022f8: 72 74 jb 8010236e <kfree+0x8e>
801022fa: 8d 83 00 00 00 80 lea -0x80000000(%ebx),%eax
80102300: 3d ff ff ff 0d cmp $0xdffffff,%eax
80102305: 77 67 ja 8010236e <kfree+0x8e>
panic("kfree");
// Fill with junk to catch dangling refs.
memset(v, 1, PGSIZE);
<<<<<<< HEAD
801022e7: 83 ec 04 sub $0x4,%esp
801022ea: 68 00 10 00 00 push $0x1000
801022ef: 6a 01 push $0x1
801022f1: 53 push %ebx
801022f2: e8 49 24 00 00 call 80104740 <memset>
=======
80102307: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp)
8010230e: 00
8010230f: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
80102316: 00
80102317: 89 1c 24 mov %ebx,(%esp)
8010231a: e8 e1 21 00 00 call 80104500 <memset>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
if(kmem.use_lock)
8010231f: 8b 15 94 26 11 80 mov 0x80112694,%edx
80102325: 85 d2 test %edx,%edx
80102327: 75 37 jne 80102360 <kfree+0x80>
acquire(&kmem.lock);
r = (struct run*)v;
r->next = kmem.freelist;
80102329: a1 98 26 11 80 mov 0x80112698,%eax
8010232e: 89 03 mov %eax,(%ebx)
kmem.freelist = r;
if(kmem.use_lock)
80102330: a1 94 26 11 80 mov 0x80112694,%eax
if(kmem.use_lock)
acquire(&kmem.lock);
r = (struct run*)v;
r->next = kmem.freelist;
kmem.freelist = r;
80102335: 89 1d 98 26 11 80 mov %ebx,0x80112698
if(kmem.use_lock)
8010233b: 85 c0 test %eax,%eax
8010233d: 75 09 jne 80102348 <kfree+0x68>
release(&kmem.lock);
}
8010233f: 83 c4 14 add $0x14,%esp
80102342: 5b pop %ebx
80102343: 5d pop %ebp
80102344: c3 ret
80102345: 8d 76 00 lea 0x0(%esi),%esi
acquire(&kmem.lock);
r = (struct run*)v;
r->next = kmem.freelist;
kmem.freelist = r;
if(kmem.use_lock)
release(&kmem.lock);
80102348: c7 45 08 60 26 11 80 movl $0x80112660,0x8(%ebp)
}
8010234f: 83 c4 14 add $0x14,%esp
80102352: 5b pop %ebx
80102353: 5d pop %ebp
acquire(&kmem.lock);
r = (struct run*)v;
r->next = kmem.freelist;
kmem.freelist = r;
if(kmem.use_lock)
release(&kmem.lock);
<<<<<<< HEAD
8010232b: e9 c0 23 00 00 jmp 801046f0 <release>
=======
80102354: e9 57 21 00 00 jmp 801044b0 <release>
80102359: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// Fill with junk to catch dangling refs.
memset(v, 1, PGSIZE);
if(kmem.use_lock)
acquire(&kmem.lock);
<<<<<<< HEAD
80102330: 83 ec 0c sub $0xc,%esp
80102333: 68 60 26 11 80 push $0x80112660
80102338: e8 d3 21 00 00 call 80104510 <acquire>
8010233d: 83 c4 10 add $0x10,%esp
80102340: eb c2 jmp 80102304 <kfree+0x44>
=======
80102360: c7 04 24 60 26 11 80 movl $0x80112660,(%esp)
80102367: e8 14 20 00 00 call 80104380 <acquire>
8010236c: eb bb jmp 80102329 <kfree+0x49>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
kfree(char *v)
{
struct run *r;
if((uint)v % PGSIZE || v < end || V2P(v) >= PHYSTOP)
panic("kfree");
<<<<<<< HEAD
80102342: 83 ec 0c sub $0xc,%esp
80102345: 68 92 75 10 80 push $0x80107592
8010234a: e8 21 e0 ff ff call 80100370 <panic>
8010234f: 90 nop
=======
8010236e: c7 04 24 12 73 10 80 movl $0x80107312,(%esp)
80102375: e8 e6 df ff ff call 80100360 <panic>
8010237a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
80102380 <freerange>:
kmem.use_lock = 1;
}
void
freerange(void *vstart, void *vend)
{
80102380: 55 push %ebp
80102381: 89 e5 mov %esp,%ebp
80102383: 56 push %esi
80102384: 53 push %ebx
80102385: 83 ec 10 sub $0x10,%esp
char *p;
p = (char*)PGROUNDUP((uint)vstart);
80102388: 8b 45 08 mov 0x8(%ebp),%eax
kmem.use_lock = 1;
}
void
freerange(void *vstart, void *vend)
{
8010238b: 8b 75 0c mov 0xc(%ebp),%esi
char *p;
p = (char*)PGROUNDUP((uint)vstart);
8010238e: 8d 90 ff 0f 00 00 lea 0xfff(%eax),%edx
80102394: 81 e2 00 f0 ff ff and $0xfffff000,%edx
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
8010239a: 8d 9a 00 10 00 00 lea 0x1000(%edx),%ebx
801023a0: 39 de cmp %ebx,%esi
801023a2: 73 08 jae 801023ac <freerange+0x2c>
801023a4: eb 18 jmp 801023be <freerange+0x3e>
801023a6: 66 90 xchg %ax,%ax
801023a8: 89 da mov %ebx,%edx
801023aa: 89 c3 mov %eax,%ebx
kfree(p);
801023ac: 89 14 24 mov %edx,(%esp)
801023af: e8 2c ff ff ff call 801022e0 <kfree>
void
freerange(void *vstart, void *vend)
{
char *p;
p = (char*)PGROUNDUP((uint)vstart);
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
801023b4: 8d 83 00 10 00 00 lea 0x1000(%ebx),%eax
801023ba: 39 f0 cmp %esi,%eax
801023bc: 76 ea jbe 801023a8 <freerange+0x28>
kfree(p);
}
801023be: 83 c4 10 add $0x10,%esp
801023c1: 5b pop %ebx
801023c2: 5e pop %esi
801023c3: 5d pop %ebp
801023c4: c3 ret
801023c5: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801023c9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801023d0 <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)
{
801023d0: 55 push %ebp
801023d1: 89 e5 mov %esp,%ebp
801023d3: 56 push %esi
801023d4: 53 push %ebx
801023d5: 83 ec 10 sub $0x10,%esp
801023d8: 8b 75 0c mov 0xc(%ebp),%esi
initlock(&kmem.lock, "kmem");
<<<<<<< HEAD
801023a8: 83 ec 08 sub $0x8,%esp
801023ab: 68 98 75 10 80 push $0x80107598
801023b0: 68 60 26 11 80 push $0x80112660
801023b5: e8 36 21 00 00 call 801044f0 <initlock>
=======
801023db: c7 44 24 04 18 73 10 movl $0x80107318,0x4(%esp)
801023e2: 80
801023e3: c7 04 24 60 26 11 80 movl $0x80112660,(%esp)
801023ea: e8 11 1f 00 00 call 80104300 <initlock>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
void
freerange(void *vstart, void *vend)
{
char *p;
p = (char*)PGROUNDUP((uint)vstart);
801023ef: 8b 45 08 mov 0x8(%ebp),%eax
// after installing a full page table that maps them on all cores.
void
kinit1(void *vstart, void *vend)
{
initlock(&kmem.lock, "kmem");
kmem.use_lock = 0;
801023f2: c7 05 94 26 11 80 00 movl $0x0,0x80112694
801023f9: 00 00 00
void
freerange(void *vstart, void *vend)
{
char *p;
p = (char*)PGROUNDUP((uint)vstart);
801023fc: 8d 90 ff 0f 00 00 lea 0xfff(%eax),%edx
80102402: 81 e2 00 f0 ff ff and $0xfffff000,%edx
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
80102408: 8d 9a 00 10 00 00 lea 0x1000(%edx),%ebx
8010240e: 39 de cmp %ebx,%esi
80102410: 73 0a jae 8010241c <kinit1+0x4c>
80102412: eb 1a jmp 8010242e <kinit1+0x5e>
80102414: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80102418: 89 da mov %ebx,%edx
8010241a: 89 c3 mov %eax,%ebx
kfree(p);
8010241c: 89 14 24 mov %edx,(%esp)
8010241f: e8 bc fe ff ff call 801022e0 <kfree>
void
freerange(void *vstart, void *vend)
{
char *p;
p = (char*)PGROUNDUP((uint)vstart);
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
80102424: 8d 83 00 10 00 00 lea 0x1000(%ebx),%eax
8010242a: 39 c6 cmp %eax,%esi
8010242c: 73 ea jae 80102418 <kinit1+0x48>
kinit1(void *vstart, void *vend)
{
initlock(&kmem.lock, "kmem");
kmem.use_lock = 0;
freerange(vstart, vend);
}
8010242e: 83 c4 10 add $0x10,%esp
80102431: 5b pop %ebx
80102432: 5e pop %esi
80102433: 5d pop %ebp
80102434: c3 ret
80102435: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80102439: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80102440 <kinit2>:
void
kinit2(void *vstart, void *vend)
{
80102440: 55 push %ebp
80102441: 89 e5 mov %esp,%ebp
80102443: 56 push %esi
80102444: 53 push %ebx
80102445: 83 ec 10 sub $0x10,%esp
void
freerange(void *vstart, void *vend)
{
char *p;
p = (char*)PGROUNDUP((uint)vstart);
80102448: 8b 45 08 mov 0x8(%ebp),%eax
freerange(vstart, vend);
}
void
kinit2(void *vstart, void *vend)
{
8010244b: 8b 75 0c mov 0xc(%ebp),%esi
void
freerange(void *vstart, void *vend)
{
char *p;
p = (char*)PGROUNDUP((uint)vstart);
8010244e: 8d 90 ff 0f 00 00 lea 0xfff(%eax),%edx
80102454: 81 e2 00 f0 ff ff and $0xfffff000,%edx
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
8010245a: 8d 9a 00 10 00 00 lea 0x1000(%edx),%ebx
80102460: 39 de cmp %ebx,%esi
80102462: 73 08 jae 8010246c <kinit2+0x2c>
80102464: eb 18 jmp 8010247e <kinit2+0x3e>
80102466: 66 90 xchg %ax,%ax
80102468: 89 da mov %ebx,%edx
8010246a: 89 c3 mov %eax,%ebx
kfree(p);
8010246c: 89 14 24 mov %edx,(%esp)
8010246f: e8 6c fe ff ff call 801022e0 <kfree>
void
freerange(void *vstart, void *vend)
{
char *p;
p = (char*)PGROUNDUP((uint)vstart);
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
80102474: 8d 83 00 10 00 00 lea 0x1000(%ebx),%eax
8010247a: 39 c6 cmp %eax,%esi
8010247c: 73 ea jae 80102468 <kinit2+0x28>
void
kinit2(void *vstart, void *vend)
{
freerange(vstart, vend);
kmem.use_lock = 1;
8010247e: c7 05 94 26 11 80 01 movl $0x1,0x80112694
80102485: 00 00 00
}
80102488: 83 c4 10 add $0x10,%esp
8010248b: 5b pop %ebx
8010248c: 5e pop %esi
8010248d: 5d pop %ebp
8010248e: c3 ret
8010248f: 90 nop
80102490 <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)
{
80102490: 55 push %ebp
80102491: 89 e5 mov %esp,%ebp
80102493: 53 push %ebx
80102494: 83 ec 14 sub $0x14,%esp
struct run *r;
if(kmem.use_lock)
80102497: a1 94 26 11 80 mov 0x80112694,%eax
8010249c: 85 c0 test %eax,%eax
8010249e: 75 30 jne 801024d0 <kalloc+0x40>
acquire(&kmem.lock);
r = kmem.freelist;
801024a0: 8b 1d 98 26 11 80 mov 0x80112698,%ebx
if(r)
801024a6: 85 db test %ebx,%ebx
801024a8: 74 08 je 801024b2 <kalloc+0x22>
kmem.freelist = r->next;
801024aa: 8b 13 mov (%ebx),%edx
801024ac: 89 15 98 26 11 80 mov %edx,0x80112698
if(kmem.use_lock)
801024b2: 85 c0 test %eax,%eax
801024b4: 74 0c je 801024c2 <kalloc+0x32>
release(&kmem.lock);
<<<<<<< HEAD
80102496: 83 ec 0c sub $0xc,%esp
80102499: 68 60 26 11 80 push $0x80112660
8010249e: e8 4d 22 00 00 call 801046f0 <release>
801024a3: 83 c4 10 add $0x10,%esp
=======
801024b6: c7 04 24 60 26 11 80 movl $0x80112660,(%esp)
801024bd: e8 ee 1f 00 00 call 801044b0 <release>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
return (char*)r;
}
801024c2: 83 c4 14 add $0x14,%esp
801024c5: 89 d8 mov %ebx,%eax
801024c7: 5b pop %ebx
801024c8: 5d pop %ebp
801024c9: c3 ret
801024ca: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
kalloc(void)
{
struct run *r;
if(kmem.use_lock)
acquire(&kmem.lock);
<<<<<<< HEAD
801024b0: 83 ec 0c sub $0xc,%esp
801024b3: 68 60 26 11 80 push $0x80112660
801024b8: e8 53 20 00 00 call 80104510 <acquire>
r = kmem.freelist;
801024bd: 8b 1d 98 26 11 80 mov 0x80112698,%ebx
if(r)
801024c3: 83 c4 10 add $0x10,%esp
801024c6: a1 94 26 11 80 mov 0x80112694,%eax
801024cb: 85 db test %ebx,%ebx
801024cd: 75 bb jne 8010248a <kalloc+0x1a>
801024cf: eb c1 jmp 80102492 <kalloc+0x22>
801024d1: 66 90 xchg %ax,%ax
801024d3: 66 90 xchg %ax,%ax
801024d5: 66 90 xchg %ax,%ax
801024d7: 66 90 xchg %ax,%ax
801024d9: 66 90 xchg %ax,%ax
801024db: 66 90 xchg %ax,%ax
801024dd: 66 90 xchg %ax,%ax
801024df: 90 nop
801024e0 <kbdgetc>:
#include "defs.h"
#include "kbd.h"
int
kbdgetc(void)
{
801024e0: 55 push %ebp
=======
801024d0: c7 04 24 60 26 11 80 movl $0x80112660,(%esp)
801024d7: e8 a4 1e 00 00 call 80104380 <acquire>
801024dc: a1 94 26 11 80 mov 0x80112694,%eax
801024e1: eb bd jmp 801024a0 <kalloc+0x10>
801024e3: 66 90 xchg %ax,%ax
801024e5: 66 90 xchg %ax,%ax
801024e7: 66 90 xchg %ax,%ax
801024e9: 66 90 xchg %ax,%ax
801024eb: 66 90 xchg %ax,%ax
801024ed: 66 90 xchg %ax,%ax
801024ef: 90 nop
801024f0 <kbdgetc>:
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
static inline uchar
inb(ushort port)
{
uchar data;
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
801024f0: ba 64 00 00 00 mov $0x64,%edx
801024f5: ec in (%dx),%al
normalmap, shiftmap, ctlmap, ctlmap
};
uint st, data, c;
st = inb(KBSTATP);
if((st & KBS_DIB) == 0)
801024f6: a8 01 test $0x1,%al
801024f8: 0f 84 ba 00 00 00 je 801025b8 <kbdgetc+0xc8>
801024fe: b2 60 mov $0x60,%dl
80102500: ec in (%dx),%al
return -1;
data = inb(KBDATAP);
80102501: 0f b6 c8 movzbl %al,%ecx
if(data == 0xE0){
80102504: 81 f9 e0 00 00 00 cmp $0xe0,%ecx
8010250a: 0f 84 88 00 00 00 je 80102598 <kbdgetc+0xa8>
shift |= E0ESC;
return 0;
} else if(data & 0x80){
80102510: 84 c0 test %al,%al
80102512: 79 2c jns 80102540 <kbdgetc+0x50>
// Key released
data = (shift & E0ESC ? data : data & 0x7F);
80102514: 8b 15 b4 a5 10 80 mov 0x8010a5b4,%edx
8010251a: f6 c2 40 test $0x40,%dl
8010251d: 75 05 jne 80102524 <kbdgetc+0x34>
8010251f: 89 c1 mov %eax,%ecx
80102521: 83 e1 7f and $0x7f,%ecx
shift &= ~(shiftcode[data] | E0ESC);
<<<<<<< HEAD
80102516: 0f b6 82 c0 76 10 80 movzbl -0x7fef8940(%edx),%eax
8010251d: 83 c8 40 or $0x40,%eax
80102520: 0f b6 c0 movzbl %al,%eax
80102523: f7 d0 not %eax
80102525: 21 c8 and %ecx,%eax
80102527: a3 b4 a5 10 80 mov %eax,0x8010a5b4
=======
80102524: 0f b6 81 40 74 10 80 movzbl -0x7fef8bc0(%ecx),%eax
8010252b: 83 c8 40 or $0x40,%eax
8010252e: 0f b6 c0 movzbl %al,%eax
80102531: f7 d0 not %eax
80102533: 21 d0 and %edx,%eax
80102535: a3 b4 a5 10 80 mov %eax,0x8010a5b4
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
return 0;
8010253a: 31 c0 xor %eax,%eax
8010253c: c3 ret
8010253d: 8d 76 00 lea 0x0(%esi),%esi
#include "defs.h"
#include "kbd.h"
int
kbdgetc(void)
{
80102540: 55 push %ebp
80102541: 89 e5 mov %esp,%ebp
80102543: 53 push %ebx
80102544: 8b 1d b4 a5 10 80 mov 0x8010a5b4,%ebx
} else if(data & 0x80){
// Key released
data = (shift & E0ESC ? data : data & 0x7F);
shift &= ~(shiftcode[data] | E0ESC);
return 0;
} else if(shift & E0ESC){
8010254a: f6 c3 40 test $0x40,%bl
8010254d: 74 09 je 80102558 <kbdgetc+0x68>
// Last character was an E0 escape; or with 0x80
data |= 0x80;
8010254f: 83 c8 80 or $0xffffff80,%eax
shift &= ~E0ESC;
80102552: 83 e3 bf and $0xffffffbf,%ebx
data = (shift & E0ESC ? data : data & 0x7F);
shift &= ~(shiftcode[data] | E0ESC);
return 0;
} else if(shift & E0ESC){
// Last character was an E0 escape; or with 0x80
data |= 0x80;
80102555: 0f b6 c8 movzbl %al,%ecx
shift &= ~E0ESC;
}
shift |= shiftcode[data];
80102558: 0f b6 91 40 74 10 80 movzbl -0x7fef8bc0(%ecx),%edx
shift ^= togglecode[data];
<<<<<<< HEAD
8010253e: 0f b6 82 c0 76 10 80 movzbl -0x7fef8940(%edx),%eax
80102545: 09 c1 or %eax,%ecx
80102547: 0f b6 82 c0 75 10 80 movzbl -0x7fef8a40(%edx),%eax
8010254e: 31 c1 xor %eax,%ecx
=======
8010255f: 0f b6 81 40 73 10 80 movzbl -0x7fef8cc0(%ecx),%eax
// Last character was an E0 escape; or with 0x80
data |= 0x80;
shift &= ~E0ESC;
}
shift |= shiftcode[data];
80102566: 09 da or %ebx,%edx
shift ^= togglecode[data];
80102568: 31 c2 xor %eax,%edx
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
c = charcode[shift & (CTL | SHIFT)][data];
8010256a: 89 d0 mov %edx,%eax
8010256c: 83 e0 03 and $0x3,%eax
8010256f: 8b 04 85 20 73 10 80 mov -0x7fef8ce0(,%eax,4),%eax
data |= 0x80;
shift &= ~E0ESC;
}
shift |= shiftcode[data];
shift ^= togglecode[data];
80102576: 89 15 b4 a5 10 80 mov %edx,0x8010a5b4
c = charcode[shift & (CTL | SHIFT)][data];
if(shift & CAPSLOCK){
8010257c: 83 e2 08 and $0x8,%edx
shift &= ~E0ESC;
}
shift |= shiftcode[data];
shift ^= togglecode[data];
c = charcode[shift & (CTL | SHIFT)][data];
<<<<<<< HEAD
8010255e: 8b 04 85 a0 75 10 80 mov -0x7fef8a60(,%eax,4),%eax
80102565: 0f b6 04 10 movzbl (%eax,%edx,1),%eax
=======
8010257f: 0f b6 04 08 movzbl (%eax,%ecx,1),%eax
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
if(shift & CAPSLOCK){
80102583: 74 0b je 80102590 <kbdgetc+0xa0>
if('a' <= c && c <= 'z')
80102585: 8d 50 9f lea -0x61(%eax),%edx
80102588: 83 fa 19 cmp $0x19,%edx
8010258b: 77 1b ja 801025a8 <kbdgetc+0xb8>
c += 'A' - 'a';
8010258d: 83 e8 20 sub $0x20,%eax
else if('A' <= c && c <= 'Z')
c += 'a' - 'A';
}
return c;
}
80102590: 5b pop %ebx
80102591: 5d pop %ebp
80102592: c3 ret
80102593: 90 nop
80102594: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if((st & KBS_DIB) == 0)
return -1;
data = inb(KBDATAP);
if(data == 0xE0){
shift |= E0ESC;
80102598: 83 0d b4 a5 10 80 40 orl $0x40,0x8010a5b4
return 0;
8010259f: 31 c0 xor %eax,%eax
801025a1: c3 ret
801025a2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
shift ^= togglecode[data];
c = charcode[shift & (CTL | SHIFT)][data];
if(shift & CAPSLOCK){
if('a' <= c && c <= 'z')
c += 'A' - 'a';
else if('A' <= c && c <= 'Z')
801025a8: 8d 48 bf lea -0x41(%eax),%ecx
c += 'a' - 'A';
801025ab: 8d 50 20 lea 0x20(%eax),%edx
801025ae: 83 f9 19 cmp $0x19,%ecx
801025b1: 0f 46 c2 cmovbe %edx,%eax
}
return c;
801025b4: eb da jmp 80102590 <kbdgetc+0xa0>
801025b6: 66 90 xchg %ax,%ax
};
uint st, data, c;
st = inb(KBSTATP);
if((st & KBS_DIB) == 0)
return -1;
801025b8: b8 ff ff ff ff mov $0xffffffff,%eax
801025bd: c3 ret
801025be: 66 90 xchg %ax,%ax
801025c0 <kbdintr>:
return c;
}
void
kbdintr(void)
{
801025c0: 55 push %ebp
801025c1: 89 e5 mov %esp,%ebp
801025c3: 83 ec 18 sub $0x18,%esp
consoleintr(kbdgetc);
801025c6: c7 04 24 f0 24 10 80 movl $0x801024f0,(%esp)
801025cd: e8 de e1 ff ff call 801007b0 <consoleintr>
}
801025d2: c9 leave
801025d3: c3 ret
801025d4: 66 90 xchg %ax,%ax
801025d6: 66 90 xchg %ax,%ax
801025d8: 66 90 xchg %ax,%ax
801025da: 66 90 xchg %ax,%ax
801025dc: 66 90 xchg %ax,%ax
801025de: 66 90 xchg %ax,%ax
801025e0 <fill_rtcdate>:
return inb(CMOS_RETURN);
}
static void fill_rtcdate(struct rtcdate *r)
{
801025e0: 55 push %ebp
801025e1: 89 c1 mov %eax,%ecx
801025e3: 89 e5 mov %esp,%ebp
}
static inline void
outb(ushort port, uchar data)
{
asm volatile("out %0,%1" : : "a" (data), "d" (port));
801025e5: ba 70 00 00 00 mov $0x70,%edx
801025ea: 53 push %ebx
801025eb: 31 c0 xor %eax,%eax
801025ed: ee out %al,(%dx)
static inline uchar
inb(ushort port)
{
uchar data;
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
801025ee: bb 71 00 00 00 mov $0x71,%ebx
801025f3: 89 da mov %ebx,%edx
801025f5: ec in (%dx),%al
static uint cmos_read(uint reg)
{
outb(CMOS_PORT, reg);
microdelay(200);
return inb(CMOS_RETURN);
801025f6: 0f b6 c0 movzbl %al,%eax
}
static inline void
outb(ushort port, uchar data)
{
asm volatile("out %0,%1" : : "a" (data), "d" (port));
801025f9: b2 70 mov $0x70,%dl
801025fb: 89 01 mov %eax,(%ecx)
801025fd: b8 02 00 00 00 mov $0x2,%eax
80102602: ee out %al,(%dx)
static inline uchar
inb(ushort port)
{
uchar data;
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102603: 89 da mov %ebx,%edx
80102605: ec in (%dx),%al
80102606: 0f b6 c0 movzbl %al,%eax
}
static inline void
outb(ushort port, uchar data)
{
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80102609: b2 70 mov $0x70,%dl
8010260b: 89 41 04 mov %eax,0x4(%ecx)
8010260e: b8 04 00 00 00 mov $0x4,%eax
80102613: ee out %al,(%dx)
static inline uchar
inb(ushort port)
{
uchar data;
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102614: 89 da mov %ebx,%edx
80102616: ec in (%dx),%al
80102617: 0f b6 c0 movzbl %al,%eax
}
static inline void
outb(ushort port, uchar data)
{
asm volatile("out %0,%1" : : "a" (data), "d" (port));
8010261a: b2 70 mov $0x70,%dl
8010261c: 89 41 08 mov %eax,0x8(%ecx)
8010261f: b8 07 00 00 00 mov $0x7,%eax
80102624: ee out %al,(%dx)
static inline uchar
inb(ushort port)
{
uchar data;
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102625: 89 da mov %ebx,%edx
80102627: ec in (%dx),%al
80102628: 0f b6 c0 movzbl %al,%eax
}
static inline void
outb(ushort port, uchar data)
{
asm volatile("out %0,%1" : : "a" (data), "d" (port));
8010262b: b2 70 mov $0x70,%dl
8010262d: 89 41 0c mov %eax,0xc(%ecx)
80102630: b8 08 00 00 00 mov $0x8,%eax
80102635: ee out %al,(%dx)
static inline uchar
inb(ushort port)
{
uchar data;
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102636: 89 da mov %ebx,%edx
80102638: ec in (%dx),%al
80102639: 0f b6 c0 movzbl %al,%eax
}
static inline void
outb(ushort port, uchar data)
{
asm volatile("out %0,%1" : : "a" (data), "d" (port));
8010263c: b2 70 mov $0x70,%dl
8010263e: 89 41 10 mov %eax,0x10(%ecx)
80102641: b8 09 00 00 00 mov $0x9,%eax
80102646: ee out %al,(%dx)
static inline uchar
inb(ushort port)
{
uchar data;
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102647: 89 da mov %ebx,%edx
80102649: ec in (%dx),%al
8010264a: 0f b6 d8 movzbl %al,%ebx
8010264d: 89 59 14 mov %ebx,0x14(%ecx)
r->minute = cmos_read(MINS);
r->hour = cmos_read(HOURS);
r->day = cmos_read(DAY);
r->month = cmos_read(MONTH);
r->year = cmos_read(YEAR);
}
80102650: 5b pop %ebx
80102651: 5d pop %ebp
80102652: c3 ret
80102653: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80102659: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80102660 <lapicinit>:
//PAGEBREAK!
void
lapicinit(void)
{
if(!lapic)
80102660: a1 9c 26 11 80 mov 0x8011269c,%eax
}
//PAGEBREAK!
void
lapicinit(void)
{
80102665: 55 push %ebp
80102666: 89 e5 mov %esp,%ebp
if(!lapic)
80102668: 85 c0 test %eax,%eax
8010266a: 0f 84 c0 00 00 00 je 80102730 <lapicinit+0xd0>
volatile uint *lapic; // Initialized in mp.c
static void
lapicw(int index, int value)
{
lapic[index] = value;
80102670: c7 80 f0 00 00 00 3f movl $0x13f,0xf0(%eax)
80102677: 01 00 00
lapic[ID]; // wait for write to finish, by reading
8010267a: 8b 50 20 mov 0x20(%eax),%edx
volatile uint *lapic; // Initialized in mp.c
static void
lapicw(int index, int value)
{
lapic[index] = value;
8010267d: c7 80 e0 03 00 00 0b movl $0xb,0x3e0(%eax)
80102684: 00 00 00
lapic[ID]; // wait for write to finish, by reading
80102687: 8b 50 20 mov 0x20(%eax),%edx
volatile uint *lapic; // Initialized in mp.c
static void
lapicw(int index, int value)
{
lapic[index] = value;
8010268a: c7 80 20 03 00 00 20 movl $0x20020,0x320(%eax)
80102691: 00 02 00
lapic[ID]; // wait for write to finish, by reading
80102694: 8b 50 20 mov 0x20(%eax),%edx
volatile uint *lapic; // Initialized in mp.c
static void
lapicw(int index, int value)
{
lapic[index] = value;
80102697: c7 80 80 03 00 00 80 movl $0x989680,0x380(%eax)
8010269e: 96 98 00
lapic[ID]; // wait for write to finish, by reading
801026a1: 8b 50 20 mov 0x20(%eax),%edx
volatile uint *lapic; // Initialized in mp.c
static void
lapicw(int index, int value)
{
lapic[index] = value;
801026a4: c7 80 50 03 00 00 00 movl $0x10000,0x350(%eax)
801026ab: 00 01 00
lapic[ID]; // wait for write to finish, by reading
801026ae: 8b 50 20 mov 0x20(%eax),%edx
volatile uint *lapic; // Initialized in mp.c
static void
lapicw(int index, int value)
{
lapic[index] = value;
801026b1: c7 80 60 03 00 00 00 movl $0x10000,0x360(%eax)
801026b8: 00 01 00
lapic[ID]; // wait for write to finish, by reading
801026bb: 8b 50 20 mov 0x20(%eax),%edx
lapicw(LINT0, MASKED);
lapicw(LINT1, MASKED);
// Disable performance counter overflow interrupts
// on machines that provide that interrupt entry.
if(((lapic[VER]>>16) & 0xFF) >= 4)
801026be: 8b 50 30 mov 0x30(%eax),%edx
801026c1: c1 ea 10 shr $0x10,%edx
801026c4: 80 fa 03 cmp $0x3,%dl
801026c7: 77 6f ja 80102738 <lapicinit+0xd8>
volatile uint *lapic; // Initialized in mp.c
static void
lapicw(int index, int value)
{
lapic[index] = value;
801026c9: c7 80 70 03 00 00 33 movl $0x33,0x370(%eax)
801026d0: 00 00 00
lapic[ID]; // wait for write to finish, by reading
801026d3: 8b 50 20 mov 0x20(%eax),%edx
volatile uint *lapic; // Initialized in mp.c
static void
lapicw(int index, int value)
{
lapic[index] = value;
801026d6: c7 80 80 02 00 00 00 movl $0x0,0x280(%eax)
801026dd: 00 00 00
lapic[ID]; // wait for write to finish, by reading
801026e0: 8b 50 20 mov 0x20(%eax),%edx
volatile uint *lapic; // Initialized in mp.c
static void
lapicw(int index, int value)
{
lapic[index] = value;
801026e3: c7 80 80 02 00 00 00 movl $0x0,0x280(%eax)
801026ea: 00 00 00
lapic[ID]; // wait for write to finish, by reading
801026ed: 8b 50 20 mov 0x20(%eax),%edx
volatile uint *lapic; // Initialized in mp.c
static void
lapicw(int index, int value)
{
lapic[index] = value;
801026f0: c7 80 b0 00 00 00 00 movl $0x0,0xb0(%eax)
801026f7: 00 00 00
lapic[ID]; // wait for write to finish, by reading
801026fa: 8b 50 20 mov 0x20(%eax),%edx
volatile uint *lapic; // Initialized in mp.c
static void
lapicw(int index, int value)
{
lapic[index] = value;
801026fd: c7 80 10 03 00 00 00 movl $0x0,0x310(%eax)
80102704: 00 00 00
lapic[ID]; // wait for write to finish, by reading
80102707: 8b 50 20 mov 0x20(%eax),%edx
volatile uint *lapic; // Initialized in mp.c
static void
lapicw(int index, int value)
{
lapic[index] = value;
8010270a: c7 80 00 03 00 00 00 movl $0x88500,0x300(%eax)
80102711: 85 08 00
lapic[ID]; // wait for write to finish, by reading
80102714: 8b 50 20 mov 0x20(%eax),%edx
80102717: 90 nop
lapicw(EOI, 0);
// Send an Init Level De-Assert to synchronise arbitration ID's.
lapicw(ICRHI, 0);
lapicw(ICRLO, BCAST | INIT | LEVEL);
while(lapic[ICRLO] & DELIVS)
80102718: 8b 90 00 03 00 00 mov 0x300(%eax),%edx
8010271e: 80 e6 10 and $0x10,%dh
80102721: 75 f5 jne 80102718 <lapicinit+0xb8>
volatile uint *lapic; // Initialized in mp.c
static void
lapicw(int index, int value)
{
lapic[index] = value;
80102723: c7 80 80 00 00 00 00 movl $0x0,0x80(%eax)
8010272a: 00 00 00
lapic[ID]; // wait for write to finish, by reading
8010272d: 8b 40 20 mov 0x20(%eax),%eax
while(lapic[ICRLO] & DELIVS)
;
// Enable interrupts on the APIC (but not on the processor).
lapicw(TPR, 0);
}
80102730: 5d pop %ebp
80102731: c3 ret
80102732: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
volatile uint *lapic; // Initialized in mp.c
static void
lapicw(int index, int value)
{
lapic[index] = value;
80102738: c7 80 40 03 00 00 00 movl $0x10000,0x340(%eax)
8010273f: 00 01 00
lapic[ID]; // wait for write to finish, by reading
80102742: 8b 50 20 mov 0x20(%eax),%edx
80102745: eb 82 jmp 801026c9 <lapicinit+0x69>
80102747: 89 f6 mov %esi,%esi
80102749: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80102750 <cpunum>:
lapicw(TPR, 0);
}
int
cpunum(void)
{
80102750: 55 push %ebp
80102751: 89 e5 mov %esp,%ebp
80102753: 56 push %esi
80102754: 53 push %ebx
80102755: 83 ec 10 sub $0x10,%esp
static inline uint
readeflags(void)
{
uint eflags;
asm volatile("pushfl; popl %0" : "=r" (eflags));
80102758: 9c pushf
80102759: 58 pop %eax
// 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){
8010275a: f6 c4 02 test $0x2,%ah
8010275d: 74 12 je 80102771 <cpunum+0x21>
static int n;
if(n++ == 0)
8010275f: a1 b8 a5 10 80 mov 0x8010a5b8,%eax
80102764: 8d 50 01 lea 0x1(%eax),%edx
80102767: 85 c0 test %eax,%eax
80102769: 89 15 b8 a5 10 80 mov %edx,0x8010a5b8
8010276f: 74 4a je 801027bb <cpunum+0x6b>
cprintf("cpu called from %x with interrupts enabled\n",
__builtin_return_address(0));
}
if (!lapic)
80102771: a1 9c 26 11 80 mov 0x8011269c,%eax
80102776: 85 c0 test %eax,%eax
80102778: 74 5d je 801027d7 <cpunum+0x87>
return 0;
apicid = lapic[ID] >> 24;
8010277a: 8b 58 20 mov 0x20(%eax),%ebx
for (i = 0; i < ncpu; ++i) {
8010277d: 8b 35 80 2d 11 80 mov 0x80112d80,%esi
}
if (!lapic)
return 0;
apicid = lapic[ID] >> 24;
80102783: c1 eb 18 shr $0x18,%ebx
for (i = 0; i < ncpu; ++i) {
80102786: 85 f6 test %esi,%esi
80102788: 7e 56 jle 801027e0 <cpunum+0x90>
if (cpus[i].apicid == apicid)
8010278a: 0f b6 05 a0 27 11 80 movzbl 0x801127a0,%eax
80102791: 39 d8 cmp %ebx,%eax
80102793: 74 42 je 801027d7 <cpunum+0x87>
80102795: ba 5c 28 11 80 mov $0x8011285c,%edx
if (!lapic)
return 0;
apicid = lapic[ID] >> 24;
for (i = 0; i < ncpu; ++i) {
8010279a: 31 c0 xor %eax,%eax
8010279c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801027a0: 83 c0 01 add $0x1,%eax
801027a3: 39 f0 cmp %esi,%eax
801027a5: 74 39 je 801027e0 <cpunum+0x90>
if (cpus[i].apicid == apicid)
801027a7: 0f b6 0a movzbl (%edx),%ecx
801027aa: 81 c2 bc 00 00 00 add $0xbc,%edx
801027b0: 39 d9 cmp %ebx,%ecx
801027b2: 75 ec jne 801027a0 <cpunum+0x50>
return i;
}
panic("unknown apicid\n");
}
<<<<<<< HEAD
80102734: 8d 65 f8 lea -0x8(%ebp),%esp
80102737: 5b pop %ebx
80102738: 5e pop %esi
80102739: 5d pop %ebp
8010273a: c3 ret
// almost everything, including cprintf and panic, calls cpu,
// often indirectly through acquire and release.
if(readeflags()&FL_IF){
static int n;
if(n++ == 0)
cprintf("cpu called from %x with interrupts enabled\n",
8010273b: 83 ec 08 sub $0x8,%esp
8010273e: ff 75 04 pushl 0x4(%ebp)
80102741: 68 c0 77 10 80 push $0x801077c0
80102746: e8 15 df ff ff call 80100660 <cprintf>
__builtin_return_address(0));
}
if (!lapic)
8010274b: a1 9c 26 11 80 mov 0x8011269c,%eax
=======
801027b4: 83 c4 10 add $0x10,%esp
801027b7: 5b pop %ebx
801027b8: 5e pop %esi
801027b9: 5d pop %ebp
801027ba: c3 ret
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// almost everything, including cprintf and panic, calls cpu,
// often indirectly through acquire and release.
if(readeflags()&FL_IF){
static int n;
if(n++ == 0)
cprintf("cpu called from %x with interrupts enabled\n",
801027bb: 8b 45 04 mov 0x4(%ebp),%eax
801027be: c7 04 24 40 75 10 80 movl $0x80107540,(%esp)
801027c5: 89 44 24 04 mov %eax,0x4(%esp)
801027c9: e8 82 de ff ff call 80100650 <cprintf>
__builtin_return_address(0));
}
if (!lapic)
801027ce: a1 9c 26 11 80 mov 0x8011269c,%eax
801027d3: 85 c0 test %eax,%eax
801027d5: 75 a3 jne 8010277a <cpunum+0x2a>
for (i = 0; i < ncpu; ++i) {
if (cpus[i].apicid == apicid)
return i;
}
panic("unknown apicid\n");
}
801027d7: 83 c4 10 add $0x10,%esp
cprintf("cpu called from %x with interrupts enabled\n",
__builtin_return_address(0));
}
if (!lapic)
return 0;
801027da: 31 c0 xor %eax,%eax
for (i = 0; i < ncpu; ++i) {
if (cpus[i].apicid == apicid)
return i;
}
panic("unknown apicid\n");
}
801027dc: 5b pop %ebx
801027dd: 5e pop %esi
801027de: 5d pop %ebp
801027df: c3 ret
apicid = lapic[ID] >> 24;
for (i = 0; i < ncpu; ++i) {
if (cpus[i].apicid == apicid)
return i;
}
panic("unknown apicid\n");
<<<<<<< HEAD
80102760: 83 ec 0c sub $0xc,%esp
80102763: 68 ec 77 10 80 push $0x801077ec
80102768: e8 03 dc ff ff call 80100370 <panic>
8010276d: 8d 76 00 lea 0x0(%esi),%esi
=======
801027e0: c7 04 24 6c 75 10 80 movl $0x8010756c,(%esp)
801027e7: e8 74 db ff ff call 80100360 <panic>
801027ec: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
801027f0 <lapiceoi>:
// Acknowledge interrupt.
void
lapiceoi(void)
{
if(lapic)
801027f0: a1 9c 26 11 80 mov 0x8011269c,%eax
}
// Acknowledge interrupt.
void
lapiceoi(void)
{
801027f5: 55 push %ebp
801027f6: 89 e5 mov %esp,%ebp
if(lapic)
801027f8: 85 c0 test %eax,%eax
801027fa: 74 0d je 80102809 <lapiceoi+0x19>
volatile uint *lapic; // Initialized in mp.c
static void
lapicw(int index, int value)
{
lapic[index] = value;
801027fc: c7 80 b0 00 00 00 00 movl $0x0,0xb0(%eax)
80102803: 00 00 00
lapic[ID]; // wait for write to finish, by reading
80102806: 8b 40 20 mov 0x20(%eax),%eax
void
lapiceoi(void)
{
if(lapic)
lapicw(EOI, 0);
}
80102809: 5d pop %ebp
8010280a: c3 ret
8010280b: 90 nop
8010280c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80102810 <microdelay>:
// Spin for a given number of microseconds.
// On real hardware would want to tune this dynamically.
void
microdelay(int us)
{
80102810: 55 push %ebp
80102811: 89 e5 mov %esp,%ebp
}
80102813: 5d pop %ebp
80102814: c3 ret
80102815: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80102819: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80102820 <lapicstartap>:
// Start additional processor running entry code at addr.
// See Appendix B of MultiProcessor Specification.
void
lapicstartap(uchar apicid, uint addr)
{
80102820: 55 push %ebp
}
static inline void
outb(ushort port, uchar data)
{
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80102821: ba 70 00 00 00 mov $0x70,%edx
80102826: 89 e5 mov %esp,%ebp
80102828: b8 0f 00 00 00 mov $0xf,%eax
8010282d: 53 push %ebx
8010282e: 8b 4d 08 mov 0x8(%ebp),%ecx
80102831: 8b 5d 0c mov 0xc(%ebp),%ebx
80102834: ee out %al,(%dx)
80102835: b8 0a 00 00 00 mov $0xa,%eax
8010283a: b2 71 mov $0x71,%dl
8010283c: ee out %al,(%dx)
// and the warm reset vector (DWORD based at 40:67) to point at
// the AP startup code prior to the [universal startup algorithm]."
outb(CMOS_PORT, 0xF); // offset 0xF is shutdown code
outb(CMOS_PORT+1, 0x0A);
wrv = (ushort*)P2V((0x40<<4 | 0x67)); // Warm reset vector
wrv[0] = 0;
8010283d: 31 c0 xor %eax,%eax
8010283f: 66 a3 67 04 00 80 mov %ax,0x80000467
wrv[1] = addr >> 4;
80102845: 89 d8 mov %ebx,%eax
80102847: c1 e8 04 shr $0x4,%eax
8010284a: 66 a3 69 04 00 80 mov %ax,0x80000469
volatile uint *lapic; // Initialized in mp.c
static void
lapicw(int index, int value)
{
lapic[index] = value;
80102850: a1 9c 26 11 80 mov 0x8011269c,%eax
wrv[0] = 0;
wrv[1] = addr >> 4;
// "Universal startup algorithm."
// Send INIT (level-triggered) interrupt to reset other CPU.
lapicw(ICRHI, apicid<<24);
80102855: c1 e1 18 shl $0x18,%ecx
// 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++){
lapicw(ICRHI, apicid<<24);
lapicw(ICRLO, STARTUP | (addr>>12));
80102858: c1 eb 0c shr $0xc,%ebx
volatile uint *lapic; // Initialized in mp.c
static void
lapicw(int index, int value)
{
lapic[index] = value;
8010285b: 89 88 10 03 00 00 mov %ecx,0x310(%eax)
lapic[ID]; // wait for write to finish, by reading
80102861: 8b 50 20 mov 0x20(%eax),%edx
volatile uint *lapic; // Initialized in mp.c
static void
lapicw(int index, int value)
{
lapic[index] = value;
80102864: c7 80 00 03 00 00 00 movl $0xc500,0x300(%eax)
8010286b: c5 00 00
lapic[ID]; // wait for write to finish, by reading
8010286e: 8b 50 20 mov 0x20(%eax),%edx
volatile uint *lapic; // Initialized in mp.c
static void
lapicw(int index, int value)
{
lapic[index] = value;
80102871: c7 80 00 03 00 00 00 movl $0x8500,0x300(%eax)
80102878: 85 00 00
lapic[ID]; // wait for write to finish, by reading
8010287b: 8b 50 20 mov 0x20(%eax),%edx
volatile uint *lapic; // Initialized in mp.c
static void
lapicw(int index, int value)
{
lapic[index] = value;
8010287e: 89 88 10 03 00 00 mov %ecx,0x310(%eax)
lapic[ID]; // wait for write to finish, by reading
80102884: 8b 50 20 mov 0x20(%eax),%edx
// 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++){
lapicw(ICRHI, apicid<<24);
lapicw(ICRLO, STARTUP | (addr>>12));
80102887: 89 da mov %ebx,%edx
80102889: 80 ce 06 or $0x6,%dh
volatile uint *lapic; // Initialized in mp.c
static void
lapicw(int index, int value)
{
lapic[index] = value;
8010288c: 89 90 00 03 00 00 mov %edx,0x300(%eax)
lapic[ID]; // wait for write to finish, by reading
80102892: 8b 58 20 mov 0x20(%eax),%ebx
volatile uint *lapic; // Initialized in mp.c
static void
lapicw(int index, int value)
{
lapic[index] = value;
80102895: 89 88 10 03 00 00 mov %ecx,0x310(%eax)
lapic[ID]; // wait for write to finish, by reading
8010289b: 8b 48 20 mov 0x20(%eax),%ecx
volatile uint *lapic; // Initialized in mp.c
static void
lapicw(int index, int value)
{
lapic[index] = value;
8010289e: 89 90 00 03 00 00 mov %edx,0x300(%eax)
lapic[ID]; // wait for write to finish, by reading
801028a4: 8b 40 20 mov 0x20(%eax),%eax
for(i = 0; i < 2; i++){
lapicw(ICRHI, apicid<<24);
lapicw(ICRLO, STARTUP | (addr>>12));
microdelay(200);
}
}
801028a7: 5b pop %ebx
801028a8: 5d pop %ebp
801028a9: c3 ret
801028aa: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801028b0 <cmostime>:
r->year = cmos_read(YEAR);
}
// qemu seems to use 24-hour GWT and the values are BCD encoded
void cmostime(struct rtcdate *r)
{
801028b0: 55 push %ebp
801028b1: ba 70 00 00 00 mov $0x70,%edx
801028b6: 89 e5 mov %esp,%ebp
801028b8: b8 0b 00 00 00 mov $0xb,%eax
801028bd: 57 push %edi
801028be: 56 push %esi
801028bf: 53 push %ebx
801028c0: 83 ec 4c sub $0x4c,%esp
801028c3: ee out %al,(%dx)
static inline uchar
inb(ushort port)
{
uchar data;
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
801028c4: b2 71 mov $0x71,%dl
801028c6: ec in (%dx),%al
801028c7: 88 45 b7 mov %al,-0x49(%ebp)
801028ca: 8d 5d b8 lea -0x48(%ebp),%ebx
struct rtcdate t1, t2;
int sb, bcd;
sb = cmos_read(CMOS_STATB);
bcd = (sb & (1 << 2)) == 0;
801028cd: 80 65 b7 04 andb $0x4,-0x49(%ebp)
801028d1: 8d 7d d0 lea -0x30(%ebp),%edi
801028d4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
}
static inline void
outb(ushort port, uchar data)
{
asm volatile("out %0,%1" : : "a" (data), "d" (port));
801028d8: be 70 00 00 00 mov $0x70,%esi
// make sure CMOS doesn't modify time while we read it
for(;;) {
fill_rtcdate(&t1);
801028dd: 89 d8 mov %ebx,%eax
801028df: e8 fc fc ff ff call 801025e0 <fill_rtcdate>
801028e4: b8 0a 00 00 00 mov $0xa,%eax
801028e9: 89 f2 mov %esi,%edx
801028eb: ee out %al,(%dx)
static inline uchar
inb(ushort port)
{
uchar data;
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
801028ec: ba 71 00 00 00 mov $0x71,%edx
801028f1: ec in (%dx),%al
if(cmos_read(CMOS_STATA) & CMOS_UIP)
801028f2: 84 c0 test %al,%al
801028f4: 78 e7 js 801028dd <cmostime+0x2d>
continue;
fill_rtcdate(&t2);
801028f6: 89 f8 mov %edi,%eax
801028f8: e8 e3 fc ff ff call 801025e0 <fill_rtcdate>
if(memcmp(&t1, &t2, sizeof(t1)) == 0)
<<<<<<< HEAD
8010293d: 8d 45 b8 lea -0x48(%ebp),%eax
80102940: 6a 18 push $0x18
80102942: 56 push %esi
80102943: 50 push %eax
80102944: e8 47 1e 00 00 call 80104790 <memcmp>
80102949: 83 c4 10 add $0x10,%esp
8010294c: 85 c0 test %eax,%eax
8010294e: 0f 85 0c ff ff ff jne 80102860 <cmostime+0x30>
=======
801028fd: c7 44 24 08 18 00 00 movl $0x18,0x8(%esp)
80102904: 00
80102905: 89 7c 24 04 mov %edi,0x4(%esp)
80102909: 89 1c 24 mov %ebx,(%esp)
8010290c: e8 3f 1c 00 00 call 80104550 <memcmp>
80102911: 85 c0 test %eax,%eax
80102913: 75 c3 jne 801028d8 <cmostime+0x28>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
break;
}
// convert
if(bcd) {
80102915: 80 7d b7 00 cmpb $0x0,-0x49(%ebp)
80102919: 75 78 jne 80102993 <cmostime+0xe3>
#define CONV(x) (t1.x = ((t1.x >> 4) * 10) + (t1.x & 0xf))
CONV(second);
8010291b: 8b 45 b8 mov -0x48(%ebp),%eax
8010291e: 89 c2 mov %eax,%edx
80102920: 83 e0 0f and $0xf,%eax
80102923: c1 ea 04 shr $0x4,%edx
80102926: 8d 14 92 lea (%edx,%edx,4),%edx
80102929: 8d 04 50 lea (%eax,%edx,2),%eax
8010292c: 89 45 b8 mov %eax,-0x48(%ebp)
CONV(minute);
8010292f: 8b 45 bc mov -0x44(%ebp),%eax
80102932: 89 c2 mov %eax,%edx
80102934: 83 e0 0f and $0xf,%eax
80102937: c1 ea 04 shr $0x4,%edx
8010293a: 8d 14 92 lea (%edx,%edx,4),%edx
8010293d: 8d 04 50 lea (%eax,%edx,2),%eax
80102940: 89 45 bc mov %eax,-0x44(%ebp)
CONV(hour );
80102943: 8b 45 c0 mov -0x40(%ebp),%eax
80102946: 89 c2 mov %eax,%edx
80102948: 83 e0 0f and $0xf,%eax
8010294b: c1 ea 04 shr $0x4,%edx
8010294e: 8d 14 92 lea (%edx,%edx,4),%edx
80102951: 8d 04 50 lea (%eax,%edx,2),%eax
80102954: 89 45 c0 mov %eax,-0x40(%ebp)
CONV(day );
80102957: 8b 45 c4 mov -0x3c(%ebp),%eax
8010295a: 89 c2 mov %eax,%edx
8010295c: 83 e0 0f and $0xf,%eax
8010295f: c1 ea 04 shr $0x4,%edx
80102962: 8d 14 92 lea (%edx,%edx,4),%edx
80102965: 8d 04 50 lea (%eax,%edx,2),%eax
80102968: 89 45 c4 mov %eax,-0x3c(%ebp)
CONV(month );
8010296b: 8b 45 c8 mov -0x38(%ebp),%eax
8010296e: 89 c2 mov %eax,%edx
80102970: 83 e0 0f and $0xf,%eax
80102973: c1 ea 04 shr $0x4,%edx
80102976: 8d 14 92 lea (%edx,%edx,4),%edx
80102979: 8d 04 50 lea (%eax,%edx,2),%eax
8010297c: 89 45 c8 mov %eax,-0x38(%ebp)
CONV(year );
8010297f: 8b 45 cc mov -0x34(%ebp),%eax
80102982: 89 c2 mov %eax,%edx
80102984: 83 e0 0f and $0xf,%eax
80102987: c1 ea 04 shr $0x4,%edx
8010298a: 8d 14 92 lea (%edx,%edx,4),%edx
8010298d: 8d 04 50 lea (%eax,%edx,2),%eax
80102990: 89 45 cc mov %eax,-0x34(%ebp)
#undef CONV
}
*r = t1;
80102993: 8b 4d 08 mov 0x8(%ebp),%ecx
80102996: 8b 45 b8 mov -0x48(%ebp),%eax
80102999: 89 01 mov %eax,(%ecx)
8010299b: 8b 45 bc mov -0x44(%ebp),%eax
8010299e: 89 41 04 mov %eax,0x4(%ecx)
801029a1: 8b 45 c0 mov -0x40(%ebp),%eax
801029a4: 89 41 08 mov %eax,0x8(%ecx)
801029a7: 8b 45 c4 mov -0x3c(%ebp),%eax
801029aa: 89 41 0c mov %eax,0xc(%ecx)
801029ad: 8b 45 c8 mov -0x38(%ebp),%eax
801029b0: 89 41 10 mov %eax,0x10(%ecx)
801029b3: 8b 45 cc mov -0x34(%ebp),%eax
801029b6: 89 41 14 mov %eax,0x14(%ecx)
r->year += 2000;
801029b9: 81 41 14 d0 07 00 00 addl $0x7d0,0x14(%ecx)
}
801029c0: 83 c4 4c add $0x4c,%esp
801029c3: 5b pop %ebx
801029c4: 5e pop %esi
801029c5: 5f pop %edi
801029c6: 5d pop %ebp
801029c7: c3 ret
801029c8: 66 90 xchg %ax,%ax
801029ca: 66 90 xchg %ax,%ax
801029cc: 66 90 xchg %ax,%ax
801029ce: 66 90 xchg %ax,%ax
801029d0 <install_trans>:
}
// Copy committed blocks from log to their home location
static void
install_trans(void)
{
801029d0: 55 push %ebp
801029d1: 89 e5 mov %esp,%ebp
801029d3: 57 push %edi
801029d4: 56 push %esi
801029d5: 53 push %ebx
int tail;
for (tail = 0; tail < log.lh.n; tail++) {
801029d6: 31 db xor %ebx,%ebx
}
// Copy committed blocks from log to their home location
static void
install_trans(void)
{
801029d8: 83 ec 1c sub $0x1c,%esp
int tail;
for (tail = 0; tail < log.lh.n; tail++) {
801029db: a1 e8 26 11 80 mov 0x801126e8,%eax
801029e0: 85 c0 test %eax,%eax
801029e2: 7e 78 jle 80102a5c <install_trans+0x8c>
801029e4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
struct buf *lbuf = bread(log.dev, log.start+tail+1); // read log block
801029e8: a1 d4 26 11 80 mov 0x801126d4,%eax
801029ed: 01 d8 add %ebx,%eax
801029ef: 83 c0 01 add $0x1,%eax
801029f2: 89 44 24 04 mov %eax,0x4(%esp)
801029f6: a1 e4 26 11 80 mov 0x801126e4,%eax
801029fb: 89 04 24 mov %eax,(%esp)
801029fe: e8 cd d6 ff ff call 801000d0 <bread>
80102a03: 89 c7 mov %eax,%edi
struct buf *dbuf = bread(log.dev, log.lh.block[tail]); // read dst
80102a05: 8b 04 9d ec 26 11 80 mov -0x7feed914(,%ebx,4),%eax
static void
install_trans(void)
{
int tail;
for (tail = 0; tail < log.lh.n; tail++) {
80102a0c: 83 c3 01 add $0x1,%ebx
struct buf *lbuf = bread(log.dev, log.start+tail+1); // read log block
struct buf *dbuf = bread(log.dev, log.lh.block[tail]); // read dst
80102a0f: 89 44 24 04 mov %eax,0x4(%esp)
80102a13: a1 e4 26 11 80 mov 0x801126e4,%eax
80102a18: 89 04 24 mov %eax,(%esp)
80102a1b: e8 b0 d6 ff ff call 801000d0 <bread>
memmove(dbuf->data, lbuf->data, BSIZE); // copy block to dst
80102a20: c7 44 24 08 00 02 00 movl $0x200,0x8(%esp)
80102a27: 00
{
int tail;
for (tail = 0; tail < log.lh.n; tail++) {
struct buf *lbuf = bread(log.dev, log.start+tail+1); // read log block
struct buf *dbuf = bread(log.dev, log.lh.block[tail]); // read dst
80102a28: 89 c6 mov %eax,%esi
memmove(dbuf->data, lbuf->data, BSIZE); // copy block to dst
<<<<<<< HEAD
80102a64: 8d 47 5c lea 0x5c(%edi),%eax
80102a67: 83 c4 0c add $0xc,%esp
80102a6a: 68 00 02 00 00 push $0x200
80102a6f: 50 push %eax
80102a70: 8d 46 5c lea 0x5c(%esi),%eax
80102a73: 50 push %eax
80102a74: e8 77 1d 00 00 call 801047f0 <memmove>
=======
80102a2a: 8d 47 5c lea 0x5c(%edi),%eax
80102a2d: 89 44 24 04 mov %eax,0x4(%esp)
80102a31: 8d 46 5c lea 0x5c(%esi),%eax
80102a34: 89 04 24 mov %eax,(%esp)
80102a37: e8 64 1b 00 00 call 801045a0 <memmove>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
bwrite(dbuf); // write dst to disk
80102a3c: 89 34 24 mov %esi,(%esp)
80102a3f: e8 5c d7 ff ff call 801001a0 <bwrite>
brelse(lbuf);
80102a44: 89 3c 24 mov %edi,(%esp)
80102a47: e8 94 d7 ff ff call 801001e0 <brelse>
brelse(dbuf);
80102a4c: 89 34 24 mov %esi,(%esp)
80102a4f: e8 8c d7 ff ff call 801001e0 <brelse>
static void
install_trans(void)
{
int tail;
for (tail = 0; tail < log.lh.n; tail++) {
80102a54: 39 1d e8 26 11 80 cmp %ebx,0x801126e8
80102a5a: 7f 8c jg 801029e8 <install_trans+0x18>
memmove(dbuf->data, lbuf->data, BSIZE); // copy block to dst
bwrite(dbuf); // write dst to disk
brelse(lbuf);
brelse(dbuf);
}
}
80102a5c: 83 c4 1c add $0x1c,%esp
80102a5f: 5b pop %ebx
80102a60: 5e pop %esi
80102a61: 5f pop %edi
80102a62: 5d pop %ebp
80102a63: c3 ret
80102a64: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80102a6a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
80102a70 <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)
{
80102a70: 55 push %ebp
80102a71: 89 e5 mov %esp,%ebp
80102a73: 57 push %edi
80102a74: 56 push %esi
80102a75: 53 push %ebx
80102a76: 83 ec 1c sub $0x1c,%esp
struct buf *buf = bread(log.dev, log.start);
80102a79: a1 d4 26 11 80 mov 0x801126d4,%eax
80102a7e: 89 44 24 04 mov %eax,0x4(%esp)
80102a82: a1 e4 26 11 80 mov 0x801126e4,%eax
80102a87: 89 04 24 mov %eax,(%esp)
80102a8a: e8 41 d6 ff ff call 801000d0 <bread>
struct logheader *hb = (struct logheader *) (buf->data);
int i;
hb->n = log.lh.n;
80102a8f: 8b 1d e8 26 11 80 mov 0x801126e8,%ebx
for (i = 0; i < log.lh.n; i++) {
80102a95: 31 d2 xor %edx,%edx
80102a97: 85 db test %ebx,%ebx
// This is the true point at which the
// current transaction commits.
static void
write_head(void)
{
struct buf *buf = bread(log.dev, log.start);
80102a99: 89 c7 mov %eax,%edi
struct logheader *hb = (struct logheader *) (buf->data);
int i;
hb->n = log.lh.n;
80102a9b: 89 58 5c mov %ebx,0x5c(%eax)
80102a9e: 8d 70 5c lea 0x5c(%eax),%esi
for (i = 0; i < log.lh.n; i++) {
80102aa1: 7e 17 jle 80102aba <write_head+0x4a>
80102aa3: 90 nop
80102aa4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
hb->block[i] = log.lh.block[i];
80102aa8: 8b 0c 95 ec 26 11 80 mov -0x7feed914(,%edx,4),%ecx
80102aaf: 89 4c 96 04 mov %ecx,0x4(%esi,%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++) {
80102ab3: 83 c2 01 add $0x1,%edx
80102ab6: 39 da cmp %ebx,%edx
80102ab8: 75 ee jne 80102aa8 <write_head+0x38>
hb->block[i] = log.lh.block[i];
}
bwrite(buf);
80102aba: 89 3c 24 mov %edi,(%esp)
80102abd: e8 de d6 ff ff call 801001a0 <bwrite>
brelse(buf);
80102ac2: 89 3c 24 mov %edi,(%esp)
80102ac5: e8 16 d7 ff ff call 801001e0 <brelse>
}
80102aca: 83 c4 1c add $0x1c,%esp
80102acd: 5b pop %ebx
80102ace: 5e pop %esi
80102acf: 5f pop %edi
80102ad0: 5d pop %ebp
80102ad1: c3 ret
80102ad2: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80102ad9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80102ae0 <initlog>:
static void recover_from_log(void);
static void commit();
void
initlog(int dev)
{
80102ae0: 55 push %ebp
80102ae1: 89 e5 mov %esp,%ebp
80102ae3: 56 push %esi
80102ae4: 53 push %ebx
80102ae5: 83 ec 30 sub $0x30,%esp
80102ae8: 8b 5d 08 mov 0x8(%ebp),%ebx
if (sizeof(struct logheader) >= BSIZE)
panic("initlog: too big logheader");
struct superblock sb;
initlock(&log.lock, "log");
<<<<<<< HEAD
80102b1a: 68 fc 77 10 80 push $0x801077fc
80102b1f: 68 a0 26 11 80 push $0x801126a0
80102b24: e8 c7 19 00 00 call 801044f0 <initlock>
=======
80102aeb: c7 44 24 04 7c 75 10 movl $0x8010757c,0x4(%esp)
80102af2: 80
80102af3: c7 04 24 a0 26 11 80 movl $0x801126a0,(%esp)
80102afa: e8 01 18 00 00 call 80104300 <initlock>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
readsb(dev, &sb);
80102aff: 8d 45 dc lea -0x24(%ebp),%eax
80102b02: 89 44 24 04 mov %eax,0x4(%esp)
80102b06: 89 1c 24 mov %ebx,(%esp)
80102b09: e8 82 e8 ff ff call 80101390 <readsb>
log.start = sb.logstart;
80102b0e: 8b 45 ec mov -0x14(%ebp),%eax
log.size = sb.nlog;
80102b11: 8b 55 e8 mov -0x18(%ebp),%edx
// Read the log header from disk into the in-memory log header
static void
read_head(void)
{
struct buf *buf = bread(log.dev, log.start);
80102b14: 89 1c 24 mov %ebx,(%esp)
struct superblock sb;
initlock(&log.lock, "log");
readsb(dev, &sb);
log.start = sb.logstart;
log.size = sb.nlog;
log.dev = dev;
80102b17: 89 1d e4 26 11 80 mov %ebx,0x801126e4
// Read the log header from disk into the in-memory log header
static void
read_head(void)
{
struct buf *buf = bread(log.dev, log.start);
80102b1d: 89 44 24 04 mov %eax,0x4(%esp)
struct superblock sb;
initlock(&log.lock, "log");
readsb(dev, &sb);
log.start = sb.logstart;
log.size = sb.nlog;
80102b21: 89 15 d8 26 11 80 mov %edx,0x801126d8
panic("initlog: too big logheader");
struct superblock sb;
initlock(&log.lock, "log");
readsb(dev, &sb);
log.start = sb.logstart;
80102b27: a3 d4 26 11 80 mov %eax,0x801126d4
// Read the log header from disk into the in-memory log header
static void
read_head(void)
{
struct buf *buf = bread(log.dev, log.start);
80102b2c: e8 9f d5 ff ff call 801000d0 <bread>
struct logheader *lh = (struct logheader *) (buf->data);
int i;
log.lh.n = lh->n;
for (i = 0; i < log.lh.n; i++) {
80102b31: 31 d2 xor %edx,%edx
read_head(void)
{
struct buf *buf = bread(log.dev, log.start);
struct logheader *lh = (struct logheader *) (buf->data);
int i;
log.lh.n = lh->n;
80102b33: 8b 58 5c mov 0x5c(%eax),%ebx
80102b36: 8d 70 5c lea 0x5c(%eax),%esi
for (i = 0; i < log.lh.n; i++) {
80102b39: 85 db test %ebx,%ebx
read_head(void)
{
struct buf *buf = bread(log.dev, log.start);
struct logheader *lh = (struct logheader *) (buf->data);
int i;
log.lh.n = lh->n;
80102b3b: 89 1d e8 26 11 80 mov %ebx,0x801126e8
for (i = 0; i < log.lh.n; i++) {
80102b41: 7e 17 jle 80102b5a <initlog+0x7a>
80102b43: 90 nop
80102b44: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
log.lh.block[i] = lh->block[i];
80102b48: 8b 4c 96 04 mov 0x4(%esi,%edx,4),%ecx
80102b4c: 89 0c 95 ec 26 11 80 mov %ecx,-0x7feed914(,%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++) {
80102b53: 83 c2 01 add $0x1,%edx
80102b56: 39 da cmp %ebx,%edx
80102b58: 75 ee jne 80102b48 <initlog+0x68>
log.lh.block[i] = lh->block[i];
}
brelse(buf);
80102b5a: 89 04 24 mov %eax,(%esp)
80102b5d: e8 7e d6 ff ff call 801001e0 <brelse>
static void
recover_from_log(void)
{
read_head();
install_trans(); // if committed, copy from log to disk
80102b62: e8 69 fe ff ff call 801029d0 <install_trans>
log.lh.n = 0;
80102b67: c7 05 e8 26 11 80 00 movl $0x0,0x801126e8
80102b6e: 00 00 00
write_head(); // clear the log
80102b71: e8 fa fe ff ff call 80102a70 <write_head>
readsb(dev, &sb);
log.start = sb.logstart;
log.size = sb.nlog;
log.dev = dev;
recover_from_log();
}
80102b76: 83 c4 30 add $0x30,%esp
80102b79: 5b pop %ebx
80102b7a: 5e pop %esi
80102b7b: 5d pop %ebp
80102b7c: c3 ret
80102b7d: 8d 76 00 lea 0x0(%esi),%esi
80102b80 <begin_op>:
}
// called at the start of each FS system call.
void
begin_op(void)
{
80102b80: 55 push %ebp
80102b81: 89 e5 mov %esp,%ebp
80102b83: 83 ec 18 sub $0x18,%esp
acquire(&log.lock);
<<<<<<< HEAD
80102bb6: 68 a0 26 11 80 push $0x801126a0
80102bbb: e8 50 19 00 00 call 80104510 <acquire>
80102bc0: 83 c4 10 add $0x10,%esp
80102bc3: eb 18 jmp 80102bdd <begin_op+0x2d>
80102bc5: 8d 76 00 lea 0x0(%esi),%esi
while(1){
if(log.committing){
sleep(&log, &log.lock);
80102bc8: 83 ec 08 sub $0x8,%esp
80102bcb: 68 a0 26 11 80 push $0x801126a0
80102bd0: 68 a0 26 11 80 push $0x801126a0
80102bd5: e8 76 13 00 00 call 80103f50 <sleep>
80102bda: 83 c4 10 add $0x10,%esp
=======
80102b86: c7 04 24 a0 26 11 80 movl $0x801126a0,(%esp)
80102b8d: e8 ee 17 00 00 call 80104380 <acquire>
80102b92: eb 18 jmp 80102bac <begin_op+0x2c>
80102b94: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
while(1){
if(log.committing){
sleep(&log, &log.lock);
80102b98: c7 44 24 04 a0 26 11 movl $0x801126a0,0x4(%esp)
80102b9f: 80
80102ba0: c7 04 24 a0 26 11 80 movl $0x801126a0,(%esp)
80102ba7: e8 94 11 00 00 call 80103d40 <sleep>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
void
begin_op(void)
{
acquire(&log.lock);
while(1){
if(log.committing){
80102bac: a1 e0 26 11 80 mov 0x801126e0,%eax
80102bb1: 85 c0 test %eax,%eax
80102bb3: 75 e3 jne 80102b98 <begin_op+0x18>
sleep(&log, &log.lock);
} else if(log.lh.n + (log.outstanding+1)*MAXOPBLOCKS > LOGSIZE){
80102bb5: a1 dc 26 11 80 mov 0x801126dc,%eax
80102bba: 8b 15 e8 26 11 80 mov 0x801126e8,%edx
80102bc0: 83 c0 01 add $0x1,%eax
80102bc3: 8d 0c 80 lea (%eax,%eax,4),%ecx
80102bc6: 8d 14 4a lea (%edx,%ecx,2),%edx
80102bc9: 83 fa 1e cmp $0x1e,%edx
80102bcc: 7f ca jg 80102b98 <begin_op+0x18>
// this op might exhaust log space; wait for commit.
sleep(&log, &log.lock);
} else {
log.outstanding += 1;
release(&log.lock);
80102bce: c7 04 24 a0 26 11 80 movl $0x801126a0,(%esp)
sleep(&log, &log.lock);
} else if(log.lh.n + (log.outstanding+1)*MAXOPBLOCKS > LOGSIZE){
// this op might exhaust log space; wait for commit.
sleep(&log, &log.lock);
} else {
log.outstanding += 1;
80102bd5: a3 dc 26 11 80 mov %eax,0x801126dc
release(&log.lock);
<<<<<<< HEAD
80102c07: 68 a0 26 11 80 push $0x801126a0
80102c0c: e8 df 1a 00 00 call 801046f0 <release>
=======
80102bda: e8 d1 18 00 00 call 801044b0 <release>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
break;
}
}
}
80102bdf: c9 leave
80102be0: c3 ret
80102be1: eb 0d jmp 80102bf0 <end_op>
80102be3: 90 nop
80102be4: 90 nop
80102be5: 90 nop
80102be6: 90 nop
80102be7: 90 nop
80102be8: 90 nop
80102be9: 90 nop
80102bea: 90 nop
80102beb: 90 nop
80102bec: 90 nop
80102bed: 90 nop
80102bee: 90 nop
80102bef: 90 nop
80102bf0 <end_op>:
// called at the end of each FS system call.
// commits if this was the last outstanding operation.
void
end_op(void)
{
80102bf0: 55 push %ebp
80102bf1: 89 e5 mov %esp,%ebp
80102bf3: 57 push %edi
80102bf4: 56 push %esi
80102bf5: 53 push %ebx
80102bf6: 83 ec 1c sub $0x1c,%esp
int do_commit = 0;
acquire(&log.lock);
<<<<<<< HEAD
80102c29: 68 a0 26 11 80 push $0x801126a0
80102c2e: e8 dd 18 00 00 call 80104510 <acquire>
=======
80102bf9: c7 04 24 a0 26 11 80 movl $0x801126a0,(%esp)
80102c00: e8 7b 17 00 00 call 80104380 <acquire>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
log.outstanding -= 1;
80102c05: a1 dc 26 11 80 mov 0x801126dc,%eax
if(log.committing)
80102c0a: 8b 15 e0 26 11 80 mov 0x801126e0,%edx
end_op(void)
{
int do_commit = 0;
acquire(&log.lock);
log.outstanding -= 1;
80102c10: 83 e8 01 sub $0x1,%eax
if(log.committing)
80102c13: 85 d2 test %edx,%edx
end_op(void)
{
int do_commit = 0;
acquire(&log.lock);
log.outstanding -= 1;
80102c15: a3 dc 26 11 80 mov %eax,0x801126dc
if(log.committing)
80102c1a: 0f 85 f3 00 00 00 jne 80102d13 <end_op+0x123>
panic("log.committing");
if(log.outstanding == 0){
80102c20: 85 c0 test %eax,%eax
80102c22: 0f 85 cb 00 00 00 jne 80102cf3 <end_op+0x103>
log.committing = 1;
} else {
// begin_op() may be waiting for log space.
wakeup(&log);
}
release(&log.lock);
80102c28: c7 04 24 a0 26 11 80 movl $0x801126a0,(%esp)
}
static void
commit()
{
if (log.lh.n > 0) {
80102c2f: 31 db xor %ebx,%ebx
log.outstanding -= 1;
if(log.committing)
panic("log.committing");
if(log.outstanding == 0){
do_commit = 1;
log.committing = 1;
80102c31: c7 05 e0 26 11 80 01 movl $0x1,0x801126e0
80102c38: 00 00 00
} else {
// begin_op() may be waiting for log space.
wakeup(&log);
}
release(&log.lock);
<<<<<<< HEAD
80102c68: 68 a0 26 11 80 push $0x801126a0
80102c6d: e8 7e 1a 00 00 call 801046f0 <release>
=======
80102c3b: e8 70 18 00 00 call 801044b0 <release>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
}
static void
commit()
{
if (log.lh.n > 0) {
80102c40: a1 e8 26 11 80 mov 0x801126e8,%eax
80102c45: 85 c0 test %eax,%eax
80102c47: 0f 8e 90 00 00 00 jle 80102cdd <end_op+0xed>
80102c4d: 8d 76 00 lea 0x0(%esi),%esi
write_log(void)
{
int tail;
for (tail = 0; tail < log.lh.n; tail++) {
struct buf *to = bread(log.dev, log.start+tail+1); // log block
80102c50: a1 d4 26 11 80 mov 0x801126d4,%eax
80102c55: 01 d8 add %ebx,%eax
80102c57: 83 c0 01 add $0x1,%eax
80102c5a: 89 44 24 04 mov %eax,0x4(%esp)
80102c5e: a1 e4 26 11 80 mov 0x801126e4,%eax
80102c63: 89 04 24 mov %eax,(%esp)
80102c66: e8 65 d4 ff ff call 801000d0 <bread>
80102c6b: 89 c6 mov %eax,%esi
struct buf *from = bread(log.dev, log.lh.block[tail]); // cache block
80102c6d: 8b 04 9d ec 26 11 80 mov -0x7feed914(,%ebx,4),%eax
static void
write_log(void)
{
int tail;
for (tail = 0; tail < log.lh.n; tail++) {
80102c74: 83 c3 01 add $0x1,%ebx
struct buf *to = bread(log.dev, log.start+tail+1); // log block
struct buf *from = bread(log.dev, log.lh.block[tail]); // cache block
80102c77: 89 44 24 04 mov %eax,0x4(%esp)
80102c7b: a1 e4 26 11 80 mov 0x801126e4,%eax
80102c80: 89 04 24 mov %eax,(%esp)
80102c83: e8 48 d4 ff ff call 801000d0 <bread>
memmove(to->data, from->data, BSIZE);
80102c88: c7 44 24 08 00 02 00 movl $0x200,0x8(%esp)
80102c8f: 00
{
int tail;
for (tail = 0; tail < log.lh.n; tail++) {
struct buf *to = bread(log.dev, log.start+tail+1); // log block
struct buf *from = bread(log.dev, log.lh.block[tail]); // cache block
80102c90: 89 c7 mov %eax,%edi
memmove(to->data, from->data, BSIZE);
<<<<<<< HEAD
80102cbc: 8d 40 5c lea 0x5c(%eax),%eax
80102cbf: 83 c4 0c add $0xc,%esp
80102cc2: 68 00 02 00 00 push $0x200
80102cc7: 50 push %eax
80102cc8: 8d 46 5c lea 0x5c(%esi),%eax
80102ccb: 50 push %eax
80102ccc: e8 1f 1b 00 00 call 801047f0 <memmove>
=======
80102c92: 8d 40 5c lea 0x5c(%eax),%eax
80102c95: 89 44 24 04 mov %eax,0x4(%esp)
80102c99: 8d 46 5c lea 0x5c(%esi),%eax
80102c9c: 89 04 24 mov %eax,(%esp)
80102c9f: e8 fc 18 00 00 call 801045a0 <memmove>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
bwrite(to); // write the log
80102ca4: 89 34 24 mov %esi,(%esp)
80102ca7: e8 f4 d4 ff ff call 801001a0 <bwrite>
brelse(from);
80102cac: 89 3c 24 mov %edi,(%esp)
80102caf: e8 2c d5 ff ff call 801001e0 <brelse>
brelse(to);
80102cb4: 89 34 24 mov %esi,(%esp)
80102cb7: e8 24 d5 ff ff call 801001e0 <brelse>
static void
write_log(void)
{
int tail;
for (tail = 0; tail < log.lh.n; tail++) {
80102cbc: 3b 1d e8 26 11 80 cmp 0x801126e8,%ebx
80102cc2: 7c 8c jl 80102c50 <end_op+0x60>
static void
commit()
{
if (log.lh.n > 0) {
write_log(); // Write modified blocks from cache to log
write_head(); // Write header to disk -- the real commit
80102cc4: e8 a7 fd ff ff call 80102a70 <write_head>
install_trans(); // Now install writes to home locations
80102cc9: e8 02 fd ff ff call 801029d0 <install_trans>
log.lh.n = 0;
80102cce: c7 05 e8 26 11 80 00 movl $0x0,0x801126e8
80102cd5: 00 00 00
write_head(); // Erase the transaction from the log
80102cd8: e8 93 fd ff ff call 80102a70 <write_head>
if(do_commit){
// call commit w/o holding locks, since not allowed
// to sleep with locks.
commit();
acquire(&log.lock);
<<<<<<< HEAD
80102d0d: 83 ec 0c sub $0xc,%esp
80102d10: 68 a0 26 11 80 push $0x801126a0
80102d15: e8 f6 17 00 00 call 80104510 <acquire>
log.committing = 0;
wakeup(&log);
80102d1a: c7 04 24 a0 26 11 80 movl $0x801126a0,(%esp)
if(do_commit){
// call commit w/o holding locks, since not allowed
// to sleep with locks.
commit();
acquire(&log.lock);
log.committing = 0;
80102d21: c7 05 e0 26 11 80 00 movl $0x0,0x801126e0
80102d28: 00 00 00
wakeup(&log);
80102d2b: e8 c0 13 00 00 call 801040f0 <wakeup>
release(&log.lock);
80102d30: c7 04 24 a0 26 11 80 movl $0x801126a0,(%esp)
80102d37: e8 b4 19 00 00 call 801046f0 <release>
80102d3c: 83 c4 10 add $0x10,%esp
}
}
80102d3f: 8d 65 f4 lea -0xc(%ebp),%esp
80102d42: 5b pop %ebx
80102d43: 5e pop %esi
80102d44: 5f pop %edi
80102d45: 5d pop %ebp
80102d46: c3 ret
80102d47: 89 f6 mov %esi,%esi
80102d49: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
if(log.outstanding == 0){
do_commit = 1;
log.committing = 1;
} else {
// begin_op() may be waiting for log space.
wakeup(&log);
80102d50: 83 ec 0c sub $0xc,%esp
80102d53: 68 a0 26 11 80 push $0x801126a0
80102d58: e8 93 13 00 00 call 801040f0 <wakeup>
}
release(&log.lock);
80102d5d: c7 04 24 a0 26 11 80 movl $0x801126a0,(%esp)
80102d64: e8 87 19 00 00 call 801046f0 <release>
80102d69: 83 c4 10 add $0x10,%esp
acquire(&log.lock);
=======
80102cdd: c7 04 24 a0 26 11 80 movl $0x801126a0,(%esp)
80102ce4: e8 97 16 00 00 call 80104380 <acquire>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
log.committing = 0;
80102ce9: c7 05 e0 26 11 80 00 movl $0x0,0x801126e0
80102cf0: 00 00 00
wakeup(&log);
80102cf3: c7 04 24 a0 26 11 80 movl $0x801126a0,(%esp)
80102cfa: e8 e1 11 00 00 call 80103ee0 <wakeup>
release(&log.lock);
80102cff: c7 04 24 a0 26 11 80 movl $0x801126a0,(%esp)
80102d06: e8 a5 17 00 00 call 801044b0 <release>
}
}
80102d0b: 83 c4 1c add $0x1c,%esp
80102d0e: 5b pop %ebx
80102d0f: 5e pop %esi
80102d10: 5f pop %edi
80102d11: 5d pop %ebp
80102d12: c3 ret
int do_commit = 0;
acquire(&log.lock);
log.outstanding -= 1;
if(log.committing)
panic("log.committing");
<<<<<<< HEAD
80102d74: 83 ec 0c sub $0xc,%esp
80102d77: 68 00 78 10 80 push $0x80107800
80102d7c: e8 ef d5 ff ff call 80100370 <panic>
80102d81: eb 0d jmp 80102d90 <log_write>
80102d83: 90 nop
80102d84: 90 nop
80102d85: 90 nop
80102d86: 90 nop
80102d87: 90 nop
80102d88: 90 nop
80102d89: 90 nop
80102d8a: 90 nop
80102d8b: 90 nop
80102d8c: 90 nop
80102d8d: 90 nop
80102d8e: 90 nop
80102d8f: 90 nop
80102d90 <log_write>:
=======
80102d13: c7 04 24 80 75 10 80 movl $0x80107580,(%esp)
80102d1a: e8 41 d6 ff ff call 80100360 <panic>
80102d1f: 90 nop
80102d20 <log_write>:
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// modify bp->data[]
// log_write(bp)
// brelse(bp)
void
log_write(struct buf *b)
{
80102d20: 55 push %ebp
80102d21: 89 e5 mov %esp,%ebp
80102d23: 53 push %ebx
80102d24: 83 ec 14 sub $0x14,%esp
int i;
if (log.lh.n >= LOGSIZE || log.lh.n >= log.size - 1)
80102d27: a1 e8 26 11 80 mov 0x801126e8,%eax
// modify bp->data[]
// log_write(bp)
// brelse(bp)
void
log_write(struct buf *b)
{
80102d2c: 8b 5d 08 mov 0x8(%ebp),%ebx
int i;
if (log.lh.n >= LOGSIZE || log.lh.n >= log.size - 1)
80102d2f: 83 f8 1d cmp $0x1d,%eax
80102d32: 0f 8f 98 00 00 00 jg 80102dd0 <log_write+0xb0>
80102d38: 8b 0d d8 26 11 80 mov 0x801126d8,%ecx
80102d3e: 8d 51 ff lea -0x1(%ecx),%edx
80102d41: 39 d0 cmp %edx,%eax
80102d43: 0f 8d 87 00 00 00 jge 80102dd0 <log_write+0xb0>
panic("too big a transaction");
if (log.outstanding < 1)
80102d49: a1 dc 26 11 80 mov 0x801126dc,%eax
80102d4e: 85 c0 test %eax,%eax
80102d50: 0f 8e 86 00 00 00 jle 80102ddc <log_write+0xbc>
panic("log_write outside of trans");
acquire(&log.lock);
<<<<<<< HEAD
80102dc6: 83 ec 0c sub $0xc,%esp
80102dc9: 68 a0 26 11 80 push $0x801126a0
80102dce: e8 3d 17 00 00 call 80104510 <acquire>
=======
80102d56: c7 04 24 a0 26 11 80 movl $0x801126a0,(%esp)
80102d5d: e8 1e 16 00 00 call 80104380 <acquire>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
for (i = 0; i < log.lh.n; i++) {
80102d62: 8b 15 e8 26 11 80 mov 0x801126e8,%edx
80102d68: 83 fa 00 cmp $0x0,%edx
80102d6b: 7e 54 jle 80102dc1 <log_write+0xa1>
if (log.lh.block[i] == b->blockno) // log absorbtion
80102d6d: 8b 4b 08 mov 0x8(%ebx),%ecx
panic("too big a transaction");
if (log.outstanding < 1)
panic("log_write outside of trans");
acquire(&log.lock);
for (i = 0; i < log.lh.n; i++) {
80102d70: 31 c0 xor %eax,%eax
if (log.lh.block[i] == b->blockno) // log absorbtion
80102d72: 39 0d ec 26 11 80 cmp %ecx,0x801126ec
80102d78: 75 0f jne 80102d89 <log_write+0x69>
80102d7a: eb 3c jmp 80102db8 <log_write+0x98>
80102d7c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80102d80: 39 0c 85 ec 26 11 80 cmp %ecx,-0x7feed914(,%eax,4)
80102d87: 74 2f je 80102db8 <log_write+0x98>
panic("too big a transaction");
if (log.outstanding < 1)
panic("log_write outside of trans");
acquire(&log.lock);
for (i = 0; i < log.lh.n; i++) {
80102d89: 83 c0 01 add $0x1,%eax
80102d8c: 39 d0 cmp %edx,%eax
80102d8e: 75 f0 jne 80102d80 <log_write+0x60>
if (log.lh.block[i] == b->blockno) // log absorbtion
break;
}
log.lh.block[i] = b->blockno;
80102d90: 89 0c 95 ec 26 11 80 mov %ecx,-0x7feed914(,%edx,4)
if (i == log.lh.n)
log.lh.n++;
80102d97: 83 c2 01 add $0x1,%edx
80102d9a: 89 15 e8 26 11 80 mov %edx,0x801126e8
b->flags |= B_DIRTY; // prevent eviction
80102da0: 83 0b 04 orl $0x4,(%ebx)
release(&log.lock);
80102da3: c7 45 08 a0 26 11 80 movl $0x801126a0,0x8(%ebp)
}
80102daa: 83 c4 14 add $0x14,%esp
80102dad: 5b pop %ebx
80102dae: 5d pop %ebp
}
log.lh.block[i] = b->blockno;
if (i == log.lh.n)
log.lh.n++;
b->flags |= B_DIRTY; // prevent eviction
release(&log.lock);
<<<<<<< HEAD
80102e1e: e9 cd 18 00 00 jmp 801046f0 <release>
80102e23: 90 nop
80102e24: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
=======
80102daf: e9 fc 16 00 00 jmp 801044b0 <release>
80102db4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
acquire(&log.lock);
for (i = 0; i < log.lh.n; i++) {
if (log.lh.block[i] == b->blockno) // log absorbtion
break;
}
log.lh.block[i] = b->blockno;
80102db8: 89 0c 85 ec 26 11 80 mov %ecx,-0x7feed914(,%eax,4)
80102dbf: eb df jmp 80102da0 <log_write+0x80>
80102dc1: 8b 43 08 mov 0x8(%ebx),%eax
80102dc4: a3 ec 26 11 80 mov %eax,0x801126ec
if (i == log.lh.n)
80102dc9: 75 d5 jne 80102da0 <log_write+0x80>
80102dcb: eb ca jmp 80102d97 <log_write+0x77>
80102dcd: 8d 76 00 lea 0x0(%esi),%esi
log_write(struct buf *b)
{
int i;
if (log.lh.n >= LOGSIZE || log.lh.n >= log.size - 1)
panic("too big a transaction");
<<<<<<< HEAD
80102e40: 83 ec 0c sub $0xc,%esp
80102e43: 68 0f 78 10 80 push $0x8010780f
80102e48: e8 23 d5 ff ff call 80100370 <panic>
if (log.outstanding < 1)
panic("log_write outside of trans");
80102e4d: 83 ec 0c sub $0xc,%esp
80102e50: 68 25 78 10 80 push $0x80107825
80102e55: e8 16 d5 ff ff call 80100370 <panic>
80102e5a: 66 90 xchg %ax,%ax
80102e5c: 66 90 xchg %ax,%ax
80102e5e: 66 90 xchg %ax,%ax
=======
80102dd0: c7 04 24 8f 75 10 80 movl $0x8010758f,(%esp)
80102dd7: e8 84 d5 ff ff call 80100360 <panic>
if (log.outstanding < 1)
panic("log_write outside of trans");
80102ddc: c7 04 24 a5 75 10 80 movl $0x801075a5,(%esp)
80102de3: e8 78 d5 ff ff call 80100360 <panic>
80102de8: 66 90 xchg %ax,%ax
80102dea: 66 90 xchg %ax,%ax
80102dec: 66 90 xchg %ax,%ax
80102dee: 66 90 xchg %ax,%ax
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
80102df0 <mpmain>:
}
// Common CPU setup code.
static void
mpmain(void)
{
80102df0: 55 push %ebp
80102df1: 89 e5 mov %esp,%ebp
80102df3: 83 ec 18 sub $0x18,%esp
cprintf("cpu%d: starting\n", cpunum());
<<<<<<< HEAD
80102e66: e8 65 f8 ff ff call 801026d0 <cpunum>
80102e6b: 83 ec 08 sub $0x8,%esp
80102e6e: 50 push %eax
80102e6f: 68 40 78 10 80 push $0x80107840
80102e74: e8 e7 d7 ff ff call 80100660 <cprintf>
idtinit(); // load idt register
80102e79: e8 d2 2c 00 00 call 80105b50 <idtinit>
=======
80102df6: e8 55 f9 ff ff call 80102750 <cpunum>
80102dfb: c7 04 24 c0 75 10 80 movl $0x801075c0,(%esp)
80102e02: 89 44 24 04 mov %eax,0x4(%esp)
80102e06: e8 45 d8 ff ff call 80100650 <cprintf>
idtinit(); // load idt register
80102e0b: e8 e0 2a 00 00 call 801058f0 <idtinit>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
xchg(&cpu->started, 1); // tell startothers() we're up
80102e10: 65 8b 15 00 00 00 00 mov %gs:0x0,%edx
xchg(volatile uint *addr, uint newval)
{
uint result;
// The + in "+m" denotes a read-modify-write operand.
asm volatile("lock; xchgl %0, %1" :
<<<<<<< HEAD
80102e85: b8 01 00 00 00 mov $0x1,%eax
80102e8a: f0 87 82 a8 00 00 00 lock xchg %eax,0xa8(%edx)
scheduler_sjf(); // start running processes with sjf or random algorithm
80102e91: e8 5a 0d 00 00 call 80103bf0 <scheduler_sjf>
80102e96: 8d 76 00 lea 0x0(%esi),%esi
80102e99: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
=======
80102e17: b8 01 00 00 00 mov $0x1,%eax
80102e1c: f0 87 82 a8 00 00 00 lock xchg %eax,0xa8(%edx)
scheduler(); // start running processes
80102e23: e8 28 0c 00 00 call 80103a50 <scheduler>
80102e28: 90 nop
80102e29: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
80102e30 <mpenter>:
}
// Other CPUs jump here from entryother.S.
static void
mpenter(void)
{
80102e30: 55 push %ebp
80102e31: 89 e5 mov %esp,%ebp
80102e33: 83 ec 08 sub $0x8,%esp
switchkvm();
<<<<<<< HEAD
80102ea6: e8 b5 3e 00 00 call 80106d60 <switchkvm>
seginit();
80102eab: e8 d0 3c 00 00 call 80106b80 <seginit>
=======
80102e36: e8 a5 3c 00 00 call 80106ae0 <switchkvm>
seginit();
80102e3b: e8 c0 3a 00 00 call 80106900 <seginit>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
lapicinit();
80102e40: e8 1b f8 ff ff call 80102660 <lapicinit>
mpmain();
80102e45: e8 a6 ff ff ff call 80102df0 <mpmain>
80102e4a: 66 90 xchg %ax,%ax
80102e4c: 66 90 xchg %ax,%ax
80102e4e: 66 90 xchg %ax,%ax
80102e50 <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)
{
80102e50: 55 push %ebp
80102e51: 89 e5 mov %esp,%ebp
80102e53: 53 push %ebx
80102e54: 83 e4 f0 and $0xfffffff0,%esp
80102e57: 83 ec 10 sub $0x10,%esp
kinit1(end, P2V(4*1024*1024)); // phys page allocator
80102e5a: c7 44 24 04 00 00 40 movl $0x80400000,0x4(%esp)
80102e61: 80
80102e62: c7 04 24 28 56 11 80 movl $0x80115628,(%esp)
80102e69: e8 62 f5 ff ff call 801023d0 <kinit1>
kvmalloc(); // kernel page table
<<<<<<< HEAD
80102ee1: e8 5a 3e 00 00 call 80106d40 <kvmalloc>
=======
80102e6e: e8 4d 3c 00 00 call 80106ac0 <kvmalloc>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
mpinit(); // detect other processors
80102e73: e8 a8 01 00 00 call 80103020 <mpinit>
lapicinit(); // interrupt controller
80102e78: e8 e3 f7 ff ff call 80102660 <lapicinit>
80102e7d: 8d 76 00 lea 0x0(%esi),%esi
seginit(); // segment descriptors
<<<<<<< HEAD
80102ef0: e8 8b 3c 00 00 call 80106b80 <seginit>
cprintf("\ncpu%d: starting xv6\n\n", cpunum());
80102ef5: e8 d6 f7 ff ff call 801026d0 <cpunum>
80102efa: 5a pop %edx
80102efb: 59 pop %ecx
80102efc: 50 push %eax
80102efd: 68 51 78 10 80 push $0x80107851
80102f02: e8 59 d7 ff ff call 80100660 <cprintf>
=======
80102e80: e8 7b 3a 00 00 call 80106900 <seginit>
cprintf("\ncpu%d: starting xv6\n\n", cpunum());
80102e85: e8 c6 f8 ff ff call 80102750 <cpunum>
80102e8a: c7 04 24 d1 75 10 80 movl $0x801075d1,(%esp)
80102e91: 89 44 24 04 mov %eax,0x4(%esp)
80102e95: e8 b6 d7 ff ff call 80100650 <cprintf>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
picinit(); // another interrupt controller
80102e9a: e8 81 03 00 00 call 80103220 <picinit>
ioapicinit(); // another interrupt controller
80102e9f: e8 4c f3 ff ff call 801021f0 <ioapicinit>
consoleinit(); // console hardware
80102ea4: e8 a7 da ff ff call 80100950 <consoleinit>
uartinit(); // serial port
<<<<<<< HEAD
80102f16: e8 35 2f 00 00 call 80105e50 <uartinit>
=======
80102ea9: e8 62 2d 00 00 call 80105c10 <uartinit>
80102eae: 66 90 xchg %ax,%ax
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
pinit(); // process table
80102eb0: e8 9b 08 00 00 call 80103750 <pinit>
tvinit(); // trap vectors
<<<<<<< HEAD
80102f20: e8 8b 2b 00 00 call 80105ab0 <tvinit>
=======
80102eb5: e8 96 29 00 00 call 80105850 <tvinit>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
binit(); // buffer cache
80102eba: e8 81 d1 ff ff call 80100040 <binit>
80102ebf: 90 nop
fileinit(); // file table
80102ec0: e8 7b de ff ff call 80100d40 <fileinit>
ideinit(); // disk
80102ec5: e8 16 f1 ff ff call 80101fe0 <ideinit>
if(!ismp)
80102eca: a1 84 27 11 80 mov 0x80112784,%eax
80102ecf: 85 c0 test %eax,%eax
80102ed1: 0f 84 ca 00 00 00 je 80102fa1 <main+0x151>
// Write entry code to unused memory at 0x7000.
// 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);
80102ed7: c7 44 24 08 8a 00 00 movl $0x8a,0x8(%esp)
80102ede: 00
for(c = cpus; c < cpus+ncpu; c++){
80102edf: bb a0 27 11 80 mov $0x801127a0,%ebx
// Write entry code to unused memory at 0x7000.
// 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);
<<<<<<< HEAD
80102f4d: 68 8a 00 00 00 push $0x8a
80102f52: 68 8c a4 10 80 push $0x8010a48c
80102f57: 68 00 70 00 80 push $0x80007000
80102f5c: e8 8f 18 00 00 call 801047f0 <memmove>
=======
80102ee4: c7 44 24 04 8c a4 10 movl $0x8010a48c,0x4(%esp)
80102eeb: 80
80102eec: c7 04 24 00 70 00 80 movl $0x80007000,(%esp)
80102ef3: e8 a8 16 00 00 call 801045a0 <memmove>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
for(c = cpus; c < cpus+ncpu; c++){
80102ef8: 69 05 80 2d 11 80 bc imul $0xbc,0x80112d80,%eax
80102eff: 00 00 00
80102f02: 05 a0 27 11 80 add $0x801127a0,%eax
80102f07: 39 d8 cmp %ebx,%eax
80102f09: 76 78 jbe 80102f83 <main+0x133>
80102f0b: 90 nop
80102f0c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if(c == cpus+cpunum()) // We've started already.
80102f10: e8 3b f8 ff ff call 80102750 <cpunum>
80102f15: 69 c0 bc 00 00 00 imul $0xbc,%eax,%eax
80102f1b: 05 a0 27 11 80 add $0x801127a0,%eax
80102f20: 39 c3 cmp %eax,%ebx
80102f22: 74 46 je 80102f6a <main+0x11a>
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();
80102f24: e8 67 f5 ff ff call 80102490 <kalloc>
*(void**)(code-4) = stack + KSTACKSIZE;
*(void**)(code-8) = mpenter;
80102f29: c7 05 f8 6f 00 80 30 movl $0x80102e30,0x80006ff8
80102f30: 2e 10 80
*(int**)(code-12) = (void *) V2P(entrypgdir);
80102f33: c7 05 f4 6f 00 80 00 movl $0x109000,0x80006ff4
80102f3a: 90 10 00
// 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();
*(void**)(code-4) = stack + KSTACKSIZE;
80102f3d: 05 00 10 00 00 add $0x1000,%eax
80102f42: a3 fc 6f 00 80 mov %eax,0x80006ffc
*(void**)(code-8) = mpenter;
*(int**)(code-12) = (void *) V2P(entrypgdir);
lapicstartap(c->apicid, V2P(code));
80102f47: 0f b6 03 movzbl (%ebx),%eax
80102f4a: c7 44 24 04 00 70 00 movl $0x7000,0x4(%esp)
80102f51: 00
80102f52: 89 04 24 mov %eax,(%esp)
80102f55: e8 c6 f8 ff ff call 80102820 <lapicstartap>
80102f5a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
// wait for cpu to finish mpmain()
while(c->started == 0)
80102f60: 8b 83 a8 00 00 00 mov 0xa8(%ebx),%eax
80102f66: 85 c0 test %eax,%eax
80102f68: 74 f6 je 80102f60 <main+0x110>
// 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++){
80102f6a: 69 05 80 2d 11 80 bc imul $0xbc,0x80112d80,%eax
80102f71: 00 00 00
80102f74: 81 c3 bc 00 00 00 add $0xbc,%ebx
80102f7a: 05 a0 27 11 80 add $0x801127a0,%eax
80102f7f: 39 c3 cmp %eax,%ebx
80102f81: 72 8d jb 80102f10 <main+0xc0>
fileinit(); // file table
ideinit(); // disk
if(!ismp)
timerinit(); // uniprocessor timer
startothers(); // start other processors
kinit2(P2V(4*1024*1024), P2V(PHYSTOP)); // must come after startothers()
80102f83: c7 44 24 04 00 00 00 movl $0x8e000000,0x4(%esp)
80102f8a: 8e
80102f8b: c7 04 24 00 00 40 80 movl $0x80400000,(%esp)
80102f92: e8 a9 f4 ff ff call 80102440 <kinit2>
userinit(); // first user process
80102f97: e8 d4 07 00 00 call 80103770 <userinit>
mpmain(); // finish this processor's setup
80102f9c: e8 4f fe ff ff call 80102df0 <mpmain>
tvinit(); // trap vectors
binit(); // buffer cache
fileinit(); // file table
ideinit(); // disk
if(!ismp)
timerinit(); // uniprocessor timer
<<<<<<< HEAD
8010300f: e8 3c 2a 00 00 call 80105a50 <timerinit>
80103014: e9 2c ff ff ff jmp 80102f45 <main+0x85>
80103019: 66 90 xchg %ax,%ax
8010301b: 66 90 xchg %ax,%ax
8010301d: 66 90 xchg %ax,%ax
8010301f: 90 nop
=======
80102fa1: e8 4a 28 00 00 call 801057f0 <timerinit>
80102fa6: e9 2c ff ff ff jmp 80102ed7 <main+0x87>
80102fab: 66 90 xchg %ax,%ax
80102fad: 66 90 xchg %ax,%ax
80102faf: 90 nop
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
80102fb0 <mpsearch1>:
}
// Look for an MP structure in the len bytes at addr.
static struct mp*
mpsearch1(uint a, int len)
{
80102fb0: 55 push %ebp
80102fb1: 89 e5 mov %esp,%ebp
80102fb3: 56 push %esi
uchar *e, *p, *addr;
addr = P2V(a);
80102fb4: 8d b0 00 00 00 80 lea -0x80000000(%eax),%esi
}
// Look for an MP structure in the len bytes at addr.
static struct mp*
mpsearch1(uint a, int len)
{
80102fba: 53 push %ebx
uchar *e, *p, *addr;
addr = P2V(a);
e = addr+len;
80102fbb: 8d 1c 16 lea (%esi,%edx,1),%ebx
}
// Look for an MP structure in the len bytes at addr.
static struct mp*
mpsearch1(uint a, int len)
{
80102fbe: 83 ec 10 sub $0x10,%esp
uchar *e, *p, *addr;
addr = P2V(a);
e = addr+len;
for(p = addr; p < e; p += sizeof(struct mp))
80102fc1: 39 de cmp %ebx,%esi
80102fc3: 73 3c jae 80103001 <mpsearch1+0x51>
80102fc5: 8d 76 00 lea 0x0(%esi),%esi
if(memcmp(p, "_MP_", 4) == 0 && sum(p, sizeof(struct mp)) == 0)
<<<<<<< HEAD
80103040: 83 ec 04 sub $0x4,%esp
80103043: 8d 7e 10 lea 0x10(%esi),%edi
80103046: 6a 04 push $0x4
80103048: 68 68 78 10 80 push $0x80107868
8010304d: 56 push %esi
8010304e: e8 3d 17 00 00 call 80104790 <memcmp>
80103053: 83 c4 10 add $0x10,%esp
80103056: 85 c0 test %eax,%eax
80103058: 75 1e jne 80103078 <mpsearch1+0x58>
8010305a: 8d 7e 10 lea 0x10(%esi),%edi
8010305d: 89 f2 mov %esi,%edx
8010305f: 31 c9 xor %ecx,%ecx
80103061: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
=======
80102fc8: c7 44 24 08 04 00 00 movl $0x4,0x8(%esp)
80102fcf: 00
80102fd0: c7 44 24 04 e8 75 10 movl $0x801075e8,0x4(%esp)
80102fd7: 80
80102fd8: 89 34 24 mov %esi,(%esp)
80102fdb: e8 70 15 00 00 call 80104550 <memcmp>
80102fe0: 85 c0 test %eax,%eax
80102fe2: 75 16 jne 80102ffa <mpsearch1+0x4a>
80102fe4: 31 c9 xor %ecx,%ecx
80102fe6: 31 d2 xor %edx,%edx
{
int i, sum;
sum = 0;
for(i=0; i<len; i++)
sum += addr[i];
80102fe8: 0f b6 04 16 movzbl (%esi,%edx,1),%eax
sum(uchar *addr, int len)
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
{
int i, sum;
sum = 0;
for(i=0; i<len; i++)
80102fec: 83 c2 01 add $0x1,%edx
sum += addr[i];
80102fef: 01 c1 add %eax,%ecx
sum(uchar *addr, int len)
{
int i, sum;
sum = 0;
for(i=0; i<len; i++)
80102ff1: 83 fa 10 cmp $0x10,%edx
80102ff4: 75 f2 jne 80102fe8 <mpsearch1+0x38>
uchar *e, *p, *addr;
addr = P2V(a);
e = addr+len;
for(p = addr; p < e; p += sizeof(struct mp))
if(memcmp(p, "_MP_", 4) == 0 && sum(p, sizeof(struct mp)) == 0)
80102ff6: 84 c9 test %cl,%cl
80102ff8: 74 10 je 8010300a <mpsearch1+0x5a>
{
uchar *e, *p, *addr;
addr = P2V(a);
e = addr+len;
for(p = addr; p < e; p += sizeof(struct mp))
80102ffa: 83 c6 10 add $0x10,%esi
80102ffd: 39 f3 cmp %esi,%ebx
80102fff: 77 c7 ja 80102fc8 <mpsearch1+0x18>
if(memcmp(p, "_MP_", 4) == 0 && sum(p, sizeof(struct mp)) == 0)
return (struct mp*)p;
return 0;
}
80103001: 83 c4 10 add $0x10,%esp
addr = P2V(a);
e = addr+len;
for(p = addr; p < e; p += sizeof(struct mp))
if(memcmp(p, "_MP_", 4) == 0 && sum(p, sizeof(struct mp)) == 0)
return (struct mp*)p;
return 0;
80103004: 31 c0 xor %eax,%eax
}
80103006: 5b pop %ebx
80103007: 5e pop %esi
80103008: 5d pop %ebp
80103009: c3 ret
8010300a: 83 c4 10 add $0x10,%esp
8010300d: 89 f0 mov %esi,%eax
8010300f: 5b pop %ebx
80103010: 5e pop %esi
80103011: 5d pop %ebp
80103012: c3 ret
80103013: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80103019: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80103020 <mpinit>:
return conf;
}
void
mpinit(void)
{
80103020: 55 push %ebp
80103021: 89 e5 mov %esp,%ebp
80103023: 57 push %edi
80103024: 56 push %esi
80103025: 53 push %ebx
80103026: 83 ec 1c sub $0x1c,%esp
uchar *bda;
uint p;
struct mp *mp;
bda = (uchar *) P2V(0x400);
if((p = ((bda[0x0F]<<8)| bda[0x0E]) << 4)){
80103029: 0f b6 05 0f 04 00 80 movzbl 0x8000040f,%eax
80103030: 0f b6 15 0e 04 00 80 movzbl 0x8000040e,%edx
80103037: c1 e0 08 shl $0x8,%eax
8010303a: 09 d0 or %edx,%eax
8010303c: c1 e0 04 shl $0x4,%eax
8010303f: 85 c0 test %eax,%eax
80103041: 75 1b jne 8010305e <mpinit+0x3e>
if((mp = mpsearch1(p, 1024)))
return mp;
} else {
p = ((bda[0x14]<<8)|bda[0x13])*1024;
80103043: 0f b6 05 14 04 00 80 movzbl 0x80000414,%eax
8010304a: 0f b6 15 13 04 00 80 movzbl 0x80000413,%edx
80103051: c1 e0 08 shl $0x8,%eax
80103054: 09 d0 or %edx,%eax
80103056: c1 e0 0a shl $0xa,%eax
if((mp = mpsearch1(p-1024, 1024)))
80103059: 2d 00 04 00 00 sub $0x400,%eax
uint p;
struct mp *mp;
bda = (uchar *) P2V(0x400);
if((p = ((bda[0x0F]<<8)| bda[0x0E]) << 4)){
if((mp = mpsearch1(p, 1024)))
8010305e: ba 00 04 00 00 mov $0x400,%edx
80103063: e8 48 ff ff ff call 80102fb0 <mpsearch1>
80103068: 85 c0 test %eax,%eax
8010306a: 89 c7 mov %eax,%edi
8010306c: 0f 84 4e 01 00 00 je 801031c0 <mpinit+0x1a0>
mpconfig(struct mp **pmp)
{
struct mpconf *conf;
struct mp *mp;
if((mp = mpsearch()) == 0 || mp->physaddr == 0)
80103072: 8b 77 04 mov 0x4(%edi),%esi
80103075: 85 f6 test %esi,%esi
80103077: 0f 84 ce 00 00 00 je 8010314b <mpinit+0x12b>
return 0;
conf = (struct mpconf*) P2V((uint) mp->physaddr);
8010307d: 8d 86 00 00 00 80 lea -0x80000000(%esi),%eax
if(memcmp(conf, "PCMP", 4) != 0)
<<<<<<< HEAD
80103103: 83 ec 04 sub $0x4,%esp
80103106: 6a 04 push $0x4
80103108: 68 6d 78 10 80 push $0x8010786d
8010310d: 50 push %eax
=======
80103083: c7 44 24 08 04 00 00 movl $0x4,0x8(%esp)
8010308a: 00
8010308b: c7 44 24 04 ed 75 10 movl $0x801075ed,0x4(%esp)
80103092: 80
80103093: 89 04 24 mov %eax,(%esp)
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
struct mpconf *conf;
struct mp *mp;
if((mp = mpsearch()) == 0 || mp->physaddr == 0)
return 0;
conf = (struct mpconf*) P2V((uint) mp->physaddr);
80103096: 89 45 e4 mov %eax,-0x1c(%ebp)
if(memcmp(conf, "PCMP", 4) != 0)
<<<<<<< HEAD
80103111: e8 7a 16 00 00 call 80104790 <memcmp>
80103116: 83 c4 10 add $0x10,%esp
80103119: 85 c0 test %eax,%eax
8010311b: 0f 85 b2 00 00 00 jne 801031d3 <mpinit+0x133>
=======
80103099: e8 b2 14 00 00 call 80104550 <memcmp>
8010309e: 85 c0 test %eax,%eax
801030a0: 0f 85 a5 00 00 00 jne 8010314b <mpinit+0x12b>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
return 0;
if(conf->version != 1 && conf->version != 4)
801030a6: 0f b6 86 06 00 00 80 movzbl -0x7ffffffa(%esi),%eax
801030ad: 3c 04 cmp $0x4,%al
801030af: 0f 85 29 01 00 00 jne 801031de <mpinit+0x1be>
return 0;
if(sum((uchar*)conf, conf->length) != 0)
801030b5: 0f b7 86 04 00 00 80 movzwl -0x7ffffffc(%esi),%eax
sum(uchar *addr, int len)
{
int i, sum;
sum = 0;
for(i=0; i<len; i++)
801030bc: 85 c0 test %eax,%eax
801030be: 74 1d je 801030dd <mpinit+0xbd>
static uchar
sum(uchar *addr, int len)
{
int i, sum;
sum = 0;
801030c0: 31 c9 xor %ecx,%ecx
for(i=0; i<len; i++)
801030c2: 31 d2 xor %edx,%edx
801030c4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
sum += addr[i];
801030c8: 0f b6 9c 16 00 00 00 movzbl -0x80000000(%esi,%edx,1),%ebx
801030cf: 80
sum(uchar *addr, int len)
{
int i, sum;
sum = 0;
for(i=0; i<len; i++)
801030d0: 83 c2 01 add $0x1,%edx
sum += addr[i];
801030d3: 01 d9 add %ebx,%ecx
sum(uchar *addr, int len)
{
int i, sum;
sum = 0;
for(i=0; i<len; i++)
801030d5: 39 d0 cmp %edx,%eax
801030d7: 7f ef jg 801030c8 <mpinit+0xa8>
conf = (struct mpconf*) P2V((uint) mp->physaddr);
if(memcmp(conf, "PCMP", 4) != 0)
return 0;
if(conf->version != 1 && conf->version != 4)
return 0;
if(sum((uchar*)conf, conf->length) != 0)
801030d9: 84 c9 test %cl,%cl
801030db: 75 6e jne 8010314b <mpinit+0x12b>
struct mp *mp;
struct mpconf *conf;
struct mpproc *proc;
struct mpioapic *ioapic;
if((conf = mpconfig(&mp)) == 0)
801030dd: 8b 5d e4 mov -0x1c(%ebp),%ebx
801030e0: 85 db test %ebx,%ebx
801030e2: 74 67 je 8010314b <mpinit+0x12b>
return;
ismp = 1;
801030e4: c7 05 84 27 11 80 01 movl $0x1,0x80112784
801030eb: 00 00 00
lapic = (uint*)conf->lapicaddr;
801030ee: 8b 86 24 00 00 80 mov -0x7fffffdc(%esi),%eax
801030f4: a3 9c 26 11 80 mov %eax,0x8011269c
for(p=(uchar*)(conf+1), e=(uchar*)conf+conf->length; p<e; ){
801030f9: 0f b7 8e 04 00 00 80 movzwl -0x7ffffffc(%esi),%ecx
80103100: 8d 86 2c 00 00 80 lea -0x7fffffd4(%esi),%eax
80103106: 01 d9 add %ebx,%ecx
80103108: 39 c8 cmp %ecx,%eax
8010310a: 0f 83 90 00 00 00 jae 801031a0 <mpinit+0x180>
switch(*p){
<<<<<<< HEAD
80103190: 80 38 04 cmpb $0x4,(%eax)
80103193: 0f 87 87 00 00 00 ja 80103220 <mpinit+0x180>
80103199: 0f b6 10 movzbl (%eax),%edx
8010319c: ff 24 95 74 78 10 80 jmp *-0x7fef878c(,%edx,4)
801031a3: 90 nop
801031a4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
=======
80103110: 80 38 04 cmpb $0x4,(%eax)
80103113: 77 7b ja 80103190 <mpinit+0x170>
80103115: 0f b6 10 movzbl (%eax),%edx
80103118: ff 24 95 f4 75 10 80 jmp *-0x7fef8a0c(,%edx,4)
8010311f: 90 nop
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
p += sizeof(struct mpioapic);
continue;
case MPBUS:
case MPIOINTR:
case MPLINTR:
p += 8;
80103120: 83 c0 08 add $0x8,%eax
if((conf = mpconfig(&mp)) == 0)
return;
ismp = 1;
lapic = (uint*)conf->lapicaddr;
for(p=(uchar*)(conf+1), e=(uchar*)conf+conf->length; p<e; ){
80103123: 39 c1 cmp %eax,%ecx
80103125: 77 e9 ja 80103110 <mpinit+0xf0>
default:
ismp = 0;
break;
}
}
if(!ismp){
80103127: a1 84 27 11 80 mov 0x80112784,%eax
8010312c: 85 c0 test %eax,%eax
8010312e: 75 70 jne 801031a0 <mpinit+0x180>
// Didn't like what we found; fall back to no MP.
ncpu = 1;
80103130: c7 05 80 2d 11 80 01 movl $0x1,0x80112d80
80103137: 00 00 00
lapic = 0;
8010313a: c7 05 9c 26 11 80 00 movl $0x0,0x8011269c
80103141: 00 00 00
ioapicid = 0;
80103144: c6 05 80 27 11 80 00 movb $0x0,0x80112780
// 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.
}
}
8010314b: 83 c4 1c add $0x1c,%esp
8010314e: 5b pop %ebx
8010314f: 5e pop %esi
80103150: 5f pop %edi
80103151: 5d pop %ebp
80103152: c3 ret
80103153: 90 nop
80103154: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
lapic = (uint*)conf->lapicaddr;
for(p=(uchar*)(conf+1), e=(uchar*)conf+conf->length; p<e; ){
switch(*p){
case MPPROC:
proc = (struct mpproc*)p;
if(ncpu < NCPU) {
80103158: 8b 15 80 2d 11 80 mov 0x80112d80,%edx
8010315e: 83 fa 07 cmp $0x7,%edx
80103161: 7f 17 jg 8010317a <mpinit+0x15a>
cpus[ncpu].apicid = proc->apicid; // apicid may differ from ncpu
80103163: 0f b6 58 01 movzbl 0x1(%eax),%ebx
80103167: 69 d2 bc 00 00 00 imul $0xbc,%edx,%edx
ncpu++;
8010316d: 83 05 80 2d 11 80 01 addl $0x1,0x80112d80
for(p=(uchar*)(conf+1), e=(uchar*)conf+conf->length; p<e; ){
switch(*p){
case MPPROC:
proc = (struct mpproc*)p;
if(ncpu < NCPU) {
cpus[ncpu].apicid = proc->apicid; // apicid may differ from ncpu
80103174: 88 9a a0 27 11 80 mov %bl,-0x7feed860(%edx)
ncpu++;
}
p += sizeof(struct mpproc);
8010317a: 83 c0 14 add $0x14,%eax
continue;
8010317d: eb a4 jmp 80103123 <mpinit+0x103>
8010317f: 90 nop
case MPIOAPIC:
ioapic = (struct mpioapic*)p;
ioapicid = ioapic->apicno;
80103180: 0f b6 50 01 movzbl 0x1(%eax),%edx
p += sizeof(struct mpioapic);
80103184: 83 c0 08 add $0x8,%eax
}
p += sizeof(struct mpproc);
continue;
case MPIOAPIC:
ioapic = (struct mpioapic*)p;
ioapicid = ioapic->apicno;
80103187: 88 15 80 27 11 80 mov %dl,0x80112780
p += sizeof(struct mpioapic);
continue;
8010318d: eb 94 jmp 80103123 <mpinit+0x103>
8010318f: 90 nop
case MPIOINTR:
case MPLINTR:
p += 8;
continue;
default:
ismp = 0;
80103190: c7 05 84 27 11 80 00 movl $0x0,0x80112784
80103197: 00 00 00
break;
8010319a: eb 87 jmp 80103123 <mpinit+0x103>
8010319c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
lapic = 0;
ioapicid = 0;
return;
}
if(mp->imcrp){
801031a0: 80 7f 0c 00 cmpb $0x0,0xc(%edi)
801031a4: 74 a5 je 8010314b <mpinit+0x12b>
}
static inline void
outb(ushort port, uchar data)
{
asm volatile("out %0,%1" : : "a" (data), "d" (port));
801031a6: ba 22 00 00 00 mov $0x22,%edx
801031ab: b8 70 00 00 00 mov $0x70,%eax
801031b0: ee out %al,(%dx)
static inline uchar
inb(ushort port)
{
uchar data;
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
801031b1: b2 23 mov $0x23,%dl
801031b3: ec in (%dx),%al
// 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.
801031b4: 83 c8 01 or $0x1,%eax
}
static inline void
outb(ushort port, uchar data)
{
asm volatile("out %0,%1" : : "a" (data), "d" (port));
801031b7: ee out %al,(%dx)
}
}
801031b8: 83 c4 1c add $0x1c,%esp
801031bb: 5b pop %ebx
801031bc: 5e pop %esi
801031bd: 5f pop %edi
801031be: 5d pop %ebp
801031bf: c3 ret
} else {
p = ((bda[0x14]<<8)|bda[0x13])*1024;
if((mp = mpsearch1(p-1024, 1024)))
return mp;
}
return mpsearch1(0xF0000, 0x10000);
801031c0: ba 00 00 01 00 mov $0x10000,%edx
801031c5: b8 00 00 0f 00 mov $0xf0000,%eax
801031ca: e8 e1 fd ff ff call 80102fb0 <mpsearch1>
mpconfig(struct mp **pmp)
{
struct mpconf *conf;
struct mp *mp;
if((mp = mpsearch()) == 0 || mp->physaddr == 0)
801031cf: 85 c0 test %eax,%eax
} else {
p = ((bda[0x14]<<8)|bda[0x13])*1024;
if((mp = mpsearch1(p-1024, 1024)))
return mp;
}
return mpsearch1(0xF0000, 0x10000);
801031d1: 89 c7 mov %eax,%edi
mpconfig(struct mp **pmp)
{
struct mpconf *conf;
struct mp *mp;
if((mp = mpsearch()) == 0 || mp->physaddr == 0)
801031d3: 0f 85 99 fe ff ff jne 80103072 <mpinit+0x52>
801031d9: e9 6d ff ff ff jmp 8010314b <mpinit+0x12b>
return 0;
conf = (struct mpconf*) P2V((uint) mp->physaddr);
if(memcmp(conf, "PCMP", 4) != 0)
return 0;
if(conf->version != 1 && conf->version != 4)
801031de: 3c 01 cmp $0x1,%al
801031e0: 0f 84 cf fe ff ff je 801030b5 <mpinit+0x95>
801031e6: e9 60 ff ff ff jmp 8010314b <mpinit+0x12b>
801031eb: 66 90 xchg %ax,%ax
801031ed: 66 90 xchg %ax,%ax
801031ef: 90 nop
801031f0 <picenable>:
outb(IO_PIC2+1, mask >> 8);
}
void
picenable(int irq)
{
801031f0: 55 push %ebp
picsetmask(irqmask & ~(1<<irq));
801031f1: b8 fe ff ff ff mov $0xfffffffe,%eax
outb(IO_PIC2+1, mask >> 8);
}
void
picenable(int irq)
{
801031f6: 89 e5 mov %esp,%ebp
801031f8: ba 21 00 00 00 mov $0x21,%edx
picsetmask(irqmask & ~(1<<irq));
801031fd: 8b 4d 08 mov 0x8(%ebp),%ecx
80103200: d3 c0 rol %cl,%eax
80103202: 66 23 05 00 a0 10 80 and 0x8010a000,%ax
static ushort irqmask = 0xFFFF & ~(1<<IRQ_SLAVE);
static void
picsetmask(ushort mask)
{
irqmask = mask;
80103209: 66 a3 00 a0 10 80 mov %ax,0x8010a000
8010320f: ee out %al,(%dx)
outb(IO_PIC1+1, mask);
outb(IO_PIC2+1, mask >> 8);
80103210: 66 c1 e8 08 shr $0x8,%ax
80103214: b2 a1 mov $0xa1,%dl
80103216: ee out %al,(%dx)
void
picenable(int irq)
{
picsetmask(irqmask & ~(1<<irq));
}
80103217: 5d pop %ebp
80103218: c3 ret
80103219: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80103220 <picinit>:
// Initialize the 8259A interrupt controllers.
void
picinit(void)
{
80103220: 55 push %ebp
80103221: b8 ff ff ff ff mov $0xffffffff,%eax
80103226: 89 e5 mov %esp,%ebp
80103228: 57 push %edi
80103229: 56 push %esi
8010322a: 53 push %ebx
8010322b: bb 21 00 00 00 mov $0x21,%ebx
80103230: 89 da mov %ebx,%edx
80103232: ee out %al,(%dx)
80103233: b9 a1 00 00 00 mov $0xa1,%ecx
80103238: 89 ca mov %ecx,%edx
8010323a: ee out %al,(%dx)
8010323b: bf 11 00 00 00 mov $0x11,%edi
80103240: be 20 00 00 00 mov $0x20,%esi
80103245: 89 f8 mov %edi,%eax
80103247: 89 f2 mov %esi,%edx
80103249: ee out %al,(%dx)
8010324a: b8 20 00 00 00 mov $0x20,%eax
8010324f: 89 da mov %ebx,%edx
80103251: ee out %al,(%dx)
80103252: b8 04 00 00 00 mov $0x4,%eax
80103257: ee out %al,(%dx)
80103258: b8 03 00 00 00 mov $0x3,%eax
8010325d: ee out %al,(%dx)
8010325e: b3 a0 mov $0xa0,%bl
80103260: 89 f8 mov %edi,%eax
80103262: 89 da mov %ebx,%edx
80103264: ee out %al,(%dx)
80103265: b8 28 00 00 00 mov $0x28,%eax
8010326a: 89 ca mov %ecx,%edx
8010326c: ee out %al,(%dx)
8010326d: b8 02 00 00 00 mov $0x2,%eax
80103272: ee out %al,(%dx)
80103273: b8 03 00 00 00 mov $0x3,%eax
80103278: ee out %al,(%dx)
80103279: bf 68 00 00 00 mov $0x68,%edi
8010327e: 89 f2 mov %esi,%edx
80103280: 89 f8 mov %edi,%eax
80103282: ee out %al,(%dx)
80103283: b9 0a 00 00 00 mov $0xa,%ecx
80103288: 89 c8 mov %ecx,%eax
8010328a: ee out %al,(%dx)
8010328b: 89 f8 mov %edi,%eax
8010328d: 89 da mov %ebx,%edx
8010328f: ee out %al,(%dx)
80103290: 89 c8 mov %ecx,%eax
80103292: ee out %al,(%dx)
outb(IO_PIC1, 0x0a); // read IRR by default
outb(IO_PIC2, 0x68); // OCW3
outb(IO_PIC2, 0x0a); // OCW3
if(irqmask != 0xFFFF)
80103293: 0f b7 05 00 a0 10 80 movzwl 0x8010a000,%eax
8010329a: 66 83 f8 ff cmp $0xffff,%ax
8010329e: 74 0a je 801032aa <picinit+0x8a>
801032a0: b2 21 mov $0x21,%dl
801032a2: ee out %al,(%dx)
static void
picsetmask(ushort mask)
{
irqmask = mask;
outb(IO_PIC1+1, mask);
outb(IO_PIC2+1, mask >> 8);
801032a3: 66 c1 e8 08 shr $0x8,%ax
801032a7: b2 a1 mov $0xa1,%dl
801032a9: ee out %al,(%dx)
outb(IO_PIC2, 0x68); // OCW3
outb(IO_PIC2, 0x0a); // OCW3
if(irqmask != 0xFFFF)
picsetmask(irqmask);
}
801032aa: 5b pop %ebx
801032ab: 5e pop %esi
801032ac: 5f pop %edi
801032ad: 5d pop %ebp
801032ae: c3 ret
801032af: 90 nop
801032b0 <pipealloc>:
int writeopen; // write fd is still open
};
int
pipealloc(struct file **f0, struct file **f1)
{
801032b0: 55 push %ebp
801032b1: 89 e5 mov %esp,%ebp
801032b3: 57 push %edi
801032b4: 56 push %esi
801032b5: 53 push %ebx
801032b6: 83 ec 1c sub $0x1c,%esp
801032b9: 8b 75 08 mov 0x8(%ebp),%esi
801032bc: 8b 5d 0c mov 0xc(%ebp),%ebx
struct pipe *p;
p = 0;
*f0 = *f1 = 0;
801032bf: c7 03 00 00 00 00 movl $0x0,(%ebx)
801032c5: c7 06 00 00 00 00 movl $0x0,(%esi)
if((*f0 = filealloc()) == 0 || (*f1 = filealloc()) == 0)
801032cb: e8 90 da ff ff call 80100d60 <filealloc>
801032d0: 85 c0 test %eax,%eax
801032d2: 89 06 mov %eax,(%esi)
801032d4: 0f 84 a4 00 00 00 je 8010337e <pipealloc+0xce>
801032da: e8 81 da ff ff call 80100d60 <filealloc>
801032df: 85 c0 test %eax,%eax
801032e1: 89 03 mov %eax,(%ebx)
801032e3: 0f 84 87 00 00 00 je 80103370 <pipealloc+0xc0>
goto bad;
if((p = (struct pipe*)kalloc()) == 0)
801032e9: e8 a2 f1 ff ff call 80102490 <kalloc>
801032ee: 85 c0 test %eax,%eax
801032f0: 89 c7 mov %eax,%edi
801032f2: 74 7c je 80103370 <pipealloc+0xc0>
goto bad;
p->readopen = 1;
<<<<<<< HEAD
8010339b: c7 80 3c 02 00 00 01 movl $0x1,0x23c(%eax)
801033a2: 00 00 00
p->writeopen = 1;
801033a5: c7 80 40 02 00 00 01 movl $0x1,0x240(%eax)
801033ac: 00 00 00
p->nwrite = 0;
801033af: c7 80 38 02 00 00 00 movl $0x0,0x238(%eax)
801033b6: 00 00 00
p->nread = 0;
801033b9: c7 80 34 02 00 00 00 movl $0x0,0x234(%eax)
801033c0: 00 00 00
initlock(&p->lock, "pipe");
801033c3: 68 88 78 10 80 push $0x80107888
801033c8: 50 push %eax
801033c9: e8 22 11 00 00 call 801044f0 <initlock>
(*f0)->type = FD_PIPE;
801033ce: 8b 06 mov (%esi),%eax
(*f0)->pipe = p;
(*f1)->type = FD_PIPE;
(*f1)->readable = 0;
(*f1)->writable = 1;
(*f1)->pipe = p;
return 0;
801033d0: 83 c4 10 add $0x10,%esp
p->readopen = 1;
=======
801032f4: c7 80 3c 02 00 00 01 movl $0x1,0x23c(%eax)
801032fb: 00 00 00
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
p->writeopen = 1;
801032fe: c7 80 40 02 00 00 01 movl $0x1,0x240(%eax)
80103305: 00 00 00
p->nwrite = 0;
80103308: c7 80 38 02 00 00 00 movl $0x0,0x238(%eax)
8010330f: 00 00 00
p->nread = 0;
80103312: c7 80 34 02 00 00 00 movl $0x0,0x234(%eax)
80103319: 00 00 00
initlock(&p->lock, "pipe");
8010331c: 89 04 24 mov %eax,(%esp)
8010331f: c7 44 24 04 08 76 10 movl $0x80107608,0x4(%esp)
80103326: 80
80103327: e8 d4 0f 00 00 call 80104300 <initlock>
(*f0)->type = FD_PIPE;
8010332c: 8b 06 mov (%esi),%eax
8010332e: c7 00 01 00 00 00 movl $0x1,(%eax)
(*f0)->readable = 1;
80103334: 8b 06 mov (%esi),%eax
80103336: c6 40 08 01 movb $0x1,0x8(%eax)
(*f0)->writable = 0;
8010333a: 8b 06 mov (%esi),%eax
8010333c: c6 40 09 00 movb $0x0,0x9(%eax)
(*f0)->pipe = p;
80103340: 8b 06 mov (%esi),%eax
80103342: 89 78 0c mov %edi,0xc(%eax)
(*f1)->type = FD_PIPE;
80103345: 8b 03 mov (%ebx),%eax
80103347: c7 00 01 00 00 00 movl $0x1,(%eax)
(*f1)->readable = 0;
8010334d: 8b 03 mov (%ebx),%eax
8010334f: c6 40 08 00 movb $0x0,0x8(%eax)
(*f1)->writable = 1;
80103353: 8b 03 mov (%ebx),%eax
80103355: c6 40 09 01 movb $0x1,0x9(%eax)
(*f1)->pipe = p;
80103359: 8b 03 mov (%ebx),%eax
return 0;
8010335b: 31 db xor %ebx,%ebx
(*f0)->writable = 0;
(*f0)->pipe = p;
(*f1)->type = FD_PIPE;
(*f1)->readable = 0;
(*f1)->writable = 1;
(*f1)->pipe = p;
8010335d: 89 78 0c mov %edi,0xc(%eax)
if(*f0)
fileclose(*f0);
if(*f1)
fileclose(*f1);
return -1;
}
80103360: 83 c4 1c add $0x1c,%esp
80103363: 89 d8 mov %ebx,%eax
80103365: 5b pop %ebx
80103366: 5e pop %esi
80103367: 5f pop %edi
80103368: 5d pop %ebp
80103369: c3 ret
8010336a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
//PAGEBREAK: 20
bad:
if(p)
kfree((char*)p);
if(*f0)
80103370: 8b 06 mov (%esi),%eax
80103372: 85 c0 test %eax,%eax
80103374: 74 08 je 8010337e <pipealloc+0xce>
fileclose(*f0);
80103376: 89 04 24 mov %eax,(%esp)
80103379: e8 a2 da ff ff call 80100e20 <fileclose>
if(*f1)
8010337e: 8b 03 mov (%ebx),%eax
fileclose(*f1);
return -1;
80103380: bb ff ff ff ff mov $0xffffffff,%ebx
bad:
if(p)
kfree((char*)p);
if(*f0)
fileclose(*f0);
if(*f1)
80103385: 85 c0 test %eax,%eax
80103387: 74 d7 je 80103360 <pipealloc+0xb0>
fileclose(*f1);
80103389: 89 04 24 mov %eax,(%esp)
8010338c: e8 8f da ff ff call 80100e20 <fileclose>
return -1;
}
80103391: 83 c4 1c add $0x1c,%esp
80103394: 89 d8 mov %ebx,%eax
80103396: 5b pop %ebx
80103397: 5e pop %esi
80103398: 5f pop %edi
80103399: 5d pop %ebp
8010339a: c3 ret
8010339b: 90 nop
8010339c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801033a0 <pipeclose>:
void
pipeclose(struct pipe *p, int writable)
{
801033a0: 55 push %ebp
801033a1: 89 e5 mov %esp,%ebp
801033a3: 56 push %esi
801033a4: 53 push %ebx
801033a5: 83 ec 10 sub $0x10,%esp
801033a8: 8b 5d 08 mov 0x8(%ebp),%ebx
801033ab: 8b 75 0c mov 0xc(%ebp),%esi
acquire(&p->lock);
<<<<<<< HEAD
8010345b: 83 ec 0c sub $0xc,%esp
8010345e: 53 push %ebx
8010345f: e8 ac 10 00 00 call 80104510 <acquire>
=======
801033ae: 89 1c 24 mov %ebx,(%esp)
801033b1: e8 ca 0f 00 00 call 80104380 <acquire>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
if(writable){
801033b6: 85 f6 test %esi,%esi
801033b8: 74 3e je 801033f8 <pipeclose+0x58>
p->writeopen = 0;
wakeup(&p->nread);
801033ba: 8d 83 34 02 00 00 lea 0x234(%ebx),%eax
void
pipeclose(struct pipe *p, int writable)
{
acquire(&p->lock);
if(writable){
p->writeopen = 0;
801033c0: c7 83 40 02 00 00 00 movl $0x0,0x240(%ebx)
801033c7: 00 00 00
wakeup(&p->nread);
<<<<<<< HEAD
8010347e: 50 push %eax
8010347f: e8 6c 0c 00 00 call 801040f0 <wakeup>
80103484: 83 c4 10 add $0x10,%esp
=======
801033ca: 89 04 24 mov %eax,(%esp)
801033cd: e8 0e 0b 00 00 call 80103ee0 <wakeup>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
} else {
p->readopen = 0;
wakeup(&p->nwrite);
}
if(p->readopen == 0 && p->writeopen == 0){
801033d2: 8b 93 3c 02 00 00 mov 0x23c(%ebx),%edx
801033d8: 85 d2 test %edx,%edx
801033da: 75 0a jne 801033e6 <pipeclose+0x46>
801033dc: 8b 83 40 02 00 00 mov 0x240(%ebx),%eax
801033e2: 85 c0 test %eax,%eax
801033e4: 74 32 je 80103418 <pipeclose+0x78>
release(&p->lock);
kfree((char*)p);
} else
release(&p->lock);
801033e6: 89 5d 08 mov %ebx,0x8(%ebp)
}
801033e9: 83 c4 10 add $0x10,%esp
801033ec: 5b pop %ebx
801033ed: 5e pop %esi
801033ee: 5d pop %ebp
}
if(p->readopen == 0 && p->writeopen == 0){
release(&p->lock);
kfree((char*)p);
} else
release(&p->lock);
<<<<<<< HEAD
801034a4: e9 47 12 00 00 jmp 801046f0 <release>
801034a9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
=======
801033ef: e9 bc 10 00 00 jmp 801044b0 <release>
801033f4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
if(writable){
p->writeopen = 0;
wakeup(&p->nread);
} else {
p->readopen = 0;
wakeup(&p->nwrite);
801033f8: 8d 83 38 02 00 00 lea 0x238(%ebx),%eax
acquire(&p->lock);
if(writable){
p->writeopen = 0;
wakeup(&p->nread);
} else {
p->readopen = 0;
801033fe: c7 83 3c 02 00 00 00 movl $0x0,0x23c(%ebx)
80103405: 00 00 00
wakeup(&p->nwrite);
<<<<<<< HEAD
801034c3: 50 push %eax
801034c4: e8 27 0c 00 00 call 801040f0 <wakeup>
801034c9: 83 c4 10 add $0x10,%esp
801034cc: eb b9 jmp 80103487 <pipeclose+0x37>
801034ce: 66 90 xchg %ax,%ax
}
if(p->readopen == 0 && p->writeopen == 0){
release(&p->lock);
801034d0: 83 ec 0c sub $0xc,%esp
801034d3: 53 push %ebx
801034d4: e8 17 12 00 00 call 801046f0 <release>
=======
80103408: 89 04 24 mov %eax,(%esp)
8010340b: e8 d0 0a 00 00 call 80103ee0 <wakeup>
80103410: eb c0 jmp 801033d2 <pipeclose+0x32>
80103412: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
}
if(p->readopen == 0 && p->writeopen == 0){
release(&p->lock);
80103418: 89 1c 24 mov %ebx,(%esp)
8010341b: e8 90 10 00 00 call 801044b0 <release>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
kfree((char*)p);
80103420: 89 5d 08 mov %ebx,0x8(%ebp)
} else
release(&p->lock);
}
80103423: 83 c4 10 add $0x10,%esp
80103426: 5b pop %ebx
80103427: 5e pop %esi
80103428: 5d pop %ebp
p->readopen = 0;
wakeup(&p->nwrite);
}
if(p->readopen == 0 && p->writeopen == 0){
release(&p->lock);
kfree((char*)p);
80103429: e9 b2 ee ff ff jmp 801022e0 <kfree>
8010342e: 66 90 xchg %ax,%ax
80103430 <pipewrite>:
}
//PAGEBREAK: 40
int
pipewrite(struct pipe *p, char *addr, int n)
{
80103430: 55 push %ebp
80103431: 89 e5 mov %esp,%ebp
80103433: 57 push %edi
80103434: 56 push %esi
80103435: 53 push %ebx
80103436: 83 ec 1c sub $0x1c,%esp
80103439: 8b 7d 08 mov 0x8(%ebp),%edi
int i;
acquire(&p->lock);
<<<<<<< HEAD
801034fc: 57 push %edi
801034fd: e8 0e 10 00 00 call 80104510 <acquire>
=======
8010343c: 89 3c 24 mov %edi,(%esp)
8010343f: e8 3c 0f 00 00 call 80104380 <acquire>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
for(i = 0; i < n; i++){
80103444: 8b 45 10 mov 0x10(%ebp),%eax
80103447: 85 c0 test %eax,%eax
80103449: 0f 8e c2 00 00 00 jle 80103511 <pipewrite+0xe1>
8010344f: 8b 45 0c mov 0xc(%ebp),%eax
80103452: 8d b7 34 02 00 00 lea 0x234(%edi),%esi
80103458: 8b 8f 38 02 00 00 mov 0x238(%edi),%ecx
8010345e: 8d 9f 38 02 00 00 lea 0x238(%edi),%ebx
80103464: 89 45 e4 mov %eax,-0x1c(%ebp)
80103467: 03 45 10 add 0x10(%ebp),%eax
8010346a: 89 45 e0 mov %eax,-0x20(%ebp)
while(p->nwrite == p->nread + PIPESIZE){ //DOC: pipewrite-full
8010346d: 8b 87 34 02 00 00 mov 0x234(%edi),%eax
80103473: 8d 90 00 02 00 00 lea 0x200(%eax),%edx
80103479: 39 d1 cmp %edx,%ecx
8010347b: 0f 85 c4 00 00 00 jne 80103545 <pipewrite+0x115>
if(p->readopen == 0 || proc->killed){
80103481: 8b 97 3c 02 00 00 mov 0x23c(%edi),%edx
80103487: 85 d2 test %edx,%edx
80103489: 0f 84 a1 00 00 00 je 80103530 <pipewrite+0x100>
8010348f: 65 8b 15 04 00 00 00 mov %gs:0x4,%edx
80103496: 8b 42 24 mov 0x24(%edx),%eax
80103499: 85 c0 test %eax,%eax
8010349b: 74 22 je 801034bf <pipewrite+0x8f>
8010349d: e9 8e 00 00 00 jmp 80103530 <pipewrite+0x100>
801034a2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801034a8: 8b 87 3c 02 00 00 mov 0x23c(%edi),%eax
801034ae: 85 c0 test %eax,%eax
801034b0: 74 7e je 80103530 <pipewrite+0x100>
801034b2: 65 a1 04 00 00 00 mov %gs:0x4,%eax
801034b8: 8b 48 24 mov 0x24(%eax),%ecx
801034bb: 85 c9 test %ecx,%ecx
801034bd: 75 71 jne 80103530 <pipewrite+0x100>
release(&p->lock);
return -1;
}
wakeup(&p->nread);
<<<<<<< HEAD
80103583: 83 ec 0c sub $0xc,%esp
80103586: 56 push %esi
80103587: e8 64 0b 00 00 call 801040f0 <wakeup>
sleep(&p->nwrite, &p->lock); //DOC: pipewrite-sleep
8010358c: 59 pop %ecx
8010358d: 58 pop %eax
8010358e: 57 push %edi
8010358f: 53 push %ebx
80103590: e8 bb 09 00 00 call 80103f50 <sleep>
=======
801034bf: 89 34 24 mov %esi,(%esp)
801034c2: e8 19 0a 00 00 call 80103ee0 <wakeup>
sleep(&p->nwrite, &p->lock); //DOC: pipewrite-sleep
801034c7: 89 7c 24 04 mov %edi,0x4(%esp)
801034cb: 89 1c 24 mov %ebx,(%esp)
801034ce: e8 6d 08 00 00 call 80103d40 <sleep>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
{
int i;
acquire(&p->lock);
for(i = 0; i < n; i++){
while(p->nwrite == p->nread + PIPESIZE){ //DOC: pipewrite-full
801034d3: 8b 87 34 02 00 00 mov 0x234(%edi),%eax
801034d9: 8b 97 38 02 00 00 mov 0x238(%edi),%edx
801034df: 05 00 02 00 00 add $0x200,%eax
801034e4: 39 c2 cmp %eax,%edx
801034e6: 74 c0 je 801034a8 <pipewrite+0x78>
return -1;
}
wakeup(&p->nread);
sleep(&p->nwrite, &p->lock); //DOC: pipewrite-sleep
}
p->data[p->nwrite++ % PIPESIZE] = addr[i];
801034e8: 8b 45 e4 mov -0x1c(%ebp),%eax
801034eb: 8d 4a 01 lea 0x1(%edx),%ecx
801034ee: 81 e2 ff 01 00 00 and $0x1ff,%edx
801034f4: 89 8f 38 02 00 00 mov %ecx,0x238(%edi)
801034fa: 83 45 e4 01 addl $0x1,-0x1c(%ebp)
801034fe: 0f b6 00 movzbl (%eax),%eax
80103501: 88 44 17 34 mov %al,0x34(%edi,%edx,1)
pipewrite(struct pipe *p, char *addr, int n)
{
int i;
acquire(&p->lock);
for(i = 0; i < n; i++){
80103505: 8b 45 e4 mov -0x1c(%ebp),%eax
80103508: 3b 45 e0 cmp -0x20(%ebp),%eax
8010350b: 0f 85 5c ff ff ff jne 8010346d <pipewrite+0x3d>
wakeup(&p->nread);
sleep(&p->nwrite, &p->lock); //DOC: pipewrite-sleep
}
p->data[p->nwrite++ % PIPESIZE] = addr[i];
}
wakeup(&p->nread); //DOC: pipewrite-wakeup1
<<<<<<< HEAD
801035d6: 8d 97 34 02 00 00 lea 0x234(%edi),%edx
801035dc: 83 ec 0c sub $0xc,%esp
801035df: 52 push %edx
801035e0: e8 0b 0b 00 00 call 801040f0 <wakeup>
release(&p->lock);
801035e5: 89 3c 24 mov %edi,(%esp)
801035e8: e8 03 11 00 00 call 801046f0 <release>
=======
80103511: 8d 97 34 02 00 00 lea 0x234(%edi),%edx
80103517: 89 14 24 mov %edx,(%esp)
8010351a: e8 c1 09 00 00 call 80103ee0 <wakeup>
release(&p->lock);
8010351f: 89 3c 24 mov %edi,(%esp)
80103522: e8 89 0f 00 00 call 801044b0 <release>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
return n;
80103527: 8b 45 10 mov 0x10(%ebp),%eax
8010352a: eb 11 jmp 8010353d <pipewrite+0x10d>
8010352c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
acquire(&p->lock);
for(i = 0; i < n; i++){
while(p->nwrite == p->nread + PIPESIZE){ //DOC: pipewrite-full
if(p->readopen == 0 || proc->killed){
release(&p->lock);
<<<<<<< HEAD
801035f8: 83 ec 0c sub $0xc,%esp
801035fb: 57 push %edi
801035fc: e8 ef 10 00 00 call 801046f0 <release>
=======
80103530: 89 3c 24 mov %edi,(%esp)
80103533: e8 78 0f 00 00 call 801044b0 <release>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
return -1;
80103538: b8 ff ff ff ff mov $0xffffffff,%eax
p->data[p->nwrite++ % PIPESIZE] = addr[i];
}
wakeup(&p->nread); //DOC: pipewrite-wakeup1
release(&p->lock);
return n;
}
8010353d: 83 c4 1c add $0x1c,%esp
80103540: 5b pop %ebx
80103541: 5e pop %esi
80103542: 5f pop %edi
80103543: 5d pop %ebp
80103544: c3 ret
{
int i;
acquire(&p->lock);
for(i = 0; i < n; i++){
while(p->nwrite == p->nread + PIPESIZE){ //DOC: pipewrite-full
80103545: 89 ca mov %ecx,%edx
80103547: eb 9f jmp 801034e8 <pipewrite+0xb8>
80103549: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80103550 <piperead>:
return n;
}
int
piperead(struct pipe *p, char *addr, int n)
{
80103550: 55 push %ebp
80103551: 89 e5 mov %esp,%ebp
80103553: 57 push %edi
80103554: 56 push %esi
80103555: 53 push %ebx
80103556: 83 ec 1c sub $0x1c,%esp
80103559: 8b 75 08 mov 0x8(%ebp),%esi
8010355c: 8b 7d 0c mov 0xc(%ebp),%edi
int i;
acquire(&p->lock);
<<<<<<< HEAD
8010362f: 53 push %ebx
80103630: e8 db 0e 00 00 call 80104510 <acquire>
=======
8010355f: 89 34 24 mov %esi,(%esp)
80103562: e8 19 0e 00 00 call 80104380 <acquire>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
while(p->nread == p->nwrite && p->writeopen){ //DOC: pipe-empty
80103567: 8b 86 34 02 00 00 mov 0x234(%esi),%eax
8010356d: 3b 86 38 02 00 00 cmp 0x238(%esi),%eax
80103573: 75 5b jne 801035d0 <piperead+0x80>
80103575: 8b 9e 40 02 00 00 mov 0x240(%esi),%ebx
8010357b: 85 db test %ebx,%ebx
8010357d: 74 51 je 801035d0 <piperead+0x80>
8010357f: 8d 9e 34 02 00 00 lea 0x234(%esi),%ebx
80103585: eb 25 jmp 801035ac <piperead+0x5c>
80103587: 90 nop
if(proc->killed){
release(&p->lock);
return -1;
}
sleep(&p->nread, &p->lock); //DOC: piperead-sleep
<<<<<<< HEAD
80103660: 83 ec 08 sub $0x8,%esp
80103663: 53 push %ebx
80103664: 56 push %esi
80103665: e8 e6 08 00 00 call 80103f50 <sleep>
=======
80103588: 89 74 24 04 mov %esi,0x4(%esp)
8010358c: 89 1c 24 mov %ebx,(%esp)
8010358f: e8 ac 07 00 00 call 80103d40 <sleep>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
piperead(struct pipe *p, char *addr, int n)
{
int i;
acquire(&p->lock);
while(p->nread == p->nwrite && p->writeopen){ //DOC: pipe-empty
80103594: 8b 86 34 02 00 00 mov 0x234(%esi),%eax
8010359a: 3b 86 38 02 00 00 cmp 0x238(%esi),%eax
801035a0: 75 2e jne 801035d0 <piperead+0x80>
801035a2: 8b 96 40 02 00 00 mov 0x240(%esi),%edx
801035a8: 85 d2 test %edx,%edx
801035aa: 74 24 je 801035d0 <piperead+0x80>
if(proc->killed){
801035ac: 65 a1 04 00 00 00 mov %gs:0x4,%eax
801035b2: 8b 48 24 mov 0x24(%eax),%ecx
801035b5: 85 c9 test %ecx,%ecx
801035b7: 74 cf je 80103588 <piperead+0x38>
release(&p->lock);
<<<<<<< HEAD
80103697: 83 ec 0c sub $0xc,%esp
8010369a: 53 push %ebx
8010369b: e8 50 10 00 00 call 801046f0 <release>
return -1;
801036a0: 83 c4 10 add $0x10,%esp
=======
801035b9: 89 34 24 mov %esi,(%esp)
801035bc: e8 ef 0e 00 00 call 801044b0 <release>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
addr[i] = p->data[p->nread++ % PIPESIZE];
}
wakeup(&p->nwrite); //DOC: piperead-wakeup
release(&p->lock);
return i;
}
801035c1: 83 c4 1c add $0x1c,%esp
acquire(&p->lock);
while(p->nread == p->nwrite && p->writeopen){ //DOC: pipe-empty
if(proc->killed){
release(&p->lock);
return -1;
801035c4: b8 ff ff ff ff mov $0xffffffff,%eax
addr[i] = p->data[p->nread++ % PIPESIZE];
}
wakeup(&p->nwrite); //DOC: piperead-wakeup
release(&p->lock);
return i;
}
801035c9: 5b pop %ebx
801035ca: 5e pop %esi
801035cb: 5f pop %edi
801035cc: 5d pop %ebp
801035cd: c3 ret
801035ce: 66 90 xchg %ax,%ax
release(&p->lock);
return -1;
}
sleep(&p->nread, &p->lock); //DOC: piperead-sleep
}
for(i = 0; i < n; i++){ //DOC: piperead-copy
801035d0: 8b 55 10 mov 0x10(%ebp),%edx
if(p->nread == p->nwrite)
801035d3: 31 db xor %ebx,%ebx
release(&p->lock);
return -1;
}
sleep(&p->nread, &p->lock); //DOC: piperead-sleep
}
for(i = 0; i < n; i++){ //DOC: piperead-copy
801035d5: 85 d2 test %edx,%edx
801035d7: 7f 2b jg 80103604 <piperead+0xb4>
801035d9: eb 31 jmp 8010360c <piperead+0xbc>
801035db: 90 nop
801035dc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if(p->nread == p->nwrite)
break;
addr[i] = p->data[p->nread++ % PIPESIZE];
801035e0: 8d 48 01 lea 0x1(%eax),%ecx
801035e3: 25 ff 01 00 00 and $0x1ff,%eax
801035e8: 89 8e 34 02 00 00 mov %ecx,0x234(%esi)
801035ee: 0f b6 44 06 34 movzbl 0x34(%esi,%eax,1),%eax
801035f3: 88 04 1f mov %al,(%edi,%ebx,1)
release(&p->lock);
return -1;
}
sleep(&p->nread, &p->lock); //DOC: piperead-sleep
}
for(i = 0; i < n; i++){ //DOC: piperead-copy
801035f6: 83 c3 01 add $0x1,%ebx
801035f9: 3b 5d 10 cmp 0x10(%ebp),%ebx
801035fc: 74 0e je 8010360c <piperead+0xbc>
if(p->nread == p->nwrite)
801035fe: 8b 86 34 02 00 00 mov 0x234(%esi),%eax
80103604: 3b 86 38 02 00 00 cmp 0x238(%esi),%eax
8010360a: 75 d4 jne 801035e0 <piperead+0x90>
break;
addr[i] = p->data[p->nread++ % PIPESIZE];
}
wakeup(&p->nwrite); //DOC: piperead-wakeup
<<<<<<< HEAD
801036f5: 8d 93 38 02 00 00 lea 0x238(%ebx),%edx
801036fb: 83 ec 0c sub $0xc,%esp
801036fe: 52 push %edx
801036ff: e8 ec 09 00 00 call 801040f0 <wakeup>
release(&p->lock);
80103704: 89 1c 24 mov %ebx,(%esp)
80103707: e8 e4 0f 00 00 call 801046f0 <release>
=======
8010360c: 8d 86 38 02 00 00 lea 0x238(%esi),%eax
80103612: 89 04 24 mov %eax,(%esp)
80103615: e8 c6 08 00 00 call 80103ee0 <wakeup>
release(&p->lock);
8010361a: 89 34 24 mov %esi,(%esp)
8010361d: e8 8e 0e 00 00 call 801044b0 <release>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
return i;
}
80103622: 83 c4 1c add $0x1c,%esp
break;
addr[i] = p->data[p->nread++ % PIPESIZE];
}
wakeup(&p->nwrite); //DOC: piperead-wakeup
release(&p->lock);
return i;
80103625: 89 d8 mov %ebx,%eax
}
80103627: 5b pop %ebx
80103628: 5e pop %esi
80103629: 5f pop %edi
8010362a: 5d pop %ebp
8010362b: c3 ret
8010362c: 66 90 xchg %ax,%ax
8010362e: 66 90 xchg %ax,%ax
80103630 <allocproc>:
// If found, change state to EMBRYO and initialize
// state required to run in the kernel.
// Otherwise return 0.
static struct proc*
allocproc(void)
{
80103630: 55 push %ebp
80103631: 89 e5 mov %esp,%ebp
80103633: 53 push %ebx
struct proc *p;
char *sp;
acquire(&ptable.lock);
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
80103634: bb d4 2d 11 80 mov $0x80112dd4,%ebx
// If found, change state to EMBRYO and initialize
// state required to run in the kernel.
// Otherwise return 0.
static struct proc*
allocproc(void)
{
80103639: 83 ec 14 sub $0x14,%esp
struct proc *p;
char *sp;
acquire(&ptable.lock);
<<<<<<< HEAD
8010374c: 68 a0 2d 11 80 push $0x80112da0
80103751: e8 ba 0d 00 00 call 80104510 <acquire>
80103756: 83 c4 10 add $0x10,%esp
80103759: eb 10 jmp 8010376b <allocproc+0x2b>
8010375b: 90 nop
8010375c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
=======
8010363c: c7 04 24 a0 2d 11 80 movl $0x80112da0,(%esp)
80103643: e8 38 0d 00 00 call 80104380 <acquire>
80103648: eb 11 jmp 8010365b <allocproc+0x2b>
8010364a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
80103650: 83 eb 80 sub $0xffffff80,%ebx
80103653: 81 fb d4 4d 11 80 cmp $0x80114dd4,%ebx
80103659: 74 7d je 801036d8 <allocproc+0xa8>
if(p->state == UNUSED)
8010365b: 8b 43 0c mov 0xc(%ebx),%eax
8010365e: 85 c0 test %eax,%eax
80103660: 75 ee jne 80103650 <allocproc+0x20>
release(&ptable.lock);
return 0;
found:
p->state = EMBRYO;
p->pid = nextpid++;
80103662: a1 08 a0 10 80 mov 0x8010a008,%eax
release(&ptable.lock);
80103667: c7 04 24 a0 2d 11 80 movl $0x80112da0,(%esp)
release(&ptable.lock);
return 0;
found:
p->state = EMBRYO;
8010366e: c7 43 0c 01 00 00 00 movl $0x1,0xc(%ebx)
p->pid = nextpid++;
80103675: 8d 50 01 lea 0x1(%eax),%edx
80103678: 89 15 08 a0 10 80 mov %edx,0x8010a008
8010367e: 89 43 10 mov %eax,0x10(%ebx)
release(&ptable.lock);
<<<<<<< HEAD
80103792: e8 59 0f 00 00 call 801046f0 <release>
=======
80103681: e8 2a 0e 00 00 call 801044b0 <release>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// Allocate kernel stack.
if((p->kstack = kalloc()) == 0){
80103686: e8 05 ee ff ff call 80102490 <kalloc>
8010368b: 85 c0 test %eax,%eax
8010368d: 89 43 08 mov %eax,0x8(%ebx)
80103690: 74 5a je 801036ec <allocproc+0xbc>
return 0;
}
sp = p->kstack + KSTACKSIZE;
// Leave room for trap frame.
sp -= sizeof *p->tf;
80103692: 8d 90 b4 0f 00 00 lea 0xfb4(%eax),%edx
// Set up new context to start executing at forkret,
// which returns to trapret.
sp -= 4;
*(uint*)sp = (uint)trapret;
sp -= sizeof *p->context;
80103698: 05 9c 0f 00 00 add $0xf9c,%eax
return 0;
}
sp = p->kstack + KSTACKSIZE;
// Leave room for trap frame.
sp -= sizeof *p->tf;
8010369d: 89 53 18 mov %edx,0x18(%ebx)
p->tf = (struct trapframe*)sp;
// Set up new context to start executing at forkret,
// which returns to trapret.
sp -= 4;
*(uint*)sp = (uint)trapret;
<<<<<<< HEAD
801037b7: c7 40 14 9e 5a 10 80 movl $0x80105a9e,0x14(%eax)
=======
801036a0: c7 40 14 3d 58 10 80 movl $0x8010583d,0x14(%eax)
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
sp -= sizeof *p->context;
p->context = (struct context*)sp;
memset(p->context, 0, sizeof *p->context);
801036a7: c7 44 24 08 14 00 00 movl $0x14,0x8(%esp)
801036ae: 00
801036af: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
801036b6: 00
801036b7: 89 04 24 mov %eax,(%esp)
// which returns to trapret.
sp -= 4;
*(uint*)sp = (uint)trapret;
sp -= sizeof *p->context;
p->context = (struct context*)sp;
801036ba: 89 43 1c mov %eax,0x1c(%ebx)
memset(p->context, 0, sizeof *p->context);
<<<<<<< HEAD
801037c6: e8 75 0f 00 00 call 80104740 <memset>
=======
801036bd: e8 3e 0e 00 00 call 80104500 <memset>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
p->context->eip = (uint)forkret;
801036c2: 8b 43 1c mov 0x1c(%ebx),%eax
801036c5: c7 40 10 00 37 10 80 movl $0x80103700,0x10(%eax)
return p;
801036cc: 89 d8 mov %ebx,%eax
}
801036ce: 83 c4 14 add $0x14,%esp
801036d1: 5b pop %ebx
801036d2: 5d pop %ebp
801036d3: c3 ret
801036d4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
if(p->state == UNUSED)
goto found;
release(&ptable.lock);
801036d8: c7 04 24 a0 2d 11 80 movl $0x80112da0,(%esp)
801036df: e8 cc 0d 00 00 call 801044b0 <release>
p->context = (struct context*)sp;
memset(p->context, 0, sizeof *p->context);
p->context->eip = (uint)forkret;
return p;
}
801036e4: 83 c4 14 add $0x14,%esp
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
if(p->state == UNUSED)
goto found;
release(&ptable.lock);
<<<<<<< HEAD
801037e0: 83 ec 0c sub $0xc,%esp
801037e3: 68 a0 2d 11 80 push $0x80112da0
801037e8: e8 03 0f 00 00 call 801046f0 <release>
=======
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
return 0;
801036e7: 31 c0 xor %eax,%eax
p->context = (struct context*)sp;
memset(p->context, 0, sizeof *p->context);
p->context->eip = (uint)forkret;
return p;
}
801036e9: 5b pop %ebx
801036ea: 5d pop %ebp
801036eb: c3 ret
release(&ptable.lock);
// Allocate kernel stack.
if((p->kstack = kalloc()) == 0){
p->state = UNUSED;
801036ec: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
return 0;
801036f3: eb d9 jmp 801036ce <allocproc+0x9e>
801036f5: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801036f9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80103700 <forkret>:
// A fork child's very first scheduling by scheduler()
// will swtch here. "Return" to user space.
void
forkret(void)
{
80103700: 55 push %ebp
80103701: 89 e5 mov %esp,%ebp
80103703: 83 ec 18 sub $0x18,%esp
static int first = 1;
// Still holding ptable.lock from scheduler.
release(&ptable.lock);
<<<<<<< HEAD
80103806: 68 a0 2d 11 80 push $0x80112da0
8010380b: e8 e0 0e 00 00 call 801046f0 <release>
=======
80103706: c7 04 24 a0 2d 11 80 movl $0x80112da0,(%esp)
8010370d: e8 9e 0d 00 00 call 801044b0 <release>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
if (first) {
80103712: a1 04 a0 10 80 mov 0x8010a004,%eax
80103717: 85 c0 test %eax,%eax
80103719: 75 05 jne 80103720 <forkret+0x20>
iinit(ROOTDEV);
initlog(ROOTDEV);
}
// Return to "caller", actually trapret (see allocproc).
}
8010371b: c9 leave
8010371c: c3 ret
8010371d: 8d 76 00 lea 0x0(%esi),%esi
if (first) {
// 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;
iinit(ROOTDEV);
80103720: c7 04 24 01 00 00 00 movl $0x1,(%esp)
if (first) {
// 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;
80103727: c7 05 04 a0 10 80 00 movl $0x0,0x8010a004
8010372e: 00 00 00
iinit(ROOTDEV);
80103731: e8 3a dd ff ff call 80101470 <iinit>
initlog(ROOTDEV);
80103736: c7 04 24 01 00 00 00 movl $0x1,(%esp)
8010373d: e8 9e f3 ff ff call 80102ae0 <initlog>
}
// Return to "caller", actually trapret (see allocproc).
}
80103742: c9 leave
80103743: c3 ret
80103744: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
8010374a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
80103750 <pinit>:
static void wakeup1(void *chan);
void
pinit(void)
{
80103750: 55 push %ebp
80103751: 89 e5 mov %esp,%ebp
80103753: 83 ec 18 sub $0x18,%esp
initlock(&ptable.lock, "ptable");
<<<<<<< HEAD
80103856: 68 8d 78 10 80 push $0x8010788d
8010385b: 68 a0 2d 11 80 push $0x80112da0
80103860: e8 8b 0c 00 00 call 801044f0 <initlock>
=======
80103756: c7 44 24 04 0d 76 10 movl $0x8010760d,0x4(%esp)
8010375d: 80
8010375e: c7 04 24 a0 2d 11 80 movl $0x80112da0,(%esp)
80103765: e8 96 0b 00 00 call 80104300 <initlock>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
}
8010376a: c9 leave
8010376b: c3 ret
8010376c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80103770 <userinit>:
//PAGEBREAK: 32
// Set up first user process.
void
userinit(void)
{
80103770: 55 push %ebp
80103771: 89 e5 mov %esp,%ebp
80103773: 53 push %ebx
80103774: 83 ec 14 sub $0x14,%esp
struct proc *p;
extern char _binary_initcode_start[], _binary_initcode_size[];
p = allocproc();
<<<<<<< HEAD
80103877: e8 c4 fe ff ff call 80103740 <allocproc>
8010387c: 89 c3 mov %eax,%ebx
initproc = p;
8010387e: a3 bc a5 10 80 mov %eax,0x8010a5bc
if((p->pgdir = setupkvm()) == 0)
80103883: e8 48 34 00 00 call 80106cd0 <setupkvm>
80103888: 85 c0 test %eax,%eax
8010388a: 89 43 04 mov %eax,0x4(%ebx)
8010388d: 0f 84 bd 00 00 00 je 80103950 <userinit+0xe0>
panic("userinit: out of memory?");
inituvm(p->pgdir, _binary_initcode_start, (int)_binary_initcode_size);
80103893: 83 ec 04 sub $0x4,%esp
80103896: 68 2c 00 00 00 push $0x2c
8010389b: 68 60 a4 10 80 push $0x8010a460
801038a0: 50 push %eax
801038a1: e8 aa 35 00 00 call 80106e50 <inituvm>
p->sz = PGSIZE;
memset(p->tf, 0, sizeof(*p->tf));
801038a6: 83 c4 0c add $0xc,%esp
=======
80103777: e8 b4 fe ff ff call 80103630 <allocproc>
8010377c: 89 c3 mov %eax,%ebx
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
initproc = p;
8010377e: a3 bc a5 10 80 mov %eax,0x8010a5bc
if((p->pgdir = setupkvm()) == 0)
80103783: e8 c8 32 00 00 call 80106a50 <setupkvm>
80103788: 85 c0 test %eax,%eax
8010378a: 89 43 04 mov %eax,0x4(%ebx)
8010378d: 0f 84 d4 00 00 00 je 80103867 <userinit+0xf7>
panic("userinit: out of memory?");
inituvm(p->pgdir, _binary_initcode_start, (int)_binary_initcode_size);
80103793: 89 04 24 mov %eax,(%esp)
80103796: c7 44 24 08 2c 00 00 movl $0x2c,0x8(%esp)
8010379d: 00
8010379e: c7 44 24 04 60 a4 10 movl $0x8010a460,0x4(%esp)
801037a5: 80
801037a6: e8 25 34 00 00 call 80106bd0 <inituvm>
p->sz = PGSIZE;
801037ab: c7 03 00 10 00 00 movl $0x1000,(%ebx)
memset(p->tf, 0, sizeof(*p->tf));
<<<<<<< HEAD
801038af: 6a 4c push $0x4c
801038b1: 6a 00 push $0x0
801038b3: ff 73 18 pushl 0x18(%ebx)
801038b6: e8 85 0e 00 00 call 80104740 <memset>
=======
801037b1: c7 44 24 08 4c 00 00 movl $0x4c,0x8(%esp)
801037b8: 00
801037b9: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
801037c0: 00
801037c1: 8b 43 18 mov 0x18(%ebx),%eax
801037c4: 89 04 24 mov %eax,(%esp)
801037c7: e8 34 0d 00 00 call 80104500 <memset>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
p->tf->cs = (SEG_UCODE << 3) | DPL_USER;
801037cc: 8b 43 18 mov 0x18(%ebx),%eax
801037cf: ba 23 00 00 00 mov $0x23,%edx
p->tf->ds = (SEG_UDATA << 3) | DPL_USER;
801037d4: b9 2b 00 00 00 mov $0x2b,%ecx
if((p->pgdir = setupkvm()) == 0)
panic("userinit: out of memory?");
inituvm(p->pgdir, _binary_initcode_start, (int)_binary_initcode_size);
p->sz = PGSIZE;
memset(p->tf, 0, sizeof(*p->tf));
p->tf->cs = (SEG_UCODE << 3) | DPL_USER;
801037d9: 66 89 50 3c mov %dx,0x3c(%eax)
p->tf->ds = (SEG_UDATA << 3) | DPL_USER;
801037dd: 8b 43 18 mov 0x18(%ebx),%eax
801037e0: 66 89 48 2c mov %cx,0x2c(%eax)
p->tf->es = p->tf->ds;
801037e4: 8b 43 18 mov 0x18(%ebx),%eax
801037e7: 0f b7 50 2c movzwl 0x2c(%eax),%edx
801037eb: 66 89 50 28 mov %dx,0x28(%eax)
p->tf->ss = p->tf->ds;
801037ef: 8b 43 18 mov 0x18(%ebx),%eax
801037f2: 0f b7 50 2c movzwl 0x2c(%eax),%edx
801037f6: 66 89 50 48 mov %dx,0x48(%eax)
p->tf->eflags = FL_IF;
801037fa: 8b 43 18 mov 0x18(%ebx),%eax
801037fd: c7 40 40 00 02 00 00 movl $0x200,0x40(%eax)
p->tf->esp = PGSIZE;
80103804: 8b 43 18 mov 0x18(%ebx),%eax
80103807: c7 40 44 00 10 00 00 movl $0x1000,0x44(%eax)
p->tf->eip = 0; // beginning of initcode.S
8010380e: 8b 43 18 mov 0x18(%ebx),%eax
80103811: c7 40 38 00 00 00 00 movl $0x0,0x38(%eax)
safestrcpy(p->name, "initcode", sizeof(p->name));
<<<<<<< HEAD
8010390a: 8d 43 6c lea 0x6c(%ebx),%eax
8010390d: 6a 10 push $0x10
8010390f: 68 ad 78 10 80 push $0x801078ad
80103914: 50 push %eax
80103915: e8 26 10 00 00 call 80104940 <safestrcpy>
p->cwd = namei("/");
8010391a: c7 04 24 b6 78 10 80 movl $0x801078b6,(%esp)
80103921: e8 5a e5 ff ff call 80101e80 <namei>
80103926: 89 43 68 mov %eax,0x68(%ebx)
=======
80103818: 8d 43 6c lea 0x6c(%ebx),%eax
8010381b: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp)
80103822: 00
80103823: c7 44 24 04 2d 76 10 movl $0x8010762d,0x4(%esp)
8010382a: 80
8010382b: 89 04 24 mov %eax,(%esp)
8010382e: e8 ad 0e 00 00 call 801046e0 <safestrcpy>
p->cwd = namei("/");
80103833: c7 04 24 36 76 10 80 movl $0x80107636,(%esp)
8010383a: e8 a1 e6 ff ff call 80101ee0 <namei>
8010383f: 89 43 68 mov %eax,0x68(%ebx)
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// this assignment to p->state lets other cores
// run this process. the acquire forces the above
// writes to be visible, and the lock is also needed
// because the assignment might not be atomic.
acquire(&ptable.lock);
<<<<<<< HEAD
80103929: c7 04 24 a0 2d 11 80 movl $0x80112da0,(%esp)
80103930: e8 db 0b 00 00 call 80104510 <acquire>
=======
80103842: c7 04 24 a0 2d 11 80 movl $0x80112da0,(%esp)
80103849: e8 32 0b 00 00 call 80104380 <acquire>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
p->state = RUNNABLE;
8010384e: c7 43 0c 03 00 00 00 movl $0x3,0xc(%ebx)
release(&ptable.lock);
<<<<<<< HEAD
8010393c: c7 04 24 a0 2d 11 80 movl $0x80112da0,(%esp)
80103943: e8 a8 0d 00 00 call 801046f0 <release>
=======
80103855: c7 04 24 a0 2d 11 80 movl $0x80112da0,(%esp)
8010385c: e8 4f 0c 00 00 call 801044b0 <release>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
}
80103861: 83 c4 14 add $0x14,%esp
80103864: 5b pop %ebx
80103865: 5d pop %ebp
80103866: c3 ret
p = allocproc();
initproc = p;
if((p->pgdir = setupkvm()) == 0)
panic("userinit: out of memory?");
<<<<<<< HEAD
80103950: 83 ec 0c sub $0xc,%esp
80103953: 68 94 78 10 80 push $0x80107894
80103958: e8 13 ca ff ff call 80100370 <panic>
8010395d: 8d 76 00 lea 0x0(%esi),%esi
=======
80103867: c7 04 24 14 76 10 80 movl $0x80107614,(%esp)
8010386e: e8 ed ca ff ff call 80100360 <panic>
80103873: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80103879: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
80103880 <growproc>:
// Grow current process's memory by n bytes.
// Return 0 on success, -1 on failure.
int
growproc(int n)
{
80103880: 55 push %ebp
80103881: 89 e5 mov %esp,%ebp
80103883: 83 ec 18 sub $0x18,%esp
uint sz;
sz = proc->sz;
80103886: 65 8b 15 04 00 00 00 mov %gs:0x4,%edx
// Grow current process's memory by n bytes.
// Return 0 on success, -1 on failure.
int
growproc(int n)
{
8010388d: 8b 4d 08 mov 0x8(%ebp),%ecx
uint sz;
sz = proc->sz;
80103890: 8b 02 mov (%edx),%eax
if(n > 0){
80103892: 83 f9 00 cmp $0x0,%ecx
80103895: 7e 39 jle 801038d0 <growproc+0x50>
if((sz = allocuvm(proc->pgdir, sz, sz + n)) == 0)
<<<<<<< HEAD
80103977: 83 ec 04 sub $0x4,%esp
8010397a: 01 c1 add %eax,%ecx
8010397c: 51 push %ecx
8010397d: 50 push %eax
8010397e: ff 72 04 pushl 0x4(%edx)
80103981: e8 0a 36 00 00 call 80106f90 <allocuvm>
80103986: 83 c4 10 add $0x10,%esp
80103989: 85 c0 test %eax,%eax
8010398b: 74 3b je 801039c8 <growproc+0x68>
8010398d: 65 8b 15 04 00 00 00 mov %gs:0x4,%edx
=======
80103897: 01 c1 add %eax,%ecx
80103899: 89 4c 24 08 mov %ecx,0x8(%esp)
8010389d: 89 44 24 04 mov %eax,0x4(%esp)
801038a1: 8b 42 04 mov 0x4(%edx),%eax
801038a4: 89 04 24 mov %eax,(%esp)
801038a7: e8 64 34 00 00 call 80106d10 <allocuvm>
801038ac: 85 c0 test %eax,%eax
801038ae: 74 40 je 801038f0 <growproc+0x70>
801038b0: 65 8b 15 04 00 00 00 mov %gs:0x4,%edx
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
return -1;
} else if(n < 0){
if((sz = deallocuvm(proc->pgdir, sz, sz + n)) == 0)
return -1;
}
proc->sz = sz;
801038b7: 89 02 mov %eax,(%edx)
switchuvm(proc);
<<<<<<< HEAD
80103996: 83 ec 0c sub $0xc,%esp
80103999: 65 ff 35 04 00 00 00 pushl %gs:0x4
801039a0: e8 db 33 00 00 call 80106d80 <switchuvm>
=======
801038b9: 65 a1 04 00 00 00 mov %gs:0x4,%eax
801038bf: 89 04 24 mov %eax,(%esp)
801038c2: e8 39 32 00 00 call 80106b00 <switchuvm>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
return 0;
801038c7: 31 c0 xor %eax,%eax
}
801038c9: c9 leave
801038ca: c3 ret
801038cb: 90 nop
801038cc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
sz = proc->sz;
if(n > 0){
if((sz = allocuvm(proc->pgdir, sz, sz + n)) == 0)
return -1;
} else if(n < 0){
801038d0: 74 e5 je 801038b7 <growproc+0x37>
if((sz = deallocuvm(proc->pgdir, sz, sz + n)) == 0)
<<<<<<< HEAD
801039b2: 83 ec 04 sub $0x4,%esp
801039b5: 01 c1 add %eax,%ecx
801039b7: 51 push %ecx
801039b8: 50 push %eax
801039b9: ff 72 04 pushl 0x4(%edx)
801039bc: e8 cf 36 00 00 call 80107090 <deallocuvm>
801039c1: 83 c4 10 add $0x10,%esp
801039c4: 85 c0 test %eax,%eax
801039c6: 75 c5 jne 8010398d <growproc+0x2d>
=======
801038d2: 01 c1 add %eax,%ecx
801038d4: 89 4c 24 08 mov %ecx,0x8(%esp)
801038d8: 89 44 24 04 mov %eax,0x4(%esp)
801038dc: 8b 42 04 mov 0x4(%edx),%eax
801038df: 89 04 24 mov %eax,(%esp)
801038e2: e8 29 35 00 00 call 80106e10 <deallocuvm>
801038e7: 85 c0 test %eax,%eax
801038e9: 75 c5 jne 801038b0 <growproc+0x30>
801038eb: 90 nop
801038ec: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
uint sz;
sz = proc->sz;
if(n > 0){
if((sz = allocuvm(proc->pgdir, sz, sz + n)) == 0)
return -1;
801038f0: b8 ff ff ff ff mov $0xffffffff,%eax
return -1;
}
proc->sz = sz;
switchuvm(proc);
return 0;
}
801038f5: c9 leave
801038f6: c3 ret
801038f7: 89 f6 mov %esi,%esi
801038f9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80103900 <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)
{
80103900: 55 push %ebp
80103901: 89 e5 mov %esp,%ebp
80103903: 57 push %edi
80103904: 56 push %esi
80103905: 53 push %ebx
80103906: 83 ec 1c sub $0x1c,%esp
int i, pid;
struct proc *np;
// Allocate process.
if((np = allocproc()) == 0){
80103909: e8 22 fd ff ff call 80103630 <allocproc>
8010390e: 85 c0 test %eax,%eax
80103910: 89 c3 mov %eax,%ebx
80103912: 0f 84 d5 00 00 00 je 801039ed <fork+0xed>
return -1;
}
// Copy process state from p.
if((np->pgdir = copyuvm(proc->pgdir, proc->sz)) == 0){
<<<<<<< HEAD
801039e8: 65 a1 04 00 00 00 mov %gs:0x4,%eax
801039ee: 83 ec 08 sub $0x8,%esp
801039f1: ff 30 pushl (%eax)
801039f3: ff 70 04 pushl 0x4(%eax)
801039f6: e8 75 37 00 00 call 80107170 <copyuvm>
801039fb: 83 c4 10 add $0x10,%esp
801039fe: 85 c0 test %eax,%eax
80103a00: 89 43 04 mov %eax,0x4(%ebx)
80103a03: 0f 84 ba 00 00 00 je 80103ac3 <fork+0xf3>
=======
80103918: 65 a1 04 00 00 00 mov %gs:0x4,%eax
8010391e: 8b 10 mov (%eax),%edx
80103920: 89 54 24 04 mov %edx,0x4(%esp)
80103924: 8b 40 04 mov 0x4(%eax),%eax
80103927: 89 04 24 mov %eax,(%esp)
8010392a: e8 c1 35 00 00 call 80106ef0 <copyuvm>
8010392f: 85 c0 test %eax,%eax
80103931: 89 43 04 mov %eax,0x4(%ebx)
80103934: 0f 84 ba 00 00 00 je 801039f4 <fork+0xf4>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
kfree(np->kstack);
np->kstack = 0;
np->state = UNUSED;
return -1;
}
np->sz = proc->sz;
8010393a: 65 a1 04 00 00 00 mov %gs:0x4,%eax
np->parent = proc;
*np->tf = *proc->tf;
80103940: b9 13 00 00 00 mov $0x13,%ecx
80103945: 8b 7b 18 mov 0x18(%ebx),%edi
kfree(np->kstack);
np->kstack = 0;
np->state = UNUSED;
return -1;
}
np->sz = proc->sz;
80103948: 8b 00 mov (%eax),%eax
8010394a: 89 03 mov %eax,(%ebx)
np->parent = proc;
8010394c: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80103952: 89 43 14 mov %eax,0x14(%ebx)
*np->tf = *proc->tf;
80103955: 8b 70 18 mov 0x18(%eax),%esi
80103958: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
// Clear %eax so that fork returns 0 in the child.
np->tf->eax = 0;
for(i = 0; i < NOFILE; i++)
8010395a: 31 f6 xor %esi,%esi
np->sz = proc->sz;
np->parent = proc;
*np->tf = *proc->tf;
// Clear %eax so that fork returns 0 in the child.
np->tf->eax = 0;
8010395c: 8b 43 18 mov 0x18(%ebx),%eax
8010395f: 65 8b 15 04 00 00 00 mov %gs:0x4,%edx
80103966: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax)
8010396d: 8d 76 00 lea 0x0(%esi),%esi
for(i = 0; i < NOFILE; i++)
if(proc->ofile[i])
80103970: 8b 44 b2 28 mov 0x28(%edx,%esi,4),%eax
80103974: 85 c0 test %eax,%eax
80103976: 74 13 je 8010398b <fork+0x8b>
np->ofile[i] = filedup(proc->ofile[i]);
80103978: 89 04 24 mov %eax,(%esp)
8010397b: e8 50 d4 ff ff call 80100dd0 <filedup>
80103980: 89 44 b3 28 mov %eax,0x28(%ebx,%esi,4)
80103984: 65 8b 15 04 00 00 00 mov %gs:0x4,%edx
*np->tf = *proc->tf;
// Clear %eax so that fork returns 0 in the child.
np->tf->eax = 0;
for(i = 0; i < NOFILE; i++)
8010398b: 83 c6 01 add $0x1,%esi
8010398e: 83 fe 10 cmp $0x10,%esi
80103991: 75 dd jne 80103970 <fork+0x70>
if(proc->ofile[i])
np->ofile[i] = filedup(proc->ofile[i]);
np->cwd = idup(proc->cwd);
80103993: 8b 42 68 mov 0x68(%edx),%eax
80103996: 89 04 24 mov %eax,(%esp)
80103999: e8 e2 dc ff ff call 80101680 <idup>
8010399e: 89 43 68 mov %eax,0x68(%ebx)
safestrcpy(np->name, proc->name, sizeof(proc->name));
<<<<<<< HEAD
80103a75: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80103a7b: 83 c4 0c add $0xc,%esp
80103a7e: 6a 10 push $0x10
80103a80: 83 c0 6c add $0x6c,%eax
80103a83: 50 push %eax
80103a84: 8d 43 6c lea 0x6c(%ebx),%eax
80103a87: 50 push %eax
80103a88: e8 b3 0e 00 00 call 80104940 <safestrcpy>
=======
801039a1: 65 a1 04 00 00 00 mov %gs:0x4,%eax
801039a7: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp)
801039ae: 00
801039af: 83 c0 6c add $0x6c,%eax
801039b2: 89 44 24 04 mov %eax,0x4(%esp)
801039b6: 8d 43 6c lea 0x6c(%ebx),%eax
801039b9: 89 04 24 mov %eax,(%esp)
801039bc: e8 1f 0d 00 00 call 801046e0 <safestrcpy>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
pid = np->pid;
801039c1: 8b 73 10 mov 0x10(%ebx),%esi
acquire(&ptable.lock);
<<<<<<< HEAD
80103a90: c7 04 24 a0 2d 11 80 movl $0x80112da0,(%esp)
80103a97: e8 74 0a 00 00 call 80104510 <acquire>
=======
801039c4: c7 04 24 a0 2d 11 80 movl $0x80112da0,(%esp)
801039cb: e8 b0 09 00 00 call 80104380 <acquire>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
np->state = RUNNABLE;
801039d0: c7 43 0c 03 00 00 00 movl $0x3,0xc(%ebx)
release(&ptable.lock);
<<<<<<< HEAD
80103aa3: c7 04 24 a0 2d 11 80 movl $0x80112da0,(%esp)
80103aaa: e8 41 0c 00 00 call 801046f0 <release>
=======
801039d7: c7 04 24 a0 2d 11 80 movl $0x80112da0,(%esp)
801039de: e8 cd 0a 00 00 call 801044b0 <release>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
return pid;
801039e3: 89 f0 mov %esi,%eax
}
801039e5: 83 c4 1c add $0x1c,%esp
801039e8: 5b pop %ebx
801039e9: 5e pop %esi
801039ea: 5f pop %edi
801039eb: 5d pop %ebp
801039ec: c3 ret
int i, pid;
struct proc *np;
// Allocate process.
if((np = allocproc()) == 0){
return -1;
801039ed: b8 ff ff ff ff mov $0xffffffff,%eax
801039f2: eb f1 jmp 801039e5 <fork+0xe5>
}
// Copy process state from p.
if((np->pgdir = copyuvm(proc->pgdir, proc->sz)) == 0){
kfree(np->kstack);
801039f4: 8b 43 08 mov 0x8(%ebx),%eax
801039f7: 89 04 24 mov %eax,(%esp)
801039fa: e8 e1 e8 ff ff call 801022e0 <kfree>
np->kstack = 0;
np->state = UNUSED;
return -1;
801039ff: b8 ff ff ff ff mov $0xffffffff,%eax
}
// Copy process state from p.
if((np->pgdir = copyuvm(proc->pgdir, proc->sz)) == 0){
kfree(np->kstack);
np->kstack = 0;
80103a04: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
np->state = UNUSED;
80103a0b: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
return -1;
80103a12: eb d1 jmp 801039e5 <fork+0xe5>
80103a14: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80103a1a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
80103a20 <random>:
//c=28411;
//m=ticks;
//seed=((a*seed+c)%134456);
//x=seed%n;
//release(&tickslock);
uint x=seed;
80103a20: 8b 15 0c a0 10 80 mov 0x8010a00c,%edx
sleep(proc, &ptable.lock); //DOC: wait-sleep
}
}
int random(int n)//random number generator
{
80103a26: 55 push %ebp
80103a27: 89 e5 mov %esp,%ebp
//m=ticks;
//seed=((a*seed+c)%134456);
//x=seed%n;
//release(&tickslock);
uint x=seed;
x ^=x<<13;
80103a29: 89 d0 mov %edx,%eax
80103a2b: c1 e0 0d shl $0xd,%eax
80103a2e: 31 d0 xor %edx,%eax
x ^=x>>17;
80103a30: 89 c2 mov %eax,%edx
80103a32: c1 ea 11 shr $0x11,%edx
80103a35: 31 c2 xor %eax,%edx
x ^=x<<5;
80103a37: 89 d0 mov %edx,%eax
80103a39: c1 e0 05 shl $0x5,%eax
80103a3c: 31 d0 xor %edx,%eax
seed=x;
x=x%n;
80103a3e: 31 d2 xor %edx,%edx
//release(&tickslock);
uint x=seed;
x ^=x<<13;
x ^=x>>17;
x ^=x<<5;
seed=x;
80103a40: a3 0c a0 10 80 mov %eax,0x8010a00c
x=x%n;
80103a45: f7 75 08 divl 0x8(%ebp)
return x+1;
}
80103a48: 5d pop %ebp
x ^=x<<13;
x ^=x>>17;
x ^=x<<5;
seed=x;
x=x%n;
return x+1;
80103a49: 8d 42 01 lea 0x1(%edx),%eax
}
80103a4c: c3 ret
80103a4d: 8d 76 00 lea 0x0(%esi),%esi
<<<<<<< HEAD
80103b20 <scheduler_random>:
=======
80103a50 <scheduler>:
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// random scheduler
void
scheduler_random(void)
{
80103a50: 55 push %ebp
80103a51: 89 e5 mov %esp,%ebp
80103a53: 56 push %esi
80103a54: 53 push %ebx
80103a55: 83 ec 10 sub $0x10,%esp
}
static inline void
sti(void)
{
asm volatile("sti");
80103a58: fb sti
for(;;){
// Enable interrupts on this processor.
sti();
// Loop over process table looking for process to run.
acquire(&ptable.lock);
80103a59: c7 04 24 a0 2d 11 80 movl $0x80112da0,(%esp)
x123=random(NPROC);
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80103a60: bb d4 2d 11 80 mov $0x80112dd4,%ebx
for(;;){
// Enable interrupts on this processor.
sti();
// Loop over process table looking for process to run.
acquire(&ptable.lock);
<<<<<<< HEAD
80103b31: 68 a0 2d 11 80 push $0x80112da0
80103b36: e8 d5 09 00 00 call 80104510 <acquire>
=======
80103a65: e8 16 09 00 00 call 80104380 <acquire>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
//c=28411;
//m=ticks;
//seed=((a*seed+c)%134456);
//x=seed%n;
//release(&tickslock);
uint x=seed;
80103a6a: 8b 15 0c a0 10 80 mov 0x8010a00c,%edx
x ^=x<<13;
80103a70: 89 d0 mov %edx,%eax
80103a72: c1 e0 0d shl $0xd,%eax
80103a75: 31 d0 xor %edx,%eax
x ^=x>>17;
80103a77: 89 c2 mov %eax,%edx
80103a79: c1 ea 11 shr $0x11,%edx
80103a7c: 31 c2 xor %eax,%edx
x ^=x<<5;
80103a7e: 89 d0 mov %edx,%eax
80103a80: c1 e0 05 shl $0x5,%eax
80103a83: 31 d0 xor %edx,%eax
seed=x;
80103a85: a3 0c a0 10 80 mov %eax,0x8010a00c
x=x%n;
80103a8a: 83 e0 3f and $0x3f,%eax
return x+1;
<<<<<<< HEAD
80103b5f: 83 e6 3f and $0x3f,%esi
80103b62: 83 c6 01 add $0x1,%esi
80103b65: eb 14 jmp 80103b7b <scheduler_random+0x5b>
80103b67: 89 f6 mov %esi,%esi
80103b69: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
=======
80103a8d: 8d 70 01 lea 0x1(%eax),%esi
80103a90: eb 11 jmp 80103aa3 <scheduler+0x53>
80103a92: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
sti();
// Loop over process table looking for process to run.
acquire(&ptable.lock);
x123=random(NPROC);
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
<<<<<<< HEAD
80103b70: 83 eb 80 sub $0xffffff80,%ebx
80103b73: 81 fb d4 4d 11 80 cmp $0x80114dd4,%ebx
80103b79: 74 55 je 80103bd0 <scheduler_random+0xb0>
if(p->state != RUNNABLE || p->pid !=x123)
80103b7b: 83 7b 0c 03 cmpl $0x3,0xc(%ebx)
80103b7f: 75 ef jne 80103b70 <scheduler_random+0x50>
80103b81: 39 73 10 cmp %esi,0x10(%ebx)
80103b84: 75 ea jne 80103b70 <scheduler_random+0x50>
=======
80103a98: 83 eb 80 sub $0xffffff80,%ebx
80103a9b: 81 fb d4 4d 11 80 cmp $0x80114dd4,%ebx
80103aa1: 74 6d je 80103b10 <scheduler+0xc0>
if(p->state != RUNNABLE || p->pid !=x123)
80103aa3: 83 7b 0c 03 cmpl $0x3,0xc(%ebx)
80103aa7: 75 ef jne 80103a98 <scheduler+0x48>
80103aa9: 39 73 10 cmp %esi,0x10(%ebx)
80103aac: 75 ea jne 80103a98 <scheduler+0x48>
80103aae: 8d 43 6c lea 0x6c(%ebx),%eax
continue;
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// Switch to chosen process. It is the process's job
// to release ptable.lock and then reacquire it
// before jumping back to us.
cprintf("proc %s %d----\n",p->name,p->pid);
80103ab1: 89 44 24 04 mov %eax,0x4(%esp)
80103ab5: 89 74 24 08 mov %esi,0x8(%esp)
80103ab9: c7 04 24 38 76 10 80 movl $0x80107638,(%esp)
80103ac0: e8 8b cb ff ff call 80100650 <cprintf>
proc = p;
switchuvm(p);
80103ac5: 89 1c 24 mov %ebx,(%esp)
// Switch to chosen process. It is the process's job
// to release ptable.lock and then reacquire it
// before jumping back to us.
cprintf("proc %s %d----\n",p->name,p->pid);
proc = p;
80103ac8: 65 89 1d 04 00 00 00 mov %ebx,%gs:0x4
sti();
// Loop over process table looking for process to run.
acquire(&ptable.lock);
x123=random(NPROC);
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80103acf: 83 eb 80 sub $0xffffff80,%ebx
// Switch to chosen process. It is the process's job
// to release ptable.lock and then reacquire it
// before jumping back to us.
cprintf("proc %s %d----\n",p->name,p->pid);
proc = p;
switchuvm(p);
<<<<<<< HEAD
80103b94: e8 e7 31 00 00 call 80106d80 <switchuvm>
=======
80103ad2: e8 29 30 00 00 call 80106b00 <switchuvm>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
p->state = RUNNING;
swtch(&cpu->scheduler, p->context);
80103ad7: 8b 43 9c mov -0x64(%ebx),%eax
// to release ptable.lock and then reacquire it
// before jumping back to us.
cprintf("proc %s %d----\n",p->name,p->pid);
proc = p;
switchuvm(p);
p->state = RUNNING;
80103ada: c7 43 8c 04 00 00 00 movl $0x4,-0x74(%ebx)
swtch(&cpu->scheduler, p->context);
<<<<<<< HEAD
80103ba7: 5a pop %edx
80103ba8: ff 73 9c pushl -0x64(%ebx)
80103bab: 83 c0 04 add $0x4,%eax
80103bae: 50 push %eax
80103baf: e8 e7 0d 00 00 call 8010499b <swtch>
switchkvm();
80103bb4: e8 a7 31 00 00 call 80106d60 <switchkvm>
// Process is done running for now.
// It should have changed its p->state before coming back.
proc = 0;
80103bb9: 83 c4 10 add $0x10,%esp
=======
80103ae1: 89 44 24 04 mov %eax,0x4(%esp)
80103ae5: 65 a1 00 00 00 00 mov %gs:0x0,%eax
80103aeb: 83 c0 04 add $0x4,%eax
80103aee: 89 04 24 mov %eax,(%esp)
80103af1: e8 45 0c 00 00 call 8010473b <swtch>
switchkvm();
80103af6: e8 e5 2f 00 00 call 80106ae0 <switchkvm>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
sti();
// Loop over process table looking for process to run.
acquire(&ptable.lock);
x123=random(NPROC);
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80103afb: 81 fb d4 4d 11 80 cmp $0x80114dd4,%ebx
swtch(&cpu->scheduler, p->context);
switchkvm();
// Process is done running for now.
// It should have changed its p->state before coming back.
proc = 0;
80103b01: 65 c7 05 04 00 00 00 movl $0x0,%gs:0x4
80103b08: 00 00 00 00
sti();
// Loop over process table looking for process to run.
acquire(&ptable.lock);
x123=random(NPROC);
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
<<<<<<< HEAD
80103bcd: 75 ac jne 80103b7b <scheduler_random+0x5b>
80103bcf: 90 nop
=======
80103b0c: 75 95 jne 80103aa3 <scheduler+0x53>
80103b0e: 66 90 xchg %ax,%ax
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// Process is done running for now.
// It should have changed its p->state before coming back.
proc = 0;
}
release(&ptable.lock);
<<<<<<< HEAD
80103bd0: 83 ec 0c sub $0xc,%esp
80103bd3: 68 a0 2d 11 80 push $0x80112da0
80103bd8: e8 13 0b 00 00 call 801046f0 <release>
}
80103bdd: 83 c4 10 add $0x10,%esp
80103be0: e9 43 ff ff ff jmp 80103b28 <scheduler_random+0x8>
80103be5: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80103be9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80103bf0 <scheduler_sjf>:
// Shortest Job First scheduler (change this selection of scheduler in main.c line 60)
void
scheduler_sjf(void)
{
80103bf0: 55 push %ebp
80103bf1: 89 e5 mov %esp,%ebp
80103bf3: 56 push %esi
80103bf4: 53 push %ebx
80103bf5: 81 ec 00 01 00 00 sub $0x100,%esp
80103bfb: 90 nop
80103bfc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80103c00: fb sti
struct proc *p;
for(;;){
// Enable interrupts on this processor.
sti();
acquire(&ptable.lock);
80103c01: 83 ec 0c sub $0xc,%esp
// Determine least value of job length among runnable processes
// the list of such processes with same least jlength are 'in' in number and stored in the array sj[]
jl=100;
in=0;
80103c04: 31 db xor %ebx,%ebx
struct proc *p;
for(;;){
// Enable interrupts on this processor.
sti();
acquire(&ptable.lock);
80103c06: 68 a0 2d 11 80 push $0x80112da0
80103c0b: e8 00 09 00 00 call 80104510 <acquire>
80103c10: 83 c4 10 add $0x10,%esp
// Determine least value of job length among runnable processes
// the list of such processes with same least jlength are 'in' in number and stored in the array sj[]
jl=100;
in=0;
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
80103c13: b8 d4 2d 11 80 mov $0x80112dd4,%eax
sti();
acquire(&ptable.lock);
// Determine least value of job length among runnable processes
// the list of such processes with same least jlength are 'in' in number and stored in the array sj[]
jl=100;
80103c18: b9 64 00 00 00 mov $0x64,%ecx
80103c1d: eb 0b jmp 80103c2a <scheduler_sjf+0x3a>
80103c1f: 90 nop
in=0;
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
80103c20: 83 e8 80 sub $0xffffff80,%eax
80103c23: 3d d4 4d 11 80 cmp $0x80114dd4,%eax
80103c28: 74 2e je 80103c58 <scheduler_sjf+0x68>
{
if(p->state != RUNNABLE)
80103c2a: 83 78 0c 03 cmpl $0x3,0xc(%eax)
80103c2e: 75 f0 jne 80103c20 <scheduler_sjf+0x30>
continue;
if(p->jlength < jl)
80103c30: 8b 50 7c mov 0x7c(%eax),%edx
80103c33: 39 ca cmp %ecx,%edx
80103c35: 0f 8d cd 00 00 00 jge 80103d08 <scheduler_sjf+0x118>
{ jl=p->jlength; in=0; sj[in++]=p->pid; }
80103c3b: 8b 48 10 mov 0x10(%eax),%ecx
// Determine least value of job length among runnable processes
// the list of such processes with same least jlength are 'in' in number and stored in the array sj[]
jl=100;
in=0;
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
80103c3e: 83 e8 80 sub $0xffffff80,%eax
{
if(p->state != RUNNABLE)
continue;
if(p->jlength < jl)
{ jl=p->jlength; in=0; sj[in++]=p->pid; }
80103c41: bb 01 00 00 00 mov $0x1,%ebx
// Determine least value of job length among runnable processes
// the list of such processes with same least jlength are 'in' in number and stored in the array sj[]
jl=100;
in=0;
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
80103c46: 3d d4 4d 11 80 cmp $0x80114dd4,%eax
{
if(p->state != RUNNABLE)
continue;
if(p->jlength < jl)
{ jl=p->jlength; in=0; sj[in++]=p->pid; }
80103c4b: 89 8d f8 fe ff ff mov %ecx,-0x108(%ebp)
80103c51: 89 d1 mov %edx,%ecx
// Determine least value of job length among runnable processes
// the list of such processes with same least jlength are 'in' in number and stored in the array sj[]
jl=100;
in=0;
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
80103c53: 75 d5 jne 80103c2a <scheduler_sjf+0x3a>
80103c55: 8d 76 00 lea 0x0(%esi),%esi
}
if(in>0)
x123=sj[random(in)-1]; // randomly choose a process from the list sj
else
x123=0;
80103c58: 31 f6 xor %esi,%esi
else if(p->jlength == jl)
sj[in++]=p->pid;
}
if(in>0)
80103c5a: 85 db test %ebx,%ebx
80103c5c: 74 2b je 80103c89 <scheduler_sjf+0x99>
//c=28411;
//m=ticks;
//seed=((a*seed+c)%134456);
//x=seed%n;
//release(&tickslock);
uint x=seed;
80103c5e: 8b 15 0c a0 10 80 mov 0x8010a00c,%edx
x ^=x<<13;
80103c64: 89 d0 mov %edx,%eax
80103c66: c1 e0 0d shl $0xd,%eax
80103c69: 31 c2 xor %eax,%edx
x ^=x>>17;
80103c6b: 89 d0 mov %edx,%eax
80103c6d: c1 e8 11 shr $0x11,%eax
80103c70: 31 c2 xor %eax,%edx
x ^=x<<5;
80103c72: 89 d0 mov %edx,%eax
80103c74: c1 e0 05 shl $0x5,%eax
80103c77: 31 d0 xor %edx,%eax
else if(p->jlength == jl)
sj[in++]=p->pid;
}
if(in>0)
x123=sj[random(in)-1]; // randomly choose a process from the list sj
80103c79: 31 d2 xor %edx,%edx
//release(&tickslock);
uint x=seed;
x ^=x<<13;
x ^=x>>17;
x ^=x<<5;
seed=x;
80103c7b: a3 0c a0 10 80 mov %eax,0x8010a00c
else if(p->jlength == jl)
sj[in++]=p->pid;
}
if(in>0)
x123=sj[random(in)-1]; // randomly choose a process from the list sj
80103c80: f7 f3 div %ebx
80103c82: 8b b4 95 f8 fe ff ff mov -0x108(%ebp,%edx,4),%esi
else
x123=0;
// Loop over process table looking for process to run.
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80103c89: bb d4 2d 11 80 mov $0x80112dd4,%ebx
80103c8e: eb 0b jmp 80103c9b <scheduler_sjf+0xab>
80103c90: 83 eb 80 sub $0xffffff80,%ebx
80103c93: 81 fb d4 4d 11 80 cmp $0x80114dd4,%ebx
80103c99: 74 55 je 80103cf0 <scheduler_sjf+0x100>
if(p->state != RUNNABLE || p->pid !=x123)
80103c9b: 83 7b 0c 03 cmpl $0x3,0xc(%ebx)
80103c9f: 75 ef jne 80103c90 <scheduler_sjf+0xa0>
80103ca1: 3b 73 10 cmp 0x10(%ebx),%esi
80103ca4: 75 ea jne 80103c90 <scheduler_sjf+0xa0>
// Switch to chosen process. It is the process's job
// to release ptable.lock and then reacquire it
// before jumping back to us.
//cprintf("----%d----\n",p->pid);
proc = p;
switchuvm(p);
80103ca6: 83 ec 0c sub $0xc,%esp
// Switch to chosen process. It is the process's job
// to release ptable.lock and then reacquire it
// before jumping back to us.
//cprintf("----%d----\n",p->pid);
proc = p;
80103ca9: 65 89 1d 04 00 00 00 mov %ebx,%gs:0x4
switchuvm(p);
80103cb0: 53 push %ebx
x123=sj[random(in)-1]; // randomly choose a process from the list sj
else
x123=0;
// Loop over process table looking for process to run.
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80103cb1: 83 eb 80 sub $0xffffff80,%ebx
// Switch to chosen process. It is the process's job
// to release ptable.lock and then reacquire it
// before jumping back to us.
//cprintf("----%d----\n",p->pid);
proc = p;
switchuvm(p);
80103cb4: e8 c7 30 00 00 call 80106d80 <switchuvm>
p->state = RUNNING;
80103cb9: c7 43 8c 04 00 00 00 movl $0x4,-0x74(%ebx)
swtch(&cpu->scheduler, p->context);
80103cc0: 58 pop %eax
80103cc1: 65 a1 00 00 00 00 mov %gs:0x0,%eax
80103cc7: 5a pop %edx
80103cc8: ff 73 9c pushl -0x64(%ebx)
80103ccb: 83 c0 04 add $0x4,%eax
80103cce: 50 push %eax
80103ccf: e8 c7 0c 00 00 call 8010499b <swtch>
switchkvm();
80103cd4: e8 87 30 00 00 call 80106d60 <switchkvm>
// Process is done running for now.
// It should have changed its p->state before coming back.
proc = 0;
80103cd9: 83 c4 10 add $0x10,%esp
x123=sj[random(in)-1]; // randomly choose a process from the list sj
else
x123=0;
// Loop over process table looking for process to run.
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80103cdc: 81 fb d4 4d 11 80 cmp $0x80114dd4,%ebx
swtch(&cpu->scheduler, p->context);
switchkvm();
// Process is done running for now.
// It should have changed its p->state before coming back.
proc = 0;
80103ce2: 65 c7 05 04 00 00 00 movl $0x0,%gs:0x4
80103ce9: 00 00 00 00
x123=sj[random(in)-1]; // randomly choose a process from the list sj
else
x123=0;
// Loop over process table looking for process to run.
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80103ced: 75 ac jne 80103c9b <scheduler_sjf+0xab>
80103cef: 90 nop
// Process is done running for now.
// It should have changed its p->state before coming back.
proc = 0;
}
release(&ptable.lock);
80103cf0: 83 ec 0c sub $0xc,%esp
80103cf3: 68 a0 2d 11 80 push $0x80112da0
80103cf8: e8 f3 09 00 00 call 801046f0 <release>
}
80103cfd: 83 c4 10 add $0x10,%esp
80103d00: e9 fb fe ff ff jmp 80103c00 <scheduler_sjf+0x10>
80103d05: 8d 76 00 lea 0x0(%esi),%esi
continue;
if(p->jlength < jl)
{ jl=p->jlength; in=0; sj[in++]=p->pid; }
else if(p->jlength == jl)
80103d08: 0f 85 12 ff ff ff jne 80103c20 <scheduler_sjf+0x30>
sj[in++]=p->pid;
80103d0e: 8b 50 10 mov 0x10(%eax),%edx
80103d11: 89 94 9d f8 fe ff ff mov %edx,-0x108(%ebp,%ebx,4)
80103d18: 83 c3 01 add $0x1,%ebx
80103d1b: e9 00 ff ff ff jmp 80103c20 <scheduler_sjf+0x30>
80103d20 <sched>:
=======
80103b10: c7 04 24 a0 2d 11 80 movl $0x80112da0,(%esp)
80103b17: e8 94 09 00 00 call 801044b0 <release>
}
80103b1c: e9 37 ff ff ff jmp 80103a58 <scheduler+0x8>
80103b21: eb 0d jmp 80103b30 <sched>
80103b23: 90 nop
80103b24: 90 nop
80103b25: 90 nop
80103b26: 90 nop
80103b27: 90 nop
80103b28: 90 nop
80103b29: 90 nop
80103b2a: 90 nop
80103b2b: 90 nop
80103b2c: 90 nop
80103b2d: 90 nop
80103b2e: 90 nop
80103b2f: 90 nop
80103b30 <sched>:
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// be proc->intena and proc->ncli, but that would
// break in the few places where a lock is held but
// there's no process.
void
sched(void)
{
<<<<<<< HEAD
80103d20: 55 push %ebp
80103d21: 89 e5 mov %esp,%ebp
80103d23: 53 push %ebx
80103d24: 83 ec 10 sub $0x10,%esp
int intena;
if(!holding(&ptable.lock))
80103d27: 68 a0 2d 11 80 push $0x80112da0
80103d2c: e8 0f 09 00 00 call 80104640 <holding>
80103d31: 83 c4 10 add $0x10,%esp
80103d34: 85 c0 test %eax,%eax
80103d36: 74 4c je 80103d84 <sched+0x64>
panic("sched ptable.lock");
if(cpu->ncli != 1)
80103d38: 65 8b 15 00 00 00 00 mov %gs:0x0,%edx
80103d3f: 83 ba ac 00 00 00 01 cmpl $0x1,0xac(%edx)
80103d46: 75 63 jne 80103dab <sched+0x8b>
panic("sched locks");
if(proc->state == RUNNING)
80103d48: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80103d4e: 83 78 0c 04 cmpl $0x4,0xc(%eax)
80103d52: 74 4a je 80103d9e <sched+0x7e>
=======
80103b30: 55 push %ebp
80103b31: 89 e5 mov %esp,%ebp
80103b33: 53 push %ebx
80103b34: 83 ec 14 sub $0x14,%esp
int intena;
if(!holding(&ptable.lock))
80103b37: c7 04 24 a0 2d 11 80 movl $0x80112da0,(%esp)
80103b3e: e8 cd 08 00 00 call 80104410 <holding>
80103b43: 85 c0 test %eax,%eax
80103b45: 74 4d je 80103b94 <sched+0x64>
panic("sched ptable.lock");
if(cpu->ncli != 1)
80103b47: 65 a1 00 00 00 00 mov %gs:0x0,%eax
80103b4d: 83 b8 ac 00 00 00 01 cmpl $0x1,0xac(%eax)
80103b54: 75 62 jne 80103bb8 <sched+0x88>
panic("sched locks");
if(proc->state == RUNNING)
80103b56: 65 8b 15 04 00 00 00 mov %gs:0x4,%edx
80103b5d: 83 7a 0c 04 cmpl $0x4,0xc(%edx)
80103b61: 74 49 je 80103bac <sched+0x7c>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
static inline uint
readeflags(void)
{
uint eflags;
asm volatile("pushfl; popl %0" : "=r" (eflags));
<<<<<<< HEAD
80103d54: 9c pushf
80103d55: 59 pop %ecx
panic("sched running");
if(readeflags()&FL_IF)
80103d56: 80 e5 02 and $0x2,%ch
80103d59: 75 36 jne 80103d91 <sched+0x71>
panic("sched interruptible");
intena = cpu->intena;
swtch(&proc->context, cpu->scheduler);
80103d5b: 83 ec 08 sub $0x8,%esp
80103d5e: 83 c0 1c add $0x1c,%eax
panic("sched locks");
if(proc->state == RUNNING)
panic("sched running");
if(readeflags()&FL_IF)
panic("sched interruptible");
intena = cpu->intena;
80103d61: 8b 9a b0 00 00 00 mov 0xb0(%edx),%ebx
swtch(&proc->context, cpu->scheduler);
80103d67: ff 72 04 pushl 0x4(%edx)
80103d6a: 50 push %eax
80103d6b: e8 2b 0c 00 00 call 8010499b <swtch>
cpu->intena = intena;
80103d70: 65 a1 00 00 00 00 mov %gs:0x0,%eax
}
80103d76: 83 c4 10 add $0x10,%esp
=======
80103b63: 9c pushf
80103b64: 59 pop %ecx
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
panic("sched running");
if(readeflags()&FL_IF)
80103b65: 80 e5 02 and $0x2,%ch
80103b68: 75 36 jne 80103ba0 <sched+0x70>
panic("sched interruptible");
intena = cpu->intena;
80103b6a: 8b 98 b0 00 00 00 mov 0xb0(%eax),%ebx
swtch(&proc->context, cpu->scheduler);
80103b70: 83 c2 1c add $0x1c,%edx
80103b73: 8b 40 04 mov 0x4(%eax),%eax
80103b76: 89 14 24 mov %edx,(%esp)
80103b79: 89 44 24 04 mov %eax,0x4(%esp)
80103b7d: e8 b9 0b 00 00 call 8010473b <swtch>
cpu->intena = intena;
<<<<<<< HEAD
80103d79: 89 98 b0 00 00 00 mov %ebx,0xb0(%eax)
}
80103d7f: 8b 5d fc mov -0x4(%ebp),%ebx
80103d82: c9 leave
80103d83: c3 ret
=======
80103b82: 65 a1 00 00 00 00 mov %gs:0x0,%eax
80103b88: 89 98 b0 00 00 00 mov %ebx,0xb0(%eax)
}
80103b8e: 83 c4 14 add $0x14,%esp
80103b91: 5b pop %ebx
80103b92: 5d pop %ebp
80103b93: c3 ret
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
sched(void)
{
int intena;
if(!holding(&ptable.lock))
panic("sched ptable.lock");
<<<<<<< HEAD
80103d84: 83 ec 0c sub $0xc,%esp
80103d87: 68 b8 78 10 80 push $0x801078b8
80103d8c: e8 df c5 ff ff call 80100370 <panic>
=======
80103b94: c7 04 24 48 76 10 80 movl $0x80107648,(%esp)
80103b9b: e8 c0 c7 ff ff call 80100360 <panic>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
if(cpu->ncli != 1)
panic("sched locks");
if(proc->state == RUNNING)
panic("sched running");
if(readeflags()&FL_IF)
panic("sched interruptible");
<<<<<<< HEAD
80103d91: 83 ec 0c sub $0xc,%esp
80103d94: 68 e4 78 10 80 push $0x801078e4
80103d99: e8 d2 c5 ff ff call 80100370 <panic>
=======
80103ba0: c7 04 24 74 76 10 80 movl $0x80107674,(%esp)
80103ba7: e8 b4 c7 ff ff call 80100360 <panic>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
if(!holding(&ptable.lock))
panic("sched ptable.lock");
if(cpu->ncli != 1)
panic("sched locks");
if(proc->state == RUNNING)
panic("sched running");
<<<<<<< HEAD
80103d9e: 83 ec 0c sub $0xc,%esp
80103da1: 68 d6 78 10 80 push $0x801078d6
80103da6: e8 c5 c5 ff ff call 80100370 <panic>
=======
80103bac: c7 04 24 66 76 10 80 movl $0x80107666,(%esp)
80103bb3: e8 a8 c7 ff ff call 80100360 <panic>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
int intena;
if(!holding(&ptable.lock))
panic("sched ptable.lock");
if(cpu->ncli != 1)
panic("sched locks");
<<<<<<< HEAD
80103dab: 83 ec 0c sub $0xc,%esp
80103dae: 68 ca 78 10 80 push $0x801078ca
80103db3: e8 b8 c5 ff ff call 80100370 <panic>
80103db8: 90 nop
80103db9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80103dc0 <exit>:
=======
80103bb8: c7 04 24 5a 76 10 80 movl $0x8010765a,(%esp)
80103bbf: e8 9c c7 ff ff call 80100360 <panic>
80103bc4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80103bca: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
80103bd0 <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
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
exit(void)
{
80103bd0: 55 push %ebp
80103bd1: 89 e5 mov %esp,%ebp
80103bd3: 56 push %esi
80103bd4: 53 push %ebx
struct proc *p;
int fd;
if(proc == initproc)
<<<<<<< HEAD
80103dc0: 65 8b 15 04 00 00 00 mov %gs:0x4,%edx
80103dc7: 3b 15 bc a5 10 80 cmp 0x8010a5bc,%edx
=======
80103bd5: 31 db xor %ebx,%ebx
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// 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)
{
<<<<<<< HEAD
80103dcd: 55 push %ebp
80103dce: 89 e5 mov %esp,%ebp
80103dd0: 56 push %esi
80103dd1: 53 push %ebx
=======
80103bd7: 83 ec 10 sub $0x10,%esp
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
struct proc *p;
int fd;
if(proc == initproc)
<<<<<<< HEAD
80103dd2: 0f 84 1f 01 00 00 je 80103ef7 <exit+0x137>
80103dd8: 31 db xor %ebx,%ebx
80103dda: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
=======
80103bda: 65 8b 15 04 00 00 00 mov %gs:0x4,%edx
80103be1: 3b 15 bc a5 10 80 cmp 0x8010a5bc,%edx
80103be7: 0f 84 01 01 00 00 je 80103cee <exit+0x11e>
80103bed: 8d 76 00 lea 0x0(%esi),%esi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
panic("init exiting");
// Close all open files.
for(fd = 0; fd < NOFILE; fd++){
if(proc->ofile[fd]){
<<<<<<< HEAD
80103de0: 8d 73 08 lea 0x8(%ebx),%esi
80103de3: 8b 44 b2 08 mov 0x8(%edx,%esi,4),%eax
80103de7: 85 c0 test %eax,%eax
80103de9: 74 1b je 80103e06 <exit+0x46>
fileclose(proc->ofile[fd]);
80103deb: 83 ec 0c sub $0xc,%esp
80103dee: 50 push %eax
80103def: e8 1c d0 ff ff call 80100e10 <fileclose>
proc->ofile[fd] = 0;
80103df4: 65 8b 15 04 00 00 00 mov %gs:0x4,%edx
80103dfb: 83 c4 10 add $0x10,%esp
80103dfe: c7 44 b2 08 00 00 00 movl $0x0,0x8(%edx,%esi,4)
80103e05: 00
=======
80103bf0: 8d 73 08 lea 0x8(%ebx),%esi
80103bf3: 8b 44 b2 08 mov 0x8(%edx,%esi,4),%eax
80103bf7: 85 c0 test %eax,%eax
80103bf9: 74 17 je 80103c12 <exit+0x42>
fileclose(proc->ofile[fd]);
80103bfb: 89 04 24 mov %eax,(%esp)
80103bfe: e8 1d d2 ff ff call 80100e20 <fileclose>
proc->ofile[fd] = 0;
80103c03: 65 8b 15 04 00 00 00 mov %gs:0x4,%edx
80103c0a: c7 44 b2 08 00 00 00 movl $0x0,0x8(%edx,%esi,4)
80103c11: 00
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
if(proc == initproc)
panic("init exiting");
// Close all open files.
for(fd = 0; fd < NOFILE; fd++){
<<<<<<< HEAD
80103e06: 83 c3 01 add $0x1,%ebx
80103e09: 83 fb 10 cmp $0x10,%ebx
80103e0c: 75 d2 jne 80103de0 <exit+0x20>
=======
80103c12: 83 c3 01 add $0x1,%ebx
80103c15: 83 fb 10 cmp $0x10,%ebx
80103c18: 75 d6 jne 80103bf0 <exit+0x20>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
fileclose(proc->ofile[fd]);
proc->ofile[fd] = 0;
}
}
begin_op();
<<<<<<< HEAD
80103e0e: e8 9d ed ff ff call 80102bb0 <begin_op>
iput(proc->cwd);
80103e13: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80103e19: 83 ec 0c sub $0xc,%esp
80103e1c: ff 70 68 pushl 0x68(%eax)
80103e1f: e8 5c d9 ff ff call 80101780 <iput>
end_op();
80103e24: e8 f7 ed ff ff call 80102c20 <end_op>
proc->cwd = 0;
80103e29: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80103e2f: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax)
acquire(&ptable.lock);
80103e36: c7 04 24 a0 2d 11 80 movl $0x80112da0,(%esp)
80103e3d: e8 ce 06 00 00 call 80104510 <acquire>
// Parent might be sleeping in wait().
wakeup1(proc->parent);
80103e42: 65 8b 0d 04 00 00 00 mov %gs:0x4,%ecx
80103e49: 83 c4 10 add $0x10,%esp
=======
80103c1a: e8 61 ef ff ff call 80102b80 <begin_op>
iput(proc->cwd);
80103c1f: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80103c25: 8b 40 68 mov 0x68(%eax),%eax
80103c28: 89 04 24 mov %eax,(%esp)
80103c2b: e8 90 db ff ff call 801017c0 <iput>
end_op();
80103c30: e8 bb ef ff ff call 80102bf0 <end_op>
proc->cwd = 0;
80103c35: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80103c3b: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax)
acquire(&ptable.lock);
80103c42: c7 04 24 a0 2d 11 80 movl $0x80112da0,(%esp)
80103c49: e8 32 07 00 00 call 80104380 <acquire>
// Parent might be sleeping in wait().
wakeup1(proc->parent);
80103c4e: 65 8b 0d 04 00 00 00 mov %gs:0x4,%ecx
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
static void
wakeup1(void *chan)
{
struct proc *p;
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
<<<<<<< HEAD
80103e4c: b8 d4 2d 11 80 mov $0x80112dd4,%eax
=======
80103c55: b8 d4 2d 11 80 mov $0x80112dd4,%eax
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
proc->cwd = 0;
acquire(&ptable.lock);
// Parent might be sleeping in wait().
wakeup1(proc->parent);
<<<<<<< HEAD
80103e51: 8b 51 14 mov 0x14(%ecx),%edx
80103e54: eb 14 jmp 80103e6a <exit+0xaa>
80103e56: 8d 76 00 lea 0x0(%esi),%esi
80103e59: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
=======
80103c5a: 8b 51 14 mov 0x14(%ecx),%edx
80103c5d: eb 0b jmp 80103c6a <exit+0x9a>
80103c5f: 90 nop
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
static void
wakeup1(void *chan)
{
struct proc *p;
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
<<<<<<< HEAD
80103e60: 83 e8 80 sub $0xffffff80,%eax
80103e63: 3d d4 4d 11 80 cmp $0x80114dd4,%eax
80103e68: 74 1c je 80103e86 <exit+0xc6>
if(p->state == SLEEPING && p->chan == chan)
80103e6a: 83 78 0c 02 cmpl $0x2,0xc(%eax)
80103e6e: 75 f0 jne 80103e60 <exit+0xa0>
80103e70: 3b 50 20 cmp 0x20(%eax),%edx
80103e73: 75 eb jne 80103e60 <exit+0xa0>
p->state = RUNNABLE;
80103e75: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax)
=======
80103c60: 83 e8 80 sub $0xffffff80,%eax
80103c63: 3d d4 4d 11 80 cmp $0x80114dd4,%eax
80103c68: 74 1c je 80103c86 <exit+0xb6>
if(p->state == SLEEPING && p->chan == chan)
80103c6a: 83 78 0c 02 cmpl $0x2,0xc(%eax)
80103c6e: 75 f0 jne 80103c60 <exit+0x90>
80103c70: 3b 50 20 cmp 0x20(%eax),%edx
80103c73: 75 eb jne 80103c60 <exit+0x90>
p->state = RUNNABLE;
80103c75: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax)
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
static void
wakeup1(void *chan)
{
struct proc *p;
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
<<<<<<< HEAD
80103e7c: 83 e8 80 sub $0xffffff80,%eax
80103e7f: 3d d4 4d 11 80 cmp $0x80114dd4,%eax
80103e84: 75 e4 jne 80103e6a <exit+0xaa>
=======
80103c7c: 83 e8 80 sub $0xffffff80,%eax
80103c7f: 3d d4 4d 11 80 cmp $0x80114dd4,%eax
80103c84: 75 e4 jne 80103c6a <exit+0x9a>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
wakeup1(proc->parent);
// Pass abandoned children to init.
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
if(p->parent == proc){
p->parent = initproc;
<<<<<<< HEAD
80103e86: 8b 1d bc a5 10 80 mov 0x8010a5bc,%ebx
80103e8c: ba d4 2d 11 80 mov $0x80112dd4,%edx
80103e91: eb 10 jmp 80103ea3 <exit+0xe3>
80103e93: 90 nop
80103e94: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
=======
80103c86: 8b 1d bc a5 10 80 mov 0x8010a5bc,%ebx
80103c8c: ba d4 2d 11 80 mov $0x80112dd4,%edx
80103c91: eb 10 jmp 80103ca3 <exit+0xd3>
80103c93: 90 nop
80103c94: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// Parent might be sleeping in wait().
wakeup1(proc->parent);
// Pass abandoned children to init.
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
<<<<<<< HEAD
80103e98: 83 ea 80 sub $0xffffff80,%edx
80103e9b: 81 fa d4 4d 11 80 cmp $0x80114dd4,%edx
80103ea1: 74 3b je 80103ede <exit+0x11e>
if(p->parent == proc){
80103ea3: 3b 4a 14 cmp 0x14(%edx),%ecx
80103ea6: 75 f0 jne 80103e98 <exit+0xd8>
p->parent = initproc;
if(p->state == ZOMBIE)
80103ea8: 83 7a 0c 05 cmpl $0x5,0xc(%edx)
=======
80103c98: 83 ea 80 sub $0xffffff80,%edx
80103c9b: 81 fa d4 4d 11 80 cmp $0x80114dd4,%edx
80103ca1: 74 33 je 80103cd6 <exit+0x106>
if(p->parent == proc){
80103ca3: 3b 4a 14 cmp 0x14(%edx),%ecx
80103ca6: 75 f0 jne 80103c98 <exit+0xc8>
p->parent = initproc;
if(p->state == ZOMBIE)
80103ca8: 83 7a 0c 05 cmpl $0x5,0xc(%edx)
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
wakeup1(proc->parent);
// Pass abandoned children to init.
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
if(p->parent == proc){
p->parent = initproc;
<<<<<<< HEAD
80103eac: 89 5a 14 mov %ebx,0x14(%edx)
if(p->state == ZOMBIE)
80103eaf: 75 e7 jne 80103e98 <exit+0xd8>
80103eb1: b8 d4 2d 11 80 mov $0x80112dd4,%eax
80103eb6: eb 12 jmp 80103eca <exit+0x10a>
80103eb8: 90 nop
80103eb9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
=======
80103cac: 89 5a 14 mov %ebx,0x14(%edx)
if(p->state == ZOMBIE)
80103caf: 75 e7 jne 80103c98 <exit+0xc8>
80103cb1: b8 d4 2d 11 80 mov $0x80112dd4,%eax
80103cb6: eb 0a jmp 80103cc2 <exit+0xf2>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
static void
wakeup1(void *chan)
{
struct proc *p;
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
<<<<<<< HEAD
80103ec0: 83 e8 80 sub $0xffffff80,%eax
80103ec3: 3d d4 4d 11 80 cmp $0x80114dd4,%eax
80103ec8: 74 ce je 80103e98 <exit+0xd8>
if(p->state == SLEEPING && p->chan == chan)
80103eca: 83 78 0c 02 cmpl $0x2,0xc(%eax)
80103ece: 75 f0 jne 80103ec0 <exit+0x100>
80103ed0: 3b 58 20 cmp 0x20(%eax),%ebx
80103ed3: 75 eb jne 80103ec0 <exit+0x100>
p->state = RUNNABLE;
80103ed5: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax)
80103edc: eb e2 jmp 80103ec0 <exit+0x100>
=======
80103cb8: 83 e8 80 sub $0xffffff80,%eax
80103cbb: 3d d4 4d 11 80 cmp $0x80114dd4,%eax
80103cc0: 74 d6 je 80103c98 <exit+0xc8>
if(p->state == SLEEPING && p->chan == chan)
80103cc2: 83 78 0c 02 cmpl $0x2,0xc(%eax)
80103cc6: 75 f0 jne 80103cb8 <exit+0xe8>
80103cc8: 3b 58 20 cmp 0x20(%eax),%ebx
80103ccb: 75 eb jne 80103cb8 <exit+0xe8>
p->state = RUNNABLE;
80103ccd: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax)
80103cd4: eb e2 jmp 80103cb8 <exit+0xe8>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
wakeup1(initproc);
}
}
// Jump into the scheduler, never to return.
proc->state = ZOMBIE;
<<<<<<< HEAD
80103ede: c7 41 0c 05 00 00 00 movl $0x5,0xc(%ecx)
sched();
80103ee5: e8 36 fe ff ff call 80103d20 <sched>
panic("zombie exit");
80103eea: 83 ec 0c sub $0xc,%esp
80103eed: 68 05 79 10 80 push $0x80107905
80103ef2: e8 79 c4 ff ff call 80100370 <panic>
=======
80103cd6: c7 41 0c 05 00 00 00 movl $0x5,0xc(%ecx)
sched();
80103cdd: e8 4e fe ff ff call 80103b30 <sched>
panic("zombie exit");
80103ce2: c7 04 24 95 76 10 80 movl $0x80107695,(%esp)
80103ce9: e8 72 c6 ff ff call 80100360 <panic>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
{
struct proc *p;
int fd;
if(proc == initproc)
panic("init exiting");
<<<<<<< HEAD
80103ef7: 83 ec 0c sub $0xc,%esp
80103efa: 68 f8 78 10 80 push $0x801078f8
80103eff: e8 6c c4 ff ff call 80100370 <panic>
80103f04: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80103f0a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
80103f10 <yield>:
=======
80103cee: c7 04 24 88 76 10 80 movl $0x80107688,(%esp)
80103cf5: e8 66 c6 ff ff call 80100360 <panic>
80103cfa: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80103d00 <yield>:
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
}
// Give up the CPU for one scheduling round.
void
yield(void)
{
<<<<<<< HEAD
80103f10: 55 push %ebp
80103f11: 89 e5 mov %esp,%ebp
80103f13: 83 ec 14 sub $0x14,%esp
acquire(&ptable.lock); //DOC: yieldlock
80103f16: 68 a0 2d 11 80 push $0x80112da0
80103f1b: e8 f0 05 00 00 call 80104510 <acquire>
proc->state = RUNNABLE;
80103f20: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80103f26: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax)
sched();
80103f2d: e8 ee fd ff ff call 80103d20 <sched>
release(&ptable.lock);
80103f32: c7 04 24 a0 2d 11 80 movl $0x80112da0,(%esp)
80103f39: e8 b2 07 00 00 call 801046f0 <release>
}
80103f3e: 83 c4 10 add $0x10,%esp
80103f41: c9 leave
80103f42: c3 ret
80103f43: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80103f49: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80103f50 <sleep>:
// Atomically release lock and sleep on chan.
// Reacquires lock when awakened.
void
sleep(void *chan, struct spinlock *lk)
{
if(proc == 0)
80103f50: 65 a1 04 00 00 00 mov %gs:0x4,%eax
=======
80103d00: 55 push %ebp
80103d01: 89 e5 mov %esp,%ebp
80103d03: 83 ec 18 sub $0x18,%esp
acquire(&ptable.lock); //DOC: yieldlock
80103d06: c7 04 24 a0 2d 11 80 movl $0x80112da0,(%esp)
80103d0d: e8 6e 06 00 00 call 80104380 <acquire>
proc->state = RUNNABLE;
80103d12: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80103d18: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax)
sched();
80103d1f: e8 0c fe ff ff call 80103b30 <sched>
release(&ptable.lock);
80103d24: c7 04 24 a0 2d 11 80 movl $0x80112da0,(%esp)
80103d2b: e8 80 07 00 00 call 801044b0 <release>
}
80103d30: c9 leave
80103d31: c3 ret
80103d32: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80103d39: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80103d40 <sleep>:
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// Atomically release lock and sleep on chan.
// Reacquires lock when awakened.
void
sleep(void *chan, struct spinlock *lk)
{
<<<<<<< HEAD
80103f56: 55 push %ebp
80103f57: 89 e5 mov %esp,%ebp
80103f59: 56 push %esi
80103f5a: 53 push %ebx
if(proc == 0)
80103f5b: 85 c0 test %eax,%eax
=======
80103d40: 55 push %ebp
80103d41: 89 e5 mov %esp,%ebp
80103d43: 56 push %esi
80103d44: 53 push %ebx
80103d45: 83 ec 10 sub $0x10,%esp
if(proc == 0)
80103d48: 65 a1 04 00 00 00 mov %gs:0x4,%eax
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// Atomically release lock and sleep on chan.
// Reacquires lock when awakened.
void
sleep(void *chan, struct spinlock *lk)
{
<<<<<<< HEAD
80103f5d: 8b 75 08 mov 0x8(%ebp),%esi
80103f60: 8b 5d 0c mov 0xc(%ebp),%ebx
if(proc == 0)
80103f63: 0f 84 97 00 00 00 je 80104000 <sleep+0xb0>
panic("sleep");
if(lk == 0)
80103f69: 85 db test %ebx,%ebx
80103f6b: 0f 84 82 00 00 00 je 80103ff3 <sleep+0xa3>
=======
80103d4e: 8b 75 08 mov 0x8(%ebp),%esi
80103d51: 8b 5d 0c mov 0xc(%ebp),%ebx
if(proc == 0)
80103d54: 85 c0 test %eax,%eax
80103d56: 0f 84 8b 00 00 00 je 80103de7 <sleep+0xa7>
panic("sleep");
if(lk == 0)
80103d5c: 85 db test %ebx,%ebx
80103d5e: 74 7b je 80103ddb <sleep+0x9b>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// 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
<<<<<<< HEAD
80103f71: 81 fb a0 2d 11 80 cmp $0x80112da0,%ebx
80103f77: 74 57 je 80103fd0 <sleep+0x80>
acquire(&ptable.lock); //DOC: sleeplock1
80103f79: 83 ec 0c sub $0xc,%esp
80103f7c: 68 a0 2d 11 80 push $0x80112da0
80103f81: e8 8a 05 00 00 call 80104510 <acquire>
release(lk);
80103f86: 89 1c 24 mov %ebx,(%esp)
80103f89: e8 62 07 00 00 call 801046f0 <release>
=======
80103d60: 81 fb a0 2d 11 80 cmp $0x80112da0,%ebx
80103d66: 74 50 je 80103db8 <sleep+0x78>
acquire(&ptable.lock); //DOC: sleeplock1
80103d68: c7 04 24 a0 2d 11 80 movl $0x80112da0,(%esp)
80103d6f: e8 0c 06 00 00 call 80104380 <acquire>
release(lk);
80103d74: 89 1c 24 mov %ebx,(%esp)
80103d77: e8 34 07 00 00 call 801044b0 <release>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
}
// Go to sleep.
proc->chan = chan;
<<<<<<< HEAD
80103f8e: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80103f94: 89 70 20 mov %esi,0x20(%eax)
proc->state = SLEEPING;
80103f97: c7 40 0c 02 00 00 00 movl $0x2,0xc(%eax)
sched();
80103f9e: e8 7d fd ff ff call 80103d20 <sched>
// Tidy up.
proc->chan = 0;
80103fa3: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80103fa9: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax)
=======
80103d7c: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80103d82: 89 70 20 mov %esi,0x20(%eax)
proc->state = SLEEPING;
80103d85: c7 40 0c 02 00 00 00 movl $0x2,0xc(%eax)
sched();
80103d8c: e8 9f fd ff ff call 80103b30 <sched>
// Tidy up.
proc->chan = 0;
80103d91: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80103d97: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax)
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// Reacquire original lock.
if(lk != &ptable.lock){ //DOC: sleeplock2
release(&ptable.lock);
<<<<<<< HEAD
80103fb0: c7 04 24 a0 2d 11 80 movl $0x80112da0,(%esp)
80103fb7: e8 34 07 00 00 call 801046f0 <release>
acquire(lk);
80103fbc: 89 5d 08 mov %ebx,0x8(%ebp)
80103fbf: 83 c4 10 add $0x10,%esp
}
}
80103fc2: 8d 65 f8 lea -0x8(%ebp),%esp
80103fc5: 5b pop %ebx
80103fc6: 5e pop %esi
80103fc7: 5d pop %ebp
=======
80103d9e: c7 04 24 a0 2d 11 80 movl $0x80112da0,(%esp)
80103da5: e8 06 07 00 00 call 801044b0 <release>
acquire(lk);
80103daa: 89 5d 08 mov %ebx,0x8(%ebp)
}
}
80103dad: 83 c4 10 add $0x10,%esp
80103db0: 5b pop %ebx
80103db1: 5e pop %esi
80103db2: 5d pop %ebp
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
proc->chan = 0;
// Reacquire original lock.
if(lk != &ptable.lock){ //DOC: sleeplock2
release(&ptable.lock);
acquire(lk);
<<<<<<< HEAD
80103fc8: e9 43 05 00 00 jmp 80104510 <acquire>
80103fcd: 8d 76 00 lea 0x0(%esi),%esi
=======
80103db3: e9 c8 05 00 00 jmp 80104380 <acquire>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
acquire(&ptable.lock); //DOC: sleeplock1
release(lk);
}
// Go to sleep.
proc->chan = chan;
<<<<<<< HEAD
80103fd0: 89 70 20 mov %esi,0x20(%eax)
proc->state = SLEEPING;
80103fd3: c7 40 0c 02 00 00 00 movl $0x2,0xc(%eax)
sched();
80103fda: e8 41 fd ff ff call 80103d20 <sched>
// Tidy up.
proc->chan = 0;
80103fdf: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80103fe5: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax)
=======
80103db8: 89 70 20 mov %esi,0x20(%eax)
proc->state = SLEEPING;
80103dbb: c7 40 0c 02 00 00 00 movl $0x2,0xc(%eax)
sched();
80103dc2: e8 69 fd ff ff call 80103b30 <sched>
// Tidy up.
proc->chan = 0;
80103dc7: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80103dcd: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax)
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// Reacquire original lock.
if(lk != &ptable.lock){ //DOC: sleeplock2
release(&ptable.lock);
acquire(lk);
}
}
<<<<<<< HEAD
80103fec: 8d 65 f8 lea -0x8(%ebp),%esp
80103fef: 5b pop %ebx
80103ff0: 5e pop %esi
80103ff1: 5d pop %ebp
80103ff2: c3 ret
=======
80103dd4: 83 c4 10 add $0x10,%esp
80103dd7: 5b pop %ebx
80103dd8: 5e pop %esi
80103dd9: 5d pop %ebp
80103dda: c3 ret
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
{
if(proc == 0)
panic("sleep");
if(lk == 0)
panic("sleep without lk");
<<<<<<< HEAD
80103ff3: 83 ec 0c sub $0xc,%esp
80103ff6: 68 17 79 10 80 push $0x80107917
80103ffb: e8 70 c3 ff ff call 80100370 <panic>
=======
80103ddb: c7 04 24 a7 76 10 80 movl $0x801076a7,(%esp)
80103de2: e8 79 c5 ff ff call 80100360 <panic>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// Reacquires lock when awakened.
void
sleep(void *chan, struct spinlock *lk)
{
if(proc == 0)
panic("sleep");
<<<<<<< HEAD
80104000: 83 ec 0c sub $0xc,%esp
80104003: 68 11 79 10 80 push $0x80107911
80104008: e8 63 c3 ff ff call 80100370 <panic>
8010400d: 8d 76 00 lea 0x0(%esi),%esi
80104010 <wait>:
=======
80103de7: c7 04 24 a1 76 10 80 movl $0x801076a1,(%esp)
80103dee: e8 6d c5 ff ff call 80100360 <panic>
80103df3: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80103df9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80103e00 <wait>:
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// Wait for a child process to exit and return its pid.
// Return -1 if this process has no children.
int
wait(void)
{
<<<<<<< HEAD
80104010: 55 push %ebp
80104011: 89 e5 mov %esp,%ebp
80104013: 56 push %esi
80104014: 53 push %ebx
=======
80103e00: 55 push %ebp
80103e01: 89 e5 mov %esp,%ebp
80103e03: 56 push %esi
80103e04: 53 push %ebx
80103e05: 83 ec 10 sub $0x10,%esp
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
struct proc *p;
int havekids, pid;
acquire(&ptable.lock);
<<<<<<< HEAD
80104015: 83 ec 0c sub $0xc,%esp
80104018: 68 a0 2d 11 80 push $0x80112da0
8010401d: e8 ee 04 00 00 call 80104510 <acquire>
80104022: 83 c4 10 add $0x10,%esp
80104025: 65 a1 04 00 00 00 mov %gs:0x4,%eax
for(;;){
// Scan through table looking for exited children.
havekids = 0;
8010402b: 31 d2 xor %edx,%edx
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
8010402d: bb d4 2d 11 80 mov $0x80112dd4,%ebx
80104032: eb 0f jmp 80104043 <wait+0x33>
80104034: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104038: 83 eb 80 sub $0xffffff80,%ebx
8010403b: 81 fb d4 4d 11 80 cmp $0x80114dd4,%ebx
80104041: 74 1d je 80104060 <wait+0x50>
if(p->parent != proc)
80104043: 3b 43 14 cmp 0x14(%ebx),%eax
80104046: 75 f0 jne 80104038 <wait+0x28>
continue;
havekids = 1;
if(p->state == ZOMBIE){
80104048: 83 7b 0c 05 cmpl $0x5,0xc(%ebx)
8010404c: 74 30 je 8010407e <wait+0x6e>
=======
80103e08: c7 04 24 a0 2d 11 80 movl $0x80112da0,(%esp)
80103e0f: e8 6c 05 00 00 call 80104380 <acquire>
80103e14: 65 a1 04 00 00 00 mov %gs:0x4,%eax
for(;;){
// Scan through table looking for exited children.
havekids = 0;
80103e1a: 31 d2 xor %edx,%edx
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80103e1c: bb d4 2d 11 80 mov $0x80112dd4,%ebx
80103e21: eb 10 jmp 80103e33 <wait+0x33>
80103e23: 90 nop
80103e24: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80103e28: 83 eb 80 sub $0xffffff80,%ebx
80103e2b: 81 fb d4 4d 11 80 cmp $0x80114dd4,%ebx
80103e31: 74 1d je 80103e50 <wait+0x50>
if(p->parent != proc)
80103e33: 39 43 14 cmp %eax,0x14(%ebx)
80103e36: 75 f0 jne 80103e28 <wait+0x28>
continue;
havekids = 1;
if(p->state == ZOMBIE){
80103e38: 83 7b 0c 05 cmpl $0x5,0xc(%ebx)
80103e3c: 74 2f je 80103e6d <wait+0x6d>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
acquire(&ptable.lock);
for(;;){
// Scan through table looking for exited children.
havekids = 0;
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
<<<<<<< HEAD
8010404e: 83 eb 80 sub $0xffffff80,%ebx
if(p->parent != proc)
continue;
havekids = 1;
80104051: ba 01 00 00 00 mov $0x1,%edx
=======
80103e3e: 83 eb 80 sub $0xffffff80,%ebx
if(p->parent != proc)
continue;
havekids = 1;
80103e41: ba 01 00 00 00 mov $0x1,%edx
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
acquire(&ptable.lock);
for(;;){
// Scan through table looking for exited children.
havekids = 0;
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
<<<<<<< HEAD
80104056: 81 fb d4 4d 11 80 cmp $0x80114dd4,%ebx
8010405c: 75 e5 jne 80104043 <wait+0x33>
8010405e: 66 90 xchg %ax,%ax
=======
80103e46: 81 fb d4 4d 11 80 cmp $0x80114dd4,%ebx
80103e4c: 75 e5 jne 80103e33 <wait+0x33>
80103e4e: 66 90 xchg %ax,%ax
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
return pid;
}
}
// No point waiting if we don't have any children.
if(!havekids || proc->killed){
<<<<<<< HEAD
80104060: 85 d2 test %edx,%edx
80104062: 74 70 je 801040d4 <wait+0xc4>
80104064: 8b 50 24 mov 0x24(%eax),%edx
80104067: 85 d2 test %edx,%edx
80104069: 75 69 jne 801040d4 <wait+0xc4>
=======
80103e50: 85 d2 test %edx,%edx
80103e52: 74 6e je 80103ec2 <wait+0xc2>
80103e54: 8b 50 24 mov 0x24(%eax),%edx
80103e57: 85 d2 test %edx,%edx
80103e59: 75 67 jne 80103ec2 <wait+0xc2>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
release(&ptable.lock);
return -1;
}
// Wait for children to exit. (See wakeup1 call in proc_exit.)
sleep(proc, &ptable.lock); //DOC: wait-sleep
<<<<<<< HEAD
8010406b: 83 ec 08 sub $0x8,%esp
8010406e: 68 a0 2d 11 80 push $0x80112da0
80104073: 50 push %eax
80104074: e8 d7 fe ff ff call 80103f50 <sleep>
}
80104079: 83 c4 10 add $0x10,%esp
8010407c: eb a7 jmp 80104025 <wait+0x15>
=======
80103e5b: c7 44 24 04 a0 2d 11 movl $0x80112da0,0x4(%esp)
80103e62: 80
80103e63: 89 04 24 mov %eax,(%esp)
80103e66: e8 d5 fe ff ff call 80103d40 <sleep>
}
80103e6b: eb a7 jmp 80103e14 <wait+0x14>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
continue;
havekids = 1;
if(p->state == ZOMBIE){
// Found one.
pid = p->pid;
kfree(p->kstack);
<<<<<<< HEAD
8010407e: 83 ec 0c sub $0xc,%esp
80104081: ff 73 08 pushl 0x8(%ebx)
=======
80103e6d: 8b 43 08 mov 0x8(%ebx),%eax
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
if(p->parent != proc)
continue;
havekids = 1;
if(p->state == ZOMBIE){
// Found one.
pid = p->pid;
<<<<<<< HEAD
80104084: 8b 73 10 mov 0x10(%ebx),%esi
kfree(p->kstack);
80104087: e8 34 e2 ff ff call 801022c0 <kfree>
p->kstack = 0;
freevm(p->pgdir);
8010408c: 59 pop %ecx
8010408d: ff 73 04 pushl 0x4(%ebx)
=======
80103e70: 8b 73 10 mov 0x10(%ebx),%esi
kfree(p->kstack);
80103e73: 89 04 24 mov %eax,(%esp)
80103e76: e8 65 e4 ff ff call 801022e0 <kfree>
p->kstack = 0;
freevm(p->pgdir);
80103e7b: 8b 43 04 mov 0x4(%ebx),%eax
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
havekids = 1;
if(p->state == ZOMBIE){
// Found one.
pid = p->pid;
kfree(p->kstack);
p->kstack = 0;
<<<<<<< HEAD
80104090: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
freevm(p->pgdir);
80104097: e8 24 30 00 00 call 801070c0 <freevm>
p->pid = 0;
8010409c: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx)
p->parent = 0;
801040a3: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx)
p->name[0] = 0;
801040aa: c6 43 6c 00 movb $0x0,0x6c(%ebx)
p->killed = 0;
801040ae: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
p->state = UNUSED;
801040b5: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
release(&ptable.lock);
801040bc: c7 04 24 a0 2d 11 80 movl $0x80112da0,(%esp)
801040c3: e8 28 06 00 00 call 801046f0 <release>
return pid;
801040c8: 83 c4 10 add $0x10,%esp
=======
80103e7e: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
freevm(p->pgdir);
80103e85: 89 04 24 mov %eax,(%esp)
80103e88: e8 b3 2f 00 00 call 80106e40 <freevm>
p->pid = 0;
p->parent = 0;
p->name[0] = 0;
p->killed = 0;
p->state = UNUSED;
release(&ptable.lock);
80103e8d: c7 04 24 a0 2d 11 80 movl $0x80112da0,(%esp)
// Found one.
pid = p->pid;
kfree(p->kstack);
p->kstack = 0;
freevm(p->pgdir);
p->pid = 0;
80103e94: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx)
p->parent = 0;
80103e9b: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx)
p->name[0] = 0;
80103ea2: c6 43 6c 00 movb $0x0,0x6c(%ebx)
p->killed = 0;
80103ea6: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
p->state = UNUSED;
80103ead: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
release(&ptable.lock);
80103eb4: e8 f7 05 00 00 call 801044b0 <release>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
}
// Wait for children to exit. (See wakeup1 call in proc_exit.)
sleep(proc, &ptable.lock); //DOC: wait-sleep
}
}
<<<<<<< HEAD
801040cb: 8d 65 f8 lea -0x8(%ebp),%esp
=======
80103eb9: 83 c4 10 add $0x10,%esp
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
p->parent = 0;
p->name[0] = 0;
p->killed = 0;
p->state = UNUSED;
release(&ptable.lock);
return pid;
<<<<<<< HEAD
801040ce: 89 f0 mov %esi,%eax
=======
80103ebc: 89 f0 mov %esi,%eax
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
}
// Wait for children to exit. (See wakeup1 call in proc_exit.)
sleep(proc, &ptable.lock); //DOC: wait-sleep
}
}
<<<<<<< HEAD
801040d0: 5b pop %ebx
801040d1: 5e pop %esi
801040d2: 5d pop %ebp
801040d3: c3 ret
=======
80103ebe: 5b pop %ebx
80103ebf: 5e pop %esi
80103ec0: 5d pop %ebp
80103ec1: c3 ret
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
}
}
// No point waiting if we don't have any children.
if(!havekids || proc->killed){
release(&ptable.lock);
<<<<<<< HEAD
801040d4: 83 ec 0c sub $0xc,%esp
801040d7: 68 a0 2d 11 80 push $0x80112da0
801040dc: e8 0f 06 00 00 call 801046f0 <release>
return -1;
801040e1: 83 c4 10 add $0x10,%esp
=======
80103ec2: c7 04 24 a0 2d 11 80 movl $0x80112da0,(%esp)
80103ec9: e8 e2 05 00 00 call 801044b0 <release>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
}
// Wait for children to exit. (See wakeup1 call in proc_exit.)
sleep(proc, &ptable.lock); //DOC: wait-sleep
}
}
<<<<<<< HEAD
801040e4: 8d 65 f8 lea -0x8(%ebp),%esp
=======
80103ece: 83 c4 10 add $0x10,%esp
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
}
// No point waiting if we don't have any children.
if(!havekids || proc->killed){
release(&ptable.lock);
return -1;
<<<<<<< HEAD
801040e7: b8 ff ff ff ff mov $0xffffffff,%eax
=======
80103ed1: b8 ff ff ff ff mov $0xffffffff,%eax
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
}
// Wait for children to exit. (See wakeup1 call in proc_exit.)
sleep(proc, &ptable.lock); //DOC: wait-sleep
}
}
<<<<<<< HEAD
801040ec: 5b pop %ebx
801040ed: 5e pop %esi
801040ee: 5d pop %ebp
801040ef: c3 ret
801040f0 <wakeup>:
=======
80103ed6: 5b pop %ebx
80103ed7: 5e pop %esi
80103ed8: 5d pop %ebp
80103ed9: c3 ret
80103eda: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80103ee0 <wakeup>:
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
}
// Wake up all processes sleeping on chan.
void
wakeup(void *chan)
{
<<<<<<< HEAD
801040f0: 55 push %ebp
801040f1: 89 e5 mov %esp,%ebp
801040f3: 53 push %ebx
801040f4: 83 ec 10 sub $0x10,%esp
801040f7: 8b 5d 08 mov 0x8(%ebp),%ebx
acquire(&ptable.lock);
801040fa: 68 a0 2d 11 80 push $0x80112da0
801040ff: e8 0c 04 00 00 call 80104510 <acquire>
80104104: 83 c4 10 add $0x10,%esp
=======
80103ee0: 55 push %ebp
80103ee1: 89 e5 mov %esp,%ebp
80103ee3: 53 push %ebx
80103ee4: 83 ec 14 sub $0x14,%esp
80103ee7: 8b 5d 08 mov 0x8(%ebp),%ebx
acquire(&ptable.lock);
80103eea: c7 04 24 a0 2d 11 80 movl $0x80112da0,(%esp)
80103ef1: e8 8a 04 00 00 call 80104380 <acquire>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
static void
wakeup1(void *chan)
{
struct proc *p;
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
<<<<<<< HEAD
80104107: b8 d4 2d 11 80 mov $0x80112dd4,%eax
8010410c: eb 0c jmp 8010411a <wakeup+0x2a>
8010410e: 66 90 xchg %ax,%ax
80104110: 83 e8 80 sub $0xffffff80,%eax
80104113: 3d d4 4d 11 80 cmp $0x80114dd4,%eax
80104118: 74 1c je 80104136 <wakeup+0x46>
if(p->state == SLEEPING && p->chan == chan)
8010411a: 83 78 0c 02 cmpl $0x2,0xc(%eax)
8010411e: 75 f0 jne 80104110 <wakeup+0x20>
80104120: 3b 58 20 cmp 0x20(%eax),%ebx
80104123: 75 eb jne 80104110 <wakeup+0x20>
p->state = RUNNABLE;
80104125: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax)
=======
80103ef6: b8 d4 2d 11 80 mov $0x80112dd4,%eax
80103efb: eb 0d jmp 80103f0a <wakeup+0x2a>
80103efd: 8d 76 00 lea 0x0(%esi),%esi
80103f00: 83 e8 80 sub $0xffffff80,%eax
80103f03: 3d d4 4d 11 80 cmp $0x80114dd4,%eax
80103f08: 74 1e je 80103f28 <wakeup+0x48>
if(p->state == SLEEPING && p->chan == chan)
80103f0a: 83 78 0c 02 cmpl $0x2,0xc(%eax)
80103f0e: 75 f0 jne 80103f00 <wakeup+0x20>
80103f10: 3b 58 20 cmp 0x20(%eax),%ebx
80103f13: 75 eb jne 80103f00 <wakeup+0x20>
p->state = RUNNABLE;
80103f15: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax)
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
static void
wakeup1(void *chan)
{
struct proc *p;
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
<<<<<<< HEAD
8010412c: 83 e8 80 sub $0xffffff80,%eax
8010412f: 3d d4 4d 11 80 cmp $0x80114dd4,%eax
80104134: 75 e4 jne 8010411a <wakeup+0x2a>
=======
80103f1c: 83 e8 80 sub $0xffffff80,%eax
80103f1f: 3d d4 4d 11 80 cmp $0x80114dd4,%eax
80103f24: 75 e4 jne 80103f0a <wakeup+0x2a>
80103f26: 66 90 xchg %ax,%ax
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
void
wakeup(void *chan)
{
acquire(&ptable.lock);
wakeup1(chan);
release(&ptable.lock);
<<<<<<< HEAD
80104136: c7 45 08 a0 2d 11 80 movl $0x80112da0,0x8(%ebp)
}
8010413d: 8b 5d fc mov -0x4(%ebp),%ebx
80104140: c9 leave
=======
80103f28: c7 45 08 a0 2d 11 80 movl $0x80112da0,0x8(%ebp)
}
80103f2f: 83 c4 14 add $0x14,%esp
80103f32: 5b pop %ebx
80103f33: 5d pop %ebp
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
void
wakeup(void *chan)
{
acquire(&ptable.lock);
wakeup1(chan);
release(&ptable.lock);
<<<<<<< HEAD
80104141: e9 aa 05 00 00 jmp 801046f0 <release>
80104146: 8d 76 00 lea 0x0(%esi),%esi
80104149: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104150 <kill>:
=======
80103f34: e9 77 05 00 00 jmp 801044b0 <release>
80103f39: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80103f40 <kill>:
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// 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)
{
<<<<<<< HEAD
80104150: 55 push %ebp
80104151: 89 e5 mov %esp,%ebp
80104153: 53 push %ebx
80104154: 83 ec 10 sub $0x10,%esp
80104157: 8b 5d 08 mov 0x8(%ebp),%ebx
struct proc *p;
acquire(&ptable.lock);
8010415a: 68 a0 2d 11 80 push $0x80112da0
8010415f: e8 ac 03 00 00 call 80104510 <acquire>
80104164: 83 c4 10 add $0x10,%esp
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80104167: b8 d4 2d 11 80 mov $0x80112dd4,%eax
8010416c: eb 0c jmp 8010417a <kill+0x2a>
8010416e: 66 90 xchg %ax,%ax
80104170: 83 e8 80 sub $0xffffff80,%eax
80104173: 3d d4 4d 11 80 cmp $0x80114dd4,%eax
80104178: 74 3e je 801041b8 <kill+0x68>
if(p->pid == pid){
8010417a: 39 58 10 cmp %ebx,0x10(%eax)
8010417d: 75 f1 jne 80104170 <kill+0x20>
p->killed = 1;
// Wake process from sleep if necessary.
if(p->state == SLEEPING)
8010417f: 83 78 0c 02 cmpl $0x2,0xc(%eax)
=======
80103f40: 55 push %ebp
80103f41: 89 e5 mov %esp,%ebp
80103f43: 53 push %ebx
80103f44: 83 ec 14 sub $0x14,%esp
80103f47: 8b 5d 08 mov 0x8(%ebp),%ebx
struct proc *p;
acquire(&ptable.lock);
80103f4a: c7 04 24 a0 2d 11 80 movl $0x80112da0,(%esp)
80103f51: e8 2a 04 00 00 call 80104380 <acquire>
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80103f56: b8 d4 2d 11 80 mov $0x80112dd4,%eax
80103f5b: eb 0d jmp 80103f6a <kill+0x2a>
80103f5d: 8d 76 00 lea 0x0(%esi),%esi
80103f60: 83 e8 80 sub $0xffffff80,%eax
80103f63: 3d d4 4d 11 80 cmp $0x80114dd4,%eax
80103f68: 74 36 je 80103fa0 <kill+0x60>
if(p->pid == pid){
80103f6a: 39 58 10 cmp %ebx,0x10(%eax)
80103f6d: 75 f1 jne 80103f60 <kill+0x20>
p->killed = 1;
// Wake process from sleep if necessary.
if(p->state == SLEEPING)
80103f6f: 83 78 0c 02 cmpl $0x2,0xc(%eax)
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
struct proc *p;
acquire(&ptable.lock);
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
if(p->pid == pid){
p->killed = 1;
<<<<<<< HEAD
80104183: c7 40 24 01 00 00 00 movl $0x1,0x24(%eax)
// Wake process from sleep if necessary.
if(p->state == SLEEPING)
8010418a: 74 1c je 801041a8 <kill+0x58>
p->state = RUNNABLE;
release(&ptable.lock);
8010418c: 83 ec 0c sub $0xc,%esp
8010418f: 68 a0 2d 11 80 push $0x80112da0
80104194: e8 57 05 00 00 call 801046f0 <release>
return 0;
80104199: 83 c4 10 add $0x10,%esp
8010419c: 31 c0 xor %eax,%eax
=======
80103f73: c7 40 24 01 00 00 00 movl $0x1,0x24(%eax)
// Wake process from sleep if necessary.
if(p->state == SLEEPING)
80103f7a: 74 14 je 80103f90 <kill+0x50>
p->state = RUNNABLE;
release(&ptable.lock);
80103f7c: c7 04 24 a0 2d 11 80 movl $0x80112da0,(%esp)
80103f83: e8 28 05 00 00 call 801044b0 <release>
return 0;
}
}
release(&ptable.lock);
return -1;
}
80103f88: 83 c4 14 add $0x14,%esp
p->killed = 1;
// Wake process from sleep if necessary.
if(p->state == SLEEPING)
p->state = RUNNABLE;
release(&ptable.lock);
return 0;
80103f8b: 31 c0 xor %eax,%eax
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
}
}
release(&ptable.lock);
return -1;
}
<<<<<<< HEAD
8010419e: 8b 5d fc mov -0x4(%ebp),%ebx
801041a1: c9 leave
801041a2: c3 ret
801041a3: 90 nop
801041a4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
=======
80103f8d: 5b pop %ebx
80103f8e: 5d pop %ebp
80103f8f: c3 ret
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
if(p->pid == pid){
p->killed = 1;
// Wake process from sleep if necessary.
if(p->state == SLEEPING)
p->state = RUNNABLE;
<<<<<<< HEAD
801041a8: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax)
801041af: eb db jmp 8010418c <kill+0x3c>
801041b1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
=======
80103f90: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax)
80103f97: eb e3 jmp 80103f7c <kill+0x3c>
80103f99: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
release(&ptable.lock);
return 0;
}
}
release(&ptable.lock);
80103fa0: c7 04 24 a0 2d 11 80 movl $0x80112da0,(%esp)
80103fa7: e8 04 05 00 00 call 801044b0 <release>
return -1;
}
80103fac: 83 c4 14 add $0x14,%esp
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
release(&ptable.lock);
return 0;
}
}
release(&ptable.lock);
<<<<<<< HEAD
801041b8: 83 ec 0c sub $0xc,%esp
801041bb: 68 a0 2d 11 80 push $0x80112da0
801041c0: e8 2b 05 00 00 call 801046f0 <release>
return -1;
801041c5: 83 c4 10 add $0x10,%esp
801041c8: b8 ff ff ff ff mov $0xffffffff,%eax
}
801041cd: 8b 5d fc mov -0x4(%ebp),%ebx
801041d0: c9 leave
801041d1: c3 ret
801041d2: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801041d9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801041e0 <procdump>:
=======
return -1;
80103faf: b8 ff ff ff ff mov $0xffffffff,%eax
}
80103fb4: 5b pop %ebx
80103fb5: 5d pop %ebp
80103fb6: c3 ret
80103fb7: 89 f6 mov %esi,%esi
80103fb9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80103fc0 <procdump>:
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// 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)
{
<<<<<<< HEAD
801041e0: 55 push %ebp
801041e1: 89 e5 mov %esp,%ebp
801041e3: 57 push %edi
801041e4: 56 push %esi
801041e5: 53 push %ebx
801041e6: 8d 75 e8 lea -0x18(%ebp),%esi
801041e9: bb 40 2e 11 80 mov $0x80112e40,%ebx
801041ee: 83 ec 3c sub $0x3c,%esp
801041f1: eb 24 jmp 80104217 <procdump+0x37>
801041f3: 90 nop
801041f4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
=======
80103fc0: 55 push %ebp
80103fc1: 89 e5 mov %esp,%ebp
80103fc3: 57 push %edi
80103fc4: 56 push %esi
80103fc5: 53 push %ebx
80103fc6: bb 40 2e 11 80 mov $0x80112e40,%ebx
80103fcb: 83 ec 4c sub $0x4c,%esp
80103fce: 8d 75 e8 lea -0x18(%ebp),%esi
80103fd1: eb 20 jmp 80103ff3 <procdump+0x33>
80103fd3: 90 nop
80103fd4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
if(p->state == SLEEPING){
getcallerpcs((uint*)p->context->ebp+2, pc);
for(i=0; i<10 && pc[i] != 0; i++)
cprintf(" %p", pc[i]);
}
cprintf("\n");
<<<<<<< HEAD
801041f8: 83 ec 0c sub $0xc,%esp
801041fb: 68 66 78 10 80 push $0x80107866
80104200: e8 5b c4 ff ff call 80100660 <cprintf>
80104205: 83 c4 10 add $0x10,%esp
80104208: 83 eb 80 sub $0xffffff80,%ebx
=======
80103fd8: c7 04 24 e6 75 10 80 movl $0x801075e6,(%esp)
80103fdf: e8 6c c6 ff ff call 80100650 <cprintf>
80103fe4: 83 eb 80 sub $0xffffff80,%ebx
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
int i;
struct proc *p;
char *state;
uint pc[10];
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
<<<<<<< HEAD
8010420b: 81 fb 40 4e 11 80 cmp $0x80114e40,%ebx
80104211: 0f 84 81 00 00 00 je 80104298 <procdump+0xb8>
if(p->state == UNUSED)
80104217: 8b 43 a0 mov -0x60(%ebx),%eax
8010421a: 85 c0 test %eax,%eax
8010421c: 74 ea je 80104208 <procdump+0x28>
continue;
if(p->state >= 0 && p->state < NELEM(states) && states[p->state])
8010421e: 83 f8 05 cmp $0x5,%eax
state = states[p->state];
else
state = "???";
80104221: ba 28 79 10 80 mov $0x80107928,%edx
=======
80103fe7: 81 fb 40 4e 11 80 cmp $0x80114e40,%ebx
80103fed: 0f 84 8d 00 00 00 je 80104080 <procdump+0xc0>
if(p->state == UNUSED)
80103ff3: 8b 43 a0 mov -0x60(%ebx),%eax
80103ff6: 85 c0 test %eax,%eax
80103ff8: 74 ea je 80103fe4 <procdump+0x24>
continue;
if(p->state >= 0 && p->state < NELEM(states) && states[p->state])
80103ffa: 83 f8 05 cmp $0x5,%eax
state = states[p->state];
else
state = "???";
80103ffd: ba b8 76 10 80 mov $0x801076b8,%edx
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
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])
<<<<<<< HEAD
80104226: 77 11 ja 80104239 <procdump+0x59>
80104228: 8b 14 85 d0 79 10 80 mov -0x7fef8630(,%eax,4),%edx
state = states[p->state];
else
state = "???";
8010422f: b8 28 79 10 80 mov $0x80107928,%eax
80104234: 85 d2 test %edx,%edx
80104236: 0f 44 d0 cmove %eax,%edx
cprintf("%d %s %s", p->pid, state, p->name);
80104239: 53 push %ebx
8010423a: 52 push %edx
8010423b: ff 73 a4 pushl -0x5c(%ebx)
8010423e: 68 2c 79 10 80 push $0x8010792c
80104243: e8 18 c4 ff ff call 80100660 <cprintf>
if(p->state == SLEEPING){
80104248: 83 c4 10 add $0x10,%esp
8010424b: 83 7b a0 02 cmpl $0x2,-0x60(%ebx)
8010424f: 75 a7 jne 801041f8 <procdump+0x18>
getcallerpcs((uint*)p->context->ebp+2, pc);
80104251: 8d 45 c0 lea -0x40(%ebp),%eax
80104254: 83 ec 08 sub $0x8,%esp
80104257: 8d 7d c0 lea -0x40(%ebp),%edi
8010425a: 50 push %eax
8010425b: 8b 43 b0 mov -0x50(%ebx),%eax
8010425e: 8b 40 0c mov 0xc(%eax),%eax
80104261: 83 c0 08 add $0x8,%eax
80104264: 50 push %eax
80104265: e8 76 03 00 00 call 801045e0 <getcallerpcs>
8010426a: 83 c4 10 add $0x10,%esp
8010426d: 8d 76 00 lea 0x0(%esi),%esi
for(i=0; i<10 && pc[i] != 0; i++)
80104270: 8b 17 mov (%edi),%edx
80104272: 85 d2 test %edx,%edx
80104274: 74 82 je 801041f8 <procdump+0x18>
cprintf(" %p", pc[i]);
80104276: 83 ec 08 sub $0x8,%esp
80104279: 83 c7 04 add $0x4,%edi
8010427c: 52 push %edx
8010427d: 68 89 73 10 80 push $0x80107389
80104282: e8 d9 c3 ff ff call 80100660 <cprintf>
=======
80104002: 77 11 ja 80104015 <procdump+0x55>
80104004: 8b 14 85 60 77 10 80 mov -0x7fef88a0(,%eax,4),%edx
state = states[p->state];
else
state = "???";
8010400b: b8 b8 76 10 80 mov $0x801076b8,%eax
80104010: 85 d2 test %edx,%edx
80104012: 0f 44 d0 cmove %eax,%edx
cprintf("%d %s %s", p->pid, state, p->name);
80104015: 8b 43 a4 mov -0x5c(%ebx),%eax
80104018: 89 5c 24 0c mov %ebx,0xc(%esp)
8010401c: 89 54 24 08 mov %edx,0x8(%esp)
80104020: c7 04 24 bc 76 10 80 movl $0x801076bc,(%esp)
80104027: 89 44 24 04 mov %eax,0x4(%esp)
8010402b: e8 20 c6 ff ff call 80100650 <cprintf>
if(p->state == SLEEPING){
80104030: 83 7b a0 02 cmpl $0x2,-0x60(%ebx)
80104034: 75 a2 jne 80103fd8 <procdump+0x18>
getcallerpcs((uint*)p->context->ebp+2, pc);
80104036: 8d 45 c0 lea -0x40(%ebp),%eax
80104039: 89 44 24 04 mov %eax,0x4(%esp)
8010403d: 8b 43 b0 mov -0x50(%ebx),%eax
80104040: 8d 7d c0 lea -0x40(%ebp),%edi
80104043: 8b 40 0c mov 0xc(%eax),%eax
80104046: 83 c0 08 add $0x8,%eax
80104049: 89 04 24 mov %eax,(%esp)
8010404c: e8 cf 02 00 00 call 80104320 <getcallerpcs>
80104051: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
for(i=0; i<10 && pc[i] != 0; i++)
80104058: 8b 17 mov (%edi),%edx
8010405a: 85 d2 test %edx,%edx
8010405c: 0f 84 76 ff ff ff je 80103fd8 <procdump+0x18>
cprintf(" %p", pc[i]);
80104062: 89 54 24 04 mov %edx,0x4(%esp)
80104066: 83 c7 04 add $0x4,%edi
80104069: c7 04 24 09 71 10 80 movl $0x80107109,(%esp)
80104070: e8 db c5 ff ff call 80100650 <cprintf>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
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++)
<<<<<<< HEAD
80104287: 83 c4 10 add $0x10,%esp
8010428a: 39 f7 cmp %esi,%edi
8010428c: 75 e2 jne 80104270 <procdump+0x90>
8010428e: e9 65 ff ff ff jmp 801041f8 <procdump+0x18>
80104293: 90 nop
80104294: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
=======
80104075: 39 f7 cmp %esi,%edi
80104077: 75 df jne 80104058 <procdump+0x98>
80104079: e9 5a ff ff ff jmp 80103fd8 <procdump+0x18>
8010407e: 66 90 xchg %ax,%ax
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
cprintf(" %p", pc[i]);
}
cprintf("\n");
}
}
<<<<<<< HEAD
80104298: 8d 65 f4 lea -0xc(%ebp),%esp
8010429b: 5b pop %ebx
8010429c: 5e pop %esi
8010429d: 5f pop %edi
8010429e: 5d pop %ebp
8010429f: c3 ret
801042a0 <cprocstate>:
=======
80104080: 83 c4 4c add $0x4c,%esp
80104083: 5b pop %ebx
80104084: 5e pop %esi
80104085: 5f pop %edi
80104086: 5d pop %ebp
80104087: c3 ret
80104088: 90 nop
80104089: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104090 <cprocstate>:
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// Prints current states of processes in ptable
void
cprocstate(void)
{
<<<<<<< HEAD
801042a0: 55 push %ebp
801042a1: 89 e5 mov %esp,%ebp
801042a3: 53 push %ebx
801042a4: 83 ec 10 sub $0x10,%esp
=======
80104090: 55 push %ebp
80104091: 89 e5 mov %esp,%ebp
80104093: 53 push %ebx
80104094: 83 ec 14 sub $0x14,%esp
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
}
static inline void
sti(void)
{
asm volatile("sti");
<<<<<<< HEAD
801042a7: fb sti
=======
80104097: fb sti
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
struct proc *p;
sti(); // enables interrupt
acquire(&ptable.lock);
<<<<<<< HEAD
801042a8: 68 a0 2d 11 80 push $0x80112da0
801042ad: bb 40 2e 11 80 mov $0x80112e40,%ebx
801042b2: e8 59 02 00 00 call 80104510 <acquire>
cprintf("Name \t PID \t State \t Job Length\n");
801042b7: c7 04 24 ac 79 10 80 movl $0x801079ac,(%esp)
801042be: e8 9d c3 ff ff call 80100660 <cprintf>
801042c3: 83 c4 10 add $0x10,%esp
801042c6: eb 1d jmp 801042e5 <cprocstate+0x45>
801042c8: 90 nop
801042c9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
=======
80104098: c7 04 24 a0 2d 11 80 movl $0x80112da0,(%esp)
8010409f: bb 40 2e 11 80 mov $0x80112e40,%ebx
801040a4: e8 d7 02 00 00 call 80104380 <acquire>
cprintf("Name \t PID \t State \t Job Length\n");
801040a9: c7 04 24 3c 77 10 80 movl $0x8010773c,(%esp)
801040b0: e8 9b c5 ff ff call 80100650 <cprintf>
801040b5: eb 16 jmp 801040cd <cprocstate+0x3d>
801040b7: 90 nop
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++) // loop for each process
{
if(p->state == RUNNABLE)
cprintf("%s \t %d \t RUNNABLE \t %d\n",p->name,p->pid,p->jlength);
else if(p->state == RUNNING)
<<<<<<< HEAD
801042d0: 83 f8 04 cmp $0x4,%eax
801042d3: 74 53 je 80104328 <cprocstate+0x88>
cprintf("%s \t %d \t RUNNING \t %d\n",p->name,p->pid,p->jlength);
else if(p->state == SLEEPING)
801042d5: 83 f8 02 cmp $0x2,%eax
801042d8: 74 66 je 80104340 <cprocstate+0xa0>
801042da: 83 eb 80 sub $0xffffff80,%ebx
=======
801040b8: 83 f8 04 cmp $0x4,%eax
801040bb: 74 63 je 80104120 <cprocstate+0x90>
cprintf("%s \t %d \t RUNNING \t %d\n",p->name,p->pid,p->jlength);
else if(p->state == SLEEPING)
801040bd: 83 f8 02 cmp $0x2,%eax
801040c0: 74 7e je 80104140 <cprocstate+0xb0>
801040c2: 83 eb 80 sub $0xffffff80,%ebx
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
struct proc *p;
sti(); // enables interrupt
acquire(&ptable.lock);
cprintf("Name \t PID \t State \t Job Length\n");
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++) // loop for each process
<<<<<<< HEAD
801042dd: 81 fb 40 4e 11 80 cmp $0x80114e40,%ebx
801042e3: 74 27 je 8010430c <cprocstate+0x6c>
{
if(p->state == RUNNABLE)
801042e5: 8b 43 a0 mov -0x60(%ebx),%eax
801042e8: 83 f8 03 cmp $0x3,%eax
801042eb: 75 e3 jne 801042d0 <cprocstate+0x30>
cprintf("%s \t %d \t RUNNABLE \t %d\n",p->name,p->pid,p->jlength);
801042ed: ff 73 10 pushl 0x10(%ebx)
801042f0: ff 73 a4 pushl -0x5c(%ebx)
801042f3: 53 push %ebx
801042f4: 68 35 79 10 80 push $0x80107935
801042f9: 83 eb 80 sub $0xffffff80,%ebx
801042fc: e8 5f c3 ff ff call 80100660 <cprintf>
80104301: 83 c4 10 add $0x10,%esp
=======
801040c5: 81 fb 40 4e 11 80 cmp $0x80114e40,%ebx
801040cb: 74 3b je 80104108 <cprocstate+0x78>
{
if(p->state == RUNNABLE)
801040cd: 8b 43 a0 mov -0x60(%ebx),%eax
801040d0: 83 f8 03 cmp $0x3,%eax
801040d3: 75 e3 jne 801040b8 <cprocstate+0x28>
cprintf("%s \t %d \t RUNNABLE \t %d\n",p->name,p->pid,p->jlength);
801040d5: 8b 43 10 mov 0x10(%ebx),%eax
801040d8: 89 5c 24 04 mov %ebx,0x4(%esp)
801040dc: 83 eb 80 sub $0xffffff80,%ebx
801040df: c7 04 24 c5 76 10 80 movl $0x801076c5,(%esp)
801040e6: 89 44 24 0c mov %eax,0xc(%esp)
801040ea: 8b 83 24 ff ff ff mov -0xdc(%ebx),%eax
801040f0: 89 44 24 08 mov %eax,0x8(%esp)
801040f4: e8 57 c5 ff ff call 80100650 <cprintf>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
struct proc *p;
sti(); // enables interrupt
acquire(&ptable.lock);
cprintf("Name \t PID \t State \t Job Length\n");
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++) // loop for each process
<<<<<<< HEAD
80104304: 81 fb 40 4e 11 80 cmp $0x80114e40,%ebx
8010430a: 75 d9 jne 801042e5 <cprocstate+0x45>
=======
801040f9: 81 fb 40 4e 11 80 cmp $0x80114e40,%ebx
801040ff: 75 cc jne 801040cd <cprocstate+0x3d>
80104101: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
else if(p->state == RUNNING)
cprintf("%s \t %d \t RUNNING \t %d\n",p->name,p->pid,p->jlength);
else if(p->state == SLEEPING)
cprintf("%s \t %d \t SLEEPING \t %d\n",p->name,p->pid,p->jlength);
}
release(&ptable.lock);
<<<<<<< HEAD
8010430c: 83 ec 0c sub $0xc,%esp
8010430f: 68 a0 2d 11 80 push $0x80112da0
80104314: e8 d7 03 00 00 call 801046f0 <release>
}
80104319: 83 c4 10 add $0x10,%esp
8010431c: 8b 5d fc mov -0x4(%ebp),%ebx
8010431f: c9 leave
80104320: c3 ret
80104321: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
=======
80104108: c7 04 24 a0 2d 11 80 movl $0x80112da0,(%esp)
8010410f: e8 9c 03 00 00 call 801044b0 <release>
}
80104114: 83 c4 14 add $0x14,%esp
80104117: 5b pop %ebx
80104118: 5d pop %ebp
80104119: c3 ret
8010411a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++) // loop for each process
{
if(p->state == RUNNABLE)
cprintf("%s \t %d \t RUNNABLE \t %d\n",p->name,p->pid,p->jlength);
else if(p->state == RUNNING)
cprintf("%s \t %d \t RUNNING \t %d\n",p->name,p->pid,p->jlength);
<<<<<<< HEAD
80104328: ff 73 10 pushl 0x10(%ebx)
8010432b: ff 73 a4 pushl -0x5c(%ebx)
8010432e: 53 push %ebx
8010432f: 68 4e 79 10 80 push $0x8010794e
80104334: e8 27 c3 ff ff call 80100660 <cprintf>
80104339: 83 c4 10 add $0x10,%esp
8010433c: eb 9c jmp 801042da <cprocstate+0x3a>
8010433e: 66 90 xchg %ax,%ax
else if(p->state == SLEEPING)
cprintf("%s \t %d \t SLEEPING \t %d\n",p->name,p->pid,p->jlength);
80104340: ff 73 10 pushl 0x10(%ebx)
80104343: ff 73 a4 pushl -0x5c(%ebx)
80104346: 53 push %ebx
80104347: 68 66 79 10 80 push $0x80107966
8010434c: e8 0f c3 ff ff call 80100660 <cprintf>
80104351: 83 c4 10 add $0x10,%esp
80104354: eb 84 jmp 801042da <cprocstate+0x3a>
80104356: 8d 76 00 lea 0x0(%esi),%esi
80104359: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104360 <signalinfo>:
=======
80104120: 8b 43 10 mov 0x10(%ebx),%eax
80104123: 89 5c 24 04 mov %ebx,0x4(%esp)
80104127: c7 04 24 de 76 10 80 movl $0x801076de,(%esp)
8010412e: 89 44 24 0c mov %eax,0xc(%esp)
80104132: 8b 43 a4 mov -0x5c(%ebx),%eax
80104135: 89 44 24 08 mov %eax,0x8(%esp)
80104139: e8 12 c5 ff ff call 80100650 <cprintf>
8010413e: eb 82 jmp 801040c2 <cprocstate+0x32>
else if(p->state == SLEEPING)
cprintf("%s \t %d \t SLEEPING \t %d\n",p->name,p->pid,p->jlength);
80104140: 8b 43 10 mov 0x10(%ebx),%eax
80104143: 89 5c 24 04 mov %ebx,0x4(%esp)
80104147: c7 04 24 f6 76 10 80 movl $0x801076f6,(%esp)
8010414e: 89 44 24 0c mov %eax,0xc(%esp)
80104152: 8b 43 a4 mov -0x5c(%ebx),%eax
80104155: 89 44 24 08 mov %eax,0x8(%esp)
80104159: e8 f2 c4 ff ff call 80100650 <cprintf>
8010415e: e9 5f ff ff ff jmp 801040c2 <cprocstate+0x32>
80104163: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80104169: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104170 <signalinfo>:
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
}
//syscall to change jlength of a process
int
signalinfo(int pd, int l)
{
<<<<<<< HEAD
80104360: 55 push %ebp
80104361: 89 e5 mov %esp,%ebp
80104363: 53 push %ebx
80104364: 83 ec 10 sub $0x10,%esp
80104367: 8b 5d 08 mov 0x8(%ebp),%ebx
struct proc *p;
acquire(&ptable.lock);
8010436a: 68 a0 2d 11 80 push $0x80112da0
8010436f: e8 9c 01 00 00 call 80104510 <acquire>
80104374: 83 c4 10 add $0x10,%esp
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80104377: b8 d4 2d 11 80 mov $0x80112dd4,%eax
8010437c: eb 0c jmp 8010438a <signalinfo+0x2a>
8010437e: 66 90 xchg %ax,%ax
80104380: 83 e8 80 sub $0xffffff80,%eax
80104383: 3d d4 4d 11 80 cmp $0x80114dd4,%eax
80104388: 74 26 je 801043b0 <signalinfo+0x50>
if(p->pid == pd){
8010438a: 39 58 10 cmp %ebx,0x10(%eax)
8010438d: 75 f1 jne 80104380 <signalinfo+0x20>
p->jlength = l;
8010438f: 8b 55 0c mov 0xc(%ebp),%edx
release(&ptable.lock);
80104392: 83 ec 0c sub $0xc,%esp
struct proc *p;
=======
80104170: 55 push %ebp
80104171: 89 e5 mov %esp,%ebp
80104173: 53 push %ebx
80104174: 83 ec 14 sub $0x14,%esp
80104177: 8b 5d 08 mov 0x8(%ebp),%ebx
struct proc *p;
acquire(&ptable.lock);
8010417a: c7 04 24 a0 2d 11 80 movl $0x80112da0,(%esp)
80104181: e8 fa 01 00 00 call 80104380 <acquire>
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80104186: b8 d4 2d 11 80 mov $0x80112dd4,%eax
8010418b: eb 0d jmp 8010419a <signalinfo+0x2a>
8010418d: 8d 76 00 lea 0x0(%esi),%esi
80104190: 83 e8 80 sub $0xffffff80,%eax
80104193: 3d d4 4d 11 80 cmp $0x80114dd4,%eax
80104198: 74 26 je 801041c0 <signalinfo+0x50>
if(p->pid == pd){
8010419a: 39 58 10 cmp %ebx,0x10(%eax)
8010419d: 75 f1 jne 80104190 <signalinfo+0x20>
p->jlength = l;
8010419f: 8b 55 0c mov 0xc(%ebp),%edx
801041a2: 89 50 7c mov %edx,0x7c(%eax)
release(&ptable.lock);
801041a5: c7 04 24 a0 2d 11 80 movl $0x80112da0,(%esp)
801041ac: e8 ff 02 00 00 call 801044b0 <release>
return 0;
}
}
release(&ptable.lock);
return -1;
}
801041b1: 83 c4 14 add $0x14,%esp
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
acquire(&ptable.lock);
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
if(p->pid == pd){
p->jlength = l;
<<<<<<< HEAD
80104395: 89 50 7c mov %edx,0x7c(%eax)
release(&ptable.lock);
80104398: 68 a0 2d 11 80 push $0x80112da0
8010439d: e8 4e 03 00 00 call 801046f0 <release>
return 0;
801043a2: 83 c4 10 add $0x10,%esp
801043a5: 31 c0 xor %eax,%eax
=======
release(&ptable.lock);
return 0;
801041b4: 31 c0 xor %eax,%eax
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
}
}
release(&ptable.lock);
return -1;
}
<<<<<<< HEAD
801043a7: 8b 5d fc mov -0x4(%ebp),%ebx
801043aa: c9 leave
801043ab: c3 ret
801043ac: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
=======
801041b6: 5b pop %ebx
801041b7: 5d pop %ebp
801041b8: c3 ret
801041b9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
p->jlength = l;
release(&ptable.lock);
return 0;
}
}
release(&ptable.lock);
<<<<<<< HEAD
801043b0: 83 ec 0c sub $0xc,%esp
801043b3: 68 a0 2d 11 80 push $0x80112da0
801043b8: e8 33 03 00 00 call 801046f0 <release>
return -1;
801043bd: 83 c4 10 add $0x10,%esp
801043c0: b8 ff ff ff ff mov $0xffffffff,%eax
}
801043c5: 8b 5d fc mov -0x4(%ebp),%ebx
801043c8: c9 leave
801043c9: c3 ret
801043ca: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801043d0 <setseed>:
=======
801041c0: c7 04 24 a0 2d 11 80 movl $0x80112da0,(%esp)
801041c7: e8 e4 02 00 00 call 801044b0 <release>
return -1;
}
801041cc: 83 c4 14 add $0x14,%esp
release(&ptable.lock);
return 0;
}
}
release(&ptable.lock);
return -1;
801041cf: b8 ff ff ff ff mov $0xffffffff,%eax
}
801041d4: 5b pop %ebx
801041d5: 5d pop %ebp
801041d6: c3 ret
801041d7: 89 f6 mov %esi,%esi
801041d9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801041e0 <setseed>:
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
//syscall to set seed value
int
setseed(int n)
{
<<<<<<< HEAD
801043d0: 55 push %ebp
801043d1: 89 e5 mov %esp,%ebp
seed=n;
801043d3: 8b 45 08 mov 0x8(%ebp),%eax
return 0;
}
801043d6: 5d pop %ebp
=======
801041e0: 55 push %ebp
801041e1: 89 e5 mov %esp,%ebp
seed=n;
801041e3: 8b 45 08 mov 0x8(%ebp),%eax
return 0;
}
801041e6: 5d pop %ebp
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
}
//syscall to set seed value
int
setseed(int n)
{
seed=n;
<<<<<<< HEAD
801043d7: a3 0c a0 10 80 mov %eax,0x8010a00c
return 0;
}
801043dc: 31 c0 xor %eax,%eax
801043de: c3 ret
801043df: 90 nop
801043e0 <initsleeplock>:
=======
801041e7: a3 0c a0 10 80 mov %eax,0x8010a00c
return 0;
}
801041ec: 31 c0 xor %eax,%eax
801041ee: c3 ret
801041ef: 90 nop
801041f0 <initsleeplock>:
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
#include "spinlock.h"
#include "sleeplock.h"
void
initsleeplock(struct sleeplock *lk, char *name)
{
<<<<<<< HEAD
801043e0: 55 push %ebp
801043e1: 89 e5 mov %esp,%ebp
801043e3: 53 push %ebx
801043e4: 83 ec 0c sub $0xc,%esp
801043e7: 8b 5d 08 mov 0x8(%ebp),%ebx
initlock(&lk->lk, "sleep lock");
801043ea: 68 e8 79 10 80 push $0x801079e8
801043ef: 8d 43 04 lea 0x4(%ebx),%eax
801043f2: 50 push %eax
801043f3: e8 f8 00 00 00 call 801044f0 <initlock>
lk->name = name;
801043f8: 8b 45 0c mov 0xc(%ebp),%eax
lk->locked = 0;
801043fb: c7 03 00 00 00 00 movl $0x0,(%ebx)
lk->pid = 0;
}
80104401: 83 c4 10 add $0x10,%esp
initsleeplock(struct sleeplock *lk, char *name)
{
initlock(&lk->lk, "sleep lock");
lk->name = name;
lk->locked = 0;
lk->pid = 0;
80104404: c7 43 3c 00 00 00 00 movl $0x0,0x3c(%ebx)
=======
801041f0: 55 push %ebp
801041f1: 89 e5 mov %esp,%ebp
801041f3: 53 push %ebx
801041f4: 83 ec 14 sub $0x14,%esp
801041f7: 8b 5d 08 mov 0x8(%ebp),%ebx
initlock(&lk->lk, "sleep lock");
801041fa: c7 44 24 04 78 77 10 movl $0x80107778,0x4(%esp)
80104201: 80
80104202: 8d 43 04 lea 0x4(%ebx),%eax
80104205: 89 04 24 mov %eax,(%esp)
80104208: e8 f3 00 00 00 call 80104300 <initlock>
lk->name = name;
8010420d: 8b 45 0c mov 0xc(%ebp),%eax
lk->locked = 0;
80104210: c7 03 00 00 00 00 movl $0x0,(%ebx)
lk->pid = 0;
80104216: c7 43 3c 00 00 00 00 movl $0x0,0x3c(%ebx)
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
void
initsleeplock(struct sleeplock *lk, char *name)
{
initlock(&lk->lk, "sleep lock");
lk->name = name;
<<<<<<< HEAD
8010440b: 89 43 38 mov %eax,0x38(%ebx)
lk->locked = 0;
lk->pid = 0;
}
8010440e: 8b 5d fc mov -0x4(%ebp),%ebx
80104411: c9 leave
80104412: c3 ret
80104413: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80104419: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104420 <acquiresleep>:
=======
8010421d: 89 43 38 mov %eax,0x38(%ebx)
lk->locked = 0;
lk->pid = 0;
}
80104220: 83 c4 14 add $0x14,%esp
80104223: 5b pop %ebx
80104224: 5d pop %ebp
80104225: c3 ret
80104226: 8d 76 00 lea 0x0(%esi),%esi
80104229: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104230 <acquiresleep>:
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
void
acquiresleep(struct sleeplock *lk)
{
<<<<<<< HEAD
80104420: 55 push %ebp
80104421: 89 e5 mov %esp,%ebp
80104423: 56 push %esi
80104424: 53 push %ebx
80104425: 8b 5d 08 mov 0x8(%ebp),%ebx
acquire(&lk->lk);
80104428: 83 ec 0c sub $0xc,%esp
8010442b: 8d 73 04 lea 0x4(%ebx),%esi
8010442e: 56 push %esi
8010442f: e8 dc 00 00 00 call 80104510 <acquire>
while (lk->locked) {
80104434: 8b 13 mov (%ebx),%edx
80104436: 83 c4 10 add $0x10,%esp
80104439: 85 d2 test %edx,%edx
8010443b: 74 16 je 80104453 <acquiresleep+0x33>
8010443d: 8d 76 00 lea 0x0(%esi),%esi
sleep(lk, &lk->lk);
80104440: 83 ec 08 sub $0x8,%esp
80104443: 56 push %esi
80104444: 53 push %ebx
80104445: e8 06 fb ff ff call 80103f50 <sleep>
=======
80104230: 55 push %ebp
80104231: 89 e5 mov %esp,%ebp
80104233: 56 push %esi
80104234: 53 push %ebx
80104235: 83 ec 10 sub $0x10,%esp
80104238: 8b 5d 08 mov 0x8(%ebp),%ebx
acquire(&lk->lk);
8010423b: 8d 73 04 lea 0x4(%ebx),%esi
8010423e: 89 34 24 mov %esi,(%esp)
80104241: e8 3a 01 00 00 call 80104380 <acquire>
while (lk->locked) {
80104246: 8b 13 mov (%ebx),%edx
80104248: 85 d2 test %edx,%edx
8010424a: 74 16 je 80104262 <acquiresleep+0x32>
8010424c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
sleep(lk, &lk->lk);
80104250: 89 74 24 04 mov %esi,0x4(%esp)
80104254: 89 1c 24 mov %ebx,(%esp)
80104257: e8 e4 fa ff ff call 80103d40 <sleep>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
void
acquiresleep(struct sleeplock *lk)
{
acquire(&lk->lk);
while (lk->locked) {
<<<<<<< HEAD
8010444a: 8b 03 mov (%ebx),%eax
8010444c: 83 c4 10 add $0x10,%esp
8010444f: 85 c0 test %eax,%eax
80104451: 75 ed jne 80104440 <acquiresleep+0x20>
sleep(lk, &lk->lk);
}
lk->locked = 1;
80104453: c7 03 01 00 00 00 movl $0x1,(%ebx)
lk->pid = proc->pid;
80104459: 65 a1 04 00 00 00 mov %gs:0x4,%eax
8010445f: 8b 40 10 mov 0x10(%eax),%eax
80104462: 89 43 3c mov %eax,0x3c(%ebx)
release(&lk->lk);
80104465: 89 75 08 mov %esi,0x8(%ebp)
}
80104468: 8d 65 f8 lea -0x8(%ebp),%esp
8010446b: 5b pop %ebx
8010446c: 5e pop %esi
8010446d: 5d pop %ebp
=======
8010425c: 8b 03 mov (%ebx),%eax
8010425e: 85 c0 test %eax,%eax
80104260: 75 ee jne 80104250 <acquiresleep+0x20>
sleep(lk, &lk->lk);
}
lk->locked = 1;
80104262: c7 03 01 00 00 00 movl $0x1,(%ebx)
lk->pid = proc->pid;
80104268: 65 a1 04 00 00 00 mov %gs:0x4,%eax
8010426e: 8b 40 10 mov 0x10(%eax),%eax
80104271: 89 43 3c mov %eax,0x3c(%ebx)
release(&lk->lk);
80104274: 89 75 08 mov %esi,0x8(%ebp)
}
80104277: 83 c4 10 add $0x10,%esp
8010427a: 5b pop %ebx
8010427b: 5e pop %esi
8010427c: 5d pop %ebp
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
while (lk->locked) {
sleep(lk, &lk->lk);
}
lk->locked = 1;
lk->pid = proc->pid;
release(&lk->lk);
<<<<<<< HEAD
8010446e: e9 7d 02 00 00 jmp 801046f0 <release>
80104473: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80104479: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104480 <releasesleep>:
=======
8010427d: e9 2e 02 00 00 jmp 801044b0 <release>
80104282: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104289: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104290 <releasesleep>:
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
}
void
releasesleep(struct sleeplock *lk)
{
<<<<<<< HEAD
80104480: 55 push %ebp
80104481: 89 e5 mov %esp,%ebp
80104483: 56 push %esi
80104484: 53 push %ebx
80104485: 8b 5d 08 mov 0x8(%ebp),%ebx
acquire(&lk->lk);
80104488: 83 ec 0c sub $0xc,%esp
8010448b: 8d 73 04 lea 0x4(%ebx),%esi
8010448e: 56 push %esi
8010448f: e8 7c 00 00 00 call 80104510 <acquire>
lk->locked = 0;
80104494: c7 03 00 00 00 00 movl $0x0,(%ebx)
lk->pid = 0;
8010449a: c7 43 3c 00 00 00 00 movl $0x0,0x3c(%ebx)
wakeup(lk);
801044a1: 89 1c 24 mov %ebx,(%esp)
801044a4: e8 47 fc ff ff call 801040f0 <wakeup>
release(&lk->lk);
801044a9: 89 75 08 mov %esi,0x8(%ebp)
801044ac: 83 c4 10 add $0x10,%esp
}
801044af: 8d 65 f8 lea -0x8(%ebp),%esp
801044b2: 5b pop %ebx
801044b3: 5e pop %esi
801044b4: 5d pop %ebp
=======
80104290: 55 push %ebp
80104291: 89 e5 mov %esp,%ebp
80104293: 56 push %esi
80104294: 53 push %ebx
80104295: 83 ec 10 sub $0x10,%esp
80104298: 8b 5d 08 mov 0x8(%ebp),%ebx
acquire(&lk->lk);
8010429b: 8d 73 04 lea 0x4(%ebx),%esi
8010429e: 89 34 24 mov %esi,(%esp)
801042a1: e8 da 00 00 00 call 80104380 <acquire>
lk->locked = 0;
801042a6: c7 03 00 00 00 00 movl $0x0,(%ebx)
lk->pid = 0;
801042ac: c7 43 3c 00 00 00 00 movl $0x0,0x3c(%ebx)
wakeup(lk);
801042b3: 89 1c 24 mov %ebx,(%esp)
801042b6: e8 25 fc ff ff call 80103ee0 <wakeup>
release(&lk->lk);
801042bb: 89 75 08 mov %esi,0x8(%ebp)
}
801042be: 83 c4 10 add $0x10,%esp
801042c1: 5b pop %ebx
801042c2: 5e pop %esi
801042c3: 5d pop %ebp
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
{
acquire(&lk->lk);
lk->locked = 0;
lk->pid = 0;
wakeup(lk);
release(&lk->lk);
<<<<<<< HEAD
801044b5: e9 36 02 00 00 jmp 801046f0 <release>
801044ba: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801044c0 <holdingsleep>:
=======
801042c4: e9 e7 01 00 00 jmp 801044b0 <release>
801042c9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801042d0 <holdingsleep>:
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
}
int
holdingsleep(struct sleeplock *lk)
{
<<<<<<< HEAD
801044c0: 55 push %ebp
801044c1: 89 e5 mov %esp,%ebp
801044c3: 56 push %esi
801044c4: 53 push %ebx
801044c5: 8b 75 08 mov 0x8(%ebp),%esi
int r;
acquire(&lk->lk);
801044c8: 83 ec 0c sub $0xc,%esp
801044cb: 8d 5e 04 lea 0x4(%esi),%ebx
801044ce: 53 push %ebx
801044cf: e8 3c 00 00 00 call 80104510 <acquire>
r = lk->locked;
801044d4: 8b 36 mov (%esi),%esi
release(&lk->lk);
801044d6: 89 1c 24 mov %ebx,(%esp)
801044d9: e8 12 02 00 00 call 801046f0 <release>
return r;
}
801044de: 8d 65 f8 lea -0x8(%ebp),%esp
801044e1: 89 f0 mov %esi,%eax
801044e3: 5b pop %ebx
801044e4: 5e pop %esi
801044e5: 5d pop %ebp
801044e6: c3 ret
801044e7: 66 90 xchg %ax,%ax
801044e9: 66 90 xchg %ax,%ax
801044eb: 66 90 xchg %ax,%ax
801044ed: 66 90 xchg %ax,%ax
801044ef: 90 nop
801044f0 <initlock>:
=======
801042d0: 55 push %ebp
801042d1: 89 e5 mov %esp,%ebp
801042d3: 56 push %esi
801042d4: 53 push %ebx
801042d5: 83 ec 10 sub $0x10,%esp
801042d8: 8b 5d 08 mov 0x8(%ebp),%ebx
int r;
acquire(&lk->lk);
801042db: 8d 73 04 lea 0x4(%ebx),%esi
801042de: 89 34 24 mov %esi,(%esp)
801042e1: e8 9a 00 00 00 call 80104380 <acquire>
r = lk->locked;
801042e6: 8b 1b mov (%ebx),%ebx
release(&lk->lk);
801042e8: 89 34 24 mov %esi,(%esp)
801042eb: e8 c0 01 00 00 call 801044b0 <release>
return r;
}
801042f0: 83 c4 10 add $0x10,%esp
801042f3: 89 d8 mov %ebx,%eax
801042f5: 5b pop %ebx
801042f6: 5e pop %esi
801042f7: 5d pop %ebp
801042f8: c3 ret
801042f9: 66 90 xchg %ax,%ax
801042fb: 66 90 xchg %ax,%ax
801042fd: 66 90 xchg %ax,%ax
801042ff: 90 nop
80104300 <initlock>:
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
#include "proc.h"
#include "spinlock.h"
void
initlock(struct spinlock *lk, char *name)
{
<<<<<<< HEAD
801044f0: 55 push %ebp
801044f1: 89 e5 mov %esp,%ebp
801044f3: 8b 45 08 mov 0x8(%ebp),%eax
lk->name = name;
801044f6: 8b 55 0c mov 0xc(%ebp),%edx
lk->locked = 0;
801044f9: c7 00 00 00 00 00 movl $0x0,(%eax)
=======
80104300: 55 push %ebp
80104301: 89 e5 mov %esp,%ebp
80104303: 8b 45 08 mov 0x8(%ebp),%eax
lk->name = name;
80104306: 8b 55 0c mov 0xc(%ebp),%edx
lk->locked = 0;
80104309: c7 00 00 00 00 00 movl $0x0,(%eax)
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
#include "spinlock.h"
void
initlock(struct spinlock *lk, char *name)
{
lk->name = name;
<<<<<<< HEAD
801044ff: 89 50 04 mov %edx,0x4(%eax)
lk->locked = 0;
lk->cpu = 0;
80104502: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
}
80104509: 5d pop %ebp
8010450a: c3 ret
8010450b: 90 nop
8010450c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104510 <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)
{
80104510: 55 push %ebp
80104511: 89 e5 mov %esp,%ebp
80104513: 53 push %ebx
80104514: 83 ec 04 sub $0x4,%esp
static inline uint
readeflags(void)
{
uint eflags;
asm volatile("pushfl; popl %0" : "=r" (eflags));
80104517: 9c pushf
80104518: 5a pop %edx
}
static inline void
cli(void)
{
asm volatile("cli");
80104519: fa cli
{
int eflags;
eflags = readeflags();
cli();
if(cpu->ncli == 0)
8010451a: 65 8b 0d 00 00 00 00 mov %gs:0x0,%ecx
80104521: 8b 81 ac 00 00 00 mov 0xac(%ecx),%eax
80104527: 85 c0 test %eax,%eax
80104529: 75 0c jne 80104537 <acquire+0x27>
cpu->intena = eflags & FL_IF;
8010452b: 81 e2 00 02 00 00 and $0x200,%edx
80104531: 89 91 b0 00 00 00 mov %edx,0xb0(%ecx)
// other CPUs to waste time spinning to acquire it.
void
acquire(struct spinlock *lk)
{
pushcli(); // disable interrupts to avoid deadlock.
if(holding(lk))
80104537: 8b 55 08 mov 0x8(%ebp),%edx
eflags = readeflags();
cli();
if(cpu->ncli == 0)
cpu->intena = eflags & FL_IF;
cpu->ncli += 1;
8010453a: 83 c0 01 add $0x1,%eax
8010453d: 89 81 ac 00 00 00 mov %eax,0xac(%ecx)
// Check whether this cpu is holding the lock.
int
holding(struct spinlock *lock)
{
return lock->locked && lock->cpu == cpu;
80104543: 8b 02 mov (%edx),%eax
80104545: 85 c0 test %eax,%eax
80104547: 74 05 je 8010454e <acquire+0x3e>
80104549: 39 4a 08 cmp %ecx,0x8(%edx)
8010454c: 74 7a je 801045c8 <acquire+0xb8>
xchg(volatile uint *addr, uint newval)
{
uint result;
// The + in "+m" denotes a read-modify-write operand.
asm volatile("lock; xchgl %0, %1" :
8010454e: b9 01 00 00 00 mov $0x1,%ecx
80104553: 90 nop
80104554: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104558: 89 c8 mov %ecx,%eax
8010455a: f0 87 02 lock xchg %eax,(%edx)
pushcli(); // disable interrupts to avoid deadlock.
if(holding(lk))
panic("acquire");
// The xchg is atomic.
while(xchg(&lk->locked, 1) != 0)
8010455d: 85 c0 test %eax,%eax
8010455f: 75 f7 jne 80104558 <acquire+0x48>
;
// Tell the C compiler and the processor to not move loads or stores
// past this point, to ensure that the critical section's memory
// references happen after the lock is acquired.
__sync_synchronize();
80104561: f0 83 0c 24 00 lock orl $0x0,(%esp)
// Record info about lock acquisition for debugging.
lk->cpu = cpu;
80104566: 8b 4d 08 mov 0x8(%ebp),%ecx
80104569: 65 a1 00 00 00 00 mov %gs:0x0,%eax
getcallerpcs(void *v, uint pcs[])
{
uint *ebp;
int i;
ebp = (uint*)v - 2;
8010456f: 89 ea mov %ebp,%edx
// past this point, to ensure that the critical section's memory
// references happen after the lock is acquired.
__sync_synchronize();
// Record info about lock acquisition for debugging.
lk->cpu = cpu;
80104571: 89 41 08 mov %eax,0x8(%ecx)
getcallerpcs(&lk, lk->pcs);
80104574: 83 c1 0c add $0xc,%ecx
{
uint *ebp;
int i;
ebp = (uint*)v - 2;
for(i = 0; i < 10; i++){
80104577: 31 c0 xor %eax,%eax
80104579: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
if(ebp == 0 || ebp < (uint*)KERNBASE || ebp == (uint*)0xffffffff)
80104580: 8d 9a 00 00 00 80 lea -0x80000000(%edx),%ebx
80104586: 81 fb fe ff ff 7f cmp $0x7ffffffe,%ebx
8010458c: 77 1a ja 801045a8 <acquire+0x98>
break;
pcs[i] = ebp[1]; // saved %eip
8010458e: 8b 5a 04 mov 0x4(%edx),%ebx
80104591: 89 1c 81 mov %ebx,(%ecx,%eax,4)
{
uint *ebp;
int i;
ebp = (uint*)v - 2;
for(i = 0; i < 10; i++){
80104594: 83 c0 01 add $0x1,%eax
if(ebp == 0 || ebp < (uint*)KERNBASE || ebp == (uint*)0xffffffff)
break;
pcs[i] = ebp[1]; // saved %eip
ebp = (uint*)ebp[0]; // saved %ebp
80104597: 8b 12 mov (%edx),%edx
{
uint *ebp;
int i;
ebp = (uint*)v - 2;
for(i = 0; i < 10; i++){
80104599: 83 f8 0a cmp $0xa,%eax
8010459c: 75 e2 jne 80104580 <acquire+0x70>
__sync_synchronize();
// Record info about lock acquisition for debugging.
lk->cpu = cpu;
getcallerpcs(&lk, lk->pcs);
}
8010459e: 8b 5d fc mov -0x4(%ebp),%ebx
801045a1: c9 leave
801045a2: c3 ret
801045a3: 90 nop
801045a4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
break;
pcs[i] = ebp[1]; // saved %eip
ebp = (uint*)ebp[0]; // saved %ebp
}
for(; i < 10; i++)
pcs[i] = 0;
801045a8: c7 04 81 00 00 00 00 movl $0x0,(%ecx,%eax,4)
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++)
801045af: 83 c0 01 add $0x1,%eax
801045b2: 83 f8 0a cmp $0xa,%eax
801045b5: 74 e7 je 8010459e <acquire+0x8e>
pcs[i] = 0;
801045b7: c7 04 81 00 00 00 00 movl $0x0,(%ecx,%eax,4)
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++)
801045be: 83 c0 01 add $0x1,%eax
801045c1: 83 f8 0a cmp $0xa,%eax
801045c4: 75 e2 jne 801045a8 <acquire+0x98>
801045c6: eb d6 jmp 8010459e <acquire+0x8e>
void
acquire(struct spinlock *lk)
{
pushcli(); // disable interrupts to avoid deadlock.
if(holding(lk))
panic("acquire");
801045c8: 83 ec 0c sub $0xc,%esp
801045cb: 68 f3 79 10 80 push $0x801079f3
801045d0: e8 9b bd ff ff call 80100370 <panic>
801045d5: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801045d9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801045e0 <getcallerpcs>:
=======
8010430f: 89 50 04 mov %edx,0x4(%eax)
lk->locked = 0;
lk->cpu = 0;
80104312: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
}
80104319: 5d pop %ebp
8010431a: c3 ret
8010431b: 90 nop
8010431c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104320 <getcallerpcs>:
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
}
// Record the current call stack in pcs[] by following the %ebp chain.
void
getcallerpcs(void *v, uint pcs[])
{
<<<<<<< HEAD
801045e0: 55 push %ebp
801045e1: 89 e5 mov %esp,%ebp
801045e3: 53 push %ebx
=======
80104320: 55 push %ebp
80104321: 89 e5 mov %esp,%ebp
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
uint *ebp;
int i;
ebp = (uint*)v - 2;
<<<<<<< HEAD
801045e4: 8b 45 08 mov 0x8(%ebp),%eax
=======
80104323: 8b 45 08 mov 0x8(%ebp),%eax
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
}
// Record the current call stack in pcs[] by following the %ebp chain.
void
getcallerpcs(void *v, uint pcs[])
{
<<<<<<< HEAD
801045e7: 8b 4d 0c mov 0xc(%ebp),%ecx
=======
80104326: 8b 4d 0c mov 0xc(%ebp),%ecx
80104329: 53 push %ebx
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
uint *ebp;
int i;
ebp = (uint*)v - 2;
<<<<<<< HEAD
801045ea: 8d 50 f8 lea -0x8(%eax),%edx
for(i = 0; i < 10; i++){
801045ed: 31 c0 xor %eax,%eax
801045ef: 90 nop
if(ebp == 0 || ebp < (uint*)KERNBASE || ebp == (uint*)0xffffffff)
801045f0: 8d 9a 00 00 00 80 lea -0x80000000(%edx),%ebx
801045f6: 81 fb fe ff ff 7f cmp $0x7ffffffe,%ebx
801045fc: 77 1a ja 80104618 <getcallerpcs+0x38>
break;
pcs[i] = ebp[1]; // saved %eip
801045fe: 8b 5a 04 mov 0x4(%edx),%ebx
80104601: 89 1c 81 mov %ebx,(%ecx,%eax,4)
=======
8010432a: 8d 50 f8 lea -0x8(%eax),%edx
for(i = 0; i < 10; i++){
8010432d: 31 c0 xor %eax,%eax
8010432f: 90 nop
if(ebp == 0 || ebp < (uint*)KERNBASE || ebp == (uint*)0xffffffff)
80104330: 8d 9a 00 00 00 80 lea -0x80000000(%edx),%ebx
80104336: 81 fb fe ff ff 7f cmp $0x7ffffffe,%ebx
8010433c: 77 1a ja 80104358 <getcallerpcs+0x38>
break;
pcs[i] = ebp[1]; // saved %eip
8010433e: 8b 5a 04 mov 0x4(%edx),%ebx
80104341: 89 1c 81 mov %ebx,(%ecx,%eax,4)
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
{
uint *ebp;
int i;
ebp = (uint*)v - 2;
for(i = 0; i < 10; i++){
<<<<<<< HEAD
80104604: 83 c0 01 add $0x1,%eax
=======
80104344: 83 c0 01 add $0x1,%eax
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
if(ebp == 0 || ebp < (uint*)KERNBASE || ebp == (uint*)0xffffffff)
break;
pcs[i] = ebp[1]; // saved %eip
ebp = (uint*)ebp[0]; // saved %ebp
<<<<<<< HEAD
80104607: 8b 12 mov (%edx),%edx
=======
80104347: 8b 12 mov (%edx),%edx
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
{
uint *ebp;
int i;
ebp = (uint*)v - 2;
for(i = 0; i < 10; i++){
<<<<<<< HEAD
80104609: 83 f8 0a cmp $0xa,%eax
8010460c: 75 e2 jne 801045f0 <getcallerpcs+0x10>
=======
80104349: 83 f8 0a cmp $0xa,%eax
8010434c: 75 e2 jne 80104330 <getcallerpcs+0x10>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
pcs[i] = ebp[1]; // saved %eip
ebp = (uint*)ebp[0]; // saved %ebp
}
for(; i < 10; i++)
pcs[i] = 0;
}
<<<<<<< HEAD
8010460e: 5b pop %ebx
8010460f: 5d pop %ebp
80104610: c3 ret
80104611: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
=======
8010434e: 5b pop %ebx
8010434f: 5d pop %ebp
80104350: c3 ret
80104351: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
break;
pcs[i] = ebp[1]; // saved %eip
ebp = (uint*)ebp[0]; // saved %ebp
}
for(; i < 10; i++)
pcs[i] = 0;
<<<<<<< HEAD
80104618: c7 04 81 00 00 00 00 movl $0x0,(%ecx,%eax,4)
=======
80104358: c7 04 81 00 00 00 00 movl $0x0,(%ecx,%eax,4)
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
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++)
<<<<<<< HEAD
8010461f: 83 c0 01 add $0x1,%eax
80104622: 83 f8 0a cmp $0xa,%eax
80104625: 74 e7 je 8010460e <getcallerpcs+0x2e>
pcs[i] = 0;
80104627: c7 04 81 00 00 00 00 movl $0x0,(%ecx,%eax,4)
=======
8010435f: 83 c0 01 add $0x1,%eax
80104362: 83 f8 0a cmp $0xa,%eax
80104365: 74 e7 je 8010434e <getcallerpcs+0x2e>
pcs[i] = 0;
80104367: c7 04 81 00 00 00 00 movl $0x0,(%ecx,%eax,4)
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
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++)
<<<<<<< HEAD
8010462e: 83 c0 01 add $0x1,%eax
80104631: 83 f8 0a cmp $0xa,%eax
80104634: 75 e2 jne 80104618 <getcallerpcs+0x38>
80104636: eb d6 jmp 8010460e <getcallerpcs+0x2e>
80104638: 90 nop
80104639: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104640 <holding>:
}
// Check whether this cpu is holding the lock.
int
holding(struct spinlock *lock)
{
80104640: 55 push %ebp
80104641: 89 e5 mov %esp,%ebp
80104643: 8b 55 08 mov 0x8(%ebp),%edx
return lock->locked && lock->cpu == cpu;
80104646: 8b 02 mov (%edx),%eax
80104648: 85 c0 test %eax,%eax
8010464a: 74 14 je 80104660 <holding+0x20>
8010464c: 65 a1 00 00 00 00 mov %gs:0x0,%eax
80104652: 39 42 08 cmp %eax,0x8(%edx)
}
80104655: 5d pop %ebp
// Check whether this cpu is holding the lock.
int
holding(struct spinlock *lock)
{
return lock->locked && lock->cpu == cpu;
80104656: 0f 94 c0 sete %al
80104659: 0f b6 c0 movzbl %al,%eax
}
8010465c: c3 ret
8010465d: 8d 76 00 lea 0x0(%esi),%esi
80104660: 31 c0 xor %eax,%eax
80104662: 5d pop %ebp
80104663: c3 ret
80104664: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
8010466a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
80104670 <pushcli>:
// it takes two popcli to undo two pushcli. Also, if interrupts
// are off, then pushcli, popcli leaves them off.
=======
8010436e: 83 c0 01 add $0x1,%eax
80104371: 83 f8 0a cmp $0xa,%eax
80104374: 75 e2 jne 80104358 <getcallerpcs+0x38>
80104376: eb d6 jmp 8010434e <getcallerpcs+0x2e>
80104378: 90 nop
80104379: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104380 <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.
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
void
acquire(struct spinlock *lk)
{
<<<<<<< HEAD
80104670: 55 push %ebp
80104671: 89 e5 mov %esp,%ebp
=======
80104380: 55 push %ebp
80104381: 89 e5 mov %esp,%ebp
80104383: 83 ec 18 sub $0x18,%esp
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
static inline uint
readeflags(void)
{
uint eflags;
asm volatile("pushfl; popl %0" : "=r" (eflags));
<<<<<<< HEAD
80104673: 9c pushf
80104674: 59 pop %ecx
=======
80104386: 9c pushf
80104387: 59 pop %ecx
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
}
static inline void
cli(void)
{
asm volatile("cli");
<<<<<<< HEAD
80104675: fa cli
=======
80104388: fa cli
{
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
int eflags;
eflags = readeflags();
cli();
if(cpu->ncli == 0)
<<<<<<< HEAD
80104676: 65 8b 15 00 00 00 00 mov %gs:0x0,%edx
8010467d: 8b 82 ac 00 00 00 mov 0xac(%edx),%eax
80104683: 85 c0 test %eax,%eax
80104685: 75 0c jne 80104693 <pushcli+0x23>
cpu->intena = eflags & FL_IF;
80104687: 81 e1 00 02 00 00 and $0x200,%ecx
8010468d: 89 8a b0 00 00 00 mov %ecx,0xb0(%edx)
cpu->ncli += 1;
80104693: 83 c0 01 add $0x1,%eax
80104696: 89 82 ac 00 00 00 mov %eax,0xac(%edx)
}
8010469c: 5d pop %ebp
8010469d: c3 ret
8010469e: 66 90 xchg %ax,%ax
801046a0 <popcli>:
=======
80104389: 65 a1 00 00 00 00 mov %gs:0x0,%eax
8010438f: 8b 90 ac 00 00 00 mov 0xac(%eax),%edx
80104395: 85 d2 test %edx,%edx
80104397: 75 0c jne 801043a5 <acquire+0x25>
cpu->intena = eflags & FL_IF;
80104399: 81 e1 00 02 00 00 and $0x200,%ecx
8010439f: 89 88 b0 00 00 00 mov %ecx,0xb0(%eax)
cpu->ncli += 1;
801043a5: 83 c2 01 add $0x1,%edx
801043a8: 89 90 ac 00 00 00 mov %edx,0xac(%eax)
// other CPUs to waste time spinning to acquire it.
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
void
acquire(struct spinlock *lk)
{
<<<<<<< HEAD
801046a0: 55 push %ebp
801046a1: 89 e5 mov %esp,%ebp
801046a3: 83 ec 08 sub $0x8,%esp
=======
pushcli(); // disable interrupts to avoid deadlock.
if(holding(lk))
801043ae: 8b 55 08 mov 0x8(%ebp),%edx
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// Check whether this cpu is holding the lock.
int
holding(struct spinlock *lock)
{
<<<<<<< HEAD
uint eflags;
asm volatile("pushfl; popl %0" : "=r" (eflags));
801046a6: 9c pushf
801046a7: 58 pop %eax
if(readeflags()&FL_IF)
801046a8: f6 c4 02 test $0x2,%ah
801046ab: 75 2c jne 801046d9 <popcli+0x39>
panic("popcli - interruptible");
if(--cpu->ncli < 0)
801046ad: 65 8b 15 00 00 00 00 mov %gs:0x0,%edx
801046b4: 83 aa ac 00 00 00 01 subl $0x1,0xac(%edx)
801046bb: 78 0f js 801046cc <popcli+0x2c>
panic("popcli");
if(cpu->ncli == 0 && cpu->intena)
801046bd: 75 0b jne 801046ca <popcli+0x2a>
801046bf: 8b 82 b0 00 00 00 mov 0xb0(%edx),%eax
801046c5: 85 c0 test %eax,%eax
801046c7: 74 01 je 801046ca <popcli+0x2a>
=======
return lock->locked && lock->cpu == cpu;
801043b1: 8b 0a mov (%edx),%ecx
801043b3: 85 c9 test %ecx,%ecx
801043b5: 74 05 je 801043bc <acquire+0x3c>
801043b7: 3b 42 08 cmp 0x8(%edx),%eax
801043ba: 74 3e je 801043fa <acquire+0x7a>
xchg(volatile uint *addr, uint newval)
{
uint result;
// The + in "+m" denotes a read-modify-write operand.
asm volatile("lock; xchgl %0, %1" :
801043bc: b9 01 00 00 00 mov $0x1,%ecx
801043c1: eb 08 jmp 801043cb <acquire+0x4b>
801043c3: 90 nop
801043c4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801043c8: 8b 55 08 mov 0x8(%ebp),%edx
801043cb: 89 c8 mov %ecx,%eax
801043cd: f0 87 02 lock xchg %eax,(%edx)
pushcli(); // disable interrupts to avoid deadlock.
if(holding(lk))
panic("acquire");
// The xchg is atomic.
while(xchg(&lk->locked, 1) != 0)
801043d0: 85 c0 test %eax,%eax
801043d2: 75 f4 jne 801043c8 <acquire+0x48>
;
// Tell the C compiler and the processor to not move loads or stores
// past this point, to ensure that the critical section's memory
// references happen after the lock is acquired.
__sync_synchronize();
801043d4: f0 83 0c 24 00 lock orl $0x0,(%esp)
// Record info about lock acquisition for debugging.
lk->cpu = cpu;
801043d9: 8b 45 08 mov 0x8(%ebp),%eax
801043dc: 65 8b 15 00 00 00 00 mov %gs:0x0,%edx
getcallerpcs(&lk, lk->pcs);
801043e3: 83 c0 0c add $0xc,%eax
// past this point, to ensure that the critical section's memory
// references happen after the lock is acquired.
__sync_synchronize();
// Record info about lock acquisition for debugging.
lk->cpu = cpu;
801043e6: 89 50 fc mov %edx,-0x4(%eax)
getcallerpcs(&lk, lk->pcs);
801043e9: 89 44 24 04 mov %eax,0x4(%esp)
801043ed: 8d 45 08 lea 0x8(%ebp),%eax
801043f0: 89 04 24 mov %eax,(%esp)
801043f3: e8 28 ff ff ff call 80104320 <getcallerpcs>
}
801043f8: c9 leave
801043f9: c3 ret
void
acquire(struct spinlock *lk)
{
pushcli(); // disable interrupts to avoid deadlock.
if(holding(lk))
panic("acquire");
801043fa: c7 04 24 83 77 10 80 movl $0x80107783,(%esp)
80104401: e8 5a bf ff ff call 80100360 <panic>
80104406: 8d 76 00 lea 0x0(%esi),%esi
80104409: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104410 <holding>:
}
// Check whether this cpu is holding the lock.
int
holding(struct spinlock *lock)
{
80104410: 55 push %ebp
return lock->locked && lock->cpu == cpu;
80104411: 31 c0 xor %eax,%eax
}
// Check whether this cpu is holding the lock.
int
holding(struct spinlock *lock)
{
80104413: 89 e5 mov %esp,%ebp
80104415: 8b 55 08 mov 0x8(%ebp),%edx
return lock->locked && lock->cpu == cpu;
80104418: 8b 0a mov (%edx),%ecx
8010441a: 85 c9 test %ecx,%ecx
8010441c: 74 0f je 8010442d <holding+0x1d>
8010441e: 65 a1 00 00 00 00 mov %gs:0x0,%eax
80104424: 39 42 08 cmp %eax,0x8(%edx)
80104427: 0f 94 c0 sete %al
8010442a: 0f b6 c0 movzbl %al,%eax
}
8010442d: 5d pop %ebp
8010442e: c3 ret
8010442f: 90 nop
80104430 <pushcli>:
// it takes two popcli to undo two pushcli. Also, if interrupts
// are off, then pushcli, popcli leaves them off.
void
pushcli(void)
{
80104430: 55 push %ebp
80104431: 89 e5 mov %esp,%ebp
static inline uint
readeflags(void)
{
uint eflags;
asm volatile("pushfl; popl %0" : "=r" (eflags));
80104433: 9c pushf
80104434: 59 pop %ecx
}
static inline void
cli(void)
{
asm volatile("cli");
80104435: fa cli
int eflags;
eflags = readeflags();
cli();
if(cpu->ncli == 0)
80104436: 65 a1 00 00 00 00 mov %gs:0x0,%eax
8010443c: 8b 90 ac 00 00 00 mov 0xac(%eax),%edx
80104442: 85 d2 test %edx,%edx
80104444: 75 0c jne 80104452 <pushcli+0x22>
cpu->intena = eflags & FL_IF;
80104446: 81 e1 00 02 00 00 and $0x200,%ecx
8010444c: 89 88 b0 00 00 00 mov %ecx,0xb0(%eax)
cpu->ncli += 1;
80104452: 83 c2 01 add $0x1,%edx
80104455: 89 90 ac 00 00 00 mov %edx,0xac(%eax)
}
8010445b: 5d pop %ebp
8010445c: c3 ret
8010445d: 8d 76 00 lea 0x0(%esi),%esi
80104460 <popcli>:
void
popcli(void)
{
80104460: 55 push %ebp
80104461: 89 e5 mov %esp,%ebp
80104463: 83 ec 18 sub $0x18,%esp
static inline uint
readeflags(void)
{
uint eflags;
asm volatile("pushfl; popl %0" : "=r" (eflags));
80104466: 9c pushf
80104467: 58 pop %eax
if(readeflags()&FL_IF)
80104468: f6 c4 02 test $0x2,%ah
8010446b: 75 34 jne 801044a1 <popcli+0x41>
panic("popcli - interruptible");
if(--cpu->ncli < 0)
8010446d: 65 a1 00 00 00 00 mov %gs:0x0,%eax
80104473: 8b 88 ac 00 00 00 mov 0xac(%eax),%ecx
80104479: 8d 51 ff lea -0x1(%ecx),%edx
8010447c: 85 d2 test %edx,%edx
8010447e: 89 90 ac 00 00 00 mov %edx,0xac(%eax)
80104484: 78 0f js 80104495 <popcli+0x35>
panic("popcli");
if(cpu->ncli == 0 && cpu->intena)
80104486: 75 0b jne 80104493 <popcli+0x33>
80104488: 8b 80 b0 00 00 00 mov 0xb0(%eax),%eax
8010448e: 85 c0 test %eax,%eax
80104490: 74 01 je 80104493 <popcli+0x33>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
}
static inline void
sti(void)
{
asm volatile("sti");
<<<<<<< HEAD
801046c9: fb sti
sti();
}
801046ca: c9 leave
801046cb: c3 ret
=======
80104492: fb sti
sti();
}
80104493: c9 leave
80104494: c3 ret
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
popcli(void)
{
if(readeflags()&FL_IF)
panic("popcli - interruptible");
if(--cpu->ncli < 0)
panic("popcli");
<<<<<<< HEAD
801046cc: 83 ec 0c sub $0xc,%esp
801046cf: 68 12 7a 10 80 push $0x80107a12
801046d4: e8 97 bc ff ff call 80100370 <panic>
=======
80104495: c7 04 24 a2 77 10 80 movl $0x801077a2,(%esp)
8010449c: e8 bf be ff ff call 80100360 <panic>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
void
popcli(void)
{
if(readeflags()&FL_IF)
panic("popcli - interruptible");
<<<<<<< HEAD
801046d9: 83 ec 0c sub $0xc,%esp
801046dc: 68 fb 79 10 80 push $0x801079fb
801046e1: e8 8a bc ff ff call 80100370 <panic>
801046e6: 8d 76 00 lea 0x0(%esi),%esi
801046e9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801046f0 <release>:
=======
801044a1: c7 04 24 8b 77 10 80 movl $0x8010778b,(%esp)
801044a8: e8 b3 be ff ff call 80100360 <panic>
801044ad: 8d 76 00 lea 0x0(%esi),%esi
801044b0 <release>:
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
}
// Release the lock.
void
release(struct spinlock *lk)
{
<<<<<<< HEAD
801046f0: 55 push %ebp
801046f1: 89 e5 mov %esp,%ebp
801046f3: 83 ec 08 sub $0x8,%esp
801046f6: 8b 45 08 mov 0x8(%ebp),%eax
=======
801044b0: 55 push %ebp
801044b1: 89 e5 mov %esp,%ebp
801044b3: 83 ec 18 sub $0x18,%esp
801044b6: 8b 45 08 mov 0x8(%ebp),%eax
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// Check whether this cpu is holding the lock.
int
holding(struct spinlock *lock)
{
return lock->locked && lock->cpu == cpu;
<<<<<<< HEAD
801046f9: 8b 10 mov (%eax),%edx
801046fb: 85 d2 test %edx,%edx
801046fd: 74 0c je 8010470b <release+0x1b>
801046ff: 65 8b 15 00 00 00 00 mov %gs:0x0,%edx
80104706: 39 50 08 cmp %edx,0x8(%eax)
80104709: 74 15 je 80104720 <release+0x30>
=======
801044b9: 8b 10 mov (%eax),%edx
801044bb: 85 d2 test %edx,%edx
801044bd: 74 0c je 801044cb <release+0x1b>
801044bf: 65 8b 15 00 00 00 00 mov %gs:0x0,%edx
801044c6: 39 50 08 cmp %edx,0x8(%eax)
801044c9: 74 0d je 801044d8 <release+0x28>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// Release the lock.
void
release(struct spinlock *lk)
{
if(!holding(lk))
panic("release");
<<<<<<< HEAD
8010470b: 83 ec 0c sub $0xc,%esp
8010470e: 68 19 7a 10 80 push $0x80107a19
80104713: e8 58 bc ff ff call 80100370 <panic>
80104718: 90 nop
80104719: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
lk->pcs[0] = 0;
80104720: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
lk->cpu = 0;
80104727: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
=======
801044cb: c7 04 24 a9 77 10 80 movl $0x801077a9,(%esp)
801044d2: e8 89 be ff ff call 80100360 <panic>
801044d7: 90 nop
lk->pcs[0] = 0;
801044d8: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
lk->cpu = 0;
801044df: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// Tell the C compiler and the processor to not move loads or stores
// past this point, to ensure that all the stores in the critical
// section are visible to other cores before the lock is released.
// Both the C compiler and the hardware may re-order loads and
// stores; __sync_synchronize() tells them both not to.
__sync_synchronize();
<<<<<<< HEAD
8010472e: f0 83 0c 24 00 lock orl $0x0,(%esp)
=======
801044e6: f0 83 0c 24 00 lock orl $0x0,(%esp)
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// Release the lock, equivalent to lk->locked = 0.
// This code can't use a C assignment, since it might
// not be atomic. A real OS would use C atomics here.
asm volatile("movl $0, %0" : "+m" (lk->locked) : );
<<<<<<< HEAD
80104733: c7 00 00 00 00 00 movl $0x0,(%eax)
popcli();
}
80104739: c9 leave
=======
801044eb: c7 00 00 00 00 00 movl $0x0,(%eax)
popcli();
}
801044f1: c9 leave
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// Release the lock, equivalent to lk->locked = 0.
// This code can't use a C assignment, since it might
// not be atomic. A real OS would use C atomics here.
asm volatile("movl $0, %0" : "+m" (lk->locked) : );
popcli();
<<<<<<< HEAD
8010473a: e9 61 ff ff ff jmp 801046a0 <popcli>
8010473f: 90 nop
80104740 <memset>:
=======
801044f2: e9 69 ff ff ff jmp 80104460 <popcli>
801044f7: 66 90 xchg %ax,%ax
801044f9: 66 90 xchg %ax,%ax
801044fb: 66 90 xchg %ax,%ax
801044fd: 66 90 xchg %ax,%ax
801044ff: 90 nop
80104500 <memset>:
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
#include "types.h"
#include "x86.h"
void*
memset(void *dst, int c, uint n)
{
<<<<<<< HEAD
80104740: 55 push %ebp
80104741: 89 e5 mov %esp,%ebp
80104743: 57 push %edi
80104744: 53 push %ebx
80104745: 8b 55 08 mov 0x8(%ebp),%edx
80104748: 8b 4d 10 mov 0x10(%ebp),%ecx
if ((int)dst%4 == 0 && n%4 == 0){
8010474b: f6 c2 03 test $0x3,%dl
8010474e: 75 05 jne 80104755 <memset+0x15>
80104750: f6 c1 03 test $0x3,%cl
80104753: 74 13 je 80104768 <memset+0x28>
=======
80104500: 55 push %ebp
80104501: 89 e5 mov %esp,%ebp
80104503: 8b 55 08 mov 0x8(%ebp),%edx
80104506: 57 push %edi
80104507: 8b 4d 10 mov 0x10(%ebp),%ecx
8010450a: 53 push %ebx
if ((int)dst%4 == 0 && n%4 == 0){
8010450b: f6 c2 03 test $0x3,%dl
8010450e: 75 05 jne 80104515 <memset+0x15>
80104510: f6 c1 03 test $0x3,%cl
80104513: 74 13 je 80104528 <memset+0x28>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
}
static inline void
stosb(void *addr, int data, int cnt)
{
asm volatile("cld; rep stosb" :
<<<<<<< HEAD
80104755: 89 d7 mov %edx,%edi
80104757: 8b 45 0c mov 0xc(%ebp),%eax
8010475a: fc cld
8010475b: f3 aa rep stos %al,%es:(%edi)
=======
80104515: 89 d7 mov %edx,%edi
80104517: 8b 45 0c mov 0xc(%ebp),%eax
8010451a: fc cld
8010451b: f3 aa rep stos %al,%es:(%edi)
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
c &= 0xFF;
stosl(dst, (c<<24)|(c<<16)|(c<<8)|c, n/4);
} else
stosb(dst, c, n);
return dst;
}
<<<<<<< HEAD
8010475d: 5b pop %ebx
8010475e: 89 d0 mov %edx,%eax
80104760: 5f pop %edi
80104761: 5d pop %ebp
80104762: c3 ret
80104763: 90 nop
80104764: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
=======
8010451d: 5b pop %ebx
8010451e: 89 d0 mov %edx,%eax
80104520: 5f pop %edi
80104521: 5d pop %ebp
80104522: c3 ret
80104523: 90 nop
80104524: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
void*
memset(void *dst, int c, uint n)
{
if ((int)dst%4 == 0 && n%4 == 0){
c &= 0xFF;
<<<<<<< HEAD
80104768: 0f b6 7d 0c movzbl 0xc(%ebp),%edi
=======
80104528: 0f b6 7d 0c movzbl 0xc(%ebp),%edi
stosl(dst, (c<<24)|(c<<16)|(c<<8)|c, n/4);
8010452c: c1 e9 02 shr $0x2,%ecx
8010452f: 89 f8 mov %edi,%eax
80104531: 89 fb mov %edi,%ebx
80104533: c1 e0 18 shl $0x18,%eax
80104536: c1 e3 10 shl $0x10,%ebx
80104539: 09 d8 or %ebx,%eax
8010453b: 09 f8 or %edi,%eax
8010453d: c1 e7 08 shl $0x8,%edi
80104540: 09 f8 or %edi,%eax
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
}
static inline void
stosl(void *addr, int data, int cnt)
{
asm volatile("cld; rep stosl" :
<<<<<<< HEAD
8010476c: c1 e9 02 shr $0x2,%ecx
8010476f: 89 fb mov %edi,%ebx
80104771: 89 f8 mov %edi,%eax
80104773: c1 e3 18 shl $0x18,%ebx
80104776: c1 e0 10 shl $0x10,%eax
80104779: 09 d8 or %ebx,%eax
8010477b: 09 f8 or %edi,%eax
8010477d: c1 e7 08 shl $0x8,%edi
80104780: 09 f8 or %edi,%eax
80104782: 89 d7 mov %edx,%edi
80104784: fc cld
80104785: f3 ab rep stos %eax,%es:(%edi)
stosl(dst, (c<<24)|(c<<16)|(c<<8)|c, n/4);
=======
80104542: 89 d7 mov %edx,%edi
80104544: fc cld
80104545: f3 ab rep stos %eax,%es:(%edi)
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
} else
stosb(dst, c, n);
return dst;
}
<<<<<<< HEAD
80104787: 5b pop %ebx
80104788: 89 d0 mov %edx,%eax
8010478a: 5f pop %edi
8010478b: 5d pop %ebp
8010478c: c3 ret
8010478d: 8d 76 00 lea 0x0(%esi),%esi
80104790 <memcmp>:
=======
80104547: 5b pop %ebx
80104548: 89 d0 mov %edx,%eax
8010454a: 5f pop %edi
8010454b: 5d pop %ebp
8010454c: c3 ret
8010454d: 8d 76 00 lea 0x0(%esi),%esi
80104550 <memcmp>:
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
int
memcmp(const void *v1, const void *v2, uint n)
{
<<<<<<< HEAD
80104790: 55 push %ebp
80104791: 89 e5 mov %esp,%ebp
80104793: 57 push %edi
80104794: 56 push %esi
80104795: 8b 45 10 mov 0x10(%ebp),%eax
80104798: 53 push %ebx
80104799: 8b 75 0c mov 0xc(%ebp),%esi
8010479c: 8b 5d 08 mov 0x8(%ebp),%ebx
=======
80104550: 55 push %ebp
80104551: 89 e5 mov %esp,%ebp
80104553: 8b 45 10 mov 0x10(%ebp),%eax
80104556: 57 push %edi
80104557: 56 push %esi
80104558: 8b 75 0c mov 0xc(%ebp),%esi
8010455b: 53 push %ebx
8010455c: 8b 5d 08 mov 0x8(%ebp),%ebx
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
const uchar *s1, *s2;
s1 = v1;
s2 = v2;
while(n-- > 0){
<<<<<<< HEAD
8010479f: 85 c0 test %eax,%eax
801047a1: 74 29 je 801047cc <memcmp+0x3c>
if(*s1 != *s2)
801047a3: 0f b6 13 movzbl (%ebx),%edx
801047a6: 0f b6 0e movzbl (%esi),%ecx
801047a9: 38 d1 cmp %dl,%cl
801047ab: 75 2b jne 801047d8 <memcmp+0x48>
801047ad: 8d 78 ff lea -0x1(%eax),%edi
801047b0: 31 c0 xor %eax,%eax
801047b2: eb 14 jmp 801047c8 <memcmp+0x38>
801047b4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801047b8: 0f b6 54 03 01 movzbl 0x1(%ebx,%eax,1),%edx
801047bd: 83 c0 01 add $0x1,%eax
801047c0: 0f b6 0c 06 movzbl (%esi,%eax,1),%ecx
801047c4: 38 ca cmp %cl,%dl
801047c6: 75 10 jne 801047d8 <memcmp+0x48>
=======
8010455f: 85 c0 test %eax,%eax
80104561: 8d 78 ff lea -0x1(%eax),%edi
80104564: 74 26 je 8010458c <memcmp+0x3c>
if(*s1 != *s2)
80104566: 0f b6 03 movzbl (%ebx),%eax
80104569: 31 d2 xor %edx,%edx
8010456b: 0f b6 0e movzbl (%esi),%ecx
8010456e: 38 c8 cmp %cl,%al
80104570: 74 16 je 80104588 <memcmp+0x38>
80104572: eb 24 jmp 80104598 <memcmp+0x48>
80104574: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104578: 0f b6 44 13 01 movzbl 0x1(%ebx,%edx,1),%eax
8010457d: 83 c2 01 add $0x1,%edx
80104580: 0f b6 0c 16 movzbl (%esi,%edx,1),%ecx
80104584: 38 c8 cmp %cl,%al
80104586: 75 10 jne 80104598 <memcmp+0x48>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
{
const uchar *s1, *s2;
s1 = v1;
s2 = v2;
while(n-- > 0){
<<<<<<< HEAD
801047c8: 39 f8 cmp %edi,%eax
801047ca: 75 ec jne 801047b8 <memcmp+0x28>
return *s1 - *s2;
s1++, s2++;
}
return 0;
}
801047cc: 5b pop %ebx
if(*s1 != *s2)
=======
80104588: 39 fa cmp %edi,%edx
8010458a: 75 ec jne 80104578 <memcmp+0x28>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
return *s1 - *s2;
s1++, s2++;
}
return 0;
<<<<<<< HEAD
801047cd: 31 c0 xor %eax,%eax
}
801047cf: 5e pop %esi
801047d0: 5f pop %edi
801047d1: 5d pop %ebp
801047d2: c3 ret
801047d3: 90 nop
801047d4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
s1 = v1;
s2 = v2;
while(n-- > 0){
if(*s1 != *s2)
return *s1 - *s2;
801047d8: 0f b6 c2 movzbl %dl,%eax
=======
}
8010458c: 5b pop %ebx
if(*s1 != *s2)
return *s1 - *s2;
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
s1++, s2++;
}
return 0;
8010458d: 31 c0 xor %eax,%eax
}
<<<<<<< HEAD
801047db: 5b pop %ebx
=======
8010458f: 5e pop %esi
80104590: 5f pop %edi
80104591: 5d pop %ebp
80104592: c3 ret
80104593: 90 nop
80104594: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104598: 5b pop %ebx
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
s1 = v1;
s2 = v2;
while(n-- > 0){
if(*s1 != *s2)
return *s1 - *s2;
<<<<<<< HEAD
801047dc: 29 c8 sub %ecx,%eax
=======
80104599: 29 c8 sub %ecx,%eax
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
s1++, s2++;
}
return 0;
}
<<<<<<< HEAD
801047de: 5e pop %esi
801047df: 5f pop %edi
801047e0: 5d pop %ebp
801047e1: c3 ret
801047e2: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801047e9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801047f0 <memmove>:
=======
8010459b: 5e pop %esi
8010459c: 5f pop %edi
8010459d: 5d pop %ebp
8010459e: c3 ret
8010459f: 90 nop
801045a0 <memmove>:
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
void*
memmove(void *dst, const void *src, uint n)
{
<<<<<<< HEAD
801047f0: 55 push %ebp
801047f1: 89 e5 mov %esp,%ebp
801047f3: 56 push %esi
801047f4: 53 push %ebx
801047f5: 8b 45 08 mov 0x8(%ebp),%eax
801047f8: 8b 75 0c mov 0xc(%ebp),%esi
801047fb: 8b 5d 10 mov 0x10(%ebp),%ebx
=======
801045a0: 55 push %ebp
801045a1: 89 e5 mov %esp,%ebp
801045a3: 57 push %edi
801045a4: 8b 45 08 mov 0x8(%ebp),%eax
801045a7: 56 push %esi
801045a8: 8b 75 0c mov 0xc(%ebp),%esi
801045ab: 53 push %ebx
801045ac: 8b 5d 10 mov 0x10(%ebp),%ebx
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
const char *s;
char *d;
s = src;
d = dst;
if(s < d && s + n > d){
<<<<<<< HEAD
801047fe: 39 c6 cmp %eax,%esi
80104800: 73 2e jae 80104830 <memmove+0x40>
80104802: 8d 0c 1e lea (%esi,%ebx,1),%ecx
80104805: 39 c8 cmp %ecx,%eax
80104807: 73 27 jae 80104830 <memmove+0x40>
=======
801045af: 39 c6 cmp %eax,%esi
801045b1: 73 35 jae 801045e8 <memmove+0x48>
801045b3: 8d 0c 1e lea (%esi,%ebx,1),%ecx
801045b6: 39 c8 cmp %ecx,%eax
801045b8: 73 2e jae 801045e8 <memmove+0x48>
s += n;
d += n;
while(n-- > 0)
801045ba: 85 db test %ebx,%ebx
s = src;
d = dst;
if(s < d && s + n > d){
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
s += n;
d += n;
801045bc: 8d 3c 18 lea (%eax,%ebx,1),%edi
while(n-- > 0)
<<<<<<< HEAD
80104809: 85 db test %ebx,%ebx
8010480b: 8d 53 ff lea -0x1(%ebx),%edx
8010480e: 74 17 je 80104827 <memmove+0x37>
*--d = *--s;
80104810: 29 d9 sub %ebx,%ecx
80104812: 89 cb mov %ecx,%ebx
80104814: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104818: 0f b6 0c 13 movzbl (%ebx,%edx,1),%ecx
8010481c: 88 0c 10 mov %cl,(%eax,%edx,1)
=======
801045bf: 8d 53 ff lea -0x1(%ebx),%edx
801045c2: 74 1b je 801045df <memmove+0x3f>
801045c4: f7 db neg %ebx
801045c6: 8d 34 19 lea (%ecx,%ebx,1),%esi
801045c9: 01 fb add %edi,%ebx
801045cb: 90 nop
801045cc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
*--d = *--s;
801045d0: 0f b6 0c 16 movzbl (%esi,%edx,1),%ecx
801045d4: 88 0c 13 mov %cl,(%ebx,%edx,1)
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
s = src;
d = dst;
if(s < d && s + n > d){
s += n;
d += n;
while(n-- > 0)
<<<<<<< HEAD
8010481f: 83 ea 01 sub $0x1,%edx
80104822: 83 fa ff cmp $0xffffffff,%edx
80104825: 75 f1 jne 80104818 <memmove+0x28>
=======
801045d7: 83 ea 01 sub $0x1,%edx
801045da: 83 fa ff cmp $0xffffffff,%edx
801045dd: 75 f1 jne 801045d0 <memmove+0x30>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
} else
while(n-- > 0)
*d++ = *s++;
return dst;
}
<<<<<<< HEAD
80104827: 5b pop %ebx
80104828: 5e pop %esi
80104829: 5d pop %ebp
8010482a: c3 ret
8010482b: 90 nop
8010482c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
=======
801045df: 5b pop %ebx
801045e0: 5e pop %esi
801045e1: 5f pop %edi
801045e2: 5d pop %ebp
801045e3: c3 ret
801045e4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
s += n;
d += n;
while(n-- > 0)
*--d = *--s;
} else
while(n-- > 0)
<<<<<<< HEAD
80104830: 31 d2 xor %edx,%edx
80104832: 85 db test %ebx,%ebx
80104834: 74 f1 je 80104827 <memmove+0x37>
80104836: 8d 76 00 lea 0x0(%esi),%esi
80104839: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
*d++ = *s++;
80104840: 0f b6 0c 16 movzbl (%esi,%edx,1),%ecx
80104844: 88 0c 10 mov %cl,(%eax,%edx,1)
80104847: 83 c2 01 add $0x1,%edx
=======
801045e8: 31 d2 xor %edx,%edx
801045ea: 85 db test %ebx,%ebx
801045ec: 74 f1 je 801045df <memmove+0x3f>
801045ee: 66 90 xchg %ax,%ax
*d++ = *s++;
801045f0: 0f b6 0c 16 movzbl (%esi,%edx,1),%ecx
801045f4: 88 0c 10 mov %cl,(%eax,%edx,1)
801045f7: 83 c2 01 add $0x1,%edx
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
s += n;
d += n;
while(n-- > 0)
*--d = *--s;
} else
while(n-- > 0)
<<<<<<< HEAD
8010484a: 39 d3 cmp %edx,%ebx
8010484c: 75 f2 jne 80104840 <memmove+0x50>
=======
801045fa: 39 da cmp %ebx,%edx
801045fc: 75 f2 jne 801045f0 <memmove+0x50>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
*d++ = *s++;
return dst;
}
<<<<<<< HEAD
8010484e: 5b pop %ebx
8010484f: 5e pop %esi
80104850: 5d pop %ebp
80104851: c3 ret
80104852: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104859: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104860 <memcpy>:
=======
801045fe: 5b pop %ebx
801045ff: 5e pop %esi
80104600: 5f pop %edi
80104601: 5d pop %ebp
80104602: c3 ret
80104603: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80104609: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104610 <memcpy>:
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// memcpy exists to placate GCC. Use memmove.
void*
memcpy(void *dst, const void *src, uint n)
{
<<<<<<< HEAD
80104860: 55 push %ebp
80104861: 89 e5 mov %esp,%ebp
return memmove(dst, src, n);
}
80104863: 5d pop %ebp
=======
80104610: 55 push %ebp
80104611: 89 e5 mov %esp,%ebp
return memmove(dst, src, n);
}
80104613: 5d pop %ebp
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// memcpy exists to placate GCC. Use memmove.
void*
memcpy(void *dst, const void *src, uint n)
{
return memmove(dst, src, n);
<<<<<<< HEAD
80104864: eb 8a jmp 801047f0 <memmove>
80104866: 8d 76 00 lea 0x0(%esi),%esi
80104869: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104870 <strncmp>:
=======
80104614: e9 87 ff ff ff jmp 801045a0 <memmove>
80104619: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104620 <strncmp>:
}
int
strncmp(const char *p, const char *q, uint n)
{
80104620: 55 push %ebp
80104621: 89 e5 mov %esp,%ebp
80104623: 56 push %esi
80104624: 8b 75 10 mov 0x10(%ebp),%esi
80104627: 53 push %ebx
80104628: 8b 4d 08 mov 0x8(%ebp),%ecx
8010462b: 8b 5d 0c mov 0xc(%ebp),%ebx
while(n > 0 && *p && *p == *q)
8010462e: 85 f6 test %esi,%esi
80104630: 74 30 je 80104662 <strncmp+0x42>
80104632: 0f b6 01 movzbl (%ecx),%eax
80104635: 84 c0 test %al,%al
80104637: 74 2f je 80104668 <strncmp+0x48>
80104639: 0f b6 13 movzbl (%ebx),%edx
8010463c: 38 d0 cmp %dl,%al
8010463e: 75 46 jne 80104686 <strncmp+0x66>
80104640: 8d 51 01 lea 0x1(%ecx),%edx
80104643: 01 ce add %ecx,%esi
80104645: eb 14 jmp 8010465b <strncmp+0x3b>
80104647: 90 nop
80104648: 0f b6 02 movzbl (%edx),%eax
8010464b: 84 c0 test %al,%al
8010464d: 74 31 je 80104680 <strncmp+0x60>
8010464f: 0f b6 19 movzbl (%ecx),%ebx
80104652: 83 c2 01 add $0x1,%edx
80104655: 38 d8 cmp %bl,%al
80104657: 75 17 jne 80104670 <strncmp+0x50>
n--, p++, q++;
80104659: 89 cb mov %ecx,%ebx
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
}
int
strncmp(const char *p, const char *q, uint n)
{
<<<<<<< HEAD
80104870: 55 push %ebp
80104871: 89 e5 mov %esp,%ebp
80104873: 57 push %edi
80104874: 56 push %esi
80104875: 8b 4d 10 mov 0x10(%ebp),%ecx
80104878: 53 push %ebx
80104879: 8b 7d 08 mov 0x8(%ebp),%edi
8010487c: 8b 75 0c mov 0xc(%ebp),%esi
while(n > 0 && *p && *p == *q)
8010487f: 85 c9 test %ecx,%ecx
80104881: 74 37 je 801048ba <strncmp+0x4a>
80104883: 0f b6 17 movzbl (%edi),%edx
80104886: 0f b6 1e movzbl (%esi),%ebx
80104889: 84 d2 test %dl,%dl
8010488b: 74 3f je 801048cc <strncmp+0x5c>
8010488d: 38 d3 cmp %dl,%bl
8010488f: 75 3b jne 801048cc <strncmp+0x5c>
80104891: 8d 47 01 lea 0x1(%edi),%eax
80104894: 01 cf add %ecx,%edi
80104896: eb 1b jmp 801048b3 <strncmp+0x43>
80104898: 90 nop
80104899: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801048a0: 0f b6 10 movzbl (%eax),%edx
801048a3: 84 d2 test %dl,%dl
801048a5: 74 21 je 801048c8 <strncmp+0x58>
801048a7: 0f b6 19 movzbl (%ecx),%ebx
801048aa: 83 c0 01 add $0x1,%eax
801048ad: 89 ce mov %ecx,%esi
801048af: 38 da cmp %bl,%dl
801048b1: 75 19 jne 801048cc <strncmp+0x5c>
801048b3: 39 c7 cmp %eax,%edi
n--, p++, q++;
801048b5: 8d 4e 01 lea 0x1(%esi),%ecx
=======
while(n > 0 && *p && *p == *q)
8010465b: 39 f2 cmp %esi,%edx
n--, p++, q++;
8010465d: 8d 4b 01 lea 0x1(%ebx),%ecx
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
}
int
strncmp(const char *p, const char *q, uint n)
{
while(n > 0 && *p && *p == *q)
<<<<<<< HEAD
801048b8: 75 e6 jne 801048a0 <strncmp+0x30>
=======
80104660: 75 e6 jne 80104648 <strncmp+0x28>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
n--, p++, q++;
if(n == 0)
return 0;
return (uchar)*p - (uchar)*q;
}
<<<<<<< HEAD
801048ba: 5b pop %ebx
=======
80104662: 5b pop %ebx
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
strncmp(const char *p, const char *q, uint n)
{
while(n > 0 && *p && *p == *q)
n--, p++, q++;
if(n == 0)
return 0;
<<<<<<< HEAD
801048bb: 31 c0 xor %eax,%eax
return (uchar)*p - (uchar)*q;
}
801048bd: 5e pop %esi
801048be: 5f pop %edi
801048bf: 5d pop %ebp
801048c0: c3 ret
801048c1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801048c8: 0f b6 5e 01 movzbl 0x1(%esi),%ebx
=======
80104663: 31 c0 xor %eax,%eax
return (uchar)*p - (uchar)*q;
}
80104665: 5e pop %esi
80104666: 5d pop %ebp
80104667: c3 ret
80104668: 0f b6 1b movzbl (%ebx),%ebx
}
int
strncmp(const char *p, const char *q, uint n)
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
{
while(n > 0 && *p && *p == *q)
8010466b: 31 c0 xor %eax,%eax
8010466d: 8d 76 00 lea 0x0(%esi),%esi
n--, p++, q++;
if(n == 0)
return 0;
return (uchar)*p - (uchar)*q;
<<<<<<< HEAD
801048cc: 0f b6 c2 movzbl %dl,%eax
801048cf: 29 d8 sub %ebx,%eax
}
801048d1: 5b pop %ebx
801048d2: 5e pop %esi
801048d3: 5f pop %edi
801048d4: 5d pop %ebp
801048d5: c3 ret
801048d6: 8d 76 00 lea 0x0(%esi),%esi
801048d9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801048e0 <strncpy>:
=======
80104670: 0f b6 d3 movzbl %bl,%edx
80104673: 29 d0 sub %edx,%eax
}
80104675: 5b pop %ebx
80104676: 5e pop %esi
80104677: 5d pop %ebp
80104678: c3 ret
80104679: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104680: 0f b6 5b 01 movzbl 0x1(%ebx),%ebx
80104684: eb ea jmp 80104670 <strncmp+0x50>
}
int
strncmp(const char *p, const char *q, uint n)
{
while(n > 0 && *p && *p == *q)
80104686: 89 d3 mov %edx,%ebx
80104688: eb e6 jmp 80104670 <strncmp+0x50>
8010468a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80104690 <strncpy>:
return (uchar)*p - (uchar)*q;
}
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
char*
strncpy(char *s, const char *t, int n)
{
<<<<<<< HEAD
801048e0: 55 push %ebp
801048e1: 89 e5 mov %esp,%ebp
801048e3: 56 push %esi
801048e4: 53 push %ebx
801048e5: 8b 45 08 mov 0x8(%ebp),%eax
801048e8: 8b 5d 0c mov 0xc(%ebp),%ebx
801048eb: 8b 4d 10 mov 0x10(%ebp),%ecx
=======
80104690: 55 push %ebp
80104691: 89 e5 mov %esp,%ebp
80104693: 8b 45 08 mov 0x8(%ebp),%eax
80104696: 56 push %esi
80104697: 8b 4d 10 mov 0x10(%ebp),%ecx
8010469a: 53 push %ebx
8010469b: 8b 5d 0c mov 0xc(%ebp),%ebx
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
char *os;
os = s;
while(n-- > 0 && (*s++ = *t++) != 0)
<<<<<<< HEAD
801048ee: 89 c2 mov %eax,%edx
801048f0: eb 19 jmp 8010490b <strncpy+0x2b>
801048f2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801048f8: 83 c3 01 add $0x1,%ebx
801048fb: 0f b6 4b ff movzbl -0x1(%ebx),%ecx
801048ff: 83 c2 01 add $0x1,%edx
80104902: 84 c9 test %cl,%cl
80104904: 88 4a ff mov %cl,-0x1(%edx)
80104907: 74 09 je 80104912 <strncpy+0x32>
80104909: 89 f1 mov %esi,%ecx
8010490b: 85 c9 test %ecx,%ecx
8010490d: 8d 71 ff lea -0x1(%ecx),%esi
80104910: 7f e6 jg 801048f8 <strncpy+0x18>
;
while(n-- > 0)
80104912: 31 c9 xor %ecx,%ecx
80104914: 85 f6 test %esi,%esi
80104916: 7e 17 jle 8010492f <strncpy+0x4f>
80104918: 90 nop
80104919: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
*s++ = 0;
80104920: c6 04 0a 00 movb $0x0,(%edx,%ecx,1)
80104924: 89 f3 mov %esi,%ebx
80104926: 83 c1 01 add $0x1,%ecx
80104929: 29 cb sub %ecx,%ebx
=======
8010469e: 89 c2 mov %eax,%edx
801046a0: eb 19 jmp 801046bb <strncpy+0x2b>
801046a2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801046a8: 83 c3 01 add $0x1,%ebx
801046ab: 0f b6 4b ff movzbl -0x1(%ebx),%ecx
801046af: 83 c2 01 add $0x1,%edx
801046b2: 84 c9 test %cl,%cl
801046b4: 88 4a ff mov %cl,-0x1(%edx)
801046b7: 74 09 je 801046c2 <strncpy+0x32>
801046b9: 89 f1 mov %esi,%ecx
801046bb: 85 c9 test %ecx,%ecx
801046bd: 8d 71 ff lea -0x1(%ecx),%esi
801046c0: 7f e6 jg 801046a8 <strncpy+0x18>
;
while(n-- > 0)
801046c2: 31 c9 xor %ecx,%ecx
801046c4: 85 f6 test %esi,%esi
801046c6: 7e 0f jle 801046d7 <strncpy+0x47>
*s++ = 0;
801046c8: c6 04 0a 00 movb $0x0,(%edx,%ecx,1)
801046cc: 89 f3 mov %esi,%ebx
801046ce: 83 c1 01 add $0x1,%ecx
801046d1: 29 cb sub %ecx,%ebx
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
char *os;
os = s;
while(n-- > 0 && (*s++ = *t++) != 0)
;
while(n-- > 0)
<<<<<<< HEAD
8010492b: 85 db test %ebx,%ebx
8010492d: 7f f1 jg 80104920 <strncpy+0x40>
*s++ = 0;
return os;
}
8010492f: 5b pop %ebx
80104930: 5e pop %esi
80104931: 5d pop %ebp
80104932: c3 ret
80104933: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80104939: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104940 <safestrcpy>:
=======
801046d3: 85 db test %ebx,%ebx
801046d5: 7f f1 jg 801046c8 <strncpy+0x38>
*s++ = 0;
return os;
}
801046d7: 5b pop %ebx
801046d8: 5e pop %esi
801046d9: 5d pop %ebp
801046da: c3 ret
801046db: 90 nop
801046dc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801046e0 <safestrcpy>:
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// Like strncpy but guaranteed to NUL-terminate.
char*
safestrcpy(char *s, const char *t, int n)
{
<<<<<<< HEAD
80104940: 55 push %ebp
80104941: 89 e5 mov %esp,%ebp
80104943: 56 push %esi
80104944: 53 push %ebx
80104945: 8b 4d 10 mov 0x10(%ebp),%ecx
80104948: 8b 45 08 mov 0x8(%ebp),%eax
8010494b: 8b 55 0c mov 0xc(%ebp),%edx
=======
801046e0: 55 push %ebp
801046e1: 89 e5 mov %esp,%ebp
801046e3: 8b 4d 10 mov 0x10(%ebp),%ecx
801046e6: 56 push %esi
801046e7: 8b 45 08 mov 0x8(%ebp),%eax
801046ea: 53 push %ebx
801046eb: 8b 55 0c mov 0xc(%ebp),%edx
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
char *os;
os = s;
if(n <= 0)
<<<<<<< HEAD
8010494e: 85 c9 test %ecx,%ecx
80104950: 7e 26 jle 80104978 <safestrcpy+0x38>
80104952: 8d 74 0a ff lea -0x1(%edx,%ecx,1),%esi
80104956: 89 c1 mov %eax,%ecx
80104958: eb 17 jmp 80104971 <safestrcpy+0x31>
8010495a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
return os;
while(--n > 0 && (*s++ = *t++) != 0)
80104960: 83 c2 01 add $0x1,%edx
80104963: 0f b6 5a ff movzbl -0x1(%edx),%ebx
80104967: 83 c1 01 add $0x1,%ecx
8010496a: 84 db test %bl,%bl
8010496c: 88 59 ff mov %bl,-0x1(%ecx)
8010496f: 74 04 je 80104975 <safestrcpy+0x35>
80104971: 39 f2 cmp %esi,%edx
80104973: 75 eb jne 80104960 <safestrcpy+0x20>
;
*s = 0;
80104975: c6 01 00 movb $0x0,(%ecx)
return os;
}
80104978: 5b pop %ebx
80104979: 5e pop %esi
8010497a: 5d pop %ebp
8010497b: c3 ret
8010497c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104980 <strlen>:
=======
801046ee: 85 c9 test %ecx,%ecx
801046f0: 7e 26 jle 80104718 <safestrcpy+0x38>
801046f2: 8d 74 0a ff lea -0x1(%edx,%ecx,1),%esi
801046f6: 89 c1 mov %eax,%ecx
801046f8: eb 17 jmp 80104711 <safestrcpy+0x31>
801046fa: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
return os;
while(--n > 0 && (*s++ = *t++) != 0)
80104700: 83 c2 01 add $0x1,%edx
80104703: 0f b6 5a ff movzbl -0x1(%edx),%ebx
80104707: 83 c1 01 add $0x1,%ecx
8010470a: 84 db test %bl,%bl
8010470c: 88 59 ff mov %bl,-0x1(%ecx)
8010470f: 74 04 je 80104715 <safestrcpy+0x35>
80104711: 39 f2 cmp %esi,%edx
80104713: 75 eb jne 80104700 <safestrcpy+0x20>
;
*s = 0;
80104715: c6 01 00 movb $0x0,(%ecx)
return os;
}
80104718: 5b pop %ebx
80104719: 5e pop %esi
8010471a: 5d pop %ebp
8010471b: c3 ret
8010471c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104720 <strlen>:
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
int
strlen(const char *s)
{
<<<<<<< HEAD
80104980: 55 push %ebp
int n;
for(n = 0; s[n]; n++)
80104981: 31 c0 xor %eax,%eax
=======
80104720: 55 push %ebp
int n;
for(n = 0; s[n]; n++)
80104721: 31 c0 xor %eax,%eax
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
return os;
}
int
strlen(const char *s)
{
<<<<<<< HEAD
80104983: 89 e5 mov %esp,%ebp
80104985: 8b 55 08 mov 0x8(%ebp),%edx
int n;
for(n = 0; s[n]; n++)
80104988: 80 3a 00 cmpb $0x0,(%edx)
8010498b: 74 0c je 80104999 <strlen+0x19>
8010498d: 8d 76 00 lea 0x0(%esi),%esi
80104990: 83 c0 01 add $0x1,%eax
80104993: 80 3c 02 00 cmpb $0x0,(%edx,%eax,1)
80104997: 75 f7 jne 80104990 <strlen+0x10>
;
return n;
}
80104999: 5d pop %ebp
8010499a: c3 ret
8010499b <swtch>:
# Save current register context in old
# and then load register context from new.
.globl swtch
swtch:
movl 4(%esp), %eax
8010499b: 8b 44 24 04 mov 0x4(%esp),%eax
movl 8(%esp), %edx
8010499f: 8b 54 24 08 mov 0x8(%esp),%edx
# Save old callee-save registers
pushl %ebp
801049a3: 55 push %ebp
pushl %ebx
801049a4: 53 push %ebx
pushl %esi
801049a5: 56 push %esi
pushl %edi
801049a6: 57 push %edi
# Switch stacks
movl %esp, (%eax)
801049a7: 89 20 mov %esp,(%eax)
movl %edx, %esp
801049a9: 89 d4 mov %edx,%esp
# Load new callee-save registers
popl %edi
801049ab: 5f pop %edi
popl %esi
801049ac: 5e pop %esi
popl %ebx
801049ad: 5b pop %ebx
popl %ebp
801049ae: 5d pop %ebp
ret
801049af: c3 ret
801049b0 <fetchint>:
// to a saved program counter, and then the first argument.
=======
80104723: 89 e5 mov %esp,%ebp
80104725: 8b 55 08 mov 0x8(%ebp),%edx
int n;
for(n = 0; s[n]; n++)
80104728: 80 3a 00 cmpb $0x0,(%edx)
8010472b: 74 0c je 80104739 <strlen+0x19>
8010472d: 8d 76 00 lea 0x0(%esi),%esi
80104730: 83 c0 01 add $0x1,%eax
80104733: 80 3c 02 00 cmpb $0x0,(%edx,%eax,1)
80104737: 75 f7 jne 80104730 <strlen+0x10>
;
return n;
}
80104739: 5d pop %ebp
8010473a: c3 ret
8010473b <swtch>:
8010473b: 8b 44 24 04 mov 0x4(%esp),%eax
8010473f: 8b 54 24 08 mov 0x8(%esp),%edx
80104743: 55 push %ebp
80104744: 53 push %ebx
80104745: 56 push %esi
80104746: 57 push %edi
80104747: 89 20 mov %esp,(%eax)
80104749: 89 d4 mov %edx,%esp
8010474b: 5f pop %edi
8010474c: 5e pop %esi
8010474d: 5b pop %ebx
8010474e: 5d pop %ebp
8010474f: c3 ret
80104750 <fetchint>:
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// Fetch the int at addr from the current process.
int
fetchint(uint addr, int *ip)
{
<<<<<<< HEAD
801049b0: 55 push %ebp
if(addr >= proc->sz || addr+4 > proc->sz)
801049b1: 65 8b 15 04 00 00 00 mov %gs:0x4,%edx
=======
if(addr >= proc->sz || addr+4 > proc->sz)
80104750: 65 8b 15 04 00 00 00 mov %gs:0x4,%edx
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// 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)
{
<<<<<<< HEAD
801049b8: 89 e5 mov %esp,%ebp
801049ba: 8b 45 08 mov 0x8(%ebp),%eax
if(addr >= proc->sz || addr+4 > proc->sz)
801049bd: 8b 12 mov (%edx),%edx
801049bf: 39 c2 cmp %eax,%edx
801049c1: 76 15 jbe 801049d8 <fetchint+0x28>
801049c3: 8d 48 04 lea 0x4(%eax),%ecx
801049c6: 39 ca cmp %ecx,%edx
801049c8: 72 0e jb 801049d8 <fetchint+0x28>
return -1;
*ip = *(int*)(addr);
801049ca: 8b 10 mov (%eax),%edx
801049cc: 8b 45 0c mov 0xc(%ebp),%eax
801049cf: 89 10 mov %edx,(%eax)
return 0;
801049d1: 31 c0 xor %eax,%eax
}
801049d3: 5d pop %ebp
801049d4: c3 ret
801049d5: 8d 76 00 lea 0x0(%esi),%esi
=======
80104757: 55 push %ebp
80104758: 89 e5 mov %esp,%ebp
8010475a: 8b 45 08 mov 0x8(%ebp),%eax
if(addr >= proc->sz || addr+4 > proc->sz)
8010475d: 8b 12 mov (%edx),%edx
8010475f: 39 c2 cmp %eax,%edx
80104761: 76 15 jbe 80104778 <fetchint+0x28>
80104763: 8d 48 04 lea 0x4(%eax),%ecx
80104766: 39 ca cmp %ecx,%edx
80104768: 72 0e jb 80104778 <fetchint+0x28>
return -1;
*ip = *(int*)(addr);
8010476a: 8b 10 mov (%eax),%edx
8010476c: 8b 45 0c mov 0xc(%ebp),%eax
8010476f: 89 10 mov %edx,(%eax)
return 0;
80104771: 31 c0 xor %eax,%eax
}
80104773: 5d pop %ebp
80104774: c3 ret
80104775: 8d 76 00 lea 0x0(%esi),%esi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// Fetch the int at addr from the current process.
int
fetchint(uint addr, int *ip)
{
if(addr >= proc->sz || addr+4 > proc->sz)
return -1;
<<<<<<< HEAD
801049d8: b8 ff ff ff ff mov $0xffffffff,%eax
*ip = *(int*)(addr);
return 0;
}
801049dd: 5d pop %ebp
801049de: c3 ret
801049df: 90 nop
801049e0 <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)
{
801049e0: 55 push %ebp
char *s, *ep;
if(addr >= proc->sz)
801049e1: 65 a1 04 00 00 00 mov %gs:0x4,%eax
=======
80104778: b8 ff ff ff ff mov $0xffffffff,%eax
*ip = *(int*)(addr);
return 0;
}
8010477d: 5d pop %ebp
8010477e: c3 ret
8010477f: 90 nop
80104780 <fetchstr>:
int
fetchstr(uint addr, char **pp)
{
char *s, *ep;
if(addr >= proc->sz)
80104780: 65 a1 04 00 00 00 mov %gs:0x4,%eax
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// 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)
{
<<<<<<< HEAD
801049e7: 89 e5 mov %esp,%ebp
801049e9: 8b 4d 08 mov 0x8(%ebp),%ecx
char *s, *ep;
if(addr >= proc->sz)
801049ec: 39 08 cmp %ecx,(%eax)
801049ee: 76 2c jbe 80104a1c <fetchstr+0x3c>
return -1;
*pp = (char*)addr;
801049f0: 8b 55 0c mov 0xc(%ebp),%edx
801049f3: 89 c8 mov %ecx,%eax
801049f5: 89 0a mov %ecx,(%edx)
ep = (char*)proc->sz;
801049f7: 65 8b 15 04 00 00 00 mov %gs:0x4,%edx
801049fe: 8b 12 mov (%edx),%edx
for(s = *pp; s < ep; s++)
80104a00: 39 d1 cmp %edx,%ecx
80104a02: 73 18 jae 80104a1c <fetchstr+0x3c>
if(*s == 0)
80104a04: 80 39 00 cmpb $0x0,(%ecx)
80104a07: 75 0c jne 80104a15 <fetchstr+0x35>
80104a09: eb 1d jmp 80104a28 <fetchstr+0x48>
80104a0b: 90 nop
80104a0c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104a10: 80 38 00 cmpb $0x0,(%eax)
80104a13: 74 13 je 80104a28 <fetchstr+0x48>
=======
80104786: 55 push %ebp
80104787: 89 e5 mov %esp,%ebp
80104789: 8b 4d 08 mov 0x8(%ebp),%ecx
char *s, *ep;
if(addr >= proc->sz)
8010478c: 39 08 cmp %ecx,(%eax)
8010478e: 76 2c jbe 801047bc <fetchstr+0x3c>
return -1;
*pp = (char*)addr;
80104790: 8b 55 0c mov 0xc(%ebp),%edx
80104793: 89 c8 mov %ecx,%eax
80104795: 89 0a mov %ecx,(%edx)
ep = (char*)proc->sz;
80104797: 65 8b 15 04 00 00 00 mov %gs:0x4,%edx
8010479e: 8b 12 mov (%edx),%edx
for(s = *pp; s < ep; s++)
801047a0: 39 d1 cmp %edx,%ecx
801047a2: 73 18 jae 801047bc <fetchstr+0x3c>
if(*s == 0)
801047a4: 80 39 00 cmpb $0x0,(%ecx)
801047a7: 75 0c jne 801047b5 <fetchstr+0x35>
801047a9: eb 1d jmp 801047c8 <fetchstr+0x48>
801047ab: 90 nop
801047ac: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801047b0: 80 38 00 cmpb $0x0,(%eax)
801047b3: 74 13 je 801047c8 <fetchstr+0x48>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
if(addr >= proc->sz)
return -1;
*pp = (char*)addr;
ep = (char*)proc->sz;
for(s = *pp; s < ep; s++)
<<<<<<< HEAD
80104a15: 83 c0 01 add $0x1,%eax
80104a18: 39 c2 cmp %eax,%edx
80104a1a: 77 f4 ja 80104a10 <fetchstr+0x30>
=======
801047b5: 83 c0 01 add $0x1,%eax
801047b8: 39 c2 cmp %eax,%edx
801047ba: 77 f4 ja 801047b0 <fetchstr+0x30>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
fetchstr(uint addr, char **pp)
{
char *s, *ep;
if(addr >= proc->sz)
return -1;
<<<<<<< HEAD
80104a1c: b8 ff ff ff ff mov $0xffffffff,%eax
=======
801047bc: b8 ff ff ff ff mov $0xffffffff,%eax
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
ep = (char*)proc->sz;
for(s = *pp; s < ep; s++)
if(*s == 0)
return s - *pp;
return -1;
}
<<<<<<< HEAD
80104a21: 5d pop %ebp
80104a22: c3 ret
80104a23: 90 nop
80104a24: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
=======
801047c1: 5d pop %ebp
801047c2: c3 ret
801047c3: 90 nop
801047c4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
return -1;
*pp = (char*)addr;
ep = (char*)proc->sz;
for(s = *pp; s < ep; s++)
if(*s == 0)
return s - *pp;
<<<<<<< HEAD
80104a28: 29 c8 sub %ecx,%eax
return -1;
}
80104a2a: 5d pop %ebp
80104a2b: c3 ret
80104a2c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104a30 <argint>:
=======
801047c8: 29 c8 sub %ecx,%eax
return -1;
}
801047ca: 5d pop %ebp
801047cb: c3 ret
801047cc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801047d0 <argint>:
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// Fetch the nth 32-bit system call argument.
int
argint(int n, int *ip)
{
return fetchint(proc->tf->esp + 4 + 4*n, ip);
<<<<<<< HEAD
80104a30: 65 8b 15 04 00 00 00 mov %gs:0x4,%edx
=======
801047d0: 65 8b 15 04 00 00 00 mov %gs:0x4,%edx
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
}
// Fetch the nth 32-bit system call argument.
int
argint(int n, int *ip)
{
<<<<<<< HEAD
80104a37: 55 push %ebp
80104a38: 89 e5 mov %esp,%ebp
return fetchint(proc->tf->esp + 4 + 4*n, ip);
80104a3a: 8b 42 18 mov 0x18(%edx),%eax
80104a3d: 8b 4d 08 mov 0x8(%ebp),%ecx
=======
801047d7: 55 push %ebp
801047d8: 89 e5 mov %esp,%ebp
return fetchint(proc->tf->esp + 4 + 4*n, ip);
801047da: 8b 4d 08 mov 0x8(%ebp),%ecx
801047dd: 8b 42 18 mov 0x18(%edx),%eax
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// Fetch the int at addr from the current process.
int
fetchint(uint addr, int *ip)
{
if(addr >= proc->sz || addr+4 > proc->sz)
<<<<<<< HEAD
80104a40: 8b 12 mov (%edx),%edx
=======
801047e0: 8b 12 mov (%edx),%edx
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// Fetch the nth 32-bit system call argument.
int
argint(int n, int *ip)
{
return fetchint(proc->tf->esp + 4 + 4*n, ip);
<<<<<<< HEAD
80104a42: 8b 40 44 mov 0x44(%eax),%eax
80104a45: 8d 04 88 lea (%eax,%ecx,4),%eax
80104a48: 8d 48 04 lea 0x4(%eax),%ecx
=======
801047e2: 8b 40 44 mov 0x44(%eax),%eax
801047e5: 8d 04 88 lea (%eax,%ecx,4),%eax
801047e8: 8d 48 04 lea 0x4(%eax),%ecx
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// Fetch the int at addr from the current process.
int
fetchint(uint addr, int *ip)
{
if(addr >= proc->sz || addr+4 > proc->sz)
<<<<<<< HEAD
80104a4b: 39 d1 cmp %edx,%ecx
80104a4d: 73 19 jae 80104a68 <argint+0x38>
80104a4f: 8d 48 08 lea 0x8(%eax),%ecx
80104a52: 39 ca cmp %ecx,%edx
80104a54: 72 12 jb 80104a68 <argint+0x38>
return -1;
*ip = *(int*)(addr);
80104a56: 8b 50 04 mov 0x4(%eax),%edx
80104a59: 8b 45 0c mov 0xc(%ebp),%eax
80104a5c: 89 10 mov %edx,(%eax)
return 0;
80104a5e: 31 c0 xor %eax,%eax
=======
801047eb: 39 d1 cmp %edx,%ecx
801047ed: 73 19 jae 80104808 <argint+0x38>
801047ef: 8d 48 08 lea 0x8(%eax),%ecx
801047f2: 39 ca cmp %ecx,%edx
801047f4: 72 12 jb 80104808 <argint+0x38>
return -1;
*ip = *(int*)(addr);
801047f6: 8b 50 04 mov 0x4(%eax),%edx
801047f9: 8b 45 0c mov 0xc(%ebp),%eax
801047fc: 89 10 mov %edx,(%eax)
return 0;
801047fe: 31 c0 xor %eax,%eax
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// Fetch the nth 32-bit system call argument.
int
argint(int n, int *ip)
{
return fetchint(proc->tf->esp + 4 + 4*n, ip);
}
<<<<<<< HEAD
80104a60: 5d pop %ebp
80104a61: c3 ret
80104a62: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
=======
80104800: 5d pop %ebp
80104801: c3 ret
80104802: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// Fetch the int at addr from the current process.
int
fetchint(uint addr, int *ip)
{
if(addr >= proc->sz || addr+4 > proc->sz)
return -1;
<<<<<<< HEAD
80104a68: b8 ff ff ff ff mov $0xffffffff,%eax
=======
80104808: b8 ff ff ff ff mov $0xffffffff,%eax
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// Fetch the nth 32-bit system call argument.
int
argint(int n, int *ip)
{
return fetchint(proc->tf->esp + 4 + 4*n, ip);
}
<<<<<<< HEAD
80104a6d: 5d pop %ebp
80104a6e: c3 ret
80104a6f: 90 nop
80104a70 <argptr>:
// Fetch the nth 32-bit system call argument.
int
argint(int n, int *ip)
{
return fetchint(proc->tf->esp + 4 + 4*n, ip);
80104a70: 65 a1 04 00 00 00 mov %gs:0x4,%eax
// Fetch the nth word-sized system call argument as a pointer
// to a block of memory of size bytes. Check that the pointer
// lies within the process address space.
int
argptr(int n, char **pp, int size)
{
80104a76: 55 push %ebp
80104a77: 89 e5 mov %esp,%ebp
80104a79: 56 push %esi
80104a7a: 53 push %ebx
=======
8010480d: 5d pop %ebp
8010480e: c3 ret
8010480f: 90 nop
80104810 <argptr>:
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// Fetch the nth 32-bit system call argument.
int
argint(int n, int *ip)
{
return fetchint(proc->tf->esp + 4 + 4*n, ip);
<<<<<<< HEAD
80104a7b: 8b 48 18 mov 0x18(%eax),%ecx
80104a7e: 8b 5d 08 mov 0x8(%ebp),%ebx
=======
80104810: 65 a1 04 00 00 00 mov %gs:0x4,%eax
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// Fetch the nth word-sized system call argument as a pointer
// to a block of memory of size bytes. Check that the pointer
// lies within the process address space.
int
argptr(int n, char **pp, int size)
{
<<<<<<< HEAD
80104a81: 8b 55 10 mov 0x10(%ebp),%edx
=======
80104816: 55 push %ebp
80104817: 89 e5 mov %esp,%ebp
80104819: 53 push %ebx
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// Fetch the nth 32-bit system call argument.
int
argint(int n, int *ip)
{
return fetchint(proc->tf->esp + 4 + 4*n, ip);
<<<<<<< HEAD
80104a84: 8b 49 44 mov 0x44(%ecx),%ecx
80104a87: 8d 1c 99 lea (%ecx,%ebx,4),%ebx
=======
8010481a: 8b 4d 08 mov 0x8(%ebp),%ecx
8010481d: 8b 50 18 mov 0x18(%eax),%edx
80104820: 8b 52 44 mov 0x44(%edx),%edx
80104823: 8d 0c 8a lea (%edx,%ecx,4),%ecx
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// Fetch the int at addr from the current process.
int
fetchint(uint addr, int *ip)
{
if(addr >= proc->sz || addr+4 > proc->sz)
<<<<<<< HEAD
80104a8a: 8b 08 mov (%eax),%ecx
=======
80104826: 8b 10 mov (%eax),%edx
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
argptr(int n, char **pp, int size)
{
int i;
if(argint(n, &i) < 0)
return -1;
<<<<<<< HEAD
80104a8c: b8 ff ff ff ff mov $0xffffffff,%eax
=======
80104828: b8 ff ff ff ff mov $0xffffffff,%eax
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// Fetch the nth 32-bit system call argument.
int
argint(int n, int *ip)
{
return fetchint(proc->tf->esp + 4 + 4*n, ip);
<<<<<<< HEAD
80104a91: 8d 73 04 lea 0x4(%ebx),%esi
=======
8010482d: 8d 59 04 lea 0x4(%ecx),%ebx
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// Fetch the int at addr from the current process.
int
fetchint(uint addr, int *ip)
{
if(addr >= proc->sz || addr+4 > proc->sz)
<<<<<<< HEAD
80104a94: 39 ce cmp %ecx,%esi
80104a96: 73 1f jae 80104ab7 <argptr+0x47>
80104a98: 8d 73 08 lea 0x8(%ebx),%esi
80104a9b: 39 f1 cmp %esi,%ecx
80104a9d: 72 18 jb 80104ab7 <argptr+0x47>
=======
80104830: 39 d3 cmp %edx,%ebx
80104832: 73 25 jae 80104859 <argptr+0x49>
80104834: 8d 59 08 lea 0x8(%ecx),%ebx
80104837: 39 da cmp %ebx,%edx
80104839: 72 1e jb 80104859 <argptr+0x49>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
{
int i;
if(argint(n, &i) < 0)
return -1;
if(size < 0 || (uint)i >= proc->sz || (uint)i+size > proc->sz)
<<<<<<< HEAD
80104a9f: 85 d2 test %edx,%edx
=======
8010483b: 8b 5d 10 mov 0x10(%ebp),%ebx
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
int
fetchint(uint addr, int *ip)
{
if(addr >= proc->sz || addr+4 > proc->sz)
return -1;
*ip = *(int*)(addr);
<<<<<<< HEAD
80104aa1: 8b 5b 04 mov 0x4(%ebx),%ebx
=======
8010483e: 8b 49 04 mov 0x4(%ecx),%ecx
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
{
int i;
if(argint(n, &i) < 0)
return -1;
if(size < 0 || (uint)i >= proc->sz || (uint)i+size > proc->sz)
<<<<<<< HEAD
80104aa4: 78 11 js 80104ab7 <argptr+0x47>
80104aa6: 39 cb cmp %ecx,%ebx
80104aa8: 73 0d jae 80104ab7 <argptr+0x47>
80104aaa: 01 da add %ebx,%edx
80104aac: 39 ca cmp %ecx,%edx
80104aae: 77 07 ja 80104ab7 <argptr+0x47>
return -1;
*pp = (char*)i;
80104ab0: 8b 45 0c mov 0xc(%ebp),%eax
80104ab3: 89 18 mov %ebx,(%eax)
return 0;
80104ab5: 31 c0 xor %eax,%eax
}
80104ab7: 5b pop %ebx
80104ab8: 5e pop %esi
80104ab9: 5d pop %ebp
80104aba: c3 ret
80104abb: 90 nop
80104abc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104ac0 <argstr>:
=======
80104841: 85 db test %ebx,%ebx
80104843: 78 14 js 80104859 <argptr+0x49>
80104845: 39 d1 cmp %edx,%ecx
80104847: 73 10 jae 80104859 <argptr+0x49>
80104849: 8b 5d 10 mov 0x10(%ebp),%ebx
8010484c: 01 cb add %ecx,%ebx
8010484e: 39 d3 cmp %edx,%ebx
80104850: 77 07 ja 80104859 <argptr+0x49>
return -1;
*pp = (char*)i;
80104852: 8b 45 0c mov 0xc(%ebp),%eax
80104855: 89 08 mov %ecx,(%eax)
return 0;
80104857: 31 c0 xor %eax,%eax
}
80104859: 5b pop %ebx
8010485a: 5d pop %ebp
8010485b: c3 ret
8010485c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104860 <argstr>:
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// Fetch the nth 32-bit system call argument.
int
argint(int n, int *ip)
{
return fetchint(proc->tf->esp + 4 + 4*n, ip);
<<<<<<< HEAD
80104ac0: 65 a1 04 00 00 00 mov %gs:0x4,%eax
=======
80104860: 65 a1 04 00 00 00 mov %gs:0x4,%eax
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// 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)
{
<<<<<<< HEAD
80104ac6: 55 push %ebp
80104ac7: 89 e5 mov %esp,%ebp
=======
80104866: 55 push %ebp
80104867: 89 e5 mov %esp,%ebp
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// Fetch the nth 32-bit system call argument.
int
argint(int n, int *ip)
{
return fetchint(proc->tf->esp + 4 + 4*n, ip);
<<<<<<< HEAD
80104ac9: 8b 50 18 mov 0x18(%eax),%edx
80104acc: 8b 4d 08 mov 0x8(%ebp),%ecx
=======
80104869: 8b 4d 08 mov 0x8(%ebp),%ecx
8010486c: 8b 50 18 mov 0x18(%eax),%edx
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// Fetch the int at addr from the current process.
int
fetchint(uint addr, int *ip)
{
if(addr >= proc->sz || addr+4 > proc->sz)
<<<<<<< HEAD
80104acf: 8b 00 mov (%eax),%eax
=======
8010486f: 8b 00 mov (%eax),%eax
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// Fetch the nth 32-bit system call argument.
int
argint(int n, int *ip)
{
return fetchint(proc->tf->esp + 4 + 4*n, ip);
<<<<<<< HEAD
80104ad1: 8b 52 44 mov 0x44(%edx),%edx
80104ad4: 8d 14 8a lea (%edx,%ecx,4),%edx
80104ad7: 8d 4a 04 lea 0x4(%edx),%ecx
=======
80104871: 8b 52 44 mov 0x44(%edx),%edx
80104874: 8d 14 8a lea (%edx,%ecx,4),%edx
80104877: 8d 4a 04 lea 0x4(%edx),%ecx
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// Fetch the int at addr from the current process.
int
fetchint(uint addr, int *ip)
{
if(addr >= proc->sz || addr+4 > proc->sz)
<<<<<<< HEAD
80104ada: 39 c1 cmp %eax,%ecx
80104adc: 73 07 jae 80104ae5 <argstr+0x25>
80104ade: 8d 4a 08 lea 0x8(%edx),%ecx
80104ae1: 39 c8 cmp %ecx,%eax
80104ae3: 73 0b jae 80104af0 <argstr+0x30>
=======
8010487a: 39 c1 cmp %eax,%ecx
8010487c: 73 07 jae 80104885 <argstr+0x25>
8010487e: 8d 4a 08 lea 0x8(%edx),%ecx
80104881: 39 c8 cmp %ecx,%eax
80104883: 73 0b jae 80104890 <argstr+0x30>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
int
argstr(int n, char **pp)
{
int addr;
if(argint(n, &addr) < 0)
return -1;
<<<<<<< HEAD
80104ae5: b8 ff ff ff ff mov $0xffffffff,%eax
return fetchstr(addr, pp);
}
80104aea: 5d pop %ebp
80104aeb: c3 ret
80104aec: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
=======
80104885: b8 ff ff ff ff mov $0xffffffff,%eax
return fetchstr(addr, pp);
}
8010488a: 5d pop %ebp
8010488b: c3 ret
8010488c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
int
fetchint(uint addr, int *ip)
{
if(addr >= proc->sz || addr+4 > proc->sz)
return -1;
*ip = *(int*)(addr);
<<<<<<< HEAD
80104af0: 8b 4a 04 mov 0x4(%edx),%ecx
=======
80104890: 8b 4a 04 mov 0x4(%edx),%ecx
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
int
fetchstr(uint addr, char **pp)
{
char *s, *ep;
if(addr >= proc->sz)
<<<<<<< HEAD
80104af3: 39 c1 cmp %eax,%ecx
80104af5: 73 ee jae 80104ae5 <argstr+0x25>
return -1;
*pp = (char*)addr;
80104af7: 8b 55 0c mov 0xc(%ebp),%edx
80104afa: 89 c8 mov %ecx,%eax
80104afc: 89 0a mov %ecx,(%edx)
ep = (char*)proc->sz;
80104afe: 65 8b 15 04 00 00 00 mov %gs:0x4,%edx
80104b05: 8b 12 mov (%edx),%edx
for(s = *pp; s < ep; s++)
80104b07: 39 d1 cmp %edx,%ecx
80104b09: 73 da jae 80104ae5 <argstr+0x25>
if(*s == 0)
80104b0b: 80 39 00 cmpb $0x0,(%ecx)
80104b0e: 75 0d jne 80104b1d <argstr+0x5d>
80104b10: eb 1e jmp 80104b30 <argstr+0x70>
80104b12: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80104b18: 80 38 00 cmpb $0x0,(%eax)
80104b1b: 74 13 je 80104b30 <argstr+0x70>
=======
80104893: 39 c1 cmp %eax,%ecx
80104895: 73 ee jae 80104885 <argstr+0x25>
return -1;
*pp = (char*)addr;
80104897: 8b 55 0c mov 0xc(%ebp),%edx
8010489a: 89 c8 mov %ecx,%eax
8010489c: 89 0a mov %ecx,(%edx)
ep = (char*)proc->sz;
8010489e: 65 8b 15 04 00 00 00 mov %gs:0x4,%edx
801048a5: 8b 12 mov (%edx),%edx
for(s = *pp; s < ep; s++)
801048a7: 39 d1 cmp %edx,%ecx
801048a9: 73 da jae 80104885 <argstr+0x25>
if(*s == 0)
801048ab: 80 39 00 cmpb $0x0,(%ecx)
801048ae: 75 12 jne 801048c2 <argstr+0x62>
801048b0: eb 1e jmp 801048d0 <argstr+0x70>
801048b2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801048b8: 80 38 00 cmpb $0x0,(%eax)
801048bb: 90 nop
801048bc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801048c0: 74 0e je 801048d0 <argstr+0x70>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
if(addr >= proc->sz)
return -1;
*pp = (char*)addr;
ep = (char*)proc->sz;
for(s = *pp; s < ep; s++)
<<<<<<< HEAD
80104b1d: 83 c0 01 add $0x1,%eax
80104b20: 39 c2 cmp %eax,%edx
80104b22: 77 f4 ja 80104b18 <argstr+0x58>
80104b24: eb bf jmp 80104ae5 <argstr+0x25>
80104b26: 8d 76 00 lea 0x0(%esi),%esi
80104b29: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
if(*s == 0)
return s - *pp;
80104b30: 29 c8 sub %ecx,%eax
=======
801048c2: 83 c0 01 add $0x1,%eax
801048c5: 39 c2 cmp %eax,%edx
801048c7: 77 ef ja 801048b8 <argstr+0x58>
801048c9: eb ba jmp 80104885 <argstr+0x25>
801048cb: 90 nop
801048cc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if(*s == 0)
return s - *pp;
801048d0: 29 c8 sub %ecx,%eax
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
{
int addr;
if(argint(n, &addr) < 0)
return -1;
return fetchstr(addr, pp);
}
<<<<<<< HEAD
80104b32: 5d pop %ebp
80104b33: c3 ret
80104b34: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80104b3a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
80104b40 <syscall>:
=======
801048d2: 5d pop %ebp
801048d3: c3 ret
801048d4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801048da: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
801048e0 <syscall>:
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
[SYS_setseed] sys_setseed,
};
void
syscall(void)
{
<<<<<<< HEAD
80104b40: 55 push %ebp
80104b41: 89 e5 mov %esp,%ebp
80104b43: 53 push %ebx
80104b44: 83 ec 04 sub $0x4,%esp
int num;
num = proc->tf->eax;
80104b47: 65 8b 15 04 00 00 00 mov %gs:0x4,%edx
80104b4e: 8b 5a 18 mov 0x18(%edx),%ebx
80104b51: 8b 43 1c mov 0x1c(%ebx),%eax
if(num > 0 && num < NELEM(syscalls) && syscalls[num]) {
80104b54: 8d 48 ff lea -0x1(%eax),%ecx
80104b57: 83 f9 18 cmp $0x18,%ecx
80104b5a: 77 1c ja 80104b78 <syscall+0x38>
80104b5c: 8b 0c 85 40 7a 10 80 mov -0x7fef85c0(,%eax,4),%ecx
80104b63: 85 c9 test %ecx,%ecx
80104b65: 74 11 je 80104b78 <syscall+0x38>
proc->tf->eax = syscalls[num]();
80104b67: ff d1 call *%ecx
80104b69: 89 43 1c mov %eax,0x1c(%ebx)
=======
801048e0: 55 push %ebp
801048e1: 89 e5 mov %esp,%ebp
801048e3: 53 push %ebx
801048e4: 83 ec 14 sub $0x14,%esp
int num;
num = proc->tf->eax;
801048e7: 65 8b 15 04 00 00 00 mov %gs:0x4,%edx
801048ee: 8b 5a 18 mov 0x18(%edx),%ebx
801048f1: 8b 43 1c mov 0x1c(%ebx),%eax
if(num > 0 && num < NELEM(syscalls) && syscalls[num]) {
801048f4: 8d 48 ff lea -0x1(%eax),%ecx
801048f7: 83 f9 18 cmp $0x18,%ecx
801048fa: 77 1c ja 80104918 <syscall+0x38>
801048fc: 8b 0c 85 e0 77 10 80 mov -0x7fef8820(,%eax,4),%ecx
80104903: 85 c9 test %ecx,%ecx
80104905: 74 11 je 80104918 <syscall+0x38>
proc->tf->eax = syscalls[num]();
80104907: ff d1 call *%ecx
80104909: 89 43 1c mov %eax,0x1c(%ebx)
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
} else {
cprintf("%d %s: unknown sys call %d\n",
proc->pid, proc->name, num);
proc->tf->eax = -1;
}
}
<<<<<<< HEAD
80104b6c: 8b 5d fc mov -0x4(%ebp),%ebx
80104b6f: c9 leave
80104b70: c3 ret
80104b71: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
=======
8010490c: 83 c4 14 add $0x14,%esp
8010490f: 5b pop %ebx
80104910: 5d pop %ebp
80104911: c3 ret
80104912: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
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",
<<<<<<< HEAD
80104b78: 50 push %eax
proc->pid, proc->name, num);
80104b79: 8d 42 6c lea 0x6c(%edx),%eax
=======
80104918: 89 44 24 0c mov %eax,0xc(%esp)
proc->pid, proc->name, num);
8010491c: 8d 42 6c lea 0x6c(%edx),%eax
8010491f: 89 44 24 08 mov %eax,0x8(%esp)
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
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",
<<<<<<< HEAD
80104b7c: 50 push %eax
80104b7d: ff 72 10 pushl 0x10(%edx)
80104b80: 68 21 7a 10 80 push $0x80107a21
80104b85: e8 d6 ba ff ff call 80100660 <cprintf>
proc->pid, proc->name, num);
proc->tf->eax = -1;
80104b8a: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80104b90: 83 c4 10 add $0x10,%esp
80104b93: 8b 40 18 mov 0x18(%eax),%eax
80104b96: c7 40 1c ff ff ff ff movl $0xffffffff,0x1c(%eax)
}
}
80104b9d: 8b 5d fc mov -0x4(%ebp),%ebx
80104ba0: c9 leave
80104ba1: c3 ret
80104ba2: 66 90 xchg %ax,%ax
80104ba4: 66 90 xchg %ax,%ax
80104ba6: 66 90 xchg %ax,%ax
80104ba8: 66 90 xchg %ax,%ax
80104baa: 66 90 xchg %ax,%ax
80104bac: 66 90 xchg %ax,%ax
80104bae: 66 90 xchg %ax,%ax
80104bb0 <create>:
return -1;
}
static struct inode*
create(char *path, short type, short major, short minor)
{
80104bb0: 55 push %ebp
80104bb1: 89 e5 mov %esp,%ebp
80104bb3: 57 push %edi
80104bb4: 56 push %esi
80104bb5: 53 push %ebx
uint off;
struct inode *ip, *dp;
char name[DIRSIZ];
if((dp = nameiparent(path, name)) == 0)
80104bb6: 8d 75 da lea -0x26(%ebp),%esi
return -1;
}
static struct inode*
create(char *path, short type, short major, short minor)
{
80104bb9: 83 ec 44 sub $0x44,%esp
80104bbc: 89 4d c0 mov %ecx,-0x40(%ebp)
80104bbf: 8b 4d 08 mov 0x8(%ebp),%ecx
uint off;
struct inode *ip, *dp;
char name[DIRSIZ];
if((dp = nameiparent(path, name)) == 0)
80104bc2: 56 push %esi
80104bc3: 50 push %eax
return -1;
=======
80104923: 8b 42 10 mov 0x10(%edx),%eax
80104926: c7 04 24 b1 77 10 80 movl $0x801077b1,(%esp)
8010492d: 89 44 24 04 mov %eax,0x4(%esp)
80104931: e8 1a bd ff ff call 80100650 <cprintf>
proc->pid, proc->name, num);
proc->tf->eax = -1;
80104936: 65 a1 04 00 00 00 mov %gs:0x4,%eax
8010493c: 8b 40 18 mov 0x18(%eax),%eax
8010493f: c7 40 1c ff ff ff ff movl $0xffffffff,0x1c(%eax)
}
}
80104946: 83 c4 14 add $0x14,%esp
80104949: 5b pop %ebx
8010494a: 5d pop %ebp
8010494b: c3 ret
8010494c: 66 90 xchg %ax,%ax
8010494e: 66 90 xchg %ax,%ax
80104950 <create>:
80104950: 55 push %ebp
80104951: 89 e5 mov %esp,%ebp
80104953: 57 push %edi
80104954: 56 push %esi
80104955: 53 push %ebx
80104956: 8d 75 da lea -0x26(%ebp),%esi
80104959: 83 ec 44 sub $0x44,%esp
8010495c: 89 4d c0 mov %ecx,-0x40(%ebp)
8010495f: 8b 4d 08 mov 0x8(%ebp),%ecx
80104962: 56 push %esi
80104963: 50 push %eax
80104964: 89 55 c4 mov %edx,-0x3c(%ebp)
80104967: 89 4d bc mov %ecx,-0x44(%ebp)
8010496a: e8 91 d5 ff ff call 80101f00 <nameiparent>
8010496f: 83 c4 10 add $0x10,%esp
80104972: 85 c0 test %eax,%eax
80104974: 0f 84 f6 00 00 00 je 80104a70 <create+0x120>
8010497a: 83 ec 0c sub $0xc,%esp
8010497d: 89 c7 mov %eax,%edi
8010497f: 50 push %eax
80104980: e8 2b cd ff ff call 801016b0 <ilock>
80104985: 8d 45 d4 lea -0x2c(%ebp),%eax
80104988: 83 c4 0c add $0xc,%esp
8010498b: 50 push %eax
8010498c: 56 push %esi
8010498d: 57 push %edi
8010498e: e8 0d d2 ff ff call 80101ba0 <dirlookup>
80104993: 83 c4 10 add $0x10,%esp
80104996: 85 c0 test %eax,%eax
80104998: 89 c3 mov %eax,%ebx
8010499a: 74 54 je 801049f0 <create+0xa0>
8010499c: 83 ec 0c sub $0xc,%esp
8010499f: 57 push %edi
801049a0: e8 4b cf ff ff call 801018f0 <iunlockput>
801049a5: 89 1c 24 mov %ebx,(%esp)
801049a8: e8 03 cd ff ff call 801016b0 <ilock>
801049ad: 83 c4 10 add $0x10,%esp
801049b0: 66 83 7d c4 02 cmpw $0x2,-0x3c(%ebp)
801049b5: 75 19 jne 801049d0 <create+0x80>
801049b7: 66 83 7b 50 02 cmpw $0x2,0x50(%ebx)
801049bc: 89 d8 mov %ebx,%eax
801049be: 75 10 jne 801049d0 <create+0x80>
801049c0: 8d 65 f4 lea -0xc(%ebp),%esp
801049c3: 5b pop %ebx
801049c4: 5e pop %esi
801049c5: 5f pop %edi
801049c6: 5d pop %ebp
801049c7: c3 ret
801049c8: 90 nop
801049c9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801049d0: 83 ec 0c sub $0xc,%esp
801049d3: 53 push %ebx
801049d4: e8 17 cf ff ff call 801018f0 <iunlockput>
801049d9: 83 c4 10 add $0x10,%esp
801049dc: 8d 65 f4 lea -0xc(%ebp),%esp
801049df: 31 c0 xor %eax,%eax
801049e1: 5b pop %ebx
801049e2: 5e pop %esi
801049e3: 5f pop %edi
801049e4: 5d pop %ebp
801049e5: c3 ret
801049e6: 8d 76 00 lea 0x0(%esi),%esi
801049e9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801049f0: 0f bf 45 c4 movswl -0x3c(%ebp),%eax
801049f4: 83 ec 08 sub $0x8,%esp
801049f7: 50 push %eax
801049f8: ff 37 pushl (%edi)
801049fa: e8 21 cb ff ff call 80101520 <ialloc>
801049ff: 83 c4 10 add $0x10,%esp
80104a02: 85 c0 test %eax,%eax
80104a04: 89 c3 mov %eax,%ebx
80104a06: 0f 84 cc 00 00 00 je 80104ad8 <create+0x188>
80104a0c: 83 ec 0c sub $0xc,%esp
80104a0f: 50 push %eax
80104a10: e8 9b cc ff ff call 801016b0 <ilock>
80104a15: 0f b7 45 c0 movzwl -0x40(%ebp),%eax
80104a19: 66 89 43 52 mov %ax,0x52(%ebx)
80104a1d: 0f b7 45 bc movzwl -0x44(%ebp),%eax
80104a21: 66 89 43 54 mov %ax,0x54(%ebx)
80104a25: b8 01 00 00 00 mov $0x1,%eax
80104a2a: 66 89 43 56 mov %ax,0x56(%ebx)
80104a2e: 89 1c 24 mov %ebx,(%esp)
80104a31: e8 ba cb ff ff call 801015f0 <iupdate>
80104a36: 83 c4 10 add $0x10,%esp
80104a39: 66 83 7d c4 01 cmpw $0x1,-0x3c(%ebp)
80104a3e: 74 40 je 80104a80 <create+0x130>
80104a40: 83 ec 04 sub $0x4,%esp
80104a43: ff 73 04 pushl 0x4(%ebx)
80104a46: 56 push %esi
80104a47: 57 push %edi
80104a48: e8 b3 d3 ff ff call 80101e00 <dirlink>
80104a4d: 83 c4 10 add $0x10,%esp
80104a50: 85 c0 test %eax,%eax
80104a52: 78 77 js 80104acb <create+0x17b>
80104a54: 83 ec 0c sub $0xc,%esp
80104a57: 57 push %edi
80104a58: e8 93 ce ff ff call 801018f0 <iunlockput>
80104a5d: 83 c4 10 add $0x10,%esp
80104a60: 8d 65 f4 lea -0xc(%ebp),%esp
80104a63: 89 d8 mov %ebx,%eax
80104a65: 5b pop %ebx
80104a66: 5e pop %esi
80104a67: 5f pop %edi
80104a68: 5d pop %ebp
80104a69: c3 ret
80104a6a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80104a70: 31 c0 xor %eax,%eax
80104a72: e9 49 ff ff ff jmp 801049c0 <create+0x70>
80104a77: 89 f6 mov %esi,%esi
80104a79: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104a80: 66 83 47 56 01 addw $0x1,0x56(%edi)
80104a85: 83 ec 0c sub $0xc,%esp
80104a88: 57 push %edi
80104a89: e8 62 cb ff ff call 801015f0 <iupdate>
80104a8e: 83 c4 0c add $0xc,%esp
80104a91: ff 73 04 pushl 0x4(%ebx)
80104a94: 68 64 78 10 80 push $0x80107864
80104a99: 53 push %ebx
80104a9a: e8 61 d3 ff ff call 80101e00 <dirlink>
80104a9f: 83 c4 10 add $0x10,%esp
80104aa2: 85 c0 test %eax,%eax
80104aa4: 78 18 js 80104abe <create+0x16e>
80104aa6: 83 ec 04 sub $0x4,%esp
80104aa9: ff 77 04 pushl 0x4(%edi)
80104aac: 68 63 78 10 80 push $0x80107863
80104ab1: 53 push %ebx
80104ab2: e8 49 d3 ff ff call 80101e00 <dirlink>
80104ab7: 83 c4 10 add $0x10,%esp
80104aba: 85 c0 test %eax,%eax
80104abc: 79 82 jns 80104a40 <create+0xf0>
80104abe: 83 ec 0c sub $0xc,%esp
80104ac1: 68 57 78 10 80 push $0x80107857
80104ac6: e8 95 b8 ff ff call 80100360 <panic>
80104acb: 83 ec 0c sub $0xc,%esp
80104ace: 68 66 78 10 80 push $0x80107866
80104ad3: e8 88 b8 ff ff call 80100360 <panic>
80104ad8: 83 ec 0c sub $0xc,%esp
80104adb: 68 48 78 10 80 push $0x80107848
80104ae0: e8 7b b8 ff ff call 80100360 <panic>
80104ae5: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104ae9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104af0 <argfd.constprop.0>:
80104af0: 55 push %ebp
80104af1: 89 e5 mov %esp,%ebp
80104af3: 56 push %esi
80104af4: 53 push %ebx
80104af5: 89 c6 mov %eax,%esi
80104af7: 8d 45 f4 lea -0xc(%ebp),%eax
80104afa: 89 d3 mov %edx,%ebx
80104afc: 83 ec 18 sub $0x18,%esp
80104aff: 50 push %eax
80104b00: 6a 00 push $0x0
80104b02: e8 c9 fc ff ff call 801047d0 <argint>
80104b07: 83 c4 10 add $0x10,%esp
80104b0a: 85 c0 test %eax,%eax
80104b0c: 78 3a js 80104b48 <argfd.constprop.0+0x58>
80104b0e: 8b 45 f4 mov -0xc(%ebp),%eax
80104b11: 83 f8 0f cmp $0xf,%eax
80104b14: 77 32 ja 80104b48 <argfd.constprop.0+0x58>
80104b16: 65 8b 15 04 00 00 00 mov %gs:0x4,%edx
80104b1d: 8b 54 82 28 mov 0x28(%edx,%eax,4),%edx
80104b21: 85 d2 test %edx,%edx
80104b23: 74 23 je 80104b48 <argfd.constprop.0+0x58>
80104b25: 85 f6 test %esi,%esi
80104b27: 74 02 je 80104b2b <argfd.constprop.0+0x3b>
80104b29: 89 06 mov %eax,(%esi)
80104b2b: 85 db test %ebx,%ebx
80104b2d: 74 11 je 80104b40 <argfd.constprop.0+0x50>
80104b2f: 89 13 mov %edx,(%ebx)
80104b31: 31 c0 xor %eax,%eax
80104b33: 8d 65 f8 lea -0x8(%ebp),%esp
80104b36: 5b pop %ebx
80104b37: 5e pop %esi
80104b38: 5d pop %ebp
80104b39: c3 ret
80104b3a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80104b40: 31 c0 xor %eax,%eax
80104b42: eb ef jmp 80104b33 <argfd.constprop.0+0x43>
80104b44: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104b48: b8 ff ff ff ff mov $0xffffffff,%eax
80104b4d: eb e4 jmp 80104b33 <argfd.constprop.0+0x43>
80104b4f: 90 nop
80104b50 <sys_dup>:
80104b50: 55 push %ebp
80104b51: 31 c0 xor %eax,%eax
80104b53: 89 e5 mov %esp,%ebp
80104b55: 53 push %ebx
80104b56: 8d 55 f4 lea -0xc(%ebp),%edx
80104b59: 83 ec 14 sub $0x14,%esp
80104b5c: e8 8f ff ff ff call 80104af0 <argfd.constprop.0>
80104b61: 85 c0 test %eax,%eax
80104b63: 78 1b js 80104b80 <sys_dup+0x30>
80104b65: 8b 55 f4 mov -0xc(%ebp),%edx
80104b68: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80104b6e: 31 db xor %ebx,%ebx
80104b70: 8b 4c 98 28 mov 0x28(%eax,%ebx,4),%ecx
80104b74: 85 c9 test %ecx,%ecx
80104b76: 74 18 je 80104b90 <sys_dup+0x40>
80104b78: 83 c3 01 add $0x1,%ebx
80104b7b: 83 fb 10 cmp $0x10,%ebx
80104b7e: 75 f0 jne 80104b70 <sys_dup+0x20>
80104b80: b8 ff ff ff ff mov $0xffffffff,%eax
80104b85: 8b 5d fc mov -0x4(%ebp),%ebx
80104b88: c9 leave
80104b89: c3 ret
80104b8a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80104b90: 83 ec 0c sub $0xc,%esp
80104b93: 89 54 98 28 mov %edx,0x28(%eax,%ebx,4)
80104b97: 52 push %edx
80104b98: e8 33 c2 ff ff call 80100dd0 <filedup>
80104b9d: 89 d8 mov %ebx,%eax
80104b9f: 83 c4 10 add $0x10,%esp
80104ba2: 8b 5d fc mov -0x4(%ebp),%ebx
80104ba5: c9 leave
80104ba6: c3 ret
80104ba7: 89 f6 mov %esi,%esi
80104ba9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104bb0 <sys_read>:
80104bb0: 55 push %ebp
80104bb1: 31 c0 xor %eax,%eax
80104bb3: 89 e5 mov %esp,%ebp
80104bb5: 83 ec 18 sub $0x18,%esp
80104bb8: 8d 55 ec lea -0x14(%ebp),%edx
80104bbb: e8 30 ff ff ff call 80104af0 <argfd.constprop.0>
80104bc0: 85 c0 test %eax,%eax
80104bc2: 78 4c js 80104c10 <sys_read+0x60>
80104bc4: 8d 45 f0 lea -0x10(%ebp),%eax
80104bc7: 83 ec 08 sub $0x8,%esp
80104bca: 50 push %eax
80104bcb: 6a 02 push $0x2
80104bcd: e8 fe fb ff ff call 801047d0 <argint>
80104bd2: 83 c4 10 add $0x10,%esp
80104bd5: 85 c0 test %eax,%eax
80104bd7: 78 37 js 80104c10 <sys_read+0x60>
80104bd9: 8d 45 f4 lea -0xc(%ebp),%eax
80104bdc: 83 ec 04 sub $0x4,%esp
80104bdf: ff 75 f0 pushl -0x10(%ebp)
80104be2: 50 push %eax
80104be3: 6a 01 push $0x1
80104be5: e8 26 fc ff ff call 80104810 <argptr>
80104bea: 83 c4 10 add $0x10,%esp
80104bed: 85 c0 test %eax,%eax
80104bef: 78 1f js 80104c10 <sys_read+0x60>
80104bf1: 83 ec 04 sub $0x4,%esp
80104bf4: ff 75 f0 pushl -0x10(%ebp)
80104bf7: ff 75 f4 pushl -0xc(%ebp)
80104bfa: ff 75 ec pushl -0x14(%ebp)
80104bfd: e8 2e c3 ff ff call 80100f30 <fileread>
80104c02: 83 c4 10 add $0x10,%esp
80104c05: c9 leave
80104c06: c3 ret
80104c07: 89 f6 mov %esi,%esi
80104c09: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104c10: b8 ff ff ff ff mov $0xffffffff,%eax
80104c15: c9 leave
80104c16: c3 ret
80104c17: 89 f6 mov %esi,%esi
80104c19: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104c20 <sys_write>:
80104c20: 55 push %ebp
80104c21: 31 c0 xor %eax,%eax
80104c23: 89 e5 mov %esp,%ebp
80104c25: 83 ec 18 sub $0x18,%esp
80104c28: 8d 55 ec lea -0x14(%ebp),%edx
80104c2b: e8 c0 fe ff ff call 80104af0 <argfd.constprop.0>
80104c30: 85 c0 test %eax,%eax
80104c32: 78 4c js 80104c80 <sys_write+0x60>
80104c34: 8d 45 f0 lea -0x10(%ebp),%eax
80104c37: 83 ec 08 sub $0x8,%esp
80104c3a: 50 push %eax
80104c3b: 6a 02 push $0x2
80104c3d: e8 8e fb ff ff call 801047d0 <argint>
80104c42: 83 c4 10 add $0x10,%esp
80104c45: 85 c0 test %eax,%eax
80104c47: 78 37 js 80104c80 <sys_write+0x60>
80104c49: 8d 45 f4 lea -0xc(%ebp),%eax
80104c4c: 83 ec 04 sub $0x4,%esp
80104c4f: ff 75 f0 pushl -0x10(%ebp)
80104c52: 50 push %eax
80104c53: 6a 01 push $0x1
80104c55: e8 b6 fb ff ff call 80104810 <argptr>
80104c5a: 83 c4 10 add $0x10,%esp
80104c5d: 85 c0 test %eax,%eax
80104c5f: 78 1f js 80104c80 <sys_write+0x60>
80104c61: 83 ec 04 sub $0x4,%esp
80104c64: ff 75 f0 pushl -0x10(%ebp)
80104c67: ff 75 f4 pushl -0xc(%ebp)
80104c6a: ff 75 ec pushl -0x14(%ebp)
80104c6d: e8 5e c3 ff ff call 80100fd0 <filewrite>
80104c72: 83 c4 10 add $0x10,%esp
80104c75: c9 leave
80104c76: c3 ret
80104c77: 89 f6 mov %esi,%esi
80104c79: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104c80: b8 ff ff ff ff mov $0xffffffff,%eax
80104c85: c9 leave
80104c86: c3 ret
80104c87: 89 f6 mov %esi,%esi
80104c89: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104c90 <sys_close>:
80104c90: 55 push %ebp
80104c91: 89 e5 mov %esp,%ebp
80104c93: 83 ec 18 sub $0x18,%esp
80104c96: 8d 55 f4 lea -0xc(%ebp),%edx
80104c99: 8d 45 f0 lea -0x10(%ebp),%eax
80104c9c: e8 4f fe ff ff call 80104af0 <argfd.constprop.0>
80104ca1: 85 c0 test %eax,%eax
80104ca3: 78 2b js 80104cd0 <sys_close+0x40>
80104ca5: 8b 55 f0 mov -0x10(%ebp),%edx
80104ca8: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80104cae: 83 ec 0c sub $0xc,%esp
80104cb1: c7 44 90 28 00 00 00 movl $0x0,0x28(%eax,%edx,4)
80104cb8: 00
80104cb9: ff 75 f4 pushl -0xc(%ebp)
80104cbc: e8 5f c1 ff ff call 80100e20 <fileclose>
80104cc1: 83 c4 10 add $0x10,%esp
80104cc4: 31 c0 xor %eax,%eax
80104cc6: c9 leave
80104cc7: c3 ret
80104cc8: 90 nop
80104cc9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104cd0: b8 ff ff ff ff mov $0xffffffff,%eax
80104cd5: c9 leave
80104cd6: c3 ret
80104cd7: 89 f6 mov %esi,%esi
80104cd9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104ce0 <sys_fstat>:
80104ce0: 55 push %ebp
80104ce1: 31 c0 xor %eax,%eax
80104ce3: 89 e5 mov %esp,%ebp
80104ce5: 83 ec 18 sub $0x18,%esp
80104ce8: 8d 55 f0 lea -0x10(%ebp),%edx
80104ceb: e8 00 fe ff ff call 80104af0 <argfd.constprop.0>
80104cf0: 85 c0 test %eax,%eax
80104cf2: 78 2c js 80104d20 <sys_fstat+0x40>
80104cf4: 8d 45 f4 lea -0xc(%ebp),%eax
80104cf7: 83 ec 04 sub $0x4,%esp
80104cfa: 6a 14 push $0x14
80104cfc: 50 push %eax
80104cfd: 6a 01 push $0x1
80104cff: e8 0c fb ff ff call 80104810 <argptr>
80104d04: 83 c4 10 add $0x10,%esp
80104d07: 85 c0 test %eax,%eax
80104d09: 78 15 js 80104d20 <sys_fstat+0x40>
80104d0b: 83 ec 08 sub $0x8,%esp
80104d0e: ff 75 f4 pushl -0xc(%ebp)
80104d11: ff 75 f0 pushl -0x10(%ebp)
80104d14: e8 c7 c1 ff ff call 80100ee0 <filestat>
80104d19: 83 c4 10 add $0x10,%esp
80104d1c: c9 leave
80104d1d: c3 ret
80104d1e: 66 90 xchg %ax,%ax
80104d20: b8 ff ff ff ff mov $0xffffffff,%eax
80104d25: c9 leave
80104d26: c3 ret
80104d27: 89 f6 mov %esi,%esi
80104d29: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104d30 <sys_link>:
80104d30: 55 push %ebp
80104d31: 89 e5 mov %esp,%ebp
80104d33: 57 push %edi
80104d34: 56 push %esi
80104d35: 53 push %ebx
80104d36: 8d 45 d4 lea -0x2c(%ebp),%eax
80104d39: 83 ec 34 sub $0x34,%esp
80104d3c: 50 push %eax
80104d3d: 6a 00 push $0x0
80104d3f: e8 1c fb ff ff call 80104860 <argstr>
80104d44: 83 c4 10 add $0x10,%esp
80104d47: 85 c0 test %eax,%eax
80104d49: 0f 88 fb 00 00 00 js 80104e4a <sys_link+0x11a>
80104d4f: 8d 45 d0 lea -0x30(%ebp),%eax
80104d52: 83 ec 08 sub $0x8,%esp
80104d55: 50 push %eax
80104d56: 6a 01 push $0x1
80104d58: e8 03 fb ff ff call 80104860 <argstr>
80104d5d: 83 c4 10 add $0x10,%esp
80104d60: 85 c0 test %eax,%eax
80104d62: 0f 88 e2 00 00 00 js 80104e4a <sys_link+0x11a>
80104d68: e8 13 de ff ff call 80102b80 <begin_op>
80104d6d: 83 ec 0c sub $0xc,%esp
80104d70: ff 75 d4 pushl -0x2c(%ebp)
80104d73: e8 68 d1 ff ff call 80101ee0 <namei>
80104d78: 83 c4 10 add $0x10,%esp
80104d7b: 85 c0 test %eax,%eax
80104d7d: 89 c3 mov %eax,%ebx
80104d7f: 0f 84 f3 00 00 00 je 80104e78 <sys_link+0x148>
80104d85: 83 ec 0c sub $0xc,%esp
80104d88: 50 push %eax
80104d89: e8 22 c9 ff ff call 801016b0 <ilock>
80104d8e: 83 c4 10 add $0x10,%esp
80104d91: 66 83 7b 50 01 cmpw $0x1,0x50(%ebx)
80104d96: 0f 84 c4 00 00 00 je 80104e60 <sys_link+0x130>
80104d9c: 66 83 43 56 01 addw $0x1,0x56(%ebx)
80104da1: 83 ec 0c sub $0xc,%esp
80104da4: 8d 7d da lea -0x26(%ebp),%edi
80104da7: 53 push %ebx
80104da8: e8 43 c8 ff ff call 801015f0 <iupdate>
80104dad: 89 1c 24 mov %ebx,(%esp)
80104db0: e8 cb c9 ff ff call 80101780 <iunlock>
80104db5: 58 pop %eax
80104db6: 5a pop %edx
80104db7: 57 push %edi
80104db8: ff 75 d0 pushl -0x30(%ebp)
80104dbb: e8 40 d1 ff ff call 80101f00 <nameiparent>
80104dc0: 83 c4 10 add $0x10,%esp
80104dc3: 85 c0 test %eax,%eax
80104dc5: 89 c6 mov %eax,%esi
80104dc7: 74 5b je 80104e24 <sys_link+0xf4>
80104dc9: 83 ec 0c sub $0xc,%esp
80104dcc: 50 push %eax
80104dcd: e8 de c8 ff ff call 801016b0 <ilock>
80104dd2: 83 c4 10 add $0x10,%esp
80104dd5: 8b 03 mov (%ebx),%eax
80104dd7: 39 06 cmp %eax,(%esi)
80104dd9: 75 3d jne 80104e18 <sys_link+0xe8>
80104ddb: 83 ec 04 sub $0x4,%esp
80104dde: ff 73 04 pushl 0x4(%ebx)
80104de1: 57 push %edi
80104de2: 56 push %esi
80104de3: e8 18 d0 ff ff call 80101e00 <dirlink>
80104de8: 83 c4 10 add $0x10,%esp
80104deb: 85 c0 test %eax,%eax
80104ded: 78 29 js 80104e18 <sys_link+0xe8>
80104def: 83 ec 0c sub $0xc,%esp
80104df2: 56 push %esi
80104df3: e8 f8 ca ff ff call 801018f0 <iunlockput>
80104df8: 89 1c 24 mov %ebx,(%esp)
80104dfb: e8 c0 c9 ff ff call 801017c0 <iput>
80104e00: e8 eb dd ff ff call 80102bf0 <end_op>
80104e05: 83 c4 10 add $0x10,%esp
80104e08: 31 c0 xor %eax,%eax
80104e0a: 8d 65 f4 lea -0xc(%ebp),%esp
80104e0d: 5b pop %ebx
80104e0e: 5e pop %esi
80104e0f: 5f pop %edi
80104e10: 5d pop %ebp
80104e11: c3 ret
80104e12: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80104e18: 83 ec 0c sub $0xc,%esp
80104e1b: 56 push %esi
80104e1c: e8 cf ca ff ff call 801018f0 <iunlockput>
80104e21: 83 c4 10 add $0x10,%esp
80104e24: 83 ec 0c sub $0xc,%esp
80104e27: 53 push %ebx
80104e28: e8 83 c8 ff ff call 801016b0 <ilock>
80104e2d: 66 83 6b 56 01 subw $0x1,0x56(%ebx)
80104e32: 89 1c 24 mov %ebx,(%esp)
80104e35: e8 b6 c7 ff ff call 801015f0 <iupdate>
80104e3a: 89 1c 24 mov %ebx,(%esp)
80104e3d: e8 ae ca ff ff call 801018f0 <iunlockput>
80104e42: e8 a9 dd ff ff call 80102bf0 <end_op>
80104e47: 83 c4 10 add $0x10,%esp
80104e4a: 8d 65 f4 lea -0xc(%ebp),%esp
80104e4d: b8 ff ff ff ff mov $0xffffffff,%eax
80104e52: 5b pop %ebx
80104e53: 5e pop %esi
80104e54: 5f pop %edi
80104e55: 5d pop %ebp
80104e56: c3 ret
80104e57: 89 f6 mov %esi,%esi
80104e59: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104e60: 83 ec 0c sub $0xc,%esp
80104e63: 53 push %ebx
80104e64: e8 87 ca ff ff call 801018f0 <iunlockput>
80104e69: e8 82 dd ff ff call 80102bf0 <end_op>
80104e6e: 83 c4 10 add $0x10,%esp
80104e71: b8 ff ff ff ff mov $0xffffffff,%eax
80104e76: eb 92 jmp 80104e0a <sys_link+0xda>
80104e78: e8 73 dd ff ff call 80102bf0 <end_op>
80104e7d: b8 ff ff ff ff mov $0xffffffff,%eax
80104e82: eb 86 jmp 80104e0a <sys_link+0xda>
80104e84: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80104e8a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
80104e90 <sys_unlink>:
80104e90: 55 push %ebp
80104e91: 89 e5 mov %esp,%ebp
80104e93: 57 push %edi
80104e94: 56 push %esi
80104e95: 53 push %ebx
80104e96: 8d 45 c0 lea -0x40(%ebp),%eax
80104e99: 83 ec 54 sub $0x54,%esp
80104e9c: 50 push %eax
80104e9d: 6a 00 push $0x0
80104e9f: e8 bc f9 ff ff call 80104860 <argstr>
80104ea4: 83 c4 10 add $0x10,%esp
80104ea7: 85 c0 test %eax,%eax
80104ea9: 0f 88 82 01 00 00 js 80105031 <sys_unlink+0x1a1>
80104eaf: 8d 5d ca lea -0x36(%ebp),%ebx
80104eb2: e8 c9 dc ff ff call 80102b80 <begin_op>
80104eb7: 83 ec 08 sub $0x8,%esp
80104eba: 53 push %ebx
80104ebb: ff 75 c0 pushl -0x40(%ebp)
80104ebe: e8 3d d0 ff ff call 80101f00 <nameiparent>
80104ec3: 83 c4 10 add $0x10,%esp
80104ec6: 85 c0 test %eax,%eax
80104ec8: 89 45 b4 mov %eax,-0x4c(%ebp)
80104ecb: 0f 84 6a 01 00 00 je 8010503b <sys_unlink+0x1ab>
80104ed1: 8b 75 b4 mov -0x4c(%ebp),%esi
80104ed4: 83 ec 0c sub $0xc,%esp
80104ed7: 56 push %esi
80104ed8: e8 d3 c7 ff ff call 801016b0 <ilock>
80104edd: 58 pop %eax
80104ede: 5a pop %edx
80104edf: 68 64 78 10 80 push $0x80107864
80104ee4: 53 push %ebx
80104ee5: e8 86 cc ff ff call 80101b70 <namecmp>
80104eea: 83 c4 10 add $0x10,%esp
80104eed: 85 c0 test %eax,%eax
80104eef: 0f 84 fc 00 00 00 je 80104ff1 <sys_unlink+0x161>
80104ef5: 83 ec 08 sub $0x8,%esp
80104ef8: 68 63 78 10 80 push $0x80107863
80104efd: 53 push %ebx
80104efe: e8 6d cc ff ff call 80101b70 <namecmp>
80104f03: 83 c4 10 add $0x10,%esp
80104f06: 85 c0 test %eax,%eax
80104f08: 0f 84 e3 00 00 00 je 80104ff1 <sys_unlink+0x161>
80104f0e: 8d 45 c4 lea -0x3c(%ebp),%eax
80104f11: 83 ec 04 sub $0x4,%esp
80104f14: 50 push %eax
80104f15: 53 push %ebx
80104f16: 56 push %esi
80104f17: e8 84 cc ff ff call 80101ba0 <dirlookup>
80104f1c: 83 c4 10 add $0x10,%esp
80104f1f: 85 c0 test %eax,%eax
80104f21: 89 c3 mov %eax,%ebx
80104f23: 0f 84 c8 00 00 00 je 80104ff1 <sys_unlink+0x161>
80104f29: 83 ec 0c sub $0xc,%esp
80104f2c: 50 push %eax
80104f2d: e8 7e c7 ff ff call 801016b0 <ilock>
80104f32: 83 c4 10 add $0x10,%esp
80104f35: 66 83 7b 56 00 cmpw $0x0,0x56(%ebx)
80104f3a: 0f 8e 24 01 00 00 jle 80105064 <sys_unlink+0x1d4>
80104f40: 66 83 7b 50 01 cmpw $0x1,0x50(%ebx)
80104f45: 8d 75 d8 lea -0x28(%ebp),%esi
80104f48: 74 66 je 80104fb0 <sys_unlink+0x120>
80104f4a: 83 ec 04 sub $0x4,%esp
80104f4d: 6a 10 push $0x10
80104f4f: 6a 00 push $0x0
80104f51: 56 push %esi
80104f52: e8 a9 f5 ff ff call 80104500 <memset>
80104f57: 6a 10 push $0x10
80104f59: ff 75 c4 pushl -0x3c(%ebp)
80104f5c: 56 push %esi
80104f5d: ff 75 b4 pushl -0x4c(%ebp)
80104f60: e8 db ca ff ff call 80101a40 <writei>
80104f65: 83 c4 20 add $0x20,%esp
80104f68: 83 f8 10 cmp $0x10,%eax
80104f6b: 0f 85 e6 00 00 00 jne 80105057 <sys_unlink+0x1c7>
80104f71: 66 83 7b 50 01 cmpw $0x1,0x50(%ebx)
80104f76: 0f 84 9c 00 00 00 je 80105018 <sys_unlink+0x188>
80104f7c: 83 ec 0c sub $0xc,%esp
80104f7f: ff 75 b4 pushl -0x4c(%ebp)
80104f82: e8 69 c9 ff ff call 801018f0 <iunlockput>
80104f87: 66 83 6b 56 01 subw $0x1,0x56(%ebx)
80104f8c: 89 1c 24 mov %ebx,(%esp)
80104f8f: e8 5c c6 ff ff call 801015f0 <iupdate>
80104f94: 89 1c 24 mov %ebx,(%esp)
80104f97: e8 54 c9 ff ff call 801018f0 <iunlockput>
80104f9c: e8 4f dc ff ff call 80102bf0 <end_op>
80104fa1: 83 c4 10 add $0x10,%esp
80104fa4: 31 c0 xor %eax,%eax
80104fa6: 8d 65 f4 lea -0xc(%ebp),%esp
80104fa9: 5b pop %ebx
80104faa: 5e pop %esi
80104fab: 5f pop %edi
80104fac: 5d pop %ebp
80104fad: c3 ret
80104fae: 66 90 xchg %ax,%ax
80104fb0: 83 7b 58 20 cmpl $0x20,0x58(%ebx)
80104fb4: 76 94 jbe 80104f4a <sys_unlink+0xba>
80104fb6: bf 20 00 00 00 mov $0x20,%edi
80104fbb: eb 0f jmp 80104fcc <sys_unlink+0x13c>
80104fbd: 8d 76 00 lea 0x0(%esi),%esi
80104fc0: 83 c7 10 add $0x10,%edi
80104fc3: 3b 7b 58 cmp 0x58(%ebx),%edi
80104fc6: 0f 83 7e ff ff ff jae 80104f4a <sys_unlink+0xba>
80104fcc: 6a 10 push $0x10
80104fce: 57 push %edi
80104fcf: 56 push %esi
80104fd0: 53 push %ebx
80104fd1: e8 6a c9 ff ff call 80101940 <readi>
80104fd6: 83 c4 10 add $0x10,%esp
80104fd9: 83 f8 10 cmp $0x10,%eax
80104fdc: 75 6c jne 8010504a <sys_unlink+0x1ba>
80104fde: 66 83 7d d8 00 cmpw $0x0,-0x28(%ebp)
80104fe3: 74 db je 80104fc0 <sys_unlink+0x130>
80104fe5: 83 ec 0c sub $0xc,%esp
80104fe8: 53 push %ebx
80104fe9: e8 02 c9 ff ff call 801018f0 <iunlockput>
80104fee: 83 c4 10 add $0x10,%esp
80104ff1: 83 ec 0c sub $0xc,%esp
80104ff4: ff 75 b4 pushl -0x4c(%ebp)
80104ff7: e8 f4 c8 ff ff call 801018f0 <iunlockput>
80104ffc: e8 ef db ff ff call 80102bf0 <end_op>
80105001: 83 c4 10 add $0x10,%esp
80105004: 8d 65 f4 lea -0xc(%ebp),%esp
80105007: b8 ff ff ff ff mov $0xffffffff,%eax
8010500c: 5b pop %ebx
8010500d: 5e pop %esi
8010500e: 5f pop %edi
8010500f: 5d pop %ebp
80105010: c3 ret
80105011: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80105018: 8b 45 b4 mov -0x4c(%ebp),%eax
8010501b: 83 ec 0c sub $0xc,%esp
8010501e: 66 83 68 56 01 subw $0x1,0x56(%eax)
80105023: 50 push %eax
80105024: e8 c7 c5 ff ff call 801015f0 <iupdate>
80105029: 83 c4 10 add $0x10,%esp
8010502c: e9 4b ff ff ff jmp 80104f7c <sys_unlink+0xec>
80105031: b8 ff ff ff ff mov $0xffffffff,%eax
80105036: e9 6b ff ff ff jmp 80104fa6 <sys_unlink+0x116>
8010503b: e8 b0 db ff ff call 80102bf0 <end_op>
80105040: b8 ff ff ff ff mov $0xffffffff,%eax
80105045: e9 5c ff ff ff jmp 80104fa6 <sys_unlink+0x116>
8010504a: 83 ec 0c sub $0xc,%esp
8010504d: 68 88 78 10 80 push $0x80107888
80105052: e8 09 b3 ff ff call 80100360 <panic>
80105057: 83 ec 0c sub $0xc,%esp
8010505a: 68 9a 78 10 80 push $0x8010789a
8010505f: e8 fc b2 ff ff call 80100360 <panic>
80105064: 83 ec 0c sub $0xc,%esp
80105067: 68 76 78 10 80 push $0x80107876
8010506c: e8 ef b2 ff ff call 80100360 <panic>
80105071: eb 0d jmp 80105080 <sys_open>
80105073: 90 nop
80105074: 90 nop
80105075: 90 nop
80105076: 90 nop
80105077: 90 nop
80105078: 90 nop
80105079: 90 nop
8010507a: 90 nop
8010507b: 90 nop
8010507c: 90 nop
8010507d: 90 nop
8010507e: 90 nop
8010507f: 90 nop
80105080 <sys_open>:
80105080: 55 push %ebp
80105081: 89 e5 mov %esp,%ebp
80105083: 57 push %edi
80105084: 56 push %esi
80105085: 53 push %ebx
80105086: 8d 45 e0 lea -0x20(%ebp),%eax
80105089: 83 ec 24 sub $0x24,%esp
8010508c: 50 push %eax
8010508d: 6a 00 push $0x0
8010508f: e8 cc f7 ff ff call 80104860 <argstr>
80105094: 83 c4 10 add $0x10,%esp
80105097: 85 c0 test %eax,%eax
80105099: 0f 88 9e 00 00 00 js 8010513d <sys_open+0xbd>
8010509f: 8d 45 e4 lea -0x1c(%ebp),%eax
801050a2: 83 ec 08 sub $0x8,%esp
801050a5: 50 push %eax
801050a6: 6a 01 push $0x1
801050a8: e8 23 f7 ff ff call 801047d0 <argint>
801050ad: 83 c4 10 add $0x10,%esp
801050b0: 85 c0 test %eax,%eax
801050b2: 0f 88 85 00 00 00 js 8010513d <sys_open+0xbd>
801050b8: e8 c3 da ff ff call 80102b80 <begin_op>
801050bd: f6 45 e5 02 testb $0x2,-0x1b(%ebp)
801050c1: 0f 85 89 00 00 00 jne 80105150 <sys_open+0xd0>
801050c7: 83 ec 0c sub $0xc,%esp
801050ca: ff 75 e0 pushl -0x20(%ebp)
801050cd: e8 0e ce ff ff call 80101ee0 <namei>
801050d2: 83 c4 10 add $0x10,%esp
801050d5: 85 c0 test %eax,%eax
801050d7: 89 c7 mov %eax,%edi
801050d9: 0f 84 8e 00 00 00 je 8010516d <sys_open+0xed>
801050df: 83 ec 0c sub $0xc,%esp
801050e2: 50 push %eax
801050e3: e8 c8 c5 ff ff call 801016b0 <ilock>
801050e8: 83 c4 10 add $0x10,%esp
801050eb: 66 83 7f 50 01 cmpw $0x1,0x50(%edi)
801050f0: 0f 84 d2 00 00 00 je 801051c8 <sys_open+0x148>
801050f6: e8 65 bc ff ff call 80100d60 <filealloc>
801050fb: 85 c0 test %eax,%eax
801050fd: 89 c6 mov %eax,%esi
801050ff: 74 2b je 8010512c <sys_open+0xac>
80105101: 65 8b 15 04 00 00 00 mov %gs:0x4,%edx
80105108: 31 db xor %ebx,%ebx
8010510a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80105110: 8b 44 9a 28 mov 0x28(%edx,%ebx,4),%eax
80105114: 85 c0 test %eax,%eax
80105116: 74 68 je 80105180 <sys_open+0x100>
80105118: 83 c3 01 add $0x1,%ebx
8010511b: 83 fb 10 cmp $0x10,%ebx
8010511e: 75 f0 jne 80105110 <sys_open+0x90>
80105120: 83 ec 0c sub $0xc,%esp
80105123: 56 push %esi
80105124: e8 f7 bc ff ff call 80100e20 <fileclose>
80105129: 83 c4 10 add $0x10,%esp
8010512c: 83 ec 0c sub $0xc,%esp
8010512f: 57 push %edi
80105130: e8 bb c7 ff ff call 801018f0 <iunlockput>
80105135: e8 b6 da ff ff call 80102bf0 <end_op>
8010513a: 83 c4 10 add $0x10,%esp
8010513d: 8d 65 f4 lea -0xc(%ebp),%esp
80105140: b8 ff ff ff ff mov $0xffffffff,%eax
80105145: 5b pop %ebx
80105146: 5e pop %esi
80105147: 5f pop %edi
80105148: 5d pop %ebp
80105149: c3 ret
8010514a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80105150: 83 ec 0c sub $0xc,%esp
80105153: 8b 45 e0 mov -0x20(%ebp),%eax
80105156: 31 c9 xor %ecx,%ecx
80105158: 6a 00 push $0x0
8010515a: ba 02 00 00 00 mov $0x2,%edx
8010515f: e8 ec f7 ff ff call 80104950 <create>
80105164: 83 c4 10 add $0x10,%esp
80105167: 85 c0 test %eax,%eax
80105169: 89 c7 mov %eax,%edi
8010516b: 75 89 jne 801050f6 <sys_open+0x76>
8010516d: e8 7e da ff ff call 80102bf0 <end_op>
80105172: b8 ff ff ff ff mov $0xffffffff,%eax
80105177: eb 43 jmp 801051bc <sys_open+0x13c>
80105179: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80105180: 83 ec 0c sub $0xc,%esp
80105183: 89 74 9a 28 mov %esi,0x28(%edx,%ebx,4)
80105187: 57 push %edi
80105188: e8 f3 c5 ff ff call 80101780 <iunlock>
8010518d: e8 5e da ff ff call 80102bf0 <end_op>
80105192: c7 06 02 00 00 00 movl $0x2,(%esi)
80105198: 8b 55 e4 mov -0x1c(%ebp),%edx
8010519b: 83 c4 10 add $0x10,%esp
8010519e: 89 7e 10 mov %edi,0x10(%esi)
801051a1: c7 46 14 00 00 00 00 movl $0x0,0x14(%esi)
801051a8: 89 d0 mov %edx,%eax
801051aa: 83 e0 01 and $0x1,%eax
801051ad: 83 f0 01 xor $0x1,%eax
801051b0: 83 e2 03 and $0x3,%edx
801051b3: 88 46 08 mov %al,0x8(%esi)
801051b6: 0f 95 46 09 setne 0x9(%esi)
801051ba: 89 d8 mov %ebx,%eax
801051bc: 8d 65 f4 lea -0xc(%ebp),%esp
801051bf: 5b pop %ebx
801051c0: 5e pop %esi
801051c1: 5f pop %edi
801051c2: 5d pop %ebp
801051c3: c3 ret
801051c4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801051c8: 8b 55 e4 mov -0x1c(%ebp),%edx
801051cb: 85 d2 test %edx,%edx
801051cd: 0f 84 23 ff ff ff je 801050f6 <sys_open+0x76>
801051d3: e9 54 ff ff ff jmp 8010512c <sys_open+0xac>
801051d8: 90 nop
801051d9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801051e0 <sys_mkdir>:
801051e0: 55 push %ebp
801051e1: 89 e5 mov %esp,%ebp
801051e3: 83 ec 18 sub $0x18,%esp
801051e6: e8 95 d9 ff ff call 80102b80 <begin_op>
801051eb: 8d 45 f4 lea -0xc(%ebp),%eax
801051ee: 83 ec 08 sub $0x8,%esp
801051f1: 50 push %eax
801051f2: 6a 00 push $0x0
801051f4: e8 67 f6 ff ff call 80104860 <argstr>
801051f9: 83 c4 10 add $0x10,%esp
801051fc: 85 c0 test %eax,%eax
801051fe: 78 30 js 80105230 <sys_mkdir+0x50>
80105200: 83 ec 0c sub $0xc,%esp
80105203: 8b 45 f4 mov -0xc(%ebp),%eax
80105206: 31 c9 xor %ecx,%ecx
80105208: 6a 00 push $0x0
8010520a: ba 01 00 00 00 mov $0x1,%edx
8010520f: e8 3c f7 ff ff call 80104950 <create>
80105214: 83 c4 10 add $0x10,%esp
80105217: 85 c0 test %eax,%eax
80105219: 74 15 je 80105230 <sys_mkdir+0x50>
8010521b: 83 ec 0c sub $0xc,%esp
8010521e: 50 push %eax
8010521f: e8 cc c6 ff ff call 801018f0 <iunlockput>
80105224: e8 c7 d9 ff ff call 80102bf0 <end_op>
80105229: 83 c4 10 add $0x10,%esp
8010522c: 31 c0 xor %eax,%eax
8010522e: c9 leave
8010522f: c3 ret
80105230: e8 bb d9 ff ff call 80102bf0 <end_op>
80105235: b8 ff ff ff ff mov $0xffffffff,%eax
8010523a: c9 leave
8010523b: c3 ret
8010523c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80105240 <sys_mknod>:
80105240: 55 push %ebp
80105241: 89 e5 mov %esp,%ebp
80105243: 83 ec 18 sub $0x18,%esp
80105246: e8 35 d9 ff ff call 80102b80 <begin_op>
8010524b: 8d 45 ec lea -0x14(%ebp),%eax
8010524e: 83 ec 08 sub $0x8,%esp
80105251: 50 push %eax
80105252: 6a 00 push $0x0
80105254: e8 07 f6 ff ff call 80104860 <argstr>
80105259: 83 c4 10 add $0x10,%esp
8010525c: 85 c0 test %eax,%eax
8010525e: 78 60 js 801052c0 <sys_mknod+0x80>
80105260: 8d 45 f0 lea -0x10(%ebp),%eax
80105263: 83 ec 08 sub $0x8,%esp
80105266: 50 push %eax
80105267: 6a 01 push $0x1
80105269: e8 62 f5 ff ff call 801047d0 <argint>
8010526e: 83 c4 10 add $0x10,%esp
80105271: 85 c0 test %eax,%eax
80105273: 78 4b js 801052c0 <sys_mknod+0x80>
80105275: 8d 45 f4 lea -0xc(%ebp),%eax
80105278: 83 ec 08 sub $0x8,%esp
8010527b: 50 push %eax
8010527c: 6a 02 push $0x2
8010527e: e8 4d f5 ff ff call 801047d0 <argint>
80105283: 83 c4 10 add $0x10,%esp
80105286: 85 c0 test %eax,%eax
80105288: 78 36 js 801052c0 <sys_mknod+0x80>
8010528a: 0f bf 45 f4 movswl -0xc(%ebp),%eax
8010528e: 83 ec 0c sub $0xc,%esp
80105291: 0f bf 4d f0 movswl -0x10(%ebp),%ecx
80105295: ba 03 00 00 00 mov $0x3,%edx
8010529a: 50 push %eax
8010529b: 8b 45 ec mov -0x14(%ebp),%eax
8010529e: e8 ad f6 ff ff call 80104950 <create>
801052a3: 83 c4 10 add $0x10,%esp
801052a6: 85 c0 test %eax,%eax
801052a8: 74 16 je 801052c0 <sys_mknod+0x80>
801052aa: 83 ec 0c sub $0xc,%esp
801052ad: 50 push %eax
801052ae: e8 3d c6 ff ff call 801018f0 <iunlockput>
801052b3: e8 38 d9 ff ff call 80102bf0 <end_op>
801052b8: 83 c4 10 add $0x10,%esp
801052bb: 31 c0 xor %eax,%eax
801052bd: c9 leave
801052be: c3 ret
801052bf: 90 nop
801052c0: e8 2b d9 ff ff call 80102bf0 <end_op>
801052c5: b8 ff ff ff ff mov $0xffffffff,%eax
801052ca: c9 leave
801052cb: c3 ret
801052cc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801052d0 <sys_chdir>:
801052d0: 55 push %ebp
801052d1: 89 e5 mov %esp,%ebp
801052d3: 53 push %ebx
801052d4: 83 ec 14 sub $0x14,%esp
801052d7: e8 a4 d8 ff ff call 80102b80 <begin_op>
801052dc: 8d 45 f4 lea -0xc(%ebp),%eax
801052df: 83 ec 08 sub $0x8,%esp
801052e2: 50 push %eax
801052e3: 6a 00 push $0x0
801052e5: e8 76 f5 ff ff call 80104860 <argstr>
801052ea: 83 c4 10 add $0x10,%esp
801052ed: 85 c0 test %eax,%eax
801052ef: 78 7f js 80105370 <sys_chdir+0xa0>
801052f1: 83 ec 0c sub $0xc,%esp
801052f4: ff 75 f4 pushl -0xc(%ebp)
801052f7: e8 e4 cb ff ff call 80101ee0 <namei>
801052fc: 83 c4 10 add $0x10,%esp
801052ff: 85 c0 test %eax,%eax
80105301: 89 c3 mov %eax,%ebx
80105303: 74 6b je 80105370 <sys_chdir+0xa0>
80105305: 83 ec 0c sub $0xc,%esp
80105308: 50 push %eax
80105309: e8 a2 c3 ff ff call 801016b0 <ilock>
8010530e: 83 c4 10 add $0x10,%esp
80105311: 66 83 7b 50 01 cmpw $0x1,0x50(%ebx)
80105316: 75 38 jne 80105350 <sys_chdir+0x80>
80105318: 83 ec 0c sub $0xc,%esp
8010531b: 53 push %ebx
8010531c: e8 5f c4 ff ff call 80101780 <iunlock>
80105321: 58 pop %eax
80105322: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80105328: ff 70 68 pushl 0x68(%eax)
8010532b: e8 90 c4 ff ff call 801017c0 <iput>
80105330: e8 bb d8 ff ff call 80102bf0 <end_op>
80105335: 65 a1 04 00 00 00 mov %gs:0x4,%eax
8010533b: 83 c4 10 add $0x10,%esp
8010533e: 89 58 68 mov %ebx,0x68(%eax)
80105341: 31 c0 xor %eax,%eax
80105343: 8b 5d fc mov -0x4(%ebp),%ebx
80105346: c9 leave
80105347: c3 ret
80105348: 90 nop
80105349: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80105350: 83 ec 0c sub $0xc,%esp
80105353: 53 push %ebx
80105354: e8 97 c5 ff ff call 801018f0 <iunlockput>
80105359: e8 92 d8 ff ff call 80102bf0 <end_op>
8010535e: 83 c4 10 add $0x10,%esp
80105361: b8 ff ff ff ff mov $0xffffffff,%eax
80105366: eb db jmp 80105343 <sys_chdir+0x73>
80105368: 90 nop
80105369: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80105370: e8 7b d8 ff ff call 80102bf0 <end_op>
80105375: b8 ff ff ff ff mov $0xffffffff,%eax
8010537a: eb c7 jmp 80105343 <sys_chdir+0x73>
8010537c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80105380 <sys_exec>:
80105380: 55 push %ebp
80105381: 89 e5 mov %esp,%ebp
80105383: 57 push %edi
80105384: 56 push %esi
80105385: 53 push %ebx
80105386: 8d 85 5c ff ff ff lea -0xa4(%ebp),%eax
8010538c: 81 ec a4 00 00 00 sub $0xa4,%esp
80105392: 50 push %eax
80105393: 6a 00 push $0x0
80105395: e8 c6 f4 ff ff call 80104860 <argstr>
8010539a: 83 c4 10 add $0x10,%esp
8010539d: 85 c0 test %eax,%eax
8010539f: 78 7f js 80105420 <sys_exec+0xa0>
801053a1: 8d 85 60 ff ff ff lea -0xa0(%ebp),%eax
801053a7: 83 ec 08 sub $0x8,%esp
801053aa: 50 push %eax
801053ab: 6a 01 push $0x1
801053ad: e8 1e f4 ff ff call 801047d0 <argint>
801053b2: 83 c4 10 add $0x10,%esp
801053b5: 85 c0 test %eax,%eax
801053b7: 78 67 js 80105420 <sys_exec+0xa0>
801053b9: 8d 85 68 ff ff ff lea -0x98(%ebp),%eax
801053bf: 83 ec 04 sub $0x4,%esp
801053c2: 8d b5 68 ff ff ff lea -0x98(%ebp),%esi
801053c8: 68 80 00 00 00 push $0x80
801053cd: 6a 00 push $0x0
801053cf: 8d bd 64 ff ff ff lea -0x9c(%ebp),%edi
801053d5: 50 push %eax
801053d6: 31 db xor %ebx,%ebx
801053d8: e8 23 f1 ff ff call 80104500 <memset>
801053dd: 83 c4 10 add $0x10,%esp
801053e0: 8b 85 60 ff ff ff mov -0xa0(%ebp),%eax
801053e6: 83 ec 08 sub $0x8,%esp
801053e9: 57 push %edi
801053ea: 8d 04 98 lea (%eax,%ebx,4),%eax
801053ed: 50 push %eax
801053ee: e8 5d f3 ff ff call 80104750 <fetchint>
801053f3: 83 c4 10 add $0x10,%esp
801053f6: 85 c0 test %eax,%eax
801053f8: 78 26 js 80105420 <sys_exec+0xa0>
801053fa: 8b 85 64 ff ff ff mov -0x9c(%ebp),%eax
80105400: 85 c0 test %eax,%eax
80105402: 74 2c je 80105430 <sys_exec+0xb0>
80105404: 83 ec 08 sub $0x8,%esp
80105407: 56 push %esi
80105408: 50 push %eax
80105409: e8 72 f3 ff ff call 80104780 <fetchstr>
8010540e: 83 c4 10 add $0x10,%esp
80105411: 85 c0 test %eax,%eax
80105413: 78 0b js 80105420 <sys_exec+0xa0>
80105415: 83 c3 01 add $0x1,%ebx
80105418: 83 c6 04 add $0x4,%esi
8010541b: 83 fb 20 cmp $0x20,%ebx
8010541e: 75 c0 jne 801053e0 <sys_exec+0x60>
80105420: 8d 65 f4 lea -0xc(%ebp),%esp
80105423: b8 ff ff ff ff mov $0xffffffff,%eax
80105428: 5b pop %ebx
80105429: 5e pop %esi
8010542a: 5f pop %edi
8010542b: 5d pop %ebp
8010542c: c3 ret
8010542d: 8d 76 00 lea 0x0(%esi),%esi
80105430: 8d 85 68 ff ff ff lea -0x98(%ebp),%eax
80105436: 83 ec 08 sub $0x8,%esp
80105439: c7 84 9d 68 ff ff ff movl $0x0,-0x98(%ebp,%ebx,4)
80105440: 00 00 00 00
80105444: 50 push %eax
80105445: ff b5 5c ff ff ff pushl -0xa4(%ebp)
8010544b: e8 60 b5 ff ff call 801009b0 <exec>
80105450: 83 c4 10 add $0x10,%esp
80105453: 8d 65 f4 lea -0xc(%ebp),%esp
80105456: 5b pop %ebx
80105457: 5e pop %esi
80105458: 5f pop %edi
80105459: 5d pop %ebp
8010545a: c3 ret
8010545b: 90 nop
8010545c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80105460 <sys_pipe>:
80105460: 55 push %ebp
80105461: 89 e5 mov %esp,%ebp
80105463: 57 push %edi
80105464: 56 push %esi
80105465: 53 push %ebx
80105466: 8d 45 dc lea -0x24(%ebp),%eax
80105469: 83 ec 20 sub $0x20,%esp
8010546c: 6a 08 push $0x8
8010546e: 50 push %eax
8010546f: 6a 00 push $0x0
80105471: e8 9a f3 ff ff call 80104810 <argptr>
80105476: 83 c4 10 add $0x10,%esp
80105479: 85 c0 test %eax,%eax
8010547b: 78 48 js 801054c5 <sys_pipe+0x65>
8010547d: 8d 45 e4 lea -0x1c(%ebp),%eax
80105480: 83 ec 08 sub $0x8,%esp
80105483: 50 push %eax
80105484: 8d 45 e0 lea -0x20(%ebp),%eax
80105487: 50 push %eax
80105488: e8 23 de ff ff call 801032b0 <pipealloc>
8010548d: 83 c4 10 add $0x10,%esp
80105490: 85 c0 test %eax,%eax
80105492: 78 31 js 801054c5 <sys_pipe+0x65>
80105494: 8b 5d e0 mov -0x20(%ebp),%ebx
80105497: 65 8b 0d 04 00 00 00 mov %gs:0x4,%ecx
8010549e: 31 c0 xor %eax,%eax
801054a0: 8b 54 81 28 mov 0x28(%ecx,%eax,4),%edx
801054a4: 85 d2 test %edx,%edx
801054a6: 74 28 je 801054d0 <sys_pipe+0x70>
801054a8: 83 c0 01 add $0x1,%eax
801054ab: 83 f8 10 cmp $0x10,%eax
801054ae: 75 f0 jne 801054a0 <sys_pipe+0x40>
801054b0: 83 ec 0c sub $0xc,%esp
801054b3: 53 push %ebx
801054b4: e8 67 b9 ff ff call 80100e20 <fileclose>
801054b9: 58 pop %eax
801054ba: ff 75 e4 pushl -0x1c(%ebp)
801054bd: e8 5e b9 ff ff call 80100e20 <fileclose>
801054c2: 83 c4 10 add $0x10,%esp
801054c5: b8 ff ff ff ff mov $0xffffffff,%eax
801054ca: eb 45 jmp 80105511 <sys_pipe+0xb1>
801054cc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801054d0: 8d 34 81 lea (%ecx,%eax,4),%esi
801054d3: 8b 7d e4 mov -0x1c(%ebp),%edi
801054d6: 31 d2 xor %edx,%edx
801054d8: 89 5e 28 mov %ebx,0x28(%esi)
801054db: 90 nop
801054dc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801054e0: 83 7c 91 28 00 cmpl $0x0,0x28(%ecx,%edx,4)
801054e5: 74 19 je 80105500 <sys_pipe+0xa0>
801054e7: 83 c2 01 add $0x1,%edx
801054ea: 83 fa 10 cmp $0x10,%edx
801054ed: 75 f1 jne 801054e0 <sys_pipe+0x80>
801054ef: c7 46 28 00 00 00 00 movl $0x0,0x28(%esi)
801054f6: eb b8 jmp 801054b0 <sys_pipe+0x50>
801054f8: 90 nop
801054f9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80105500: 89 7c 91 28 mov %edi,0x28(%ecx,%edx,4)
80105504: 8b 4d dc mov -0x24(%ebp),%ecx
80105507: 89 01 mov %eax,(%ecx)
80105509: 8b 45 dc mov -0x24(%ebp),%eax
8010550c: 89 50 04 mov %edx,0x4(%eax)
8010550f: 31 c0 xor %eax,%eax
80105511: 8d 65 f4 lea -0xc(%ebp),%esp
80105514: 5b pop %ebx
80105515: 5e pop %esi
80105516: 5f pop %edi
80105517: 5d pop %ebp
80105518: c3 ret
80105519: 66 90 xchg %ax,%ax
8010551b: 66 90 xchg %ax,%ax
8010551d: 66 90 xchg %ax,%ax
8010551f: 90 nop
80105520 <sys_fork>:
#include "mmu.h"
#include "proc.h"
int
sys_fork(void)
{
80105520: 55 push %ebp
80105521: 89 e5 mov %esp,%ebp
return fork();
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
}
80105523: 5d pop %ebp
#include "proc.h"
int
sys_fork(void)
{
<<<<<<< HEAD
80104bc4: 89 55 c4 mov %edx,-0x3c(%ebp)
80104bc7: 89 4d bc mov %ecx,-0x44(%ebp)
uint off;
struct inode *ip, *dp;
char name[DIRSIZ];
if((dp = nameiparent(path, name)) == 0)
80104bca: e8 d1 d2 ff ff call 80101ea0 <nameiparent>
80104bcf: 83 c4 10 add $0x10,%esp
80104bd2: 85 c0 test %eax,%eax
80104bd4: 0f 84 f6 00 00 00 je 80104cd0 <create+0x120>
return 0;
ilock(dp);
80104bda: 83 ec 0c sub $0xc,%esp
80104bdd: 89 c7 mov %eax,%edi
80104bdf: 50 push %eax
80104be0: e8 6b ca ff ff call 80101650 <ilock>
if((ip = dirlookup(dp, name, &off)) != 0){
80104be5: 8d 45 d4 lea -0x2c(%ebp),%eax
80104be8: 83 c4 0c add $0xc,%esp
80104beb: 50 push %eax
80104bec: 56 push %esi
80104bed: 57 push %edi
80104bee: e8 6d cf ff ff call 80101b60 <dirlookup>
80104bf3: 83 c4 10 add $0x10,%esp
80104bf6: 85 c0 test %eax,%eax
80104bf8: 89 c3 mov %eax,%ebx
80104bfa: 74 54 je 80104c50 <create+0xa0>
iunlockput(dp);
80104bfc: 83 ec 0c sub $0xc,%esp
80104bff: 57 push %edi
80104c00: e8 bb cc ff ff call 801018c0 <iunlockput>
ilock(ip);
80104c05: 89 1c 24 mov %ebx,(%esp)
80104c08: e8 43 ca ff ff call 80101650 <ilock>
if(type == T_FILE && ip->type == T_FILE)
80104c0d: 83 c4 10 add $0x10,%esp
80104c10: 66 83 7d c4 02 cmpw $0x2,-0x3c(%ebp)
80104c15: 75 19 jne 80104c30 <create+0x80>
80104c17: 66 83 7b 50 02 cmpw $0x2,0x50(%ebx)
80104c1c: 89 d8 mov %ebx,%eax
80104c1e: 75 10 jne 80104c30 <create+0x80>
panic("create: dirlink");
iunlockput(dp);
=======
return fork();
80105524: e9 d7 e3 ff ff jmp 80103900 <fork>
80105529: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80105530 <sys_exit>:
}
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
int
sys_exit(void)
{
80105530: 55 push %ebp
80105531: 89 e5 mov %esp,%ebp
80105533: 83 ec 08 sub $0x8,%esp
exit();
80105536: e8 95 e6 ff ff call 80103bd0 <exit>
return 0; // not reached
}
<<<<<<< HEAD
80104c20: 8d 65 f4 lea -0xc(%ebp),%esp
80104c23: 5b pop %ebx
80104c24: 5e pop %esi
80104c25: 5f pop %edi
80104c26: 5d pop %ebp
80104c27: c3 ret
80104c28: 90 nop
80104c29: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
if((ip = dirlookup(dp, name, &off)) != 0){
iunlockput(dp);
ilock(ip);
if(type == T_FILE && ip->type == T_FILE)
return ip;
iunlockput(ip);
80104c30: 83 ec 0c sub $0xc,%esp
80104c33: 53 push %ebx
80104c34: e8 87 cc ff ff call 801018c0 <iunlockput>
return 0;
80104c39: 83 c4 10 add $0x10,%esp
panic("create: dirlink");
=======
8010553b: 31 c0 xor %eax,%eax
8010553d: c9 leave
8010553e: c3 ret
8010553f: 90 nop
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
80105540 <sys_wait>:
int
sys_wait(void)
{
80105540: 55 push %ebp
80105541: 89 e5 mov %esp,%ebp
return wait();
}
80105543: 5d pop %ebp
}
<<<<<<< HEAD
80104c3c: 8d 65 f4 lea -0xc(%ebp),%esp
iunlockput(dp);
ilock(ip);
if(type == T_FILE && ip->type == T_FILE)
return ip;
iunlockput(ip);
return 0;
80104c3f: 31 c0 xor %eax,%eax
panic("create: dirlink");
=======
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
int
sys_wait(void)
{
return wait();
80105544: e9 b7 e8 ff ff jmp 80103e00 <wait>
80105549: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80105550 <sys_kill>:
}
<<<<<<< HEAD
80104c41: 5b pop %ebx
80104c42: 5e pop %esi
80104c43: 5f pop %edi
80104c44: 5d pop %ebp
80104c45: c3 ret
80104c46: 8d 76 00 lea 0x0(%esi),%esi
80104c49: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
return ip;
iunlockput(ip);
return 0;
}
if((ip = ialloc(dp->dev, type)) == 0)
80104c50: 0f bf 45 c4 movswl -0x3c(%ebp),%eax
80104c54: 83 ec 08 sub $0x8,%esp
80104c57: 50 push %eax
80104c58: ff 37 pushl (%edi)
80104c5a: e8 81 c8 ff ff call 801014e0 <ialloc>
80104c5f: 83 c4 10 add $0x10,%esp
80104c62: 85 c0 test %eax,%eax
80104c64: 89 c3 mov %eax,%ebx
80104c66: 0f 84 cc 00 00 00 je 80104d38 <create+0x188>
panic("create: ialloc");
ilock(ip);
80104c6c: 83 ec 0c sub $0xc,%esp
80104c6f: 50 push %eax
80104c70: e8 db c9 ff ff call 80101650 <ilock>
ip->major = major;
80104c75: 0f b7 45 c0 movzwl -0x40(%ebp),%eax
80104c79: 66 89 43 52 mov %ax,0x52(%ebx)
ip->minor = minor;
80104c7d: 0f b7 45 bc movzwl -0x44(%ebp),%eax
80104c81: 66 89 43 54 mov %ax,0x54(%ebx)
ip->nlink = 1;
80104c85: b8 01 00 00 00 mov $0x1,%eax
80104c8a: 66 89 43 56 mov %ax,0x56(%ebx)
iupdate(ip);
80104c8e: 89 1c 24 mov %ebx,(%esp)
80104c91: e8 0a c9 ff ff call 801015a0 <iupdate>
if(type == T_DIR){ // Create . and .. entries.
80104c96: 83 c4 10 add $0x10,%esp
80104c99: 66 83 7d c4 01 cmpw $0x1,-0x3c(%ebp)
80104c9e: 74 40 je 80104ce0 <create+0x130>
// No ip->nlink++ for ".": avoid cyclic ref count.
if(dirlink(ip, ".", ip->inum) < 0 || dirlink(ip, "..", dp->inum) < 0)
panic("create dots");
}
if(dirlink(dp, name, ip->inum) < 0)
80104ca0: 83 ec 04 sub $0x4,%esp
80104ca3: ff 73 04 pushl 0x4(%ebx)
80104ca6: 56 push %esi
80104ca7: 57 push %edi
80104ca8: e8 13 d1 ff ff call 80101dc0 <dirlink>
80104cad: 83 c4 10 add $0x10,%esp
80104cb0: 85 c0 test %eax,%eax
80104cb2: 78 77 js 80104d2b <create+0x17b>
panic("create: dirlink");
iunlockput(dp);
80104cb4: 83 ec 0c sub $0xc,%esp
80104cb7: 57 push %edi
80104cb8: e8 03 cc ff ff call 801018c0 <iunlockput>
return ip;
80104cbd: 83 c4 10 add $0x10,%esp
}
80104cc0: 8d 65 f4 lea -0xc(%ebp),%esp
if(dirlink(dp, name, ip->inum) < 0)
panic("create: dirlink");
iunlockput(dp);
return ip;
80104cc3: 89 d8 mov %ebx,%eax
}
80104cc5: 5b pop %ebx
80104cc6: 5e pop %esi
80104cc7: 5f pop %edi
80104cc8: 5d pop %ebp
80104cc9: c3 ret
80104cca: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
uint off;
struct inode *ip, *dp;
char name[DIRSIZ];
if((dp = nameiparent(path, name)) == 0)
return 0;
80104cd0: 31 c0 xor %eax,%eax
80104cd2: e9 49 ff ff ff jmp 80104c20 <create+0x70>
80104cd7: 89 f6 mov %esi,%esi
80104cd9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
ip->minor = minor;
ip->nlink = 1;
iupdate(ip);
if(type == T_DIR){ // Create . and .. entries.
dp->nlink++; // for ".."
80104ce0: 66 83 47 56 01 addw $0x1,0x56(%edi)
iupdate(dp);
80104ce5: 83 ec 0c sub $0xc,%esp
80104ce8: 57 push %edi
80104ce9: e8 b2 c8 ff ff call 801015a0 <iupdate>
// No ip->nlink++ for ".": avoid cyclic ref count.
if(dirlink(ip, ".", ip->inum) < 0 || dirlink(ip, "..", dp->inum) < 0)
80104cee: 83 c4 0c add $0xc,%esp
80104cf1: ff 73 04 pushl 0x4(%ebx)
80104cf4: 68 c4 7a 10 80 push $0x80107ac4
80104cf9: 53 push %ebx
80104cfa: e8 c1 d0 ff ff call 80101dc0 <dirlink>
80104cff: 83 c4 10 add $0x10,%esp
80104d02: 85 c0 test %eax,%eax
80104d04: 78 18 js 80104d1e <create+0x16e>
80104d06: 83 ec 04 sub $0x4,%esp
80104d09: ff 77 04 pushl 0x4(%edi)
80104d0c: 68 c3 7a 10 80 push $0x80107ac3
80104d11: 53 push %ebx
80104d12: e8 a9 d0 ff ff call 80101dc0 <dirlink>
80104d17: 83 c4 10 add $0x10,%esp
80104d1a: 85 c0 test %eax,%eax
80104d1c: 79 82 jns 80104ca0 <create+0xf0>
panic("create dots");
80104d1e: 83 ec 0c sub $0xc,%esp
80104d21: 68 b7 7a 10 80 push $0x80107ab7
80104d26: e8 45 b6 ff ff call 80100370 <panic>
}
if(dirlink(dp, name, ip->inum) < 0)
panic("create: dirlink");
80104d2b: 83 ec 0c sub $0xc,%esp
80104d2e: 68 c6 7a 10 80 push $0x80107ac6
80104d33: e8 38 b6 ff ff call 80100370 <panic>
iunlockput(ip);
return 0;
}
if((ip = ialloc(dp->dev, type)) == 0)
panic("create: ialloc");
80104d38: 83 ec 0c sub $0xc,%esp
80104d3b: 68 a8 7a 10 80 push $0x80107aa8
80104d40: e8 2b b6 ff ff call 80100370 <panic>
80104d45: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104d49: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104d50 <argfd.constprop.0>:
#include "fcntl.h"
// 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)
80104d50: 55 push %ebp
80104d51: 89 e5 mov %esp,%ebp
80104d53: 56 push %esi
80104d54: 53 push %ebx
80104d55: 89 c6 mov %eax,%esi
{
int fd;
struct file *f;
if(argint(n, &fd) < 0)
80104d57: 8d 45 f4 lea -0xc(%ebp),%eax
#include "fcntl.h"
// 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)
80104d5a: 89 d3 mov %edx,%ebx
80104d5c: 83 ec 18 sub $0x18,%esp
{
int fd;
struct file *f;
if(argint(n, &fd) < 0)
80104d5f: 50 push %eax
80104d60: 6a 00 push $0x0
80104d62: e8 c9 fc ff ff call 80104a30 <argint>
80104d67: 83 c4 10 add $0x10,%esp
80104d6a: 85 c0 test %eax,%eax
80104d6c: 78 3a js 80104da8 <argfd.constprop.0+0x58>
return -1;
if(fd < 0 || fd >= NOFILE || (f=proc->ofile[fd]) == 0)
80104d6e: 8b 45 f4 mov -0xc(%ebp),%eax
80104d71: 83 f8 0f cmp $0xf,%eax
80104d74: 77 32 ja 80104da8 <argfd.constprop.0+0x58>
80104d76: 65 8b 15 04 00 00 00 mov %gs:0x4,%edx
80104d7d: 8b 54 82 28 mov 0x28(%edx,%eax,4),%edx
80104d81: 85 d2 test %edx,%edx
80104d83: 74 23 je 80104da8 <argfd.constprop.0+0x58>
return -1;
if(pfd)
80104d85: 85 f6 test %esi,%esi
80104d87: 74 02 je 80104d8b <argfd.constprop.0+0x3b>
*pfd = fd;
80104d89: 89 06 mov %eax,(%esi)
if(pf)
80104d8b: 85 db test %ebx,%ebx
80104d8d: 74 11 je 80104da0 <argfd.constprop.0+0x50>
*pf = f;
80104d8f: 89 13 mov %edx,(%ebx)
return 0;
80104d91: 31 c0 xor %eax,%eax
}
80104d93: 8d 65 f8 lea -0x8(%ebp),%esp
80104d96: 5b pop %ebx
80104d97: 5e pop %esi
80104d98: 5d pop %ebp
80104d99: c3 ret
80104d9a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
return -1;
if(pfd)
*pfd = fd;
if(pf)
*pf = f;
return 0;
80104da0: 31 c0 xor %eax,%eax
80104da2: eb ef jmp 80104d93 <argfd.constprop.0+0x43>
80104da4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
{
int fd;
struct file *f;
if(argint(n, &fd) < 0)
return -1;
80104da8: b8 ff ff ff ff mov $0xffffffff,%eax
80104dad: eb e4 jmp 80104d93 <argfd.constprop.0+0x43>
80104daf: 90 nop
80104db0 <sys_dup>:
return -1;
}
int
sys_dup(void)
{
80104db0: 55 push %ebp
struct file *f;
int fd;
if(argfd(0, 0, &f) < 0)
80104db1: 31 c0 xor %eax,%eax
return -1;
}
int
sys_dup(void)
{
80104db3: 89 e5 mov %esp,%ebp
80104db5: 53 push %ebx
struct file *f;
int fd;
if(argfd(0, 0, &f) < 0)
80104db6: 8d 55 f4 lea -0xc(%ebp),%edx
return -1;
}
int
sys_dup(void)
{
80104db9: 83 ec 14 sub $0x14,%esp
struct file *f;
int fd;
if(argfd(0, 0, &f) < 0)
80104dbc: e8 8f ff ff ff call 80104d50 <argfd.constprop.0>
80104dc1: 85 c0 test %eax,%eax
80104dc3: 78 1b js 80104de0 <sys_dup+0x30>
return -1;
if((fd=fdalloc(f)) < 0)
80104dc5: 8b 55 f4 mov -0xc(%ebp),%edx
80104dc8: 65 a1 04 00 00 00 mov %gs:0x4,%eax
static int
fdalloc(struct file *f)
{
int fd;
for(fd = 0; fd < NOFILE; fd++){
80104dce: 31 db xor %ebx,%ebx
if(proc->ofile[fd] == 0){
80104dd0: 8b 4c 98 28 mov 0x28(%eax,%ebx,4),%ecx
80104dd4: 85 c9 test %ecx,%ecx
80104dd6: 74 18 je 80104df0 <sys_dup+0x40>
static int
fdalloc(struct file *f)
{
int fd;
for(fd = 0; fd < NOFILE; fd++){
80104dd8: 83 c3 01 add $0x1,%ebx
80104ddb: 83 fb 10 cmp $0x10,%ebx
80104dde: 75 f0 jne 80104dd0 <sys_dup+0x20>
{
struct file *f;
int fd;
if(argfd(0, 0, &f) < 0)
return -1;
80104de0: b8 ff ff ff ff mov $0xffffffff,%eax
if((fd=fdalloc(f)) < 0)
return -1;
filedup(f);
return fd;
}
80104de5: 8b 5d fc mov -0x4(%ebp),%ebx
80104de8: c9 leave
80104de9: c3 ret
80104dea: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
if(argfd(0, 0, &f) < 0)
return -1;
if((fd=fdalloc(f)) < 0)
return -1;
filedup(f);
80104df0: 83 ec 0c sub $0xc,%esp
{
int fd;
for(fd = 0; fd < NOFILE; fd++){
if(proc->ofile[fd] == 0){
proc->ofile[fd] = f;
80104df3: 89 54 98 28 mov %edx,0x28(%eax,%ebx,4)
if(argfd(0, 0, &f) < 0)
return -1;
if((fd=fdalloc(f)) < 0)
return -1;
filedup(f);
80104df7: 52 push %edx
80104df8: e8 c3 bf ff ff call 80100dc0 <filedup>
return fd;
80104dfd: 89 d8 mov %ebx,%eax
80104dff: 83 c4 10 add $0x10,%esp
}
80104e02: 8b 5d fc mov -0x4(%ebp),%ebx
80104e05: c9 leave
80104e06: c3 ret
80104e07: 89 f6 mov %esi,%esi
80104e09: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104e10 <sys_read>:
int
sys_read(void)
{
80104e10: 55 push %ebp
struct file *f;
int n;
char *p;
if(argfd(0, 0, &f) < 0 || argint(2, &n) < 0 || argptr(1, &p, n) < 0)
80104e11: 31 c0 xor %eax,%eax
return fd;
}
int
sys_read(void)
{
80104e13: 89 e5 mov %esp,%ebp
80104e15: 83 ec 18 sub $0x18,%esp
struct file *f;
int n;
char *p;
if(argfd(0, 0, &f) < 0 || argint(2, &n) < 0 || argptr(1, &p, n) < 0)
80104e18: 8d 55 ec lea -0x14(%ebp),%edx
80104e1b: e8 30 ff ff ff call 80104d50 <argfd.constprop.0>
80104e20: 85 c0 test %eax,%eax
80104e22: 78 4c js 80104e70 <sys_read+0x60>
80104e24: 8d 45 f0 lea -0x10(%ebp),%eax
80104e27: 83 ec 08 sub $0x8,%esp
80104e2a: 50 push %eax
80104e2b: 6a 02 push $0x2
80104e2d: e8 fe fb ff ff call 80104a30 <argint>
80104e32: 83 c4 10 add $0x10,%esp
80104e35: 85 c0 test %eax,%eax
80104e37: 78 37 js 80104e70 <sys_read+0x60>
80104e39: 8d 45 f4 lea -0xc(%ebp),%eax
80104e3c: 83 ec 04 sub $0x4,%esp
80104e3f: ff 75 f0 pushl -0x10(%ebp)
80104e42: 50 push %eax
80104e43: 6a 01 push $0x1
80104e45: e8 26 fc ff ff call 80104a70 <argptr>
80104e4a: 83 c4 10 add $0x10,%esp
80104e4d: 85 c0 test %eax,%eax
80104e4f: 78 1f js 80104e70 <sys_read+0x60>
return -1;
return fileread(f, p, n);
80104e51: 83 ec 04 sub $0x4,%esp
80104e54: ff 75 f0 pushl -0x10(%ebp)
80104e57: ff 75 f4 pushl -0xc(%ebp)
80104e5a: ff 75 ec pushl -0x14(%ebp)
80104e5d: e8 ce c0 ff ff call 80100f30 <fileread>
80104e62: 83 c4 10 add $0x10,%esp
}
80104e65: c9 leave
80104e66: c3 ret
80104e67: 89 f6 mov %esi,%esi
80104e69: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
struct file *f;
int n;
char *p;
if(argfd(0, 0, &f) < 0 || argint(2, &n) < 0 || argptr(1, &p, n) < 0)
return -1;
80104e70: b8 ff ff ff ff mov $0xffffffff,%eax
return fileread(f, p, n);
}
80104e75: c9 leave
80104e76: c3 ret
80104e77: 89 f6 mov %esi,%esi
80104e79: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104e80 <sys_write>:
int
sys_write(void)
{
80104e80: 55 push %ebp
struct file *f;
int n;
char *p;
if(argfd(0, 0, &f) < 0 || argint(2, &n) < 0 || argptr(1, &p, n) < 0)
80104e81: 31 c0 xor %eax,%eax
return fileread(f, p, n);
}
int
sys_write(void)
{
80104e83: 89 e5 mov %esp,%ebp
80104e85: 83 ec 18 sub $0x18,%esp
struct file *f;
int n;
char *p;
if(argfd(0, 0, &f) < 0 || argint(2, &n) < 0 || argptr(1, &p, n) < 0)
80104e88: 8d 55 ec lea -0x14(%ebp),%edx
80104e8b: e8 c0 fe ff ff call 80104d50 <argfd.constprop.0>
80104e90: 85 c0 test %eax,%eax
80104e92: 78 4c js 80104ee0 <sys_write+0x60>
80104e94: 8d 45 f0 lea -0x10(%ebp),%eax
80104e97: 83 ec 08 sub $0x8,%esp
80104e9a: 50 push %eax
80104e9b: 6a 02 push $0x2
80104e9d: e8 8e fb ff ff call 80104a30 <argint>
80104ea2: 83 c4 10 add $0x10,%esp
80104ea5: 85 c0 test %eax,%eax
80104ea7: 78 37 js 80104ee0 <sys_write+0x60>
80104ea9: 8d 45 f4 lea -0xc(%ebp),%eax
80104eac: 83 ec 04 sub $0x4,%esp
80104eaf: ff 75 f0 pushl -0x10(%ebp)
80104eb2: 50 push %eax
80104eb3: 6a 01 push $0x1
80104eb5: e8 b6 fb ff ff call 80104a70 <argptr>
80104eba: 83 c4 10 add $0x10,%esp
80104ebd: 85 c0 test %eax,%eax
80104ebf: 78 1f js 80104ee0 <sys_write+0x60>
return -1;
return filewrite(f, p, n);
80104ec1: 83 ec 04 sub $0x4,%esp
80104ec4: ff 75 f0 pushl -0x10(%ebp)
80104ec7: ff 75 f4 pushl -0xc(%ebp)
80104eca: ff 75 ec pushl -0x14(%ebp)
80104ecd: e8 ee c0 ff ff call 80100fc0 <filewrite>
80104ed2: 83 c4 10 add $0x10,%esp
}
80104ed5: c9 leave
80104ed6: c3 ret
80104ed7: 89 f6 mov %esi,%esi
80104ed9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
struct file *f;
int n;
char *p;
if(argfd(0, 0, &f) < 0 || argint(2, &n) < 0 || argptr(1, &p, n) < 0)
return -1;
80104ee0: b8 ff ff ff ff mov $0xffffffff,%eax
return filewrite(f, p, n);
}
80104ee5: c9 leave
80104ee6: c3 ret
80104ee7: 89 f6 mov %esi,%esi
80104ee9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104ef0 <sys_close>:
int
sys_close(void)
{
80104ef0: 55 push %ebp
80104ef1: 89 e5 mov %esp,%ebp
80104ef3: 83 ec 18 sub $0x18,%esp
int fd;
struct file *f;
if(argfd(0, &fd, &f) < 0)
80104ef6: 8d 55 f4 lea -0xc(%ebp),%edx
80104ef9: 8d 45 f0 lea -0x10(%ebp),%eax
80104efc: e8 4f fe ff ff call 80104d50 <argfd.constprop.0>
80104f01: 85 c0 test %eax,%eax
80104f03: 78 2b js 80104f30 <sys_close+0x40>
return -1;
proc->ofile[fd] = 0;
80104f05: 8b 55 f0 mov -0x10(%ebp),%edx
80104f08: 65 a1 04 00 00 00 mov %gs:0x4,%eax
fileclose(f);
80104f0e: 83 ec 0c sub $0xc,%esp
int fd;
struct file *f;
if(argfd(0, &fd, &f) < 0)
return -1;
proc->ofile[fd] = 0;
80104f11: c7 44 90 28 00 00 00 movl $0x0,0x28(%eax,%edx,4)
80104f18: 00
fileclose(f);
80104f19: ff 75 f4 pushl -0xc(%ebp)
80104f1c: e8 ef be ff ff call 80100e10 <fileclose>
return 0;
80104f21: 83 c4 10 add $0x10,%esp
80104f24: 31 c0 xor %eax,%eax
}
80104f26: c9 leave
80104f27: c3 ret
80104f28: 90 nop
80104f29: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
{
int fd;
struct file *f;
if(argfd(0, &fd, &f) < 0)
return -1;
80104f30: b8 ff ff ff ff mov $0xffffffff,%eax
proc->ofile[fd] = 0;
fileclose(f);
return 0;
}
80104f35: c9 leave
80104f36: c3 ret
80104f37: 89 f6 mov %esi,%esi
80104f39: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104f40 <sys_fstat>:
int
sys_fstat(void)
{
80104f40: 55 push %ebp
struct file *f;
struct stat *st;
if(argfd(0, 0, &f) < 0 || argptr(1, (void*)&st, sizeof(*st)) < 0)
80104f41: 31 c0 xor %eax,%eax
return 0;
}
int
sys_fstat(void)
{
80104f43: 89 e5 mov %esp,%ebp
80104f45: 83 ec 18 sub $0x18,%esp
struct file *f;
struct stat *st;
if(argfd(0, 0, &f) < 0 || argptr(1, (void*)&st, sizeof(*st)) < 0)
80104f48: 8d 55 f0 lea -0x10(%ebp),%edx
80104f4b: e8 00 fe ff ff call 80104d50 <argfd.constprop.0>
80104f50: 85 c0 test %eax,%eax
80104f52: 78 2c js 80104f80 <sys_fstat+0x40>
80104f54: 8d 45 f4 lea -0xc(%ebp),%eax
80104f57: 83 ec 04 sub $0x4,%esp
80104f5a: 6a 14 push $0x14
80104f5c: 50 push %eax
80104f5d: 6a 01 push $0x1
80104f5f: e8 0c fb ff ff call 80104a70 <argptr>
80104f64: 83 c4 10 add $0x10,%esp
80104f67: 85 c0 test %eax,%eax
80104f69: 78 15 js 80104f80 <sys_fstat+0x40>
return -1;
return filestat(f, st);
80104f6b: 83 ec 08 sub $0x8,%esp
80104f6e: ff 75 f4 pushl -0xc(%ebp)
80104f71: ff 75 f0 pushl -0x10(%ebp)
80104f74: e8 67 bf ff ff call 80100ee0 <filestat>
80104f79: 83 c4 10 add $0x10,%esp
}
80104f7c: c9 leave
80104f7d: c3 ret
80104f7e: 66 90 xchg %ax,%ax
{
struct file *f;
struct stat *st;
if(argfd(0, 0, &f) < 0 || argptr(1, (void*)&st, sizeof(*st)) < 0)
return -1;
80104f80: b8 ff ff ff ff mov $0xffffffff,%eax
return filestat(f, st);
}
80104f85: c9 leave
80104f86: c3 ret
80104f87: 89 f6 mov %esi,%esi
80104f89: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104f90 <sys_link>:
// Create the path new as a link to the same inode as old.
int
sys_link(void)
{
80104f90: 55 push %ebp
80104f91: 89 e5 mov %esp,%ebp
80104f93: 57 push %edi
80104f94: 56 push %esi
80104f95: 53 push %ebx
char name[DIRSIZ], *new, *old;
struct inode *dp, *ip;
if(argstr(0, &old) < 0 || argstr(1, &new) < 0)
80104f96: 8d 45 d4 lea -0x2c(%ebp),%eax
}
// Create the path new as a link to the same inode as old.
int
sys_link(void)
{
80104f99: 83 ec 34 sub $0x34,%esp
char name[DIRSIZ], *new, *old;
struct inode *dp, *ip;
if(argstr(0, &old) < 0 || argstr(1, &new) < 0)
80104f9c: 50 push %eax
80104f9d: 6a 00 push $0x0
80104f9f: e8 1c fb ff ff call 80104ac0 <argstr>
80104fa4: 83 c4 10 add $0x10,%esp
80104fa7: 85 c0 test %eax,%eax
80104fa9: 0f 88 fb 00 00 00 js 801050aa <sys_link+0x11a>
80104faf: 8d 45 d0 lea -0x30(%ebp),%eax
80104fb2: 83 ec 08 sub $0x8,%esp
80104fb5: 50 push %eax
80104fb6: 6a 01 push $0x1
80104fb8: e8 03 fb ff ff call 80104ac0 <argstr>
80104fbd: 83 c4 10 add $0x10,%esp
80104fc0: 85 c0 test %eax,%eax
80104fc2: 0f 88 e2 00 00 00 js 801050aa <sys_link+0x11a>
return -1;
begin_op();
80104fc8: e8 e3 db ff ff call 80102bb0 <begin_op>
if((ip = namei(old)) == 0){
80104fcd: 83 ec 0c sub $0xc,%esp
80104fd0: ff 75 d4 pushl -0x2c(%ebp)
80104fd3: e8 a8 ce ff ff call 80101e80 <namei>
80104fd8: 83 c4 10 add $0x10,%esp
80104fdb: 85 c0 test %eax,%eax
80104fdd: 89 c3 mov %eax,%ebx
80104fdf: 0f 84 f3 00 00 00 je 801050d8 <sys_link+0x148>
end_op();
return -1;
}
ilock(ip);
80104fe5: 83 ec 0c sub $0xc,%esp
80104fe8: 50 push %eax
80104fe9: e8 62 c6 ff ff call 80101650 <ilock>
if(ip->type == T_DIR){
80104fee: 83 c4 10 add $0x10,%esp
80104ff1: 66 83 7b 50 01 cmpw $0x1,0x50(%ebx)
80104ff6: 0f 84 c4 00 00 00 je 801050c0 <sys_link+0x130>
iunlockput(ip);
end_op();
return -1;
}
ip->nlink++;
80104ffc: 66 83 43 56 01 addw $0x1,0x56(%ebx)
iupdate(ip);
80105001: 83 ec 0c sub $0xc,%esp
iunlock(ip);
if((dp = nameiparent(new, name)) == 0)
80105004: 8d 7d da lea -0x26(%ebp),%edi
end_op();
return -1;
}
ip->nlink++;
iupdate(ip);
80105007: 53 push %ebx
80105008: e8 93 c5 ff ff call 801015a0 <iupdate>
iunlock(ip);
8010500d: 89 1c 24 mov %ebx,(%esp)
80105010: e8 1b c7 ff ff call 80101730 <iunlock>
if((dp = nameiparent(new, name)) == 0)
80105015: 58 pop %eax
80105016: 5a pop %edx
80105017: 57 push %edi
80105018: ff 75 d0 pushl -0x30(%ebp)
8010501b: e8 80 ce ff ff call 80101ea0 <nameiparent>
80105020: 83 c4 10 add $0x10,%esp
80105023: 85 c0 test %eax,%eax
80105025: 89 c6 mov %eax,%esi
80105027: 74 5b je 80105084 <sys_link+0xf4>
goto bad;
ilock(dp);
80105029: 83 ec 0c sub $0xc,%esp
8010502c: 50 push %eax
8010502d: e8 1e c6 ff ff call 80101650 <ilock>
if(dp->dev != ip->dev || dirlink(dp, name, ip->inum) < 0){
80105032: 83 c4 10 add $0x10,%esp
80105035: 8b 03 mov (%ebx),%eax
80105037: 39 06 cmp %eax,(%esi)
80105039: 75 3d jne 80105078 <sys_link+0xe8>
8010503b: 83 ec 04 sub $0x4,%esp
8010503e: ff 73 04 pushl 0x4(%ebx)
80105041: 57 push %edi
80105042: 56 push %esi
80105043: e8 78 cd ff ff call 80101dc0 <dirlink>
80105048: 83 c4 10 add $0x10,%esp
8010504b: 85 c0 test %eax,%eax
8010504d: 78 29 js 80105078 <sys_link+0xe8>
iunlockput(dp);
goto bad;
}
iunlockput(dp);
8010504f: 83 ec 0c sub $0xc,%esp
80105052: 56 push %esi
80105053: e8 68 c8 ff ff call 801018c0 <iunlockput>
iput(ip);
80105058: 89 1c 24 mov %ebx,(%esp)
8010505b: e8 20 c7 ff ff call 80101780 <iput>
end_op();
80105060: e8 bb db ff ff call 80102c20 <end_op>
return 0;
80105065: 83 c4 10 add $0x10,%esp
80105068: 31 c0 xor %eax,%eax
ip->nlink--;
iupdate(ip);
iunlockput(ip);
end_op();
return -1;
}
8010506a: 8d 65 f4 lea -0xc(%ebp),%esp
8010506d: 5b pop %ebx
8010506e: 5e pop %esi
8010506f: 5f pop %edi
80105070: 5d pop %ebp
80105071: c3 ret
80105072: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
if((dp = nameiparent(new, name)) == 0)
goto bad;
ilock(dp);
if(dp->dev != ip->dev || dirlink(dp, name, ip->inum) < 0){
iunlockput(dp);
80105078: 83 ec 0c sub $0xc,%esp
8010507b: 56 push %esi
8010507c: e8 3f c8 ff ff call 801018c0 <iunlockput>
goto bad;
80105081: 83 c4 10 add $0x10,%esp
end_op();
return 0;
bad:
ilock(ip);
80105084: 83 ec 0c sub $0xc,%esp
80105087: 53 push %ebx
80105088: e8 c3 c5 ff ff call 80101650 <ilock>
ip->nlink--;
8010508d: 66 83 6b 56 01 subw $0x1,0x56(%ebx)
iupdate(ip);
80105092: 89 1c 24 mov %ebx,(%esp)
80105095: e8 06 c5 ff ff call 801015a0 <iupdate>
iunlockput(ip);
8010509a: 89 1c 24 mov %ebx,(%esp)
8010509d: e8 1e c8 ff ff call 801018c0 <iunlockput>
end_op();
801050a2: e8 79 db ff ff call 80102c20 <end_op>
return -1;
801050a7: 83 c4 10 add $0x10,%esp
}
801050aa: 8d 65 f4 lea -0xc(%ebp),%esp
ilock(ip);
ip->nlink--;
iupdate(ip);
iunlockput(ip);
end_op();
return -1;
801050ad: b8 ff ff ff ff mov $0xffffffff,%eax
}
801050b2: 5b pop %ebx
801050b3: 5e pop %esi
801050b4: 5f pop %edi
801050b5: 5d pop %ebp
801050b6: c3 ret
801050b7: 89 f6 mov %esi,%esi
801050b9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
return -1;
}
ilock(ip);
if(ip->type == T_DIR){
iunlockput(ip);
801050c0: 83 ec 0c sub $0xc,%esp
801050c3: 53 push %ebx
801050c4: e8 f7 c7 ff ff call 801018c0 <iunlockput>
end_op();
801050c9: e8 52 db ff ff call 80102c20 <end_op>
return -1;
801050ce: 83 c4 10 add $0x10,%esp
801050d1: b8 ff ff ff ff mov $0xffffffff,%eax
801050d6: eb 92 jmp 8010506a <sys_link+0xda>
if(argstr(0, &old) < 0 || argstr(1, &new) < 0)
return -1;
begin_op();
if((ip = namei(old)) == 0){
end_op();
801050d8: e8 43 db ff ff call 80102c20 <end_op>
return -1;
801050dd: b8 ff ff ff ff mov $0xffffffff,%eax
801050e2: eb 86 jmp 8010506a <sys_link+0xda>
801050e4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801050ea: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
801050f0 <sys_unlink>:
}
//PAGEBREAK!
int
sys_unlink(void)
{
801050f0: 55 push %ebp
801050f1: 89 e5 mov %esp,%ebp
801050f3: 57 push %edi
801050f4: 56 push %esi
801050f5: 53 push %ebx
struct inode *ip, *dp;
struct dirent de;
char name[DIRSIZ], *path;
uint off;
if(argstr(0, &path) < 0)
801050f6: 8d 45 c0 lea -0x40(%ebp),%eax
}
//PAGEBREAK!
int
sys_unlink(void)
{
801050f9: 83 ec 54 sub $0x54,%esp
struct inode *ip, *dp;
struct dirent de;
char name[DIRSIZ], *path;
uint off;
if(argstr(0, &path) < 0)
801050fc: 50 push %eax
801050fd: 6a 00 push $0x0
801050ff: e8 bc f9 ff ff call 80104ac0 <argstr>
80105104: 83 c4 10 add $0x10,%esp
80105107: 85 c0 test %eax,%eax
80105109: 0f 88 82 01 00 00 js 80105291 <sys_unlink+0x1a1>
return -1;
begin_op();
if((dp = nameiparent(path, name)) == 0){
8010510f: 8d 5d ca lea -0x36(%ebp),%ebx
uint off;
if(argstr(0, &path) < 0)
return -1;
begin_op();
80105112: e8 99 da ff ff call 80102bb0 <begin_op>
if((dp = nameiparent(path, name)) == 0){
80105117: 83 ec 08 sub $0x8,%esp
8010511a: 53 push %ebx
8010511b: ff 75 c0 pushl -0x40(%ebp)
8010511e: e8 7d cd ff ff call 80101ea0 <nameiparent>
80105123: 83 c4 10 add $0x10,%esp
80105126: 85 c0 test %eax,%eax
80105128: 89 45 b4 mov %eax,-0x4c(%ebp)
8010512b: 0f 84 6a 01 00 00 je 8010529b <sys_unlink+0x1ab>
end_op();
return -1;
}
ilock(dp);
80105131: 8b 75 b4 mov -0x4c(%ebp),%esi
80105134: 83 ec 0c sub $0xc,%esp
80105137: 56 push %esi
80105138: e8 13 c5 ff ff call 80101650 <ilock>
// Cannot unlink "." or "..".
if(namecmp(name, ".") == 0 || namecmp(name, "..") == 0)
8010513d: 58 pop %eax
8010513e: 5a pop %edx
8010513f: 68 c4 7a 10 80 push $0x80107ac4
80105144: 53 push %ebx
80105145: e8 f6 c9 ff ff call 80101b40 <namecmp>
8010514a: 83 c4 10 add $0x10,%esp
8010514d: 85 c0 test %eax,%eax
8010514f: 0f 84 fc 00 00 00 je 80105251 <sys_unlink+0x161>
80105155: 83 ec 08 sub $0x8,%esp
80105158: 68 c3 7a 10 80 push $0x80107ac3
8010515d: 53 push %ebx
8010515e: e8 dd c9 ff ff call 80101b40 <namecmp>
80105163: 83 c4 10 add $0x10,%esp
80105166: 85 c0 test %eax,%eax
80105168: 0f 84 e3 00 00 00 je 80105251 <sys_unlink+0x161>
goto bad;
if((ip = dirlookup(dp, name, &off)) == 0)
8010516e: 8d 45 c4 lea -0x3c(%ebp),%eax
80105171: 83 ec 04 sub $0x4,%esp
80105174: 50 push %eax
80105175: 53 push %ebx
80105176: 56 push %esi
80105177: e8 e4 c9 ff ff call 80101b60 <dirlookup>
8010517c: 83 c4 10 add $0x10,%esp
8010517f: 85 c0 test %eax,%eax
80105181: 89 c3 mov %eax,%ebx
80105183: 0f 84 c8 00 00 00 je 80105251 <sys_unlink+0x161>
goto bad;
ilock(ip);
80105189: 83 ec 0c sub $0xc,%esp
8010518c: 50 push %eax
8010518d: e8 be c4 ff ff call 80101650 <ilock>
if(ip->nlink < 1)
80105192: 83 c4 10 add $0x10,%esp
80105195: 66 83 7b 56 00 cmpw $0x0,0x56(%ebx)
8010519a: 0f 8e 24 01 00 00 jle 801052c4 <sys_unlink+0x1d4>
panic("unlink: nlink < 1");
if(ip->type == T_DIR && !isdirempty(ip)){
801051a0: 66 83 7b 50 01 cmpw $0x1,0x50(%ebx)
801051a5: 8d 75 d8 lea -0x28(%ebp),%esi
801051a8: 74 66 je 80105210 <sys_unlink+0x120>
iunlockput(ip);
goto bad;
}
memset(&de, 0, sizeof(de));
801051aa: 83 ec 04 sub $0x4,%esp
801051ad: 6a 10 push $0x10
801051af: 6a 00 push $0x0
801051b1: 56 push %esi
801051b2: e8 89 f5 ff ff call 80104740 <memset>
if(writei(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
801051b7: 6a 10 push $0x10
801051b9: ff 75 c4 pushl -0x3c(%ebp)
801051bc: 56 push %esi
801051bd: ff 75 b4 pushl -0x4c(%ebp)
801051c0: e8 4b c8 ff ff call 80101a10 <writei>
801051c5: 83 c4 20 add $0x20,%esp
801051c8: 83 f8 10 cmp $0x10,%eax
801051cb: 0f 85 e6 00 00 00 jne 801052b7 <sys_unlink+0x1c7>
panic("unlink: writei");
if(ip->type == T_DIR){
801051d1: 66 83 7b 50 01 cmpw $0x1,0x50(%ebx)
801051d6: 0f 84 9c 00 00 00 je 80105278 <sys_unlink+0x188>
dp->nlink--;
iupdate(dp);
}
iunlockput(dp);
801051dc: 83 ec 0c sub $0xc,%esp
801051df: ff 75 b4 pushl -0x4c(%ebp)
801051e2: e8 d9 c6 ff ff call 801018c0 <iunlockput>
ip->nlink--;
801051e7: 66 83 6b 56 01 subw $0x1,0x56(%ebx)
iupdate(ip);
801051ec: 89 1c 24 mov %ebx,(%esp)
801051ef: e8 ac c3 ff ff call 801015a0 <iupdate>
iunlockput(ip);
801051f4: 89 1c 24 mov %ebx,(%esp)
801051f7: e8 c4 c6 ff ff call 801018c0 <iunlockput>
end_op();
801051fc: e8 1f da ff ff call 80102c20 <end_op>
return 0;
80105201: 83 c4 10 add $0x10,%esp
80105204: 31 c0 xor %eax,%eax
bad:
iunlockput(dp);
end_op();
return -1;
}
80105206: 8d 65 f4 lea -0xc(%ebp),%esp
80105209: 5b pop %ebx
8010520a: 5e pop %esi
8010520b: 5f pop %edi
8010520c: 5d pop %ebp
8010520d: c3 ret
8010520e: 66 90 xchg %ax,%ax
isdirempty(struct inode *dp)
{
int off;
struct dirent de;
for(off=2*sizeof(de); off<dp->size; off+=sizeof(de)){
80105210: 83 7b 58 20 cmpl $0x20,0x58(%ebx)
80105214: 76 94 jbe 801051aa <sys_unlink+0xba>
80105216: bf 20 00 00 00 mov $0x20,%edi
8010521b: eb 0f jmp 8010522c <sys_unlink+0x13c>
8010521d: 8d 76 00 lea 0x0(%esi),%esi
80105220: 83 c7 10 add $0x10,%edi
80105223: 3b 7b 58 cmp 0x58(%ebx),%edi
80105226: 0f 83 7e ff ff ff jae 801051aa <sys_unlink+0xba>
if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
8010522c: 6a 10 push $0x10
8010522e: 57 push %edi
8010522f: 56 push %esi
80105230: 53 push %ebx
80105231: e8 da c6 ff ff call 80101910 <readi>
80105236: 83 c4 10 add $0x10,%esp
80105239: 83 f8 10 cmp $0x10,%eax
8010523c: 75 6c jne 801052aa <sys_unlink+0x1ba>
panic("isdirempty: readi");
if(de.inum != 0)
8010523e: 66 83 7d d8 00 cmpw $0x0,-0x28(%ebp)
80105243: 74 db je 80105220 <sys_unlink+0x130>
ilock(ip);
if(ip->nlink < 1)
panic("unlink: nlink < 1");
if(ip->type == T_DIR && !isdirempty(ip)){
iunlockput(ip);
80105245: 83 ec 0c sub $0xc,%esp
80105248: 53 push %ebx
80105249: e8 72 c6 ff ff call 801018c0 <iunlockput>
goto bad;
8010524e: 83 c4 10 add $0x10,%esp
end_op();
return 0;
bad:
iunlockput(dp);
80105251: 83 ec 0c sub $0xc,%esp
80105254: ff 75 b4 pushl -0x4c(%ebp)
80105257: e8 64 c6 ff ff call 801018c0 <iunlockput>
end_op();
8010525c: e8 bf d9 ff ff call 80102c20 <end_op>
return -1;
80105261: 83 c4 10 add $0x10,%esp
}
80105264: 8d 65 f4 lea -0xc(%ebp),%esp
return 0;
bad:
iunlockput(dp);
end_op();
return -1;
80105267: b8 ff ff ff ff mov $0xffffffff,%eax
}
8010526c: 5b pop %ebx
8010526d: 5e pop %esi
8010526e: 5f pop %edi
8010526f: 5d pop %ebp
80105270: c3 ret
80105271: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
memset(&de, 0, sizeof(de));
if(writei(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
panic("unlink: writei");
if(ip->type == T_DIR){
dp->nlink--;
80105278: 8b 45 b4 mov -0x4c(%ebp),%eax
iupdate(dp);
8010527b: 83 ec 0c sub $0xc,%esp
memset(&de, 0, sizeof(de));
if(writei(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
panic("unlink: writei");
if(ip->type == T_DIR){
dp->nlink--;
8010527e: 66 83 68 56 01 subw $0x1,0x56(%eax)
iupdate(dp);
80105283: 50 push %eax
80105284: e8 17 c3 ff ff call 801015a0 <iupdate>
80105289: 83 c4 10 add $0x10,%esp
8010528c: e9 4b ff ff ff jmp 801051dc <sys_unlink+0xec>
struct dirent de;
char name[DIRSIZ], *path;
uint off;
if(argstr(0, &path) < 0)
return -1;
80105291: b8 ff ff ff ff mov $0xffffffff,%eax
80105296: e9 6b ff ff ff jmp 80105206 <sys_unlink+0x116>
begin_op();
if((dp = nameiparent(path, name)) == 0){
end_op();
8010529b: e8 80 d9 ff ff call 80102c20 <end_op>
return -1;
801052a0: b8 ff ff ff ff mov $0xffffffff,%eax
801052a5: e9 5c ff ff ff jmp 80105206 <sys_unlink+0x116>
int off;
struct dirent de;
for(off=2*sizeof(de); off<dp->size; off+=sizeof(de)){
if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
panic("isdirempty: readi");
801052aa: 83 ec 0c sub $0xc,%esp
801052ad: 68 e8 7a 10 80 push $0x80107ae8
801052b2: e8 b9 b0 ff ff call 80100370 <panic>
goto bad;
}
memset(&de, 0, sizeof(de));
if(writei(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
panic("unlink: writei");
801052b7: 83 ec 0c sub $0xc,%esp
801052ba: 68 fa 7a 10 80 push $0x80107afa
801052bf: e8 ac b0 ff ff call 80100370 <panic>
if((ip = dirlookup(dp, name, &off)) == 0)
goto bad;
ilock(ip);
if(ip->nlink < 1)
panic("unlink: nlink < 1");
801052c4: 83 ec 0c sub $0xc,%esp
801052c7: 68 d6 7a 10 80 push $0x80107ad6
801052cc: e8 9f b0 ff ff call 80100370 <panic>
801052d1: eb 0d jmp 801052e0 <sys_open>
801052d3: 90 nop
801052d4: 90 nop
801052d5: 90 nop
801052d6: 90 nop
801052d7: 90 nop
801052d8: 90 nop
801052d9: 90 nop
801052da: 90 nop
801052db: 90 nop
801052dc: 90 nop
801052dd: 90 nop
801052de: 90 nop
801052df: 90 nop
801052e0 <sys_open>:
return ip;
}
int
sys_open(void)
{
801052e0: 55 push %ebp
801052e1: 89 e5 mov %esp,%ebp
801052e3: 57 push %edi
801052e4: 56 push %esi
801052e5: 53 push %ebx
char *path;
int fd, omode;
struct file *f;
struct inode *ip;
if(argstr(0, &path) < 0 || argint(1, &omode) < 0)
801052e6: 8d 45 e0 lea -0x20(%ebp),%eax
return ip;
}
int
sys_open(void)
{
801052e9: 83 ec 24 sub $0x24,%esp
char *path;
int fd, omode;
struct file *f;
struct inode *ip;
if(argstr(0, &path) < 0 || argint(1, &omode) < 0)
801052ec: 50 push %eax
801052ed: 6a 00 push $0x0
801052ef: e8 cc f7 ff ff call 80104ac0 <argstr>
801052f4: 83 c4 10 add $0x10,%esp
801052f7: 85 c0 test %eax,%eax
801052f9: 0f 88 9e 00 00 00 js 8010539d <sys_open+0xbd>
801052ff: 8d 45 e4 lea -0x1c(%ebp),%eax
80105302: 83 ec 08 sub $0x8,%esp
80105305: 50 push %eax
80105306: 6a 01 push $0x1
80105308: e8 23 f7 ff ff call 80104a30 <argint>
8010530d: 83 c4 10 add $0x10,%esp
80105310: 85 c0 test %eax,%eax
80105312: 0f 88 85 00 00 00 js 8010539d <sys_open+0xbd>
return -1;
begin_op();
80105318: e8 93 d8 ff ff call 80102bb0 <begin_op>
if(omode & O_CREATE){
8010531d: f6 45 e5 02 testb $0x2,-0x1b(%ebp)
80105321: 0f 85 89 00 00 00 jne 801053b0 <sys_open+0xd0>
if(ip == 0){
end_op();
return -1;
}
} else {
if((ip = namei(path)) == 0){
80105327: 83 ec 0c sub $0xc,%esp
8010532a: ff 75 e0 pushl -0x20(%ebp)
8010532d: e8 4e cb ff ff call 80101e80 <namei>
80105332: 83 c4 10 add $0x10,%esp
80105335: 85 c0 test %eax,%eax
80105337: 89 c7 mov %eax,%edi
80105339: 0f 84 8e 00 00 00 je 801053cd <sys_open+0xed>
end_op();
return -1;
}
ilock(ip);
8010533f: 83 ec 0c sub $0xc,%esp
80105342: 50 push %eax
80105343: e8 08 c3 ff ff call 80101650 <ilock>
if(ip->type == T_DIR && omode != O_RDONLY){
80105348: 83 c4 10 add $0x10,%esp
8010534b: 66 83 7f 50 01 cmpw $0x1,0x50(%edi)
80105350: 0f 84 d2 00 00 00 je 80105428 <sys_open+0x148>
end_op();
return -1;
}
}
if((f = filealloc()) == 0 || (fd = fdalloc(f)) < 0){
80105356: e8 f5 b9 ff ff call 80100d50 <filealloc>
8010535b: 85 c0 test %eax,%eax
8010535d: 89 c6 mov %eax,%esi
8010535f: 74 2b je 8010538c <sys_open+0xac>
80105361: 65 8b 15 04 00 00 00 mov %gs:0x4,%edx
80105368: 31 db xor %ebx,%ebx
8010536a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
fdalloc(struct file *f)
{
int fd;
for(fd = 0; fd < NOFILE; fd++){
if(proc->ofile[fd] == 0){
80105370: 8b 44 9a 28 mov 0x28(%edx,%ebx,4),%eax
80105374: 85 c0 test %eax,%eax
80105376: 74 68 je 801053e0 <sys_open+0x100>
static int
fdalloc(struct file *f)
{
int fd;
for(fd = 0; fd < NOFILE; fd++){
80105378: 83 c3 01 add $0x1,%ebx
8010537b: 83 fb 10 cmp $0x10,%ebx
8010537e: 75 f0 jne 80105370 <sys_open+0x90>
}
}
if((f = filealloc()) == 0 || (fd = fdalloc(f)) < 0){
if(f)
fileclose(f);
80105380: 83 ec 0c sub $0xc,%esp
80105383: 56 push %esi
80105384: e8 87 ba ff ff call 80100e10 <fileclose>
80105389: 83 c4 10 add $0x10,%esp
iunlockput(ip);
8010538c: 83 ec 0c sub $0xc,%esp
8010538f: 57 push %edi
80105390: e8 2b c5 ff ff call 801018c0 <iunlockput>
end_op();
80105395: e8 86 d8 ff ff call 80102c20 <end_op>
return -1;
8010539a: 83 c4 10 add $0x10,%esp
f->ip = ip;
f->off = 0;
f->readable = !(omode & O_WRONLY);
f->writable = (omode & O_WRONLY) || (omode & O_RDWR);
return fd;
}
8010539d: 8d 65 f4 lea -0xc(%ebp),%esp
if((f = filealloc()) == 0 || (fd = fdalloc(f)) < 0){
if(f)
fileclose(f);
iunlockput(ip);
end_op();
return -1;
801053a0: b8 ff ff ff ff mov $0xffffffff,%eax
f->ip = ip;
f->off = 0;
f->readable = !(omode & O_WRONLY);
f->writable = (omode & O_WRONLY) || (omode & O_RDWR);
return fd;
}
801053a5: 5b pop %ebx
801053a6: 5e pop %esi
801053a7: 5f pop %edi
801053a8: 5d pop %ebp
801053a9: c3 ret
801053aa: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
return -1;
begin_op();
if(omode & O_CREATE){
ip = create(path, T_FILE, 0, 0);
801053b0: 83 ec 0c sub $0xc,%esp
801053b3: 8b 45 e0 mov -0x20(%ebp),%eax
801053b6: 31 c9 xor %ecx,%ecx
801053b8: 6a 00 push $0x0
801053ba: ba 02 00 00 00 mov $0x2,%edx
801053bf: e8 ec f7 ff ff call 80104bb0 <create>
if(ip == 0){
801053c4: 83 c4 10 add $0x10,%esp
801053c7: 85 c0 test %eax,%eax
return -1;
begin_op();
if(omode & O_CREATE){
ip = create(path, T_FILE, 0, 0);
801053c9: 89 c7 mov %eax,%edi
if(ip == 0){
801053cb: 75 89 jne 80105356 <sys_open+0x76>
end_op();
801053cd: e8 4e d8 ff ff call 80102c20 <end_op>
return -1;
801053d2: b8 ff ff ff ff mov $0xffffffff,%eax
801053d7: eb 43 jmp 8010541c <sys_open+0x13c>
801053d9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
fileclose(f);
iunlockput(ip);
end_op();
return -1;
}
iunlock(ip);
801053e0: 83 ec 0c sub $0xc,%esp
{
int fd;
for(fd = 0; fd < NOFILE; fd++){
if(proc->ofile[fd] == 0){
proc->ofile[fd] = f;
801053e3: 89 74 9a 28 mov %esi,0x28(%edx,%ebx,4)
fileclose(f);
iunlockput(ip);
end_op();
return -1;
}
iunlock(ip);
801053e7: 57 push %edi
801053e8: e8 43 c3 ff ff call 80101730 <iunlock>
end_op();
801053ed: e8 2e d8 ff ff call 80102c20 <end_op>
f->type = FD_INODE;
801053f2: c7 06 02 00 00 00 movl $0x2,(%esi)
f->ip = ip;
f->off = 0;
f->readable = !(omode & O_WRONLY);
801053f8: 8b 55 e4 mov -0x1c(%ebp),%edx
f->writable = (omode & O_WRONLY) || (omode & O_RDWR);
801053fb: 83 c4 10 add $0x10,%esp
}
iunlock(ip);
end_op();
f->type = FD_INODE;
f->ip = ip;
801053fe: 89 7e 10 mov %edi,0x10(%esi)
f->off = 0;
80105401: c7 46 14 00 00 00 00 movl $0x0,0x14(%esi)
f->readable = !(omode & O_WRONLY);
80105408: 89 d0 mov %edx,%eax
8010540a: 83 e0 01 and $0x1,%eax
8010540d: 83 f0 01 xor $0x1,%eax
f->writable = (omode & O_WRONLY) || (omode & O_RDWR);
80105410: 83 e2 03 and $0x3,%edx
end_op();
f->type = FD_INODE;
f->ip = ip;
f->off = 0;
f->readable = !(omode & O_WRONLY);
80105413: 88 46 08 mov %al,0x8(%esi)
f->writable = (omode & O_WRONLY) || (omode & O_RDWR);
80105416: 0f 95 46 09 setne 0x9(%esi)
return fd;
8010541a: 89 d8 mov %ebx,%eax
}
8010541c: 8d 65 f4 lea -0xc(%ebp),%esp
8010541f: 5b pop %ebx
80105420: 5e pop %esi
80105421: 5f pop %edi
80105422: 5d pop %ebp
80105423: c3 ret
80105424: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if((ip = namei(path)) == 0){
end_op();
return -1;
}
ilock(ip);
if(ip->type == T_DIR && omode != O_RDONLY){
80105428: 8b 55 e4 mov -0x1c(%ebp),%edx
8010542b: 85 d2 test %edx,%edx
8010542d: 0f 84 23 ff ff ff je 80105356 <sys_open+0x76>
80105433: e9 54 ff ff ff jmp 8010538c <sys_open+0xac>
80105438: 90 nop
80105439: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80105440 <sys_mkdir>:
return fd;
}
int
sys_mkdir(void)
{
80105440: 55 push %ebp
80105441: 89 e5 mov %esp,%ebp
80105443: 83 ec 18 sub $0x18,%esp
char *path;
struct inode *ip;
begin_op();
80105446: e8 65 d7 ff ff call 80102bb0 <begin_op>
if(argstr(0, &path) < 0 || (ip = create(path, T_DIR, 0, 0)) == 0){
8010544b: 8d 45 f4 lea -0xc(%ebp),%eax
8010544e: 83 ec 08 sub $0x8,%esp
80105451: 50 push %eax
80105452: 6a 00 push $0x0
80105454: e8 67 f6 ff ff call 80104ac0 <argstr>
80105459: 83 c4 10 add $0x10,%esp
8010545c: 85 c0 test %eax,%eax
8010545e: 78 30 js 80105490 <sys_mkdir+0x50>
80105460: 83 ec 0c sub $0xc,%esp
80105463: 8b 45 f4 mov -0xc(%ebp),%eax
80105466: 31 c9 xor %ecx,%ecx
80105468: 6a 00 push $0x0
8010546a: ba 01 00 00 00 mov $0x1,%edx
8010546f: e8 3c f7 ff ff call 80104bb0 <create>
80105474: 83 c4 10 add $0x10,%esp
80105477: 85 c0 test %eax,%eax
80105479: 74 15 je 80105490 <sys_mkdir+0x50>
end_op();
return -1;
}
iunlockput(ip);
8010547b: 83 ec 0c sub $0xc,%esp
8010547e: 50 push %eax
8010547f: e8 3c c4 ff ff call 801018c0 <iunlockput>
end_op();
80105484: e8 97 d7 ff ff call 80102c20 <end_op>
return 0;
80105489: 83 c4 10 add $0x10,%esp
8010548c: 31 c0 xor %eax,%eax
}
8010548e: c9 leave
8010548f: c3 ret
char *path;
struct inode *ip;
begin_op();
if(argstr(0, &path) < 0 || (ip = create(path, T_DIR, 0, 0)) == 0){
end_op();
80105490: e8 8b d7 ff ff call 80102c20 <end_op>
return -1;
80105495: b8 ff ff ff ff mov $0xffffffff,%eax
}
iunlockput(ip);
end_op();
return 0;
}
8010549a: c9 leave
8010549b: c3 ret
8010549c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801054a0 <sys_mknod>:
int
sys_mknod(void)
{
801054a0: 55 push %ebp
801054a1: 89 e5 mov %esp,%ebp
801054a3: 83 ec 18 sub $0x18,%esp
struct inode *ip;
char *path;
int major, minor;
begin_op();
801054a6: e8 05 d7 ff ff call 80102bb0 <begin_op>
if((argstr(0, &path)) < 0 ||
801054ab: 8d 45 ec lea -0x14(%ebp),%eax
801054ae: 83 ec 08 sub $0x8,%esp
801054b1: 50 push %eax
801054b2: 6a 00 push $0x0
801054b4: e8 07 f6 ff ff call 80104ac0 <argstr>
801054b9: 83 c4 10 add $0x10,%esp
801054bc: 85 c0 test %eax,%eax
801054be: 78 60 js 80105520 <sys_mknod+0x80>
argint(1, &major) < 0 ||
801054c0: 8d 45 f0 lea -0x10(%ebp),%eax
801054c3: 83 ec 08 sub $0x8,%esp
801054c6: 50 push %eax
801054c7: 6a 01 push $0x1
801054c9: e8 62 f5 ff ff call 80104a30 <argint>
struct inode *ip;
char *path;
int major, minor;
begin_op();
if((argstr(0, &path)) < 0 ||
801054ce: 83 c4 10 add $0x10,%esp
801054d1: 85 c0 test %eax,%eax
801054d3: 78 4b js 80105520 <sys_mknod+0x80>
argint(1, &major) < 0 ||
argint(2, &minor) < 0 ||
801054d5: 8d 45 f4 lea -0xc(%ebp),%eax
801054d8: 83 ec 08 sub $0x8,%esp
801054db: 50 push %eax
801054dc: 6a 02 push $0x2
801054de: e8 4d f5 ff ff call 80104a30 <argint>
char *path;
int major, minor;
begin_op();
if((argstr(0, &path)) < 0 ||
argint(1, &major) < 0 ||
801054e3: 83 c4 10 add $0x10,%esp
801054e6: 85 c0 test %eax,%eax
801054e8: 78 36 js 80105520 <sys_mknod+0x80>
argint(2, &minor) < 0 ||
801054ea: 0f bf 45 f4 movswl -0xc(%ebp),%eax
801054ee: 83 ec 0c sub $0xc,%esp
801054f1: 0f bf 4d f0 movswl -0x10(%ebp),%ecx
801054f5: ba 03 00 00 00 mov $0x3,%edx
801054fa: 50 push %eax
801054fb: 8b 45 ec mov -0x14(%ebp),%eax
801054fe: e8 ad f6 ff ff call 80104bb0 <create>
80105503: 83 c4 10 add $0x10,%esp
80105506: 85 c0 test %eax,%eax
80105508: 74 16 je 80105520 <sys_mknod+0x80>
(ip = create(path, T_DEV, major, minor)) == 0){
end_op();
return -1;
}
iunlockput(ip);
8010550a: 83 ec 0c sub $0xc,%esp
8010550d: 50 push %eax
8010550e: e8 ad c3 ff ff call 801018c0 <iunlockput>
end_op();
80105513: e8 08 d7 ff ff call 80102c20 <end_op>
return 0;
80105518: 83 c4 10 add $0x10,%esp
8010551b: 31 c0 xor %eax,%eax
}
8010551d: c9 leave
8010551e: c3 ret
8010551f: 90 nop
begin_op();
if((argstr(0, &path)) < 0 ||
argint(1, &major) < 0 ||
argint(2, &minor) < 0 ||
(ip = create(path, T_DEV, major, minor)) == 0){
end_op();
80105520: e8 fb d6 ff ff call 80102c20 <end_op>
return -1;
80105525: b8 ff ff ff ff mov $0xffffffff,%eax
}
iunlockput(ip);
end_op();
return 0;
}
8010552a: c9 leave
8010552b: c3 ret
8010552c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80105530 <sys_chdir>:
int
sys_chdir(void)
{
80105530: 55 push %ebp
80105531: 89 e5 mov %esp,%ebp
80105533: 53 push %ebx
80105534: 83 ec 14 sub $0x14,%esp
char *path;
struct inode *ip;
begin_op();
80105537: e8 74 d6 ff ff call 80102bb0 <begin_op>
if(argstr(0, &path) < 0 || (ip = namei(path)) == 0){
8010553c: 8d 45 f4 lea -0xc(%ebp),%eax
8010553f: 83 ec 08 sub $0x8,%esp
80105542: 50 push %eax
80105543: 6a 00 push $0x0
80105545: e8 76 f5 ff ff call 80104ac0 <argstr>
8010554a: 83 c4 10 add $0x10,%esp
8010554d: 85 c0 test %eax,%eax
8010554f: 78 7f js 801055d0 <sys_chdir+0xa0>
80105551: 83 ec 0c sub $0xc,%esp
80105554: ff 75 f4 pushl -0xc(%ebp)
80105557: e8 24 c9 ff ff call 80101e80 <namei>
8010555c: 83 c4 10 add $0x10,%esp
8010555f: 85 c0 test %eax,%eax
80105561: 89 c3 mov %eax,%ebx
80105563: 74 6b je 801055d0 <sys_chdir+0xa0>
end_op();
return -1;
}
ilock(ip);
80105565: 83 ec 0c sub $0xc,%esp
80105568: 50 push %eax
80105569: e8 e2 c0 ff ff call 80101650 <ilock>
if(ip->type != T_DIR){
8010556e: 83 c4 10 add $0x10,%esp
80105571: 66 83 7b 50 01 cmpw $0x1,0x50(%ebx)
80105576: 75 38 jne 801055b0 <sys_chdir+0x80>
iunlockput(ip);
end_op();
return -1;
}
iunlock(ip);
80105578: 83 ec 0c sub $0xc,%esp
8010557b: 53 push %ebx
8010557c: e8 af c1 ff ff call 80101730 <iunlock>
iput(proc->cwd);
80105581: 58 pop %eax
80105582: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80105588: ff 70 68 pushl 0x68(%eax)
8010558b: e8 f0 c1 ff ff call 80101780 <iput>
end_op();
80105590: e8 8b d6 ff ff call 80102c20 <end_op>
proc->cwd = ip;
80105595: 65 a1 04 00 00 00 mov %gs:0x4,%eax
return 0;
8010559b: 83 c4 10 add $0x10,%esp
return -1;
}
iunlock(ip);
iput(proc->cwd);
end_op();
proc->cwd = ip;
8010559e: 89 58 68 mov %ebx,0x68(%eax)
return 0;
801055a1: 31 c0 xor %eax,%eax
}
801055a3: 8b 5d fc mov -0x4(%ebp),%ebx
801055a6: c9 leave
801055a7: c3 ret
801055a8: 90 nop
801055a9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
end_op();
return -1;
}
ilock(ip);
if(ip->type != T_DIR){
iunlockput(ip);
801055b0: 83 ec 0c sub $0xc,%esp
801055b3: 53 push %ebx
801055b4: e8 07 c3 ff ff call 801018c0 <iunlockput>
end_op();
801055b9: e8 62 d6 ff ff call 80102c20 <end_op>
return -1;
801055be: 83 c4 10 add $0x10,%esp
801055c1: b8 ff ff ff ff mov $0xffffffff,%eax
801055c6: eb db jmp 801055a3 <sys_chdir+0x73>
801055c8: 90 nop
801055c9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
char *path;
struct inode *ip;
begin_op();
if(argstr(0, &path) < 0 || (ip = namei(path)) == 0){
end_op();
801055d0: e8 4b d6 ff ff call 80102c20 <end_op>
return -1;
801055d5: b8 ff ff ff ff mov $0xffffffff,%eax
801055da: eb c7 jmp 801055a3 <sys_chdir+0x73>
801055dc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801055e0 <sys_exec>:
return 0;
}
int
sys_exec(void)
{
801055e0: 55 push %ebp
801055e1: 89 e5 mov %esp,%ebp
801055e3: 57 push %edi
801055e4: 56 push %esi
801055e5: 53 push %ebx
char *path, *argv[MAXARG];
int i;
uint uargv, uarg;
if(argstr(0, &path) < 0 || argint(1, (int*)&uargv) < 0){
801055e6: 8d 85 5c ff ff ff lea -0xa4(%ebp),%eax
return 0;
}
int
sys_exec(void)
{
801055ec: 81 ec a4 00 00 00 sub $0xa4,%esp
char *path, *argv[MAXARG];
int i;
uint uargv, uarg;
if(argstr(0, &path) < 0 || argint(1, (int*)&uargv) < 0){
801055f2: 50 push %eax
801055f3: 6a 00 push $0x0
801055f5: e8 c6 f4 ff ff call 80104ac0 <argstr>
801055fa: 83 c4 10 add $0x10,%esp
801055fd: 85 c0 test %eax,%eax
801055ff: 78 7f js 80105680 <sys_exec+0xa0>
80105601: 8d 85 60 ff ff ff lea -0xa0(%ebp),%eax
80105607: 83 ec 08 sub $0x8,%esp
8010560a: 50 push %eax
8010560b: 6a 01 push $0x1
8010560d: e8 1e f4 ff ff call 80104a30 <argint>
80105612: 83 c4 10 add $0x10,%esp
80105615: 85 c0 test %eax,%eax
80105617: 78 67 js 80105680 <sys_exec+0xa0>
return -1;
}
memset(argv, 0, sizeof(argv));
80105619: 8d 85 68 ff ff ff lea -0x98(%ebp),%eax
8010561f: 83 ec 04 sub $0x4,%esp
80105622: 8d b5 68 ff ff ff lea -0x98(%ebp),%esi
80105628: 68 80 00 00 00 push $0x80
8010562d: 6a 00 push $0x0
8010562f: 8d bd 64 ff ff ff lea -0x9c(%ebp),%edi
80105635: 50 push %eax
80105636: 31 db xor %ebx,%ebx
80105638: e8 03 f1 ff ff call 80104740 <memset>
8010563d: 83 c4 10 add $0x10,%esp
for(i=0;; i++){
if(i >= NELEM(argv))
return -1;
if(fetchint(uargv+4*i, (int*)&uarg) < 0)
80105640: 8b 85 60 ff ff ff mov -0xa0(%ebp),%eax
80105646: 83 ec 08 sub $0x8,%esp
80105649: 57 push %edi
8010564a: 8d 04 98 lea (%eax,%ebx,4),%eax
8010564d: 50 push %eax
8010564e: e8 5d f3 ff ff call 801049b0 <fetchint>
80105653: 83 c4 10 add $0x10,%esp
80105656: 85 c0 test %eax,%eax
80105658: 78 26 js 80105680 <sys_exec+0xa0>
return -1;
if(uarg == 0){
8010565a: 8b 85 64 ff ff ff mov -0x9c(%ebp),%eax
80105660: 85 c0 test %eax,%eax
80105662: 74 2c je 80105690 <sys_exec+0xb0>
argv[i] = 0;
break;
}
if(fetchstr(uarg, &argv[i]) < 0)
80105664: 83 ec 08 sub $0x8,%esp
80105667: 56 push %esi
80105668: 50 push %eax
80105669: e8 72 f3 ff ff call 801049e0 <fetchstr>
8010566e: 83 c4 10 add $0x10,%esp
80105671: 85 c0 test %eax,%eax
80105673: 78 0b js 80105680 <sys_exec+0xa0>
if(argstr(0, &path) < 0 || argint(1, (int*)&uargv) < 0){
return -1;
}
memset(argv, 0, sizeof(argv));
for(i=0;; i++){
80105675: 83 c3 01 add $0x1,%ebx
80105678: 83 c6 04 add $0x4,%esi
if(i >= NELEM(argv))
8010567b: 83 fb 20 cmp $0x20,%ebx
8010567e: 75 c0 jne 80105640 <sys_exec+0x60>
}
if(fetchstr(uarg, &argv[i]) < 0)
return -1;
}
return exec(path, argv);
}
80105680: 8d 65 f4 lea -0xc(%ebp),%esp
char *path, *argv[MAXARG];
int i;
uint uargv, uarg;
if(argstr(0, &path) < 0 || argint(1, (int*)&uargv) < 0){
return -1;
80105683: b8 ff ff ff ff mov $0xffffffff,%eax
}
if(fetchstr(uarg, &argv[i]) < 0)
return -1;
}
return exec(path, argv);
}
80105688: 5b pop %ebx
80105689: 5e pop %esi
8010568a: 5f pop %edi
8010568b: 5d pop %ebp
8010568c: c3 ret
8010568d: 8d 76 00 lea 0x0(%esi),%esi
break;
}
if(fetchstr(uarg, &argv[i]) < 0)
return -1;
}
return exec(path, argv);
80105690: 8d 85 68 ff ff ff lea -0x98(%ebp),%eax
80105696: 83 ec 08 sub $0x8,%esp
if(i >= NELEM(argv))
return -1;
if(fetchint(uargv+4*i, (int*)&uarg) < 0)
return -1;
if(uarg == 0){
argv[i] = 0;
80105699: c7 84 9d 68 ff ff ff movl $0x0,-0x98(%ebp,%ebx,4)
801056a0: 00 00 00 00
break;
}
if(fetchstr(uarg, &argv[i]) < 0)
return -1;
}
return exec(path, argv);
801056a4: 50 push %eax
801056a5: ff b5 5c ff ff ff pushl -0xa4(%ebp)
801056ab: e8 40 b3 ff ff call 801009f0 <exec>
801056b0: 83 c4 10 add $0x10,%esp
}
801056b3: 8d 65 f4 lea -0xc(%ebp),%esp
801056b6: 5b pop %ebx
801056b7: 5e pop %esi
801056b8: 5f pop %edi
801056b9: 5d pop %ebp
801056ba: c3 ret
801056bb: 90 nop
801056bc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801056c0 <sys_pipe>:
int
sys_pipe(void)
{
801056c0: 55 push %ebp
801056c1: 89 e5 mov %esp,%ebp
801056c3: 57 push %edi
801056c4: 56 push %esi
801056c5: 53 push %ebx
int *fd;
struct file *rf, *wf;
int fd0, fd1;
if(argptr(0, (void*)&fd, 2*sizeof(fd[0])) < 0)
801056c6: 8d 45 dc lea -0x24(%ebp),%eax
return exec(path, argv);
}
int
sys_pipe(void)
{
801056c9: 83 ec 20 sub $0x20,%esp
int *fd;
struct file *rf, *wf;
int fd0, fd1;
if(argptr(0, (void*)&fd, 2*sizeof(fd[0])) < 0)
801056cc: 6a 08 push $0x8
801056ce: 50 push %eax
801056cf: 6a 00 push $0x0
801056d1: e8 9a f3 ff ff call 80104a70 <argptr>
801056d6: 83 c4 10 add $0x10,%esp
801056d9: 85 c0 test %eax,%eax
801056db: 78 48 js 80105725 <sys_pipe+0x65>
return -1;
if(pipealloc(&rf, &wf) < 0)
801056dd: 8d 45 e4 lea -0x1c(%ebp),%eax
801056e0: 83 ec 08 sub $0x8,%esp
801056e3: 50 push %eax
801056e4: 8d 45 e0 lea -0x20(%ebp),%eax
801056e7: 50 push %eax
801056e8: e8 63 dc ff ff call 80103350 <pipealloc>
801056ed: 83 c4 10 add $0x10,%esp
801056f0: 85 c0 test %eax,%eax
801056f2: 78 31 js 80105725 <sys_pipe+0x65>
return -1;
fd0 = -1;
if((fd0 = fdalloc(rf)) < 0 || (fd1 = fdalloc(wf)) < 0){
801056f4: 8b 5d e0 mov -0x20(%ebp),%ebx
801056f7: 65 8b 0d 04 00 00 00 mov %gs:0x4,%ecx
static int
fdalloc(struct file *f)
{
int fd;
for(fd = 0; fd < NOFILE; fd++){
801056fe: 31 c0 xor %eax,%eax
if(proc->ofile[fd] == 0){
80105700: 8b 54 81 28 mov 0x28(%ecx,%eax,4),%edx
80105704: 85 d2 test %edx,%edx
80105706: 74 28 je 80105730 <sys_pipe+0x70>
static int
fdalloc(struct file *f)
{
int fd;
for(fd = 0; fd < NOFILE; fd++){
80105708: 83 c0 01 add $0x1,%eax
8010570b: 83 f8 10 cmp $0x10,%eax
8010570e: 75 f0 jne 80105700 <sys_pipe+0x40>
return -1;
fd0 = -1;
if((fd0 = fdalloc(rf)) < 0 || (fd1 = fdalloc(wf)) < 0){
if(fd0 >= 0)
proc->ofile[fd0] = 0;
fileclose(rf);
80105710: 83 ec 0c sub $0xc,%esp
80105713: 53 push %ebx
80105714: e8 f7 b6 ff ff call 80100e10 <fileclose>
fileclose(wf);
80105719: 58 pop %eax
8010571a: ff 75 e4 pushl -0x1c(%ebp)
8010571d: e8 ee b6 ff ff call 80100e10 <fileclose>
return -1;
80105722: 83 c4 10 add $0x10,%esp
80105725: b8 ff ff ff ff mov $0xffffffff,%eax
8010572a: eb 45 jmp 80105771 <sys_pipe+0xb1>
8010572c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80105730: 8d 34 81 lea (%ecx,%eax,4),%esi
if(argptr(0, (void*)&fd, 2*sizeof(fd[0])) < 0)
return -1;
if(pipealloc(&rf, &wf) < 0)
return -1;
fd0 = -1;
if((fd0 = fdalloc(rf)) < 0 || (fd1 = fdalloc(wf)) < 0){
80105733: 8b 7d e4 mov -0x1c(%ebp),%edi
static int
fdalloc(struct file *f)
{
int fd;
for(fd = 0; fd < NOFILE; fd++){
80105736: 31 d2 xor %edx,%edx
if(proc->ofile[fd] == 0){
proc->ofile[fd] = f;
80105738: 89 5e 28 mov %ebx,0x28(%esi)
8010573b: 90 nop
8010573c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
fdalloc(struct file *f)
{
int fd;
for(fd = 0; fd < NOFILE; fd++){
if(proc->ofile[fd] == 0){
80105740: 83 7c 91 28 00 cmpl $0x0,0x28(%ecx,%edx,4)
80105745: 74 19 je 80105760 <sys_pipe+0xa0>
static int
fdalloc(struct file *f)
{
int fd;
for(fd = 0; fd < NOFILE; fd++){
80105747: 83 c2 01 add $0x1,%edx
8010574a: 83 fa 10 cmp $0x10,%edx
8010574d: 75 f1 jne 80105740 <sys_pipe+0x80>
if(pipealloc(&rf, &wf) < 0)
return -1;
fd0 = -1;
if((fd0 = fdalloc(rf)) < 0 || (fd1 = fdalloc(wf)) < 0){
if(fd0 >= 0)
proc->ofile[fd0] = 0;
8010574f: c7 46 28 00 00 00 00 movl $0x0,0x28(%esi)
80105756: eb b8 jmp 80105710 <sys_pipe+0x50>
80105758: 90 nop
80105759: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
{
int fd;
for(fd = 0; fd < NOFILE; fd++){
if(proc->ofile[fd] == 0){
proc->ofile[fd] = f;
80105760: 89 7c 91 28 mov %edi,0x28(%ecx,%edx,4)
proc->ofile[fd0] = 0;
fileclose(rf);
fileclose(wf);
return -1;
}
fd[0] = fd0;
80105764: 8b 4d dc mov -0x24(%ebp),%ecx
80105767: 89 01 mov %eax,(%ecx)
fd[1] = fd1;
80105769: 8b 45 dc mov -0x24(%ebp),%eax
8010576c: 89 50 04 mov %edx,0x4(%eax)
return 0;
8010576f: 31 c0 xor %eax,%eax
}
80105771: 8d 65 f4 lea -0xc(%ebp),%esp
80105774: 5b pop %ebx
80105775: 5e pop %esi
80105776: 5f pop %edi
80105777: 5d pop %ebp
80105778: c3 ret
80105779: 66 90 xchg %ax,%ax
8010577b: 66 90 xchg %ax,%ax
8010577d: 66 90 xchg %ax,%ax
8010577f: 90 nop
80105780 <sys_fork>:
#include "mmu.h"
#include "proc.h"
int
sys_fork(void)
{
80105780: 55 push %ebp
80105781: 89 e5 mov %esp,%ebp
return fork();
}
80105783: 5d pop %ebp
#include "proc.h"
int
sys_fork(void)
{
return fork();
80105784: e9 47 e2 ff ff jmp 801039d0 <fork>
80105789: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80105790 <sys_exit>:
}
int
sys_exit(void)
{
80105790: 55 push %ebp
80105791: 89 e5 mov %esp,%ebp
80105793: 83 ec 08 sub $0x8,%esp
exit();
80105796: e8 25 e6 ff ff call 80103dc0 <exit>
return 0; // not reached
}
8010579b: 31 c0 xor %eax,%eax
8010579d: c9 leave
8010579e: c3 ret
8010579f: 90 nop
801057a0 <sys_wait>:
int
sys_wait(void)
{
801057a0: 55 push %ebp
801057a1: 89 e5 mov %esp,%ebp
return wait();
}
801057a3: 5d pop %ebp
}
int
sys_wait(void)
{
return wait();
801057a4: e9 67 e8 ff ff jmp 80104010 <wait>
801057a9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801057b0 <sys_kill>:
}
int
sys_kill(void)
{
801057b0: 55 push %ebp
801057b1: 89 e5 mov %esp,%ebp
801057b3: 83 ec 20 sub $0x20,%esp
int pid;
if(argint(0, &pid) < 0)
801057b6: 8d 45 f4 lea -0xc(%ebp),%eax
801057b9: 50 push %eax
801057ba: 6a 00 push $0x0
801057bc: e8 6f f2 ff ff call 80104a30 <argint>
801057c1: 83 c4 10 add $0x10,%esp
801057c4: 85 c0 test %eax,%eax
801057c6: 78 18 js 801057e0 <sys_kill+0x30>
return -1;
return kill(pid);
801057c8: 83 ec 0c sub $0xc,%esp
801057cb: ff 75 f4 pushl -0xc(%ebp)
801057ce: e8 7d e9 ff ff call 80104150 <kill>
801057d3: 83 c4 10 add $0x10,%esp
}
801057d6: c9 leave
801057d7: c3 ret
801057d8: 90 nop
801057d9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
sys_kill(void)
{
int pid;
if(argint(0, &pid) < 0)
return -1;
801057e0: b8 ff ff ff ff mov $0xffffffff,%eax
return kill(pid);
}
801057e5: c9 leave
801057e6: c3 ret
801057e7: 89 f6 mov %esi,%esi
801057e9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801057f0 <sys_random>:
int
sys_random(void)//random number generator
{
801057f0: 55 push %ebp
801057f1: 89 e5 mov %esp,%ebp
801057f3: 53 push %ebx
int n,x;
if(argint(0, &n) < 0)
801057f4: 8d 45 f4 lea -0xc(%ebp),%eax
return kill(pid);
}
int
sys_random(void)//random number generator
{
801057f7: 83 ec 1c sub $0x1c,%esp
int n,x;
if(argint(0, &n) < 0)
801057fa: 50 push %eax
801057fb: 6a 00 push $0x0
801057fd: e8 2e f2 ff ff call 80104a30 <argint>
80105802: 83 c4 10 add $0x10,%esp
80105805: 85 c0 test %eax,%eax
80105807: 78 37 js 80105840 <sys_random+0x50>
return -1;
acquire(&tickslock);
80105809: 83 ec 0c sub $0xc,%esp
8010580c: 68 e0 4d 11 80 push $0x80114de0
80105811: e8 fa ec ff ff call 80104510 <acquire>
x=random(n);
80105816: 58 pop %eax
80105817: ff 75 f4 pushl -0xc(%ebp)
8010581a: e8 d1 e2 ff ff call 80103af0 <random>
8010581f: 89 c3 mov %eax,%ebx
release(&tickslock);
80105821: c7 04 24 e0 4d 11 80 movl $0x80114de0,(%esp)
80105828: e8 c3 ee ff ff call 801046f0 <release>
return x;
8010582d: 83 c4 10 add $0x10,%esp
80105830: 89 d8 mov %ebx,%eax
}
80105832: 8b 5d fc mov -0x4(%ebp),%ebx
80105835: c9 leave
80105836: c3 ret
80105837: 89 f6 mov %esi,%esi
80105839: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
=======
int
sys_kill(void)
{
80105550: 55 push %ebp
80105551: 89 e5 mov %esp,%ebp
80105553: 83 ec 28 sub $0x28,%esp
int pid;
if(argint(0, &pid) < 0)
80105556: 8d 45 f4 lea -0xc(%ebp),%eax
80105559: 89 44 24 04 mov %eax,0x4(%esp)
8010555d: c7 04 24 00 00 00 00 movl $0x0,(%esp)
80105564: e8 67 f2 ff ff call 801047d0 <argint>
80105569: 85 c0 test %eax,%eax
8010556b: 78 13 js 80105580 <sys_kill+0x30>
return -1;
return kill(pid);
8010556d: 8b 45 f4 mov -0xc(%ebp),%eax
80105570: 89 04 24 mov %eax,(%esp)
80105573: e8 c8 e9 ff ff call 80103f40 <kill>
}
80105578: c9 leave
80105579: c3 ret
8010557a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
sys_kill(void)
{
int pid;
if(argint(0, &pid) < 0)
return -1;
80105580: b8 ff ff ff ff mov $0xffffffff,%eax
return kill(pid);
}
80105585: c9 leave
80105586: c3 ret
80105587: 89 f6 mov %esi,%esi
80105589: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80105590 <sys_random>:
int
sys_random(void)//random number generator
{
80105590: 55 push %ebp
80105591: 89 e5 mov %esp,%ebp
80105593: 53 push %ebx
80105594: 83 ec 24 sub $0x24,%esp
int n,x;
if(argint(0, &n) < 0)
80105597: 8d 45 f4 lea -0xc(%ebp),%eax
8010559a: 89 44 24 04 mov %eax,0x4(%esp)
8010559e: c7 04 24 00 00 00 00 movl $0x0,(%esp)
801055a5: e8 26 f2 ff ff call 801047d0 <argint>
801055aa: 85 c0 test %eax,%eax
801055ac: 78 32 js 801055e0 <sys_random+0x50>
return -1;
acquire(&tickslock);
801055ae: c7 04 24 e0 4d 11 80 movl $0x80114de0,(%esp)
801055b5: e8 c6 ed ff ff call 80104380 <acquire>
x=random(n);
801055ba: 8b 45 f4 mov -0xc(%ebp),%eax
801055bd: 89 04 24 mov %eax,(%esp)
801055c0: e8 5b e4 ff ff call 80103a20 <random>
release(&tickslock);
801055c5: c7 04 24 e0 4d 11 80 movl $0x80114de0,(%esp)
{
int n,x;
if(argint(0, &n) < 0)
return -1;
acquire(&tickslock);
x=random(n);
801055cc: 89 c3 mov %eax,%ebx
release(&tickslock);
801055ce: e8 dd ee ff ff call 801044b0 <release>
return x;
801055d3: 89 d8 mov %ebx,%eax
}
801055d5: 83 c4 24 add $0x24,%esp
801055d8: 5b pop %ebx
801055d9: 5d pop %ebp
801055da: c3 ret
801055db: 90 nop
801055dc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
int
sys_random(void)//random number generator
{
int n,x;
if(argint(0, &n) < 0)
return -1;
<<<<<<< HEAD
80105840: b8 ff ff ff ff mov $0xffffffff,%eax
80105845: eb eb jmp 80105832 <sys_random+0x42>
80105847: 89 f6 mov %esi,%esi
80105849: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80105850 <sys_getpid>:
=======
801055e0: b8 ff ff ff ff mov $0xffffffff,%eax
801055e5: eb ee jmp 801055d5 <sys_random+0x45>
801055e7: 89 f6 mov %esi,%esi
801055e9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801055f0 <sys_getpid>:
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
int
sys_getpid(void)
{
return proc->pid;
<<<<<<< HEAD
80105850: 65 a1 04 00 00 00 mov %gs:0x4,%eax
=======
801055f0: 65 a1 04 00 00 00 mov %gs:0x4,%eax
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
}
int
sys_getpid(void)
{
<<<<<<< HEAD
80105856: 55 push %ebp
80105857: 89 e5 mov %esp,%ebp
return proc->pid;
80105859: 8b 40 10 mov 0x10(%eax),%eax
}
8010585c: 5d pop %ebp
8010585d: c3 ret
8010585e: 66 90 xchg %ax,%ax
80105860 <sys_sbrk>:
=======
801055f6: 55 push %ebp
801055f7: 89 e5 mov %esp,%ebp
return proc->pid;
}
801055f9: 5d pop %ebp
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
int
sys_getpid(void)
{
<<<<<<< HEAD
80105860: 55 push %ebp
80105861: 89 e5 mov %esp,%ebp
80105863: 53 push %ebx
int addr;
int n;
if(argint(0, &n) < 0)
80105864: 8d 45 f4 lea -0xc(%ebp),%eax
=======
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
return proc->pid;
801055fa: 8b 40 10 mov 0x10(%eax),%eax
}
801055fd: c3 ret
801055fe: 66 90 xchg %ax,%ax
80105600 <sys_sbrk>:
int
sys_sbrk(void)
{
<<<<<<< HEAD
80105867: 83 ec 1c sub $0x1c,%esp
=======
80105600: 55 push %ebp
80105601: 89 e5 mov %esp,%ebp
80105603: 53 push %ebx
80105604: 83 ec 24 sub $0x24,%esp
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
int addr;
int n;
if(argint(0, &n) < 0)
<<<<<<< HEAD
8010586a: 50 push %eax
8010586b: 6a 00 push $0x0
8010586d: e8 be f1 ff ff call 80104a30 <argint>
80105872: 83 c4 10 add $0x10,%esp
80105875: 85 c0 test %eax,%eax
80105877: 78 27 js 801058a0 <sys_sbrk+0x40>
return -1;
addr = proc->sz;
80105879: 65 a1 04 00 00 00 mov %gs:0x4,%eax
if(growproc(n) < 0)
8010587f: 83 ec 0c sub $0xc,%esp
=======
80105607: 8d 45 f4 lea -0xc(%ebp),%eax
8010560a: 89 44 24 04 mov %eax,0x4(%esp)
8010560e: c7 04 24 00 00 00 00 movl $0x0,(%esp)
80105615: e8 b6 f1 ff ff call 801047d0 <argint>
8010561a: 85 c0 test %eax,%eax
8010561c: 78 22 js 80105640 <sys_sbrk+0x40>
return -1;
addr = proc->sz;
8010561e: 65 a1 04 00 00 00 mov %gs:0x4,%eax
if(growproc(n) < 0)
80105624: 8b 55 f4 mov -0xc(%ebp),%edx
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
int addr;
int n;
if(argint(0, &n) < 0)
return -1;
addr = proc->sz;
<<<<<<< HEAD
80105882: 8b 18 mov (%eax),%ebx
if(growproc(n) < 0)
80105884: ff 75 f4 pushl -0xc(%ebp)
80105887: e8 d4 e0 ff ff call 80103960 <growproc>
8010588c: 83 c4 10 add $0x10,%esp
8010588f: 85 c0 test %eax,%eax
80105891: 78 0d js 801058a0 <sys_sbrk+0x40>
return -1;
return addr;
80105893: 89 d8 mov %ebx,%eax
}
80105895: 8b 5d fc mov -0x4(%ebp),%ebx
80105898: c9 leave
80105899: c3 ret
8010589a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
=======
80105627: 8b 18 mov (%eax),%ebx
if(growproc(n) < 0)
80105629: 89 14 24 mov %edx,(%esp)
8010562c: e8 4f e2 ff ff call 80103880 <growproc>
80105631: 85 c0 test %eax,%eax
80105633: 78 0b js 80105640 <sys_sbrk+0x40>
return -1;
return addr;
80105635: 89 d8 mov %ebx,%eax
}
80105637: 83 c4 24 add $0x24,%esp
8010563a: 5b pop %ebx
8010563b: 5d pop %ebp
8010563c: c3 ret
8010563d: 8d 76 00 lea 0x0(%esi),%esi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
{
int addr;
int n;
if(argint(0, &n) < 0)
return -1;
<<<<<<< HEAD
801058a0: b8 ff ff ff ff mov $0xffffffff,%eax
801058a5: eb ee jmp 80105895 <sys_sbrk+0x35>
801058a7: 89 f6 mov %esi,%esi
801058a9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801058b0 <sys_sleep>:
return addr;
}
int
sys_sleep(void)
{
801058b0: 55 push %ebp
801058b1: 89 e5 mov %esp,%ebp
801058b3: 53 push %ebx
int n;
uint ticks0;
if(argint(0, &n) < 0)
801058b4: 8d 45 f4 lea -0xc(%ebp),%eax
=======
80105640: b8 ff ff ff ff mov $0xffffffff,%eax
80105645: eb f0 jmp 80105637 <sys_sbrk+0x37>
80105647: 89 f6 mov %esi,%esi
80105649: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80105650 <sys_sleep>:
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
return addr;
}
int
sys_sleep(void)
{
<<<<<<< HEAD
801058b7: 83 ec 1c sub $0x1c,%esp
=======
80105650: 55 push %ebp
80105651: 89 e5 mov %esp,%ebp
80105653: 53 push %ebx
80105654: 83 ec 24 sub $0x24,%esp
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
int n;
uint ticks0;
if(argint(0, &n) < 0)
<<<<<<< HEAD
801058ba: 50 push %eax
801058bb: 6a 00 push $0x0
801058bd: e8 6e f1 ff ff call 80104a30 <argint>
801058c2: 83 c4 10 add $0x10,%esp
801058c5: 85 c0 test %eax,%eax
801058c7: 0f 88 8a 00 00 00 js 80105957 <sys_sleep+0xa7>
return -1;
acquire(&tickslock);
801058cd: 83 ec 0c sub $0xc,%esp
801058d0: 68 e0 4d 11 80 push $0x80114de0
801058d5: e8 36 ec ff ff call 80104510 <acquire>
ticks0 = ticks;
while(ticks - ticks0 < n){
801058da: 8b 55 f4 mov -0xc(%ebp),%edx
801058dd: 83 c4 10 add $0x10,%esp
=======
80105657: 8d 45 f4 lea -0xc(%ebp),%eax
8010565a: 89 44 24 04 mov %eax,0x4(%esp)
8010565e: c7 04 24 00 00 00 00 movl $0x0,(%esp)
80105665: e8 66 f1 ff ff call 801047d0 <argint>
8010566a: 85 c0 test %eax,%eax
8010566c: 78 7e js 801056ec <sys_sleep+0x9c>
return -1;
acquire(&tickslock);
8010566e: c7 04 24 e0 4d 11 80 movl $0x80114de0,(%esp)
80105675: e8 06 ed ff ff call 80104380 <acquire>
ticks0 = ticks;
while(ticks - ticks0 < n){
8010567a: 8b 55 f4 mov -0xc(%ebp),%edx
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
uint ticks0;
if(argint(0, &n) < 0)
return -1;
acquire(&tickslock);
ticks0 = ticks;
<<<<<<< HEAD
801058e0: 8b 1d 20 56 11 80 mov 0x80115620,%ebx
while(ticks - ticks0 < n){
801058e6: 85 d2 test %edx,%edx
801058e8: 75 27 jne 80105911 <sys_sleep+0x61>
801058ea: eb 54 jmp 80105940 <sys_sleep+0x90>
801058ec: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
=======
8010567d: 8b 1d 20 56 11 80 mov 0x80115620,%ebx
while(ticks - ticks0 < n){
80105683: 85 d2 test %edx,%edx
80105685: 75 29 jne 801056b0 <sys_sleep+0x60>
80105687: eb 4f jmp 801056d8 <sys_sleep+0x88>
80105689: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
if(proc->killed){
release(&tickslock);
return -1;
}
sleep(&ticks, &tickslock);
<<<<<<< HEAD
801058f0: 83 ec 08 sub $0x8,%esp
801058f3: 68 e0 4d 11 80 push $0x80114de0
801058f8: 68 20 56 11 80 push $0x80115620
801058fd: e8 4e e6 ff ff call 80103f50 <sleep>
=======
80105690: c7 44 24 04 e0 4d 11 movl $0x80114de0,0x4(%esp)
80105697: 80
80105698: c7 04 24 20 56 11 80 movl $0x80115620,(%esp)
8010569f: e8 9c e6 ff ff call 80103d40 <sleep>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
if(argint(0, &n) < 0)
return -1;
acquire(&tickslock);
ticks0 = ticks;
while(ticks - ticks0 < n){
<<<<<<< HEAD
80105902: a1 20 56 11 80 mov 0x80115620,%eax
80105907: 83 c4 10 add $0x10,%esp
8010590a: 29 d8 sub %ebx,%eax
8010590c: 3b 45 f4 cmp -0xc(%ebp),%eax
8010590f: 73 2f jae 80105940 <sys_sleep+0x90>
if(proc->killed){
80105911: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80105917: 8b 40 24 mov 0x24(%eax),%eax
8010591a: 85 c0 test %eax,%eax
8010591c: 74 d2 je 801058f0 <sys_sleep+0x40>
release(&tickslock);
8010591e: 83 ec 0c sub $0xc,%esp
80105921: 68 e0 4d 11 80 push $0x80114de0
80105926: e8 c5 ed ff ff call 801046f0 <release>
return -1;
8010592b: 83 c4 10 add $0x10,%esp
8010592e: b8 ff ff ff ff mov $0xffffffff,%eax
=======
801056a4: a1 20 56 11 80 mov 0x80115620,%eax
801056a9: 29 d8 sub %ebx,%eax
801056ab: 3b 45 f4 cmp -0xc(%ebp),%eax
801056ae: 73 28 jae 801056d8 <sys_sleep+0x88>
if(proc->killed){
801056b0: 65 a1 04 00 00 00 mov %gs:0x4,%eax
801056b6: 8b 40 24 mov 0x24(%eax),%eax
801056b9: 85 c0 test %eax,%eax
801056bb: 74 d3 je 80105690 <sys_sleep+0x40>
release(&tickslock);
801056bd: c7 04 24 e0 4d 11 80 movl $0x80114de0,(%esp)
801056c4: e8 e7 ed ff ff call 801044b0 <release>
return -1;
801056c9: b8 ff ff ff ff mov $0xffffffff,%eax
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
}
sleep(&ticks, &tickslock);
}
release(&tickslock);
return 0;
}
<<<<<<< HEAD
80105933: 8b 5d fc mov -0x4(%ebp),%ebx
80105936: c9 leave
80105937: c3 ret
80105938: 90 nop
80105939: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
=======
801056ce: 83 c4 24 add $0x24,%esp
801056d1: 5b pop %ebx
801056d2: 5d pop %ebp
801056d3: c3 ret
801056d4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
release(&tickslock);
return -1;
}
sleep(&ticks, &tickslock);
}
release(&tickslock);
<<<<<<< HEAD
80105940: 83 ec 0c sub $0xc,%esp
80105943: 68 e0 4d 11 80 push $0x80114de0
80105948: e8 a3 ed ff ff call 801046f0 <release>
return 0;
8010594d: 83 c4 10 add $0x10,%esp
80105950: 31 c0 xor %eax,%eax
}
80105952: 8b 5d fc mov -0x4(%ebp),%ebx
80105955: c9 leave
80105956: c3 ret
=======
801056d8: c7 04 24 e0 4d 11 80 movl $0x80114de0,(%esp)
801056df: e8 cc ed ff ff call 801044b0 <release>
return 0;
}
801056e4: 83 c4 24 add $0x24,%esp
return -1;
}
sleep(&ticks, &tickslock);
}
release(&tickslock);
return 0;
801056e7: 31 c0 xor %eax,%eax
}
801056e9: 5b pop %ebx
801056ea: 5d pop %ebp
801056eb: c3 ret
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
{
int n;
uint ticks0;
if(argint(0, &n) < 0)
return -1;
<<<<<<< HEAD
80105957: b8 ff ff ff ff mov $0xffffffff,%eax
8010595c: eb d5 jmp 80105933 <sys_sleep+0x83>
8010595e: 66 90 xchg %ax,%ax
80105960 <sys_uptime>:
=======
801056ec: b8 ff ff ff ff mov $0xffffffff,%eax
801056f1: eb db jmp 801056ce <sys_sleep+0x7e>
801056f3: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801056f9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80105700 <sys_uptime>:
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// return how many clock tick interrupts have occurred
// since start.
int
sys_uptime(void)
{
<<<<<<< HEAD
80105960: 55 push %ebp
80105961: 89 e5 mov %esp,%ebp
80105963: 53 push %ebx
80105964: 83 ec 10 sub $0x10,%esp
uint xticks;
acquire(&tickslock);
80105967: 68 e0 4d 11 80 push $0x80114de0
8010596c: e8 9f eb ff ff call 80104510 <acquire>
xticks = ticks;
80105971: 8b 1d 20 56 11 80 mov 0x80115620,%ebx
release(&tickslock);
80105977: c7 04 24 e0 4d 11 80 movl $0x80114de0,(%esp)
8010597e: e8 6d ed ff ff call 801046f0 <release>
return xticks;
}
80105983: 89 d8 mov %ebx,%eax
80105985: 8b 5d fc mov -0x4(%ebp),%ebx
80105988: c9 leave
80105989: c3 ret
8010598a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80105990 <sys_cprocstate>:
=======
80105700: 55 push %ebp
80105701: 89 e5 mov %esp,%ebp
80105703: 53 push %ebx
80105704: 83 ec 14 sub $0x14,%esp
uint xticks;
acquire(&tickslock);
80105707: c7 04 24 e0 4d 11 80 movl $0x80114de0,(%esp)
8010570e: e8 6d ec ff ff call 80104380 <acquire>
xticks = ticks;
80105713: 8b 1d 20 56 11 80 mov 0x80115620,%ebx
release(&tickslock);
80105719: c7 04 24 e0 4d 11 80 movl $0x80114de0,(%esp)
80105720: e8 8b ed ff ff call 801044b0 <release>
return xticks;
}
80105725: 83 c4 14 add $0x14,%esp
80105728: 89 d8 mov %ebx,%eax
8010572a: 5b pop %ebx
8010572b: 5d pop %ebp
8010572c: c3 ret
8010572d: 8d 76 00 lea 0x0(%esi),%esi
80105730 <sys_cprocstate>:
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// syscall for printing current ptable contents
// calls cprocstate() in proc.c
int
sys_cprocstate(void)
{
<<<<<<< HEAD
80105990: 55 push %ebp
80105991: 89 e5 mov %esp,%ebp
80105993: 83 ec 14 sub $0x14,%esp
acquire(&tickslock);
80105996: 68 e0 4d 11 80 push $0x80114de0
8010599b: e8 70 eb ff ff call 80104510 <acquire>
cprocstate();
801059a0: e8 fb e8 ff ff call 801042a0 <cprocstate>
release(&tickslock);
801059a5: c7 04 24 e0 4d 11 80 movl $0x80114de0,(%esp)
801059ac: e8 3f ed ff ff call 801046f0 <release>
return 0;
}
801059b1: 31 c0 xor %eax,%eax
801059b3: c9 leave
801059b4: c3 ret
801059b5: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801059b9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801059c0 <sys_signalinfo>:
=======
80105730: 55 push %ebp
80105731: 89 e5 mov %esp,%ebp
80105733: 83 ec 18 sub $0x18,%esp
acquire(&tickslock);
80105736: c7 04 24 e0 4d 11 80 movl $0x80114de0,(%esp)
8010573d: e8 3e ec ff ff call 80104380 <acquire>
cprocstate();
80105742: e8 49 e9 ff ff call 80104090 <cprocstate>
release(&tickslock);
80105747: c7 04 24 e0 4d 11 80 movl $0x80114de0,(%esp)
8010574e: e8 5d ed ff ff call 801044b0 <release>
return 0;
}
80105753: 31 c0 xor %eax,%eax
80105755: c9 leave
80105756: c3 ret
80105757: 89 f6 mov %esi,%esi
80105759: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80105760 <sys_signalinfo>:
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
//syscall for assigning value to jlength of a process
int
sys_signalinfo(void)
{
<<<<<<< HEAD
801059c0: 55 push %ebp
801059c1: 89 e5 mov %esp,%ebp
801059c3: 83 ec 20 sub $0x20,%esp
int pid,l;
if(argint(0, &pid) < 0 || argint(1, &l) < 0)
801059c6: 8d 45 f0 lea -0x10(%ebp),%eax
801059c9: 50 push %eax
801059ca: 6a 00 push $0x0
801059cc: e8 5f f0 ff ff call 80104a30 <argint>
801059d1: 83 c4 10 add $0x10,%esp
801059d4: 85 c0 test %eax,%eax
801059d6: 78 28 js 80105a00 <sys_signalinfo+0x40>
801059d8: 8d 45 f4 lea -0xc(%ebp),%eax
801059db: 83 ec 08 sub $0x8,%esp
801059de: 50 push %eax
801059df: 6a 01 push $0x1
801059e1: e8 4a f0 ff ff call 80104a30 <argint>
801059e6: 83 c4 10 add $0x10,%esp
801059e9: 85 c0 test %eax,%eax
801059eb: 78 13 js 80105a00 <sys_signalinfo+0x40>
return -1;
return signalinfo(pid,l);
801059ed: 83 ec 08 sub $0x8,%esp
801059f0: ff 75 f4 pushl -0xc(%ebp)
801059f3: ff 75 f0 pushl -0x10(%ebp)
801059f6: e8 65 e9 ff ff call 80104360 <signalinfo>
801059fb: 83 c4 10 add $0x10,%esp
}
801059fe: c9 leave
801059ff: c3 ret
=======
80105760: 55 push %ebp
80105761: 89 e5 mov %esp,%ebp
80105763: 83 ec 28 sub $0x28,%esp
int pid,l;
if(argint(0, &pid) < 0 || argint(1, &l) < 0)
80105766: 8d 45 f0 lea -0x10(%ebp),%eax
80105769: 89 44 24 04 mov %eax,0x4(%esp)
8010576d: c7 04 24 00 00 00 00 movl $0x0,(%esp)
80105774: e8 57 f0 ff ff call 801047d0 <argint>
80105779: 85 c0 test %eax,%eax
8010577b: 78 2b js 801057a8 <sys_signalinfo+0x48>
8010577d: 8d 45 f4 lea -0xc(%ebp),%eax
80105780: 89 44 24 04 mov %eax,0x4(%esp)
80105784: c7 04 24 01 00 00 00 movl $0x1,(%esp)
8010578b: e8 40 f0 ff ff call 801047d0 <argint>
80105790: 85 c0 test %eax,%eax
80105792: 78 14 js 801057a8 <sys_signalinfo+0x48>
return -1;
return signalinfo(pid,l);
80105794: 8b 45 f4 mov -0xc(%ebp),%eax
80105797: 89 44 24 04 mov %eax,0x4(%esp)
8010579b: 8b 45 f0 mov -0x10(%ebp),%eax
8010579e: 89 04 24 mov %eax,(%esp)
801057a1: e8 ca e9 ff ff call 80104170 <signalinfo>
}
801057a6: c9 leave
801057a7: c3 ret
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
sys_signalinfo(void)
{
int pid,l;
if(argint(0, &pid) < 0 || argint(1, &l) < 0)
return -1;
<<<<<<< HEAD
80105a00: b8 ff ff ff ff mov $0xffffffff,%eax
return signalinfo(pid,l);
}
80105a05: c9 leave
80105a06: c3 ret
80105a07: 89 f6 mov %esi,%esi
80105a09: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80105a10 <sys_setseed>:
=======
801057a8: b8 ff ff ff ff mov $0xffffffff,%eax
return signalinfo(pid,l);
}
801057ad: c9 leave
801057ae: c3 ret
801057af: 90 nop
801057b0 <sys_setseed>:
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
//syscall for assigning initial value to seed
int
sys_setseed(void)
{
<<<<<<< HEAD
80105a10: 55 push %ebp
80105a11: 89 e5 mov %esp,%ebp
80105a13: 83 ec 20 sub $0x20,%esp
int l;
if(argint(0, &l) < 0)
80105a16: 8d 45 f4 lea -0xc(%ebp),%eax
80105a19: 50 push %eax
80105a1a: 6a 00 push $0x0
80105a1c: e8 0f f0 ff ff call 80104a30 <argint>
80105a21: 83 c4 10 add $0x10,%esp
80105a24: 85 c0 test %eax,%eax
80105a26: 78 18 js 80105a40 <sys_setseed+0x30>
return -1;
return setseed(l);
80105a28: 83 ec 0c sub $0xc,%esp
80105a2b: ff 75 f4 pushl -0xc(%ebp)
80105a2e: e8 9d e9 ff ff call 801043d0 <setseed>
80105a33: 83 c4 10 add $0x10,%esp
}
80105a36: c9 leave
80105a37: c3 ret
80105a38: 90 nop
80105a39: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
=======
801057b0: 55 push %ebp
801057b1: 89 e5 mov %esp,%ebp
801057b3: 83 ec 28 sub $0x28,%esp
int l;
if(argint(0, &l) < 0)
801057b6: 8d 45 f4 lea -0xc(%ebp),%eax
801057b9: 89 44 24 04 mov %eax,0x4(%esp)
801057bd: c7 04 24 00 00 00 00 movl $0x0,(%esp)
801057c4: e8 07 f0 ff ff call 801047d0 <argint>
801057c9: 85 c0 test %eax,%eax
801057cb: 78 13 js 801057e0 <sys_setseed+0x30>
return -1;
return setseed(l);
801057cd: 8b 45 f4 mov -0xc(%ebp),%eax
801057d0: 89 04 24 mov %eax,(%esp)
801057d3: e8 08 ea ff ff call 801041e0 <setseed>
}
801057d8: c9 leave
801057d9: c3 ret
801057da: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
int
sys_setseed(void)
{
int l;
if(argint(0, &l) < 0)
return -1;
<<<<<<< HEAD
80105a40: b8 ff ff ff ff mov $0xffffffff,%eax
return setseed(l);
}
80105a45: c9 leave
80105a46: c3 ret
80105a47: 66 90 xchg %ax,%ax
80105a49: 66 90 xchg %ax,%ax
80105a4b: 66 90 xchg %ax,%ax
80105a4d: 66 90 xchg %ax,%ax
80105a4f: 90 nop
80105a50 <timerinit>:
=======
801057e0: b8 ff ff ff ff mov $0xffffffff,%eax
return setseed(l);
}
801057e5: c9 leave
801057e6: c3 ret
801057e7: 66 90 xchg %ax,%ax
801057e9: 66 90 xchg %ax,%ax
801057eb: 66 90 xchg %ax,%ax
801057ed: 66 90 xchg %ax,%ax
801057ef: 90 nop
801057f0 <timerinit>:
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
#define TIMER_RATEGEN 0x04 // mode 2, rate generator
#define TIMER_16BIT 0x30 // r/w counter 16 bits, LSB first
void
timerinit(void)
{
<<<<<<< HEAD
80105a50: 55 push %ebp
=======
801057f0: 55 push %ebp
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
}
static inline void
outb(ushort port, uchar data)
{
asm volatile("out %0,%1" : : "a" (data), "d" (port));
<<<<<<< HEAD
80105a51: ba 43 00 00 00 mov $0x43,%edx
80105a56: b8 34 00 00 00 mov $0x34,%eax
80105a5b: 89 e5 mov %esp,%ebp
80105a5d: 83 ec 14 sub $0x14,%esp
80105a60: ee out %al,(%dx)
80105a61: ba 40 00 00 00 mov $0x40,%edx
80105a66: b8 9c ff ff ff mov $0xffffff9c,%eax
80105a6b: ee out %al,(%dx)
80105a6c: b8 2e 00 00 00 mov $0x2e,%eax
80105a71: ee out %al,(%dx)
=======
801057f1: ba 43 00 00 00 mov $0x43,%edx
801057f6: 89 e5 mov %esp,%ebp
801057f8: b8 34 00 00 00 mov $0x34,%eax
801057fd: 83 ec 18 sub $0x18,%esp
80105800: ee out %al,(%dx)
80105801: b8 9c ff ff ff mov $0xffffff9c,%eax
80105806: b2 40 mov $0x40,%dl
80105808: ee out %al,(%dx)
80105809: b8 2e 00 00 00 mov $0x2e,%eax
8010580e: ee out %al,(%dx)
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// Interrupt 100 times/sec.
outb(TIMER_MODE, TIMER_SEL0 | TIMER_RATEGEN | TIMER_16BIT);
outb(IO_TIMER1, TIMER_DIV(100) % 256);
outb(IO_TIMER1, TIMER_DIV(100) / 256);
picenable(IRQ_TIMER);
<<<<<<< HEAD
80105a72: 6a 00 push $0x0
80105a74: e8 07 d8 ff ff call 80103280 <picenable>
}
80105a79: 83 c4 10 add $0x10,%esp
80105a7c: c9 leave
80105a7d: c3 ret
80105a7e <alltraps>:
# vectors.S sends all traps here.
.globl alltraps
alltraps:
# Build trap frame.
pushl %ds
80105a7e: 1e push %ds
pushl %es
80105a7f: 06 push %es
pushl %fs
80105a80: 0f a0 push %fs
pushl %gs
80105a82: 0f a8 push %gs
pushal
80105a84: 60 pusha
# Set up data and per-cpu segments.
movw $(SEG_KDATA<<3), %ax
80105a85: 66 b8 10 00 mov $0x10,%ax
movw %ax, %ds
80105a89: 8e d8 mov %eax,%ds
movw %ax, %es
80105a8b: 8e c0 mov %eax,%es
movw $(SEG_KCPU<<3), %ax
80105a8d: 66 b8 18 00 mov $0x18,%ax
movw %ax, %fs
80105a91: 8e e0 mov %eax,%fs
movw %ax, %gs
80105a93: 8e e8 mov %eax,%gs
# Call trap(tf), where tf=%esp
pushl %esp
80105a95: 54 push %esp
call trap
80105a96: e8 e5 00 00 00 call 80105b80 <trap>
addl $4, %esp
80105a9b: 83 c4 04 add $0x4,%esp
80105a9e <trapret>:
# Return falls through to trapret...
.globl trapret
trapret:
popal
80105a9e: 61 popa
popl %gs
80105a9f: 0f a9 pop %gs
popl %fs
80105aa1: 0f a1 pop %fs
popl %es
80105aa3: 07 pop %es
popl %ds
80105aa4: 1f pop %ds
addl $0x8, %esp # trapno and errcode
80105aa5: 83 c4 08 add $0x8,%esp
iret
80105aa8: cf iret
80105aa9: 66 90 xchg %ax,%ax
80105aab: 66 90 xchg %ax,%ax
80105aad: 66 90 xchg %ax,%ax
80105aaf: 90 nop
80105ab0 <tvinit>:
=======
8010580f: c7 04 24 00 00 00 00 movl $0x0,(%esp)
80105816: e8 d5 d9 ff ff call 801031f0 <picenable>
}
8010581b: c9 leave
8010581c: c3 ret
8010581d <alltraps>:
8010581d: 1e push %ds
8010581e: 06 push %es
8010581f: 0f a0 push %fs
80105821: 0f a8 push %gs
80105823: 60 pusha
80105824: 66 b8 10 00 mov $0x10,%ax
80105828: 8e d8 mov %eax,%ds
8010582a: 8e c0 mov %eax,%es
8010582c: 66 b8 18 00 mov $0x18,%ax
80105830: 8e e0 mov %eax,%fs
80105832: 8e e8 mov %eax,%gs
80105834: 54 push %esp
80105835: e8 e6 00 00 00 call 80105920 <trap>
8010583a: 83 c4 04 add $0x4,%esp
8010583d <trapret>:
8010583d: 61 popa
8010583e: 0f a9 pop %gs
80105840: 0f a1 pop %fs
80105842: 07 pop %es
80105843: 1f pop %ds
80105844: 83 c4 08 add $0x8,%esp
80105847: cf iret
80105848: 66 90 xchg %ax,%ax
8010584a: 66 90 xchg %ax,%ax
8010584c: 66 90 xchg %ax,%ax
8010584e: 66 90 xchg %ax,%ax
80105850 <tvinit>:
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
void
tvinit(void)
{
int i;
for(i = 0; i < 256; i++)
<<<<<<< HEAD
80105ab0: 31 c0 xor %eax,%eax
80105ab2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
SETGATE(idt[i], 0, SEG_KCODE<<3, vectors[i], 0);
80105ab8: 8b 14 85 10 a0 10 80 mov -0x7fef5ff0(,%eax,4),%edx
80105abf: b9 08 00 00 00 mov $0x8,%ecx
80105ac4: c6 04 c5 24 4e 11 80 movb $0x0,-0x7feeb1dc(,%eax,8)
80105acb: 00
80105acc: 66 89 0c c5 22 4e 11 mov %cx,-0x7feeb1de(,%eax,8)
80105ad3: 80
80105ad4: c6 04 c5 25 4e 11 80 movb $0x8e,-0x7feeb1db(,%eax,8)
80105adb: 8e
80105adc: 66 89 14 c5 20 4e 11 mov %dx,-0x7feeb1e0(,%eax,8)
80105ae3: 80
80105ae4: c1 ea 10 shr $0x10,%edx
80105ae7: 66 89 14 c5 26 4e 11 mov %dx,-0x7feeb1da(,%eax,8)
80105aee: 80
=======
80105850: 31 c0 xor %eax,%eax
80105852: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
SETGATE(idt[i], 0, SEG_KCODE<<3, vectors[i], 0);
80105858: 8b 14 85 10 a0 10 80 mov -0x7fef5ff0(,%eax,4),%edx
8010585f: b9 08 00 00 00 mov $0x8,%ecx
80105864: 66 89 0c c5 22 4e 11 mov %cx,-0x7feeb1de(,%eax,8)
8010586b: 80
8010586c: c6 04 c5 24 4e 11 80 movb $0x0,-0x7feeb1dc(,%eax,8)
80105873: 00
80105874: c6 04 c5 25 4e 11 80 movb $0x8e,-0x7feeb1db(,%eax,8)
8010587b: 8e
8010587c: 66 89 14 c5 20 4e 11 mov %dx,-0x7feeb1e0(,%eax,8)
80105883: 80
80105884: c1 ea 10 shr $0x10,%edx
80105887: 66 89 14 c5 26 4e 11 mov %dx,-0x7feeb1da(,%eax,8)
8010588e: 80
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
void
tvinit(void)
{
int i;
for(i = 0; i < 256; i++)
<<<<<<< HEAD
80105aef: 83 c0 01 add $0x1,%eax
80105af2: 3d 00 01 00 00 cmp $0x100,%eax
80105af7: 75 bf jne 80105ab8 <tvinit+0x8>
=======
8010588f: 83 c0 01 add $0x1,%eax
80105892: 3d 00 01 00 00 cmp $0x100,%eax
80105897: 75 bf jne 80105858 <tvinit+0x8>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
struct spinlock tickslock;
uint ticks;
void
tvinit(void)
{
<<<<<<< HEAD
80105af9: 55 push %ebp
=======
80105899: 55 push %ebp
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
int i;
for(i = 0; i < 256; i++)
SETGATE(idt[i], 0, SEG_KCODE<<3, vectors[i], 0);
SETGATE(idt[T_SYSCALL], 1, SEG_KCODE<<3, vectors[T_SYSCALL], DPL_USER);
<<<<<<< HEAD
80105afa: ba 08 00 00 00 mov $0x8,%edx
=======
8010589a: ba 08 00 00 00 mov $0x8,%edx
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
struct spinlock tickslock;
uint ticks;
void
tvinit(void)
{
<<<<<<< HEAD
80105aff: 89 e5 mov %esp,%ebp
80105b01: 83 ec 10 sub $0x10,%esp
=======
8010589f: 89 e5 mov %esp,%ebp
801058a1: 83 ec 18 sub $0x18,%esp
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
int i;
for(i = 0; i < 256; i++)
SETGATE(idt[i], 0, SEG_KCODE<<3, vectors[i], 0);
SETGATE(idt[T_SYSCALL], 1, SEG_KCODE<<3, vectors[T_SYSCALL], DPL_USER);
<<<<<<< HEAD
80105b04: a1 10 a1 10 80 mov 0x8010a110,%eax
initlock(&tickslock, "time");
80105b09: 68 09 7b 10 80 push $0x80107b09
80105b0e: 68 e0 4d 11 80 push $0x80114de0
=======
801058a4: a1 10 a1 10 80 mov 0x8010a110,%eax
initlock(&tickslock, "time");
801058a9: c7 44 24 04 a9 78 10 movl $0x801078a9,0x4(%esp)
801058b0: 80
801058b1: c7 04 24 e0 4d 11 80 movl $0x80114de0,(%esp)
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
{
int i;
for(i = 0; i < 256; i++)
SETGATE(idt[i], 0, SEG_KCODE<<3, vectors[i], 0);
SETGATE(idt[T_SYSCALL], 1, SEG_KCODE<<3, vectors[T_SYSCALL], DPL_USER);
<<<<<<< HEAD
80105b13: 66 89 15 22 50 11 80 mov %dx,0x80115022
80105b1a: c6 05 24 50 11 80 00 movb $0x0,0x80115024
80105b21: 66 a3 20 50 11 80 mov %ax,0x80115020
80105b27: c1 e8 10 shr $0x10,%eax
80105b2a: c6 05 25 50 11 80 ef movb $0xef,0x80115025
80105b31: 66 a3 26 50 11 80 mov %ax,0x80115026
initlock(&tickslock, "time");
80105b37: e8 b4 e9 ff ff call 801044f0 <initlock>
}
80105b3c: 83 c4 10 add $0x10,%esp
80105b3f: c9 leave
80105b40: c3 ret
80105b41: eb 0d jmp 80105b50 <idtinit>
80105b43: 90 nop
80105b44: 90 nop
80105b45: 90 nop
80105b46: 90 nop
80105b47: 90 nop
80105b48: 90 nop
80105b49: 90 nop
80105b4a: 90 nop
80105b4b: 90 nop
80105b4c: 90 nop
80105b4d: 90 nop
80105b4e: 90 nop
80105b4f: 90 nop
80105b50 <idtinit>:
=======
801058b8: 66 89 15 22 50 11 80 mov %dx,0x80115022
801058bf: 66 a3 20 50 11 80 mov %ax,0x80115020
801058c5: c1 e8 10 shr $0x10,%eax
801058c8: c6 05 24 50 11 80 00 movb $0x0,0x80115024
801058cf: c6 05 25 50 11 80 ef movb $0xef,0x80115025
801058d6: 66 a3 26 50 11 80 mov %ax,0x80115026
initlock(&tickslock, "time");
801058dc: e8 1f ea ff ff call 80104300 <initlock>
}
801058e1: c9 leave
801058e2: c3 ret
801058e3: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801058e9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801058f0 <idtinit>:
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
void
idtinit(void)
{
<<<<<<< HEAD
80105b50: 55 push %ebp
=======
801058f0: 55 push %ebp
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
static inline void
lidt(struct gatedesc *p, int size)
{
volatile ushort pd[3];
pd[0] = size-1;
<<<<<<< HEAD
80105b51: b8 ff 07 00 00 mov $0x7ff,%eax
80105b56: 89 e5 mov %esp,%ebp
80105b58: 83 ec 10 sub $0x10,%esp
80105b5b: 66 89 45 fa mov %ax,-0x6(%ebp)
pd[1] = (uint)p;
80105b5f: b8 20 4e 11 80 mov $0x80114e20,%eax
80105b64: 66 89 45 fc mov %ax,-0x4(%ebp)
pd[2] = (uint)p >> 16;
80105b68: c1 e8 10 shr $0x10,%eax
80105b6b: 66 89 45 fe mov %ax,-0x2(%ebp)
asm volatile("lidt (%0)" : : "r" (pd));
80105b6f: 8d 45 fa lea -0x6(%ebp),%eax
80105b72: 0f 01 18 lidtl (%eax)
lidt(idt, sizeof(idt));
}
80105b75: c9 leave
80105b76: c3 ret
80105b77: 89 f6 mov %esi,%esi
80105b79: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80105b80 <trap>:
=======
801058f1: b8 ff 07 00 00 mov $0x7ff,%eax
801058f6: 89 e5 mov %esp,%ebp
801058f8: 83 ec 10 sub $0x10,%esp
801058fb: 66 89 45 fa mov %ax,-0x6(%ebp)
pd[1] = (uint)p;
801058ff: b8 20 4e 11 80 mov $0x80114e20,%eax
80105904: 66 89 45 fc mov %ax,-0x4(%ebp)
pd[2] = (uint)p >> 16;
80105908: c1 e8 10 shr $0x10,%eax
8010590b: 66 89 45 fe mov %ax,-0x2(%ebp)
asm volatile("lidt (%0)" : : "r" (pd));
8010590f: 8d 45 fa lea -0x6(%ebp),%eax
80105912: 0f 01 18 lidtl (%eax)
lidt(idt, sizeof(idt));
}
80105915: c9 leave
80105916: c3 ret
80105917: 89 f6 mov %esi,%esi
80105919: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80105920 <trap>:
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
//PAGEBREAK: 41
void
trap(struct trapframe *tf)
{
<<<<<<< HEAD
80105b80: 55 push %ebp
80105b81: 89 e5 mov %esp,%ebp
80105b83: 57 push %edi
80105b84: 56 push %esi
80105b85: 53 push %ebx
80105b86: 83 ec 0c sub $0xc,%esp
80105b89: 8b 5d 08 mov 0x8(%ebp),%ebx
if(tf->trapno == T_SYSCALL){
80105b8c: 8b 43 30 mov 0x30(%ebx),%eax
80105b8f: 83 f8 40 cmp $0x40,%eax
80105b92: 0f 84 f8 00 00 00 je 80105c90 <trap+0x110>
=======
80105920: 55 push %ebp
80105921: 89 e5 mov %esp,%ebp
80105923: 57 push %edi
80105924: 56 push %esi
80105925: 53 push %ebx
80105926: 83 ec 2c sub $0x2c,%esp
80105929: 8b 5d 08 mov 0x8(%ebp),%ebx
if(tf->trapno == T_SYSCALL){
8010592c: 8b 43 30 mov 0x30(%ebx),%eax
8010592f: 83 f8 40 cmp $0x40,%eax
80105932: 0f 84 00 01 00 00 je 80105a38 <trap+0x118>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
if(proc->killed)
exit();
return;
}
switch(tf->trapno){
<<<<<<< HEAD
80105b98: 83 e8 20 sub $0x20,%eax
80105b9b: 83 f8 1f cmp $0x1f,%eax
80105b9e: 77 68 ja 80105c08 <trap+0x88>
80105ba0: ff 24 85 b0 7b 10 80 jmp *-0x7fef8450(,%eax,4)
80105ba7: 89 f6 mov %esi,%esi
80105ba9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
case T_IRQ0 + IRQ_TIMER:
if(cpunum() == 0){
80105bb0: e8 1b cb ff ff call 801026d0 <cpunum>
80105bb5: 85 c0 test %eax,%eax
80105bb7: 0f 84 b3 01 00 00 je 80105d70 <trap+0x1f0>
kbdintr();
lapiceoi();
break;
case T_IRQ0 + IRQ_COM1:
uartintr();
lapiceoi();
80105bbd: e8 ae cb ff ff call 80102770 <lapiceoi>
=======
80105938: 83 e8 20 sub $0x20,%eax
8010593b: 83 f8 1f cmp $0x1f,%eax
8010593e: 77 60 ja 801059a0 <trap+0x80>
80105940: ff 24 85 50 79 10 80 jmp *-0x7fef86b0(,%eax,4)
80105947: 90 nop
case T_IRQ0 + IRQ_TIMER:
if(cpunum() == 0){
80105948: e8 03 ce ff ff call 80102750 <cpunum>
8010594d: 85 c0 test %eax,%eax
8010594f: 90 nop
80105950: 0f 84 d2 01 00 00 je 80105b28 <trap+0x208>
acquire(&tickslock);
ticks++;
wakeup(&ticks);
release(&tickslock);
}
lapiceoi();
80105956: e8 95 ce ff ff call 801027f0 <lapiceoi>
8010595b: 65 a1 04 00 00 00 mov %gs:0x4,%eax
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
}
// 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)
<<<<<<< HEAD
80105bc2: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80105bc8: 85 c0 test %eax,%eax
80105bca: 74 2d je 80105bf9 <trap+0x79>
80105bcc: 8b 50 24 mov 0x24(%eax),%edx
80105bcf: 85 d2 test %edx,%edx
80105bd1: 0f 85 86 00 00 00 jne 80105c5d <trap+0xdd>
=======
80105961: 85 c0 test %eax,%eax
80105963: 74 2d je 80105992 <trap+0x72>
80105965: 8b 50 24 mov 0x24(%eax),%edx
80105968: 85 d2 test %edx,%edx
8010596a: 0f 85 9c 00 00 00 jne 80105a0c <trap+0xec>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
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)
<<<<<<< HEAD
80105bd7: 83 78 0c 04 cmpl $0x4,0xc(%eax)
80105bdb: 0f 84 ef 00 00 00 je 80105cd0 <trap+0x150>
=======
80105970: 83 78 0c 04 cmpl $0x4,0xc(%eax)
80105974: 0f 84 86 01 00 00 je 80105b00 <trap+0x1e0>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
yield();
// Check if the process has been killed since we yielded
if(proc && proc->killed && (tf->cs&3) == DPL_USER)
<<<<<<< HEAD
80105be1: 8b 40 24 mov 0x24(%eax),%eax
80105be4: 85 c0 test %eax,%eax
80105be6: 74 11 je 80105bf9 <trap+0x79>
80105be8: 0f b7 43 3c movzwl 0x3c(%ebx),%eax
80105bec: 83 e0 03 and $0x3,%eax
80105bef: 66 83 f8 03 cmp $0x3,%ax
80105bf3: 0f 84 c1 00 00 00 je 80105cba <trap+0x13a>
exit();
}
80105bf9: 8d 65 f4 lea -0xc(%ebp),%esp
80105bfc: 5b pop %ebx
80105bfd: 5e pop %esi
80105bfe: 5f pop %edi
80105bff: 5d pop %ebp
80105c00: c3 ret
80105c01: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
=======
8010597a: 8b 40 24 mov 0x24(%eax),%eax
8010597d: 85 c0 test %eax,%eax
8010597f: 74 11 je 80105992 <trap+0x72>
80105981: 0f b7 43 3c movzwl 0x3c(%ebx),%eax
80105985: 83 e0 03 and $0x3,%eax
80105988: 66 83 f8 03 cmp $0x3,%ax
8010598c: 0f 84 d0 00 00 00 je 80105a62 <trap+0x142>
exit();
}
80105992: 83 c4 2c add $0x2c,%esp
80105995: 5b pop %ebx
80105996: 5e pop %esi
80105997: 5f pop %edi
80105998: 5d pop %ebp
80105999: c3 ret
8010599a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
lapiceoi();
break;
//PAGEBREAK: 13
default:
if(proc == 0 || (tf->cs&3) == 0){
<<<<<<< HEAD
80105c08: 65 8b 0d 04 00 00 00 mov %gs:0x4,%ecx
80105c0f: 85 c9 test %ecx,%ecx
80105c11: 0f 84 8d 01 00 00 je 80105da4 <trap+0x224>
80105c17: f6 43 3c 03 testb $0x3,0x3c(%ebx)
80105c1b: 0f 84 83 01 00 00 je 80105da4 <trap+0x224>
=======
801059a0: 65 8b 0d 04 00 00 00 mov %gs:0x4,%ecx
801059a7: 85 c9 test %ecx,%ecx
801059a9: 0f 84 a9 01 00 00 je 80105b58 <trap+0x238>
801059af: f6 43 3c 03 testb $0x3,0x3c(%ebx)
801059b3: 0f 84 9f 01 00 00 je 80105b58 <trap+0x238>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
static inline uint
rcr2(void)
{
uint val;
asm volatile("movl %%cr2,%0" : "=r" (val));
<<<<<<< HEAD
80105c21: 0f 20 d7 mov %cr2,%edi
=======
801059b9: 0f 20 d7 mov %cr2,%edi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
cprintf("unexpected trap %d from cpu %d eip %x (cr2=0x%x)\n",
tf->trapno, cpunum(), tf->eip, rcr2());
panic("trap");
}
// In user space, assume process misbehaved.
cprintf("pid %d %s: trap %d err %d on cpu %d "
<<<<<<< HEAD
80105c24: 8b 73 38 mov 0x38(%ebx),%esi
80105c27: e8 a4 ca ff ff call 801026d0 <cpunum>
"eip 0x%x addr 0x%x--kill proc\n",
proc->pid, proc->name, tf->trapno, tf->err, cpunum(), tf->eip,
80105c2c: 65 8b 15 04 00 00 00 mov %gs:0x4,%edx
=======
801059bc: 8b 73 38 mov 0x38(%ebx),%esi
801059bf: e8 8c cd ff ff call 80102750 <cpunum>
"eip 0x%x addr 0x%x--kill proc\n",
proc->pid, proc->name, tf->trapno, tf->err, cpunum(), tf->eip,
801059c4: 65 8b 15 04 00 00 00 mov %gs:0x4,%edx
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
cprintf("unexpected trap %d from cpu %d eip %x (cr2=0x%x)\n",
tf->trapno, cpunum(), tf->eip, rcr2());
panic("trap");
}
// In user space, assume process misbehaved.
cprintf("pid %d %s: trap %d err %d on cpu %d "
<<<<<<< HEAD
80105c33: 57 push %edi
80105c34: 56 push %esi
80105c35: 50 push %eax
80105c36: ff 73 34 pushl 0x34(%ebx)
80105c39: ff 73 30 pushl 0x30(%ebx)
"eip 0x%x addr 0x%x--kill proc\n",
proc->pid, proc->name, tf->trapno, tf->err, cpunum(), tf->eip,
80105c3c: 8d 42 6c lea 0x6c(%edx),%eax
=======
801059cb: 89 7c 24 1c mov %edi,0x1c(%esp)
801059cf: 89 74 24 18 mov %esi,0x18(%esp)
801059d3: 89 44 24 14 mov %eax,0x14(%esp)
801059d7: 8b 43 34 mov 0x34(%ebx),%eax
801059da: 89 44 24 10 mov %eax,0x10(%esp)
801059de: 8b 43 30 mov 0x30(%ebx),%eax
801059e1: 89 44 24 0c mov %eax,0xc(%esp)
"eip 0x%x addr 0x%x--kill proc\n",
proc->pid, proc->name, tf->trapno, tf->err, cpunum(), tf->eip,
801059e5: 8d 42 6c lea 0x6c(%edx),%eax
801059e8: 89 44 24 08 mov %eax,0x8(%esp)
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
cprintf("unexpected trap %d from cpu %d eip %x (cr2=0x%x)\n",
tf->trapno, cpunum(), tf->eip, rcr2());
panic("trap");
}
// In user space, assume process misbehaved.
cprintf("pid %d %s: trap %d err %d on cpu %d "
<<<<<<< HEAD
80105c3f: 50 push %eax
80105c40: ff 72 10 pushl 0x10(%edx)
80105c43: 68 6c 7b 10 80 push $0x80107b6c
80105c48: e8 13 aa ff ff call 80100660 <cprintf>
=======
801059ec: 8b 42 10 mov 0x10(%edx),%eax
801059ef: c7 04 24 0c 79 10 80 movl $0x8010790c,(%esp)
801059f6: 89 44 24 04 mov %eax,0x4(%esp)
801059fa: e8 51 ac ff ff call 80100650 <cprintf>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
"eip 0x%x addr 0x%x--kill proc\n",
proc->pid, proc->name, tf->trapno, tf->err, cpunum(), tf->eip,
rcr2());
proc->killed = 1;
<<<<<<< HEAD
80105c4d: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80105c53: 83 c4 20 add $0x20,%esp
80105c56: c7 40 24 01 00 00 00 movl $0x1,0x24(%eax)
=======
801059ff: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80105a05: c7 40 24 01 00 00 00 movl $0x1,0x24(%eax)
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
}
// 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)
<<<<<<< HEAD
80105c5d: 0f b7 53 3c movzwl 0x3c(%ebx),%edx
80105c61: 83 e2 03 and $0x3,%edx
80105c64: 66 83 fa 03 cmp $0x3,%dx
80105c68: 0f 85 69 ff ff ff jne 80105bd7 <trap+0x57>
exit();
80105c6e: e8 4d e1 ff ff call 80103dc0 <exit>
80105c73: 65 a1 04 00 00 00 mov %gs:0x4,%eax
=======
80105a0c: 0f b7 53 3c movzwl 0x3c(%ebx),%edx
80105a10: 83 e2 03 and $0x3,%edx
80105a13: 66 83 fa 03 cmp $0x3,%dx
80105a17: 0f 85 53 ff ff ff jne 80105970 <trap+0x50>
exit();
80105a1d: e8 ae e1 ff ff call 80103bd0 <exit>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// 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)
<<<<<<< HEAD
80105c79: 85 c0 test %eax,%eax
80105c7b: 0f 85 56 ff ff ff jne 80105bd7 <trap+0x57>
80105c81: e9 73 ff ff ff jmp 80105bf9 <trap+0x79>
80105c86: 8d 76 00 lea 0x0(%esi),%esi
80105c89: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
=======
80105a22: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80105a28: 85 c0 test %eax,%eax
80105a2a: 0f 85 40 ff ff ff jne 80105970 <trap+0x50>
80105a30: e9 5d ff ff ff jmp 80105992 <trap+0x72>
80105a35: 8d 76 00 lea 0x0(%esi),%esi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
//PAGEBREAK: 41
void
trap(struct trapframe *tf)
{
if(tf->trapno == T_SYSCALL){
if(proc->killed)
<<<<<<< HEAD
80105c90: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80105c96: 8b 70 24 mov 0x24(%eax),%esi
80105c99: 85 f6 test %esi,%esi
80105c9b: 0f 85 bf 00 00 00 jne 80105d60 <trap+0x1e0>
exit();
proc->tf = tf;
80105ca1: 89 58 18 mov %ebx,0x18(%eax)
syscall();
80105ca4: e8 97 ee ff ff call 80104b40 <syscall>
if(proc->killed)
80105ca9: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80105caf: 8b 58 24 mov 0x24(%eax),%ebx
80105cb2: 85 db test %ebx,%ebx
80105cb4: 0f 84 3f ff ff ff je 80105bf9 <trap+0x79>
=======
80105a38: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80105a3e: 8b 70 24 mov 0x24(%eax),%esi
80105a41: 85 f6 test %esi,%esi
80105a43: 0f 85 a7 00 00 00 jne 80105af0 <trap+0x1d0>
exit();
proc->tf = tf;
80105a49: 89 58 18 mov %ebx,0x18(%eax)
syscall();
80105a4c: e8 8f ee ff ff call 801048e0 <syscall>
if(proc->killed)
80105a51: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80105a57: 8b 58 24 mov 0x24(%eax),%ebx
80105a5a: 85 db test %ebx,%ebx
80105a5c: 0f 84 30 ff ff ff je 80105992 <trap+0x72>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
yield();
// Check if the process has been killed since we yielded
if(proc && proc->killed && (tf->cs&3) == DPL_USER)
exit();
}
<<<<<<< HEAD
80105cba: 8d 65 f4 lea -0xc(%ebp),%esp
80105cbd: 5b pop %ebx
80105cbe: 5e pop %esi
80105cbf: 5f pop %edi
80105cc0: 5d pop %ebp
=======
80105a62: 83 c4 2c add $0x2c,%esp
80105a65: 5b pop %ebx
80105a66: 5e pop %esi
80105a67: 5f pop %edi
80105a68: 5d pop %ebp
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
if(proc->killed)
exit();
proc->tf = tf;
syscall();
if(proc->killed)
exit();
<<<<<<< HEAD
80105cc1: e9 fa e0 ff ff jmp 80103dc0 <exit>
80105cc6: 8d 76 00 lea 0x0(%esi),%esi
80105cc9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
if(proc && proc->killed && (tf->cs&3) == DPL_USER)
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)
80105cd0: 83 7b 30 20 cmpl $0x20,0x30(%ebx)
80105cd4: 0f 85 07 ff ff ff jne 80105be1 <trap+0x61>
yield();
80105cda: e8 31 e2 ff ff call 80103f10 <yield>
80105cdf: 65 a1 04 00 00 00 mov %gs:0x4,%eax
// Check if the process has been killed since we yielded
if(proc && proc->killed && (tf->cs&3) == DPL_USER)
80105ce5: 85 c0 test %eax,%eax
80105ce7: 0f 85 f4 fe ff ff jne 80105be1 <trap+0x61>
80105ced: e9 07 ff ff ff jmp 80105bf9 <trap+0x79>
80105cf2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
=======
80105a69: e9 62 e1 ff ff jmp 80103bd0 <exit>
80105a6e: 66 90 xchg %ax,%ax
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
break;
case T_IRQ0 + IRQ_IDE+1:
// Bochs generates spurious IDE1 interrupts.
break;
case T_IRQ0 + IRQ_KBD:
kbdintr();
<<<<<<< HEAD
80105cf8: e8 b3 c8 ff ff call 801025b0 <kbdintr>
lapiceoi();
80105cfd: e8 6e ca ff ff call 80102770 <lapiceoi>
break;
80105d02: e9 bb fe ff ff jmp 80105bc2 <trap+0x42>
80105d07: 89 f6 mov %esi,%esi
80105d09: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
case T_IRQ0 + IRQ_COM1:
uartintr();
80105d10: e8 2b 02 00 00 call 80105f40 <uartintr>
80105d15: e9 a3 fe ff ff jmp 80105bbd <trap+0x3d>
80105d1a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
=======
80105a70: e8 4b cb ff ff call 801025c0 <kbdintr>
lapiceoi();
80105a75: e8 76 cd ff ff call 801027f0 <lapiceoi>
80105a7a: 65 a1 04 00 00 00 mov %gs:0x4,%eax
break;
80105a80: e9 dc fe ff ff jmp 80105961 <trap+0x41>
80105a85: 8d 76 00 lea 0x0(%esi),%esi
release(&tickslock);
}
lapiceoi();
break;
case T_IRQ0 + IRQ_IDE:
ideintr();
80105a88: e8 e3 c5 ff ff call 80102070 <ideintr>
lapiceoi();
80105a8d: e8 5e cd ff ff call 801027f0 <lapiceoi>
80105a92: 65 a1 04 00 00 00 mov %gs:0x4,%eax
break;
80105a98: e9 c4 fe ff ff jmp 80105961 <trap+0x41>
80105a9d: 8d 76 00 lea 0x0(%esi),%esi
case T_IRQ0 + IRQ_KBD:
kbdintr();
lapiceoi();
break;
case T_IRQ0 + IRQ_COM1:
uartintr();
80105aa0: e8 1b 02 00 00 call 80105cc0 <uartintr>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
lapiceoi();
80105aa5: e8 46 cd ff ff call 801027f0 <lapiceoi>
80105aaa: 65 a1 04 00 00 00 mov %gs:0x4,%eax
break;
80105ab0: e9 ac fe ff ff jmp 80105961 <trap+0x41>
80105ab5: 8d 76 00 lea 0x0(%esi),%esi
case T_IRQ0 + 7:
case T_IRQ0 + IRQ_SPURIOUS:
cprintf("cpu%d: spurious interrupt at %x:%x\n",
<<<<<<< HEAD
80105d20: 0f b7 73 3c movzwl 0x3c(%ebx),%esi
80105d24: 8b 7b 38 mov 0x38(%ebx),%edi
80105d27: e8 a4 c9 ff ff call 801026d0 <cpunum>
80105d2c: 57 push %edi
80105d2d: 56 push %esi
80105d2e: 50 push %eax
80105d2f: 68 14 7b 10 80 push $0x80107b14
80105d34: e8 27 a9 ff ff call 80100660 <cprintf>
cpunum(), tf->cs, tf->eip);
lapiceoi();
80105d39: e8 32 ca ff ff call 80102770 <lapiceoi>
break;
80105d3e: 83 c4 10 add $0x10,%esp
80105d41: e9 7c fe ff ff jmp 80105bc2 <trap+0x42>
80105d46: 8d 76 00 lea 0x0(%esi),%esi
80105d49: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
release(&tickslock);
}
lapiceoi();
break;
case T_IRQ0 + IRQ_IDE:
ideintr();
80105d50: e8 cb c2 ff ff call 80102020 <ideintr>
lapiceoi();
80105d55: e8 16 ca ff ff call 80102770 <lapiceoi>
break;
80105d5a: e9 63 fe ff ff jmp 80105bc2 <trap+0x42>
80105d5f: 90 nop
=======
80105ab8: 8b 7b 38 mov 0x38(%ebx),%edi
80105abb: 0f b7 73 3c movzwl 0x3c(%ebx),%esi
80105abf: e8 8c cc ff ff call 80102750 <cpunum>
80105ac4: c7 04 24 b4 78 10 80 movl $0x801078b4,(%esp)
80105acb: 89 7c 24 0c mov %edi,0xc(%esp)
80105acf: 89 74 24 08 mov %esi,0x8(%esp)
80105ad3: 89 44 24 04 mov %eax,0x4(%esp)
80105ad7: e8 74 ab ff ff call 80100650 <cprintf>
cpunum(), tf->cs, tf->eip);
lapiceoi();
80105adc: e8 0f cd ff ff call 801027f0 <lapiceoi>
80105ae1: 65 a1 04 00 00 00 mov %gs:0x4,%eax
break;
80105ae7: e9 75 fe ff ff jmp 80105961 <trap+0x41>
80105aec: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
void
trap(struct trapframe *tf)
{
if(tf->trapno == T_SYSCALL){
if(proc->killed)
exit();
<<<<<<< HEAD
80105d60: e8 5b e0 ff ff call 80103dc0 <exit>
80105d65: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80105d6b: e9 31 ff ff ff jmp 80105ca1 <trap+0x121>
=======
80105af0: e8 db e0 ff ff call 80103bd0 <exit>
80105af5: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80105afb: e9 49 ff ff ff jmp 80105a49 <trap+0x129>
if(proc && proc->killed && (tf->cs&3) == DPL_USER)
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)
80105b00: 83 7b 30 20 cmpl $0x20,0x30(%ebx)
80105b04: 0f 85 70 fe ff ff jne 8010597a <trap+0x5a>
yield();
80105b0a: e8 f1 e1 ff ff call 80103d00 <yield>
// Check if the process has been killed since we yielded
if(proc && proc->killed && (tf->cs&3) == DPL_USER)
80105b0f: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80105b15: 85 c0 test %eax,%eax
80105b17: 0f 85 5d fe ff ff jne 8010597a <trap+0x5a>
80105b1d: e9 70 fe ff ff jmp 80105992 <trap+0x72>
80105b22: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
}
switch(tf->trapno){
case T_IRQ0 + IRQ_TIMER:
if(cpunum() == 0){
acquire(&tickslock);
<<<<<<< HEAD
80105d70: 83 ec 0c sub $0xc,%esp
80105d73: 68 e0 4d 11 80 push $0x80114de0
80105d78: e8 93 e7 ff ff call 80104510 <acquire>
ticks++;
wakeup(&ticks);
80105d7d: c7 04 24 20 56 11 80 movl $0x80115620,(%esp)
=======
80105b28: c7 04 24 e0 4d 11 80 movl $0x80114de0,(%esp)
80105b2f: e8 4c e8 ff ff call 80104380 <acquire>
ticks++;
wakeup(&ticks);
80105b34: c7 04 24 20 56 11 80 movl $0x80115620,(%esp)
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
switch(tf->trapno){
case T_IRQ0 + IRQ_TIMER:
if(cpunum() == 0){
acquire(&tickslock);
ticks++;
<<<<<<< HEAD
80105d84: 83 05 20 56 11 80 01 addl $0x1,0x80115620
wakeup(&ticks);
80105d8b: e8 60 e3 ff ff call 801040f0 <wakeup>
release(&tickslock);
80105d90: c7 04 24 e0 4d 11 80 movl $0x80114de0,(%esp)
80105d97: e8 54 e9 ff ff call 801046f0 <release>
80105d9c: 83 c4 10 add $0x10,%esp
80105d9f: e9 19 fe ff ff jmp 80105bbd <trap+0x3d>
80105da4: 0f 20 d7 mov %cr2,%edi
=======
80105b3b: 83 05 20 56 11 80 01 addl $0x1,0x80115620
wakeup(&ticks);
80105b42: e8 99 e3 ff ff call 80103ee0 <wakeup>
release(&tickslock);
80105b47: c7 04 24 e0 4d 11 80 movl $0x80114de0,(%esp)
80105b4e: e8 5d e9 ff ff call 801044b0 <release>
80105b53: e9 fe fd ff ff jmp 80105956 <trap+0x36>
80105b58: 0f 20 d7 mov %cr2,%edi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
//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",
<<<<<<< HEAD
80105da7: 8b 73 38 mov 0x38(%ebx),%esi
80105daa: e8 21 c9 ff ff call 801026d0 <cpunum>
80105daf: 83 ec 0c sub $0xc,%esp
80105db2: 57 push %edi
80105db3: 56 push %esi
80105db4: 50 push %eax
80105db5: ff 73 30 pushl 0x30(%ebx)
80105db8: 68 38 7b 10 80 push $0x80107b38
80105dbd: e8 9e a8 ff ff call 80100660 <cprintf>
tf->trapno, cpunum(), tf->eip, rcr2());
panic("trap");
80105dc2: 83 c4 14 add $0x14,%esp
80105dc5: 68 0e 7b 10 80 push $0x80107b0e
80105dca: e8 a1 a5 ff ff call 80100370 <panic>
80105dcf: 90 nop
80105dd0 <uartgetc>:
=======
80105b5b: 8b 73 38 mov 0x38(%ebx),%esi
80105b5e: e8 ed cb ff ff call 80102750 <cpunum>
80105b63: 89 7c 24 10 mov %edi,0x10(%esp)
80105b67: 89 74 24 0c mov %esi,0xc(%esp)
80105b6b: 89 44 24 08 mov %eax,0x8(%esp)
80105b6f: 8b 43 30 mov 0x30(%ebx),%eax
80105b72: c7 04 24 d8 78 10 80 movl $0x801078d8,(%esp)
80105b79: 89 44 24 04 mov %eax,0x4(%esp)
80105b7d: e8 ce aa ff ff call 80100650 <cprintf>
tf->trapno, cpunum(), tf->eip, rcr2());
panic("trap");
80105b82: c7 04 24 ae 78 10 80 movl $0x801078ae,(%esp)
80105b89: e8 d2 a7 ff ff call 80100360 <panic>
80105b8e: 66 90 xchg %ax,%ax
80105b90 <uartgetc>:
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
}
static int
uartgetc(void)
{
if(!uart)
<<<<<<< HEAD
80105dd0: a1 c0 a5 10 80 mov 0x8010a5c0,%eax
=======
80105b90: a1 c0 a5 10 80 mov 0x8010a5c0,%eax
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
outb(COM1+0, c);
}
static int
uartgetc(void)
{
<<<<<<< HEAD
80105dd5: 55 push %ebp
80105dd6: 89 e5 mov %esp,%ebp
if(!uart)
80105dd8: 85 c0 test %eax,%eax
80105dda: 74 1c je 80105df8 <uartgetc+0x28>
=======
80105b95: 55 push %ebp
80105b96: 89 e5 mov %esp,%ebp
if(!uart)
80105b98: 85 c0 test %eax,%eax
80105b9a: 74 14 je 80105bb0 <uartgetc+0x20>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
static inline uchar
inb(ushort port)
{
uchar data;
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
<<<<<<< HEAD
80105ddc: ba fd 03 00 00 mov $0x3fd,%edx
80105de1: ec in (%dx),%al
return -1;
if(!(inb(COM1+5) & 0x01))
80105de2: a8 01 test $0x1,%al
80105de4: 74 12 je 80105df8 <uartgetc+0x28>
80105de6: ba f8 03 00 00 mov $0x3f8,%edx
80105deb: ec in (%dx),%al
return -1;
return inb(COM1+0);
80105dec: 0f b6 c0 movzbl %al,%eax
}
80105def: 5d pop %ebp
80105df0: c3 ret
80105df1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
=======
80105b9c: ba fd 03 00 00 mov $0x3fd,%edx
80105ba1: ec in (%dx),%al
return -1;
if(!(inb(COM1+5) & 0x01))
80105ba2: a8 01 test $0x1,%al
80105ba4: 74 0a je 80105bb0 <uartgetc+0x20>
80105ba6: b2 f8 mov $0xf8,%dl
80105ba8: ec in (%dx),%al
return -1;
return inb(COM1+0);
80105ba9: 0f b6 c0 movzbl %al,%eax
}
80105bac: 5d pop %ebp
80105bad: c3 ret
80105bae: 66 90 xchg %ax,%ax
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
static int
uartgetc(void)
{
if(!uart)
return -1;
<<<<<<< HEAD
80105df8: b8 ff ff ff ff mov $0xffffffff,%eax
=======
80105bb0: b8 ff ff ff ff mov $0xffffffff,%eax
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
if(!(inb(COM1+5) & 0x01))
return -1;
return inb(COM1+0);
}
<<<<<<< HEAD
80105dfd: 5d pop %ebp
80105dfe: c3 ret
80105dff: 90 nop
80105e00 <uartputc.part.0>:
for(p="xv6...\n"; *p; p++)
=======
80105bb5: 5d pop %ebp
80105bb6: c3 ret
80105bb7: 89 f6 mov %esi,%esi
80105bb9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80105bc0 <uartputc>:
void
uartputc(int c)
{
int i;
if(!uart)
80105bc0: a1 c0 a5 10 80 mov 0x8010a5c0,%eax
80105bc5: 85 c0 test %eax,%eax
80105bc7: 74 3f je 80105c08 <uartputc+0x48>
uartputc(*p);
}
void
uartputc(int c)
{
80105bc9: 55 push %ebp
80105bca: 89 e5 mov %esp,%ebp
80105bcc: 56 push %esi
80105bcd: be fd 03 00 00 mov $0x3fd,%esi
80105bd2: 53 push %ebx
int i;
if(!uart)
80105bd3: bb 80 00 00 00 mov $0x80,%ebx
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
uartputc(*p);
}
void
uartputc(int c)
<<<<<<< HEAD
80105e00: 55 push %ebp
80105e01: 89 e5 mov %esp,%ebp
80105e03: 57 push %edi
80105e04: 56 push %esi
80105e05: 53 push %ebx
80105e06: 89 c7 mov %eax,%edi
80105e08: bb 80 00 00 00 mov $0x80,%ebx
80105e0d: be fd 03 00 00 mov $0x3fd,%esi
80105e12: 83 ec 0c sub $0xc,%esp
80105e15: eb 1b jmp 80105e32 <uartputc.part.0+0x32>
80105e17: 89 f6 mov %esi,%esi
80105e19: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
=======
{
80105bd8: 83 ec 10 sub $0x10,%esp
80105bdb: eb 14 jmp 80105bf1 <uartputc+0x31>
80105bdd: 8d 76 00 lea 0x0(%esi),%esi
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
int i;
if(!uart)
return;
for(i = 0; i < 128 && !(inb(COM1+5) & 0x20); i++)
microdelay(10);
<<<<<<< HEAD
80105e20: 83 ec 0c sub $0xc,%esp
80105e23: 6a 0a push $0xa
80105e25: e8 66 c9 ff ff call 80102790 <microdelay>
=======
80105be0: c7 04 24 0a 00 00 00 movl $0xa,(%esp)
80105be7: e8 24 cc ff ff call 80102810 <microdelay>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
{
int i;
if(!uart)
return;
for(i = 0; i < 128 && !(inb(COM1+5) & 0x20); i++)
<<<<<<< HEAD
80105e2a: 83 c4 10 add $0x10,%esp
80105e2d: 83 eb 01 sub $0x1,%ebx
80105e30: 74 07 je 80105e39 <uartputc.part.0+0x39>
80105e32: 89 f2 mov %esi,%edx
80105e34: ec in (%dx),%al
80105e35: a8 20 test $0x20,%al
80105e37: 74 e7 je 80105e20 <uartputc.part.0+0x20>
=======
80105bec: 83 eb 01 sub $0x1,%ebx
80105bef: 74 07 je 80105bf8 <uartputc+0x38>
80105bf1: 89 f2 mov %esi,%edx
80105bf3: ec in (%dx),%al
80105bf4: a8 20 test $0x20,%al
80105bf6: 74 e8 je 80105be0 <uartputc+0x20>
microdelay(10);
outb(COM1+0, c);
80105bf8: 0f b6 45 08 movzbl 0x8(%ebp),%eax
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
}
static inline void
outb(ushort port, uchar data)
{
asm volatile("out %0,%1" : : "a" (data), "d" (port));
<<<<<<< HEAD
80105e39: ba f8 03 00 00 mov $0x3f8,%edx
80105e3e: 89 f8 mov %edi,%eax
80105e40: ee out %al,(%dx)
microdelay(10);
outb(COM1+0, c);
}
80105e41: 8d 65 f4 lea -0xc(%ebp),%esp
80105e44: 5b pop %ebx
80105e45: 5e pop %esi
80105e46: 5f pop %edi
80105e47: 5d pop %ebp
80105e48: c3 ret
80105e49: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80105e50 <uartinit>:
=======
80105bfc: ba f8 03 00 00 mov $0x3f8,%edx
80105c01: ee out %al,(%dx)
}
80105c02: 83 c4 10 add $0x10,%esp
80105c05: 5b pop %ebx
80105c06: 5e pop %esi
80105c07: 5d pop %ebp
80105c08: f3 c3 repz ret
80105c0a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80105c10 <uartinit>:
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
static int uart; // is there a uart?
void
uartinit(void)
{
<<<<<<< HEAD
80105e50: 55 push %ebp
80105e51: 31 c9 xor %ecx,%ecx
80105e53: 89 c8 mov %ecx,%eax
80105e55: 89 e5 mov %esp,%ebp
80105e57: 57 push %edi
80105e58: 56 push %esi
80105e59: 53 push %ebx
80105e5a: bb fa 03 00 00 mov $0x3fa,%ebx
80105e5f: 89 da mov %ebx,%edx
80105e61: 83 ec 0c sub $0xc,%esp
80105e64: ee out %al,(%dx)
80105e65: bf fb 03 00 00 mov $0x3fb,%edi
80105e6a: b8 80 ff ff ff mov $0xffffff80,%eax
80105e6f: 89 fa mov %edi,%edx
80105e71: ee out %al,(%dx)
80105e72: b8 0c 00 00 00 mov $0xc,%eax
80105e77: ba f8 03 00 00 mov $0x3f8,%edx
80105e7c: ee out %al,(%dx)
80105e7d: be f9 03 00 00 mov $0x3f9,%esi
80105e82: 89 c8 mov %ecx,%eax
80105e84: 89 f2 mov %esi,%edx
80105e86: ee out %al,(%dx)
80105e87: b8 03 00 00 00 mov $0x3,%eax
80105e8c: 89 fa mov %edi,%edx
80105e8e: ee out %al,(%dx)
80105e8f: ba fc 03 00 00 mov $0x3fc,%edx
80105e94: 89 c8 mov %ecx,%eax
80105e96: ee out %al,(%dx)
80105e97: b8 01 00 00 00 mov $0x1,%eax
80105e9c: 89 f2 mov %esi,%edx
80105e9e: ee out %al,(%dx)
=======
80105c10: 55 push %ebp
80105c11: 31 c9 xor %ecx,%ecx
80105c13: 89 e5 mov %esp,%ebp
80105c15: 89 c8 mov %ecx,%eax
80105c17: 57 push %edi
80105c18: bf fa 03 00 00 mov $0x3fa,%edi
80105c1d: 56 push %esi
80105c1e: 89 fa mov %edi,%edx
80105c20: 53 push %ebx
80105c21: 83 ec 1c sub $0x1c,%esp
80105c24: ee out %al,(%dx)
80105c25: be fb 03 00 00 mov $0x3fb,%esi
80105c2a: b8 80 ff ff ff mov $0xffffff80,%eax
80105c2f: 89 f2 mov %esi,%edx
80105c31: ee out %al,(%dx)
80105c32: b8 0c 00 00 00 mov $0xc,%eax
80105c37: b2 f8 mov $0xf8,%dl
80105c39: ee out %al,(%dx)
80105c3a: bb f9 03 00 00 mov $0x3f9,%ebx
80105c3f: 89 c8 mov %ecx,%eax
80105c41: 89 da mov %ebx,%edx
80105c43: ee out %al,(%dx)
80105c44: b8 03 00 00 00 mov $0x3,%eax
80105c49: 89 f2 mov %esi,%edx
80105c4b: ee out %al,(%dx)
80105c4c: b2 fc mov $0xfc,%dl
80105c4e: 89 c8 mov %ecx,%eax
80105c50: ee out %al,(%dx)
80105c51: b8 01 00 00 00 mov $0x1,%eax
80105c56: 89 da mov %ebx,%edx
80105c58: ee out %al,(%dx)
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
static inline uchar
inb(ushort port)
{
uchar data;
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
<<<<<<< HEAD
80105e9f: ba fd 03 00 00 mov $0x3fd,%edx
80105ea4: ec in (%dx),%al
=======
80105c59: b2 fd mov $0xfd,%dl
80105c5b: ec in (%dx),%al
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
outb(COM1+3, 0x03); // Lock divisor, 8 data bits.
outb(COM1+4, 0);
outb(COM1+1, 0x01); // Enable receive interrupts.
// If status is 0xFF, no serial port.
if(inb(COM1+5) == 0xFF)
<<<<<<< HEAD
80105ea5: 3c ff cmp $0xff,%al
80105ea7: 74 5a je 80105f03 <uartinit+0xb3>
return;
uart = 1;
80105ea9: c7 05 c0 a5 10 80 01 movl $0x1,0x8010a5c0
80105eb0: 00 00 00
80105eb3: 89 da mov %ebx,%edx
80105eb5: ec in (%dx),%al
80105eb6: ba f8 03 00 00 mov $0x3f8,%edx
80105ebb: ec in (%dx),%al
=======
80105c5c: 3c ff cmp $0xff,%al
80105c5e: 74 52 je 80105cb2 <uartinit+0xa2>
return;
uart = 1;
80105c60: c7 05 c0 a5 10 80 01 movl $0x1,0x8010a5c0
80105c67: 00 00 00
80105c6a: 89 fa mov %edi,%edx
80105c6c: ec in (%dx),%al
80105c6d: b2 f8 mov $0xf8,%dl
80105c6f: ec in (%dx),%al
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
// Acknowledge pre-existing interrupt conditions;
// enable interrupts.
inb(COM1+2);
inb(COM1+0);
picenable(IRQ_COM1);
<<<<<<< HEAD
80105ebc: 83 ec 0c sub $0xc,%esp
80105ebf: 6a 04 push $0x4
80105ec1: e8 ba d3 ff ff call 80103280 <picenable>
ioapicenable(IRQ_COM1, 0);
80105ec6: 59 pop %ecx
80105ec7: 5b pop %ebx
80105ec8: 6a 00 push $0x0
80105eca: 6a 04 push $0x4
80105ecc: bb 30 7c 10 80 mov $0x80107c30,%ebx
80105ed1: e8 aa c3 ff ff call 80102280 <ioapicenable>
80105ed6: 83 c4 10 add $0x10,%esp
80105ed9: b8 78 00 00 00 mov $0x78,%eax
80105ede: eb 0a jmp 80105eea <uartinit+0x9a>
// Announce that we're here.
for(p="xv6...\n"; *p; p++)
80105ee0: 83 c3 01 add $0x1,%ebx
80105ee3: 0f be 03 movsbl (%ebx),%eax
80105ee6: 84 c0 test %al,%al
80105ee8: 74 19 je 80105f03 <uartinit+0xb3>
void
uartputc(int c)
{
int i;
if(!uart)
80105eea: 8b 15 c0 a5 10 80 mov 0x8010a5c0,%edx
80105ef0: 85 d2 test %edx,%edx
80105ef2: 74 ec je 80105ee0 <uartinit+0x90>
=======
80105c70: c7 04 24 04 00 00 00 movl $0x4,(%esp)
ioapicenable(IRQ_COM1, 0);
// Announce that we're here.
for(p="xv6...\n"; *p; p++)
80105c77: bb d0 79 10 80 mov $0x801079d0,%ebx
// Acknowledge pre-existing interrupt conditions;
// enable interrupts.
inb(COM1+2);
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
inb(COM1+0);
picenable(IRQ_COM1);
80105c7c: e8 6f d5 ff ff call 801031f0 <picenable>
ioapicenable(IRQ_COM1, 0);
80105c81: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
80105c88: 00
80105c89: c7 04 24 04 00 00 00 movl $0x4,(%esp)
80105c90: e8 0b c6 ff ff call 801022a0 <ioapicenable>
// Announce that we're here.
for(p="xv6...\n"; *p; p++)
<<<<<<< HEAD
80105ef4: 83 c3 01 add $0x1,%ebx
80105ef7: e8 04 ff ff ff call 80105e00 <uartputc.part.0>
80105efc: 0f be 03 movsbl (%ebx),%eax
80105eff: 84 c0 test %al,%al
80105f01: 75 e7 jne 80105eea <uartinit+0x9a>
uartputc(*p);
}
80105f03: 8d 65 f4 lea -0xc(%ebp),%esp
80105f06: 5b pop %ebx
80105f07: 5e pop %esi
80105f08: 5f pop %edi
80105f09: 5d pop %ebp
80105f0a: c3 ret
80105f0b: 90 nop
80105f0c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80105f10 <uartputc>:
void
uartputc(int c)
{
int i;
if(!uart)
80105f10: 8b 15 c0 a5 10 80 mov 0x8010a5c0,%edx
uartputc(*p);
}
void
uartputc(int c)
{
80105f16: 55 push %ebp
80105f17: 89 e5 mov %esp,%ebp
int i;
if(!uart)
80105f19: 85 d2 test %edx,%edx
=======
80105c95: b8 78 00 00 00 mov $0x78,%eax
80105c9a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
uartputc(*p);
80105ca0: 89 04 24 mov %eax,(%esp)
inb(COM1+0);
picenable(IRQ_COM1);
ioapicenable(IRQ_COM1, 0);
// Announce that we're here.
for(p="xv6...\n"; *p; p++)
80105ca3: 83 c3 01 add $0x1,%ebx
uartputc(*p);
80105ca6: e8 15 ff ff ff call 80105bc0 <uartputc>
inb(COM1+0);
picenable(IRQ_COM1);
ioapicenable(IRQ_COM1, 0);
// Announce that we're here.
for(p="xv6...\n"; *p; p++)
80105cab: 0f be 03 movsbl (%ebx),%eax
80105cae: 84 c0 test %al,%al
80105cb0: 75 ee jne 80105ca0 <uartinit+0x90>
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
uartputc(*p);
}
80105cb2: 83 c4 1c add $0x1c,%esp
80105cb5: 5b pop %ebx
80105cb6: 5e pop %esi
80105cb7: 5f pop %edi
80105cb8: 5d pop %ebp
80105cb9: c3 ret
80105cba: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
<<<<<<< HEAD
void
uartputc(int c)
{
80105f1b: 8b 45 08 mov 0x8(%ebp),%eax
int i;
if(!uart)
80105f1e: 74 10 je 80105f30 <uartputc+0x20>
return;
for(i = 0; i < 128 && !(inb(COM1+5) & 0x20); i++)
microdelay(10);
outb(COM1+0, c);
}
80105f20: 5d pop %ebp
80105f21: e9 da fe ff ff jmp 80105e00 <uartputc.part.0>
80105f26: 8d 76 00 lea 0x0(%esi),%esi
80105f29: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80105f30: 5d pop %ebp
80105f31: c3 ret
80105f32: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80105f39: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80105f40 <uartintr>:
=======
80105cc0 <uartintr>:
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
return inb(COM1+0);
}
void
uartintr(void)
{
<<<<<<< HEAD
80105f40: 55 push %ebp
80105f41: 89 e5 mov %esp,%ebp
80105f43: 83 ec 14 sub $0x14,%esp
consoleintr(uartgetc);
80105f46: 68 d0 5d 10 80 push $0x80105dd0
80105f4b: e8 a0 a8 ff ff call 801007f0 <consoleintr>
}
80105f50: 83 c4 10 add $0x10,%esp
80105f53: c9 leave
80105f54: c3 ret
80105f55 <vector0>:
# generated by vectors.pl - do not edit
# handlers
.globl alltraps
.globl vector0
vector0:
pushl $0
80105f55: 6a 00 push $0x0
pushl $0
80105f57: 6a 00 push $0x0
jmp alltraps
80105f59: e9 20 fb ff ff jmp 80105a7e <alltraps>
80105f5e <vector1>:
.globl vector1
vector1:
pushl $0
80105f5e: 6a 00 push $0x0
pushl $1
80105f60: 6a 01 push $0x1
jmp alltraps
80105f62: e9 17 fb ff ff jmp 80105a7e <alltraps>
80105f67 <vector2>:
.globl vector2
vector2:
pushl $0
80105f67: 6a 00 push $0x0
pushl $2
80105f69: 6a 02 push $0x2
jmp alltraps
80105f6b: e9 0e fb ff ff jmp 80105a7e <alltraps>
80105f70 <vector3>:
.globl vector3
vector3:
pushl $0
80105f70: 6a 00 push $0x0
pushl $3
80105f72: 6a 03 push $0x3
jmp alltraps
80105f74: e9 05 fb ff ff jmp 80105a7e <alltraps>
80105f79 <vector4>:
.globl vector4
vector4:
pushl $0
80105f79: 6a 00 push $0x0
pushl $4
80105f7b: 6a 04 push $0x4
jmp alltraps
80105f7d: e9 fc fa ff ff jmp 80105a7e <alltraps>
80105f82 <vector5>:
.globl vector5
vector5:
pushl $0
80105f82: 6a 00 push $0x0
pushl $5
80105f84: 6a 05 push $0x5
jmp alltraps
80105f86: e9 f3 fa ff ff jmp 80105a7e <alltraps>
80105f8b <vector6>:
.globl vector6
vector6:
pushl $0
80105f8b: 6a 00 push $0x0
pushl $6
80105f8d: 6a 06 push $0x6
jmp alltraps
80105f8f: e9 ea fa ff ff jmp 80105a7e <alltraps>
80105f94 <vector7>:
.globl vector7
vector7:
pushl $0
80105f94: 6a 00 push $0x0
pushl $7
80105f96: 6a 07 push $0x7
jmp alltraps
80105f98: e9 e1 fa ff ff jmp 80105a7e <alltraps>
80105f9d <vector8>:
.globl vector8
vector8:
pushl $8
80105f9d: 6a 08 push $0x8
jmp alltraps
80105f9f: e9 da fa ff ff jmp 80105a7e <alltraps>
80105fa4 <vector9>:
.globl vector9
vector9:
pushl $0
80105fa4: 6a 00 push $0x0
pushl $9
80105fa6: 6a 09 push $0x9
jmp alltraps
80105fa8: e9 d1 fa ff ff jmp 80105a7e <alltraps>
80105fad <vector10>:
.globl vector10
vector10:
pushl $10
80105fad: 6a 0a push $0xa
jmp alltraps
80105faf: e9 ca fa ff ff jmp 80105a7e <alltraps>
80105fb4 <vector11>:
.globl vector11
vector11:
pushl $11
80105fb4: 6a 0b push $0xb
jmp alltraps
80105fb6: e9 c3 fa ff ff jmp 80105a7e <alltraps>
80105fbb <vector12>:
.globl vector12
vector12:
pushl $12
80105fbb: 6a 0c push $0xc
jmp alltraps
80105fbd: e9 bc fa ff ff jmp 80105a7e <alltraps>
80105fc2 <vector13>:
.globl vector13
vector13:
pushl $13
80105fc2: 6a 0d push $0xd
jmp alltraps
80105fc4: e9 b5 fa ff ff jmp 80105a7e <alltraps>
80105fc9 <vector14>:
.globl vector14
vector14:
pushl $14
80105fc9: 6a 0e push $0xe
jmp alltraps
80105fcb: e9 ae fa ff ff jmp 80105a7e <alltraps>
80105fd0 <vector15>:
.globl vector15
vector15:
pushl $0
80105fd0: 6a 00 push $0x0
pushl $15
80105fd2: 6a 0f push $0xf
jmp alltraps
80105fd4: e9 a5 fa ff ff jmp 80105a7e <alltraps>
80105fd9 <vector16>:
.globl vector16
vector16:
pushl $0
80105fd9: 6a 00 push $0x0
pushl $16
80105fdb: 6a 10 push $0x10
jmp alltraps
80105fdd: e9 9c fa ff ff jmp 80105a7e <alltraps>
80105fe2 <vector17>:
.globl vector17
vector17:
pushl $17
80105fe2: 6a 11 push $0x11
jmp alltraps
80105fe4: e9 95 fa ff ff jmp 80105a7e <alltraps>
80105fe9 <vector18>:
.globl vector18
vector18:
pushl $0
80105fe9: 6a 00 push $0x0
pushl $18
80105feb: 6a 12 push $0x12
jmp alltraps
80105fed: e9 8c fa ff ff jmp 80105a7e <alltraps>
80105ff2 <vector19>:
.globl vector19
vector19:
pushl $0
80105ff2: 6a 00 push $0x0
pushl $19
80105ff4: 6a 13 push $0x13
jmp alltraps
80105ff6: e9 83 fa ff ff jmp 80105a7e <alltraps>
80105ffb <vector20>:
.globl vector20
vector20:
pushl $0
80105ffb: 6a 00 push $0x0
pushl $20
80105ffd: 6a 14 push $0x14
jmp alltraps
80105fff: e9 7a fa ff ff jmp 80105a7e <alltraps>
80106004 <vector21>:
.globl vector21
vector21:
pushl $0
80106004: 6a 00 push $0x0
pushl $21
80106006: 6a 15 push $0x15
jmp alltraps
80106008: e9 71 fa ff ff jmp 80105a7e <alltraps>
8010600d <vector22>:
.globl vector22
vector22:
pushl $0
8010600d: 6a 00 push $0x0
pushl $22
8010600f: 6a 16 push $0x16
jmp alltraps
80106011: e9 68 fa ff ff jmp 80105a7e <alltraps>
80106016 <vector23>:
.globl vector23
vector23:
pushl $0
80106016: 6a 00 push $0x0
pushl $23
80106018: 6a 17 push $0x17
jmp alltraps
8010601a: e9 5f fa ff ff jmp 80105a7e <alltraps>
8010601f <vector24>:
.globl vector24
vector24:
pushl $0
8010601f: 6a 00 push $0x0
pushl $24
80106021: 6a 18 push $0x18
jmp alltraps
80106023: e9 56 fa ff ff jmp 80105a7e <alltraps>
80106028 <vector25>:
.globl vector25
vector25:
pushl $0
80106028: 6a 00 push $0x0
pushl $25
8010602a: 6a 19 push $0x19
jmp alltraps
8010602c: e9 4d fa ff ff jmp 80105a7e <alltraps>
80106031 <vector26>:
.globl vector26
vector26:
pushl $0
80106031: 6a 00 push $0x0
pushl $26
80106033: 6a 1a push $0x1a
jmp alltraps
80106035: e9 44 fa ff ff jmp 80105a7e <alltraps>
8010603a <vector27>:
.globl vector27
vector27:
pushl $0
8010603a: 6a 00 push $0x0
pushl $27
8010603c: 6a 1b push $0x1b
jmp alltraps
8010603e: e9 3b fa ff ff jmp 80105a7e <alltraps>
80106043 <vector28>:
.globl vector28
vector28:
pushl $0
80106043: 6a 00 push $0x0
pushl $28
80106045: 6a 1c push $0x1c
jmp alltraps
80106047: e9 32 fa ff ff jmp 80105a7e <alltraps>
8010604c <vector29>:
.globl vector29
vector29:
pushl $0
8010604c: 6a 00 push $0x0
pushl $29
8010604e: 6a 1d push $0x1d
jmp alltraps
80106050: e9 29 fa ff ff jmp 80105a7e <alltraps>
80106055 <vector30>:
.globl vector30
vector30:
pushl $0
80106055: 6a 00 push $0x0
pushl $30
80106057: 6a 1e push $0x1e
jmp alltraps
80106059: e9 20 fa ff ff jmp 80105a7e <alltraps>
8010605e <vector31>:
.globl vector31
vector31:
pushl $0
8010605e: 6a 00 push $0x0
pushl $31
80106060: 6a 1f push $0x1f
jmp alltraps
80106062: e9 17 fa ff ff jmp 80105a7e <alltraps>
80106067 <vector32>:
.globl vector32
vector32:
pushl $0
80106067: 6a 00 push $0x0
pushl $32
80106069: 6a 20 push $0x20
jmp alltraps
8010606b: e9 0e fa ff ff jmp 80105a7e <alltraps>
80106070 <vector33>:
.globl vector33
vector33:
pushl $0
80106070: 6a 00 push $0x0
pushl $33
80106072: 6a 21 push $0x21
jmp alltraps
80106074: e9 05 fa ff ff jmp 80105a7e <alltraps>
80106079 <vector34>:
.globl vector34
vector34:
pushl $0
80106079: 6a 00 push $0x0
pushl $34
8010607b: 6a 22 push $0x22
jmp alltraps
8010607d: e9 fc f9 ff ff jmp 80105a7e <alltraps>
80106082 <vector35>:
.globl vector35
vector35:
pushl $0
80106082: 6a 00 push $0x0
pushl $35
80106084: 6a 23 push $0x23
jmp alltraps
80106086: e9 f3 f9 ff ff jmp 80105a7e <alltraps>
8010608b <vector36>:
.globl vector36
vector36:
pushl $0
8010608b: 6a 00 push $0x0
pushl $36
8010608d: 6a 24 push $0x24
jmp alltraps
8010608f: e9 ea f9 ff ff jmp 80105a7e <alltraps>
80106094 <vector37>:
.globl vector37
vector37:
pushl $0
80106094: 6a 00 push $0x0
pushl $37
80106096: 6a 25 push $0x25
jmp alltraps
80106098: e9 e1 f9 ff ff jmp 80105a7e <alltraps>
8010609d <vector38>:
.globl vector38
vector38:
pushl $0
8010609d: 6a 00 push $0x0
pushl $38
8010609f: 6a 26 push $0x26
jmp alltraps
801060a1: e9 d8 f9 ff ff jmp 80105a7e <alltraps>
801060a6 <vector39>:
.globl vector39
vector39:
pushl $0
801060a6: 6a 00 push $0x0
pushl $39
801060a8: 6a 27 push $0x27
jmp alltraps
801060aa: e9 cf f9 ff ff jmp 80105a7e <alltraps>
801060af <vector40>:
.globl vector40
vector40:
pushl $0
801060af: 6a 00 push $0x0
pushl $40
801060b1: 6a 28 push $0x28
jmp alltraps
801060b3: e9 c6 f9 ff ff jmp 80105a7e <alltraps>
801060b8 <vector41>:
.globl vector41
vector41:
pushl $0
801060b8: 6a 00 push $0x0
pushl $41
801060ba: 6a 29 push $0x29
jmp alltraps
801060bc: e9 bd f9 ff ff jmp 80105a7e <alltraps>
801060c1 <vector42>:
.globl vector42
vector42:
pushl $0
801060c1: 6a 00 push $0x0
pushl $42
801060c3: 6a 2a push $0x2a
jmp alltraps
801060c5: e9 b4 f9 ff ff jmp 80105a7e <alltraps>
801060ca <vector43>:
.globl vector43
vector43:
pushl $0
801060ca: 6a 00 push $0x0
pushl $43
801060cc: 6a 2b push $0x2b
jmp alltraps
801060ce: e9 ab f9 ff ff jmp 80105a7e <alltraps>
801060d3 <vector44>:
.globl vector44
vector44:
pushl $0
801060d3: 6a 00 push $0x0
pushl $44
801060d5: 6a 2c push $0x2c
jmp alltraps
801060d7: e9 a2 f9 ff ff jmp 80105a7e <alltraps>
801060dc <vector45>:
.globl vector45
vector45:
pushl $0
801060dc: 6a 00 push $0x0
pushl $45
801060de: 6a 2d push $0x2d
jmp alltraps
801060e0: e9 99 f9 ff ff jmp 80105a7e <alltraps>
801060e5 <vector46>:
.globl vector46
vector46:
pushl $0
801060e5: 6a 00 push $0x0
pushl $46
801060e7: 6a 2e push $0x2e
jmp alltraps
801060e9: e9 90 f9 ff ff jmp 80105a7e <alltraps>
801060ee <vector47>:
.globl vector47
vector47:
pushl $0
801060ee: 6a 00 push $0x0
pushl $47
801060f0: 6a 2f push $0x2f
jmp alltraps
801060f2: e9 87 f9 ff ff jmp 80105a7e <alltraps>
801060f7 <vector48>:
.globl vector48
vector48:
pushl $0
801060f7: 6a 00 push $0x0
pushl $48
801060f9: 6a 30 push $0x30
jmp alltraps
801060fb: e9 7e f9 ff ff jmp 80105a7e <alltraps>
80106100 <vector49>:
.globl vector49
vector49:
pushl $0
80106100: 6a 00 push $0x0
pushl $49
80106102: 6a 31 push $0x31
jmp alltraps
80106104: e9 75 f9 ff ff jmp 80105a7e <alltraps>
80106109 <vector50>:
.globl vector50
vector50:
pushl $0
80106109: 6a 00 push $0x0
pushl $50
8010610b: 6a 32 push $0x32
jmp alltraps
8010610d: e9 6c f9 ff ff jmp 80105a7e <alltraps>
80106112 <vector51>:
.globl vector51
vector51:
pushl $0
80106112: 6a 00 push $0x0
pushl $51
80106114: 6a 33 push $0x33
jmp alltraps
80106116: e9 63 f9 ff ff jmp 80105a7e <alltraps>
8010611b <vector52>:
.globl vector52
vector52:
pushl $0
8010611b: 6a 00 push $0x0
pushl $52
8010611d: 6a 34 push $0x34
jmp alltraps
8010611f: e9 5a f9 ff ff jmp 80105a7e <alltraps>
80106124 <vector53>:
.globl vector53
vector53:
pushl $0
80106124: 6a 00 push $0x0
pushl $53
80106126: 6a 35 push $0x35
jmp alltraps
80106128: e9 51 f9 ff ff jmp 80105a7e <alltraps>
8010612d <vector54>:
.globl vector54
vector54:
pushl $0
8010612d: 6a 00 push $0x0
pushl $54
8010612f: 6a 36 push $0x36
jmp alltraps
80106131: e9 48 f9 ff ff jmp 80105a7e <alltraps>
80106136 <vector55>:
.globl vector55
vector55:
pushl $0
80106136: 6a 00 push $0x0
pushl $55
80106138: 6a 37 push $0x37
jmp alltraps
8010613a: e9 3f f9 ff ff jmp 80105a7e <alltraps>
8010613f <vector56>:
.globl vector56
vector56:
pushl $0
8010613f: 6a 00 push $0x0
pushl $56
80106141: 6a 38 push $0x38
jmp alltraps
80106143: e9 36 f9 ff ff jmp 80105a7e <alltraps>
80106148 <vector57>:
.globl vector57
vector57:
pushl $0
80106148: 6a 00 push $0x0
pushl $57
8010614a: 6a 39 push $0x39
jmp alltraps
8010614c: e9 2d f9 ff ff jmp 80105a7e <alltraps>
80106151 <vector58>:
.globl vector58
vector58:
pushl $0
80106151: 6a 00 push $0x0
pushl $58
80106153: 6a 3a push $0x3a
jmp alltraps
80106155: e9 24 f9 ff ff jmp 80105a7e <alltraps>
8010615a <vector59>:
.globl vector59
vector59:
pushl $0
8010615a: 6a 00 push $0x0
pushl $59
8010615c: 6a 3b push $0x3b
jmp alltraps
8010615e: e9 1b f9 ff ff jmp 80105a7e <alltraps>
80106163 <vector60>:
.globl vector60
vector60:
pushl $0
80106163: 6a 00 push $0x0
pushl $60
80106165: 6a 3c push $0x3c
jmp alltraps
80106167: e9 12 f9 ff ff jmp 80105a7e <alltraps>
8010616c <vector61>:
.globl vector61
vector61:
pushl $0
8010616c: 6a 00 push $0x0
pushl $61
8010616e: 6a 3d push $0x3d
jmp alltraps
80106170: e9 09 f9 ff ff jmp 80105a7e <alltraps>
80106175 <vector62>:
.globl vector62
vector62:
pushl $0
80106175: 6a 00 push $0x0
pushl $62
80106177: 6a 3e push $0x3e
jmp alltraps
80106179: e9 00 f9 ff ff jmp 80105a7e <alltraps>
8010617e <vector63>:
.globl vector63
vector63:
pushl $0
8010617e: 6a 00 push $0x0
pushl $63
80106180: 6a 3f push $0x3f
jmp alltraps
80106182: e9 f7 f8 ff ff jmp 80105a7e <alltraps>
80106187 <vector64>:
.globl vector64
vector64:
pushl $0
80106187: 6a 00 push $0x0
pushl $64
80106189: 6a 40 push $0x40
jmp alltraps
8010618b: e9 ee f8 ff ff jmp 80105a7e <alltraps>
80106190 <vector65>:
.globl vector65
vector65:
pushl $0
80106190: 6a 00 push $0x0
pushl $65
80106192: 6a 41 push $0x41
jmp alltraps
80106194: e9 e5 f8 ff ff jmp 80105a7e <alltraps>
80106199 <vector66>:
.globl vector66
vector66:
pushl $0
80106199: 6a 00 push $0x0
pushl $66
8010619b: 6a 42 push $0x42
jmp alltraps
8010619d: e9 dc f8 ff ff jmp 80105a7e <alltraps>
801061a2 <vector67>:
.globl vector67
vector67:
pushl $0
801061a2: 6a 00 push $0x0
pushl $67
801061a4: 6a 43 push $0x43
jmp alltraps
801061a6: e9 d3 f8 ff ff jmp 80105a7e <alltraps>
801061ab <vector68>:
.globl vector68
vector68:
pushl $0
801061ab: 6a 00 push $0x0
pushl $68
801061ad: 6a 44 push $0x44
jmp alltraps
801061af: e9 ca f8 ff ff jmp 80105a7e <alltraps>
801061b4 <vector69>:
.globl vector69
vector69:
pushl $0
801061b4: 6a 00 push $0x0
pushl $69
801061b6: 6a 45 push $0x45
jmp alltraps
801061b8: e9 c1 f8 ff ff jmp 80105a7e <alltraps>
801061bd <vector70>:
.globl vector70
vector70:
pushl $0
801061bd: 6a 00 push $0x0
pushl $70
801061bf: 6a 46 push $0x46
jmp alltraps
801061c1: e9 b8 f8 ff ff jmp 80105a7e <alltraps>
801061c6 <vector71>:
.globl vector71
vector71:
pushl $0
801061c6: 6a 00 push $0x0
pushl $71
801061c8: 6a 47 push $0x47
jmp alltraps
801061ca: e9 af f8 ff ff jmp 80105a7e <alltraps>
801061cf <vector72>:
.globl vector72
vector72:
pushl $0
801061cf: 6a 00 push $0x0
pushl $72
801061d1: 6a 48 push $0x48
jmp alltraps
801061d3: e9 a6 f8 ff ff jmp 80105a7e <alltraps>
801061d8 <vector73>:
.globl vector73
vector73:
pushl $0
801061d8: 6a 00 push $0x0
pushl $73
801061da: 6a 49 push $0x49
jmp alltraps
801061dc: e9 9d f8 ff ff jmp 80105a7e <alltraps>
801061e1 <vector74>:
.globl vector74
vector74:
pushl $0
801061e1: 6a 00 push $0x0
pushl $74
801061e3: 6a 4a push $0x4a
jmp alltraps
801061e5: e9 94 f8 ff ff jmp 80105a7e <alltraps>
801061ea <vector75>:
.globl vector75
vector75:
pushl $0
801061ea: 6a 00 push $0x0
pushl $75
801061ec: 6a 4b push $0x4b
jmp alltraps
801061ee: e9 8b f8 ff ff jmp 80105a7e <alltraps>
801061f3 <vector76>:
.globl vector76
vector76:
pushl $0
801061f3: 6a 00 push $0x0
pushl $76
801061f5: 6a 4c push $0x4c
jmp alltraps
801061f7: e9 82 f8 ff ff jmp 80105a7e <alltraps>
801061fc <vector77>:
.globl vector77
vector77:
pushl $0
801061fc: 6a 00 push $0x0
pushl $77
801061fe: 6a 4d push $0x4d
jmp alltraps
80106200: e9 79 f8 ff ff jmp 80105a7e <alltraps>
80106205 <vector78>:
.globl vector78
vector78:
pushl $0
80106205: 6a 00 push $0x0
pushl $78
80106207: 6a 4e push $0x4e
jmp alltraps
80106209: e9 70 f8 ff ff jmp 80105a7e <alltraps>
8010620e <vector79>:
.globl vector79
vector79:
pushl $0
8010620e: 6a 00 push $0x0
pushl $79
80106210: 6a 4f push $0x4f
jmp alltraps
80106212: e9 67 f8 ff ff jmp 80105a7e <alltraps>
80106217 <vector80>:
.globl vector80
vector80:
pushl $0
80106217: 6a 00 push $0x0
pushl $80
80106219: 6a 50 push $0x50
jmp alltraps
8010621b: e9 5e f8 ff ff jmp 80105a7e <alltraps>
80106220 <vector81>:
.globl vector81
vector81:
pushl $0
80106220: 6a 00 push $0x0
pushl $81
80106222: 6a 51 push $0x51
jmp alltraps
80106224: e9 55 f8 ff ff jmp 80105a7e <alltraps>
80106229 <vector82>:
.globl vector82
vector82:
pushl $0
80106229: 6a 00 push $0x0
pushl $82
8010622b: 6a 52 push $0x52
jmp alltraps
8010622d: e9 4c f8 ff ff jmp 80105a7e <alltraps>
80106232 <vector83>:
.globl vector83
vector83:
pushl $0
80106232: 6a 00 push $0x0
pushl $83
80106234: 6a 53 push $0x53
jmp alltraps
80106236: e9 43 f8 ff ff jmp 80105a7e <alltraps>
8010623b <vector84>:
.globl vector84
vector84:
pushl $0
8010623b: 6a 00 push $0x0
pushl $84
8010623d: 6a 54 push $0x54
jmp alltraps
8010623f: e9 3a f8 ff ff jmp 80105a7e <alltraps>
80106244 <vector85>:
.globl vector85
vector85:
pushl $0
80106244: 6a 00 push $0x0
pushl $85
80106246: 6a 55 push $0x55
jmp alltraps
80106248: e9 31 f8 ff ff jmp 80105a7e <alltraps>
8010624d <vector86>:
.globl vector86
vector86:
pushl $0
8010624d: 6a 00 push $0x0
pushl $86
8010624f: 6a 56 push $0x56
jmp alltraps
80106251: e9 28 f8 ff ff jmp 80105a7e <alltraps>
80106256 <vector87>:
.globl vector87
vector87:
pushl $0
80106256: 6a 00 push $0x0
pushl $87
80106258: 6a 57 push $0x57
jmp alltraps
8010625a: e9 1f f8 ff ff jmp 80105a7e <alltraps>
8010625f <vector88>:
.globl vector88
vector88:
pushl $0
8010625f: 6a 00 push $0x0
pushl $88
80106261: 6a 58 push $0x58
jmp alltraps
80106263: e9 16 f8 ff ff jmp 80105a7e <alltraps>
80106268 <vector89>:
.globl vector89
vector89:
pushl $0
80106268: 6a 00 push $0x0
pushl $89
8010626a: 6a 59 push $0x59
jmp alltraps
8010626c: e9 0d f8 ff ff jmp 80105a7e <alltraps>
80106271 <vector90>:
.globl vector90
vector90:
pushl $0
80106271: 6a 00 push $0x0
pushl $90
80106273: 6a 5a push $0x5a
jmp alltraps
80106275: e9 04 f8 ff ff jmp 80105a7e <alltraps>
8010627a <vector91>:
.globl vector91
vector91:
pushl $0
8010627a: 6a 00 push $0x0
pushl $91
8010627c: 6a 5b push $0x5b
jmp alltraps
8010627e: e9 fb f7 ff ff jmp 80105a7e <alltraps>
80106283 <vector92>:
.globl vector92
vector92:
pushl $0
80106283: 6a 00 push $0x0
pushl $92
80106285: 6a 5c push $0x5c
jmp alltraps
80106287: e9 f2 f7 ff ff jmp 80105a7e <alltraps>
8010628c <vector93>:
.globl vector93
vector93:
pushl $0
8010628c: 6a 00 push $0x0
pushl $93
8010628e: 6a 5d push $0x5d
jmp alltraps
80106290: e9 e9 f7 ff ff jmp 80105a7e <alltraps>
80106295 <vector94>:
.globl vector94
vector94:
pushl $0
80106295: 6a 00 push $0x0
pushl $94
80106297: 6a 5e push $0x5e
jmp alltraps
80106299: e9 e0 f7 ff ff jmp 80105a7e <alltraps>
8010629e <vector95>:
.globl vector95
vector95:
pushl $0
8010629e: 6a 00 push $0x0
pushl $95
801062a0: 6a 5f push $0x5f
jmp alltraps
801062a2: e9 d7 f7 ff ff jmp 80105a7e <alltraps>
801062a7 <vector96>:
.globl vector96
vector96:
pushl $0
801062a7: 6a 00 push $0x0
pushl $96
801062a9: 6a 60 push $0x60
jmp alltraps
801062ab: e9 ce f7 ff ff jmp 80105a7e <alltraps>
801062b0 <vector97>:
.globl vector97
vector97:
pushl $0
801062b0: 6a 00 push $0x0
pushl $97
801062b2: 6a 61 push $0x61
jmp alltraps
801062b4: e9 c5 f7 ff ff jmp 80105a7e <alltraps>
801062b9 <vector98>:
.globl vector98
vector98:
pushl $0
801062b9: 6a 00 push $0x0
pushl $98
801062bb: 6a 62 push $0x62
jmp alltraps
801062bd: e9 bc f7 ff ff jmp 80105a7e <alltraps>
801062c2 <vector99>:
.globl vector99
vector99:
pushl $0
801062c2: 6a 00 push $0x0
pushl $99
801062c4: 6a 63 push $0x63
jmp alltraps
801062c6: e9 b3 f7 ff ff jmp 80105a7e <alltraps>
801062cb <vector100>:
.globl vector100
vector100:
pushl $0
801062cb: 6a 00 push $0x0
pushl $100
801062cd: 6a 64 push $0x64
jmp alltraps
801062cf: e9 aa f7 ff ff jmp 80105a7e <alltraps>
801062d4 <vector101>:
.globl vector101
vector101:
pushl $0
801062d4: 6a 00 push $0x0
pushl $101
801062d6: 6a 65 push $0x65
jmp alltraps
801062d8: e9 a1 f7 ff ff jmp 80105a7e <alltraps>
801062dd <vector102>:
.globl vector102
vector102:
pushl $0
801062dd: 6a 00 push $0x0
pushl $102
801062df: 6a 66 push $0x66
jmp alltraps
801062e1: e9 98 f7 ff ff jmp 80105a7e <alltraps>
801062e6 <vector103>:
.globl vector103
vector103:
pushl $0
801062e6: 6a 00 push $0x0
pushl $103
801062e8: 6a 67 push $0x67
jmp alltraps
801062ea: e9 8f f7 ff ff jmp 80105a7e <alltraps>
801062ef <vector104>:
.globl vector104
vector104:
pushl $0
801062ef: 6a 00 push $0x0
pushl $104
801062f1: 6a 68 push $0x68
jmp alltraps
801062f3: e9 86 f7 ff ff jmp 80105a7e <alltraps>
801062f8 <vector105>:
.globl vector105
vector105:
pushl $0
801062f8: 6a 00 push $0x0
pushl $105
801062fa: 6a 69 push $0x69
jmp alltraps
801062fc: e9 7d f7 ff ff jmp 80105a7e <alltraps>
80106301 <vector106>:
.globl vector106
vector106:
pushl $0
80106301: 6a 00 push $0x0
pushl $106
80106303: 6a 6a push $0x6a
jmp alltraps
80106305: e9 74 f7 ff ff jmp 80105a7e <alltraps>
8010630a <vector107>:
.globl vector107
vector107:
pushl $0
8010630a: 6a 00 push $0x0
pushl $107
8010630c: 6a 6b push $0x6b
jmp alltraps
8010630e: e9 6b f7 ff ff jmp 80105a7e <alltraps>
80106313 <vector108>:
.globl vector108
vector108:
pushl $0
80106313: 6a 00 push $0x0
pushl $108
80106315: 6a 6c push $0x6c
jmp alltraps
80106317: e9 62 f7 ff ff jmp 80105a7e <alltraps>
8010631c <vector109>:
.globl vector109
vector109:
pushl $0
8010631c: 6a 00 push $0x0
pushl $109
8010631e: 6a 6d push $0x6d
jmp alltraps
80106320: e9 59 f7 ff ff jmp 80105a7e <alltraps>
80106325 <vector110>:
.globl vector110
vector110:
pushl $0
80106325: 6a 00 push $0x0
pushl $110
80106327: 6a 6e push $0x6e
jmp alltraps
80106329: e9 50 f7 ff ff jmp 80105a7e <alltraps>
8010632e <vector111>:
.globl vector111
vector111:
pushl $0
8010632e: 6a 00 push $0x0
pushl $111
80106330: 6a 6f push $0x6f
jmp alltraps
80106332: e9 47 f7 ff ff jmp 80105a7e <alltraps>
80106337 <vector112>:
.globl vector112
vector112:
pushl $0
80106337: 6a 00 push $0x0
pushl $112
80106339: 6a 70 push $0x70
jmp alltraps
8010633b: e9 3e f7 ff ff jmp 80105a7e <alltraps>
80106340 <vector113>:
.globl vector113
vector113:
pushl $0
80106340: 6a 00 push $0x0
pushl $113
80106342: 6a 71 push $0x71
jmp alltraps
80106344: e9 35 f7 ff ff jmp 80105a7e <alltraps>
80106349 <vector114>:
.globl vector114
vector114:
pushl $0
80106349: 6a 00 push $0x0
pushl $114
8010634b: 6a 72 push $0x72
jmp alltraps
8010634d: e9 2c f7 ff ff jmp 80105a7e <alltraps>
80106352 <vector115>:
.globl vector115
vector115:
pushl $0
80106352: 6a 00 push $0x0
pushl $115
80106354: 6a 73 push $0x73
jmp alltraps
80106356: e9 23 f7 ff ff jmp 80105a7e <alltraps>
8010635b <vector116>:
.globl vector116
vector116:
pushl $0
8010635b: 6a 00 push $0x0
pushl $116
8010635d: 6a 74 push $0x74
jmp alltraps
8010635f: e9 1a f7 ff ff jmp 80105a7e <alltraps>
80106364 <vector117>:
.globl vector117
vector117:
pushl $0
80106364: 6a 00 push $0x0
pushl $117
80106366: 6a 75 push $0x75
jmp alltraps
80106368: e9 11 f7 ff ff jmp 80105a7e <alltraps>
8010636d <vector118>:
.globl vector118
vector118:
pushl $0
8010636d: 6a 00 push $0x0
pushl $118
8010636f: 6a 76 push $0x76
jmp alltraps
80106371: e9 08 f7 ff ff jmp 80105a7e <alltraps>
80106376 <vector119>:
.globl vector119
vector119:
pushl $0
80106376: 6a 00 push $0x0
pushl $119
80106378: 6a 77 push $0x77
jmp alltraps
8010637a: e9 ff f6 ff ff jmp 80105a7e <alltraps>
8010637f <vector120>:
.globl vector120
vector120:
pushl $0
8010637f: 6a 00 push $0x0
pushl $120
80106381: 6a 78 push $0x78
jmp alltraps
80106383: e9 f6 f6 ff ff jmp 80105a7e <alltraps>
80106388 <vector121>:
.globl vector121
vector121:
pushl $0
80106388: 6a 00 push $0x0
pushl $121
8010638a: 6a 79 push $0x79
jmp alltraps
8010638c: e9 ed f6 ff ff jmp 80105a7e <alltraps>
80106391 <vector122>:
.globl vector122
vector122:
pushl $0
80106391: 6a 00 push $0x0
pushl $122
80106393: 6a 7a push $0x7a
jmp alltraps
80106395: e9 e4 f6 ff ff jmp 80105a7e <alltraps>
8010639a <vector123>:
.globl vector123
vector123:
pushl $0
8010639a: 6a 00 push $0x0
pushl $123
8010639c: 6a 7b push $0x7b
jmp alltraps
8010639e: e9 db f6 ff ff jmp 80105a7e <alltraps>
801063a3 <vector124>:
.globl vector124
vector124:
pushl $0
801063a3: 6a 00 push $0x0
pushl $124
801063a5: 6a 7c push $0x7c
jmp alltraps
801063a7: e9 d2 f6 ff ff jmp 80105a7e <alltraps>
801063ac <vector125>:
.globl vector125
vector125:
pushl $0
801063ac: 6a 00 push $0x0
pushl $125
801063ae: 6a 7d push $0x7d
jmp alltraps
801063b0: e9 c9 f6 ff ff jmp 80105a7e <alltraps>
801063b5 <vector126>:
.globl vector126
vector126:
pushl $0
801063b5: 6a 00 push $0x0
pushl $126
801063b7: 6a 7e push $0x7e
jmp alltraps
801063b9: e9 c0 f6 ff ff jmp 80105a7e <alltraps>
801063be <vector127>:
.globl vector127
vector127:
pushl $0
801063be: 6a 00 push $0x0
pushl $127
801063c0: 6a 7f push $0x7f
jmp alltraps
801063c2: e9 b7 f6 ff ff jmp 80105a7e <alltraps>
801063c7 <vector128>:
.globl vector128
vector128:
pushl $0
801063c7: 6a 00 push $0x0
pushl $128
801063c9: 68 80 00 00 00 push $0x80
jmp alltraps
801063ce: e9 ab f6 ff ff jmp 80105a7e <alltraps>
801063d3 <vector129>:
.globl vector129
vector129:
pushl $0
801063d3: 6a 00 push $0x0
pushl $129
801063d5: 68 81 00 00 00 push $0x81
jmp alltraps
801063da: e9 9f f6 ff ff jmp 80105a7e <alltraps>
801063df <vector130>:
.globl vector130
vector130:
pushl $0
801063df: 6a 00 push $0x0
pushl $130
801063e1: 68 82 00 00 00 push $0x82
jmp alltraps
801063e6: e9 93 f6 ff ff jmp 80105a7e <alltraps>
801063eb <vector131>:
.globl vector131
vector131:
pushl $0
801063eb: 6a 00 push $0x0
pushl $131
801063ed: 68 83 00 00 00 push $0x83
jmp alltraps
801063f2: e9 87 f6 ff ff jmp 80105a7e <alltraps>
801063f7 <vector132>:
.globl vector132
vector132:
pushl $0
801063f7: 6a 00 push $0x0
pushl $132
801063f9: 68 84 00 00 00 push $0x84
jmp alltraps
801063fe: e9 7b f6 ff ff jmp 80105a7e <alltraps>
80106403 <vector133>:
.globl vector133
vector133:
pushl $0
80106403: 6a 00 push $0x0
pushl $133
80106405: 68 85 00 00 00 push $0x85
jmp alltraps
8010640a: e9 6f f6 ff ff jmp 80105a7e <alltraps>
8010640f <vector134>:
.globl vector134
vector134:
pushl $0
8010640f: 6a 00 push $0x0
pushl $134
80106411: 68 86 00 00 00 push $0x86
jmp alltraps
80106416: e9 63 f6 ff ff jmp 80105a7e <alltraps>
8010641b <vector135>:
.globl vector135
vector135:
pushl $0
8010641b: 6a 00 push $0x0
pushl $135
8010641d: 68 87 00 00 00 push $0x87
jmp alltraps
80106422: e9 57 f6 ff ff jmp 80105a7e <alltraps>
80106427 <vector136>:
.globl vector136
vector136:
pushl $0
80106427: 6a 00 push $0x0
pushl $136
80106429: 68 88 00 00 00 push $0x88
jmp alltraps
8010642e: e9 4b f6 ff ff jmp 80105a7e <alltraps>
80106433 <vector137>:
.globl vector137
vector137:
pushl $0
80106433: 6a 00 push $0x0
pushl $137
80106435: 68 89 00 00 00 push $0x89
jmp alltraps
8010643a: e9 3f f6 ff ff jmp 80105a7e <alltraps>
8010643f <vector138>:
.globl vector138
vector138:
pushl $0
8010643f: 6a 00 push $0x0
pushl $138
80106441: 68 8a 00 00 00 push $0x8a
jmp alltraps
80106446: e9 33 f6 ff ff jmp 80105a7e <alltraps>
8010644b <vector139>:
.globl vector139
vector139:
pushl $0
8010644b: 6a 00 push $0x0
pushl $139
8010644d: 68 8b 00 00 00 push $0x8b
jmp alltraps
80106452: e9 27 f6 ff ff jmp 80105a7e <alltraps>
80106457 <vector140>:
.globl vector140
vector140:
pushl $0
80106457: 6a 00 push $0x0
pushl $140
80106459: 68 8c 00 00 00 push $0x8c
jmp alltraps
8010645e: e9 1b f6 ff ff jmp 80105a7e <alltraps>
80106463 <vector141>:
.globl vector141
vector141:
pushl $0
80106463: 6a 00 push $0x0
pushl $141
80106465: 68 8d 00 00 00 push $0x8d
jmp alltraps
8010646a: e9 0f f6 ff ff jmp 80105a7e <alltraps>
8010646f <vector142>:
.globl vector142
vector142:
pushl $0
8010646f: 6a 00 push $0x0
pushl $142
80106471: 68 8e 00 00 00 push $0x8e
jmp alltraps
80106476: e9 03 f6 ff ff jmp 80105a7e <alltraps>
8010647b <vector143>:
.globl vector143
vector143:
pushl $0
8010647b: 6a 00 push $0x0
pushl $143
8010647d: 68 8f 00 00 00 push $0x8f
jmp alltraps
80106482: e9 f7 f5 ff ff jmp 80105a7e <alltraps>
80106487 <vector144>:
.globl vector144
vector144:
pushl $0
80106487: 6a 00 push $0x0
pushl $144
80106489: 68 90 00 00 00 push $0x90
jmp alltraps
8010648e: e9 eb f5 ff ff jmp 80105a7e <alltraps>
80106493 <vector145>:
.globl vector145
vector145:
pushl $0
80106493: 6a 00 push $0x0
pushl $145
80106495: 68 91 00 00 00 push $0x91
jmp alltraps
8010649a: e9 df f5 ff ff jmp 80105a7e <alltraps>
8010649f <vector146>:
.globl vector146
vector146:
pushl $0
8010649f: 6a 00 push $0x0
pushl $146
801064a1: 68 92 00 00 00 push $0x92
jmp alltraps
801064a6: e9 d3 f5 ff ff jmp 80105a7e <alltraps>
801064ab <vector147>:
.globl vector147
vector147:
pushl $0
801064ab: 6a 00 push $0x0
pushl $147
801064ad: 68 93 00 00 00 push $0x93
jmp alltraps
801064b2: e9 c7 f5 ff ff jmp 80105a7e <alltraps>
801064b7 <vector148>:
.globl vector148
vector148:
pushl $0
801064b7: 6a 00 push $0x0
pushl $148
801064b9: 68 94 00 00 00 push $0x94
jmp alltraps
801064be: e9 bb f5 ff ff jmp 80105a7e <alltraps>
801064c3 <vector149>:
.globl vector149
vector149:
pushl $0
801064c3: 6a 00 push $0x0
pushl $149
801064c5: 68 95 00 00 00 push $0x95
jmp alltraps
801064ca: e9 af f5 ff ff jmp 80105a7e <alltraps>
801064cf <vector150>:
.globl vector150
vector150:
pushl $0
801064cf: 6a 00 push $0x0
pushl $150
801064d1: 68 96 00 00 00 push $0x96
jmp alltraps
801064d6: e9 a3 f5 ff ff jmp 80105a7e <alltraps>
801064db <vector151>:
.globl vector151
vector151:
pushl $0
801064db: 6a 00 push $0x0
pushl $151
801064dd: 68 97 00 00 00 push $0x97
jmp alltraps
801064e2: e9 97 f5 ff ff jmp 80105a7e <alltraps>
801064e7 <vector152>:
.globl vector152
vector152:
pushl $0
801064e7: 6a 00 push $0x0
pushl $152
801064e9: 68 98 00 00 00 push $0x98
jmp alltraps
801064ee: e9 8b f5 ff ff jmp 80105a7e <alltraps>
801064f3 <vector153>:
.globl vector153
vector153:
pushl $0
801064f3: 6a 00 push $0x0
pushl $153
801064f5: 68 99 00 00 00 push $0x99
jmp alltraps
801064fa: e9 7f f5 ff ff jmp 80105a7e <alltraps>
801064ff <vector154>:
.globl vector154
vector154:
pushl $0
801064ff: 6a 00 push $0x0
pushl $154
80106501: 68 9a 00 00 00 push $0x9a
jmp alltraps
80106506: e9 73 f5 ff ff jmp 80105a7e <alltraps>
8010650b <vector155>:
.globl vector155
vector155:
pushl $0
8010650b: 6a 00 push $0x0
pushl $155
8010650d: 68 9b 00 00 00 push $0x9b
jmp alltraps
80106512: e9 67 f5 ff ff jmp 80105a7e <alltraps>
80106517 <vector156>:
.globl vector156
vector156:
pushl $0
80106517: 6a 00 push $0x0
pushl $156
80106519: 68 9c 00 00 00 push $0x9c
jmp alltraps
8010651e: e9 5b f5 ff ff jmp 80105a7e <alltraps>
80106523 <vector157>:
.globl vector157
vector157:
pushl $0
80106523: 6a 00 push $0x0
pushl $157
80106525: 68 9d 00 00 00 push $0x9d
jmp alltraps
8010652a: e9 4f f5 ff ff jmp 80105a7e <alltraps>
8010652f <vector158>:
.globl vector158
vector158:
pushl $0
8010652f: 6a 00 push $0x0
pushl $158
80106531: 68 9e 00 00 00 push $0x9e
jmp alltraps
80106536: e9 43 f5 ff ff jmp 80105a7e <alltraps>
8010653b <vector159>:
.globl vector159
vector159:
pushl $0
8010653b: 6a 00 push $0x0
pushl $159
8010653d: 68 9f 00 00 00 push $0x9f
jmp alltraps
80106542: e9 37 f5 ff ff jmp 80105a7e <alltraps>
80106547 <vector160>:
.globl vector160
vector160:
pushl $0
80106547: 6a 00 push $0x0
pushl $160
80106549: 68 a0 00 00 00 push $0xa0
jmp alltraps
8010654e: e9 2b f5 ff ff jmp 80105a7e <alltraps>
80106553 <vector161>:
.globl vector161
vector161:
pushl $0
80106553: 6a 00 push $0x0
pushl $161
80106555: 68 a1 00 00 00 push $0xa1
jmp alltraps
8010655a: e9 1f f5 ff ff jmp 80105a7e <alltraps>
8010655f <vector162>:
.globl vector162
vector162:
pushl $0
8010655f: 6a 00 push $0x0
pushl $162
80106561: 68 a2 00 00 00 push $0xa2
jmp alltraps
80106566: e9 13 f5 ff ff jmp 80105a7e <alltraps>
8010656b <vector163>:
.globl vector163
vector163:
pushl $0
8010656b: 6a 00 push $0x0
pushl $163
8010656d: 68 a3 00 00 00 push $0xa3
jmp alltraps
80106572: e9 07 f5 ff ff jmp 80105a7e <alltraps>
80106577 <vector164>:
.globl vector164
vector164:
pushl $0
80106577: 6a 00 push $0x0
pushl $164
80106579: 68 a4 00 00 00 push $0xa4
jmp alltraps
8010657e: e9 fb f4 ff ff jmp 80105a7e <alltraps>
80106583 <vector165>:
.globl vector165
vector165:
pushl $0
80106583: 6a 00 push $0x0
pushl $165
80106585: 68 a5 00 00 00 push $0xa5
jmp alltraps
8010658a: e9 ef f4 ff ff jmp 80105a7e <alltraps>
8010658f <vector166>:
.globl vector166
vector166:
pushl $0
8010658f: 6a 00 push $0x0
pushl $166
80106591: 68 a6 00 00 00 push $0xa6
jmp alltraps
80106596: e9 e3 f4 ff ff jmp 80105a7e <alltraps>
8010659b <vector167>:
.globl vector167
vector167:
pushl $0
8010659b: 6a 00 push $0x0
pushl $167
8010659d: 68 a7 00 00 00 push $0xa7
jmp alltraps
801065a2: e9 d7 f4 ff ff jmp 80105a7e <alltraps>
801065a7 <vector168>:
.globl vector168
vector168:
pushl $0
801065a7: 6a 00 push $0x0
pushl $168
801065a9: 68 a8 00 00 00 push $0xa8
jmp alltraps
801065ae: e9 cb f4 ff ff jmp 80105a7e <alltraps>
801065b3 <vector169>:
.globl vector169
vector169:
pushl $0
801065b3: 6a 00 push $0x0
pushl $169
801065b5: 68 a9 00 00 00 push $0xa9
jmp alltraps
801065ba: e9 bf f4 ff ff jmp 80105a7e <alltraps>
801065bf <vector170>:
.globl vector170
vector170:
pushl $0
801065bf: 6a 00 push $0x0
pushl $170
801065c1: 68 aa 00 00 00 push $0xaa
jmp alltraps
801065c6: e9 b3 f4 ff ff jmp 80105a7e <alltraps>
801065cb <vector171>:
.globl vector171
vector171:
pushl $0
801065cb: 6a 00 push $0x0
pushl $171
801065cd: 68 ab 00 00 00 push $0xab
jmp alltraps
801065d2: e9 a7 f4 ff ff jmp 80105a7e <alltraps>
801065d7 <vector172>:
.globl vector172
vector172:
pushl $0
801065d7: 6a 00 push $0x0
pushl $172
801065d9: 68 ac 00 00 00 push $0xac
jmp alltraps
801065de: e9 9b f4 ff ff jmp 80105a7e <alltraps>
801065e3 <vector173>:
.globl vector173
vector173:
pushl $0
801065e3: 6a 00 push $0x0
pushl $173
801065e5: 68 ad 00 00 00 push $0xad
jmp alltraps
801065ea: e9 8f f4 ff ff jmp 80105a7e <alltraps>
801065ef <vector174>:
.globl vector174
vector174:
pushl $0
801065ef: 6a 00 push $0x0
pushl $174
801065f1: 68 ae 00 00 00 push $0xae
jmp alltraps
801065f6: e9 83 f4 ff ff jmp 80105a7e <alltraps>
801065fb <vector175>:
.globl vector175
vector175:
pushl $0
801065fb: 6a 00 push $0x0
pushl $175
801065fd: 68 af 00 00 00 push $0xaf
jmp alltraps
80106602: e9 77 f4 ff ff jmp 80105a7e <alltraps>
80106607 <vector176>:
.globl vector176
vector176:
pushl $0
80106607: 6a 00 push $0x0
pushl $176
80106609: 68 b0 00 00 00 push $0xb0
jmp alltraps
8010660e: e9 6b f4 ff ff jmp 80105a7e <alltraps>
80106613 <vector177>:
.globl vector177
vector177:
pushl $0
80106613: 6a 00 push $0x0
pushl $177
80106615: 68 b1 00 00 00 push $0xb1
jmp alltraps
8010661a: e9 5f f4 ff ff jmp 80105a7e <alltraps>
8010661f <vector178>:
.globl vector178
vector178:
pushl $0
8010661f: 6a 00 push $0x0
pushl $178
80106621: 68 b2 00 00 00 push $0xb2
jmp alltraps
80106626: e9 53 f4 ff ff jmp 80105a7e <alltraps>
8010662b <vector179>:
.globl vector179
vector179:
pushl $0
8010662b: 6a 00 push $0x0
pushl $179
8010662d: 68 b3 00 00 00 push $0xb3
jmp alltraps
80106632: e9 47 f4 ff ff jmp 80105a7e <alltraps>
80106637 <vector180>:
.globl vector180
vector180:
pushl $0
80106637: 6a 00 push $0x0
pushl $180
80106639: 68 b4 00 00 00 push $0xb4
jmp alltraps
8010663e: e9 3b f4 ff ff jmp 80105a7e <alltraps>
80106643 <vector181>:
.globl vector181
vector181:
pushl $0
80106643: 6a 00 push $0x0
pushl $181
80106645: 68 b5 00 00 00 push $0xb5
jmp alltraps
8010664a: e9 2f f4 ff ff jmp 80105a7e <alltraps>
8010664f <vector182>:
.globl vector182
vector182:
pushl $0
8010664f: 6a 00 push $0x0
pushl $182
80106651: 68 b6 00 00 00 push $0xb6
jmp alltraps
80106656: e9 23 f4 ff ff jmp 80105a7e <alltraps>
8010665b <vector183>:
.globl vector183
vector183:
pushl $0
8010665b: 6a 00 push $0x0
pushl $183
8010665d: 68 b7 00 00 00 push $0xb7
jmp alltraps
80106662: e9 17 f4 ff ff jmp 80105a7e <alltraps>
80106667 <vector184>:
.globl vector184
vector184:
pushl $0
80106667: 6a 00 push $0x0
pushl $184
80106669: 68 b8 00 00 00 push $0xb8
jmp alltraps
8010666e: e9 0b f4 ff ff jmp 80105a7e <alltraps>
80106673 <vector185>:
.globl vector185
vector185:
pushl $0
80106673: 6a 00 push $0x0
pushl $185
80106675: 68 b9 00 00 00 push $0xb9
jmp alltraps
8010667a: e9 ff f3 ff ff jmp 80105a7e <alltraps>
8010667f <vector186>:
.globl vector186
vector186:
pushl $0
8010667f: 6a 00 push $0x0
pushl $186
80106681: 68 ba 00 00 00 push $0xba
jmp alltraps
80106686: e9 f3 f3 ff ff jmp 80105a7e <alltraps>
8010668b <vector187>:
.globl vector187
vector187:
pushl $0
8010668b: 6a 00 push $0x0
pushl $187
8010668d: 68 bb 00 00 00 push $0xbb
jmp alltraps
80106692: e9 e7 f3 ff ff jmp 80105a7e <alltraps>
80106697 <vector188>:
.globl vector188
vector188:
pushl $0
80106697: 6a 00 push $0x0
pushl $188
80106699: 68 bc 00 00 00 push $0xbc
jmp alltraps
8010669e: e9 db f3 ff ff jmp 80105a7e <alltraps>
801066a3 <vector189>:
.globl vector189
vector189:
pushl $0
801066a3: 6a 00 push $0x0
pushl $189
801066a5: 68 bd 00 00 00 push $0xbd
jmp alltraps
801066aa: e9 cf f3 ff ff jmp 80105a7e <alltraps>
801066af <vector190>:
.globl vector190
vector190:
pushl $0
801066af: 6a 00 push $0x0
pushl $190
801066b1: 68 be 00 00 00 push $0xbe
jmp alltraps
801066b6: e9 c3 f3 ff ff jmp 80105a7e <alltraps>
801066bb <vector191>:
.globl vector191
vector191:
pushl $0
801066bb: 6a 00 push $0x0
pushl $191
801066bd: 68 bf 00 00 00 push $0xbf
jmp alltraps
801066c2: e9 b7 f3 ff ff jmp 80105a7e <alltraps>
801066c7 <vector192>:
.globl vector192
vector192:
pushl $0
801066c7: 6a 00 push $0x0
pushl $192
801066c9: 68 c0 00 00 00 push $0xc0
jmp alltraps
801066ce: e9 ab f3 ff ff jmp 80105a7e <alltraps>
801066d3 <vector193>:
.globl vector193
vector193:
pushl $0
801066d3: 6a 00 push $0x0
pushl $193
801066d5: 68 c1 00 00 00 push $0xc1
jmp alltraps
801066da: e9 9f f3 ff ff jmp 80105a7e <alltraps>
801066df <vector194>:
.globl vector194
vector194:
pushl $0
801066df: 6a 00 push $0x0
pushl $194
801066e1: 68 c2 00 00 00 push $0xc2
jmp alltraps
801066e6: e9 93 f3 ff ff jmp 80105a7e <alltraps>
801066eb <vector195>:
.globl vector195
vector195:
pushl $0
801066eb: 6a 00 push $0x0
pushl $195
801066ed: 68 c3 00 00 00 push $0xc3
jmp alltraps
801066f2: e9 87 f3 ff ff jmp 80105a7e <alltraps>
801066f7 <vector196>:
.globl vector196
vector196:
pushl $0
801066f7: 6a 00 push $0x0
pushl $196
801066f9: 68 c4 00 00 00 push $0xc4
jmp alltraps
801066fe: e9 7b f3 ff ff jmp 80105a7e <alltraps>
80106703 <vector197>:
.globl vector197
vector197:
pushl $0
80106703: 6a 00 push $0x0
pushl $197
80106705: 68 c5 00 00 00 push $0xc5
jmp alltraps
8010670a: e9 6f f3 ff ff jmp 80105a7e <alltraps>
8010670f <vector198>:
.globl vector198
vector198:
pushl $0
8010670f: 6a 00 push $0x0
pushl $198
80106711: 68 c6 00 00 00 push $0xc6
jmp alltraps
80106716: e9 63 f3 ff ff jmp 80105a7e <alltraps>
8010671b <vector199>:
.globl vector199
vector199:
pushl $0
8010671b: 6a 00 push $0x0
pushl $199
8010671d: 68 c7 00 00 00 push $0xc7
jmp alltraps
80106722: e9 57 f3 ff ff jmp 80105a7e <alltraps>
80106727 <vector200>:
.globl vector200
vector200:
pushl $0
80106727: 6a 00 push $0x0
pushl $200
80106729: 68 c8 00 00 00 push $0xc8
jmp alltraps
8010672e: e9 4b f3 ff ff jmp 80105a7e <alltraps>
80106733 <vector201>:
.globl vector201
vector201:
pushl $0
80106733: 6a 00 push $0x0
pushl $201
80106735: 68 c9 00 00 00 push $0xc9
jmp alltraps
8010673a: e9 3f f3 ff ff jmp 80105a7e <alltraps>
8010673f <vector202>:
.globl vector202
vector202:
pushl $0
8010673f: 6a 00 push $0x0
pushl $202
80106741: 68 ca 00 00 00 push $0xca
jmp alltraps
80106746: e9 33 f3 ff ff jmp 80105a7e <alltraps>
8010674b <vector203>:
.globl vector203
vector203:
pushl $0
8010674b: 6a 00 push $0x0
pushl $203
8010674d: 68 cb 00 00 00 push $0xcb
jmp alltraps
80106752: e9 27 f3 ff ff jmp 80105a7e <alltraps>
80106757 <vector204>:
.globl vector204
vector204:
pushl $0
80106757: 6a 00 push $0x0
pushl $204
80106759: 68 cc 00 00 00 push $0xcc
jmp alltraps
8010675e: e9 1b f3 ff ff jmp 80105a7e <alltraps>
80106763 <vector205>:
.globl vector205
vector205:
pushl $0
80106763: 6a 00 push $0x0
pushl $205
80106765: 68 cd 00 00 00 push $0xcd
jmp alltraps
8010676a: e9 0f f3 ff ff jmp 80105a7e <alltraps>
8010676f <vector206>:
.globl vector206
vector206:
pushl $0
8010676f: 6a 00 push $0x0
pushl $206
80106771: 68 ce 00 00 00 push $0xce
jmp alltraps
80106776: e9 03 f3 ff ff jmp 80105a7e <alltraps>
8010677b <vector207>:
.globl vector207
vector207:
pushl $0
8010677b: 6a 00 push $0x0
pushl $207
8010677d: 68 cf 00 00 00 push $0xcf
jmp alltraps
80106782: e9 f7 f2 ff ff jmp 80105a7e <alltraps>
80106787 <vector208>:
.globl vector208
vector208:
pushl $0
80106787: 6a 00 push $0x0
pushl $208
80106789: 68 d0 00 00 00 push $0xd0
jmp alltraps
8010678e: e9 eb f2 ff ff jmp 80105a7e <alltraps>
80106793 <vector209>:
.globl vector209
vector209:
pushl $0
80106793: 6a 00 push $0x0
pushl $209
80106795: 68 d1 00 00 00 push $0xd1
jmp alltraps
8010679a: e9 df f2 ff ff jmp 80105a7e <alltraps>
8010679f <vector210>:
.globl vector210
vector210:
pushl $0
8010679f: 6a 00 push $0x0
pushl $210
801067a1: 68 d2 00 00 00 push $0xd2
jmp alltraps
801067a6: e9 d3 f2 ff ff jmp 80105a7e <alltraps>
801067ab <vector211>:
.globl vector211
vector211:
pushl $0
801067ab: 6a 00 push $0x0
pushl $211
801067ad: 68 d3 00 00 00 push $0xd3
jmp alltraps
801067b2: e9 c7 f2 ff ff jmp 80105a7e <alltraps>
801067b7 <vector212>:
.globl vector212
vector212:
pushl $0
801067b7: 6a 00 push $0x0
pushl $212
801067b9: 68 d4 00 00 00 push $0xd4
jmp alltraps
801067be: e9 bb f2 ff ff jmp 80105a7e <alltraps>
801067c3 <vector213>:
.globl vector213
vector213:
pushl $0
801067c3: 6a 00 push $0x0
pushl $213
801067c5: 68 d5 00 00 00 push $0xd5
jmp alltraps
801067ca: e9 af f2 ff ff jmp 80105a7e <alltraps>
801067cf <vector214>:
.globl vector214
vector214:
pushl $0
801067cf: 6a 00 push $0x0
pushl $214
801067d1: 68 d6 00 00 00 push $0xd6
jmp alltraps
801067d6: e9 a3 f2 ff ff jmp 80105a7e <alltraps>
801067db <vector215>:
.globl vector215
vector215:
pushl $0
801067db: 6a 00 push $0x0
pushl $215
801067dd: 68 d7 00 00 00 push $0xd7
jmp alltraps
801067e2: e9 97 f2 ff ff jmp 80105a7e <alltraps>
801067e7 <vector216>:
.globl vector216
vector216:
pushl $0
801067e7: 6a 00 push $0x0
pushl $216
801067e9: 68 d8 00 00 00 push $0xd8
jmp alltraps
801067ee: e9 8b f2 ff ff jmp 80105a7e <alltraps>
801067f3 <vector217>:
.globl vector217
vector217:
pushl $0
801067f3: 6a 00 push $0x0
pushl $217
801067f5: 68 d9 00 00 00 push $0xd9
jmp alltraps
801067fa: e9 7f f2 ff ff jmp 80105a7e <alltraps>
801067ff <vector218>:
.globl vector218
vector218:
pushl $0
801067ff: 6a 00 push $0x0
pushl $218
80106801: 68 da 00 00 00 push $0xda
jmp alltraps
80106806: e9 73 f2 ff ff jmp 80105a7e <alltraps>
8010680b <vector219>:
.globl vector219
vector219:
pushl $0
8010680b: 6a 00 push $0x0
pushl $219
8010680d: 68 db 00 00 00 push $0xdb
jmp alltraps
80106812: e9 67 f2 ff ff jmp 80105a7e <alltraps>
80106817 <vector220>:
.globl vector220
vector220:
pushl $0
80106817: 6a 00 push $0x0
pushl $220
80106819: 68 dc 00 00 00 push $0xdc
jmp alltraps
8010681e: e9 5b f2 ff ff jmp 80105a7e <alltraps>
80106823 <vector221>:
.globl vector221
vector221:
pushl $0
80106823: 6a 00 push $0x0
pushl $221
80106825: 68 dd 00 00 00 push $0xdd
jmp alltraps
8010682a: e9 4f f2 ff ff jmp 80105a7e <alltraps>
8010682f <vector222>:
.globl vector222
vector222:
pushl $0
8010682f: 6a 00 push $0x0
pushl $222
80106831: 68 de 00 00 00 push $0xde
jmp alltraps
80106836: e9 43 f2 ff ff jmp 80105a7e <alltraps>
8010683b <vector223>:
.globl vector223
vector223:
pushl $0
8010683b: 6a 00 push $0x0
pushl $223
8010683d: 68 df 00 00 00 push $0xdf
jmp alltraps
80106842: e9 37 f2 ff ff jmp 80105a7e <alltraps>
80106847 <vector224>:
.globl vector224
vector224:
pushl $0
80106847: 6a 00 push $0x0
pushl $224
80106849: 68 e0 00 00 00 push $0xe0
jmp alltraps
8010684e: e9 2b f2 ff ff jmp 80105a7e <alltraps>
80106853 <vector225>:
.globl vector225
vector225:
pushl $0
80106853: 6a 00 push $0x0
pushl $225
80106855: 68 e1 00 00 00 push $0xe1
jmp alltraps
8010685a: e9 1f f2 ff ff jmp 80105a7e <alltraps>
8010685f <vector226>:
.globl vector226
vector226:
pushl $0
8010685f: 6a 00 push $0x0
pushl $226
80106861: 68 e2 00 00 00 push $0xe2
jmp alltraps
80106866: e9 13 f2 ff ff jmp 80105a7e <alltraps>
8010686b <vector227>:
.globl vector227
vector227:
pushl $0
8010686b: 6a 00 push $0x0
pushl $227
8010686d: 68 e3 00 00 00 push $0xe3
jmp alltraps
80106872: e9 07 f2 ff ff jmp 80105a7e <alltraps>
80106877 <vector228>:
.globl vector228
vector228:
pushl $0
80106877: 6a 00 push $0x0
pushl $228
80106879: 68 e4 00 00 00 push $0xe4
jmp alltraps
8010687e: e9 fb f1 ff ff jmp 80105a7e <alltraps>
80106883 <vector229>:
.globl vector229
vector229:
pushl $0
80106883: 6a 00 push $0x0
pushl $229
80106885: 68 e5 00 00 00 push $0xe5
jmp alltraps
8010688a: e9 ef f1 ff ff jmp 80105a7e <alltraps>
8010688f <vector230>:
.globl vector230
vector230:
pushl $0
8010688f: 6a 00 push $0x0
pushl $230
80106891: 68 e6 00 00 00 push $0xe6
jmp alltraps
80106896: e9 e3 f1 ff ff jmp 80105a7e <alltraps>
8010689b <vector231>:
.globl vector231
vector231:
pushl $0
8010689b: 6a 00 push $0x0
pushl $231
8010689d: 68 e7 00 00 00 push $0xe7
jmp alltraps
801068a2: e9 d7 f1 ff ff jmp 80105a7e <alltraps>
801068a7 <vector232>:
.globl vector232
vector232:
pushl $0
801068a7: 6a 00 push $0x0
pushl $232
801068a9: 68 e8 00 00 00 push $0xe8
jmp alltraps
801068ae: e9 cb f1 ff ff jmp 80105a7e <alltraps>
801068b3 <vector233>:
.globl vector233
vector233:
pushl $0
801068b3: 6a 00 push $0x0
pushl $233
801068b5: 68 e9 00 00 00 push $0xe9
jmp alltraps
801068ba: e9 bf f1 ff ff jmp 80105a7e <alltraps>
801068bf <vector234>:
.globl vector234
vector234:
pushl $0
801068bf: 6a 00 push $0x0
pushl $234
801068c1: 68 ea 00 00 00 push $0xea
jmp alltraps
801068c6: e9 b3 f1 ff ff jmp 80105a7e <alltraps>
801068cb <vector235>:
.globl vector235
vector235:
pushl $0
801068cb: 6a 00 push $0x0
pushl $235
801068cd: 68 eb 00 00 00 push $0xeb
jmp alltraps
801068d2: e9 a7 f1 ff ff jmp 80105a7e <alltraps>
801068d7 <vector236>:
.globl vector236
vector236:
pushl $0
801068d7: 6a 00 push $0x0
pushl $236
801068d9: 68 ec 00 00 00 push $0xec
jmp alltraps
801068de: e9 9b f1 ff ff jmp 80105a7e <alltraps>
801068e3 <vector237>:
.globl vector237
vector237:
pushl $0
801068e3: 6a 00 push $0x0
pushl $237
801068e5: 68 ed 00 00 00 push $0xed
jmp alltraps
801068ea: e9 8f f1 ff ff jmp 80105a7e <alltraps>
801068ef <vector238>:
.globl vector238
vector238:
pushl $0
801068ef: 6a 00 push $0x0
pushl $238
801068f1: 68 ee 00 00 00 push $0xee
jmp alltraps
801068f6: e9 83 f1 ff ff jmp 80105a7e <alltraps>
801068fb <vector239>:
.globl vector239
vector239:
pushl $0
801068fb: 6a 00 push $0x0
pushl $239
801068fd: 68 ef 00 00 00 push $0xef
jmp alltraps
80106902: e9 77 f1 ff ff jmp 80105a7e <alltraps>
80106907 <vector240>:
.globl vector240
vector240:
pushl $0
80106907: 6a 00 push $0x0
pushl $240
80106909: 68 f0 00 00 00 push $0xf0
jmp alltraps
8010690e: e9 6b f1 ff ff jmp 80105a7e <alltraps>
80106913 <vector241>:
.globl vector241
vector241:
pushl $0
80106913: 6a 00 push $0x0
pushl $241
80106915: 68 f1 00 00 00 push $0xf1
jmp alltraps
8010691a: e9 5f f1 ff ff jmp 80105a7e <alltraps>
8010691f <vector242>:
.globl vector242
vector242:
pushl $0
8010691f: 6a 00 push $0x0
pushl $242
80106921: 68 f2 00 00 00 push $0xf2
jmp alltraps
80106926: e9 53 f1 ff ff jmp 80105a7e <alltraps>
8010692b <vector243>:
.globl vector243
vector243:
pushl $0
8010692b: 6a 00 push $0x0
pushl $243
8010692d: 68 f3 00 00 00 push $0xf3
jmp alltraps
80106932: e9 47 f1 ff ff jmp 80105a7e <alltraps>
80106937 <vector244>:
.globl vector244
vector244:
pushl $0
80106937: 6a 00 push $0x0
pushl $244
80106939: 68 f4 00 00 00 push $0xf4
jmp alltraps
8010693e: e9 3b f1 ff ff jmp 80105a7e <alltraps>
80106943 <vector245>:
.globl vector245
vector245:
pushl $0
80106943: 6a 00 push $0x0
pushl $245
80106945: 68 f5 00 00 00 push $0xf5
jmp alltraps
8010694a: e9 2f f1 ff ff jmp 80105a7e <alltraps>
8010694f <vector246>:
.globl vector246
vector246:
pushl $0
8010694f: 6a 00 push $0x0
pushl $246
80106951: 68 f6 00 00 00 push $0xf6
jmp alltraps
80106956: e9 23 f1 ff ff jmp 80105a7e <alltraps>
8010695b <vector247>:
.globl vector247
vector247:
pushl $0
8010695b: 6a 00 push $0x0
pushl $247
8010695d: 68 f7 00 00 00 push $0xf7
jmp alltraps
80106962: e9 17 f1 ff ff jmp 80105a7e <alltraps>
80106967 <vector248>:
.globl vector248
vector248:
pushl $0
80106967: 6a 00 push $0x0
pushl $248
80106969: 68 f8 00 00 00 push $0xf8
jmp alltraps
8010696e: e9 0b f1 ff ff jmp 80105a7e <alltraps>
80106973 <vector249>:
.globl vector249
vector249:
pushl $0
80106973: 6a 00 push $0x0
pushl $249
80106975: 68 f9 00 00 00 push $0xf9
jmp alltraps
8010697a: e9 ff f0 ff ff jmp 80105a7e <alltraps>
8010697f <vector250>:
.globl vector250
vector250:
pushl $0
8010697f: 6a 00 push $0x0
pushl $250
80106981: 68 fa 00 00 00 push $0xfa
jmp alltraps
80106986: e9 f3 f0 ff ff jmp 80105a7e <alltraps>
8010698b <vector251>:
.globl vector251
vector251:
pushl $0
8010698b: 6a 00 push $0x0
pushl $251
8010698d: 68 fb 00 00 00 push $0xfb
jmp alltraps
80106992: e9 e7 f0 ff ff jmp 80105a7e <alltraps>
80106997 <vector252>:
.globl vector252
vector252:
pushl $0
80106997: 6a 00 push $0x0
pushl $252
80106999: 68 fc 00 00 00 push $0xfc
jmp alltraps
8010699e: e9 db f0 ff ff jmp 80105a7e <alltraps>
801069a3 <vector253>:
.globl vector253
vector253:
pushl $0
801069a3: 6a 00 push $0x0
pushl $253
801069a5: 68 fd 00 00 00 push $0xfd
jmp alltraps
801069aa: e9 cf f0 ff ff jmp 80105a7e <alltraps>
801069af <vector254>:
.globl vector254
vector254:
pushl $0
801069af: 6a 00 push $0x0
pushl $254
801069b1: 68 fe 00 00 00 push $0xfe
jmp alltraps
801069b6: e9 c3 f0 ff ff jmp 80105a7e <alltraps>
801069bb <vector255>:
.globl vector255
vector255:
pushl $0
801069bb: 6a 00 push $0x0
pushl $255
801069bd: 68 ff 00 00 00 push $0xff
jmp alltraps
801069c2: e9 b7 f0 ff ff jmp 80105a7e <alltraps>
801069c7: 66 90 xchg %ax,%ax
801069c9: 66 90 xchg %ax,%ax
801069cb: 66 90 xchg %ax,%ax
801069cd: 66 90 xchg %ax,%ax
801069cf: 90 nop
801069d0 <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)
{
801069d0: 55 push %ebp
801069d1: 89 e5 mov %esp,%ebp
801069d3: 57 push %edi
801069d4: 56 push %esi
801069d5: 53 push %ebx
801069d6: 89 d3 mov %edx,%ebx
pde_t *pde;
pte_t *pgtab;
pde = &pgdir[PDX(va)];
801069d8: c1 ea 16 shr $0x16,%edx
801069db: 8d 3c 90 lea (%eax,%edx,4),%edi
// 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)
{
801069de: 83 ec 0c sub $0xc,%esp
pde_t *pde;
pte_t *pgtab;
pde = &pgdir[PDX(va)];
if(*pde & PTE_P){
801069e1: 8b 07 mov (%edi),%eax
801069e3: a8 01 test $0x1,%al
801069e5: 74 29 je 80106a10 <walkpgdir+0x40>
pgtab = (pte_t*)P2V(PTE_ADDR(*pde));
801069e7: 25 00 f0 ff ff and $0xfffff000,%eax
801069ec: 8d b0 00 00 00 80 lea -0x80000000(%eax),%esi
// be further restricted by the permissions in the page table
// entries, if necessary.
*pde = V2P(pgtab) | PTE_P | PTE_W | PTE_U;
}
return &pgtab[PTX(va)];
}
801069f2: 8d 65 f4 lea -0xc(%ebp),%esp
// 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;
}
return &pgtab[PTX(va)];
801069f5: c1 eb 0a shr $0xa,%ebx
801069f8: 81 e3 fc 0f 00 00 and $0xffc,%ebx
801069fe: 8d 04 1e lea (%esi,%ebx,1),%eax
}
80106a01: 5b pop %ebx
80106a02: 5e pop %esi
80106a03: 5f pop %edi
80106a04: 5d pop %ebp
80106a05: c3 ret
80106a06: 8d 76 00 lea 0x0(%esi),%esi
80106a09: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
pde = &pgdir[PDX(va)];
if(*pde & PTE_P){
pgtab = (pte_t*)P2V(PTE_ADDR(*pde));
} else {
if(!alloc || (pgtab = (pte_t*)kalloc()) == 0)
80106a10: 85 c9 test %ecx,%ecx
80106a12: 74 2c je 80106a40 <walkpgdir+0x70>
80106a14: e8 57 ba ff ff call 80102470 <kalloc>
80106a19: 85 c0 test %eax,%eax
80106a1b: 89 c6 mov %eax,%esi
80106a1d: 74 21 je 80106a40 <walkpgdir+0x70>
return 0;
// Make sure all those PTE_P bits are zero.
memset(pgtab, 0, PGSIZE);
80106a1f: 83 ec 04 sub $0x4,%esp
80106a22: 68 00 10 00 00 push $0x1000
80106a27: 6a 00 push $0x0
80106a29: 50 push %eax
80106a2a: e8 11 dd ff ff call 80104740 <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;
80106a2f: 8d 86 00 00 00 80 lea -0x80000000(%esi),%eax
80106a35: 83 c4 10 add $0x10,%esp
80106a38: 83 c8 07 or $0x7,%eax
80106a3b: 89 07 mov %eax,(%edi)
80106a3d: eb b3 jmp 801069f2 <walkpgdir+0x22>
80106a3f: 90 nop
}
return &pgtab[PTX(va)];
}
80106a40: 8d 65 f4 lea -0xc(%ebp),%esp
pde = &pgdir[PDX(va)];
if(*pde & PTE_P){
pgtab = (pte_t*)P2V(PTE_ADDR(*pde));
} else {
if(!alloc || (pgtab = (pte_t*)kalloc()) == 0)
return 0;
80106a43: 31 c0 xor %eax,%eax
// be further restricted by the permissions in the page table
// entries, if necessary.
*pde = V2P(pgtab) | PTE_P | PTE_W | PTE_U;
}
return &pgtab[PTX(va)];
}
80106a45: 5b pop %ebx
80106a46: 5e pop %esi
80106a47: 5f pop %edi
80106a48: 5d pop %ebp
80106a49: c3 ret
80106a4a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80106a50 <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)
{
80106a50: 55 push %ebp
80106a51: 89 e5 mov %esp,%ebp
80106a53: 57 push %edi
80106a54: 56 push %esi
80106a55: 53 push %ebx
char *a, *last;
pte_t *pte;
a = (char*)PGROUNDDOWN((uint)va);
80106a56: 89 d3 mov %edx,%ebx
80106a58: 81 e3 00 f0 ff ff and $0xfffff000,%ebx
// 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)
{
80106a5e: 83 ec 1c sub $0x1c,%esp
80106a61: 89 45 e4 mov %eax,-0x1c(%ebp)
char *a, *last;
pte_t *pte;
a = (char*)PGROUNDDOWN((uint)va);
last = (char*)PGROUNDDOWN(((uint)va) + size - 1);
80106a64: 8d 44 0a ff lea -0x1(%edx,%ecx,1),%eax
80106a68: 8b 7d 08 mov 0x8(%ebp),%edi
80106a6b: 25 00 f0 ff ff and $0xfffff000,%eax
80106a70: 89 45 e0 mov %eax,-0x20(%ebp)
for(;;){
if((pte = walkpgdir(pgdir, a, 1)) == 0)
return -1;
if(*pte & PTE_P)
panic("remap");
*pte = pa | perm | PTE_P;
80106a73: 8b 45 0c mov 0xc(%ebp),%eax
80106a76: 29 df sub %ebx,%edi
80106a78: 83 c8 01 or $0x1,%eax
80106a7b: 89 45 dc mov %eax,-0x24(%ebp)
80106a7e: eb 15 jmp 80106a95 <mappages+0x45>
a = (char*)PGROUNDDOWN((uint)va);
last = (char*)PGROUNDDOWN(((uint)va) + size - 1);
for(;;){
if((pte = walkpgdir(pgdir, a, 1)) == 0)
return -1;
if(*pte & PTE_P)
80106a80: f6 00 01 testb $0x1,(%eax)
80106a83: 75 45 jne 80106aca <mappages+0x7a>
panic("remap");
*pte = pa | perm | PTE_P;
80106a85: 0b 75 dc or -0x24(%ebp),%esi
if(a == last)
80106a88: 3b 5d e0 cmp -0x20(%ebp),%ebx
for(;;){
if((pte = walkpgdir(pgdir, a, 1)) == 0)
return -1;
if(*pte & PTE_P)
panic("remap");
*pte = pa | perm | PTE_P;
80106a8b: 89 30 mov %esi,(%eax)
if(a == last)
80106a8d: 74 31 je 80106ac0 <mappages+0x70>
break;
a += PGSIZE;
80106a8f: 81 c3 00 10 00 00 add $0x1000,%ebx
pte_t *pte;
a = (char*)PGROUNDDOWN((uint)va);
last = (char*)PGROUNDDOWN(((uint)va) + size - 1);
for(;;){
if((pte = walkpgdir(pgdir, a, 1)) == 0)
80106a95: 8b 45 e4 mov -0x1c(%ebp),%eax
80106a98: b9 01 00 00 00 mov $0x1,%ecx
80106a9d: 89 da mov %ebx,%edx
80106a9f: 8d 34 3b lea (%ebx,%edi,1),%esi
80106aa2: e8 29 ff ff ff call 801069d0 <walkpgdir>
80106aa7: 85 c0 test %eax,%eax
80106aa9: 75 d5 jne 80106a80 <mappages+0x30>
break;
a += PGSIZE;
pa += PGSIZE;
}
return 0;
}
80106aab: 8d 65 f4 lea -0xc(%ebp),%esp
a = (char*)PGROUNDDOWN((uint)va);
last = (char*)PGROUNDDOWN(((uint)va) + size - 1);
for(;;){
if((pte = walkpgdir(pgdir, a, 1)) == 0)
return -1;
80106aae: b8 ff ff ff ff mov $0xffffffff,%eax
break;
a += PGSIZE;
pa += PGSIZE;
}
return 0;
}
80106ab3: 5b pop %ebx
80106ab4: 5e pop %esi
80106ab5: 5f pop %edi
80106ab6: 5d pop %ebp
80106ab7: c3 ret
80106ab8: 90 nop
80106ab9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80106ac0: 8d 65 f4 lea -0xc(%ebp),%esp
if(a == last)
break;
a += PGSIZE;
pa += PGSIZE;
}
return 0;
80106ac3: 31 c0 xor %eax,%eax
}
80106ac5: 5b pop %ebx
80106ac6: 5e pop %esi
80106ac7: 5f pop %edi
80106ac8: 5d pop %ebp
80106ac9: c3 ret
last = (char*)PGROUNDDOWN(((uint)va) + size - 1);
for(;;){
if((pte = walkpgdir(pgdir, a, 1)) == 0)
return -1;
if(*pte & PTE_P)
panic("remap");
80106aca: 83 ec 0c sub $0xc,%esp
80106acd: 68 38 7c 10 80 push $0x80107c38
80106ad2: e8 99 98 ff ff call 80100370 <panic>
80106ad7: 89 f6 mov %esi,%esi
80106ad9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80106ae0 <deallocuvm.part.0>:
// Deallocate user pages to bring the process size from oldsz to
// 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)
80106ae0: 55 push %ebp
80106ae1: 89 e5 mov %esp,%ebp
80106ae3: 57 push %edi
80106ae4: 56 push %esi
80106ae5: 53 push %ebx
uint a, pa;
if(newsz >= oldsz)
return oldsz;
a = PGROUNDUP(newsz);
80106ae6: 8d 99 ff 0f 00 00 lea 0xfff(%ecx),%ebx
// Deallocate user pages to bring the process size from oldsz to
// 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)
80106aec: 89 c7 mov %eax,%edi
uint a, pa;
if(newsz >= oldsz)
return oldsz;
a = PGROUNDUP(newsz);
80106aee: 81 e3 00 f0 ff ff and $0xfffff000,%ebx
// Deallocate user pages to bring the process size from oldsz to
// 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)
80106af4: 83 ec 1c sub $0x1c,%esp
80106af7: 89 4d e0 mov %ecx,-0x20(%ebp)
if(newsz >= oldsz)
return oldsz;
a = PGROUNDUP(newsz);
for(; a < oldsz; a += PGSIZE){
80106afa: 39 d3 cmp %edx,%ebx
80106afc: 73 66 jae 80106b64 <deallocuvm.part.0+0x84>
80106afe: 89 d6 mov %edx,%esi
80106b00: eb 3d jmp 80106b3f <deallocuvm.part.0+0x5f>
80106b02: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
pte = walkpgdir(pgdir, (char*)a, 0);
if(!pte)
a = PGADDR(PDX(a) + 1, 0, 0) - PGSIZE;
else if((*pte & PTE_P) != 0){
80106b08: 8b 10 mov (%eax),%edx
80106b0a: f6 c2 01 test $0x1,%dl
80106b0d: 74 26 je 80106b35 <deallocuvm.part.0+0x55>
pa = PTE_ADDR(*pte);
if(pa == 0)
80106b0f: 81 e2 00 f0 ff ff and $0xfffff000,%edx
80106b15: 74 58 je 80106b6f <deallocuvm.part.0+0x8f>
panic("kfree");
char *v = P2V(pa);
kfree(v);
80106b17: 83 ec 0c sub $0xc,%esp
80106b1a: 81 c2 00 00 00 80 add $0x80000000,%edx
80106b20: 89 45 e4 mov %eax,-0x1c(%ebp)
80106b23: 52 push %edx
80106b24: e8 97 b7 ff ff call 801022c0 <kfree>
*pte = 0;
80106b29: 8b 45 e4 mov -0x1c(%ebp),%eax
80106b2c: 83 c4 10 add $0x10,%esp
80106b2f: c7 00 00 00 00 00 movl $0x0,(%eax)
if(newsz >= oldsz)
return oldsz;
a = PGROUNDUP(newsz);
for(; a < oldsz; a += PGSIZE){
80106b35: 81 c3 00 10 00 00 add $0x1000,%ebx
80106b3b: 39 f3 cmp %esi,%ebx
80106b3d: 73 25 jae 80106b64 <deallocuvm.part.0+0x84>
pte = walkpgdir(pgdir, (char*)a, 0);
80106b3f: 31 c9 xor %ecx,%ecx
80106b41: 89 da mov %ebx,%edx
80106b43: 89 f8 mov %edi,%eax
80106b45: e8 86 fe ff ff call 801069d0 <walkpgdir>
if(!pte)
80106b4a: 85 c0 test %eax,%eax
80106b4c: 75 ba jne 80106b08 <deallocuvm.part.0+0x28>
a = PGADDR(PDX(a) + 1, 0, 0) - PGSIZE;
80106b4e: 81 e3 00 00 c0 ff and $0xffc00000,%ebx
80106b54: 81 c3 00 f0 3f 00 add $0x3ff000,%ebx
if(newsz >= oldsz)
return oldsz;
a = PGROUNDUP(newsz);
for(; a < oldsz; a += PGSIZE){
80106b5a: 81 c3 00 10 00 00 add $0x1000,%ebx
80106b60: 39 f3 cmp %esi,%ebx
80106b62: 72 db jb 80106b3f <deallocuvm.part.0+0x5f>
kfree(v);
*pte = 0;
}
}
return newsz;
}
80106b64: 8b 45 e0 mov -0x20(%ebp),%eax
80106b67: 8d 65 f4 lea -0xc(%ebp),%esp
80106b6a: 5b pop %ebx
80106b6b: 5e pop %esi
80106b6c: 5f pop %edi
80106b6d: 5d pop %ebp
80106b6e: c3 ret
if(!pte)
a = PGADDR(PDX(a) + 1, 0, 0) - PGSIZE;
else if((*pte & PTE_P) != 0){
pa = PTE_ADDR(*pte);
if(pa == 0)
panic("kfree");
80106b6f: 83 ec 0c sub $0xc,%esp
80106b72: 68 92 75 10 80 push $0x80107592
80106b77: e8 f4 97 ff ff call 80100370 <panic>
80106b7c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80106b80 <seginit>:
// Set up CPU's kernel segment descriptors.
// Run once on entry on each CPU.
void
seginit(void)
{
80106b80: 55 push %ebp
80106b81: 89 e5 mov %esp,%ebp
80106b83: 53 push %ebx
// 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()];
c->gdt[SEG_KCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, 0);
80106b84: 31 db xor %ebx,%ebx
// Set up CPU's kernel segment descriptors.
// Run once on entry on each CPU.
void
seginit(void)
{
80106b86: 83 ec 14 sub $0x14,%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()];
80106b89: e8 42 bb ff ff call 801026d0 <cpunum>
c->gdt[SEG_KCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, 0);
80106b8e: 69 c0 bc 00 00 00 imul $0xbc,%eax,%eax
80106b94: b9 ff ff ff ff mov $0xffffffff,%ecx
80106b99: 8d 90 a0 27 11 80 lea -0x7feed860(%eax),%edx
80106b9f: c6 80 1d 28 11 80 9a movb $0x9a,-0x7feed7e3(%eax)
80106ba6: c6 80 1e 28 11 80 cf movb $0xcf,-0x7feed7e2(%eax)
c->gdt[SEG_KDATA] = SEG(STA_W, 0, 0xffffffff, 0);
80106bad: c6 80 25 28 11 80 92 movb $0x92,-0x7feed7db(%eax)
80106bb4: c6 80 26 28 11 80 cf movb $0xcf,-0x7feed7da(%eax)
// 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()];
c->gdt[SEG_KCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, 0);
80106bbb: 66 89 4a 78 mov %cx,0x78(%edx)
c->gdt[SEG_KDATA] = SEG(STA_W, 0, 0xffffffff, 0);
80106bbf: b9 ff ff ff ff mov $0xffffffff,%ecx
// 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()];
c->gdt[SEG_KCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, 0);
80106bc4: 66 89 5a 7a mov %bx,0x7a(%edx)
c->gdt[SEG_KDATA] = SEG(STA_W, 0, 0xffffffff, 0);
80106bc8: 66 89 8a 80 00 00 00 mov %cx,0x80(%edx)
80106bcf: 31 db xor %ebx,%ebx
c->gdt[SEG_UCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, DPL_USER);
80106bd1: b9 ff ff ff ff mov $0xffffffff,%ecx
// 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()];
c->gdt[SEG_KCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, 0);
c->gdt[SEG_KDATA] = SEG(STA_W, 0, 0xffffffff, 0);
80106bd6: 66 89 9a 82 00 00 00 mov %bx,0x82(%edx)
c->gdt[SEG_UCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, DPL_USER);
80106bdd: 66 89 8a 90 00 00 00 mov %cx,0x90(%edx)
80106be4: 31 db xor %ebx,%ebx
c->gdt[SEG_UDATA] = SEG(STA_W, 0, 0xffffffff, DPL_USER);
80106be6: b9 ff ff ff ff mov $0xffffffff,%ecx
// because it would have to have DPL_USR, but the CPU forbids
// an interrupt from CPL=0 to DPL=3.
c = &cpus[cpunum()];
c->gdt[SEG_KCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, 0);
c->gdt[SEG_KDATA] = SEG(STA_W, 0, 0xffffffff, 0);
c->gdt[SEG_UCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, DPL_USER);
80106beb: 66 89 9a 92 00 00 00 mov %bx,0x92(%edx)
c->gdt[SEG_UDATA] = SEG(STA_W, 0, 0xffffffff, DPL_USER);
80106bf2: 31 db xor %ebx,%ebx
80106bf4: 66 89 8a 98 00 00 00 mov %cx,0x98(%edx)
// Map cpu and proc -- these are private per cpu.
c->gdt[SEG_KCPU] = SEG(STA_W, &c->cpu, 8, 0);
80106bfb: 8d 88 54 28 11 80 lea -0x7feed7ac(%eax),%ecx
// an interrupt from CPL=0 to DPL=3.
c = &cpus[cpunum()];
c->gdt[SEG_KCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, 0);
c->gdt[SEG_KDATA] = SEG(STA_W, 0, 0xffffffff, 0);
c->gdt[SEG_UCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, DPL_USER);
c->gdt[SEG_UDATA] = SEG(STA_W, 0, 0xffffffff, DPL_USER);
80106c01: 66 89 9a 9a 00 00 00 mov %bx,0x9a(%edx)
// Map cpu and proc -- these are private per cpu.
c->gdt[SEG_KCPU] = SEG(STA_W, &c->cpu, 8, 0);
80106c08: 31 db xor %ebx,%ebx
// because it would have to have DPL_USR, but the CPU forbids
// an interrupt from CPL=0 to DPL=3.
c = &cpus[cpunum()];
c->gdt[SEG_KCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, 0);
c->gdt[SEG_KDATA] = SEG(STA_W, 0, 0xffffffff, 0);
c->gdt[SEG_UCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, DPL_USER);
80106c0a: c6 80 35 28 11 80 fa movb $0xfa,-0x7feed7cb(%eax)
80106c11: c6 80 36 28 11 80 cf movb $0xcf,-0x7feed7ca(%eax)
c->gdt[SEG_UDATA] = SEG(STA_W, 0, 0xffffffff, DPL_USER);
// Map cpu and proc -- these are private per cpu.
c->gdt[SEG_KCPU] = SEG(STA_W, &c->cpu, 8, 0);
80106c18: 66 89 9a 88 00 00 00 mov %bx,0x88(%edx)
80106c1f: 66 89 8a 8a 00 00 00 mov %cx,0x8a(%edx)
80106c26: 89 cb mov %ecx,%ebx
80106c28: c1 e9 18 shr $0x18,%ecx
// an interrupt from CPL=0 to DPL=3.
c = &cpus[cpunum()];
c->gdt[SEG_KCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, 0);
c->gdt[SEG_KDATA] = SEG(STA_W, 0, 0xffffffff, 0);
c->gdt[SEG_UCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, DPL_USER);
c->gdt[SEG_UDATA] = SEG(STA_W, 0, 0xffffffff, DPL_USER);
80106c2b: c6 80 3d 28 11 80 f2 movb $0xf2,-0x7feed7c3(%eax)
80106c32: c6 80 3e 28 11 80 cf movb $0xcf,-0x7feed7c2(%eax)
// Map cpu and proc -- these are private per cpu.
c->gdt[SEG_KCPU] = SEG(STA_W, &c->cpu, 8, 0);
80106c39: 88 8a 8f 00 00 00 mov %cl,0x8f(%edx)
80106c3f: c6 80 2d 28 11 80 92 movb $0x92,-0x7feed7d3(%eax)
static inline void
lgdt(struct segdesc *p, int size)
{
volatile ushort pd[3];
pd[0] = size-1;
80106c46: b9 37 00 00 00 mov $0x37,%ecx
80106c4b: c6 80 2e 28 11 80 c0 movb $0xc0,-0x7feed7d2(%eax)
lgdt(c->gdt, sizeof(c->gdt));
80106c52: 05 10 28 11 80 add $0x80112810,%eax
80106c57: 66 89 4d f2 mov %cx,-0xe(%ebp)
c->gdt[SEG_KDATA] = SEG(STA_W, 0, 0xffffffff, 0);
c->gdt[SEG_UCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, DPL_USER);
c->gdt[SEG_UDATA] = SEG(STA_W, 0, 0xffffffff, DPL_USER);
// Map cpu and proc -- these are private per cpu.
c->gdt[SEG_KCPU] = SEG(STA_W, &c->cpu, 8, 0);
80106c5b: c1 eb 10 shr $0x10,%ebx
pd[1] = (uint)p;
80106c5e: 66 89 45 f4 mov %ax,-0xc(%ebp)
pd[2] = (uint)p >> 16;
80106c62: c1 e8 10 shr $0x10,%eax
// 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()];
c->gdt[SEG_KCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, 0);
80106c65: c6 42 7c 00 movb $0x0,0x7c(%edx)
80106c69: c6 42 7f 00 movb $0x0,0x7f(%edx)
c->gdt[SEG_KDATA] = SEG(STA_W, 0, 0xffffffff, 0);
80106c6d: c6 82 84 00 00 00 00 movb $0x0,0x84(%edx)
80106c74: c6 82 87 00 00 00 00 movb $0x0,0x87(%edx)
c->gdt[SEG_UCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, DPL_USER);
80106c7b: c6 82 94 00 00 00 00 movb $0x0,0x94(%edx)
80106c82: c6 82 97 00 00 00 00 movb $0x0,0x97(%edx)
c->gdt[SEG_UDATA] = SEG(STA_W, 0, 0xffffffff, DPL_USER);
80106c89: c6 82 9c 00 00 00 00 movb $0x0,0x9c(%edx)
80106c90: c6 82 9f 00 00 00 00 movb $0x0,0x9f(%edx)
// Map cpu and proc -- these are private per cpu.
c->gdt[SEG_KCPU] = SEG(STA_W, &c->cpu, 8, 0);
80106c97: 88 9a 8c 00 00 00 mov %bl,0x8c(%edx)
80106c9d: 66 89 45 f6 mov %ax,-0xa(%ebp)
asm volatile("lgdt (%0)" : : "r" (pd));
80106ca1: 8d 45 f2 lea -0xe(%ebp),%eax
80106ca4: 0f 01 10 lgdtl (%eax)
}
static inline void
loadgs(ushort v)
{
asm volatile("movw %0, %%gs" : : "r" (v));
80106ca7: b8 18 00 00 00 mov $0x18,%eax
80106cac: 8e e8 mov %eax,%gs
lgdt(c->gdt, sizeof(c->gdt));
loadgs(SEG_KCPU << 3);
// Initialize cpu-local storage.
cpu = c;
proc = 0;
80106cae: 65 c7 05 04 00 00 00 movl $0x0,%gs:0x4
80106cb5: 00 00 00 00
// 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()];
80106cb9: 65 89 15 00 00 00 00 mov %edx,%gs:0x0
loadgs(SEG_KCPU << 3);
// Initialize cpu-local storage.
cpu = c;
proc = 0;
}
80106cc0: 83 c4 14 add $0x14,%esp
80106cc3: 5b pop %ebx
80106cc4: 5d pop %ebp
80106cc5: c3 ret
80106cc6: 8d 76 00 lea 0x0(%esi),%esi
80106cc9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80106cd0 <setupkvm>:
};
// Set up kernel part of a page table.
pde_t*
setupkvm(void)
{
80106cd0: 55 push %ebp
80106cd1: 89 e5 mov %esp,%ebp
80106cd3: 56 push %esi
80106cd4: 53 push %ebx
pde_t *pgdir;
struct kmap *k;
if((pgdir = (pde_t*)kalloc()) == 0)
80106cd5: e8 96 b7 ff ff call 80102470 <kalloc>
80106cda: 85 c0 test %eax,%eax
80106cdc: 74 52 je 80106d30 <setupkvm+0x60>
return 0;
memset(pgdir, 0, PGSIZE);
80106cde: 83 ec 04 sub $0x4,%esp
80106ce1: 89 c6 mov %eax,%esi
if (P2V(PHYSTOP) > (void*)DEVSPACE)
panic("PHYSTOP too high");
for(k = kmap; k < &kmap[NELEM(kmap)]; k++)
80106ce3: bb 20 a4 10 80 mov $0x8010a420,%ebx
pde_t *pgdir;
struct kmap *k;
if((pgdir = (pde_t*)kalloc()) == 0)
return 0;
memset(pgdir, 0, PGSIZE);
80106ce8: 68 00 10 00 00 push $0x1000
80106ced: 6a 00 push $0x0
80106cef: 50 push %eax
80106cf0: e8 4b da ff ff call 80104740 <memset>
80106cf5: 83 c4 10 add $0x10,%esp
if (P2V(PHYSTOP) > (void*)DEVSPACE)
panic("PHYSTOP too high");
for(k = kmap; k < &kmap[NELEM(kmap)]; k++)
if(mappages(pgdir, k->virt, k->phys_end - k->phys_start,
80106cf8: 8b 43 04 mov 0x4(%ebx),%eax
80106cfb: 8b 4b 08 mov 0x8(%ebx),%ecx
80106cfe: 83 ec 08 sub $0x8,%esp
80106d01: 8b 13 mov (%ebx),%edx
80106d03: ff 73 0c pushl 0xc(%ebx)
80106d06: 50 push %eax
80106d07: 29 c1 sub %eax,%ecx
80106d09: 89 f0 mov %esi,%eax
80106d0b: e8 40 fd ff ff call 80106a50 <mappages>
80106d10: 83 c4 10 add $0x10,%esp
80106d13: 85 c0 test %eax,%eax
80106d15: 78 19 js 80106d30 <setupkvm+0x60>
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++)
80106d17: 83 c3 10 add $0x10,%ebx
80106d1a: 81 fb 60 a4 10 80 cmp $0x8010a460,%ebx
80106d20: 75 d6 jne 80106cf8 <setupkvm+0x28>
if(mappages(pgdir, k->virt, k->phys_end - k->phys_start,
(uint)k->phys_start, k->perm) < 0)
return 0;
return pgdir;
}
80106d22: 8d 65 f8 lea -0x8(%ebp),%esp
80106d25: 89 f0 mov %esi,%eax
80106d27: 5b pop %ebx
80106d28: 5e pop %esi
80106d29: 5d pop %ebp
80106d2a: c3 ret
80106d2b: 90 nop
80106d2c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80106d30: 8d 65 f8 lea -0x8(%ebp),%esp
{
pde_t *pgdir;
struct kmap *k;
if((pgdir = (pde_t*)kalloc()) == 0)
return 0;
80106d33: 31 c0 xor %eax,%eax
for(k = kmap; k < &kmap[NELEM(kmap)]; k++)
if(mappages(pgdir, k->virt, k->phys_end - k->phys_start,
(uint)k->phys_start, k->perm) < 0)
return 0;
return pgdir;
}
80106d35: 5b pop %ebx
80106d36: 5e pop %esi
80106d37: 5d pop %ebp
80106d38: c3 ret
80106d39: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80106d40 <kvmalloc>:
// Allocate one page table for the machine for the kernel address
// space for scheduler processes.
void
kvmalloc(void)
{
80106d40: 55 push %ebp
80106d41: 89 e5 mov %esp,%ebp
80106d43: 83 ec 08 sub $0x8,%esp
kpgdir = setupkvm();
80106d46: e8 85 ff ff ff call 80106cd0 <setupkvm>
80106d4b: a3 24 56 11 80 mov %eax,0x80115624
}
static inline void
lcr3(uint val)
{
asm volatile("movl %0,%%cr3" : : "r" (val));
80106d50: 05 00 00 00 80 add $0x80000000,%eax
80106d55: 0f 22 d8 mov %eax,%cr3
switchkvm();
}
80106d58: c9 leave
80106d59: c3 ret
80106d5a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80106d60 <switchkvm>:
80106d60: a1 24 56 11 80 mov 0x80115624,%eax
// Switch h/w page table register to the kernel-only page table,
// for when no process is running.
void
switchkvm(void)
{
80106d65: 55 push %ebp
80106d66: 89 e5 mov %esp,%ebp
80106d68: 05 00 00 00 80 add $0x80000000,%eax
80106d6d: 0f 22 d8 mov %eax,%cr3
lcr3(V2P(kpgdir)); // switch to the kernel page table
}
80106d70: 5d pop %ebp
80106d71: c3 ret
80106d72: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80106d79: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80106d80 <switchuvm>:
// Switch TSS and h/w page table to correspond to process p.
void
switchuvm(struct proc *p)
{
80106d80: 55 push %ebp
80106d81: 89 e5 mov %esp,%ebp
80106d83: 53 push %ebx
80106d84: 83 ec 04 sub $0x4,%esp
80106d87: 8b 5d 08 mov 0x8(%ebp),%ebx
if(p == 0)
80106d8a: 85 db test %ebx,%ebx
80106d8c: 0f 84 93 00 00 00 je 80106e25 <switchuvm+0xa5>
panic("switchuvm: no process");
if(p->kstack == 0)
80106d92: 8b 43 08 mov 0x8(%ebx),%eax
80106d95: 85 c0 test %eax,%eax
80106d97: 0f 84 a2 00 00 00 je 80106e3f <switchuvm+0xbf>
panic("switchuvm: no kstack");
if(p->pgdir == 0)
80106d9d: 8b 43 04 mov 0x4(%ebx),%eax
80106da0: 85 c0 test %eax,%eax
80106da2: 0f 84 8a 00 00 00 je 80106e32 <switchuvm+0xb2>
panic("switchuvm: no pgdir");
pushcli();
80106da8: e8 c3 d8 ff ff call 80104670 <pushcli>
cpu->gdt[SEG_TSS] = SEG16(STS_T32A, &cpu->ts, sizeof(cpu->ts)-1, 0);
80106dad: 65 a1 00 00 00 00 mov %gs:0x0,%eax
80106db3: b9 67 00 00 00 mov $0x67,%ecx
80106db8: 8d 50 08 lea 0x8(%eax),%edx
80106dbb: 66 89 88 a0 00 00 00 mov %cx,0xa0(%eax)
80106dc2: c6 80 a6 00 00 00 40 movb $0x40,0xa6(%eax)
cpu->gdt[SEG_TSS].s = 0;
80106dc9: c6 80 a5 00 00 00 89 movb $0x89,0xa5(%eax)
panic("switchuvm: no kstack");
if(p->pgdir == 0)
panic("switchuvm: no pgdir");
pushcli();
cpu->gdt[SEG_TSS] = SEG16(STS_T32A, &cpu->ts, sizeof(cpu->ts)-1, 0);
80106dd0: 66 89 90 a2 00 00 00 mov %dx,0xa2(%eax)
80106dd7: 89 d1 mov %edx,%ecx
80106dd9: c1 ea 18 shr $0x18,%edx
80106ddc: 88 90 a7 00 00 00 mov %dl,0xa7(%eax)
80106de2: c1 e9 10 shr $0x10,%ecx
cpu->gdt[SEG_TSS].s = 0;
cpu->ts.ss0 = SEG_KDATA << 3;
80106de5: ba 10 00 00 00 mov $0x10,%edx
80106dea: 66 89 50 10 mov %dx,0x10(%eax)
panic("switchuvm: no kstack");
if(p->pgdir == 0)
panic("switchuvm: no pgdir");
pushcli();
cpu->gdt[SEG_TSS] = SEG16(STS_T32A, &cpu->ts, sizeof(cpu->ts)-1, 0);
80106dee: 88 88 a4 00 00 00 mov %cl,0xa4(%eax)
cpu->gdt[SEG_TSS].s = 0;
cpu->ts.ss0 = SEG_KDATA << 3;
cpu->ts.esp0 = (uint)p->kstack + KSTACKSIZE;
80106df4: 8b 4b 08 mov 0x8(%ebx),%ecx
80106df7: 8d 91 00 10 00 00 lea 0x1000(%ecx),%edx
// setting IOPL=0 in eflags *and* iomb beyond the tss segment limit
// forbids I/O instructions (e.g., inb and outb) from user space
cpu->ts.iomb = (ushort) 0xFFFF;
80106dfd: b9 ff ff ff ff mov $0xffffffff,%ecx
80106e02: 66 89 48 6e mov %cx,0x6e(%eax)
pushcli();
cpu->gdt[SEG_TSS] = SEG16(STS_T32A, &cpu->ts, sizeof(cpu->ts)-1, 0);
cpu->gdt[SEG_TSS].s = 0;
cpu->ts.ss0 = SEG_KDATA << 3;
cpu->ts.esp0 = (uint)p->kstack + KSTACKSIZE;
80106e06: 89 50 0c mov %edx,0xc(%eax)
}
static inline void
ltr(ushort sel)
{
asm volatile("ltr %0" : : "r" (sel));
80106e09: b8 30 00 00 00 mov $0x30,%eax
80106e0e: 0f 00 d8 ltr %ax
}
static inline void
lcr3(uint val)
{
asm volatile("movl %0,%%cr3" : : "r" (val));
80106e11: 8b 43 04 mov 0x4(%ebx),%eax
80106e14: 05 00 00 00 80 add $0x80000000,%eax
80106e19: 0f 22 d8 mov %eax,%cr3
// forbids I/O instructions (e.g., inb and outb) from user space
cpu->ts.iomb = (ushort) 0xFFFF;
ltr(SEG_TSS << 3);
lcr3(V2P(p->pgdir)); // switch to process's address space
popcli();
}
80106e1c: 8b 5d fc mov -0x4(%ebp),%ebx
80106e1f: c9 leave
// setting IOPL=0 in eflags *and* iomb beyond the tss segment limit
// forbids I/O instructions (e.g., inb and outb) from user space
cpu->ts.iomb = (ushort) 0xFFFF;
ltr(SEG_TSS << 3);
lcr3(V2P(p->pgdir)); // switch to process's address space
popcli();
80106e20: e9 7b d8 ff ff jmp 801046a0 <popcli>
// Switch TSS and h/w page table to correspond to process p.
void
switchuvm(struct proc *p)
{
if(p == 0)
panic("switchuvm: no process");
80106e25: 83 ec 0c sub $0xc,%esp
80106e28: 68 3e 7c 10 80 push $0x80107c3e
80106e2d: e8 3e 95 ff ff call 80100370 <panic>
if(p->kstack == 0)
panic("switchuvm: no kstack");
if(p->pgdir == 0)
panic("switchuvm: no pgdir");
80106e32: 83 ec 0c sub $0xc,%esp
80106e35: 68 69 7c 10 80 push $0x80107c69
80106e3a: e8 31 95 ff ff call 80100370 <panic>
switchuvm(struct proc *p)
{
if(p == 0)
panic("switchuvm: no process");
if(p->kstack == 0)
panic("switchuvm: no kstack");
80106e3f: 83 ec 0c sub $0xc,%esp
80106e42: 68 54 7c 10 80 push $0x80107c54
80106e47: e8 24 95 ff ff call 80100370 <panic>
80106e4c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80106e50 <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)
{
80106e50: 55 push %ebp
80106e51: 89 e5 mov %esp,%ebp
80106e53: 57 push %edi
80106e54: 56 push %esi
80106e55: 53 push %ebx
80106e56: 83 ec 1c sub $0x1c,%esp
80106e59: 8b 75 10 mov 0x10(%ebp),%esi
80106e5c: 8b 45 08 mov 0x8(%ebp),%eax
80106e5f: 8b 7d 0c mov 0xc(%ebp),%edi
char *mem;
if(sz >= PGSIZE)
80106e62: 81 fe ff 0f 00 00 cmp $0xfff,%esi
// Load the initcode into address 0 of pgdir.
// sz must be less than a page.
void
inituvm(pde_t *pgdir, char *init, uint sz)
{
80106e68: 89 45 e4 mov %eax,-0x1c(%ebp)
char *mem;
if(sz >= PGSIZE)
80106e6b: 77 49 ja 80106eb6 <inituvm+0x66>
panic("inituvm: more than a page");
mem = kalloc();
80106e6d: e8 fe b5 ff ff call 80102470 <kalloc>
memset(mem, 0, PGSIZE);
80106e72: 83 ec 04 sub $0x4,%esp
{
char *mem;
if(sz >= PGSIZE)
panic("inituvm: more than a page");
mem = kalloc();
80106e75: 89 c3 mov %eax,%ebx
memset(mem, 0, PGSIZE);
80106e77: 68 00 10 00 00 push $0x1000
80106e7c: 6a 00 push $0x0
80106e7e: 50 push %eax
80106e7f: e8 bc d8 ff ff call 80104740 <memset>
mappages(pgdir, 0, PGSIZE, V2P(mem), PTE_W|PTE_U);
80106e84: 58 pop %eax
80106e85: 8d 83 00 00 00 80 lea -0x80000000(%ebx),%eax
80106e8b: b9 00 10 00 00 mov $0x1000,%ecx
80106e90: 5a pop %edx
80106e91: 6a 06 push $0x6
80106e93: 50 push %eax
80106e94: 31 d2 xor %edx,%edx
80106e96: 8b 45 e4 mov -0x1c(%ebp),%eax
80106e99: e8 b2 fb ff ff call 80106a50 <mappages>
memmove(mem, init, sz);
80106e9e: 89 75 10 mov %esi,0x10(%ebp)
80106ea1: 89 7d 0c mov %edi,0xc(%ebp)
80106ea4: 83 c4 10 add $0x10,%esp
80106ea7: 89 5d 08 mov %ebx,0x8(%ebp)
}
80106eaa: 8d 65 f4 lea -0xc(%ebp),%esp
80106ead: 5b pop %ebx
80106eae: 5e pop %esi
80106eaf: 5f pop %edi
80106eb0: 5d pop %ebp
if(sz >= PGSIZE)
panic("inituvm: more than a page");
mem = kalloc();
memset(mem, 0, PGSIZE);
mappages(pgdir, 0, PGSIZE, V2P(mem), PTE_W|PTE_U);
memmove(mem, init, sz);
80106eb1: e9 3a d9 ff ff jmp 801047f0 <memmove>
inituvm(pde_t *pgdir, char *init, uint sz)
{
char *mem;
if(sz >= PGSIZE)
panic("inituvm: more than a page");
80106eb6: 83 ec 0c sub $0xc,%esp
80106eb9: 68 7d 7c 10 80 push $0x80107c7d
80106ebe: e8 ad 94 ff ff call 80100370 <panic>
80106ec3: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80106ec9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80106ed0 <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)
{
80106ed0: 55 push %ebp
80106ed1: 89 e5 mov %esp,%ebp
80106ed3: 57 push %edi
80106ed4: 56 push %esi
80106ed5: 53 push %ebx
80106ed6: 83 ec 0c sub $0xc,%esp
uint i, pa, n;
pte_t *pte;
if((uint) addr % PGSIZE != 0)
80106ed9: f7 45 0c ff 0f 00 00 testl $0xfff,0xc(%ebp)
80106ee0: 0f 85 91 00 00 00 jne 80106f77 <loaduvm+0xa7>
panic("loaduvm: addr must be page aligned");
for(i = 0; i < sz; i += PGSIZE){
80106ee6: 8b 75 18 mov 0x18(%ebp),%esi
80106ee9: 31 db xor %ebx,%ebx
80106eeb: 85 f6 test %esi,%esi
80106eed: 75 1a jne 80106f09 <loaduvm+0x39>
80106eef: eb 6f jmp 80106f60 <loaduvm+0x90>
80106ef1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80106ef8: 81 c3 00 10 00 00 add $0x1000,%ebx
80106efe: 81 ee 00 10 00 00 sub $0x1000,%esi
80106f04: 39 5d 18 cmp %ebx,0x18(%ebp)
80106f07: 76 57 jbe 80106f60 <loaduvm+0x90>
if((pte = walkpgdir(pgdir, addr+i, 0)) == 0)
80106f09: 8b 55 0c mov 0xc(%ebp),%edx
80106f0c: 8b 45 08 mov 0x8(%ebp),%eax
80106f0f: 31 c9 xor %ecx,%ecx
80106f11: 01 da add %ebx,%edx
80106f13: e8 b8 fa ff ff call 801069d0 <walkpgdir>
80106f18: 85 c0 test %eax,%eax
80106f1a: 74 4e je 80106f6a <loaduvm+0x9a>
panic("loaduvm: address should exist");
pa = PTE_ADDR(*pte);
80106f1c: 8b 00 mov (%eax),%eax
if(sz - i < PGSIZE)
n = sz - i;
else
n = PGSIZE;
if(readi(ip, P2V(pa), offset+i, n) != n)
80106f1e: 8b 4d 14 mov 0x14(%ebp),%ecx
panic("loaduvm: addr must be page aligned");
for(i = 0; i < sz; i += PGSIZE){
if((pte = walkpgdir(pgdir, addr+i, 0)) == 0)
panic("loaduvm: address should exist");
pa = PTE_ADDR(*pte);
if(sz - i < PGSIZE)
80106f21: bf 00 10 00 00 mov $0x1000,%edi
if((uint) addr % PGSIZE != 0)
panic("loaduvm: addr must be page aligned");
for(i = 0; i < sz; i += PGSIZE){
if((pte = walkpgdir(pgdir, addr+i, 0)) == 0)
panic("loaduvm: address should exist");
pa = PTE_ADDR(*pte);
80106f26: 25 00 f0 ff ff and $0xfffff000,%eax
if(sz - i < PGSIZE)
80106f2b: 81 fe ff 0f 00 00 cmp $0xfff,%esi
80106f31: 0f 46 fe cmovbe %esi,%edi
n = sz - i;
else
n = PGSIZE;
if(readi(ip, P2V(pa), offset+i, n) != n)
80106f34: 01 d9 add %ebx,%ecx
80106f36: 05 00 00 00 80 add $0x80000000,%eax
80106f3b: 57 push %edi
80106f3c: 51 push %ecx
80106f3d: 50 push %eax
80106f3e: ff 75 10 pushl 0x10(%ebp)
80106f41: e8 ca a9 ff ff call 80101910 <readi>
80106f46: 83 c4 10 add $0x10,%esp
80106f49: 39 c7 cmp %eax,%edi
80106f4b: 74 ab je 80106ef8 <loaduvm+0x28>
return -1;
}
return 0;
}
80106f4d: 8d 65 f4 lea -0xc(%ebp),%esp
if(sz - i < PGSIZE)
n = sz - i;
else
n = PGSIZE;
if(readi(ip, P2V(pa), offset+i, n) != n)
return -1;
80106f50: b8 ff ff ff ff mov $0xffffffff,%eax
}
return 0;
}
80106f55: 5b pop %ebx
80106f56: 5e pop %esi
80106f57: 5f pop %edi
80106f58: 5d pop %ebp
80106f59: c3 ret
80106f5a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80106f60: 8d 65 f4 lea -0xc(%ebp),%esp
else
n = PGSIZE;
if(readi(ip, P2V(pa), offset+i, n) != n)
return -1;
}
return 0;
80106f63: 31 c0 xor %eax,%eax
}
80106f65: 5b pop %ebx
80106f66: 5e pop %esi
80106f67: 5f pop %edi
80106f68: 5d pop %ebp
80106f69: c3 ret
if((uint) addr % PGSIZE != 0)
panic("loaduvm: addr must be page aligned");
for(i = 0; i < sz; i += PGSIZE){
if((pte = walkpgdir(pgdir, addr+i, 0)) == 0)
panic("loaduvm: address should exist");
80106f6a: 83 ec 0c sub $0xc,%esp
80106f6d: 68 97 7c 10 80 push $0x80107c97
80106f72: e8 f9 93 ff ff call 80100370 <panic>
{
uint i, pa, n;
pte_t *pte;
if((uint) addr % PGSIZE != 0)
panic("loaduvm: addr must be page aligned");
80106f77: 83 ec 0c sub $0xc,%esp
80106f7a: 68 38 7d 10 80 push $0x80107d38
80106f7f: e8 ec 93 ff ff call 80100370 <panic>
80106f84: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80106f8a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
80106f90 <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)
{
80106f90: 55 push %ebp
80106f91: 89 e5 mov %esp,%ebp
80106f93: 57 push %edi
80106f94: 56 push %esi
80106f95: 53 push %ebx
80106f96: 83 ec 0c sub $0xc,%esp
80106f99: 8b 7d 10 mov 0x10(%ebp),%edi
char *mem;
uint a;
if(newsz >= KERNBASE)
80106f9c: 85 ff test %edi,%edi
80106f9e: 0f 88 ca 00 00 00 js 8010706e <allocuvm+0xde>
return 0;
if(newsz < oldsz)
80106fa4: 3b 7d 0c cmp 0xc(%ebp),%edi
return oldsz;
80106fa7: 8b 45 0c mov 0xc(%ebp),%eax
char *mem;
uint a;
if(newsz >= KERNBASE)
return 0;
if(newsz < oldsz)
80106faa: 0f 82 82 00 00 00 jb 80107032 <allocuvm+0xa2>
return oldsz;
a = PGROUNDUP(oldsz);
80106fb0: 8d 98 ff 0f 00 00 lea 0xfff(%eax),%ebx
80106fb6: 81 e3 00 f0 ff ff and $0xfffff000,%ebx
for(; a < newsz; a += PGSIZE){
80106fbc: 39 df cmp %ebx,%edi
80106fbe: 77 43 ja 80107003 <allocuvm+0x73>
80106fc0: e9 bb 00 00 00 jmp 80107080 <allocuvm+0xf0>
80106fc5: 8d 76 00 lea 0x0(%esi),%esi
if(mem == 0){
cprintf("allocuvm out of memory\n");
deallocuvm(pgdir, newsz, oldsz);
return 0;
}
memset(mem, 0, PGSIZE);
80106fc8: 83 ec 04 sub $0x4,%esp
80106fcb: 68 00 10 00 00 push $0x1000
80106fd0: 6a 00 push $0x0
80106fd2: 50 push %eax
80106fd3: e8 68 d7 ff ff call 80104740 <memset>
if(mappages(pgdir, (char*)a, PGSIZE, V2P(mem), PTE_W|PTE_U) < 0){
80106fd8: 58 pop %eax
80106fd9: 8d 86 00 00 00 80 lea -0x80000000(%esi),%eax
80106fdf: b9 00 10 00 00 mov $0x1000,%ecx
80106fe4: 5a pop %edx
80106fe5: 6a 06 push $0x6
80106fe7: 50 push %eax
80106fe8: 89 da mov %ebx,%edx
80106fea: 8b 45 08 mov 0x8(%ebp),%eax
80106fed: e8 5e fa ff ff call 80106a50 <mappages>
80106ff2: 83 c4 10 add $0x10,%esp
80106ff5: 85 c0 test %eax,%eax
80106ff7: 78 47 js 80107040 <allocuvm+0xb0>
return 0;
if(newsz < oldsz)
return oldsz;
a = PGROUNDUP(oldsz);
for(; a < newsz; a += PGSIZE){
80106ff9: 81 c3 00 10 00 00 add $0x1000,%ebx
80106fff: 39 df cmp %ebx,%edi
80107001: 76 7d jbe 80107080 <allocuvm+0xf0>
mem = kalloc();
80107003: e8 68 b4 ff ff call 80102470 <kalloc>
if(mem == 0){
80107008: 85 c0 test %eax,%eax
if(newsz < oldsz)
return oldsz;
a = PGROUNDUP(oldsz);
for(; a < newsz; a += PGSIZE){
mem = kalloc();
8010700a: 89 c6 mov %eax,%esi
if(mem == 0){
8010700c: 75 ba jne 80106fc8 <allocuvm+0x38>
cprintf("allocuvm out of memory\n");
8010700e: 83 ec 0c sub $0xc,%esp
80107011: 68 b5 7c 10 80 push $0x80107cb5
80107016: e8 45 96 ff ff call 80100660 <cprintf>
deallocuvm(pde_t *pgdir, uint oldsz, uint newsz)
{
pte_t *pte;
uint a, pa;
if(newsz >= oldsz)
8010701b: 83 c4 10 add $0x10,%esp
8010701e: 3b 7d 0c cmp 0xc(%ebp),%edi
80107021: 76 4b jbe 8010706e <allocuvm+0xde>
80107023: 8b 4d 0c mov 0xc(%ebp),%ecx
80107026: 8b 45 08 mov 0x8(%ebp),%eax
80107029: 89 fa mov %edi,%edx
8010702b: e8 b0 fa ff ff call 80106ae0 <deallocuvm.part.0>
for(; a < newsz; a += PGSIZE){
mem = kalloc();
if(mem == 0){
cprintf("allocuvm out of memory\n");
deallocuvm(pgdir, newsz, oldsz);
return 0;
80107030: 31 c0 xor %eax,%eax
kfree(mem);
return 0;
}
}
return newsz;
}
80107032: 8d 65 f4 lea -0xc(%ebp),%esp
80107035: 5b pop %ebx
80107036: 5e pop %esi
80107037: 5f pop %edi
80107038: 5d pop %ebp
80107039: c3 ret
8010703a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
deallocuvm(pgdir, newsz, oldsz);
return 0;
}
memset(mem, 0, PGSIZE);
if(mappages(pgdir, (char*)a, PGSIZE, V2P(mem), PTE_W|PTE_U) < 0){
cprintf("allocuvm out of memory (2)\n");
80107040: 83 ec 0c sub $0xc,%esp
80107043: 68 cd 7c 10 80 push $0x80107ccd
80107048: e8 13 96 ff ff call 80100660 <cprintf>
deallocuvm(pde_t *pgdir, uint oldsz, uint newsz)
{
pte_t *pte;
uint a, pa;
if(newsz >= oldsz)
8010704d: 83 c4 10 add $0x10,%esp
80107050: 3b 7d 0c cmp 0xc(%ebp),%edi
80107053: 76 0d jbe 80107062 <allocuvm+0xd2>
80107055: 8b 4d 0c mov 0xc(%ebp),%ecx
80107058: 8b 45 08 mov 0x8(%ebp),%eax
8010705b: 89 fa mov %edi,%edx
8010705d: e8 7e fa ff ff call 80106ae0 <deallocuvm.part.0>
}
memset(mem, 0, PGSIZE);
if(mappages(pgdir, (char*)a, PGSIZE, V2P(mem), PTE_W|PTE_U) < 0){
cprintf("allocuvm out of memory (2)\n");
deallocuvm(pgdir, newsz, oldsz);
kfree(mem);
80107062: 83 ec 0c sub $0xc,%esp
80107065: 56 push %esi
80107066: e8 55 b2 ff ff call 801022c0 <kfree>
return 0;
8010706b: 83 c4 10 add $0x10,%esp
}
}
return newsz;
}
8010706e: 8d 65 f4 lea -0xc(%ebp),%esp
memset(mem, 0, PGSIZE);
if(mappages(pgdir, (char*)a, PGSIZE, V2P(mem), PTE_W|PTE_U) < 0){
cprintf("allocuvm out of memory (2)\n");
deallocuvm(pgdir, newsz, oldsz);
kfree(mem);
return 0;
80107071: 31 c0 xor %eax,%eax
}
}
return newsz;
}
80107073: 5b pop %ebx
80107074: 5e pop %esi
80107075: 5f pop %edi
80107076: 5d pop %ebp
80107077: c3 ret
80107078: 90 nop
80107079: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80107080: 8d 65 f4 lea -0xc(%ebp),%esp
return 0;
if(newsz < oldsz)
return oldsz;
a = PGROUNDUP(oldsz);
for(; a < newsz; a += PGSIZE){
80107083: 89 f8 mov %edi,%eax
kfree(mem);
return 0;
}
}
return newsz;
}
80107085: 5b pop %ebx
80107086: 5e pop %esi
80107087: 5f pop %edi
80107088: 5d pop %ebp
80107089: c3 ret
8010708a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80107090 <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)
{
80107090: 55 push %ebp
80107091: 89 e5 mov %esp,%ebp
80107093: 8b 55 0c mov 0xc(%ebp),%edx
80107096: 8b 4d 10 mov 0x10(%ebp),%ecx
80107099: 8b 45 08 mov 0x8(%ebp),%eax
pte_t *pte;
uint a, pa;
if(newsz >= oldsz)
8010709c: 39 d1 cmp %edx,%ecx
8010709e: 73 10 jae 801070b0 <deallocuvm+0x20>
kfree(v);
*pte = 0;
}
}
return newsz;
}
801070a0: 5d pop %ebp
801070a1: e9 3a fa ff ff jmp 80106ae0 <deallocuvm.part.0>
801070a6: 8d 76 00 lea 0x0(%esi),%esi
801070a9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801070b0: 89 d0 mov %edx,%eax
801070b2: 5d pop %ebp
801070b3: c3 ret
801070b4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801070ba: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
801070c0 <freevm>:
// Free a page table and all the physical memory pages
// in the user part.
void
freevm(pde_t *pgdir)
{
801070c0: 55 push %ebp
801070c1: 89 e5 mov %esp,%ebp
801070c3: 57 push %edi
801070c4: 56 push %esi
801070c5: 53 push %ebx
801070c6: 83 ec 0c sub $0xc,%esp
801070c9: 8b 75 08 mov 0x8(%ebp),%esi
uint i;
if(pgdir == 0)
801070cc: 85 f6 test %esi,%esi
801070ce: 74 59 je 80107129 <freevm+0x69>
801070d0: 31 c9 xor %ecx,%ecx
801070d2: ba 00 00 00 80 mov $0x80000000,%edx
801070d7: 89 f0 mov %esi,%eax
801070d9: e8 02 fa ff ff call 80106ae0 <deallocuvm.part.0>
801070de: 89 f3 mov %esi,%ebx
801070e0: 8d be 00 10 00 00 lea 0x1000(%esi),%edi
801070e6: eb 0f jmp 801070f7 <freevm+0x37>
801070e8: 90 nop
801070e9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801070f0: 83 c3 04 add $0x4,%ebx
panic("freevm: no pgdir");
deallocuvm(pgdir, KERNBASE, 0);
for(i = 0; i < NPDENTRIES; i++){
801070f3: 39 fb cmp %edi,%ebx
801070f5: 74 23 je 8010711a <freevm+0x5a>
if(pgdir[i] & PTE_P){
801070f7: 8b 03 mov (%ebx),%eax
801070f9: a8 01 test $0x1,%al
801070fb: 74 f3 je 801070f0 <freevm+0x30>
char * v = P2V(PTE_ADDR(pgdir[i]));
kfree(v);
801070fd: 25 00 f0 ff ff and $0xfffff000,%eax
80107102: 83 ec 0c sub $0xc,%esp
80107105: 83 c3 04 add $0x4,%ebx
80107108: 05 00 00 00 80 add $0x80000000,%eax
8010710d: 50 push %eax
8010710e: e8 ad b1 ff ff call 801022c0 <kfree>
80107113: 83 c4 10 add $0x10,%esp
uint i;
if(pgdir == 0)
panic("freevm: no pgdir");
deallocuvm(pgdir, KERNBASE, 0);
for(i = 0; i < NPDENTRIES; i++){
80107116: 39 fb cmp %edi,%ebx
80107118: 75 dd jne 801070f7 <freevm+0x37>
if(pgdir[i] & PTE_P){
char * v = P2V(PTE_ADDR(pgdir[i]));
kfree(v);
}
}
kfree((char*)pgdir);
8010711a: 89 75 08 mov %esi,0x8(%ebp)
}
8010711d: 8d 65 f4 lea -0xc(%ebp),%esp
80107120: 5b pop %ebx
80107121: 5e pop %esi
80107122: 5f pop %edi
80107123: 5d pop %ebp
if(pgdir[i] & PTE_P){
char * v = P2V(PTE_ADDR(pgdir[i]));
kfree(v);
}
}
kfree((char*)pgdir);
80107124: e9 97 b1 ff ff jmp 801022c0 <kfree>
freevm(pde_t *pgdir)
{
uint i;
if(pgdir == 0)
panic("freevm: no pgdir");
80107129: 83 ec 0c sub $0xc,%esp
8010712c: 68 e9 7c 10 80 push $0x80107ce9
80107131: e8 3a 92 ff ff call 80100370 <panic>
80107136: 8d 76 00 lea 0x0(%esi),%esi
80107139: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80107140 <clearpteu>:
// Clear PTE_U on a page. Used to create an inaccessible
// page beneath the user stack.
void
clearpteu(pde_t *pgdir, char *uva)
{
80107140: 55 push %ebp
pte_t *pte;
pte = walkpgdir(pgdir, uva, 0);
80107141: 31 c9 xor %ecx,%ecx
// Clear PTE_U on a page. Used to create an inaccessible
// page beneath the user stack.
void
clearpteu(pde_t *pgdir, char *uva)
{
80107143: 89 e5 mov %esp,%ebp
80107145: 83 ec 08 sub $0x8,%esp
pte_t *pte;
pte = walkpgdir(pgdir, uva, 0);
80107148: 8b 55 0c mov 0xc(%ebp),%edx
8010714b: 8b 45 08 mov 0x8(%ebp),%eax
8010714e: e8 7d f8 ff ff call 801069d0 <walkpgdir>
if(pte == 0)
80107153: 85 c0 test %eax,%eax
80107155: 74 05 je 8010715c <clearpteu+0x1c>
panic("clearpteu");
*pte &= ~PTE_U;
80107157: 83 20 fb andl $0xfffffffb,(%eax)
}
8010715a: c9 leave
8010715b: c3 ret
{
pte_t *pte;
pte = walkpgdir(pgdir, uva, 0);
if(pte == 0)
panic("clearpteu");
8010715c: 83 ec 0c sub $0xc,%esp
8010715f: 68 fa 7c 10 80 push $0x80107cfa
80107164: e8 07 92 ff ff call 80100370 <panic>
80107169: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80107170 <copyuvm>:
// Given a parent process's page table, create a copy
// of it for a child.
pde_t*
copyuvm(pde_t *pgdir, uint sz)
{
80107170: 55 push %ebp
80107171: 89 e5 mov %esp,%ebp
80107173: 57 push %edi
80107174: 56 push %esi
80107175: 53 push %ebx
80107176: 83 ec 1c sub $0x1c,%esp
pde_t *d;
pte_t *pte;
uint pa, i, flags;
char *mem;
if((d = setupkvm()) == 0)
80107179: e8 52 fb ff ff call 80106cd0 <setupkvm>
8010717e: 85 c0 test %eax,%eax
80107180: 89 45 e0 mov %eax,-0x20(%ebp)
80107183: 0f 84 b2 00 00 00 je 8010723b <copyuvm+0xcb>
return 0;
for(i = 0; i < sz; i += PGSIZE){
80107189: 8b 4d 0c mov 0xc(%ebp),%ecx
8010718c: 85 c9 test %ecx,%ecx
8010718e: 0f 84 9c 00 00 00 je 80107230 <copyuvm+0xc0>
80107194: 31 f6 xor %esi,%esi
80107196: eb 4a jmp 801071e2 <copyuvm+0x72>
80107198: 90 nop
80107199: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
panic("copyuvm: page not present");
pa = PTE_ADDR(*pte);
flags = PTE_FLAGS(*pte);
if((mem = kalloc()) == 0)
goto bad;
memmove(mem, (char*)P2V(pa), PGSIZE);
801071a0: 83 ec 04 sub $0x4,%esp
801071a3: 81 c7 00 00 00 80 add $0x80000000,%edi
801071a9: 68 00 10 00 00 push $0x1000
801071ae: 57 push %edi
801071af: 50 push %eax
801071b0: e8 3b d6 ff ff call 801047f0 <memmove>
if(mappages(d, (void*)i, PGSIZE, V2P(mem), flags) < 0)
801071b5: 58 pop %eax
801071b6: 5a pop %edx
801071b7: 8d 93 00 00 00 80 lea -0x80000000(%ebx),%edx
801071bd: 8b 45 e0 mov -0x20(%ebp),%eax
801071c0: ff 75 e4 pushl -0x1c(%ebp)
801071c3: b9 00 10 00 00 mov $0x1000,%ecx
801071c8: 52 push %edx
801071c9: 89 f2 mov %esi,%edx
801071cb: e8 80 f8 ff ff call 80106a50 <mappages>
801071d0: 83 c4 10 add $0x10,%esp
801071d3: 85 c0 test %eax,%eax
801071d5: 78 3e js 80107215 <copyuvm+0xa5>
uint pa, i, flags;
char *mem;
if((d = setupkvm()) == 0)
return 0;
for(i = 0; i < sz; i += PGSIZE){
801071d7: 81 c6 00 10 00 00 add $0x1000,%esi
801071dd: 39 75 0c cmp %esi,0xc(%ebp)
801071e0: 76 4e jbe 80107230 <copyuvm+0xc0>
if((pte = walkpgdir(pgdir, (void *) i, 0)) == 0)
801071e2: 8b 45 08 mov 0x8(%ebp),%eax
801071e5: 31 c9 xor %ecx,%ecx
801071e7: 89 f2 mov %esi,%edx
801071e9: e8 e2 f7 ff ff call 801069d0 <walkpgdir>
801071ee: 85 c0 test %eax,%eax
801071f0: 74 5a je 8010724c <copyuvm+0xdc>
panic("copyuvm: pte should exist");
if(!(*pte & PTE_P))
801071f2: 8b 18 mov (%eax),%ebx
801071f4: f6 c3 01 test $0x1,%bl
801071f7: 74 46 je 8010723f <copyuvm+0xcf>
panic("copyuvm: page not present");
pa = PTE_ADDR(*pte);
801071f9: 89 df mov %ebx,%edi
flags = PTE_FLAGS(*pte);
801071fb: 81 e3 ff 0f 00 00 and $0xfff,%ebx
80107201: 89 5d e4 mov %ebx,-0x1c(%ebp)
for(i = 0; i < sz; i += PGSIZE){
if((pte = walkpgdir(pgdir, (void *) i, 0)) == 0)
panic("copyuvm: pte should exist");
if(!(*pte & PTE_P))
panic("copyuvm: page not present");
pa = PTE_ADDR(*pte);
80107204: 81 e7 00 f0 ff ff and $0xfffff000,%edi
flags = PTE_FLAGS(*pte);
if((mem = kalloc()) == 0)
8010720a: e8 61 b2 ff ff call 80102470 <kalloc>
8010720f: 85 c0 test %eax,%eax
80107211: 89 c3 mov %eax,%ebx
80107213: 75 8b jne 801071a0 <copyuvm+0x30>
goto bad;
}
return d;
bad:
freevm(d);
80107215: 83 ec 0c sub $0xc,%esp
80107218: ff 75 e0 pushl -0x20(%ebp)
8010721b: e8 a0 fe ff ff call 801070c0 <freevm>
return 0;
80107220: 83 c4 10 add $0x10,%esp
80107223: 31 c0 xor %eax,%eax
}
80107225: 8d 65 f4 lea -0xc(%ebp),%esp
80107228: 5b pop %ebx
80107229: 5e pop %esi
8010722a: 5f pop %edi
8010722b: 5d pop %ebp
8010722c: c3 ret
8010722d: 8d 76 00 lea 0x0(%esi),%esi
uint pa, i, flags;
char *mem;
if((d = setupkvm()) == 0)
return 0;
for(i = 0; i < sz; i += PGSIZE){
80107230: 8b 45 e0 mov -0x20(%ebp),%eax
return d;
bad:
freevm(d);
return 0;
}
80107233: 8d 65 f4 lea -0xc(%ebp),%esp
80107236: 5b pop %ebx
80107237: 5e pop %esi
80107238: 5f pop %edi
80107239: 5d pop %ebp
8010723a: c3 ret
pte_t *pte;
uint pa, i, flags;
char *mem;
if((d = setupkvm()) == 0)
return 0;
8010723b: 31 c0 xor %eax,%eax
8010723d: eb e6 jmp 80107225 <copyuvm+0xb5>
for(i = 0; i < sz; i += PGSIZE){
if((pte = walkpgdir(pgdir, (void *) i, 0)) == 0)
panic("copyuvm: pte should exist");
if(!(*pte & PTE_P))
panic("copyuvm: page not present");
8010723f: 83 ec 0c sub $0xc,%esp
80107242: 68 1e 7d 10 80 push $0x80107d1e
80107247: e8 24 91 ff ff call 80100370 <panic>
if((d = setupkvm()) == 0)
return 0;
for(i = 0; i < sz; i += PGSIZE){
if((pte = walkpgdir(pgdir, (void *) i, 0)) == 0)
panic("copyuvm: pte should exist");
8010724c: 83 ec 0c sub $0xc,%esp
8010724f: 68 04 7d 10 80 push $0x80107d04
80107254: e8 17 91 ff ff call 80100370 <panic>
80107259: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80107260 <uva2ka>:
//PAGEBREAK!
// Map user virtual address to kernel address.
char*
uva2ka(pde_t *pgdir, char *uva)
{
80107260: 55 push %ebp
pte_t *pte;
pte = walkpgdir(pgdir, uva, 0);
80107261: 31 c9 xor %ecx,%ecx
//PAGEBREAK!
// Map user virtual address to kernel address.
char*
uva2ka(pde_t *pgdir, char *uva)
{
80107263: 89 e5 mov %esp,%ebp
80107265: 83 ec 08 sub $0x8,%esp
pte_t *pte;
pte = walkpgdir(pgdir, uva, 0);
80107268: 8b 55 0c mov 0xc(%ebp),%edx
8010726b: 8b 45 08 mov 0x8(%ebp),%eax
8010726e: e8 5d f7 ff ff call 801069d0 <walkpgdir>
if((*pte & PTE_P) == 0)
80107273: 8b 00 mov (%eax),%eax
return 0;
if((*pte & PTE_U) == 0)
80107275: 89 c2 mov %eax,%edx
80107277: 83 e2 05 and $0x5,%edx
8010727a: 83 fa 05 cmp $0x5,%edx
8010727d: 75 11 jne 80107290 <uva2ka+0x30>
return 0;
return (char*)P2V(PTE_ADDR(*pte));
8010727f: 25 00 f0 ff ff and $0xfffff000,%eax
}
80107284: c9 leave
pte = walkpgdir(pgdir, uva, 0);
if((*pte & PTE_P) == 0)
return 0;
if((*pte & PTE_U) == 0)
return 0;
return (char*)P2V(PTE_ADDR(*pte));
80107285: 05 00 00 00 80 add $0x80000000,%eax
}
8010728a: c3 ret
8010728b: 90 nop
8010728c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
pte = walkpgdir(pgdir, uva, 0);
if((*pte & PTE_P) == 0)
return 0;
if((*pte & PTE_U) == 0)
return 0;
80107290: 31 c0 xor %eax,%eax
return (char*)P2V(PTE_ADDR(*pte));
}
80107292: c9 leave
80107293: c3 ret
80107294: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
8010729a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
801072a0 <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)
{
801072a0: 55 push %ebp
801072a1: 89 e5 mov %esp,%ebp
801072a3: 57 push %edi
801072a4: 56 push %esi
801072a5: 53 push %ebx
801072a6: 83 ec 1c sub $0x1c,%esp
801072a9: 8b 5d 14 mov 0x14(%ebp),%ebx
801072ac: 8b 55 0c mov 0xc(%ebp),%edx
801072af: 8b 7d 10 mov 0x10(%ebp),%edi
char *buf, *pa0;
uint n, va0;
buf = (char*)p;
while(len > 0){
801072b2: 85 db test %ebx,%ebx
801072b4: 75 40 jne 801072f6 <copyout+0x56>
801072b6: eb 70 jmp 80107328 <copyout+0x88>
801072b8: 90 nop
801072b9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
va0 = (uint)PGROUNDDOWN(va);
pa0 = uva2ka(pgdir, (char*)va0);
if(pa0 == 0)
return -1;
n = PGSIZE - (va - va0);
801072c0: 8b 55 e4 mov -0x1c(%ebp),%edx
801072c3: 89 f1 mov %esi,%ecx
801072c5: 29 d1 sub %edx,%ecx
801072c7: 81 c1 00 10 00 00 add $0x1000,%ecx
801072cd: 39 d9 cmp %ebx,%ecx
801072cf: 0f 47 cb cmova %ebx,%ecx
if(n > len)
n = len;
memmove(pa0 + (va - va0), buf, n);
801072d2: 29 f2 sub %esi,%edx
801072d4: 83 ec 04 sub $0x4,%esp
801072d7: 01 d0 add %edx,%eax
801072d9: 51 push %ecx
801072da: 57 push %edi
801072db: 50 push %eax
801072dc: 89 4d e4 mov %ecx,-0x1c(%ebp)
801072df: e8 0c d5 ff ff call 801047f0 <memmove>
len -= n;
buf += n;
801072e4: 8b 4d e4 mov -0x1c(%ebp),%ecx
{
char *buf, *pa0;
uint n, va0;
buf = (char*)p;
while(len > 0){
801072e7: 83 c4 10 add $0x10,%esp
if(n > len)
n = len;
memmove(pa0 + (va - va0), buf, n);
len -= n;
buf += n;
va = va0 + PGSIZE;
801072ea: 8d 96 00 10 00 00 lea 0x1000(%esi),%edx
n = PGSIZE - (va - va0);
if(n > len)
n = len;
memmove(pa0 + (va - va0), buf, n);
len -= n;
buf += n;
801072f0: 01 cf add %ecx,%edi
{
char *buf, *pa0;
uint n, va0;
buf = (char*)p;
while(len > 0){
801072f2: 29 cb sub %ecx,%ebx
801072f4: 74 32 je 80107328 <copyout+0x88>
va0 = (uint)PGROUNDDOWN(va);
801072f6: 89 d6 mov %edx,%esi
pa0 = uva2ka(pgdir, (char*)va0);
801072f8: 83 ec 08 sub $0x8,%esp
char *buf, *pa0;
uint n, va0;
buf = (char*)p;
while(len > 0){
va0 = (uint)PGROUNDDOWN(va);
801072fb: 89 55 e4 mov %edx,-0x1c(%ebp)
801072fe: 81 e6 00 f0 ff ff and $0xfffff000,%esi
pa0 = uva2ka(pgdir, (char*)va0);
80107304: 56 push %esi
80107305: ff 75 08 pushl 0x8(%ebp)
80107308: e8 53 ff ff ff call 80107260 <uva2ka>
if(pa0 == 0)
8010730d: 83 c4 10 add $0x10,%esp
80107310: 85 c0 test %eax,%eax
80107312: 75 ac jne 801072c0 <copyout+0x20>
len -= n;
buf += n;
va = va0 + PGSIZE;
}
return 0;
}
80107314: 8d 65 f4 lea -0xc(%ebp),%esp
buf = (char*)p;
while(len > 0){
va0 = (uint)PGROUNDDOWN(va);
pa0 = uva2ka(pgdir, (char*)va0);
if(pa0 == 0)
return -1;
80107317: b8 ff ff ff ff mov $0xffffffff,%eax
len -= n;
buf += n;
va = va0 + PGSIZE;
}
return 0;
}
8010731c: 5b pop %ebx
8010731d: 5e pop %esi
8010731e: 5f pop %edi
8010731f: 5d pop %ebp
80107320: c3 ret
80107321: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80107328: 8d 65 f4 lea -0xc(%ebp),%esp
memmove(pa0 + (va - va0), buf, n);
len -= n;
buf += n;
va = va0 + PGSIZE;
}
return 0;
8010732b: 31 c0 xor %eax,%eax
}
8010732d: 5b pop %ebx
8010732e: 5e pop %esi
8010732f: 5f pop %edi
80107330: 5d pop %ebp
80107331: c3 ret
=======
80105cc0: 55 push %ebp
80105cc1: 89 e5 mov %esp,%ebp
80105cc3: 83 ec 18 sub $0x18,%esp
consoleintr(uartgetc);
80105cc6: c7 04 24 90 5b 10 80 movl $0x80105b90,(%esp)
80105ccd: e8 de aa ff ff call 801007b0 <consoleintr>
}
80105cd2: c9 leave
80105cd3: c3 ret
80105cd4 <vector0>:
80105cd4: 6a 00 push $0x0
80105cd6: 6a 00 push $0x0
80105cd8: e9 40 fb ff ff jmp 8010581d <alltraps>
80105cdd <vector1>:
80105cdd: 6a 00 push $0x0
80105cdf: 6a 01 push $0x1
80105ce1: e9 37 fb ff ff jmp 8010581d <alltraps>
80105ce6 <vector2>:
80105ce6: 6a 00 push $0x0
80105ce8: 6a 02 push $0x2
80105cea: e9 2e fb ff ff jmp 8010581d <alltraps>
80105cef <vector3>:
80105cef: 6a 00 push $0x0
80105cf1: 6a 03 push $0x3
80105cf3: e9 25 fb ff ff jmp 8010581d <alltraps>
80105cf8 <vector4>:
80105cf8: 6a 00 push $0x0
80105cfa: 6a 04 push $0x4
80105cfc: e9 1c fb ff ff jmp 8010581d <alltraps>
80105d01 <vector5>:
80105d01: 6a 00 push $0x0
80105d03: 6a 05 push $0x5
80105d05: e9 13 fb ff ff jmp 8010581d <alltraps>
80105d0a <vector6>:
80105d0a: 6a 00 push $0x0
80105d0c: 6a 06 push $0x6
80105d0e: e9 0a fb ff ff jmp 8010581d <alltraps>
80105d13 <vector7>:
80105d13: 6a 00 push $0x0
80105d15: 6a 07 push $0x7
80105d17: e9 01 fb ff ff jmp 8010581d <alltraps>
80105d1c <vector8>:
80105d1c: 6a 08 push $0x8
80105d1e: e9 fa fa ff ff jmp 8010581d <alltraps>
80105d23 <vector9>:
80105d23: 6a 00 push $0x0
80105d25: 6a 09 push $0x9
80105d27: e9 f1 fa ff ff jmp 8010581d <alltraps>
80105d2c <vector10>:
80105d2c: 6a 0a push $0xa
80105d2e: e9 ea fa ff ff jmp 8010581d <alltraps>
80105d33 <vector11>:
80105d33: 6a 0b push $0xb
80105d35: e9 e3 fa ff ff jmp 8010581d <alltraps>
80105d3a <vector12>:
80105d3a: 6a 0c push $0xc
80105d3c: e9 dc fa ff ff jmp 8010581d <alltraps>
80105d41 <vector13>:
80105d41: 6a 0d push $0xd
80105d43: e9 d5 fa ff ff jmp 8010581d <alltraps>
80105d48 <vector14>:
80105d48: 6a 0e push $0xe
80105d4a: e9 ce fa ff ff jmp 8010581d <alltraps>
80105d4f <vector15>:
80105d4f: 6a 00 push $0x0
80105d51: 6a 0f push $0xf
80105d53: e9 c5 fa ff ff jmp 8010581d <alltraps>
80105d58 <vector16>:
80105d58: 6a 00 push $0x0
80105d5a: 6a 10 push $0x10
80105d5c: e9 bc fa ff ff jmp 8010581d <alltraps>
80105d61 <vector17>:
80105d61: 6a 11 push $0x11
80105d63: e9 b5 fa ff ff jmp 8010581d <alltraps>
80105d68 <vector18>:
80105d68: 6a 00 push $0x0
80105d6a: 6a 12 push $0x12
80105d6c: e9 ac fa ff ff jmp 8010581d <alltraps>
80105d71 <vector19>:
80105d71: 6a 00 push $0x0
80105d73: 6a 13 push $0x13
80105d75: e9 a3 fa ff ff jmp 8010581d <alltraps>
80105d7a <vector20>:
80105d7a: 6a 00 push $0x0
80105d7c: 6a 14 push $0x14
80105d7e: e9 9a fa ff ff jmp 8010581d <alltraps>
80105d83 <vector21>:
80105d83: 6a 00 push $0x0
80105d85: 6a 15 push $0x15
80105d87: e9 91 fa ff ff jmp 8010581d <alltraps>
80105d8c <vector22>:
80105d8c: 6a 00 push $0x0
80105d8e: 6a 16 push $0x16
80105d90: e9 88 fa ff ff jmp 8010581d <alltraps>
80105d95 <vector23>:
80105d95: 6a 00 push $0x0
80105d97: 6a 17 push $0x17
80105d99: e9 7f fa ff ff jmp 8010581d <alltraps>
80105d9e <vector24>:
80105d9e: 6a 00 push $0x0
80105da0: 6a 18 push $0x18
80105da2: e9 76 fa ff ff jmp 8010581d <alltraps>
80105da7 <vector25>:
80105da7: 6a 00 push $0x0
80105da9: 6a 19 push $0x19
80105dab: e9 6d fa ff ff jmp 8010581d <alltraps>
80105db0 <vector26>:
80105db0: 6a 00 push $0x0
80105db2: 6a 1a push $0x1a
80105db4: e9 64 fa ff ff jmp 8010581d <alltraps>
80105db9 <vector27>:
80105db9: 6a 00 push $0x0
80105dbb: 6a 1b push $0x1b
80105dbd: e9 5b fa ff ff jmp 8010581d <alltraps>
80105dc2 <vector28>:
80105dc2: 6a 00 push $0x0
80105dc4: 6a 1c push $0x1c
80105dc6: e9 52 fa ff ff jmp 8010581d <alltraps>
80105dcb <vector29>:
80105dcb: 6a 00 push $0x0
80105dcd: 6a 1d push $0x1d
80105dcf: e9 49 fa ff ff jmp 8010581d <alltraps>
80105dd4 <vector30>:
80105dd4: 6a 00 push $0x0
80105dd6: 6a 1e push $0x1e
80105dd8: e9 40 fa ff ff jmp 8010581d <alltraps>
80105ddd <vector31>:
80105ddd: 6a 00 push $0x0
80105ddf: 6a 1f push $0x1f
80105de1: e9 37 fa ff ff jmp 8010581d <alltraps>
80105de6 <vector32>:
80105de6: 6a 00 push $0x0
80105de8: 6a 20 push $0x20
80105dea: e9 2e fa ff ff jmp 8010581d <alltraps>
80105def <vector33>:
80105def: 6a 00 push $0x0
80105df1: 6a 21 push $0x21
80105df3: e9 25 fa ff ff jmp 8010581d <alltraps>
80105df8 <vector34>:
80105df8: 6a 00 push $0x0
80105dfa: 6a 22 push $0x22
80105dfc: e9 1c fa ff ff jmp 8010581d <alltraps>
80105e01 <vector35>:
80105e01: 6a 00 push $0x0
80105e03: 6a 23 push $0x23
80105e05: e9 13 fa ff ff jmp 8010581d <alltraps>
80105e0a <vector36>:
80105e0a: 6a 00 push $0x0
80105e0c: 6a 24 push $0x24
80105e0e: e9 0a fa ff ff jmp 8010581d <alltraps>
80105e13 <vector37>:
80105e13: 6a 00 push $0x0
80105e15: 6a 25 push $0x25
80105e17: e9 01 fa ff ff jmp 8010581d <alltraps>
80105e1c <vector38>:
80105e1c: 6a 00 push $0x0
80105e1e: 6a 26 push $0x26
80105e20: e9 f8 f9 ff ff jmp 8010581d <alltraps>
80105e25 <vector39>:
80105e25: 6a 00 push $0x0
80105e27: 6a 27 push $0x27
80105e29: e9 ef f9 ff ff jmp 8010581d <alltraps>
80105e2e <vector40>:
80105e2e: 6a 00 push $0x0
80105e30: 6a 28 push $0x28
80105e32: e9 e6 f9 ff ff jmp 8010581d <alltraps>
80105e37 <vector41>:
80105e37: 6a 00 push $0x0
80105e39: 6a 29 push $0x29
80105e3b: e9 dd f9 ff ff jmp 8010581d <alltraps>
80105e40 <vector42>:
80105e40: 6a 00 push $0x0
80105e42: 6a 2a push $0x2a
80105e44: e9 d4 f9 ff ff jmp 8010581d <alltraps>
80105e49 <vector43>:
80105e49: 6a 00 push $0x0
80105e4b: 6a 2b push $0x2b
80105e4d: e9 cb f9 ff ff jmp 8010581d <alltraps>
80105e52 <vector44>:
80105e52: 6a 00 push $0x0
80105e54: 6a 2c push $0x2c
80105e56: e9 c2 f9 ff ff jmp 8010581d <alltraps>
80105e5b <vector45>:
80105e5b: 6a 00 push $0x0
80105e5d: 6a 2d push $0x2d
80105e5f: e9 b9 f9 ff ff jmp 8010581d <alltraps>
80105e64 <vector46>:
80105e64: 6a 00 push $0x0
80105e66: 6a 2e push $0x2e
80105e68: e9 b0 f9 ff ff jmp 8010581d <alltraps>
80105e6d <vector47>:
80105e6d: 6a 00 push $0x0
80105e6f: 6a 2f push $0x2f
80105e71: e9 a7 f9 ff ff jmp 8010581d <alltraps>
80105e76 <vector48>:
80105e76: 6a 00 push $0x0
80105e78: 6a 30 push $0x30
80105e7a: e9 9e f9 ff ff jmp 8010581d <alltraps>
80105e7f <vector49>:
80105e7f: 6a 00 push $0x0
80105e81: 6a 31 push $0x31
80105e83: e9 95 f9 ff ff jmp 8010581d <alltraps>
80105e88 <vector50>:
80105e88: 6a 00 push $0x0
80105e8a: 6a 32 push $0x32
80105e8c: e9 8c f9 ff ff jmp 8010581d <alltraps>
80105e91 <vector51>:
80105e91: 6a 00 push $0x0
80105e93: 6a 33 push $0x33
80105e95: e9 83 f9 ff ff jmp 8010581d <alltraps>
80105e9a <vector52>:
80105e9a: 6a 00 push $0x0
80105e9c: 6a 34 push $0x34
80105e9e: e9 7a f9 ff ff jmp 8010581d <alltraps>
80105ea3 <vector53>:
80105ea3: 6a 00 push $0x0
80105ea5: 6a 35 push $0x35
80105ea7: e9 71 f9 ff ff jmp 8010581d <alltraps>
80105eac <vector54>:
80105eac: 6a 00 push $0x0
80105eae: 6a 36 push $0x36
80105eb0: e9 68 f9 ff ff jmp 8010581d <alltraps>
80105eb5 <vector55>:
80105eb5: 6a 00 push $0x0
80105eb7: 6a 37 push $0x37
80105eb9: e9 5f f9 ff ff jmp 8010581d <alltraps>
80105ebe <vector56>:
80105ebe: 6a 00 push $0x0
80105ec0: 6a 38 push $0x38
80105ec2: e9 56 f9 ff ff jmp 8010581d <alltraps>
80105ec7 <vector57>:
80105ec7: 6a 00 push $0x0
80105ec9: 6a 39 push $0x39
80105ecb: e9 4d f9 ff ff jmp 8010581d <alltraps>
80105ed0 <vector58>:
80105ed0: 6a 00 push $0x0
80105ed2: 6a 3a push $0x3a
80105ed4: e9 44 f9 ff ff jmp 8010581d <alltraps>
80105ed9 <vector59>:
80105ed9: 6a 00 push $0x0
80105edb: 6a 3b push $0x3b
80105edd: e9 3b f9 ff ff jmp 8010581d <alltraps>
80105ee2 <vector60>:
80105ee2: 6a 00 push $0x0
80105ee4: 6a 3c push $0x3c
80105ee6: e9 32 f9 ff ff jmp 8010581d <alltraps>
80105eeb <vector61>:
80105eeb: 6a 00 push $0x0
80105eed: 6a 3d push $0x3d
80105eef: e9 29 f9 ff ff jmp 8010581d <alltraps>
80105ef4 <vector62>:
80105ef4: 6a 00 push $0x0
80105ef6: 6a 3e push $0x3e
80105ef8: e9 20 f9 ff ff jmp 8010581d <alltraps>
80105efd <vector63>:
80105efd: 6a 00 push $0x0
80105eff: 6a 3f push $0x3f
80105f01: e9 17 f9 ff ff jmp 8010581d <alltraps>
80105f06 <vector64>:
80105f06: 6a 00 push $0x0
80105f08: 6a 40 push $0x40
80105f0a: e9 0e f9 ff ff jmp 8010581d <alltraps>
80105f0f <vector65>:
80105f0f: 6a 00 push $0x0
80105f11: 6a 41 push $0x41
80105f13: e9 05 f9 ff ff jmp 8010581d <alltraps>
80105f18 <vector66>:
80105f18: 6a 00 push $0x0
80105f1a: 6a 42 push $0x42
80105f1c: e9 fc f8 ff ff jmp 8010581d <alltraps>
80105f21 <vector67>:
80105f21: 6a 00 push $0x0
80105f23: 6a 43 push $0x43
80105f25: e9 f3 f8 ff ff jmp 8010581d <alltraps>
80105f2a <vector68>:
80105f2a: 6a 00 push $0x0
80105f2c: 6a 44 push $0x44
80105f2e: e9 ea f8 ff ff jmp 8010581d <alltraps>
80105f33 <vector69>:
80105f33: 6a 00 push $0x0
80105f35: 6a 45 push $0x45
80105f37: e9 e1 f8 ff ff jmp 8010581d <alltraps>
80105f3c <vector70>:
80105f3c: 6a 00 push $0x0
80105f3e: 6a 46 push $0x46
80105f40: e9 d8 f8 ff ff jmp 8010581d <alltraps>
80105f45 <vector71>:
80105f45: 6a 00 push $0x0
80105f47: 6a 47 push $0x47
80105f49: e9 cf f8 ff ff jmp 8010581d <alltraps>
80105f4e <vector72>:
80105f4e: 6a 00 push $0x0
80105f50: 6a 48 push $0x48
80105f52: e9 c6 f8 ff ff jmp 8010581d <alltraps>
80105f57 <vector73>:
80105f57: 6a 00 push $0x0
80105f59: 6a 49 push $0x49
80105f5b: e9 bd f8 ff ff jmp 8010581d <alltraps>
80105f60 <vector74>:
80105f60: 6a 00 push $0x0
80105f62: 6a 4a push $0x4a
80105f64: e9 b4 f8 ff ff jmp 8010581d <alltraps>
80105f69 <vector75>:
80105f69: 6a 00 push $0x0
80105f6b: 6a 4b push $0x4b
80105f6d: e9 ab f8 ff ff jmp 8010581d <alltraps>
80105f72 <vector76>:
80105f72: 6a 00 push $0x0
80105f74: 6a 4c push $0x4c
80105f76: e9 a2 f8 ff ff jmp 8010581d <alltraps>
80105f7b <vector77>:
80105f7b: 6a 00 push $0x0
80105f7d: 6a 4d push $0x4d
80105f7f: e9 99 f8 ff ff jmp 8010581d <alltraps>
80105f84 <vector78>:
80105f84: 6a 00 push $0x0
80105f86: 6a 4e push $0x4e
80105f88: e9 90 f8 ff ff jmp 8010581d <alltraps>
80105f8d <vector79>:
80105f8d: 6a 00 push $0x0
80105f8f: 6a 4f push $0x4f
80105f91: e9 87 f8 ff ff jmp 8010581d <alltraps>
80105f96 <vector80>:
80105f96: 6a 00 push $0x0
80105f98: 6a 50 push $0x50
80105f9a: e9 7e f8 ff ff jmp 8010581d <alltraps>
80105f9f <vector81>:
80105f9f: 6a 00 push $0x0
80105fa1: 6a 51 push $0x51
80105fa3: e9 75 f8 ff ff jmp 8010581d <alltraps>
80105fa8 <vector82>:
80105fa8: 6a 00 push $0x0
80105faa: 6a 52 push $0x52
80105fac: e9 6c f8 ff ff jmp 8010581d <alltraps>
80105fb1 <vector83>:
80105fb1: 6a 00 push $0x0
80105fb3: 6a 53 push $0x53
80105fb5: e9 63 f8 ff ff jmp 8010581d <alltraps>
80105fba <vector84>:
80105fba: 6a 00 push $0x0
80105fbc: 6a 54 push $0x54
80105fbe: e9 5a f8 ff ff jmp 8010581d <alltraps>
80105fc3 <vector85>:
80105fc3: 6a 00 push $0x0
80105fc5: 6a 55 push $0x55
80105fc7: e9 51 f8 ff ff jmp 8010581d <alltraps>
80105fcc <vector86>:
80105fcc: 6a 00 push $0x0
80105fce: 6a 56 push $0x56
80105fd0: e9 48 f8 ff ff jmp 8010581d <alltraps>
80105fd5 <vector87>:
80105fd5: 6a 00 push $0x0
80105fd7: 6a 57 push $0x57
80105fd9: e9 3f f8 ff ff jmp 8010581d <alltraps>
80105fde <vector88>:
80105fde: 6a 00 push $0x0
80105fe0: 6a 58 push $0x58
80105fe2: e9 36 f8 ff ff jmp 8010581d <alltraps>
80105fe7 <vector89>:
80105fe7: 6a 00 push $0x0
80105fe9: 6a 59 push $0x59
80105feb: e9 2d f8 ff ff jmp 8010581d <alltraps>
80105ff0 <vector90>:
80105ff0: 6a 00 push $0x0
80105ff2: 6a 5a push $0x5a
80105ff4: e9 24 f8 ff ff jmp 8010581d <alltraps>
80105ff9 <vector91>:
80105ff9: 6a 00 push $0x0
80105ffb: 6a 5b push $0x5b
80105ffd: e9 1b f8 ff ff jmp 8010581d <alltraps>
80106002 <vector92>:
80106002: 6a 00 push $0x0
80106004: 6a 5c push $0x5c
80106006: e9 12 f8 ff ff jmp 8010581d <alltraps>
8010600b <vector93>:
8010600b: 6a 00 push $0x0
8010600d: 6a 5d push $0x5d
8010600f: e9 09 f8 ff ff jmp 8010581d <alltraps>
80106014 <vector94>:
80106014: 6a 00 push $0x0
80106016: 6a 5e push $0x5e
80106018: e9 00 f8 ff ff jmp 8010581d <alltraps>
8010601d <vector95>:
8010601d: 6a 00 push $0x0
8010601f: 6a 5f push $0x5f
80106021: e9 f7 f7 ff ff jmp 8010581d <alltraps>
80106026 <vector96>:
80106026: 6a 00 push $0x0
80106028: 6a 60 push $0x60
8010602a: e9 ee f7 ff ff jmp 8010581d <alltraps>
8010602f <vector97>:
8010602f: 6a 00 push $0x0
80106031: 6a 61 push $0x61
80106033: e9 e5 f7 ff ff jmp 8010581d <alltraps>
80106038 <vector98>:
80106038: 6a 00 push $0x0
8010603a: 6a 62 push $0x62
8010603c: e9 dc f7 ff ff jmp 8010581d <alltraps>
80106041 <vector99>:
80106041: 6a 00 push $0x0
80106043: 6a 63 push $0x63
80106045: e9 d3 f7 ff ff jmp 8010581d <alltraps>
8010604a <vector100>:
8010604a: 6a 00 push $0x0
8010604c: 6a 64 push $0x64
8010604e: e9 ca f7 ff ff jmp 8010581d <alltraps>
80106053 <vector101>:
80106053: 6a 00 push $0x0
80106055: 6a 65 push $0x65
80106057: e9 c1 f7 ff ff jmp 8010581d <alltraps>
8010605c <vector102>:
8010605c: 6a 00 push $0x0
8010605e: 6a 66 push $0x66
80106060: e9 b8 f7 ff ff jmp 8010581d <alltraps>
80106065 <vector103>:
80106065: 6a 00 push $0x0
80106067: 6a 67 push $0x67
80106069: e9 af f7 ff ff jmp 8010581d <alltraps>
8010606e <vector104>:
8010606e: 6a 00 push $0x0
80106070: 6a 68 push $0x68
80106072: e9 a6 f7 ff ff jmp 8010581d <alltraps>
80106077 <vector105>:
80106077: 6a 00 push $0x0
80106079: 6a 69 push $0x69
8010607b: e9 9d f7 ff ff jmp 8010581d <alltraps>
80106080 <vector106>:
80106080: 6a 00 push $0x0
80106082: 6a 6a push $0x6a
80106084: e9 94 f7 ff ff jmp 8010581d <alltraps>
80106089 <vector107>:
80106089: 6a 00 push $0x0
8010608b: 6a 6b push $0x6b
8010608d: e9 8b f7 ff ff jmp 8010581d <alltraps>
80106092 <vector108>:
80106092: 6a 00 push $0x0
80106094: 6a 6c push $0x6c
80106096: e9 82 f7 ff ff jmp 8010581d <alltraps>
8010609b <vector109>:
8010609b: 6a 00 push $0x0
8010609d: 6a 6d push $0x6d
8010609f: e9 79 f7 ff ff jmp 8010581d <alltraps>
801060a4 <vector110>:
801060a4: 6a 00 push $0x0
801060a6: 6a 6e push $0x6e
801060a8: e9 70 f7 ff ff jmp 8010581d <alltraps>
801060ad <vector111>:
801060ad: 6a 00 push $0x0
801060af: 6a 6f push $0x6f
801060b1: e9 67 f7 ff ff jmp 8010581d <alltraps>
801060b6 <vector112>:
801060b6: 6a 00 push $0x0
801060b8: 6a 70 push $0x70
801060ba: e9 5e f7 ff ff jmp 8010581d <alltraps>
801060bf <vector113>:
801060bf: 6a 00 push $0x0
801060c1: 6a 71 push $0x71
801060c3: e9 55 f7 ff ff jmp 8010581d <alltraps>
801060c8 <vector114>:
801060c8: 6a 00 push $0x0
801060ca: 6a 72 push $0x72
801060cc: e9 4c f7 ff ff jmp 8010581d <alltraps>
801060d1 <vector115>:
801060d1: 6a 00 push $0x0
801060d3: 6a 73 push $0x73
801060d5: e9 43 f7 ff ff jmp 8010581d <alltraps>
801060da <vector116>:
801060da: 6a 00 push $0x0
801060dc: 6a 74 push $0x74
801060de: e9 3a f7 ff ff jmp 8010581d <alltraps>
801060e3 <vector117>:
801060e3: 6a 00 push $0x0
801060e5: 6a 75 push $0x75
801060e7: e9 31 f7 ff ff jmp 8010581d <alltraps>
801060ec <vector118>:
801060ec: 6a 00 push $0x0
801060ee: 6a 76 push $0x76
801060f0: e9 28 f7 ff ff jmp 8010581d <alltraps>
801060f5 <vector119>:
801060f5: 6a 00 push $0x0
801060f7: 6a 77 push $0x77
801060f9: e9 1f f7 ff ff jmp 8010581d <alltraps>
801060fe <vector120>:
801060fe: 6a 00 push $0x0
80106100: 6a 78 push $0x78
80106102: e9 16 f7 ff ff jmp 8010581d <alltraps>
80106107 <vector121>:
80106107: 6a 00 push $0x0
80106109: 6a 79 push $0x79
8010610b: e9 0d f7 ff ff jmp 8010581d <alltraps>
80106110 <vector122>:
80106110: 6a 00 push $0x0
80106112: 6a 7a push $0x7a
80106114: e9 04 f7 ff ff jmp 8010581d <alltraps>
80106119 <vector123>:
80106119: 6a 00 push $0x0
8010611b: 6a 7b push $0x7b
8010611d: e9 fb f6 ff ff jmp 8010581d <alltraps>
80106122 <vector124>:
80106122: 6a 00 push $0x0
80106124: 6a 7c push $0x7c
80106126: e9 f2 f6 ff ff jmp 8010581d <alltraps>
8010612b <vector125>:
8010612b: 6a 00 push $0x0
8010612d: 6a 7d push $0x7d
8010612f: e9 e9 f6 ff ff jmp 8010581d <alltraps>
80106134 <vector126>:
80106134: 6a 00 push $0x0
80106136: 6a 7e push $0x7e
80106138: e9 e0 f6 ff ff jmp 8010581d <alltraps>
8010613d <vector127>:
8010613d: 6a 00 push $0x0
8010613f: 6a 7f push $0x7f
80106141: e9 d7 f6 ff ff jmp 8010581d <alltraps>
80106146 <vector128>:
80106146: 6a 00 push $0x0
80106148: 68 80 00 00 00 push $0x80
8010614d: e9 cb f6 ff ff jmp 8010581d <alltraps>
80106152 <vector129>:
80106152: 6a 00 push $0x0
80106154: 68 81 00 00 00 push $0x81
80106159: e9 bf f6 ff ff jmp 8010581d <alltraps>
8010615e <vector130>:
8010615e: 6a 00 push $0x0
80106160: 68 82 00 00 00 push $0x82
80106165: e9 b3 f6 ff ff jmp 8010581d <alltraps>
8010616a <vector131>:
8010616a: 6a 00 push $0x0
8010616c: 68 83 00 00 00 push $0x83
80106171: e9 a7 f6 ff ff jmp 8010581d <alltraps>
80106176 <vector132>:
80106176: 6a 00 push $0x0
80106178: 68 84 00 00 00 push $0x84
8010617d: e9 9b f6 ff ff jmp 8010581d <alltraps>
80106182 <vector133>:
80106182: 6a 00 push $0x0
80106184: 68 85 00 00 00 push $0x85
80106189: e9 8f f6 ff ff jmp 8010581d <alltraps>
8010618e <vector134>:
8010618e: 6a 00 push $0x0
80106190: 68 86 00 00 00 push $0x86
80106195: e9 83 f6 ff ff jmp 8010581d <alltraps>
8010619a <vector135>:
8010619a: 6a 00 push $0x0
8010619c: 68 87 00 00 00 push $0x87
801061a1: e9 77 f6 ff ff jmp 8010581d <alltraps>
801061a6 <vector136>:
801061a6: 6a 00 push $0x0
801061a8: 68 88 00 00 00 push $0x88
801061ad: e9 6b f6 ff ff jmp 8010581d <alltraps>
801061b2 <vector137>:
801061b2: 6a 00 push $0x0
801061b4: 68 89 00 00 00 push $0x89
801061b9: e9 5f f6 ff ff jmp 8010581d <alltraps>
801061be <vector138>:
801061be: 6a 00 push $0x0
801061c0: 68 8a 00 00 00 push $0x8a
801061c5: e9 53 f6 ff ff jmp 8010581d <alltraps>
801061ca <vector139>:
801061ca: 6a 00 push $0x0
801061cc: 68 8b 00 00 00 push $0x8b
801061d1: e9 47 f6 ff ff jmp 8010581d <alltraps>
801061d6 <vector140>:
801061d6: 6a 00 push $0x0
801061d8: 68 8c 00 00 00 push $0x8c
801061dd: e9 3b f6 ff ff jmp 8010581d <alltraps>
801061e2 <vector141>:
801061e2: 6a 00 push $0x0
801061e4: 68 8d 00 00 00 push $0x8d
801061e9: e9 2f f6 ff ff jmp 8010581d <alltraps>
801061ee <vector142>:
801061ee: 6a 00 push $0x0
801061f0: 68 8e 00 00 00 push $0x8e
801061f5: e9 23 f6 ff ff jmp 8010581d <alltraps>
801061fa <vector143>:
801061fa: 6a 00 push $0x0
801061fc: 68 8f 00 00 00 push $0x8f
80106201: e9 17 f6 ff ff jmp 8010581d <alltraps>
80106206 <vector144>:
80106206: 6a 00 push $0x0
80106208: 68 90 00 00 00 push $0x90
8010620d: e9 0b f6 ff ff jmp 8010581d <alltraps>
80106212 <vector145>:
80106212: 6a 00 push $0x0
80106214: 68 91 00 00 00 push $0x91
80106219: e9 ff f5 ff ff jmp 8010581d <alltraps>
8010621e <vector146>:
8010621e: 6a 00 push $0x0
80106220: 68 92 00 00 00 push $0x92
80106225: e9 f3 f5 ff ff jmp 8010581d <alltraps>
8010622a <vector147>:
8010622a: 6a 00 push $0x0
8010622c: 68 93 00 00 00 push $0x93
80106231: e9 e7 f5 ff ff jmp 8010581d <alltraps>
80106236 <vector148>:
80106236: 6a 00 push $0x0
80106238: 68 94 00 00 00 push $0x94
8010623d: e9 db f5 ff ff jmp 8010581d <alltraps>
80106242 <vector149>:
80106242: 6a 00 push $0x0
80106244: 68 95 00 00 00 push $0x95
80106249: e9 cf f5 ff ff jmp 8010581d <alltraps>
8010624e <vector150>:
8010624e: 6a 00 push $0x0
80106250: 68 96 00 00 00 push $0x96
80106255: e9 c3 f5 ff ff jmp 8010581d <alltraps>
8010625a <vector151>:
8010625a: 6a 00 push $0x0
8010625c: 68 97 00 00 00 push $0x97
80106261: e9 b7 f5 ff ff jmp 8010581d <alltraps>
80106266 <vector152>:
80106266: 6a 00 push $0x0
80106268: 68 98 00 00 00 push $0x98
8010626d: e9 ab f5 ff ff jmp 8010581d <alltraps>
80106272 <vector153>:
80106272: 6a 00 push $0x0
80106274: 68 99 00 00 00 push $0x99
80106279: e9 9f f5 ff ff jmp 8010581d <alltraps>
8010627e <vector154>:
8010627e: 6a 00 push $0x0
80106280: 68 9a 00 00 00 push $0x9a
80106285: e9 93 f5 ff ff jmp 8010581d <alltraps>
8010628a <vector155>:
8010628a: 6a 00 push $0x0
8010628c: 68 9b 00 00 00 push $0x9b
80106291: e9 87 f5 ff ff jmp 8010581d <alltraps>
80106296 <vector156>:
80106296: 6a 00 push $0x0
80106298: 68 9c 00 00 00 push $0x9c
8010629d: e9 7b f5 ff ff jmp 8010581d <alltraps>
801062a2 <vector157>:
801062a2: 6a 00 push $0x0
801062a4: 68 9d 00 00 00 push $0x9d
801062a9: e9 6f f5 ff ff jmp 8010581d <alltraps>
801062ae <vector158>:
801062ae: 6a 00 push $0x0
801062b0: 68 9e 00 00 00 push $0x9e
801062b5: e9 63 f5 ff ff jmp 8010581d <alltraps>
801062ba <vector159>:
801062ba: 6a 00 push $0x0
801062bc: 68 9f 00 00 00 push $0x9f
801062c1: e9 57 f5 ff ff jmp 8010581d <alltraps>
801062c6 <vector160>:
801062c6: 6a 00 push $0x0
801062c8: 68 a0 00 00 00 push $0xa0
801062cd: e9 4b f5 ff ff jmp 8010581d <alltraps>
801062d2 <vector161>:
801062d2: 6a 00 push $0x0
801062d4: 68 a1 00 00 00 push $0xa1
801062d9: e9 3f f5 ff ff jmp 8010581d <alltraps>
801062de <vector162>:
801062de: 6a 00 push $0x0
801062e0: 68 a2 00 00 00 push $0xa2
801062e5: e9 33 f5 ff ff jmp 8010581d <alltraps>
801062ea <vector163>:
801062ea: 6a 00 push $0x0
801062ec: 68 a3 00 00 00 push $0xa3
801062f1: e9 27 f5 ff ff jmp 8010581d <alltraps>
801062f6 <vector164>:
801062f6: 6a 00 push $0x0
801062f8: 68 a4 00 00 00 push $0xa4
801062fd: e9 1b f5 ff ff jmp 8010581d <alltraps>
80106302 <vector165>:
80106302: 6a 00 push $0x0
80106304: 68 a5 00 00 00 push $0xa5
80106309: e9 0f f5 ff ff jmp 8010581d <alltraps>
8010630e <vector166>:
8010630e: 6a 00 push $0x0
80106310: 68 a6 00 00 00 push $0xa6
80106315: e9 03 f5 ff ff jmp 8010581d <alltraps>
8010631a <vector167>:
8010631a: 6a 00 push $0x0
8010631c: 68 a7 00 00 00 push $0xa7
80106321: e9 f7 f4 ff ff jmp 8010581d <alltraps>
80106326 <vector168>:
80106326: 6a 00 push $0x0
80106328: 68 a8 00 00 00 push $0xa8
8010632d: e9 eb f4 ff ff jmp 8010581d <alltraps>
80106332 <vector169>:
80106332: 6a 00 push $0x0
80106334: 68 a9 00 00 00 push $0xa9
80106339: e9 df f4 ff ff jmp 8010581d <alltraps>
8010633e <vector170>:
8010633e: 6a 00 push $0x0
80106340: 68 aa 00 00 00 push $0xaa
80106345: e9 d3 f4 ff ff jmp 8010581d <alltraps>
8010634a <vector171>:
8010634a: 6a 00 push $0x0
8010634c: 68 ab 00 00 00 push $0xab
80106351: e9 c7 f4 ff ff jmp 8010581d <alltraps>
80106356 <vector172>:
80106356: 6a 00 push $0x0
80106358: 68 ac 00 00 00 push $0xac
8010635d: e9 bb f4 ff ff jmp 8010581d <alltraps>
80106362 <vector173>:
80106362: 6a 00 push $0x0
80106364: 68 ad 00 00 00 push $0xad
80106369: e9 af f4 ff ff jmp 8010581d <alltraps>
8010636e <vector174>:
8010636e: 6a 00 push $0x0
80106370: 68 ae 00 00 00 push $0xae
80106375: e9 a3 f4 ff ff jmp 8010581d <alltraps>
8010637a <vector175>:
8010637a: 6a 00 push $0x0
8010637c: 68 af 00 00 00 push $0xaf
80106381: e9 97 f4 ff ff jmp 8010581d <alltraps>
80106386 <vector176>:
80106386: 6a 00 push $0x0
80106388: 68 b0 00 00 00 push $0xb0
8010638d: e9 8b f4 ff ff jmp 8010581d <alltraps>
80106392 <vector177>:
80106392: 6a 00 push $0x0
80106394: 68 b1 00 00 00 push $0xb1
80106399: e9 7f f4 ff ff jmp 8010581d <alltraps>
8010639e <vector178>:
8010639e: 6a 00 push $0x0
801063a0: 68 b2 00 00 00 push $0xb2
801063a5: e9 73 f4 ff ff jmp 8010581d <alltraps>
801063aa <vector179>:
801063aa: 6a 00 push $0x0
801063ac: 68 b3 00 00 00 push $0xb3
801063b1: e9 67 f4 ff ff jmp 8010581d <alltraps>
801063b6 <vector180>:
801063b6: 6a 00 push $0x0
801063b8: 68 b4 00 00 00 push $0xb4
801063bd: e9 5b f4 ff ff jmp 8010581d <alltraps>
801063c2 <vector181>:
801063c2: 6a 00 push $0x0
801063c4: 68 b5 00 00 00 push $0xb5
801063c9: e9 4f f4 ff ff jmp 8010581d <alltraps>
801063ce <vector182>:
801063ce: 6a 00 push $0x0
801063d0: 68 b6 00 00 00 push $0xb6
801063d5: e9 43 f4 ff ff jmp 8010581d <alltraps>
801063da <vector183>:
801063da: 6a 00 push $0x0
801063dc: 68 b7 00 00 00 push $0xb7
801063e1: e9 37 f4 ff ff jmp 8010581d <alltraps>
801063e6 <vector184>:
801063e6: 6a 00 push $0x0
801063e8: 68 b8 00 00 00 push $0xb8
801063ed: e9 2b f4 ff ff jmp 8010581d <alltraps>
801063f2 <vector185>:
801063f2: 6a 00 push $0x0
801063f4: 68 b9 00 00 00 push $0xb9
801063f9: e9 1f f4 ff ff jmp 8010581d <alltraps>
801063fe <vector186>:
801063fe: 6a 00 push $0x0
80106400: 68 ba 00 00 00 push $0xba
80106405: e9 13 f4 ff ff jmp 8010581d <alltraps>
8010640a <vector187>:
8010640a: 6a 00 push $0x0
8010640c: 68 bb 00 00 00 push $0xbb
80106411: e9 07 f4 ff ff jmp 8010581d <alltraps>
80106416 <vector188>:
80106416: 6a 00 push $0x0
80106418: 68 bc 00 00 00 push $0xbc
8010641d: e9 fb f3 ff ff jmp 8010581d <alltraps>
80106422 <vector189>:
80106422: 6a 00 push $0x0
80106424: 68 bd 00 00 00 push $0xbd
80106429: e9 ef f3 ff ff jmp 8010581d <alltraps>
8010642e <vector190>:
8010642e: 6a 00 push $0x0
80106430: 68 be 00 00 00 push $0xbe
80106435: e9 e3 f3 ff ff jmp 8010581d <alltraps>
8010643a <vector191>:
8010643a: 6a 00 push $0x0
8010643c: 68 bf 00 00 00 push $0xbf
80106441: e9 d7 f3 ff ff jmp 8010581d <alltraps>
80106446 <vector192>:
80106446: 6a 00 push $0x0
80106448: 68 c0 00 00 00 push $0xc0
8010644d: e9 cb f3 ff ff jmp 8010581d <alltraps>
80106452 <vector193>:
80106452: 6a 00 push $0x0
80106454: 68 c1 00 00 00 push $0xc1
80106459: e9 bf f3 ff ff jmp 8010581d <alltraps>
8010645e <vector194>:
8010645e: 6a 00 push $0x0
80106460: 68 c2 00 00 00 push $0xc2
80106465: e9 b3 f3 ff ff jmp 8010581d <alltraps>
8010646a <vector195>:
8010646a: 6a 00 push $0x0
8010646c: 68 c3 00 00 00 push $0xc3
80106471: e9 a7 f3 ff ff jmp 8010581d <alltraps>
80106476 <vector196>:
80106476: 6a 00 push $0x0
80106478: 68 c4 00 00 00 push $0xc4
8010647d: e9 9b f3 ff ff jmp 8010581d <alltraps>
80106482 <vector197>:
80106482: 6a 00 push $0x0
80106484: 68 c5 00 00 00 push $0xc5
80106489: e9 8f f3 ff ff jmp 8010581d <alltraps>
8010648e <vector198>:
8010648e: 6a 00 push $0x0
80106490: 68 c6 00 00 00 push $0xc6
80106495: e9 83 f3 ff ff jmp 8010581d <alltraps>
8010649a <vector199>:
8010649a: 6a 00 push $0x0
8010649c: 68 c7 00 00 00 push $0xc7
801064a1: e9 77 f3 ff ff jmp 8010581d <alltraps>
801064a6 <vector200>:
801064a6: 6a 00 push $0x0
801064a8: 68 c8 00 00 00 push $0xc8
801064ad: e9 6b f3 ff ff jmp 8010581d <alltraps>
801064b2 <vector201>:
801064b2: 6a 00 push $0x0
801064b4: 68 c9 00 00 00 push $0xc9
801064b9: e9 5f f3 ff ff jmp 8010581d <alltraps>
801064be <vector202>:
801064be: 6a 00 push $0x0
801064c0: 68 ca 00 00 00 push $0xca
801064c5: e9 53 f3 ff ff jmp 8010581d <alltraps>
801064ca <vector203>:
801064ca: 6a 00 push $0x0
801064cc: 68 cb 00 00 00 push $0xcb
801064d1: e9 47 f3 ff ff jmp 8010581d <alltraps>
801064d6 <vector204>:
801064d6: 6a 00 push $0x0
801064d8: 68 cc 00 00 00 push $0xcc
801064dd: e9 3b f3 ff ff jmp 8010581d <alltraps>
801064e2 <vector205>:
801064e2: 6a 00 push $0x0
801064e4: 68 cd 00 00 00 push $0xcd
801064e9: e9 2f f3 ff ff jmp 8010581d <alltraps>
801064ee <vector206>:
801064ee: 6a 00 push $0x0
801064f0: 68 ce 00 00 00 push $0xce
801064f5: e9 23 f3 ff ff jmp 8010581d <alltraps>
801064fa <vector207>:
801064fa: 6a 00 push $0x0
801064fc: 68 cf 00 00 00 push $0xcf
80106501: e9 17 f3 ff ff jmp 8010581d <alltraps>
80106506 <vector208>:
80106506: 6a 00 push $0x0
80106508: 68 d0 00 00 00 push $0xd0
8010650d: e9 0b f3 ff ff jmp 8010581d <alltraps>
80106512 <vector209>:
80106512: 6a 00 push $0x0
80106514: 68 d1 00 00 00 push $0xd1
80106519: e9 ff f2 ff ff jmp 8010581d <alltraps>
8010651e <vector210>:
8010651e: 6a 00 push $0x0
80106520: 68 d2 00 00 00 push $0xd2
80106525: e9 f3 f2 ff ff jmp 8010581d <alltraps>
8010652a <vector211>:
8010652a: 6a 00 push $0x0
8010652c: 68 d3 00 00 00 push $0xd3
80106531: e9 e7 f2 ff ff jmp 8010581d <alltraps>
80106536 <vector212>:
80106536: 6a 00 push $0x0
80106538: 68 d4 00 00 00 push $0xd4
8010653d: e9 db f2 ff ff jmp 8010581d <alltraps>
80106542 <vector213>:
80106542: 6a 00 push $0x0
80106544: 68 d5 00 00 00 push $0xd5
80106549: e9 cf f2 ff ff jmp 8010581d <alltraps>
8010654e <vector214>:
8010654e: 6a 00 push $0x0
80106550: 68 d6 00 00 00 push $0xd6
80106555: e9 c3 f2 ff ff jmp 8010581d <alltraps>
8010655a <vector215>:
8010655a: 6a 00 push $0x0
8010655c: 68 d7 00 00 00 push $0xd7
80106561: e9 b7 f2 ff ff jmp 8010581d <alltraps>
80106566 <vector216>:
80106566: 6a 00 push $0x0
80106568: 68 d8 00 00 00 push $0xd8
8010656d: e9 ab f2 ff ff jmp 8010581d <alltraps>
80106572 <vector217>:
80106572: 6a 00 push $0x0
80106574: 68 d9 00 00 00 push $0xd9
80106579: e9 9f f2 ff ff jmp 8010581d <alltraps>
8010657e <vector218>:
8010657e: 6a 00 push $0x0
80106580: 68 da 00 00 00 push $0xda
80106585: e9 93 f2 ff ff jmp 8010581d <alltraps>
8010658a <vector219>:
8010658a: 6a 00 push $0x0
8010658c: 68 db 00 00 00 push $0xdb
80106591: e9 87 f2 ff ff jmp 8010581d <alltraps>
80106596 <vector220>:
80106596: 6a 00 push $0x0
80106598: 68 dc 00 00 00 push $0xdc
8010659d: e9 7b f2 ff ff jmp 8010581d <alltraps>
801065a2 <vector221>:
801065a2: 6a 00 push $0x0
801065a4: 68 dd 00 00 00 push $0xdd
801065a9: e9 6f f2 ff ff jmp 8010581d <alltraps>
801065ae <vector222>:
801065ae: 6a 00 push $0x0
801065b0: 68 de 00 00 00 push $0xde
801065b5: e9 63 f2 ff ff jmp 8010581d <alltraps>
801065ba <vector223>:
801065ba: 6a 00 push $0x0
801065bc: 68 df 00 00 00 push $0xdf
801065c1: e9 57 f2 ff ff jmp 8010581d <alltraps>
801065c6 <vector224>:
801065c6: 6a 00 push $0x0
801065c8: 68 e0 00 00 00 push $0xe0
801065cd: e9 4b f2 ff ff jmp 8010581d <alltraps>
801065d2 <vector225>:
801065d2: 6a 00 push $0x0
801065d4: 68 e1 00 00 00 push $0xe1
801065d9: e9 3f f2 ff ff jmp 8010581d <alltraps>
801065de <vector226>:
801065de: 6a 00 push $0x0
801065e0: 68 e2 00 00 00 push $0xe2
801065e5: e9 33 f2 ff ff jmp 8010581d <alltraps>
801065ea <vector227>:
801065ea: 6a 00 push $0x0
801065ec: 68 e3 00 00 00 push $0xe3
801065f1: e9 27 f2 ff ff jmp 8010581d <alltraps>
801065f6 <vector228>:
801065f6: 6a 00 push $0x0
801065f8: 68 e4 00 00 00 push $0xe4
801065fd: e9 1b f2 ff ff jmp 8010581d <alltraps>
80106602 <vector229>:
80106602: 6a 00 push $0x0
80106604: 68 e5 00 00 00 push $0xe5
80106609: e9 0f f2 ff ff jmp 8010581d <alltraps>
8010660e <vector230>:
8010660e: 6a 00 push $0x0
80106610: 68 e6 00 00 00 push $0xe6
80106615: e9 03 f2 ff ff jmp 8010581d <alltraps>
8010661a <vector231>:
8010661a: 6a 00 push $0x0
8010661c: 68 e7 00 00 00 push $0xe7
80106621: e9 f7 f1 ff ff jmp 8010581d <alltraps>
80106626 <vector232>:
80106626: 6a 00 push $0x0
80106628: 68 e8 00 00 00 push $0xe8
8010662d: e9 eb f1 ff ff jmp 8010581d <alltraps>
80106632 <vector233>:
80106632: 6a 00 push $0x0
80106634: 68 e9 00 00 00 push $0xe9
80106639: e9 df f1 ff ff jmp 8010581d <alltraps>
8010663e <vector234>:
8010663e: 6a 00 push $0x0
80106640: 68 ea 00 00 00 push $0xea
80106645: e9 d3 f1 ff ff jmp 8010581d <alltraps>
8010664a <vector235>:
8010664a: 6a 00 push $0x0
8010664c: 68 eb 00 00 00 push $0xeb
80106651: e9 c7 f1 ff ff jmp 8010581d <alltraps>
80106656 <vector236>:
80106656: 6a 00 push $0x0
80106658: 68 ec 00 00 00 push $0xec
8010665d: e9 bb f1 ff ff jmp 8010581d <alltraps>
80106662 <vector237>:
80106662: 6a 00 push $0x0
80106664: 68 ed 00 00 00 push $0xed
80106669: e9 af f1 ff ff jmp 8010581d <alltraps>
8010666e <vector238>:
8010666e: 6a 00 push $0x0
80106670: 68 ee 00 00 00 push $0xee
80106675: e9 a3 f1 ff ff jmp 8010581d <alltraps>
8010667a <vector239>:
8010667a: 6a 00 push $0x0
8010667c: 68 ef 00 00 00 push $0xef
80106681: e9 97 f1 ff ff jmp 8010581d <alltraps>
80106686 <vector240>:
80106686: 6a 00 push $0x0
80106688: 68 f0 00 00 00 push $0xf0
8010668d: e9 8b f1 ff ff jmp 8010581d <alltraps>
80106692 <vector241>:
80106692: 6a 00 push $0x0
80106694: 68 f1 00 00 00 push $0xf1
80106699: e9 7f f1 ff ff jmp 8010581d <alltraps>
8010669e <vector242>:
8010669e: 6a 00 push $0x0
801066a0: 68 f2 00 00 00 push $0xf2
801066a5: e9 73 f1 ff ff jmp 8010581d <alltraps>
801066aa <vector243>:
801066aa: 6a 00 push $0x0
801066ac: 68 f3 00 00 00 push $0xf3
801066b1: e9 67 f1 ff ff jmp 8010581d <alltraps>
801066b6 <vector244>:
801066b6: 6a 00 push $0x0
801066b8: 68 f4 00 00 00 push $0xf4
801066bd: e9 5b f1 ff ff jmp 8010581d <alltraps>
801066c2 <vector245>:
801066c2: 6a 00 push $0x0
801066c4: 68 f5 00 00 00 push $0xf5
801066c9: e9 4f f1 ff ff jmp 8010581d <alltraps>
801066ce <vector246>:
801066ce: 6a 00 push $0x0
801066d0: 68 f6 00 00 00 push $0xf6
801066d5: e9 43 f1 ff ff jmp 8010581d <alltraps>
801066da <vector247>:
801066da: 6a 00 push $0x0
801066dc: 68 f7 00 00 00 push $0xf7
801066e1: e9 37 f1 ff ff jmp 8010581d <alltraps>
801066e6 <vector248>:
801066e6: 6a 00 push $0x0
801066e8: 68 f8 00 00 00 push $0xf8
801066ed: e9 2b f1 ff ff jmp 8010581d <alltraps>
801066f2 <vector249>:
801066f2: 6a 00 push $0x0
801066f4: 68 f9 00 00 00 push $0xf9
801066f9: e9 1f f1 ff ff jmp 8010581d <alltraps>
801066fe <vector250>:
801066fe: 6a 00 push $0x0
80106700: 68 fa 00 00 00 push $0xfa
80106705: e9 13 f1 ff ff jmp 8010581d <alltraps>
8010670a <vector251>:
8010670a: 6a 00 push $0x0
8010670c: 68 fb 00 00 00 push $0xfb
80106711: e9 07 f1 ff ff jmp 8010581d <alltraps>
80106716 <vector252>:
80106716: 6a 00 push $0x0
80106718: 68 fc 00 00 00 push $0xfc
8010671d: e9 fb f0 ff ff jmp 8010581d <alltraps>
80106722 <vector253>:
80106722: 6a 00 push $0x0
80106724: 68 fd 00 00 00 push $0xfd
80106729: e9 ef f0 ff ff jmp 8010581d <alltraps>
8010672e <vector254>:
8010672e: 6a 00 push $0x0
80106730: 68 fe 00 00 00 push $0xfe
80106735: e9 e3 f0 ff ff jmp 8010581d <alltraps>
8010673a <vector255>:
8010673a: 6a 00 push $0x0
8010673c: 68 ff 00 00 00 push $0xff
80106741: e9 d7 f0 ff ff jmp 8010581d <alltraps>
80106746: 66 90 xchg %ax,%ax
80106748: 66 90 xchg %ax,%ax
8010674a: 66 90 xchg %ax,%ax
8010674c: 66 90 xchg %ax,%ax
8010674e: 66 90 xchg %ax,%ax
80106750 <walkpgdir>:
80106750: 55 push %ebp
80106751: 89 e5 mov %esp,%ebp
80106753: 57 push %edi
80106754: 56 push %esi
80106755: 53 push %ebx
80106756: 89 d3 mov %edx,%ebx
80106758: c1 ea 16 shr $0x16,%edx
8010675b: 8d 3c 90 lea (%eax,%edx,4),%edi
8010675e: 83 ec 0c sub $0xc,%esp
80106761: 8b 07 mov (%edi),%eax
80106763: a8 01 test $0x1,%al
80106765: 74 29 je 80106790 <walkpgdir+0x40>
80106767: 25 00 f0 ff ff and $0xfffff000,%eax
8010676c: 8d b0 00 00 00 80 lea -0x80000000(%eax),%esi
80106772: 8d 65 f4 lea -0xc(%ebp),%esp
80106775: c1 eb 0a shr $0xa,%ebx
80106778: 81 e3 fc 0f 00 00 and $0xffc,%ebx
8010677e: 8d 04 1e lea (%esi,%ebx,1),%eax
80106781: 5b pop %ebx
80106782: 5e pop %esi
80106783: 5f pop %edi
80106784: 5d pop %ebp
80106785: c3 ret
80106786: 8d 76 00 lea 0x0(%esi),%esi
80106789: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80106790: 85 c9 test %ecx,%ecx
80106792: 74 2c je 801067c0 <walkpgdir+0x70>
80106794: e8 f7 bc ff ff call 80102490 <kalloc>
80106799: 85 c0 test %eax,%eax
8010679b: 89 c6 mov %eax,%esi
8010679d: 74 21 je 801067c0 <walkpgdir+0x70>
8010679f: 83 ec 04 sub $0x4,%esp
801067a2: 68 00 10 00 00 push $0x1000
801067a7: 6a 00 push $0x0
801067a9: 50 push %eax
801067aa: e8 51 dd ff ff call 80104500 <memset>
801067af: 8d 86 00 00 00 80 lea -0x80000000(%esi),%eax
801067b5: 83 c4 10 add $0x10,%esp
801067b8: 83 c8 07 or $0x7,%eax
801067bb: 89 07 mov %eax,(%edi)
801067bd: eb b3 jmp 80106772 <walkpgdir+0x22>
801067bf: 90 nop
801067c0: 8d 65 f4 lea -0xc(%ebp),%esp
801067c3: 31 c0 xor %eax,%eax
801067c5: 5b pop %ebx
801067c6: 5e pop %esi
801067c7: 5f pop %edi
801067c8: 5d pop %ebp
801067c9: c3 ret
801067ca: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801067d0 <mappages>:
801067d0: 55 push %ebp
801067d1: 89 e5 mov %esp,%ebp
801067d3: 57 push %edi
801067d4: 56 push %esi
801067d5: 53 push %ebx
801067d6: 89 d3 mov %edx,%ebx
801067d8: 81 e3 00 f0 ff ff and $0xfffff000,%ebx
801067de: 83 ec 1c sub $0x1c,%esp
801067e1: 89 45 e4 mov %eax,-0x1c(%ebp)
801067e4: 8d 44 0a ff lea -0x1(%edx,%ecx,1),%eax
801067e8: 8b 7d 08 mov 0x8(%ebp),%edi
801067eb: 25 00 f0 ff ff and $0xfffff000,%eax
801067f0: 89 45 e0 mov %eax,-0x20(%ebp)
801067f3: 8b 45 0c mov 0xc(%ebp),%eax
801067f6: 29 df sub %ebx,%edi
801067f8: 83 c8 01 or $0x1,%eax
801067fb: 89 45 dc mov %eax,-0x24(%ebp)
801067fe: eb 15 jmp 80106815 <mappages+0x45>
80106800: f6 00 01 testb $0x1,(%eax)
80106803: 75 45 jne 8010684a <mappages+0x7a>
80106805: 0b 75 dc or -0x24(%ebp),%esi
80106808: 3b 5d e0 cmp -0x20(%ebp),%ebx
8010680b: 89 30 mov %esi,(%eax)
8010680d: 74 31 je 80106840 <mappages+0x70>
8010680f: 81 c3 00 10 00 00 add $0x1000,%ebx
80106815: 8b 45 e4 mov -0x1c(%ebp),%eax
80106818: b9 01 00 00 00 mov $0x1,%ecx
8010681d: 89 da mov %ebx,%edx
8010681f: 8d 34 3b lea (%ebx,%edi,1),%esi
80106822: e8 29 ff ff ff call 80106750 <walkpgdir>
80106827: 85 c0 test %eax,%eax
80106829: 75 d5 jne 80106800 <mappages+0x30>
8010682b: 8d 65 f4 lea -0xc(%ebp),%esp
8010682e: b8 ff ff ff ff mov $0xffffffff,%eax
80106833: 5b pop %ebx
80106834: 5e pop %esi
80106835: 5f pop %edi
80106836: 5d pop %ebp
80106837: c3 ret
80106838: 90 nop
80106839: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80106840: 8d 65 f4 lea -0xc(%ebp),%esp
80106843: 31 c0 xor %eax,%eax
80106845: 5b pop %ebx
80106846: 5e pop %esi
80106847: 5f pop %edi
80106848: 5d pop %ebp
80106849: c3 ret
8010684a: 83 ec 0c sub $0xc,%esp
8010684d: 68 d8 79 10 80 push $0x801079d8
80106852: e8 09 9b ff ff call 80100360 <panic>
80106857: 89 f6 mov %esi,%esi
80106859: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80106860 <deallocuvm.part.0>:
80106860: 55 push %ebp
80106861: 89 e5 mov %esp,%ebp
80106863: 57 push %edi
80106864: 56 push %esi
80106865: 53 push %ebx
80106866: 8d 99 ff 0f 00 00 lea 0xfff(%ecx),%ebx
8010686c: 89 c7 mov %eax,%edi
8010686e: 81 e3 00 f0 ff ff and $0xfffff000,%ebx
80106874: 83 ec 1c sub $0x1c,%esp
80106877: 89 4d e0 mov %ecx,-0x20(%ebp)
8010687a: 39 d3 cmp %edx,%ebx
8010687c: 73 66 jae 801068e4 <deallocuvm.part.0+0x84>
8010687e: 89 d6 mov %edx,%esi
80106880: eb 3d jmp 801068bf <deallocuvm.part.0+0x5f>
80106882: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80106888: 8b 10 mov (%eax),%edx
8010688a: f6 c2 01 test $0x1,%dl
8010688d: 74 26 je 801068b5 <deallocuvm.part.0+0x55>
8010688f: 81 e2 00 f0 ff ff and $0xfffff000,%edx
80106895: 74 58 je 801068ef <deallocuvm.part.0+0x8f>
80106897: 83 ec 0c sub $0xc,%esp
8010689a: 81 c2 00 00 00 80 add $0x80000000,%edx
801068a0: 89 45 e4 mov %eax,-0x1c(%ebp)
801068a3: 52 push %edx
801068a4: e8 37 ba ff ff call 801022e0 <kfree>
801068a9: 8b 45 e4 mov -0x1c(%ebp),%eax
801068ac: 83 c4 10 add $0x10,%esp
801068af: c7 00 00 00 00 00 movl $0x0,(%eax)
801068b5: 81 c3 00 10 00 00 add $0x1000,%ebx
801068bb: 39 f3 cmp %esi,%ebx
801068bd: 73 25 jae 801068e4 <deallocuvm.part.0+0x84>
801068bf: 31 c9 xor %ecx,%ecx
801068c1: 89 da mov %ebx,%edx
801068c3: 89 f8 mov %edi,%eax
801068c5: e8 86 fe ff ff call 80106750 <walkpgdir>
801068ca: 85 c0 test %eax,%eax
801068cc: 75 ba jne 80106888 <deallocuvm.part.0+0x28>
801068ce: 81 e3 00 00 c0 ff and $0xffc00000,%ebx
801068d4: 81 c3 00 f0 3f 00 add $0x3ff000,%ebx
801068da: 81 c3 00 10 00 00 add $0x1000,%ebx
801068e0: 39 f3 cmp %esi,%ebx
801068e2: 72 db jb 801068bf <deallocuvm.part.0+0x5f>
801068e4: 8b 45 e0 mov -0x20(%ebp),%eax
801068e7: 8d 65 f4 lea -0xc(%ebp),%esp
801068ea: 5b pop %ebx
801068eb: 5e pop %esi
801068ec: 5f pop %edi
801068ed: 5d pop %ebp
801068ee: c3 ret
801068ef: 83 ec 0c sub $0xc,%esp
801068f2: 68 12 73 10 80 push $0x80107312
801068f7: e8 64 9a ff ff call 80100360 <panic>
801068fc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80106900 <seginit>:
80106900: 55 push %ebp
80106901: 89 e5 mov %esp,%ebp
80106903: 53 push %ebx
80106904: 31 db xor %ebx,%ebx
80106906: 83 ec 14 sub $0x14,%esp
80106909: e8 42 be ff ff call 80102750 <cpunum>
8010690e: 69 c0 bc 00 00 00 imul $0xbc,%eax,%eax
80106914: b9 ff ff ff ff mov $0xffffffff,%ecx
80106919: 8d 90 a0 27 11 80 lea -0x7feed860(%eax),%edx
8010691f: c6 80 1d 28 11 80 9a movb $0x9a,-0x7feed7e3(%eax)
80106926: c6 80 1e 28 11 80 cf movb $0xcf,-0x7feed7e2(%eax)
8010692d: c6 80 25 28 11 80 92 movb $0x92,-0x7feed7db(%eax)
80106934: c6 80 26 28 11 80 cf movb $0xcf,-0x7feed7da(%eax)
8010693b: 66 89 4a 78 mov %cx,0x78(%edx)
8010693f: b9 ff ff ff ff mov $0xffffffff,%ecx
80106944: 66 89 5a 7a mov %bx,0x7a(%edx)
80106948: 66 89 8a 80 00 00 00 mov %cx,0x80(%edx)
8010694f: 31 db xor %ebx,%ebx
80106951: b9 ff ff ff ff mov $0xffffffff,%ecx
80106956: 66 89 9a 82 00 00 00 mov %bx,0x82(%edx)
8010695d: 66 89 8a 90 00 00 00 mov %cx,0x90(%edx)
80106964: 31 db xor %ebx,%ebx
80106966: b9 ff ff ff ff mov $0xffffffff,%ecx
8010696b: 66 89 9a 92 00 00 00 mov %bx,0x92(%edx)
80106972: 31 db xor %ebx,%ebx
80106974: 66 89 8a 98 00 00 00 mov %cx,0x98(%edx)
8010697b: 8d 88 54 28 11 80 lea -0x7feed7ac(%eax),%ecx
80106981: 66 89 9a 9a 00 00 00 mov %bx,0x9a(%edx)
80106988: 31 db xor %ebx,%ebx
8010698a: c6 80 35 28 11 80 fa movb $0xfa,-0x7feed7cb(%eax)
80106991: c6 80 36 28 11 80 cf movb $0xcf,-0x7feed7ca(%eax)
80106998: 66 89 9a 88 00 00 00 mov %bx,0x88(%edx)
8010699f: 66 89 8a 8a 00 00 00 mov %cx,0x8a(%edx)
801069a6: 89 cb mov %ecx,%ebx
801069a8: c1 e9 18 shr $0x18,%ecx
801069ab: c6 80 3d 28 11 80 f2 movb $0xf2,-0x7feed7c3(%eax)
801069b2: c6 80 3e 28 11 80 cf movb $0xcf,-0x7feed7c2(%eax)
801069b9: 88 8a 8f 00 00 00 mov %cl,0x8f(%edx)
801069bf: c6 80 2d 28 11 80 92 movb $0x92,-0x7feed7d3(%eax)
801069c6: b9 37 00 00 00 mov $0x37,%ecx
801069cb: c6 80 2e 28 11 80 c0 movb $0xc0,-0x7feed7d2(%eax)
801069d2: 05 10 28 11 80 add $0x80112810,%eax
801069d7: 66 89 4d f2 mov %cx,-0xe(%ebp)
801069db: c1 eb 10 shr $0x10,%ebx
801069de: 66 89 45 f4 mov %ax,-0xc(%ebp)
801069e2: c1 e8 10 shr $0x10,%eax
801069e5: c6 42 7c 00 movb $0x0,0x7c(%edx)
801069e9: c6 42 7f 00 movb $0x0,0x7f(%edx)
801069ed: c6 82 84 00 00 00 00 movb $0x0,0x84(%edx)
801069f4: c6 82 87 00 00 00 00 movb $0x0,0x87(%edx)
801069fb: c6 82 94 00 00 00 00 movb $0x0,0x94(%edx)
80106a02: c6 82 97 00 00 00 00 movb $0x0,0x97(%edx)
80106a09: c6 82 9c 00 00 00 00 movb $0x0,0x9c(%edx)
80106a10: c6 82 9f 00 00 00 00 movb $0x0,0x9f(%edx)
80106a17: 88 9a 8c 00 00 00 mov %bl,0x8c(%edx)
80106a1d: 66 89 45 f6 mov %ax,-0xa(%ebp)
80106a21: 8d 45 f2 lea -0xe(%ebp),%eax
80106a24: 0f 01 10 lgdtl (%eax)
80106a27: b8 18 00 00 00 mov $0x18,%eax
80106a2c: 8e e8 mov %eax,%gs
80106a2e: 65 c7 05 04 00 00 00 movl $0x0,%gs:0x4
80106a35: 00 00 00 00
80106a39: 65 89 15 00 00 00 00 mov %edx,%gs:0x0
80106a40: 83 c4 14 add $0x14,%esp
80106a43: 5b pop %ebx
80106a44: 5d pop %ebp
80106a45: c3 ret
80106a46: 8d 76 00 lea 0x0(%esi),%esi
80106a49: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80106a50 <setupkvm>:
80106a50: 55 push %ebp
80106a51: 89 e5 mov %esp,%ebp
80106a53: 56 push %esi
80106a54: 53 push %ebx
80106a55: e8 36 ba ff ff call 80102490 <kalloc>
80106a5a: 85 c0 test %eax,%eax
80106a5c: 74 52 je 80106ab0 <setupkvm+0x60>
80106a5e: 83 ec 04 sub $0x4,%esp
80106a61: 89 c6 mov %eax,%esi
80106a63: bb 20 a4 10 80 mov $0x8010a420,%ebx
80106a68: 68 00 10 00 00 push $0x1000
80106a6d: 6a 00 push $0x0
80106a6f: 50 push %eax
80106a70: e8 8b da ff ff call 80104500 <memset>
80106a75: 83 c4 10 add $0x10,%esp
80106a78: 8b 43 04 mov 0x4(%ebx),%eax
80106a7b: 8b 4b 08 mov 0x8(%ebx),%ecx
80106a7e: 83 ec 08 sub $0x8,%esp
80106a81: 8b 13 mov (%ebx),%edx
80106a83: ff 73 0c pushl 0xc(%ebx)
80106a86: 50 push %eax
80106a87: 29 c1 sub %eax,%ecx
80106a89: 89 f0 mov %esi,%eax
80106a8b: e8 40 fd ff ff call 801067d0 <mappages>
80106a90: 83 c4 10 add $0x10,%esp
80106a93: 85 c0 test %eax,%eax
80106a95: 78 19 js 80106ab0 <setupkvm+0x60>
80106a97: 83 c3 10 add $0x10,%ebx
80106a9a: 81 fb 60 a4 10 80 cmp $0x8010a460,%ebx
80106aa0: 75 d6 jne 80106a78 <setupkvm+0x28>
80106aa2: 8d 65 f8 lea -0x8(%ebp),%esp
80106aa5: 89 f0 mov %esi,%eax
80106aa7: 5b pop %ebx
80106aa8: 5e pop %esi
80106aa9: 5d pop %ebp
80106aaa: c3 ret
80106aab: 90 nop
80106aac: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80106ab0: 8d 65 f8 lea -0x8(%ebp),%esp
80106ab3: 31 c0 xor %eax,%eax
80106ab5: 5b pop %ebx
80106ab6: 5e pop %esi
80106ab7: 5d pop %ebp
80106ab8: c3 ret
80106ab9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80106ac0 <kvmalloc>:
80106ac0: 55 push %ebp
80106ac1: 89 e5 mov %esp,%ebp
80106ac3: 83 ec 08 sub $0x8,%esp
80106ac6: e8 85 ff ff ff call 80106a50 <setupkvm>
80106acb: a3 24 56 11 80 mov %eax,0x80115624
80106ad0: 05 00 00 00 80 add $0x80000000,%eax
80106ad5: 0f 22 d8 mov %eax,%cr3
80106ad8: c9 leave
80106ad9: c3 ret
80106ada: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80106ae0 <switchkvm>:
80106ae0: a1 24 56 11 80 mov 0x80115624,%eax
80106ae5: 55 push %ebp
80106ae6: 89 e5 mov %esp,%ebp
80106ae8: 05 00 00 00 80 add $0x80000000,%eax
80106aed: 0f 22 d8 mov %eax,%cr3
80106af0: 5d pop %ebp
80106af1: c3 ret
80106af2: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80106af9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80106b00 <switchuvm>:
80106b00: 55 push %ebp
80106b01: 89 e5 mov %esp,%ebp
80106b03: 53 push %ebx
80106b04: 83 ec 04 sub $0x4,%esp
80106b07: 8b 5d 08 mov 0x8(%ebp),%ebx
80106b0a: 85 db test %ebx,%ebx
80106b0c: 0f 84 93 00 00 00 je 80106ba5 <switchuvm+0xa5>
80106b12: 8b 43 08 mov 0x8(%ebx),%eax
80106b15: 85 c0 test %eax,%eax
80106b17: 0f 84 a2 00 00 00 je 80106bbf <switchuvm+0xbf>
80106b1d: 8b 43 04 mov 0x4(%ebx),%eax
80106b20: 85 c0 test %eax,%eax
80106b22: 0f 84 8a 00 00 00 je 80106bb2 <switchuvm+0xb2>
80106b28: e8 03 d9 ff ff call 80104430 <pushcli>
80106b2d: 65 a1 00 00 00 00 mov %gs:0x0,%eax
80106b33: b9 67 00 00 00 mov $0x67,%ecx
80106b38: 8d 50 08 lea 0x8(%eax),%edx
80106b3b: 66 89 88 a0 00 00 00 mov %cx,0xa0(%eax)
80106b42: c6 80 a6 00 00 00 40 movb $0x40,0xa6(%eax)
80106b49: c6 80 a5 00 00 00 89 movb $0x89,0xa5(%eax)
80106b50: 66 89 90 a2 00 00 00 mov %dx,0xa2(%eax)
80106b57: 89 d1 mov %edx,%ecx
80106b59: c1 ea 18 shr $0x18,%edx
80106b5c: 88 90 a7 00 00 00 mov %dl,0xa7(%eax)
80106b62: c1 e9 10 shr $0x10,%ecx
80106b65: ba 10 00 00 00 mov $0x10,%edx
80106b6a: 66 89 50 10 mov %dx,0x10(%eax)
80106b6e: 88 88 a4 00 00 00 mov %cl,0xa4(%eax)
80106b74: 8b 4b 08 mov 0x8(%ebx),%ecx
80106b77: 8d 91 00 10 00 00 lea 0x1000(%ecx),%edx
80106b7d: b9 ff ff ff ff mov $0xffffffff,%ecx
80106b82: 66 89 48 6e mov %cx,0x6e(%eax)
80106b86: 89 50 0c mov %edx,0xc(%eax)
80106b89: b8 30 00 00 00 mov $0x30,%eax
80106b8e: 0f 00 d8 ltr %ax
80106b91: 8b 43 04 mov 0x4(%ebx),%eax
80106b94: 05 00 00 00 80 add $0x80000000,%eax
80106b99: 0f 22 d8 mov %eax,%cr3
80106b9c: 8b 5d fc mov -0x4(%ebp),%ebx
80106b9f: c9 leave
80106ba0: e9 bb d8 ff ff jmp 80104460 <popcli>
80106ba5: 83 ec 0c sub $0xc,%esp
80106ba8: 68 de 79 10 80 push $0x801079de
80106bad: e8 ae 97 ff ff call 80100360 <panic>
80106bb2: 83 ec 0c sub $0xc,%esp
80106bb5: 68 09 7a 10 80 push $0x80107a09
80106bba: e8 a1 97 ff ff call 80100360 <panic>
80106bbf: 83 ec 0c sub $0xc,%esp
80106bc2: 68 f4 79 10 80 push $0x801079f4
80106bc7: e8 94 97 ff ff call 80100360 <panic>
80106bcc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80106bd0 <inituvm>:
80106bd0: 55 push %ebp
80106bd1: 89 e5 mov %esp,%ebp
80106bd3: 57 push %edi
80106bd4: 56 push %esi
80106bd5: 53 push %ebx
80106bd6: 83 ec 1c sub $0x1c,%esp
80106bd9: 8b 75 10 mov 0x10(%ebp),%esi
80106bdc: 8b 45 08 mov 0x8(%ebp),%eax
80106bdf: 8b 7d 0c mov 0xc(%ebp),%edi
80106be2: 81 fe ff 0f 00 00 cmp $0xfff,%esi
80106be8: 89 45 e4 mov %eax,-0x1c(%ebp)
80106beb: 77 49 ja 80106c36 <inituvm+0x66>
80106bed: e8 9e b8 ff ff call 80102490 <kalloc>
80106bf2: 83 ec 04 sub $0x4,%esp
80106bf5: 89 c3 mov %eax,%ebx
80106bf7: 68 00 10 00 00 push $0x1000
80106bfc: 6a 00 push $0x0
80106bfe: 50 push %eax
80106bff: e8 fc d8 ff ff call 80104500 <memset>
80106c04: 58 pop %eax
80106c05: 8d 83 00 00 00 80 lea -0x80000000(%ebx),%eax
80106c0b: b9 00 10 00 00 mov $0x1000,%ecx
80106c10: 5a pop %edx
80106c11: 6a 06 push $0x6
80106c13: 50 push %eax
80106c14: 31 d2 xor %edx,%edx
80106c16: 8b 45 e4 mov -0x1c(%ebp),%eax
80106c19: e8 b2 fb ff ff call 801067d0 <mappages>
80106c1e: 89 75 10 mov %esi,0x10(%ebp)
80106c21: 89 7d 0c mov %edi,0xc(%ebp)
80106c24: 83 c4 10 add $0x10,%esp
80106c27: 89 5d 08 mov %ebx,0x8(%ebp)
80106c2a: 8d 65 f4 lea -0xc(%ebp),%esp
80106c2d: 5b pop %ebx
80106c2e: 5e pop %esi
80106c2f: 5f pop %edi
80106c30: 5d pop %ebp
80106c31: e9 6a d9 ff ff jmp 801045a0 <memmove>
80106c36: 83 ec 0c sub $0xc,%esp
80106c39: 68 1d 7a 10 80 push $0x80107a1d
80106c3e: e8 1d 97 ff ff call 80100360 <panic>
80106c43: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80106c49: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80106c50 <loaduvm>:
80106c50: 55 push %ebp
80106c51: 89 e5 mov %esp,%ebp
80106c53: 57 push %edi
80106c54: 56 push %esi
80106c55: 53 push %ebx
80106c56: 83 ec 0c sub $0xc,%esp
80106c59: f7 45 0c ff 0f 00 00 testl $0xfff,0xc(%ebp)
80106c60: 0f 85 91 00 00 00 jne 80106cf7 <loaduvm+0xa7>
80106c66: 8b 75 18 mov 0x18(%ebp),%esi
80106c69: 31 db xor %ebx,%ebx
80106c6b: 85 f6 test %esi,%esi
80106c6d: 75 1a jne 80106c89 <loaduvm+0x39>
80106c6f: eb 6f jmp 80106ce0 <loaduvm+0x90>
80106c71: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80106c78: 81 c3 00 10 00 00 add $0x1000,%ebx
80106c7e: 81 ee 00 10 00 00 sub $0x1000,%esi
80106c84: 39 5d 18 cmp %ebx,0x18(%ebp)
80106c87: 76 57 jbe 80106ce0 <loaduvm+0x90>
80106c89: 8b 55 0c mov 0xc(%ebp),%edx
80106c8c: 8b 45 08 mov 0x8(%ebp),%eax
80106c8f: 31 c9 xor %ecx,%ecx
80106c91: 01 da add %ebx,%edx
80106c93: e8 b8 fa ff ff call 80106750 <walkpgdir>
80106c98: 85 c0 test %eax,%eax
80106c9a: 74 4e je 80106cea <loaduvm+0x9a>
80106c9c: 8b 00 mov (%eax),%eax
80106c9e: 8b 4d 14 mov 0x14(%ebp),%ecx
80106ca1: bf 00 10 00 00 mov $0x1000,%edi
80106ca6: 25 00 f0 ff ff and $0xfffff000,%eax
80106cab: 81 fe ff 0f 00 00 cmp $0xfff,%esi
80106cb1: 0f 46 fe cmovbe %esi,%edi
80106cb4: 01 d9 add %ebx,%ecx
80106cb6: 05 00 00 00 80 add $0x80000000,%eax
80106cbb: 57 push %edi
80106cbc: 51 push %ecx
80106cbd: 50 push %eax
80106cbe: ff 75 10 pushl 0x10(%ebp)
80106cc1: e8 7a ac ff ff call 80101940 <readi>
80106cc6: 83 c4 10 add $0x10,%esp
80106cc9: 39 c7 cmp %eax,%edi
80106ccb: 74 ab je 80106c78 <loaduvm+0x28>
80106ccd: 8d 65 f4 lea -0xc(%ebp),%esp
80106cd0: b8 ff ff ff ff mov $0xffffffff,%eax
80106cd5: 5b pop %ebx
80106cd6: 5e pop %esi
80106cd7: 5f pop %edi
80106cd8: 5d pop %ebp
80106cd9: c3 ret
80106cda: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80106ce0: 8d 65 f4 lea -0xc(%ebp),%esp
80106ce3: 31 c0 xor %eax,%eax
80106ce5: 5b pop %ebx
80106ce6: 5e pop %esi
80106ce7: 5f pop %edi
80106ce8: 5d pop %ebp
80106ce9: c3 ret
80106cea: 83 ec 0c sub $0xc,%esp
80106ced: 68 37 7a 10 80 push $0x80107a37
80106cf2: e8 69 96 ff ff call 80100360 <panic>
80106cf7: 83 ec 0c sub $0xc,%esp
80106cfa: 68 d8 7a 10 80 push $0x80107ad8
80106cff: e8 5c 96 ff ff call 80100360 <panic>
80106d04: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80106d0a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
80106d10 <allocuvm>:
80106d10: 55 push %ebp
80106d11: 89 e5 mov %esp,%ebp
80106d13: 57 push %edi
80106d14: 56 push %esi
80106d15: 53 push %ebx
80106d16: 83 ec 0c sub $0xc,%esp
80106d19: 8b 7d 10 mov 0x10(%ebp),%edi
80106d1c: 85 ff test %edi,%edi
80106d1e: 0f 88 ca 00 00 00 js 80106dee <allocuvm+0xde>
80106d24: 3b 7d 0c cmp 0xc(%ebp),%edi
80106d27: 8b 45 0c mov 0xc(%ebp),%eax
80106d2a: 0f 82 82 00 00 00 jb 80106db2 <allocuvm+0xa2>
80106d30: 8d 98 ff 0f 00 00 lea 0xfff(%eax),%ebx
80106d36: 81 e3 00 f0 ff ff and $0xfffff000,%ebx
80106d3c: 39 df cmp %ebx,%edi
80106d3e: 77 43 ja 80106d83 <allocuvm+0x73>
80106d40: e9 bb 00 00 00 jmp 80106e00 <allocuvm+0xf0>
80106d45: 8d 76 00 lea 0x0(%esi),%esi
80106d48: 83 ec 04 sub $0x4,%esp
80106d4b: 68 00 10 00 00 push $0x1000
80106d50: 6a 00 push $0x0
80106d52: 50 push %eax
80106d53: e8 a8 d7 ff ff call 80104500 <memset>
80106d58: 58 pop %eax
80106d59: 8d 86 00 00 00 80 lea -0x80000000(%esi),%eax
80106d5f: b9 00 10 00 00 mov $0x1000,%ecx
80106d64: 5a pop %edx
80106d65: 6a 06 push $0x6
80106d67: 50 push %eax
80106d68: 89 da mov %ebx,%edx
80106d6a: 8b 45 08 mov 0x8(%ebp),%eax
80106d6d: e8 5e fa ff ff call 801067d0 <mappages>
80106d72: 83 c4 10 add $0x10,%esp
80106d75: 85 c0 test %eax,%eax
80106d77: 78 47 js 80106dc0 <allocuvm+0xb0>
80106d79: 81 c3 00 10 00 00 add $0x1000,%ebx
80106d7f: 39 df cmp %ebx,%edi
80106d81: 76 7d jbe 80106e00 <allocuvm+0xf0>
80106d83: e8 08 b7 ff ff call 80102490 <kalloc>
80106d88: 85 c0 test %eax,%eax
80106d8a: 89 c6 mov %eax,%esi
80106d8c: 75 ba jne 80106d48 <allocuvm+0x38>
80106d8e: 83 ec 0c sub $0xc,%esp
80106d91: 68 55 7a 10 80 push $0x80107a55
80106d96: e8 b5 98 ff ff call 80100650 <cprintf>
80106d9b: 83 c4 10 add $0x10,%esp
80106d9e: 3b 7d 0c cmp 0xc(%ebp),%edi
80106da1: 76 4b jbe 80106dee <allocuvm+0xde>
80106da3: 8b 4d 0c mov 0xc(%ebp),%ecx
80106da6: 8b 45 08 mov 0x8(%ebp),%eax
80106da9: 89 fa mov %edi,%edx
80106dab: e8 b0 fa ff ff call 80106860 <deallocuvm.part.0>
80106db0: 31 c0 xor %eax,%eax
80106db2: 8d 65 f4 lea -0xc(%ebp),%esp
80106db5: 5b pop %ebx
80106db6: 5e pop %esi
80106db7: 5f pop %edi
80106db8: 5d pop %ebp
80106db9: c3 ret
80106dba: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80106dc0: 83 ec 0c sub $0xc,%esp
80106dc3: 68 6d 7a 10 80 push $0x80107a6d
80106dc8: e8 83 98 ff ff call 80100650 <cprintf>
80106dcd: 83 c4 10 add $0x10,%esp
80106dd0: 3b 7d 0c cmp 0xc(%ebp),%edi
80106dd3: 76 0d jbe 80106de2 <allocuvm+0xd2>
80106dd5: 8b 4d 0c mov 0xc(%ebp),%ecx
80106dd8: 8b 45 08 mov 0x8(%ebp),%eax
80106ddb: 89 fa mov %edi,%edx
80106ddd: e8 7e fa ff ff call 80106860 <deallocuvm.part.0>
80106de2: 83 ec 0c sub $0xc,%esp
80106de5: 56 push %esi
80106de6: e8 f5 b4 ff ff call 801022e0 <kfree>
80106deb: 83 c4 10 add $0x10,%esp
80106dee: 8d 65 f4 lea -0xc(%ebp),%esp
80106df1: 31 c0 xor %eax,%eax
80106df3: 5b pop %ebx
80106df4: 5e pop %esi
80106df5: 5f pop %edi
80106df6: 5d pop %ebp
80106df7: c3 ret
80106df8: 90 nop
80106df9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80106e00: 8d 65 f4 lea -0xc(%ebp),%esp
80106e03: 89 f8 mov %edi,%eax
80106e05: 5b pop %ebx
80106e06: 5e pop %esi
80106e07: 5f pop %edi
80106e08: 5d pop %ebp
80106e09: c3 ret
80106e0a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80106e10 <deallocuvm>:
80106e10: 55 push %ebp
80106e11: 89 e5 mov %esp,%ebp
80106e13: 8b 55 0c mov 0xc(%ebp),%edx
80106e16: 8b 4d 10 mov 0x10(%ebp),%ecx
80106e19: 8b 45 08 mov 0x8(%ebp),%eax
80106e1c: 39 d1 cmp %edx,%ecx
80106e1e: 73 10 jae 80106e30 <deallocuvm+0x20>
80106e20: 5d pop %ebp
80106e21: e9 3a fa ff ff jmp 80106860 <deallocuvm.part.0>
80106e26: 8d 76 00 lea 0x0(%esi),%esi
80106e29: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80106e30: 89 d0 mov %edx,%eax
80106e32: 5d pop %ebp
80106e33: c3 ret
80106e34: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80106e3a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
80106e40 <freevm>:
80106e40: 55 push %ebp
80106e41: 89 e5 mov %esp,%ebp
80106e43: 57 push %edi
80106e44: 56 push %esi
80106e45: 53 push %ebx
80106e46: 83 ec 0c sub $0xc,%esp
80106e49: 8b 75 08 mov 0x8(%ebp),%esi
80106e4c: 85 f6 test %esi,%esi
80106e4e: 74 59 je 80106ea9 <freevm+0x69>
80106e50: 31 c9 xor %ecx,%ecx
80106e52: ba 00 00 00 80 mov $0x80000000,%edx
80106e57: 89 f0 mov %esi,%eax
80106e59: e8 02 fa ff ff call 80106860 <deallocuvm.part.0>
80106e5e: 89 f3 mov %esi,%ebx
80106e60: 8d be 00 10 00 00 lea 0x1000(%esi),%edi
80106e66: eb 0f jmp 80106e77 <freevm+0x37>
80106e68: 90 nop
80106e69: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80106e70: 83 c3 04 add $0x4,%ebx
80106e73: 39 fb cmp %edi,%ebx
80106e75: 74 23 je 80106e9a <freevm+0x5a>
80106e77: 8b 03 mov (%ebx),%eax
80106e79: a8 01 test $0x1,%al
80106e7b: 74 f3 je 80106e70 <freevm+0x30>
80106e7d: 25 00 f0 ff ff and $0xfffff000,%eax
80106e82: 83 ec 0c sub $0xc,%esp
80106e85: 83 c3 04 add $0x4,%ebx
80106e88: 05 00 00 00 80 add $0x80000000,%eax
80106e8d: 50 push %eax
80106e8e: e8 4d b4 ff ff call 801022e0 <kfree>
80106e93: 83 c4 10 add $0x10,%esp
80106e96: 39 fb cmp %edi,%ebx
80106e98: 75 dd jne 80106e77 <freevm+0x37>
80106e9a: 89 75 08 mov %esi,0x8(%ebp)
80106e9d: 8d 65 f4 lea -0xc(%ebp),%esp
80106ea0: 5b pop %ebx
80106ea1: 5e pop %esi
80106ea2: 5f pop %edi
80106ea3: 5d pop %ebp
80106ea4: e9 37 b4 ff ff jmp 801022e0 <kfree>
80106ea9: 83 ec 0c sub $0xc,%esp
80106eac: 68 89 7a 10 80 push $0x80107a89
80106eb1: e8 aa 94 ff ff call 80100360 <panic>
80106eb6: 8d 76 00 lea 0x0(%esi),%esi
80106eb9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80106ec0 <clearpteu>:
80106ec0: 55 push %ebp
80106ec1: 31 c9 xor %ecx,%ecx
80106ec3: 89 e5 mov %esp,%ebp
80106ec5: 83 ec 08 sub $0x8,%esp
80106ec8: 8b 55 0c mov 0xc(%ebp),%edx
80106ecb: 8b 45 08 mov 0x8(%ebp),%eax
80106ece: e8 7d f8 ff ff call 80106750 <walkpgdir>
80106ed3: 85 c0 test %eax,%eax
80106ed5: 74 05 je 80106edc <clearpteu+0x1c>
80106ed7: 83 20 fb andl $0xfffffffb,(%eax)
80106eda: c9 leave
80106edb: c3 ret
80106edc: 83 ec 0c sub $0xc,%esp
80106edf: 68 9a 7a 10 80 push $0x80107a9a
80106ee4: e8 77 94 ff ff call 80100360 <panic>
80106ee9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80106ef0 <copyuvm>:
80106ef0: 55 push %ebp
80106ef1: 89 e5 mov %esp,%ebp
80106ef3: 57 push %edi
80106ef4: 56 push %esi
80106ef5: 53 push %ebx
80106ef6: 83 ec 1c sub $0x1c,%esp
80106ef9: e8 52 fb ff ff call 80106a50 <setupkvm>
80106efe: 85 c0 test %eax,%eax
80106f00: 89 45 e0 mov %eax,-0x20(%ebp)
80106f03: 0f 84 b2 00 00 00 je 80106fbb <copyuvm+0xcb>
80106f09: 8b 4d 0c mov 0xc(%ebp),%ecx
80106f0c: 85 c9 test %ecx,%ecx
80106f0e: 0f 84 9c 00 00 00 je 80106fb0 <copyuvm+0xc0>
80106f14: 31 f6 xor %esi,%esi
80106f16: eb 4a jmp 80106f62 <copyuvm+0x72>
80106f18: 90 nop
80106f19: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80106f20: 83 ec 04 sub $0x4,%esp
80106f23: 81 c7 00 00 00 80 add $0x80000000,%edi
80106f29: 68 00 10 00 00 push $0x1000
80106f2e: 57 push %edi
80106f2f: 50 push %eax
80106f30: e8 6b d6 ff ff call 801045a0 <memmove>
80106f35: 58 pop %eax
80106f36: 5a pop %edx
80106f37: 8d 93 00 00 00 80 lea -0x80000000(%ebx),%edx
80106f3d: 8b 45 e0 mov -0x20(%ebp),%eax
80106f40: ff 75 e4 pushl -0x1c(%ebp)
80106f43: b9 00 10 00 00 mov $0x1000,%ecx
80106f48: 52 push %edx
80106f49: 89 f2 mov %esi,%edx
80106f4b: e8 80 f8 ff ff call 801067d0 <mappages>
80106f50: 83 c4 10 add $0x10,%esp
80106f53: 85 c0 test %eax,%eax
80106f55: 78 3e js 80106f95 <copyuvm+0xa5>
80106f57: 81 c6 00 10 00 00 add $0x1000,%esi
80106f5d: 39 75 0c cmp %esi,0xc(%ebp)
80106f60: 76 4e jbe 80106fb0 <copyuvm+0xc0>
80106f62: 8b 45 08 mov 0x8(%ebp),%eax
80106f65: 31 c9 xor %ecx,%ecx
80106f67: 89 f2 mov %esi,%edx
80106f69: e8 e2 f7 ff ff call 80106750 <walkpgdir>
80106f6e: 85 c0 test %eax,%eax
80106f70: 74 5a je 80106fcc <copyuvm+0xdc>
80106f72: 8b 18 mov (%eax),%ebx
80106f74: f6 c3 01 test $0x1,%bl
80106f77: 74 46 je 80106fbf <copyuvm+0xcf>
80106f79: 89 df mov %ebx,%edi
80106f7b: 81 e3 ff 0f 00 00 and $0xfff,%ebx
80106f81: 89 5d e4 mov %ebx,-0x1c(%ebp)
80106f84: 81 e7 00 f0 ff ff and $0xfffff000,%edi
80106f8a: e8 01 b5 ff ff call 80102490 <kalloc>
80106f8f: 85 c0 test %eax,%eax
80106f91: 89 c3 mov %eax,%ebx
80106f93: 75 8b jne 80106f20 <copyuvm+0x30>
80106f95: 83 ec 0c sub $0xc,%esp
80106f98: ff 75 e0 pushl -0x20(%ebp)
80106f9b: e8 a0 fe ff ff call 80106e40 <freevm>
80106fa0: 83 c4 10 add $0x10,%esp
80106fa3: 31 c0 xor %eax,%eax
80106fa5: 8d 65 f4 lea -0xc(%ebp),%esp
80106fa8: 5b pop %ebx
80106fa9: 5e pop %esi
80106faa: 5f pop %edi
80106fab: 5d pop %ebp
80106fac: c3 ret
80106fad: 8d 76 00 lea 0x0(%esi),%esi
80106fb0: 8b 45 e0 mov -0x20(%ebp),%eax
80106fb3: 8d 65 f4 lea -0xc(%ebp),%esp
80106fb6: 5b pop %ebx
80106fb7: 5e pop %esi
80106fb8: 5f pop %edi
80106fb9: 5d pop %ebp
80106fba: c3 ret
80106fbb: 31 c0 xor %eax,%eax
80106fbd: eb e6 jmp 80106fa5 <copyuvm+0xb5>
80106fbf: 83 ec 0c sub $0xc,%esp
80106fc2: 68 be 7a 10 80 push $0x80107abe
80106fc7: e8 94 93 ff ff call 80100360 <panic>
80106fcc: 83 ec 0c sub $0xc,%esp
80106fcf: 68 a4 7a 10 80 push $0x80107aa4
80106fd4: e8 87 93 ff ff call 80100360 <panic>
80106fd9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80106fe0 <uva2ka>:
80106fe0: 55 push %ebp
80106fe1: 31 c9 xor %ecx,%ecx
80106fe3: 89 e5 mov %esp,%ebp
80106fe5: 83 ec 08 sub $0x8,%esp
80106fe8: 8b 55 0c mov 0xc(%ebp),%edx
80106feb: 8b 45 08 mov 0x8(%ebp),%eax
80106fee: e8 5d f7 ff ff call 80106750 <walkpgdir>
80106ff3: 8b 00 mov (%eax),%eax
80106ff5: 89 c2 mov %eax,%edx
80106ff7: 83 e2 05 and $0x5,%edx
80106ffa: 83 fa 05 cmp $0x5,%edx
80106ffd: 75 11 jne 80107010 <uva2ka+0x30>
80106fff: 25 00 f0 ff ff and $0xfffff000,%eax
80107004: c9 leave
80107005: 05 00 00 00 80 add $0x80000000,%eax
8010700a: c3 ret
8010700b: 90 nop
8010700c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80107010: 31 c0 xor %eax,%eax
80107012: c9 leave
80107013: c3 ret
80107014: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
8010701a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
80107020 <copyout>:
80107020: 55 push %ebp
80107021: 89 e5 mov %esp,%ebp
80107023: 57 push %edi
80107024: 56 push %esi
80107025: 53 push %ebx
80107026: 83 ec 1c sub $0x1c,%esp
80107029: 8b 5d 14 mov 0x14(%ebp),%ebx
8010702c: 8b 55 0c mov 0xc(%ebp),%edx
8010702f: 8b 7d 10 mov 0x10(%ebp),%edi
80107032: 85 db test %ebx,%ebx
80107034: 75 40 jne 80107076 <copyout+0x56>
80107036: eb 70 jmp 801070a8 <copyout+0x88>
80107038: 90 nop
80107039: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80107040: 8b 55 e4 mov -0x1c(%ebp),%edx
80107043: 89 f1 mov %esi,%ecx
80107045: 29 d1 sub %edx,%ecx
80107047: 81 c1 00 10 00 00 add $0x1000,%ecx
8010704d: 39 d9 cmp %ebx,%ecx
8010704f: 0f 47 cb cmova %ebx,%ecx
80107052: 29 f2 sub %esi,%edx
80107054: 83 ec 04 sub $0x4,%esp
80107057: 01 d0 add %edx,%eax
80107059: 51 push %ecx
8010705a: 57 push %edi
8010705b: 50 push %eax
8010705c: 89 4d e4 mov %ecx,-0x1c(%ebp)
8010705f: e8 3c d5 ff ff call 801045a0 <memmove>
80107064: 8b 4d e4 mov -0x1c(%ebp),%ecx
80107067: 83 c4 10 add $0x10,%esp
8010706a: 8d 96 00 10 00 00 lea 0x1000(%esi),%edx
80107070: 01 cf add %ecx,%edi
80107072: 29 cb sub %ecx,%ebx
80107074: 74 32 je 801070a8 <copyout+0x88>
80107076: 89 d6 mov %edx,%esi
80107078: 83 ec 08 sub $0x8,%esp
8010707b: 89 55 e4 mov %edx,-0x1c(%ebp)
8010707e: 81 e6 00 f0 ff ff and $0xfffff000,%esi
80107084: 56 push %esi
80107085: ff 75 08 pushl 0x8(%ebp)
80107088: e8 53 ff ff ff call 80106fe0 <uva2ka>
8010708d: 83 c4 10 add $0x10,%esp
80107090: 85 c0 test %eax,%eax
80107092: 75 ac jne 80107040 <copyout+0x20>
80107094: 8d 65 f4 lea -0xc(%ebp),%esp
80107097: b8 ff ff ff ff mov $0xffffffff,%eax
8010709c: 5b pop %ebx
8010709d: 5e pop %esi
8010709e: 5f pop %edi
8010709f: 5d pop %ebp
801070a0: c3 ret
801070a1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801070a8: 8d 65 f4 lea -0xc(%ebp),%esp
801070ab: 31 c0 xor %eax,%eax
801070ad: 5b pop %ebx
801070ae: 5e pop %esi
801070af: 5f pop %edi
801070b0: 5d pop %ebp
801070b1: c3 ret
>>>>>>> 5be23f73dd4c6982e6625078437cc3b0c9668c6f
| 35.051214
| 105
| 0.534566
|
9820e3d8c04771193bd787fd7a799fa02dbc3c50
| 681
|
asm
|
Assembly
|
oeis/147/A147960.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/147/A147960.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/147/A147960.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A147960: a(n) = ((9 + sqrt(2))^n + (9 - sqrt(2))^n)/2.
; Submitted by Jamie Morken(s3)
; 1,9,83,783,7537,73809,733139,7365591,74662657,762046137,7818480563,80531005311,831898131121,8612216940609,89299952572403,927034007995143,9631915890692737,100138799400852969,1041577033850627219,10837421456643905391,112789000545390746737,1174045714742164915377,12222491822273099484563,127255241336284762407351,1325017490093550864051841,13797150756117419322752409,143672331892723029549447923,1496127064335738405392622303,15580172938518171962660815537,162249074810803761301877517729
mov $1,1
lpb $0
sub $0,1
mov $2,$3
mul $3,8
add $3,$1
mul $1,10
add $1,$2
lpe
sub $1,$3
mov $0,$1
| 42.5625
| 480
| 0.807636
|
fae3313ce10bdebad665c2cf3463ccbbd58d423a
| 3,589
|
asm
|
Assembly
|
_incObj/76 SYZ Boss Blocks.asm
|
kodishmediacenter/msu-md-sonic
|
3aa7c5e8add9660df2cd0eceaa214e7d59f2415c
|
[
"CC0-1.0"
] | 9
|
2021-01-15T13:47:53.000Z
|
2022-01-17T15:33:55.000Z
|
_incObj/76 SYZ Boss Blocks.asm
|
kodishmediacenter/msu-md-sonic
|
3aa7c5e8add9660df2cd0eceaa214e7d59f2415c
|
[
"CC0-1.0"
] | 7
|
2021-01-14T02:18:48.000Z
|
2021-03-24T15:44:30.000Z
|
_incObj/76 SYZ Boss Blocks.asm
|
kodishmediacenter/msu-md-sonic
|
3aa7c5e8add9660df2cd0eceaa214e7d59f2415c
|
[
"CC0-1.0"
] | 2
|
2021-01-14T13:14:26.000Z
|
2021-01-29T17:46:04.000Z
|
; ---------------------------------------------------------------------------
; Object 76 - blocks that Eggman picks up (SYZ)
; ---------------------------------------------------------------------------
BossBlock:
moveq #0,d0
move.b obRoutine(a0),d0
move.w Obj76_Index(pc,d0.w),d1
jmp Obj76_Index(pc,d1.w)
; ===========================================================================
Obj76_Index: dc.w Obj76_Main-Obj76_Index
dc.w Obj76_Action-Obj76_Index
dc.w loc_19762-Obj76_Index
; ===========================================================================
Obj76_Main: ; Routine 0
moveq #0,d4
move.w #$2C10,d5
moveq #9,d6
lea (a0),a1
bra.s Obj76_MakeBlock
; ===========================================================================
Obj76_Loop:
jsr (FindFreeObj).l
bne.s Obj76_ExitLoop
Obj76_MakeBlock:
move.b #id_BossBlock,(a1)
move.l #Map_BossBlock,obMap(a1)
move.w #$4000,obGfx(a1)
move.b #4,obRender(a1)
move.b #$10,obActWid(a1)
move.b #$10,obHeight(a1)
move.b #3,obPriority(a1)
move.w d5,obX(a1) ; set x-position
move.w #$582,obY(a1)
move.w d4,obSubtype(a1)
addi.w #$101,d4
addi.w #$20,d5 ; add $20 to next x-position
addq.b #2,obRoutine(a1)
dbf d6,Obj76_Loop ; repeat sequence 9 more times
Obj76_ExitLoop:
rts
; ===========================================================================
Obj76_Action: ; Routine 2
move.b $29(a0),d0
cmp.b obSubtype(a0),d0
beq.s Obj76_Solid
tst.b d0
bmi.s loc_19718
loc_19712:
bsr.w Obj76_Break
bra.s Obj76_Display
; ===========================================================================
loc_19718:
movea.l $34(a0),a1
tst.b obColProp(a1)
beq.s loc_19712
move.w obX(a1),obX(a0)
move.w obY(a1),obY(a0)
addi.w #$2C,obY(a0)
cmpa.w a0,a1
bcs.s Obj76_Display
move.w obVelY(a1),d0
ext.l d0
asr.l #8,d0
add.w d0,obY(a0)
bra.s Obj76_Display
; ===========================================================================
Obj76_Solid:
move.w #$1B,d1
move.w #$10,d2
move.w #$11,d3
move.w obX(a0),d4
jsr (SolidObject).l
Obj76_Display:
jmp (DisplaySprite).l
; ===========================================================================
loc_19762: ; Routine 4
tst.b obRender(a0)
bpl.s Obj76_Delete
jsr (ObjectFall).l
jmp (DisplaySprite).l
; ===========================================================================
Obj76_Delete:
jmp (DeleteObject).l
; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
Obj76_Break:
lea Obj76_FragSpeed(pc),a4
lea Obj76_FragPos(pc),a5
moveq #1,d4
moveq #3,d1
moveq #$38,d2
addq.b #2,obRoutine(a0)
move.b #8,obActWid(a0)
move.b #8,obHeight(a0)
lea (a0),a1
bra.s Obj76_MakeFrag
; ===========================================================================
Obj76_LoopFrag:
jsr (FindNextFreeObj).l
bne.s loc_197D4
Obj76_MakeFrag:
lea (a0),a2
lea (a1),a3
moveq #3,d3
loc_197AA:
move.l (a2)+,(a3)+
move.l (a2)+,(a3)+
move.l (a2)+,(a3)+
move.l (a2)+,(a3)+
dbf d3,loc_197AA
move.w (a4)+,obVelX(a1)
move.w (a4)+,obVelY(a1)
move.w (a5)+,d3
add.w d3,obX(a1)
move.w (a5)+,d3
add.w d3,obY(a1)
move.b d4,obFrame(a1)
addq.w #1,d4
dbf d1,Obj76_LoopFrag ; repeat sequence 3 more times
loc_197D4:
sfx sfx_WallSmash,1,0,0 ; play smashing sound
; End of function Obj76_Break
; ===========================================================================
Obj76_FragSpeed:dc.w -$180, -$200
dc.w $180, -$200
dc.w -$100, -$100
dc.w $100, -$100
Obj76_FragPos: dc.w -8, -8
dc.w $10, 0
dc.w 0, $10
dc.w $10, $10
| 23.611842
| 77
| 0.477292
|
a1067b9ded916c27b806612a75e7d833af3fd10c
| 1,142
|
asm
|
Assembly
|
libsrc/gfx/narrow/stencil_add_pixel.asm
|
ahjelm/z88dk
|
c4de367f39a76b41f6390ceeab77737e148178fa
|
[
"ClArtistic"
] | 640
|
2017-01-14T23:33:45.000Z
|
2022-03-30T11:28:42.000Z
|
libsrc/gfx/narrow/stencil_add_pixel.asm
|
C-Chads/z88dk
|
a4141a8e51205c6414b4ae3263b633c4265778e6
|
[
"ClArtistic"
] | 1,600
|
2017-01-15T16:12:02.000Z
|
2022-03-31T12:11:12.000Z
|
libsrc/gfx/narrow/stencil_add_pixel.asm
|
C-Chads/z88dk
|
a4141a8e51205c6414b4ae3263b633c4265778e6
|
[
"ClArtistic"
] | 215
|
2017-01-17T10:43:03.000Z
|
2022-03-23T17:25:02.000Z
|
;
; Z88 Graphics Functions - Small C+ stubs
;
; Written around the Interlogic Standard Library
;
; Compute the line coordinates and put into a vector
; Basic concept by Rafael de Oliveira Jannone (calculate_side)
;
; Internal function to update the area object's vectors
;
; Stefano Bodrato - 13/3/2009
;
;
; $Id: stencil_add_pixel.asm,v 1.6 2016-07-02 09:01:35 dom Exp $
;
; registers changed after return:
; ..bc..../ixiy same
; af..dehl/.... different
INCLUDE "graphics/grafix.inc"
SECTION code_graphics
PUBLIC stencil_add_pixel
PUBLIC _stencil_add_pixel
PUBLIC stencil_ptr
EXTERN __gfx_coords
.stencil_add_pixel
._stencil_add_pixel
ld (__gfx_coords),hl ; update plot coordinates
ld d,0
ld e,l
ld a,h ; current X coordinate
ld hl,(stencil_ptr) ; right side vector
add hl,de
cp (hl)
jr nc,lo_higher
ld (hl),a
.lo_higher
ld de,maxy
add hl,de
cp (hl)
ret c ; hi_lower
ld (hl),a
ret
SECTION bss_graphics
.stencil_ptr defw 0
| 21.54717
| 67
| 0.611208
|
d2547ec113b98668a702adce762d5cfdfed542d4
| 2,627
|
asm
|
Assembly
|
programs/oeis/017/A017235.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | 1
|
2021-03-15T11:38:20.000Z
|
2021-03-15T11:38:20.000Z
|
programs/oeis/017/A017235.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/017/A017235.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
; A017235: a(n) = (9*n + 6)^3.
; 216,3375,13824,35937,74088,132651,216000,328509,474552,658503,884736,1157625,1481544,1860867,2299968,2803221,3375000,4019679,4741632,5545233,6434856,7414875,8489664,9663597,10941048,12326391,13824000,15438249,17173512,19034163,21024576,23149125,25412184,27818127,30371328,33076161,35937000,38958219,42144192,45499293,49027896,52734375,56623104,60698457,64964808,69426531,74088000,78953589,84027672,89314623,94818816,100544625,106496424,112678587,119095488,125751501,132651000,139798359,147197952,154854153,162771336,170953875,179406144,188132517,197137368,206425071,216000000,225866529,236029032,246491883,257259456,268336125,279726264,291434247,303464448,315821241,328509000,341532099,354894912,368601813,382657176,397065375,411830784,426957777,442450728,458314011,474552000,491169069,508169592,525557943,543338496,561515625,580093704,599077107,618470208,638277381,658503000,679151439,700227072,721734273,743677416,766060875,788889024,812166237,835896888,860085351,884736000,909853209,935441352,961504803,988047936,1015075125,1042590744,1070599167,1099104768,1128111921,1157625000,1187648379,1218186432,1249243533,1280824056,1312932375,1345572864,1378749897,1412467848,1446731091,1481544000,1516910949,1552836312,1589324463,1626379776,1664006625,1702209384,1740992427,1780360128,1820316861,1860867000,1902014919,1943764992,1986121593,2029089096,2072671875,2116874304,2161700757,2207155608,2253243231,2299968000,2347334289,2395346472,2444008923,2493326016,2543302125,2593941624,2645248887,2697228288,2749884201,2803221000,2857243059,2911954752,2967360453,3023464536,3080271375,3137785344,3196010817,3254952168,3314613771,3375000000,3436115229,3497963832,3560550183,3623878656,3687953625,3752779464,3818360547,3884701248,3951805941,4019679000,4088324799,4157747712,4227952113,4298942376,4370722875,4443297984,4516672077,4590849528,4665834711,4741632000,4818245769,4895680392,4973940243,5053029696,5132953125,5213714904,5295319407,5377771008,5461074081,5545233000,5630252139,5716135872,5802888573,5890514616,5979018375,6068404224,6158676537,6249839688,6341898051,6434856000,6528717909,6623488152,6719171103,6815771136,6913292625,7011739944,7111117467,7211429568,7312680621,7414875000,7518017079,7622111232,7727161833,7833173256,7940149875,8048096064,8157016197,8266914648,8377795791,8489664000,8602523649,8716379112,8831234763,8947094976,9063964125,9181846584,9300746727,9420668928,9541617561,9663597000,9786611619,9910665792,10035763893,10161910296,10289109375,10417365504,10546683057,10677066408,10808519931,10941048000,11074654989,11209345272,11345123223
mul $0,9
add $0,6
pow $0,3
mov $1,$0
| 328.375
| 2,557
| 0.890369
|
8109f1ddc9dd410684174ba273e3a0140700b83d
| 1,131
|
asm
|
Assembly
|
General/Sprites/Tails/Anim - Tails Tail.asm
|
NatsumiFox/AMPS-Sonic-3-Knuckles
|
af951b39f0ca103a905d7492448ac5245a2e8104
|
[
"Apache-2.0"
] | 5
|
2021-07-09T08:17:56.000Z
|
2022-02-27T19:57:47.000Z
|
General/Sprites/Tails/Anim - Tails Tail.asm
|
NatsumiFox/AMPS-Sonic-3-Knuckles
|
af951b39f0ca103a905d7492448ac5245a2e8104
|
[
"Apache-2.0"
] | null | null | null |
General/Sprites/Tails/Anim - Tails Tail.asm
|
NatsumiFox/AMPS-Sonic-3-Knuckles
|
af951b39f0ca103a905d7492448ac5245a2e8104
|
[
"Apache-2.0"
] | null | null | null |
dc.w AniTails_Tail00-AniTails_Tail
dc.w AniTails_Tail01-AniTails_Tail
dc.w AniTails_Tail02-AniTails_Tail
dc.w AniTails_Tail03-AniTails_Tail
dc.w AniTails_Tail04-AniTails_Tail
dc.w AniTails_Tail05-AniTails_Tail
dc.w AniTails_Tail06-AniTails_Tail
dc.w AniTails_Tail07-AniTails_Tail
dc.w AniTails_Tail08-AniTails_Tail
dc.w AniTails_Tail09-AniTails_Tail
dc.w AniTails_Tail0A-AniTails_Tail
dc.w AniTails_Tail0B-AniTails_Tail
dc.w AniTails_Tail0C-AniTails_Tail
AniTails_Tail00:dc.b $20, 0, $FF
AniTails_Tail01:dc.b 7, $22, $23, $24, $25, $26, $FF
AniTails_Tail02:dc.b 3, $22, $23, $24, $25, $26, $FD, 1
AniTails_Tail03:dc.b $FC, 5, 6, 7, 8, $FF
AniTails_Tail04:dc.b 3, 9, $A, $B, $C, $FF
AniTails_Tail05:dc.b 3, $D, $E, $F, $10, $FF
AniTails_Tail06:dc.b 3, $11, $12, $13, $14, $FF
AniTails_Tail07:dc.b 2, 1, 2, 3, 4, $FF
AniTails_Tail08:dc.b 2, $1A, $1B, $1C, $1D, $FF
AniTails_Tail09:dc.b 9, $1E, $1F, $20, $21, $FF
AniTails_Tail0A:dc.b 9, $29, $2A, $2B, $2C, $FF
AniTails_Tail0B:dc.b 1, $27, $28, $FF
AniTails_Tail0C:dc.b 0, $27, $28, $FF
even
| 40.392857
| 60
| 0.672856
|
326ba280335f3b2f330b47042a4cdd633e0dfeb0
| 3,695
|
asm
|
Assembly
|
src/shaders/h264/ildb/AVC_ILDB_ForwardMsg.asm
|
me176c-dev/android_hardware_intel-vaapi-driver
|
0f2dca8d604220405e4678c0b6c4faa578d994ec
|
[
"MIT"
] | 192
|
2018-01-26T11:51:55.000Z
|
2022-03-25T20:04:19.000Z
|
src/shaders/h264/ildb/AVC_ILDB_ForwardMsg.asm
|
me176c-dev/android_hardware_intel-vaapi-driver
|
0f2dca8d604220405e4678c0b6c4faa578d994ec
|
[
"MIT"
] | 256
|
2017-01-23T02:10:27.000Z
|
2018-01-23T10:00:05.000Z
|
src/shaders/h264/ildb/AVC_ILDB_ForwardMsg.asm
|
me176c-dev/android_hardware_intel-vaapi-driver
|
0f2dca8d604220405e4678c0b6c4faa578d994ec
|
[
"MIT"
] | 64
|
2018-01-30T19:51:53.000Z
|
2021-11-24T01:26:14.000Z
|
/*
* Copyright © <2010>, Intel Corporation.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
* IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* This file was originally licensed under the following license
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
//========== Forward message to root thread through gateway ==========
// Each child thread write a byte into the root GRF r50 defiend in open Gataway.
#if defined(_DEBUG)
mov (1) EntrySignatureC:w 0x7777:w
#endif
// Init payload to r0
mov (8) GatewayPayload<1>:ud 0:w //{ NoDDClr }
// Forward a message:
// Offset = x relative to r50 (defiend in open gataway), x = ORIX >> 4 [bit 28:16]
// Need to shift left 16
// shift 2 more bits for byte to word offset
//shl (1) Offset_Length:ud GateWayOffsetC:w 16:w { NoDDClr, NoDDChk }
shl (1) Offset_Length:ud GateWayOffsetC:w 18:w
// 2 bytes offset
add (1) Offset_Length:ud Offset_Length:ud 0x00020000:d { NoDDClr }
// Length = 1 byte, [bit 10:8 = 000]
//000 xxxxxxxxxxxxx 00000 000 00000000 ==> 000x xxxx xxxx xxxx 0000 0000 0000 0000
//mov (1) DispatchID:ub r0.20:ub // Dispatch ID
//Move in EUid and Thread ID that we received from the PARENT thread
mov (1) EUID_TID:uw r0.6:uw { NoDDClr, NoDDChk }
mov (1) GatewayPayloadKey:uw 0x1212:uw { NoDDClr, NoDDChk } // Key
//mov (4) GatewayPayload<1>:ud 0:ud { NoDDClr, NoDDChk } // Init payload low 4 dword
// Write back one byte (value = 0xFF) to root thread GRF to indicate this child thread is finished
// All lower 4 bytes must be assigned to the same byte value.
mov (4) GatewayPayload<1>:ub 0xFFFF:uw { NoDDChk }
// msg descriptor bit 15 set to '1' for notification
#ifdef GW_DCN
// For ILK, EOT bit should also be set to terminate the thread. This is to fix a timing related HW issue.
//
send (8) null:ud m0 GatewayPayload<8;8,1>:ud MSG_GW_EOT FWDMSGDSC+NOTIFYMSG
#else
send (8) null:ud m0 GatewayPayload<8;8,1>:ud MSG_GW FWDMSGDSC+NOTIFYMSG
#endif // GW_DCN
//========== Forward Msg Done ========================================
| 41.988636
| 106
| 0.692287
|
777ab35de93afea9b5cc38b8fa0ad5f380ba07c4
| 532
|
asm
|
Assembly
|
programs/oeis/173/A173855.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/173/A173855.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/173/A173855.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A173855: a(n) = A173039(n+4) - A173039(n+1).
; 8,4,24,40,12,56,72,20,88,104,28,120,136,36,152,168,44,184,200,52,216,232,60,248,264,68,280,296,76,312,328,84,344,360,92,376,392,100,408,424,108,440,456,116,472,488,124,504,520,132,536,552,140,568,584,148,600,616,156,632,648,164,664,680,172,696,712,180,728,744,188,760,776,196,792,808,204,824,840,212,856,872,220,888,904,228,920,936,236,952,968,244,984,1000,252,1016,1032,260,1048,1064
mul $0,2
mov $1,$0
seq $1,122918 ; Expansion of (1+x)^2/(1+x+x^2)^2.
add $0,$1
mul $0,4
add $0,4
| 53.2
| 386
| 0.68797
|
5cf7aaaaea4e785827488c1d2e9e928bcde4e266
| 745
|
asm
|
Assembly
|
MicroProcessor Lab Programs/sine.asm
|
vallabhiaf/4thSemIse
|
55ed3c6fc29e4d2dd2c1fb71e31f5283ad47b9bf
|
[
"Apache-2.0"
] | null | null | null |
MicroProcessor Lab Programs/sine.asm
|
vallabhiaf/4thSemIse
|
55ed3c6fc29e4d2dd2c1fb71e31f5283ad47b9bf
|
[
"Apache-2.0"
] | null | null | null |
MicroProcessor Lab Programs/sine.asm
|
vallabhiaf/4thSemIse
|
55ed3c6fc29e4d2dd2c1fb71e31f5283ad47b9bf
|
[
"Apache-2.0"
] | null | null | null |
assume cs:code,ds:data
data segment
pa equ 20a0h
pb equ 20a1h
pc equ 20a2h
cr equ 20a3h
cw equ 80h
sine db 0d,11d,22d,33d,43d,54d,63d,72d,81d,90d,97d,104d,109d,115d,119d,125d,126d,127d,126d,122d,119d,115d,109d,104d,97d,90d,81d,72d,63d,54d,43d,33d,22d,11d,0d
data ends
code segment
delay proc
mov si,0fffh
l2: mov di,0ffffh
l1: dec di
jnz l1
dec si
jnz l2
ret
delay endp
start:
mov ax,data
mov ds,ax
mov dx,cr
mov al,cw
out dx,al
repeat: mov dx,pa
mov cx,35d
lea si, sine
positive: mov al,[si]
add al,128d
out dx,al
inc si
loop positive
mov cx,35d
lea si, sine
neg: mov al,128d
mov ah,[si]
sub al,ah
out dx,al
inc si
loop neg
jmp repeat
mov ah,4ch
int 21h
code ends
end start
| 13.070175
| 158
| 0.677852
|
4e8b2b2d005d2413bbbc1d863cee36fa85c06267
| 1,735
|
asm
|
Assembly
|
programs/oeis/061/A061761.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/061/A061761.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/061/A061761.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A061761: a(n) = 2^n + 2*n - 1.
; 0,3,7,13,23,41,75,141,271,529,1043,2069,4119,8217,16411,32797,65567,131105,262179,524325,1048615,2097193,4194347,8388653,16777263,33554481,67108915,134217781,268435511,536870969,1073741883,2147483709,4294967359,8589934657,17179869251,34359738437,68719476807,137438953545,274877907019,549755813965,1099511627855,2199023255633,4398046511187,8796093022293,17592186044503,35184372088921,70368744177755,140737488355421,281474976710751,562949953421409,1125899906842723,2251799813685349,4503599627370599,9007199254741097,18014398509482091,36028797018964077,72057594037928047,144115188075855985,288230376151711859,576460752303423605,1152921504606847095,2305843009213694073,4611686018427388027,9223372036854775933,18446744073709551743,36893488147419103361,73786976294838206595,147573952589676413061,295147905179352825991,590295810358705651849,1180591620717411303563,2361183241434822606989,4722366482869645213839,9444732965739290427537,18889465931478580854931,37778931862957161709717,75557863725914323419287,151115727451828646838425,302231454903657293676699,604462909807314587353245,1208925819614629174706335,2417851639229258349412513,4835703278458516698824867,9671406556917033397649573,19342813113834066795298983,38685626227668133590597801,77371252455336267181195435,154742504910672534362390701,309485009821345068724781231,618970019642690137449562289,1237940039285380274899124403,2475880078570760549798248629,4951760157141521099596497079,9903520314283042199192993977,19807040628566084398385987771,39614081257132168796771975357,79228162514264337593543950527,158456325028528675187087900865,316912650057057350374175801539,633825300114114700748351602885
mov $1,2
pow $1,$0
add $1,$0
add $1,$0
sub $1,1
mov $0,$1
| 173.5
| 1,642
| 0.913545
|
3cd224bbba2338983985f4b848a1d068165a0487
| 4,362
|
asm
|
Assembly
|
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_21829_542.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_21829_542.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_21829_542.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 3
|
2020-07-14T17:07:07.000Z
|
2022-03-21T01:12:22.000Z
|
.global s_prepare_buffers
s_prepare_buffers:
push %r9
push %rax
push %rcx
push %rdi
push %rsi
lea addresses_WC_ht+0x14938, %rsi
lea addresses_UC_ht+0x12c38, %rdi
nop
nop
nop
nop
inc %rax
mov $92, %rcx
rep movsw
cmp %rsi, %rsi
lea addresses_WT_ht+0x18d38, %rsi
lea addresses_normal_ht+0x1bb38, %rdi
cmp $23774, %rax
mov $18, %rcx
rep movsb
nop
nop
nop
nop
xor $30731, %r9
pop %rsi
pop %rdi
pop %rcx
pop %rax
pop %r9
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r8
push %rax
push %rbx
push %rdi
push %rsi
// Faulty Load
lea addresses_D+0x18f38, %rsi
nop
nop
nop
xor $39836, %r11
mov (%rsi), %r8w
lea oracles, %rdi
and $0xff, %r8
shlq $12, %r8
mov (%rdi,%r8,1), %r8
pop %rsi
pop %rdi
pop %rbx
pop %rax
pop %r8
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_D', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'type': 'addresses_D', 'AVXalign': False, 'size': 2, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_WC_ht', 'congruent': 9, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 3, 'same': False}}
{'src': {'type': 'addresses_WT_ht', 'congruent': 9, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 10, 'same': False}}
{'36': 21829}
36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36
*/
| 58.16
| 2,999
| 0.664374
|
d12993f5e573bf6b2504a67796527e4c8976a3db
| 1,326
|
asm
|
Assembly
|
programs/oeis/138/A138425.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/138/A138425.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/138/A138425.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A138425: a(n) = (prime(n)^5 - prime(n))/3.
; 10,80,1040,5600,53680,123760,473280,825360,2145440,6837040,9543040,23114640,38618720,49002800,76448320,139398480,238308080,281532080,450041680,601409760,691023840,1025685440,1313013520,1861353120,2862446720,3503366800,3864246880,4675172400,5128746480,6141450560,11012789760,12859829840,16087241440,17296281520,24479925200,26167575200,31796330800,38354538960,43297328480,51654630640,61255332240,64754748240,84731633920,89261728000,98903093520,104026533600,139409067280,183824359040,200912996560,209921130640,228906618720,259937088320,270996672320,332083542000,373718297600,419428065760,469504917360,487220103360,543597674960,583996635040,605077387120,719808294800,909014106000,969796674080,1001383504160,1067026133680,1324398603440,1448866095040,1676973188720,1725861258800,1827057738880,1987700688480,2219264502080,2406705244240,2606602425840,2747088273920,2969113173520,3287238987120,3456213867200,3815006526880,4304759172560,4408483548560,4957527090240,5073623392320,5435022501920,5687185270000,6082896825600,6644460831200,6940381959280,7092244519360,7403944388880,8405359872640,9131109510240,9512314614320,10312915834000,10732939234080,11388529653680,12795797595360,13043291179440,15447744252720
seq $0,40 ; The prime numbers.
sub $1,$0
pow $0,5
add $1,$0
div $1,3
mov $0,$1
| 132.6
| 1,200
| 0.880845
|
dd40a142e5ded06af97053b7875e3ff3bbd42190
| 3,160
|
asm
|
Assembly
|
sprites.asm
|
NotExactlySiev/psychofloat
|
4e6ee147e688d43c182f683f760e7a4a03620517
|
[
"CC0-1.0"
] | 1
|
2021-07-06T17:41:36.000Z
|
2021-07-06T17:41:36.000Z
|
sprites.asm
|
NotExactlySiev/psychofloat
|
4e6ee147e688d43c182f683f760e7a4a03620517
|
[
"CC0-1.0"
] | null | null | null |
sprites.asm
|
NotExactlySiev/psychofloat
|
4e6ee147e688d43c182f683f760e7a4a03620517
|
[
"CC0-1.0"
] | null | null | null |
UpdatePlayer: subroutine
lda py0
sec
sbc #5
sta $200
lda px0
sec
sbc #4
sta $203
lda #1
bit flags
beq .nrotate
lda flags
asl
asl
and #$40
sta $202
.nrotate
rts
; handles scrolling the sprites on the screen. hero sprite handled seperately
UpdateSprites: subroutine
; clear oam objects before drawing
ldx #$10
jsr ClearDMA
lda scroll
lsr
sta tmp0
ldx #0 ; object list
ldy #0 ; oam
.next
lda objlist,x
bne .draw
rts
.draw
clc ; Set Y pos
asl
asl
sec
sbc tmp0
cmp #120
bcc .onscreen
lda #$ff
sta $210,y
iny
iny
iny
iny
cpy #252
bne .next
.onscreen
asl
sta func0 ; if is on screen, load the data for the object
inx
lda objlist,x
sta func1
inx
lda objlist,x
clc
asl
asl
asl
sta func2
inx
txa
pha
lda func1
and #$1c
cmp #$10
bne .nBouncy
; Bouncy
jsr DrawBouncy
jmp .spritedone
.nBouncy
cmp #$14
bne .nBig
; Big
jsr DrawBig
jmp .spritedone
.nBig
cmp #$18
bne .nHook
; Hook
jsr DrawHook
jmp .spritedone
.nHook
; Pickup
.spritedone
pla
tax
jmp .next
BouncyFlip:
.byte $00, $40
.byte $80, $c0
.byte $00, $80
.byte $40, $c0
DrawBouncy: subroutine
lda func0
sta $210,y
sta $214,y
sta $218,y
iny
lda func1
and #$2
sta func4
clc
adc #$40
sta $210,y
sta $218,y
adc #1
sta $214,y
iny
lda func1
asl
and #$6
tax
lda BouncyFlip,x
sta $210,y
sta $214,y
inx
lda BouncyFlip,x
sta $218,y
iny
lda func2
sta $210,y
sta $214,y
sta $218,y
lda func4
beq .ver
dey
dey
dey
.ver
lda $210,y
clc
adc #$8
sta $214,y
adc #$8
sta $218,y
lda func4
beq .ver2
iny
iny
iny
.ver2 iny
rts
DrawHook: subroutine
lda func0
sta $210,y
iny
lda #$30
bit flags
bpl .nhooked
cpy hookidx
bne .nhooked ; set the sprite accordingly if it's close and/or hooked
lda #$33
.nhooked
sta $210,y
iny
lda func1 ; set the pallete
and #$3
sta $210,y
iny
lda func2
sta $210,y
iny
rts
DrawBig: subroutine ; draws one of four meta sprite objects
lda objlist,x
and #$f
clc
adc #4
asl
asl
sta $210,y
iny
lda #1
sta $210,y
rts
| 15.119617
| 77
| 0.425633
|
a1a6dfd942608d891481b862e205f6dbf0e724ef
| 722
|
asm
|
Assembly
|
oeis/026/A026738.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/026/A026738.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/026/A026738.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A026738: Expansion of 1/((1-2*x)*(1-6*x)*(1-8*x)*(1-12*x)).
; Submitted by Jon Maiga
; 1,28,516,7952,111440,1477056,18912832,236879104,2924469504,35764112384,434623874048,5259666886656,63472710995968,764545789837312,9197653087371264,110557371200503808,1328176959287263232,15950056940486000640,191496303058077614080,2298721508914505973760,27590790568952328093696,331138579428679947911168,3974055891386731222532096,47691815387176684027379712,572326949277979490658549760,6868124751036060191420317696,82419108145907764994519334912,989042188353929075130172964864
mov $2,$0
add $2,8
mov $3,$0
seq $0,21354 ; Expansion of 1/((1-x)(1-3x)(1-4x)(1-6x)).
add $3,$2
mov $4,$3
lpb $3
mul $0,2
sub $4,2
mov $3,$4
lpe
div $0,16
| 42.470588
| 472
| 0.801939
|
aeef9d8bcb3f5d7902bed957b2d97b4fad4508c0
| 8,168
|
asm
|
Assembly
|
Transynther/x86/_processed/US/_zr_/i7-7700_9_0xca.log_9648_468.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/US/_zr_/i7-7700_9_0xca.log_9648_468.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/US/_zr_/i7-7700_9_0xca.log_9648_468.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 3
|
2020-07-14T17:07:07.000Z
|
2022-03-21T01:12:22.000Z
|
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r11
push %r9
push %rax
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_UC_ht+0xa283, %r9
nop
nop
nop
nop
add %r11, %r11
vmovups (%r9), %ymm4
vextracti128 $0, %ymm4, %xmm4
vpextrq $1, %xmm4, %rbp
nop
nop
nop
nop
inc %rax
lea addresses_WC_ht+0xcb83, %rsi
lea addresses_WC_ht+0x1e303, %rdi
cmp $49592, %r10
mov $77, %rcx
rep movsl
nop
nop
nop
nop
dec %rax
lea addresses_UC_ht+0x172e1, %r11
nop
nop
nop
sub %rsi, %rsi
movb (%r11), %al
nop
nop
nop
xor $1136, %r9
lea addresses_D_ht+0x9703, %r9
nop
nop
nop
inc %rbp
mov $0x6162636465666768, %rsi
movq %rsi, %xmm1
and $0xffffffffffffffc0, %r9
movntdq %xmm1, (%r9)
nop
nop
xor $61117, %rbp
lea addresses_normal_ht+0xe183, %rsi
nop
nop
xor $25059, %rbp
mov (%rsi), %r9
dec %r10
lea addresses_UC_ht+0x5e03, %rax
dec %rbp
mov (%rax), %di
nop
nop
nop
nop
dec %rcx
lea addresses_D_ht+0x16853, %rsi
lea addresses_WC_ht+0x1e603, %rdi
nop
nop
nop
add $62769, %rax
mov $26, %rcx
rep movsq
nop
nop
cmp %r10, %r10
lea addresses_UC_ht+0x473, %rsi
clflush (%rsi)
nop
nop
nop
nop
nop
xor %r9, %r9
movb (%rsi), %r11b
nop
nop
nop
nop
nop
cmp %rsi, %rsi
lea addresses_normal_ht+0x1dc63, %r11
nop
xor $21542, %rax
movl $0x61626364, (%r11)
nop
nop
nop
nop
nop
cmp $54062, %rsi
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r9
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r12
push %r8
push %rax
push %rbp
push %rdi
push %rdx
// Store
mov $0x502ccf00000001da, %rdx
nop
nop
xor $28775, %r11
mov $0x5152535455565758, %rax
movq %rax, (%rdx)
nop
inc %r12
// Load
lea addresses_D+0x18243, %r8
nop
nop
nop
and %rdx, %rdx
vmovups (%r8), %ymm3
vextracti128 $0, %ymm3, %xmm3
vpextrq $1, %xmm3, %r11
nop
nop
xor %rbp, %rbp
// Load
mov $0x7d319a0000000963, %rdx
nop
xor $53948, %rdi
movb (%rdx), %r12b
nop
nop
nop
and %r12, %r12
// Store
lea addresses_US+0xf3f, %rdx
nop
dec %rdi
movb $0x51, (%rdx)
nop
nop
nop
cmp %rax, %rax
// Store
lea addresses_D+0x14103, %rdi
nop
cmp %rax, %rax
mov $0x5152535455565758, %r8
movq %r8, (%rdi)
dec %rdi
// Store
lea addresses_WT+0xe7a3, %rdx
nop
nop
nop
nop
inc %r12
mov $0x5152535455565758, %rax
movq %rax, (%rdx)
nop
nop
nop
nop
and $28935, %r11
// Store
lea addresses_RW+0x1c1e9, %r12
nop
nop
nop
cmp %r8, %r8
mov $0x5152535455565758, %rdx
movq %rdx, %xmm2
movntdq %xmm2, (%r12)
nop
nop
dec %r12
// Load
lea addresses_PSE+0x2e2b, %r12
nop
add %r11, %r11
mov (%r12), %rdx
nop
nop
cmp $13711, %r12
// Faulty Load
lea addresses_US+0x1703, %rbp
nop
nop
nop
nop
and $21408, %rdx
movb (%rbp), %r11b
lea oracles, %rdx
and $0xff, %r11
shlq $12, %r11
mov (%rdx,%r11,1), %r11
pop %rdx
pop %rdi
pop %rbp
pop %rax
pop %r8
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_US'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_NC'}}
{'src': {'congruent': 5, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_D'}, 'OP': 'LOAD'}
{'src': {'congruent': 5, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_NC'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 1, 'AVXalign': True, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_US'}}
{'OP': 'STOR', 'dst': {'congruent': 8, 'AVXalign': True, 'same': False, 'size': 8, 'NT': True, 'type': 'addresses_D'}}
{'OP': 'STOR', 'dst': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_WT'}}
{'OP': 'STOR', 'dst': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 16, 'NT': True, 'type': 'addresses_RW'}}
{'src': {'congruent': 1, 'AVXalign': False, 'same': False, 'size': 8, 'NT': True, 'type': 'addresses_PSE'}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 1, 'NT': False, 'type': 'addresses_US'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'congruent': 6, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 4, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 10, 'same': True, 'type': 'addresses_WC_ht'}}
{'src': {'congruent': 1, 'AVXalign': True, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 11, 'AVXalign': False, 'same': False, 'size': 16, 'NT': True, 'type': 'addresses_D_ht'}}
{'src': {'congruent': 7, 'AVXalign': True, 'same': True, 'size': 8, 'NT': False, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 8, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 3, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'congruent': 8, 'same': True, 'type': 'addresses_WC_ht'}}
{'src': {'congruent': 1, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 5, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_normal_ht'}}
{'00': 9648}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
| 31.057034
| 2,999
| 0.651322
|
63252a8776081aca38f34224897caab4ef4d00c7
| 420
|
asm
|
Assembly
|
oeis/180/A180060.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/180/A180060.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/180/A180060.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A180060: 2^(2^n mod n) mod n.
; Submitted by Christian Krause
; 0,1,1,1,4,4,4,1,4,6,4,4,4,2,1,1,4,16,4,16,4,16,4,16,3,16,13,16,4,16,4,1,25,16,29,16,4,16,22,16,4,16,4,20,32,16,4,16,22,16,1,16,4,52,8,32,28,16,4,16,4,16,4,1,61,16,4,52,49,46,4,16,4,16,31,24,36,16,4,16,40,16,4,16,1,16,82,56,4,16,2,32,70,16,22,64,4,92,95,36
mov $1,$0
add $1,1
mov $2,2
pow $2,$1
mov $0,$2
mod $0,$1
mov $2,2
pow $2,$0
mod $2,$1
mov $0,$2
| 28
| 257
| 0.595238
|
543ec7a3c377c16539a4aa3ebd6230395194dcf4
| 317
|
asm
|
Assembly
|
Working Disassembly/General/Ending/Map - Sonic and Knuckles Pose Banner.asm
|
TeamASM-Blur/Sonic-3-Blue-Balls-Edition
|
7e8a2c5df02271615ff4cae529521e6b1560d6b1
|
[
"Apache-2.0"
] | 5
|
2021-07-09T08:17:56.000Z
|
2022-02-27T19:57:47.000Z
|
Working Disassembly/General/Ending/Map - Sonic and Knuckles Pose Banner.asm
|
TeamASM-Blur/Sonic-3-Blue-Balls-Edition
|
7e8a2c5df02271615ff4cae529521e6b1560d6b1
|
[
"Apache-2.0"
] | null | null | null |
Working Disassembly/General/Ending/Map - Sonic and Knuckles Pose Banner.asm
|
TeamASM-Blur/Sonic-3-Blue-Balls-Edition
|
7e8a2c5df02271615ff4cae529521e6b1560d6b1
|
[
"Apache-2.0"
] | null | null | null |
Map_60644: dc.w word_60646-Map_60644
word_60646: dc.w 7
dc.b $EC, $D, 0, 0, $FF, $C8
dc.b $EC, $D, 0, 8, $FF, $E8
dc.b $EC, $D, 0, $10, 0, 8
dc.b $FC, $E, 0, $18, $FF, $C0
dc.b $FC, $E, 0, $24, $FF, $E0
dc.b $FC, $E, 0, $30, 0, 0
dc.b $FC, $E, 0, $3C, 0, $20
| 31.7
| 37
| 0.40694
|
9fa13a329d199197b03bb4a4ce948a802609ff54
| 3,036
|
asm
|
Assembly
|
dino/lcs/base/675A.asm
|
zengfr/arcade_game_romhacking_sourcecode_top_secret_data
|
a4a0c86c200241494b3f1834cd0aef8dc02f7683
|
[
"Apache-2.0"
] | 6
|
2020-10-14T15:29:10.000Z
|
2022-02-12T18:58:54.000Z
|
dino/lcs/base/6744.asm
|
zengfr/arcade_game_romhacking_sourcecode_top_secret_data
|
a4a0c86c200241494b3f1834cd0aef8dc02f7683
|
[
"Apache-2.0"
] | null | null | null |
dino/lcs/base/6744.asm
|
zengfr/arcade_game_romhacking_sourcecode_top_secret_data
|
a4a0c86c200241494b3f1834cd0aef8dc02f7683
|
[
"Apache-2.0"
] | 1
|
2020-12-17T08:59:10.000Z
|
2020-12-17T08:59:10.000Z
|
copyright zengfr site:http://github.com/zengfr/romhack
00042A move.l D1, (A0)+
00042C dbra D0, $42a
004A10 move.w D1, -(A0)
004A12 dbra D0, $4a10
004BDE move.w A6, -(A4) [base+6722]
004BE0 move.w A4, ($6722,A5) [base+6744, base+6746, base+6748, base+674A, base+674C, base+674E, base+6750, base+6752, base+6754, base+6756, base+6758, base+675A, base+675C]
010DDC movea.w (A0)+, A2
010DDE cmpi.b #$4, ($2e,A2) [base+6744, base+6746, base+6748, base+674A, base+674C, base+674E, base+6750, base+6752, base+6754, base+6756, base+6758, base+675A, base+675C]
010FA6 movea.w (A0)+, A2
010FA8 cmpi.b #$4, ($2e,A2) [base+6744, base+6746, base+6748, base+674A, base+674C, base+674E, base+6750, base+6752, base+6754, base+6756, base+6758, base+675A, base+675C]
01133A movea.w (A0)+, A2
01133C cmpi.b #$4, ($2e,A2) [base+6744, base+6746, base+6748, base+674A, base+674C, base+674E, base+6750, base+6752, base+6754, base+6756, base+6758, base+675A, base+675C]
011982 movea.w (A1)+, A3 [base+6722]
011984 btst #$0, ($0,A3) [base+6744, base+6746, base+6748, base+674A, base+674C, base+674E, base+6750, base+6752, base+6754, base+6756, base+6758, base+675A, base+675C]
0120E2 movea.w (A0)+, A2
0120E4 cmpi.b #$4, ($2e,A2) [base+6744, base+6746, base+6748, base+674A, base+674C, base+674E, base+6750, base+6752, base+6754, base+6756, base+6758, base+675A, base+675C]
0AAACA move.l (A0), D2
0AAACC move.w D0, (A0) [123p+11A, 123p+11C, 123p+11E, 123p+120, 123p+122, 123p+124, 123p+126, 123p+128, 123p+12A, base+6FFE, enemy+BC, enemy+C0, enemy+C2, enemy+C4, enemy+CC, enemy+CE, enemy+D0, enemy+D2, enemy+D4, enemy+D6, enemy+D8, enemy+DA, item+86, item+88, item+8A, item+98, item+9A, item+9C, item+9E, item+A0, item+A2, item+A4, item+A6, scr1]
0AAACE move.w D0, ($2,A0)
0AAAD2 cmp.l (A0), D0
0AAAD4 bne $aaafc
0AAAD8 move.l D2, (A0)+
0AAADA cmpa.l A0, A1 [123p+11A, 123p+11C, 123p+11E, 123p+120, 123p+122, 123p+124, 123p+126, 123p+128, 123p+12A, base+6FFE, enemy+BC, enemy+C0, enemy+C2, enemy+C4, enemy+CC, enemy+CE, enemy+D0, enemy+D2, enemy+D4, enemy+D6, enemy+D8, enemy+DA, item+86, item+88, item+8A, item+98, item+9A, item+9C, item+9E, item+A0, item+A2, item+A4, item+A6, scr1]
0AAAE6 move.l (A0), D2
0AAAE8 move.w D0, (A0) [123p+11A, 123p+11C, 123p+11E, 123p+120, 123p+122, 123p+124, 123p+126, 123p+128, 123p+12A, base+6FFE, enemy+BC, enemy+C0, enemy+C2, enemy+C4, enemy+CC, enemy+CE, enemy+D0, enemy+D2, enemy+D4, enemy+D6, enemy+D8, enemy+DA, item+86, item+88, item+8A, item+98, item+9A, item+9C, item+9E, item+A0, item+A2, item+A4, item+A6, scr1]
0AAAF4 move.l D2, (A0)+
0AAAF6 cmpa.l A0, A1 [123p+11A, 123p+11C, 123p+11E, 123p+120, 123p+122, 123p+124, 123p+126, 123p+128, 123p+12A, base+6FFE, enemy+BC, enemy+C0, enemy+C2, enemy+C4, enemy+CC, enemy+CE, enemy+D0, enemy+D2, enemy+D4, enemy+D6, enemy+D8, enemy+DA, item+86, item+88, item+8A, item+98, item+9A, item+9C, item+9E, item+A0, item+A2, item+A4, item+A6, scr1]
copyright zengfr site:http://github.com/zengfr/romhack
| 94.875
| 351
| 0.674242
|
6dc9245dfca8d93e6d8dc0d29e20d581dd13cb45
| 245
|
asm
|
Assembly
|
libsrc/_DEVELOPMENT/adt/w_vector/c/sdcc_iy/w_vector_append_callee.asm
|
meesokim/z88dk
|
5763c7778f19a71d936b3200374059d267066bb2
|
[
"ClArtistic"
] | null | null | null |
libsrc/_DEVELOPMENT/adt/w_vector/c/sdcc_iy/w_vector_append_callee.asm
|
meesokim/z88dk
|
5763c7778f19a71d936b3200374059d267066bb2
|
[
"ClArtistic"
] | null | null | null |
libsrc/_DEVELOPMENT/adt/w_vector/c/sdcc_iy/w_vector_append_callee.asm
|
meesokim/z88dk
|
5763c7778f19a71d936b3200374059d267066bb2
|
[
"ClArtistic"
] | null | null | null |
; size_t w_vector_append_callee(b_vector_t *v, void *item)
SECTION code_adt_w_vector
PUBLIC _w_vector_append_callee
_w_vector_append_callee:
pop af
pop hl
pop bc
push af
INCLUDE "adt/w_vector/z80/asm_w_vector_append.asm"
| 15.3125
| 58
| 0.763265
|
969896c1dbe826beb60042f9c257bffa76810c73
| 364
|
asm
|
Assembly
|
oeis/040/A040073.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/040/A040073.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/040/A040073.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A040073: Continued fraction for sqrt(83).
; Submitted by Christian Krause
; 9,9,18,9,18,9,18,9,18,9,18,9,18,9,18,9,18,9,18,9,18,9,18,9,18,9,18,9,18,9,18,9,18,9,18,9,18,9,18,9,18,9,18,9,18,9,18,9,18,9,18,9,18,9,18,9,18,9,18,9,18,9,18,9,18,9,18,9,18,9,18,9,18,9,18,9,18,9,18,9,18,9,18,9,18,9,18,9,18,9,18,9,18,9,18,9,18,9,18,9
trn $0,1
mod $0,2
mul $0,9
add $0,9
| 40.444444
| 250
| 0.626374
|
1b33e146f32c07cf2574d1661b3269a26ce2f453
| 4,126
|
asm
|
Assembly
|
source/tools/ToolUnitTests/sse-ref_ia32.asm
|
ganboing/pintool
|
ece4788ffded47124b1c9b203707cc255dbaf20f
|
[
"Intel"
] | 1
|
2017-06-06T16:02:31.000Z
|
2017-06-06T16:02:31.000Z
|
source/tools/ToolUnitTests/sse-ref_ia32.asm
|
ganboing/pintool
|
ece4788ffded47124b1c9b203707cc255dbaf20f
|
[
"Intel"
] | null | null | null |
source/tools/ToolUnitTests/sse-ref_ia32.asm
|
ganboing/pintool
|
ece4788ffded47124b1c9b203707cc255dbaf20f
|
[
"Intel"
] | null | null | null |
; BEGIN_LEGAL
; Intel Open Source License
;
; Copyright (c) 2002-2016 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
; the 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 INTEL OR
; ITS 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.
; END_LEGAL
.386
.XMM
.model flat, c
.data
dummy QWORD 0, 0, 0 , 0
.code
Fld1_a PROC
fld1
fld1
fld1
ret
Fld1_a ENDP
Fld1_b PROC
fld1
fld1
fld1
ret
Fld1_b ENDP
FldzToTop3_a PROC
fstp dummy
fstp dummy
fstp dummy
fldz
fldz
fldz
ret
FldzToTop3_a ENDP
mmx_save PROC buf:DWORD
push eax
mov eax, buf
fxsave [eax]
pop eax
RET
mmx_save ENDP
mmx_restore PROC buf:DWORD
push eax
mov eax, buf
fxrstor [eax]
pop eax
RET
mmx_restore ENDP
set_xmm_reg0 PROC xmm_reg:DWORD
mov eax, xmm_reg
movdqu xmm0, [eax]
RET
set_xmm_reg0 ENDP
get_xmm_reg0 PROC xmm_reg:DWORD
mov eax, xmm_reg
movdqu [eax], xmm0
RET
get_xmm_reg0 ENDP
set_xmm_reg1 PROC xmm_reg:DWORD
mov eax, xmm_reg
movdqu xmm1, [eax]
RET
set_xmm_reg1 ENDP
get_xmm_reg1 PROC xmm_reg:DWORD
mov eax, xmm_reg
movdqu [eax], xmm1
RET
get_xmm_reg1 ENDP
set_xmm_reg2 PROC xmm_reg:DWORD
mov eax, xmm_reg
movdqu xmm2, [eax]
RET
set_xmm_reg2 ENDP
get_xmm_reg2 PROC xmm_reg:DWORD
mov eax, xmm_reg
movdqu [eax], xmm2
RET
get_xmm_reg2 ENDP
set_xmm_reg3 PROC xmm_reg:DWORD
mov eax, xmm_reg
movdqu xmm3, [eax]
RET
set_xmm_reg3 ENDP
get_xmm_reg3 PROC xmm_reg:DWORD
mov eax, xmm_reg
movdqu [eax], xmm3
RET
get_xmm_reg3 ENDP
set_xmm_reg4 PROC xmm_reg:DWORD
mov eax, xmm_reg
movdqu xmm4, [eax]
RET
set_xmm_reg4 ENDP
get_xmm_reg4 PROC xmm_reg:DWORD
mov eax, xmm_reg
movdqu [eax], xmm4
RET
get_xmm_reg4 ENDP
set_xmm_reg5 PROC xmm_reg:DWORD
mov eax, xmm_reg
movdqu xmm5, [eax]
RET
set_xmm_reg5 ENDP
get_xmm_reg5 PROC xmm_reg:DWORD
mov eax, xmm_reg
movdqu [eax], xmm5
RET
get_xmm_reg5 ENDP
set_xmm_reg6 PROC xmm_reg:DWORD
mov eax, xmm_reg
movdqu xmm6, [eax]
RET
set_xmm_reg6 ENDP
get_xmm_reg6 PROC xmm_reg:DWORD
mov eax, xmm_reg
movdqu [eax], xmm6
RET
get_xmm_reg6 ENDP
set_xmm_reg7 PROC xmm_reg:DWORD
mov eax, xmm_reg
movdqu xmm7, [eax]
RET
set_xmm_reg7 ENDP
get_xmm_reg7 PROC xmm_reg:DWORD
mov eax, xmm_reg
movdqu [eax], xmm7
RET
get_xmm_reg7 ENDP
set_mmx_reg0 PROC mmx_reg:DWORD
mov eax, mmx_reg
movq mm0, [eax]
RET
set_mmx_reg0 ENDP
get_mmx_reg0 PROC mmx_reg:DWORD
mov eax, mmx_reg
movq [eax], mm0
RET
get_mmx_reg0 ENDP
end
| 21.715789
| 73
| 0.699467
|
4f6c1043f3e99c1f22ab23657a73130995f0c1f5
| 440
|
asm
|
Assembly
|
oeis/071/A071982.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/071/A071982.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/071/A071982.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A071982: Parity of the decimal digits of sqrt(2).
; Submitted by Christian Krause
; 1,0,1,0,0,1,1,1,0,0,1,1,1,0,1,1,0,0,0,0,0,1,0,0,0,1,0,0,0,0,1,0,1,0,0,1,0,1,0,1,0,1,1,0,1,1,1,1,0,1,0,0,0,1,1,1,1,0,0,1,1,1,1,1,1,1,0,1,1,0,0,1,0,0,0,0,1,0,1,0,1,0,0,1,0,1,0,1,1,1,0,1,0,1,0,0,1,1,1,0
mov $1,1
mov $2,1
mov $3,$0
mul $3,4
lpb $3
add $1,$2
add $2,$1
mul $1,2
sub $3,1
lpe
mov $4,10
pow $4,$0
div $2,$4
div $1,$2
mov $0,$1
mod $0,2
| 20.952381
| 201
| 0.55
|
f09f3eec14e21250d91856c5e14df58006db9d8f
| 1,772
|
asm
|
Assembly
|
UPC Sistemas Digitales 2019-2/LS4A_Contador_INTs.X/maincode.asm
|
tocache/picomones
|
d9fd1e75fbbd964c5f628940a8e1161c5b6791fd
|
[
"CC0-1.0"
] | 5
|
2019-08-16T14:48:49.000Z
|
2022-01-11T12:22:02.000Z
|
UPC Sistemas Digitales 2019-2/LS4A_Contador_INTs.X/maincode.asm
|
tocache/picomones
|
d9fd1e75fbbd964c5f628940a8e1161c5b6791fd
|
[
"CC0-1.0"
] | null | null | null |
UPC Sistemas Digitales 2019-2/LS4A_Contador_INTs.X/maincode.asm
|
tocache/picomones
|
d9fd1e75fbbd964c5f628940a8e1161c5b6791fd
|
[
"CC0-1.0"
] | 8
|
2018-10-30T01:17:19.000Z
|
2022-01-11T14:35:50.000Z
|
list p=18f4550
#include <p18f4550.inc>
CONFIG FOSC = XT_XT ; Oscillator Selection bits (XT oscillator (XT))
CONFIG PWRT = ON ; Power-up Timer Enable bit (PWRT enabled)
CONFIG BOR = OFF ; Brown-out Reset Enable bits (Brown-out Reset disabled in hardware and software)
CONFIG WDT = OFF ; Watchdog Timer Enable bit (WDT disabled (control is placed on the SWDTEN bit))
CONFIG PBADEN = OFF ; PORTB A/D Enable bit (PORTB<4:0> pins are configured as digital I/O on Reset)
CONFIG MCLRE = ON ; MCLR Pin Enable bit (RE3 input pin enabled; MCLR pin disabled)
CONFIG LVP = OFF ; Single-Supply ICSP Enable bit (Single-Supply ICSP disabled)
cuenta equ 0x00
org 0x0200
tabla7s db 0x3F, 0x06, 0x5B, 0x4F, 0x66, 0x6D, 0x7D, 0x07, 0X7F, 0x67, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79
;Disp7seg: 0 1 2 3 4 5 6 7 8 9 E E E E E E
org 0x0000
goto config_p
org 0x0020
config_p: movlw 0x80
movwf TRISD ;Puertos RD6 al RD0 como salidas
movlw LOW tabla7s
movwf TBLPTRL
movlw HIGH tabla7s
movwf TBLPTRH
clrf cuenta
call disp_update
inicio: btfss PORTB, 0
goto no1
incf cuenta, f
call nooopsters
call disp_update
otro1: btfsc PORTB, 0
goto otro1
goto salida
no1: btfss PORTB, 1
call salida
decf cuenta, f
call nooopsters
call disp_update
otro2: btfsc PORTB, 1
goto otro2
salida: goto inicio
nooopsters: nop
nop
nop
nop
return
disp_update:movf cuenta, W
movwf TBLPTRL
TBLRD*
movff TABLAT, LATD
return
end
| 27.6875
| 115
| 0.592551
|
7e1af2f44829b531d7d30bf1ad43525cdc6c30d3
| 244
|
asm
|
Assembly
|
oeis/116/A116083.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/116/A116083.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/116/A116083.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A116083: Numbers n such that phi(sigma(n))-sigma(phi(n))=1.
; Submitted by Christian Krause
; 2,6,8,24,128,384,32768,98304,2147483648,6442450944
mov $1,2
lpb $0
sub $0,2
pow $1,2
mul $1,2
lpe
lpb $0
sub $0,1
mul $1,3
lpe
mov $0,$1
| 15.25
| 61
| 0.647541
|
7843d25c614517fc78cc13881f304d81ce90b938
| 6,070
|
asm
|
Assembly
|
Transynther/x86/_processed/AVXALIGN/_st_/i9-9900K_12_0xca_notsx.log_21829_1870.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/AVXALIGN/_st_/i9-9900K_12_0xca_notsx.log_21829_1870.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/AVXALIGN/_st_/i9-9900K_12_0xca_notsx.log_21829_1870.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 3
|
2020-07-14T17:07:07.000Z
|
2022-03-21T01:12:22.000Z
|
.global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r14
push %r8
push %rbp
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_WT_ht+0xc67, %r8
add $231, %rbx
movups (%r8), %xmm5
vpextrq $1, %xmm5, %r14
nop
add $46235, %rcx
lea addresses_WC_ht+0x1b2b7, %rsi
lea addresses_normal_ht+0x158ff, %rdi
sub $43389, %rbp
mov $124, %rcx
rep movsq
nop
nop
nop
nop
sub %r8, %r8
lea addresses_D_ht+0x1c4ff, %rsi
nop
nop
nop
nop
xor $49137, %rbx
mov $0x6162636465666768, %rcx
movq %rcx, (%rsi)
nop
nop
nop
nop
add %r14, %r14
lea addresses_WC_ht+0x10cff, %rbp
nop
nop
nop
dec %rbx
mov $0x6162636465666768, %rdi
movq %rdi, %xmm6
vmovups %ymm6, (%rbp)
add $29366, %r8
lea addresses_UC_ht+0xf487, %rsi
lea addresses_normal_ht+0xf2bf, %rdi
nop
sub %r14, %r14
mov $5, %rcx
rep movsb
nop
cmp $11047, %rsi
lea addresses_normal_ht+0xe27f, %rsi
lea addresses_WC_ht+0x19f1f, %rdi
nop
nop
nop
nop
nop
cmp $41771, %r12
mov $79, %rcx
rep movsq
nop
nop
add %rbx, %rbx
lea addresses_D_ht+0x174ff, %rsi
lea addresses_UC_ht+0x1daff, %rdi
nop
nop
nop
nop
nop
cmp $4955, %r8
mov $73, %rcx
rep movsb
nop
nop
nop
sub %rsi, %rsi
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %r8
pop %r14
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r12
push %r13
push %r15
push %rdx
push %rsi
// Store
lea addresses_UC+0x186ff, %rsi
nop
add %r15, %r15
mov $0x5152535455565758, %r12
movq %r12, (%rsi)
nop
nop
cmp $48505, %rsi
// Faulty Load
lea addresses_WC+0x1e6ff, %r10
and $32531, %rdx
mov (%r10), %r13
lea oracles, %r10
and $0xff, %r13
shlq $12, %r13
mov (%r10,%r13,1), %r13
pop %rsi
pop %rdx
pop %r15
pop %r13
pop %r12
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WC', 'NT': False, 'AVXalign': True, 'size': 8, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_UC', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 10}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_WC', 'NT': True, 'AVXalign': False, 'size': 8, 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 2}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 2, 'type': 'addresses_WC_ht'}, 'dst': {'same': False, 'congruent': 8, 'type': 'addresses_normal_ht'}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_D_ht', 'NT': True, 'AVXalign': False, 'size': 8, 'congruent': 9}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WC_ht', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 8}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 3, 'type': 'addresses_UC_ht'}, 'dst': {'same': False, 'congruent': 6, 'type': 'addresses_normal_ht'}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 7, 'type': 'addresses_normal_ht'}, 'dst': {'same': False, 'congruent': 3, 'type': 'addresses_WC_ht'}}
{'OP': 'REPM', 'src': {'same': True, 'congruent': 9, 'type': 'addresses_D_ht'}, 'dst': {'same': False, 'congruent': 8, 'type': 'addresses_UC_ht'}}
{'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
*/
| 40.738255
| 2,999
| 0.661779
|
27021bfc889917f4f094555940991b2ba17c3d99
| 652
|
asm
|
Assembly
|
oeis/079/A079547.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/079/A079547.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/079/A079547.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A079547: a(n) = ((n^6 - (n-1)^6) - (n^2 - (n-1)^2))/60.
; 0,1,11,56,192,517,1183,2408,4488,7809,12859,20240,30680,45045,64351,89776,122672,164577,217227,282568,362768,460229,577599,717784,883960,1079585,1308411,1574496,1882216,2236277,2641727,3103968,3628768,4222273,4891019,5641944,6482400,7420165,8463455,9620936,10901736,12315457,13872187,15582512,17457528,19508853,21748639,24189584,26844944,29728545,32854795,36238696,39895856,43842501,48095487,52672312,57591128,62870753,68530683,74591104,81072904,87997685,95387775,103266240,111656896,120584321
lpb $0
mov $2,$0
sub $0,1
seq $2,37270 ; a(n) = n^2*(n^2 + 1)/2.
add $1,$2
lpe
mov $0,$1
| 59.272727
| 495
| 0.756135
|
8256f06637dd6a776750b0b632bbb92fd119624c
| 180
|
asm
|
Assembly
|
libsrc/_DEVELOPMENT/arch/zx/display/c/sdcc/zx_saddrcup_fastcall.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 640
|
2017-01-14T23:33:45.000Z
|
2022-03-30T11:28:42.000Z
|
libsrc/_DEVELOPMENT/arch/zx/display/c/sdcc/zx_saddrcup_fastcall.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 1,600
|
2017-01-15T16:12:02.000Z
|
2022-03-31T12:11:12.000Z
|
libsrc/_DEVELOPMENT/arch/zx/display/c/sdcc/zx_saddrcup_fastcall.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 215
|
2017-01-17T10:43:03.000Z
|
2022-03-23T17:25:02.000Z
|
; void *zx_saddrcup_fastcall(void *saddr)
SECTION code_clib
SECTION code_arch
PUBLIC _zx_saddrcup_fastcall
EXTERN asm_zx_saddrcup
defc _zx_saddrcup_fastcall = asm_zx_saddrcup
| 15
| 44
| 0.85
|
fe4c5027a309a9f70c8ffe6a0e24f15cf7bdc00f
| 2,013
|
asm
|
Assembly
|
dino/lcs/enemy/CA.asm
|
zengfr/arcade_game_romhacking_sourcecode_top_secret_data
|
a4a0c86c200241494b3f1834cd0aef8dc02f7683
|
[
"Apache-2.0"
] | 6
|
2020-10-14T15:29:10.000Z
|
2022-02-12T18:58:54.000Z
|
dino/lcs/enemy/CA.asm
|
zengfr/arcade_game_romhacking_sourcecode_top_secret_data
|
a4a0c86c200241494b3f1834cd0aef8dc02f7683
|
[
"Apache-2.0"
] | null | null | null |
dino/lcs/enemy/CA.asm
|
zengfr/arcade_game_romhacking_sourcecode_top_secret_data
|
a4a0c86c200241494b3f1834cd0aef8dc02f7683
|
[
"Apache-2.0"
] | 1
|
2020-12-17T08:59:10.000Z
|
2020-12-17T08:59:10.000Z
|
copyright zengfr site:http://github.com/zengfr/romhack
00042A move.l D1, (A0)+
00042C dbra D0, $42a
004D3C move.l D0, (A4)+
004D3E move.l D0, (A4)+
03FE98 move.l D0, ($c8,A6) [enemy+ 8, enemy+ A]
03FE9C move.l D0, D2 [enemy+C8, enemy+CA]
058558 move.w D0, ($ca,A6) [enemy+AA]
05855C jsr $483c.l
058932 tst.w ($ca,A6)
058936 beq $58968
0AAACA move.l (A0), D2
0AAACC move.w D0, (A0) [123p+11A, 123p+11C, 123p+11E, 123p+120, 123p+122, 123p+124, 123p+126, 123p+128, 123p+12A, enemy+BC, enemy+C0, enemy+C2, enemy+C4, enemy+CC, enemy+CE, enemy+D0, enemy+D2, enemy+D4, enemy+D6, enemy+D8, enemy+DA, enemy+DE, item+86, item+88, item+8A, item+98, item+9A, item+9C, item+9E, item+A0, item+A2, item+A4, item+A6, scr1]
0AAACE move.w D0, ($2,A0)
0AAAD2 cmp.l (A0), D0
0AAAD4 bne $aaafc
0AAAD8 move.l D2, (A0)+
0AAADA cmpa.l A0, A1 [123p+11A, 123p+11C, 123p+11E, 123p+120, 123p+122, 123p+124, 123p+126, 123p+128, 123p+12A, enemy+BC, enemy+C0, enemy+C2, enemy+C4, enemy+CC, enemy+CE, enemy+D0, enemy+D2, enemy+D4, enemy+D6, enemy+D8, enemy+DA, enemy+DE, item+86, item+88, item+8A, item+98, item+9A, item+9C, item+9E, item+A0, item+A2, item+A4, item+A6, scr1]
0AAAE6 move.l (A0), D2
0AAAE8 move.w D0, (A0) [123p+11A, 123p+11C, 123p+11E, 123p+120, 123p+122, 123p+124, 123p+126, 123p+128, 123p+12A, enemy+BC, enemy+C0, enemy+C2, enemy+C4, enemy+CC, enemy+CE, enemy+D0, enemy+D2, enemy+D4, enemy+D6, enemy+D8, enemy+DA, enemy+DE, item+86, item+88, item+8A, item+98, item+9A, item+9C, item+9E, item+A0, item+A2, item+A4, item+A6, scr1]
0AAAF4 move.l D2, (A0)+
0AAAF6 cmpa.l A0, A1 [123p+11A, 123p+11C, 123p+11E, 123p+120, 123p+122, 123p+124, 123p+126, 123p+128, 123p+12A, enemy+BC, enemy+C0, enemy+C2, enemy+C4, enemy+CC, enemy+CE, enemy+D0, enemy+D2, enemy+D4, enemy+D6, enemy+D8, enemy+DA, enemy+DE, item+86, item+88, item+8A, item+98, item+9A, item+9C, item+9E, item+A0, item+A2, item+A4, item+A6, scr1]
copyright zengfr site:http://github.com/zengfr/romhack
| 77.423077
| 350
| 0.662692
|
35683ab2aa5dc3b44a68c54611d6152dcd388323
| 469
|
asm
|
Assembly
|
Microprocessor_Interfacing_CSE_2006/Array_Manipulations_Lab_4/sort_desc.asm
|
aadhityasw/VIT-Labs
|
2c449f64f4fdd8c0ed5f2b51d05a7c586e6ab2ab
|
[
"CC0-1.0"
] | 2
|
2021-11-18T05:30:24.000Z
|
2022-03-07T06:28:06.000Z
|
Microprocessor_Interfacing_CSE_2006/Array_Manipulations_Lab_4/sort_desc.asm
|
aadhityasw/VIT-Labs
|
2c449f64f4fdd8c0ed5f2b51d05a7c586e6ab2ab
|
[
"CC0-1.0"
] | null | null | null |
Microprocessor_Interfacing_CSE_2006/Array_Manipulations_Lab_4/sort_desc.asm
|
aadhityasw/VIT-Labs
|
2c449f64f4fdd8c0ed5f2b51d05a7c586e6ab2ab
|
[
"CC0-1.0"
] | 3
|
2021-10-14T01:10:34.000Z
|
2022-03-18T14:33:52.000Z
|
DATA SEGMENT
STRING1 DB 99H,12H,56H,45H,36H
DATA ENDS
CODE SEGMENT
ASSUME CS:CODE,DS:DATA
START:
MOV AX,DATA
MOV DS,AX
MOV CH,04H
UP2:
MOV CL,04H
LEA SI,STRING1
UP1:
MOV AL,[SI]
MOV BL,[SI+1]
CMP AL,BL
JNC DOWN
MOV DL,[SI+1]
XCHG [SI],DL
MOV [SI+1],DL
DOWN:
INC SI
DEC CL
JNZ UP1
DEC CH
JNZ UP2
hlt
CODE ENDS
END START
| 15.129032
| 34
| 0.490405
|
4a799f32948cb7a0c868dc1074cb20a4c7205bce
| 307
|
asm
|
Assembly
|
programs/oeis/086/A086815.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/086/A086815.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/086/A086815.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A086815: a(n)=(n-1)*n^(2*n)
; 0,16,1458,196608,39062500,10883911680,4069338437094,1970324836974592,1200757082375992968,900000000000000000000,814027493868397611133210,874465319237299285467856896,1100799962319223399900795392108
mov $1,$0
sub $2,$0
sub $0,$2
add $0,2
sub $2,1
pow $2,$0
mul $1,$2
mov $0,$1
| 25.583333
| 197
| 0.771987
|
fc2725c77160fe406ed1389244ea69ebb7a95221
| 108
|
asm
|
Assembly
|
libsrc/_DEVELOPMENT/math/float/math48/lm/z80/asm_dle_s.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 640
|
2017-01-14T23:33:45.000Z
|
2022-03-30T11:28:42.000Z
|
libsrc/_DEVELOPMENT/math/float/math48/lm/z80/asm_dle_s.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 1,600
|
2017-01-15T16:12:02.000Z
|
2022-03-31T12:11:12.000Z
|
libsrc/_DEVELOPMENT/math/float/math48/lm/z80/asm_dle_s.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 215
|
2017-01-17T10:43:03.000Z
|
2022-03-23T17:25:02.000Z
|
SECTION code_clib
SECTION code_fp_math48
PUBLIC asm_dle_s
EXTERN am48_dle_s
defc asm_dle_s = am48_dle_s
| 10.8
| 27
| 0.842593
|
2f2ba28ddabdc5b1a546e4c9b140130d55244e40
| 603
|
asm
|
Assembly
|
programs/oeis/245/A245990.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/245/A245990.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/245/A245990.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
; A245990: Number of length n+2 0..3 arrays with no pair in any consecutive three terms totalling exactly 3.
; 28,68,164,396,956,2308,5572,13452,32476,78404,189284,456972,1103228,2663428,6430084,15523596,37477276,90478148,218433572,527345292,1273124156,3073593604,7420311364,17914216332,43248744028,104411704388,252072152804,608556009996,1469184172796,3546924355588,8563032883972,20672990123532,49909013131036,120491016385604,290891045902244,702273108190092,1695437262282428,4093147632754948
add $0,4
mov $1,4
mov $3,4
lpb $0,1
sub $0,1
trn $1,$2
add $1,$2
mul $2,2
add $2,$3
mov $3,$1
lpe
| 40.2
| 382
| 0.79602
|
9001991e51db38e1aafd1e05ca32b1015b343244
| 218
|
asm
|
Assembly
|
boot/stage1/disk_read.asm
|
arushsharma24/KSOS
|
68eac53c81a8c89d02270ff099fd7d94740661a2
|
[
"MIT"
] | 87
|
2020-04-30T12:05:14.000Z
|
2022-02-28T03:30:37.000Z
|
boot/stage1/disk_read.asm
|
arushsharma24/KSOS
|
68eac53c81a8c89d02270ff099fd7d94740661a2
|
[
"MIT"
] | 14
|
2020-03-13T14:54:16.000Z
|
2020-04-19T06:28:56.000Z
|
boot/stage1/disk_read.asm
|
arushsharma24/KSOS
|
68eac53c81a8c89d02270ff099fd7d94740661a2
|
[
"MIT"
] | 12
|
2020-04-29T12:28:38.000Z
|
2022-02-14T09:06:58.000Z
|
[bits 16]
BootDiskNumber: db 0
disk_read_16: ;bx is an argument, es is argument ,cl is also an argument, al is also an argument
pusha
mov dl,[BootDiskNumber]
mov ah,0x02 ;interrupt function
int 0x13
popa
ret
| 21.8
| 97
| 0.738532
|
41153d7e62c2c29ab2a47c0ad7b6a574c567c5cd
| 331
|
asm
|
Assembly
|
tools/DOSBox-0.74Win/FSysFAT/avt/p2_virus/xx4_host.asm
|
cyberitsec/antivirus
|
812be691c2a24cc4488ec848b64b57558c0311ab
|
[
"MIT"
] | 1
|
2021-09-28T23:47:40.000Z
|
2021-09-28T23:47:40.000Z
|
tools/DOSBox-0.74Win/FSysFAT/avt/p2_virus/xx4_host.asm
|
cyberitsec/antivirus
|
812be691c2a24cc4488ec848b64b57558c0311ab
|
[
"MIT"
] | null | null | null |
tools/DOSBox-0.74Win/FSysFAT/avt/p2_virus/xx4_host.asm
|
cyberitsec/antivirus
|
812be691c2a24cc4488ec848b64b57558c0311ab
|
[
"MIT"
] | null | null | null |
.model tiny
.code
; for EXE 16 bits dissapear ORG 100
HOST:
mov AX,CS ; for EXE 16 bits
mov DS,AX ; for EXE 16 bits
mov CX,zet
mov ah,9
mov dx, OFFSET HI
int 21h
mov ax,4c00h
int 21h
HI DB 'Program COM 04!$'
vector DB 30 dup(3)
zet DB 34
END HOST
| 15.761905
| 36
| 0.528701
|
1e5d924e7ad6cf727d1df16ab2ce074a7034a366
| 220
|
asm
|
Assembly
|
pwnlib/shellcraft/templates/amd64/linux/getppid.asm
|
IMULMUL/python3-pwntools
|
61210a68cd88e9084c72292d3119c38c44f07966
|
[
"MIT"
] | 325
|
2016-01-25T08:38:06.000Z
|
2022-03-30T14:31:50.000Z
|
pwnlib/shellcraft/templates/amd64/linux/getppid.asm
|
IMULMUL/python3-pwntools
|
61210a68cd88e9084c72292d3119c38c44f07966
|
[
"MIT"
] | 8
|
2016-08-23T10:15:27.000Z
|
2019-01-16T02:49:34.000Z
|
pwnlib/shellcraft/templates/amd64/linux/getppid.asm
|
IMULMUL/python3-pwntools
|
61210a68cd88e9084c72292d3119c38c44f07966
|
[
"MIT"
] | 71
|
2016-07-13T10:03:52.000Z
|
2022-01-10T11:57:34.000Z
|
<%
from pwnlib.shellcraft.amd64.linux import syscall
%>
<%page args=""/>
<%docstring>
Invokes the syscall getppid. See 'man 2 getppid' for more information.
Arguments:
</%docstring>
${syscall('SYS_getppid')}
| 16.923077
| 71
| 0.690909
|
4afdfa58d9b38714a4bb6810b82b8314e5c462e5
| 621,266
|
asm
|
Assembly
|
Kernel/xv6-public/kernel.asm
|
samyvic/OS-Project
|
1622bc1641876584964effd91d65ef02e92728e1
|
[
"Apache-2.0"
] | null | null | null |
Kernel/xv6-public/kernel.asm
|
samyvic/OS-Project
|
1622bc1641876584964effd91d65ef02e92728e1
|
[
"Apache-2.0"
] | null | null | null |
Kernel/xv6-public/kernel.asm
|
samyvic/OS-Project
|
1622bc1641876584964effd91d65ef02e92728e1
|
[
"Apache-2.0"
] | null | null | null |
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 .byte 0xe4
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 90 10 00 mov $0x109000,%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 80 bf 10 80 mov $0x8010bf80,%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 40 30 10 80 mov $0x80103040,%eax
jmp *%eax
80100032: ff e0 jmp *%eax
80100034: 66 90 xchg %ax,%ax
80100036: 66 90 xchg %ax,%ax
80100038: 66 90 xchg %ax,%ax
8010003a: 66 90 xchg %ax,%ax
8010003c: 66 90 xchg %ax,%ax
8010003e: 66 90 xchg %ax,%ax
80100040 <binit>:
struct buf head;
} bcache;
void
binit(void)
{
80100040: f3 0f 1e fb endbr32
80100044: 55 push %ebp
80100045: 89 e5 mov %esp,%ebp
80100047: 53 push %ebx
//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++){
80100048: bb b4 bf 10 80 mov $0x8010bfb4,%ebx
{
8010004d: 83 ec 0c sub $0xc,%esp
initlock(&bcache.lock, "bcache");
80100050: 68 80 75 10 80 push $0x80107580
80100055: 68 80 bf 10 80 push $0x8010bf80
8010005a: e8 a1 45 00 00 call 80104600 <initlock>
bcache.head.next = &bcache.head;
8010005f: 83 c4 10 add $0x10,%esp
80100062: b8 7c 06 11 80 mov $0x8011067c,%eax
bcache.head.prev = &bcache.head;
80100067: c7 05 cc 06 11 80 7c movl $0x8011067c,0x801106cc
8010006e: 06 11 80
bcache.head.next = &bcache.head;
80100071: c7 05 d0 06 11 80 7c movl $0x8011067c,0x801106d0
80100078: 06 11 80
for(b = bcache.buf; b < bcache.buf+NBUF; b++){
8010007b: eb 05 jmp 80100082 <binit+0x42>
8010007d: 8d 76 00 lea 0x0(%esi),%esi
80100080: 89 d3 mov %edx,%ebx
b->next = bcache.head.next;
80100082: 89 43 54 mov %eax,0x54(%ebx)
b->prev = &bcache.head;
initsleeplock(&b->lock, "buffer");
80100085: 83 ec 08 sub $0x8,%esp
80100088: 8d 43 0c lea 0xc(%ebx),%eax
b->prev = &bcache.head;
8010008b: c7 43 50 7c 06 11 80 movl $0x8011067c,0x50(%ebx)
initsleeplock(&b->lock, "buffer");
80100092: 68 87 75 10 80 push $0x80107587
80100097: 50 push %eax
80100098: e8 23 44 00 00 call 801044c0 <initsleeplock>
bcache.head.next->prev = b;
8010009d: a1 d0 06 11 80 mov 0x801106d0,%eax
for(b = bcache.buf; b < bcache.buf+NBUF; b++){
801000a2: 8d 93 5c 02 00 00 lea 0x25c(%ebx),%edx
801000a8: 83 c4 10 add $0x10,%esp
bcache.head.next->prev = b;
801000ab: 89 58 50 mov %ebx,0x50(%eax)
bcache.head.next = b;
801000ae: 89 d8 mov %ebx,%eax
801000b0: 89 1d d0 06 11 80 mov %ebx,0x801106d0
for(b = bcache.buf; b < bcache.buf+NBUF; b++){
801000b6: 81 fb 20 04 11 80 cmp $0x80110420,%ebx
801000bc: 75 c2 jne 80100080 <binit+0x40>
}
}
801000be: 8b 5d fc mov -0x4(%ebp),%ebx
801000c1: c9 leave
801000c2: c3 ret
801000c3: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801000ca: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801000d0 <bread>:
}
// Return a locked buf with the contents of the indicated block.
struct buf*
bread(uint dev, uint blockno)
{
801000d0: f3 0f 1e fb endbr32
801000d4: 55 push %ebp
801000d5: 89 e5 mov %esp,%ebp
801000d7: 57 push %edi
801000d8: 56 push %esi
801000d9: 53 push %ebx
801000da: 83 ec 18 sub $0x18,%esp
801000dd: 8b 7d 08 mov 0x8(%ebp),%edi
801000e0: 8b 75 0c mov 0xc(%ebp),%esi
acquire(&bcache.lock);
801000e3: 68 80 bf 10 80 push $0x8010bf80
801000e8: e8 93 46 00 00 call 80104780 <acquire>
for(b = bcache.head.next; b != &bcache.head; b = b->next){
801000ed: 8b 1d d0 06 11 80 mov 0x801106d0,%ebx
801000f3: 83 c4 10 add $0x10,%esp
801000f6: 81 fb 7c 06 11 80 cmp $0x8011067c,%ebx
801000fc: 75 0d jne 8010010b <bread+0x3b>
801000fe: eb 20 jmp 80100120 <bread+0x50>
80100100: 8b 5b 54 mov 0x54(%ebx),%ebx
80100103: 81 fb 7c 06 11 80 cmp $0x8011067c,%ebx
80100109: 74 15 je 80100120 <bread+0x50>
if(b->dev == dev && b->blockno == blockno){
8010010b: 3b 7b 04 cmp 0x4(%ebx),%edi
8010010e: 75 f0 jne 80100100 <bread+0x30>
80100110: 3b 73 08 cmp 0x8(%ebx),%esi
80100113: 75 eb jne 80100100 <bread+0x30>
b->refcnt++;
80100115: 83 43 4c 01 addl $0x1,0x4c(%ebx)
release(&bcache.lock);
80100119: eb 3f jmp 8010015a <bread+0x8a>
8010011b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
8010011f: 90 nop
for(b = bcache.head.prev; b != &bcache.head; b = b->prev){
80100120: 8b 1d cc 06 11 80 mov 0x801106cc,%ebx
80100126: 81 fb 7c 06 11 80 cmp $0x8011067c,%ebx
8010012c: 75 0d jne 8010013b <bread+0x6b>
8010012e: eb 70 jmp 801001a0 <bread+0xd0>
80100130: 8b 5b 50 mov 0x50(%ebx),%ebx
80100133: 81 fb 7c 06 11 80 cmp $0x8011067c,%ebx
80100139: 74 65 je 801001a0 <bread+0xd0>
if(b->refcnt == 0 && (b->flags & B_DIRTY) == 0) {
8010013b: 8b 43 4c mov 0x4c(%ebx),%eax
8010013e: 85 c0 test %eax,%eax
80100140: 75 ee jne 80100130 <bread+0x60>
80100142: f6 03 04 testb $0x4,(%ebx)
80100145: 75 e9 jne 80100130 <bread+0x60>
b->dev = dev;
80100147: 89 7b 04 mov %edi,0x4(%ebx)
b->blockno = blockno;
8010014a: 89 73 08 mov %esi,0x8(%ebx)
b->flags = 0;
8010014d: c7 03 00 00 00 00 movl $0x0,(%ebx)
b->refcnt = 1;
80100153: c7 43 4c 01 00 00 00 movl $0x1,0x4c(%ebx)
release(&bcache.lock);
8010015a: 83 ec 0c sub $0xc,%esp
8010015d: 68 80 bf 10 80 push $0x8010bf80
80100162: e8 d9 46 00 00 call 80104840 <release>
acquiresleep(&b->lock);
80100167: 8d 43 0c lea 0xc(%ebx),%eax
8010016a: 89 04 24 mov %eax,(%esp)
8010016d: e8 8e 43 00 00 call 80104500 <acquiresleep>
return b;
80100172: 83 c4 10 add $0x10,%esp
struct buf *b;
b = bget(dev, blockno);
if((b->flags & B_VALID) == 0) {
80100175: f6 03 02 testb $0x2,(%ebx)
80100178: 74 0e je 80100188 <bread+0xb8>
iderw(b);
}
return b;
}
8010017a: 8d 65 f4 lea -0xc(%ebp),%esp
8010017d: 89 d8 mov %ebx,%eax
8010017f: 5b pop %ebx
80100180: 5e pop %esi
80100181: 5f pop %edi
80100182: 5d pop %ebp
80100183: c3 ret
80100184: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
iderw(b);
80100188: 83 ec 0c sub $0xc,%esp
8010018b: 53 push %ebx
8010018c: e8 ef 20 00 00 call 80102280 <iderw>
80100191: 83 c4 10 add $0x10,%esp
}
80100194: 8d 65 f4 lea -0xc(%ebp),%esp
80100197: 89 d8 mov %ebx,%eax
80100199: 5b pop %ebx
8010019a: 5e pop %esi
8010019b: 5f pop %edi
8010019c: 5d pop %ebp
8010019d: c3 ret
8010019e: 66 90 xchg %ax,%ax
panic("bget: no buffers");
801001a0: 83 ec 0c sub $0xc,%esp
801001a3: 68 8e 75 10 80 push $0x8010758e
801001a8: e8 e3 01 00 00 call 80100390 <panic>
801001ad: 8d 76 00 lea 0x0(%esi),%esi
801001b0 <bwrite>:
// Write b's contents to disk. Must be locked.
void
bwrite(struct buf *b)
{
801001b0: f3 0f 1e fb endbr32
801001b4: 55 push %ebp
801001b5: 89 e5 mov %esp,%ebp
801001b7: 53 push %ebx
801001b8: 83 ec 10 sub $0x10,%esp
801001bb: 8b 5d 08 mov 0x8(%ebp),%ebx
if(!holdingsleep(&b->lock))
801001be: 8d 43 0c lea 0xc(%ebx),%eax
801001c1: 50 push %eax
801001c2: e8 d9 43 00 00 call 801045a0 <holdingsleep>
801001c7: 83 c4 10 add $0x10,%esp
801001ca: 85 c0 test %eax,%eax
801001cc: 74 0f je 801001dd <bwrite+0x2d>
panic("bwrite");
b->flags |= B_DIRTY;
801001ce: 83 0b 04 orl $0x4,(%ebx)
iderw(b);
801001d1: 89 5d 08 mov %ebx,0x8(%ebp)
}
801001d4: 8b 5d fc mov -0x4(%ebp),%ebx
801001d7: c9 leave
iderw(b);
801001d8: e9 a3 20 00 00 jmp 80102280 <iderw>
panic("bwrite");
801001dd: 83 ec 0c sub $0xc,%esp
801001e0: 68 9f 75 10 80 push $0x8010759f
801001e5: e8 a6 01 00 00 call 80100390 <panic>
801001ea: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801001f0 <brelse>:
// Release a locked buffer.
// Move to the head of the MRU list.
void
brelse(struct buf *b)
{
801001f0: f3 0f 1e fb endbr32
801001f4: 55 push %ebp
801001f5: 89 e5 mov %esp,%ebp
801001f7: 56 push %esi
801001f8: 53 push %ebx
801001f9: 8b 5d 08 mov 0x8(%ebp),%ebx
if(!holdingsleep(&b->lock))
801001fc: 8d 73 0c lea 0xc(%ebx),%esi
801001ff: 83 ec 0c sub $0xc,%esp
80100202: 56 push %esi
80100203: e8 98 43 00 00 call 801045a0 <holdingsleep>
80100208: 83 c4 10 add $0x10,%esp
8010020b: 85 c0 test %eax,%eax
8010020d: 74 66 je 80100275 <brelse+0x85>
panic("brelse");
releasesleep(&b->lock);
8010020f: 83 ec 0c sub $0xc,%esp
80100212: 56 push %esi
80100213: e8 48 43 00 00 call 80104560 <releasesleep>
acquire(&bcache.lock);
80100218: c7 04 24 80 bf 10 80 movl $0x8010bf80,(%esp)
8010021f: e8 5c 45 00 00 call 80104780 <acquire>
b->refcnt--;
80100224: 8b 43 4c mov 0x4c(%ebx),%eax
if (b->refcnt == 0) {
80100227: 83 c4 10 add $0x10,%esp
b->refcnt--;
8010022a: 83 e8 01 sub $0x1,%eax
8010022d: 89 43 4c mov %eax,0x4c(%ebx)
if (b->refcnt == 0) {
80100230: 85 c0 test %eax,%eax
80100232: 75 2f jne 80100263 <brelse+0x73>
// no one is waiting for it.
b->next->prev = b->prev;
80100234: 8b 43 54 mov 0x54(%ebx),%eax
80100237: 8b 53 50 mov 0x50(%ebx),%edx
8010023a: 89 50 50 mov %edx,0x50(%eax)
b->prev->next = b->next;
8010023d: 8b 43 50 mov 0x50(%ebx),%eax
80100240: 8b 53 54 mov 0x54(%ebx),%edx
80100243: 89 50 54 mov %edx,0x54(%eax)
b->next = bcache.head.next;
80100246: a1 d0 06 11 80 mov 0x801106d0,%eax
b->prev = &bcache.head;
8010024b: c7 43 50 7c 06 11 80 movl $0x8011067c,0x50(%ebx)
b->next = bcache.head.next;
80100252: 89 43 54 mov %eax,0x54(%ebx)
bcache.head.next->prev = b;
80100255: a1 d0 06 11 80 mov 0x801106d0,%eax
8010025a: 89 58 50 mov %ebx,0x50(%eax)
bcache.head.next = b;
8010025d: 89 1d d0 06 11 80 mov %ebx,0x801106d0
}
release(&bcache.lock);
80100263: c7 45 08 80 bf 10 80 movl $0x8010bf80,0x8(%ebp)
}
8010026a: 8d 65 f8 lea -0x8(%ebp),%esp
8010026d: 5b pop %ebx
8010026e: 5e pop %esi
8010026f: 5d pop %ebp
release(&bcache.lock);
80100270: e9 cb 45 00 00 jmp 80104840 <release>
panic("brelse");
80100275: 83 ec 0c sub $0xc,%esp
80100278: 68 a6 75 10 80 push $0x801075a6
8010027d: e8 0e 01 00 00 call 80100390 <panic>
80100282: 66 90 xchg %ax,%ax
80100284: 66 90 xchg %ax,%ax
80100286: 66 90 xchg %ax,%ax
80100288: 66 90 xchg %ax,%ax
8010028a: 66 90 xchg %ax,%ax
8010028c: 66 90 xchg %ax,%ax
8010028e: 66 90 xchg %ax,%ax
80100290 <consoleread>:
}
}
int
consoleread(struct inode *ip, char *dst, int n)
{
80100290: f3 0f 1e fb endbr32
80100294: 55 push %ebp
80100295: 89 e5 mov %esp,%ebp
80100297: 57 push %edi
80100298: 56 push %esi
80100299: 53 push %ebx
8010029a: 83 ec 18 sub $0x18,%esp
uint target;
int c;
iunlock(ip);
8010029d: ff 75 08 pushl 0x8(%ebp)
{
801002a0: 8b 5d 10 mov 0x10(%ebp),%ebx
target = n;
801002a3: 89 de mov %ebx,%esi
iunlock(ip);
801002a5: e8 96 15 00 00 call 80101840 <iunlock>
acquire(&cons.lock);
801002aa: c7 04 24 20 a5 10 80 movl $0x8010a520,(%esp)
801002b1: e8 ca 44 00 00 call 80104780 <acquire>
// caller gets a 0-byte result.
input.r--;
}
break;
}
*dst++ = c;
801002b6: 8b 7d 0c mov 0xc(%ebp),%edi
while(n > 0){
801002b9: 83 c4 10 add $0x10,%esp
*dst++ = c;
801002bc: 01 df add %ebx,%edi
while(n > 0){
801002be: 85 db test %ebx,%ebx
801002c0: 0f 8e 97 00 00 00 jle 8010035d <consoleread+0xcd>
while(input.r == input.w){
801002c6: a1 60 09 11 80 mov 0x80110960,%eax
801002cb: 3b 05 64 09 11 80 cmp 0x80110964,%eax
801002d1: 74 27 je 801002fa <consoleread+0x6a>
801002d3: eb 5b jmp 80100330 <consoleread+0xa0>
801002d5: 8d 76 00 lea 0x0(%esi),%esi
sleep(&input.r, &cons.lock);
801002d8: 83 ec 08 sub $0x8,%esp
801002db: 68 20 a5 10 80 push $0x8010a520
801002e0: 68 60 09 11 80 push $0x80110960
801002e5: e8 36 3c 00 00 call 80103f20 <sleep>
while(input.r == input.w){
801002ea: a1 60 09 11 80 mov 0x80110960,%eax
801002ef: 83 c4 10 add $0x10,%esp
801002f2: 3b 05 64 09 11 80 cmp 0x80110964,%eax
801002f8: 75 36 jne 80100330 <consoleread+0xa0>
if(myproc()->killed){
801002fa: e8 61 36 00 00 call 80103960 <myproc>
801002ff: 8b 48 24 mov 0x24(%eax),%ecx
80100302: 85 c9 test %ecx,%ecx
80100304: 74 d2 je 801002d8 <consoleread+0x48>
release(&cons.lock);
80100306: 83 ec 0c sub $0xc,%esp
80100309: 68 20 a5 10 80 push $0x8010a520
8010030e: e8 2d 45 00 00 call 80104840 <release>
ilock(ip);
80100313: 5a pop %edx
80100314: ff 75 08 pushl 0x8(%ebp)
80100317: e8 44 14 00 00 call 80101760 <ilock>
return -1;
8010031c: 83 c4 10 add $0x10,%esp
}
release(&cons.lock);
ilock(ip);
return target - n;
}
8010031f: 8d 65 f4 lea -0xc(%ebp),%esp
return -1;
80100322: b8 ff ff ff ff mov $0xffffffff,%eax
}
80100327: 5b pop %ebx
80100328: 5e pop %esi
80100329: 5f pop %edi
8010032a: 5d pop %ebp
8010032b: c3 ret
8010032c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
c = input.buf[input.r++ % INPUT_BUF];
80100330: 8d 50 01 lea 0x1(%eax),%edx
80100333: 89 15 60 09 11 80 mov %edx,0x80110960
80100339: 89 c2 mov %eax,%edx
8010033b: 83 e2 7f and $0x7f,%edx
8010033e: 0f be 8a e0 08 11 80 movsbl -0x7feef720(%edx),%ecx
if(c == C('D')){ // EOF
80100345: 80 f9 04 cmp $0x4,%cl
80100348: 74 38 je 80100382 <consoleread+0xf2>
*dst++ = c;
8010034a: 89 d8 mov %ebx,%eax
--n;
8010034c: 83 eb 01 sub $0x1,%ebx
*dst++ = c;
8010034f: f7 d8 neg %eax
80100351: 88 0c 07 mov %cl,(%edi,%eax,1)
if(c == '\n')
80100354: 83 f9 0a cmp $0xa,%ecx
80100357: 0f 85 61 ff ff ff jne 801002be <consoleread+0x2e>
release(&cons.lock);
8010035d: 83 ec 0c sub $0xc,%esp
80100360: 68 20 a5 10 80 push $0x8010a520
80100365: e8 d6 44 00 00 call 80104840 <release>
ilock(ip);
8010036a: 58 pop %eax
8010036b: ff 75 08 pushl 0x8(%ebp)
8010036e: e8 ed 13 00 00 call 80101760 <ilock>
return target - n;
80100373: 89 f0 mov %esi,%eax
80100375: 83 c4 10 add $0x10,%esp
}
80100378: 8d 65 f4 lea -0xc(%ebp),%esp
return target - n;
8010037b: 29 d8 sub %ebx,%eax
}
8010037d: 5b pop %ebx
8010037e: 5e pop %esi
8010037f: 5f pop %edi
80100380: 5d pop %ebp
80100381: c3 ret
if(n < target){
80100382: 39 f3 cmp %esi,%ebx
80100384: 73 d7 jae 8010035d <consoleread+0xcd>
input.r--;
80100386: a3 60 09 11 80 mov %eax,0x80110960
8010038b: eb d0 jmp 8010035d <consoleread+0xcd>
8010038d: 8d 76 00 lea 0x0(%esi),%esi
80100390 <panic>:
{
80100390: f3 0f 1e fb endbr32
80100394: 55 push %ebp
80100395: 89 e5 mov %esp,%ebp
80100397: 56 push %esi
80100398: 53 push %ebx
80100399: 83 ec 30 sub $0x30,%esp
}
static inline void
cli(void)
{
asm volatile("cli");
8010039c: fa cli
cons.locking = 0;
8010039d: c7 05 54 a5 10 80 00 movl $0x0,0x8010a554
801003a4: 00 00 00
getcallerpcs(&s, pcs);
801003a7: 8d 5d d0 lea -0x30(%ebp),%ebx
801003aa: 8d 75 f8 lea -0x8(%ebp),%esi
cprintf("lapicid %d: panic: ", lapicid());
801003ad: e8 ee 24 00 00 call 801028a0 <lapicid>
801003b2: 83 ec 08 sub $0x8,%esp
801003b5: 50 push %eax
801003b6: 68 ad 75 10 80 push $0x801075ad
801003bb: e8 f0 02 00 00 call 801006b0 <cprintf>
cprintf(s);
801003c0: 58 pop %eax
801003c1: ff 75 08 pushl 0x8(%ebp)
801003c4: e8 e7 02 00 00 call 801006b0 <cprintf>
cprintf("\n");
801003c9: c7 04 24 df 7e 10 80 movl $0x80107edf,(%esp)
801003d0: e8 db 02 00 00 call 801006b0 <cprintf>
getcallerpcs(&s, pcs);
801003d5: 8d 45 08 lea 0x8(%ebp),%eax
801003d8: 5a pop %edx
801003d9: 59 pop %ecx
801003da: 53 push %ebx
801003db: 50 push %eax
801003dc: e8 3f 42 00 00 call 80104620 <getcallerpcs>
for(i=0; i<10; i++)
801003e1: 83 c4 10 add $0x10,%esp
cprintf(" %p", pcs[i]);
801003e4: 83 ec 08 sub $0x8,%esp
801003e7: ff 33 pushl (%ebx)
801003e9: 83 c3 04 add $0x4,%ebx
801003ec: 68 c1 75 10 80 push $0x801075c1
801003f1: e8 ba 02 00 00 call 801006b0 <cprintf>
for(i=0; i<10; i++)
801003f6: 83 c4 10 add $0x10,%esp
801003f9: 39 f3 cmp %esi,%ebx
801003fb: 75 e7 jne 801003e4 <panic+0x54>
panicked = 1; // freeze other CPU
801003fd: c7 05 58 a5 10 80 01 movl $0x1,0x8010a558
80100404: 00 00 00
for(;;)
80100407: eb fe jmp 80100407 <panic+0x77>
80100409: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80100410 <consputc.part.0>:
consputc(int c)
80100410: 55 push %ebp
80100411: 89 e5 mov %esp,%ebp
80100413: 57 push %edi
80100414: 56 push %esi
80100415: 53 push %ebx
80100416: 89 c3 mov %eax,%ebx
80100418: 83 ec 1c sub $0x1c,%esp
if(c == BACKSPACE){
8010041b: 3d 00 01 00 00 cmp $0x100,%eax
80100420: 0f 84 ea 00 00 00 je 80100510 <consputc.part.0+0x100>
uartputc(c);
80100426: 83 ec 0c sub $0xc,%esp
80100429: 50 push %eax
8010042a: e8 71 5b 00 00 call 80105fa0 <uartputc>
8010042f: 83 c4 10 add $0x10,%esp
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80100432: bf d4 03 00 00 mov $0x3d4,%edi
80100437: b8 0e 00 00 00 mov $0xe,%eax
8010043c: 89 fa mov %edi,%edx
8010043e: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
8010043f: b9 d5 03 00 00 mov $0x3d5,%ecx
80100444: 89 ca mov %ecx,%edx
80100446: ec in (%dx),%al
pos = inb(CRTPORT+1) << 8;
80100447: 0f b6 c0 movzbl %al,%eax
asm volatile("out %0,%1" : : "a" (data), "d" (port));
8010044a: 89 fa mov %edi,%edx
8010044c: c1 e0 08 shl $0x8,%eax
8010044f: 89 c6 mov %eax,%esi
80100451: b8 0f 00 00 00 mov $0xf,%eax
80100456: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80100457: 89 ca mov %ecx,%edx
80100459: ec in (%dx),%al
pos |= inb(CRTPORT+1);
8010045a: 0f b6 c0 movzbl %al,%eax
8010045d: 09 f0 or %esi,%eax
if(c == '\n')
8010045f: 83 fb 0a cmp $0xa,%ebx
80100462: 0f 84 90 00 00 00 je 801004f8 <consputc.part.0+0xe8>
else if(c == BACKSPACE){
80100468: 81 fb 00 01 00 00 cmp $0x100,%ebx
8010046e: 74 70 je 801004e0 <consputc.part.0+0xd0>
crt[pos++] = (c&0xff) | 0x0700; // black on white
80100470: 0f b6 db movzbl %bl,%ebx
80100473: 8d 70 01 lea 0x1(%eax),%esi
80100476: 80 cf 07 or $0x7,%bh
80100479: 66 89 9c 00 00 80 0b mov %bx,-0x7ff48000(%eax,%eax,1)
80100480: 80
if(pos < 0 || pos > 25*80)
80100481: 81 fe d0 07 00 00 cmp $0x7d0,%esi
80100487: 0f 8f f9 00 00 00 jg 80100586 <consputc.part.0+0x176>
if((pos/80) >= 24){ // Scroll up.
8010048d: 81 fe 7f 07 00 00 cmp $0x77f,%esi
80100493: 0f 8f a7 00 00 00 jg 80100540 <consputc.part.0+0x130>
80100499: 89 f0 mov %esi,%eax
8010049b: 8d b4 36 00 80 0b 80 lea -0x7ff48000(%esi,%esi,1),%esi
801004a2: 88 45 e7 mov %al,-0x19(%ebp)
801004a5: 0f b6 fc movzbl %ah,%edi
asm volatile("out %0,%1" : : "a" (data), "d" (port));
801004a8: bb d4 03 00 00 mov $0x3d4,%ebx
801004ad: b8 0e 00 00 00 mov $0xe,%eax
801004b2: 89 da mov %ebx,%edx
801004b4: ee out %al,(%dx)
801004b5: b9 d5 03 00 00 mov $0x3d5,%ecx
801004ba: 89 f8 mov %edi,%eax
801004bc: 89 ca mov %ecx,%edx
801004be: ee out %al,(%dx)
801004bf: b8 0f 00 00 00 mov $0xf,%eax
801004c4: 89 da mov %ebx,%edx
801004c6: ee out %al,(%dx)
801004c7: 0f b6 45 e7 movzbl -0x19(%ebp),%eax
801004cb: 89 ca mov %ecx,%edx
801004cd: ee out %al,(%dx)
crt[pos] = ' ' | 0x0700;
801004ce: b8 20 07 00 00 mov $0x720,%eax
801004d3: 66 89 06 mov %ax,(%esi)
}
801004d6: 8d 65 f4 lea -0xc(%ebp),%esp
801004d9: 5b pop %ebx
801004da: 5e pop %esi
801004db: 5f pop %edi
801004dc: 5d pop %ebp
801004dd: c3 ret
801004de: 66 90 xchg %ax,%ax
if(pos > 0) --pos;
801004e0: 8d 70 ff lea -0x1(%eax),%esi
801004e3: 85 c0 test %eax,%eax
801004e5: 75 9a jne 80100481 <consputc.part.0+0x71>
801004e7: c6 45 e7 00 movb $0x0,-0x19(%ebp)
801004eb: be 00 80 0b 80 mov $0x800b8000,%esi
801004f0: 31 ff xor %edi,%edi
801004f2: eb b4 jmp 801004a8 <consputc.part.0+0x98>
801004f4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
pos += 80 - pos%80;
801004f8: ba cd cc cc cc mov $0xcccccccd,%edx
801004fd: f7 e2 mul %edx
801004ff: c1 ea 06 shr $0x6,%edx
80100502: 8d 04 92 lea (%edx,%edx,4),%eax
80100505: c1 e0 04 shl $0x4,%eax
80100508: 8d 70 50 lea 0x50(%eax),%esi
8010050b: e9 71 ff ff ff jmp 80100481 <consputc.part.0+0x71>
uartputc('\b'); uartputc(' '); uartputc('\b');
80100510: 83 ec 0c sub $0xc,%esp
80100513: 6a 08 push $0x8
80100515: e8 86 5a 00 00 call 80105fa0 <uartputc>
8010051a: c7 04 24 20 00 00 00 movl $0x20,(%esp)
80100521: e8 7a 5a 00 00 call 80105fa0 <uartputc>
80100526: c7 04 24 08 00 00 00 movl $0x8,(%esp)
8010052d: e8 6e 5a 00 00 call 80105fa0 <uartputc>
80100532: 83 c4 10 add $0x10,%esp
80100535: e9 f8 fe ff ff jmp 80100432 <consputc.part.0+0x22>
8010053a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
memmove(crt, crt+80, sizeof(crt[0])*23*80);
80100540: 83 ec 04 sub $0x4,%esp
pos -= 80;
80100543: 8d 5e b0 lea -0x50(%esi),%ebx
memset(crt+pos, 0, sizeof(crt[0])*(24*80 - pos));
80100546: 8d b4 36 60 7f 0b 80 lea -0x7ff480a0(%esi,%esi,1),%esi
8010054d: bf 07 00 00 00 mov $0x7,%edi
memmove(crt, crt+80, sizeof(crt[0])*23*80);
80100552: 68 60 0e 00 00 push $0xe60
80100557: 68 a0 80 0b 80 push $0x800b80a0
8010055c: 68 00 80 0b 80 push $0x800b8000
80100561: e8 ca 43 00 00 call 80104930 <memmove>
memset(crt+pos, 0, sizeof(crt[0])*(24*80 - pos));
80100566: b8 80 07 00 00 mov $0x780,%eax
8010056b: 83 c4 0c add $0xc,%esp
8010056e: 29 d8 sub %ebx,%eax
80100570: 01 c0 add %eax,%eax
80100572: 50 push %eax
80100573: 6a 00 push $0x0
80100575: 56 push %esi
80100576: e8 15 43 00 00 call 80104890 <memset>
8010057b: 88 5d e7 mov %bl,-0x19(%ebp)
8010057e: 83 c4 10 add $0x10,%esp
80100581: e9 22 ff ff ff jmp 801004a8 <consputc.part.0+0x98>
panic("pos under/overflow");
80100586: 83 ec 0c sub $0xc,%esp
80100589: 68 c5 75 10 80 push $0x801075c5
8010058e: e8 fd fd ff ff call 80100390 <panic>
80100593: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010059a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801005a0 <printint>:
{
801005a0: 55 push %ebp
801005a1: 89 e5 mov %esp,%ebp
801005a3: 57 push %edi
801005a4: 56 push %esi
801005a5: 53 push %ebx
801005a6: 83 ec 2c sub $0x2c,%esp
801005a9: 89 55 d4 mov %edx,-0x2c(%ebp)
if(sign && (sign = xx < 0))
801005ac: 85 c9 test %ecx,%ecx
801005ae: 74 04 je 801005b4 <printint+0x14>
801005b0: 85 c0 test %eax,%eax
801005b2: 78 6d js 80100621 <printint+0x81>
x = xx;
801005b4: 89 c1 mov %eax,%ecx
801005b6: 31 f6 xor %esi,%esi
i = 0;
801005b8: 89 75 cc mov %esi,-0x34(%ebp)
801005bb: 31 db xor %ebx,%ebx
801005bd: 8d 7d d7 lea -0x29(%ebp),%edi
buf[i++] = digits[x % base];
801005c0: 89 c8 mov %ecx,%eax
801005c2: 31 d2 xor %edx,%edx
801005c4: 89 ce mov %ecx,%esi
801005c6: f7 75 d4 divl -0x2c(%ebp)
801005c9: 0f b6 92 f0 75 10 80 movzbl -0x7fef8a10(%edx),%edx
801005d0: 89 45 d0 mov %eax,-0x30(%ebp)
801005d3: 89 d8 mov %ebx,%eax
801005d5: 8d 5b 01 lea 0x1(%ebx),%ebx
}while((x /= base) != 0);
801005d8: 8b 4d d0 mov -0x30(%ebp),%ecx
801005db: 89 75 d0 mov %esi,-0x30(%ebp)
buf[i++] = digits[x % base];
801005de: 88 14 1f mov %dl,(%edi,%ebx,1)
}while((x /= base) != 0);
801005e1: 8b 75 d4 mov -0x2c(%ebp),%esi
801005e4: 39 75 d0 cmp %esi,-0x30(%ebp)
801005e7: 73 d7 jae 801005c0 <printint+0x20>
801005e9: 8b 75 cc mov -0x34(%ebp),%esi
if(sign)
801005ec: 85 f6 test %esi,%esi
801005ee: 74 0c je 801005fc <printint+0x5c>
buf[i++] = '-';
801005f0: c6 44 1d d8 2d movb $0x2d,-0x28(%ebp,%ebx,1)
buf[i++] = digits[x % base];
801005f5: 89 d8 mov %ebx,%eax
buf[i++] = '-';
801005f7: ba 2d 00 00 00 mov $0x2d,%edx
while(--i >= 0)
801005fc: 8d 5c 05 d7 lea -0x29(%ebp,%eax,1),%ebx
80100600: 0f be c2 movsbl %dl,%eax
if(panicked){
80100603: 8b 15 58 a5 10 80 mov 0x8010a558,%edx
80100609: 85 d2 test %edx,%edx
8010060b: 74 03 je 80100610 <printint+0x70>
asm volatile("cli");
8010060d: fa cli
for(;;)
8010060e: eb fe jmp 8010060e <printint+0x6e>
80100610: e8 fb fd ff ff call 80100410 <consputc.part.0>
while(--i >= 0)
80100615: 39 fb cmp %edi,%ebx
80100617: 74 10 je 80100629 <printint+0x89>
80100619: 0f be 03 movsbl (%ebx),%eax
8010061c: 83 eb 01 sub $0x1,%ebx
8010061f: eb e2 jmp 80100603 <printint+0x63>
x = -xx;
80100621: f7 d8 neg %eax
80100623: 89 ce mov %ecx,%esi
80100625: 89 c1 mov %eax,%ecx
80100627: eb 8f jmp 801005b8 <printint+0x18>
}
80100629: 83 c4 2c add $0x2c,%esp
8010062c: 5b pop %ebx
8010062d: 5e pop %esi
8010062e: 5f pop %edi
8010062f: 5d pop %ebp
80100630: c3 ret
80100631: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80100638: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010063f: 90 nop
80100640 <consolewrite>:
int
consolewrite(struct inode *ip, char *buf, int n)
{
80100640: f3 0f 1e fb endbr32
80100644: 55 push %ebp
80100645: 89 e5 mov %esp,%ebp
80100647: 57 push %edi
80100648: 56 push %esi
80100649: 53 push %ebx
8010064a: 83 ec 18 sub $0x18,%esp
int i;
iunlock(ip);
8010064d: ff 75 08 pushl 0x8(%ebp)
{
80100650: 8b 5d 10 mov 0x10(%ebp),%ebx
iunlock(ip);
80100653: e8 e8 11 00 00 call 80101840 <iunlock>
acquire(&cons.lock);
80100658: c7 04 24 20 a5 10 80 movl $0x8010a520,(%esp)
8010065f: e8 1c 41 00 00 call 80104780 <acquire>
for(i = 0; i < n; i++)
80100664: 83 c4 10 add $0x10,%esp
80100667: 85 db test %ebx,%ebx
80100669: 7e 24 jle 8010068f <consolewrite+0x4f>
8010066b: 8b 7d 0c mov 0xc(%ebp),%edi
8010066e: 8d 34 1f lea (%edi,%ebx,1),%esi
if(panicked){
80100671: 8b 15 58 a5 10 80 mov 0x8010a558,%edx
80100677: 85 d2 test %edx,%edx
80100679: 74 05 je 80100680 <consolewrite+0x40>
8010067b: fa cli
for(;;)
8010067c: eb fe jmp 8010067c <consolewrite+0x3c>
8010067e: 66 90 xchg %ax,%ax
consputc(buf[i] & 0xff);
80100680: 0f b6 07 movzbl (%edi),%eax
80100683: 83 c7 01 add $0x1,%edi
80100686: e8 85 fd ff ff call 80100410 <consputc.part.0>
for(i = 0; i < n; i++)
8010068b: 39 fe cmp %edi,%esi
8010068d: 75 e2 jne 80100671 <consolewrite+0x31>
release(&cons.lock);
8010068f: 83 ec 0c sub $0xc,%esp
80100692: 68 20 a5 10 80 push $0x8010a520
80100697: e8 a4 41 00 00 call 80104840 <release>
ilock(ip);
8010069c: 58 pop %eax
8010069d: ff 75 08 pushl 0x8(%ebp)
801006a0: e8 bb 10 00 00 call 80101760 <ilock>
return n;
}
801006a5: 8d 65 f4 lea -0xc(%ebp),%esp
801006a8: 89 d8 mov %ebx,%eax
801006aa: 5b pop %ebx
801006ab: 5e pop %esi
801006ac: 5f pop %edi
801006ad: 5d pop %ebp
801006ae: c3 ret
801006af: 90 nop
801006b0 <cprintf>:
{
801006b0: f3 0f 1e fb endbr32
801006b4: 55 push %ebp
801006b5: 89 e5 mov %esp,%ebp
801006b7: 57 push %edi
801006b8: 56 push %esi
801006b9: 53 push %ebx
801006ba: 83 ec 1c sub $0x1c,%esp
locking = cons.locking;
801006bd: a1 54 a5 10 80 mov 0x8010a554,%eax
801006c2: 89 45 e0 mov %eax,-0x20(%ebp)
if(locking)
801006c5: 85 c0 test %eax,%eax
801006c7: 0f 85 e8 00 00 00 jne 801007b5 <cprintf+0x105>
if (fmt == 0)
801006cd: 8b 45 08 mov 0x8(%ebp),%eax
801006d0: 89 45 e4 mov %eax,-0x1c(%ebp)
801006d3: 85 c0 test %eax,%eax
801006d5: 0f 84 5a 01 00 00 je 80100835 <cprintf+0x185>
for(i = 0; (c = fmt[i] & 0xff) != 0; i++){
801006db: 0f b6 00 movzbl (%eax),%eax
801006de: 85 c0 test %eax,%eax
801006e0: 74 36 je 80100718 <cprintf+0x68>
argp = (uint*)(void*)(&fmt + 1);
801006e2: 8d 5d 0c lea 0xc(%ebp),%ebx
for(i = 0; (c = fmt[i] & 0xff) != 0; i++){
801006e5: 31 f6 xor %esi,%esi
if(c != '%'){
801006e7: 83 f8 25 cmp $0x25,%eax
801006ea: 74 44 je 80100730 <cprintf+0x80>
if(panicked){
801006ec: 8b 0d 58 a5 10 80 mov 0x8010a558,%ecx
801006f2: 85 c9 test %ecx,%ecx
801006f4: 74 0f je 80100705 <cprintf+0x55>
801006f6: fa cli
for(;;)
801006f7: eb fe jmp 801006f7 <cprintf+0x47>
801006f9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80100700: b8 25 00 00 00 mov $0x25,%eax
80100705: e8 06 fd ff ff call 80100410 <consputc.part.0>
for(i = 0; (c = fmt[i] & 0xff) != 0; i++){
8010070a: 8b 45 e4 mov -0x1c(%ebp),%eax
8010070d: 83 c6 01 add $0x1,%esi
80100710: 0f b6 04 30 movzbl (%eax,%esi,1),%eax
80100714: 85 c0 test %eax,%eax
80100716: 75 cf jne 801006e7 <cprintf+0x37>
if(locking)
80100718: 8b 45 e0 mov -0x20(%ebp),%eax
8010071b: 85 c0 test %eax,%eax
8010071d: 0f 85 fd 00 00 00 jne 80100820 <cprintf+0x170>
}
80100723: 8d 65 f4 lea -0xc(%ebp),%esp
80100726: 5b pop %ebx
80100727: 5e pop %esi
80100728: 5f pop %edi
80100729: 5d pop %ebp
8010072a: c3 ret
8010072b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
8010072f: 90 nop
c = fmt[++i] & 0xff;
80100730: 8b 45 e4 mov -0x1c(%ebp),%eax
80100733: 83 c6 01 add $0x1,%esi
80100736: 0f b6 3c 30 movzbl (%eax,%esi,1),%edi
if(c == 0)
8010073a: 85 ff test %edi,%edi
8010073c: 74 da je 80100718 <cprintf+0x68>
switch(c){
8010073e: 83 ff 70 cmp $0x70,%edi
80100741: 74 5a je 8010079d <cprintf+0xed>
80100743: 7f 2a jg 8010076f <cprintf+0xbf>
80100745: 83 ff 25 cmp $0x25,%edi
80100748: 0f 84 92 00 00 00 je 801007e0 <cprintf+0x130>
8010074e: 83 ff 64 cmp $0x64,%edi
80100751: 0f 85 a1 00 00 00 jne 801007f8 <cprintf+0x148>
printint(*argp++, 10, 1);
80100757: 8b 03 mov (%ebx),%eax
80100759: 8d 7b 04 lea 0x4(%ebx),%edi
8010075c: b9 01 00 00 00 mov $0x1,%ecx
80100761: ba 0a 00 00 00 mov $0xa,%edx
80100766: 89 fb mov %edi,%ebx
80100768: e8 33 fe ff ff call 801005a0 <printint>
break;
8010076d: eb 9b jmp 8010070a <cprintf+0x5a>
switch(c){
8010076f: 83 ff 73 cmp $0x73,%edi
80100772: 75 24 jne 80100798 <cprintf+0xe8>
if((s = (char*)*argp++) == 0)
80100774: 8d 7b 04 lea 0x4(%ebx),%edi
80100777: 8b 1b mov (%ebx),%ebx
80100779: 85 db test %ebx,%ebx
8010077b: 75 55 jne 801007d2 <cprintf+0x122>
s = "(null)";
8010077d: bb d8 75 10 80 mov $0x801075d8,%ebx
for(; *s; s++)
80100782: b8 28 00 00 00 mov $0x28,%eax
if(panicked){
80100787: 8b 15 58 a5 10 80 mov 0x8010a558,%edx
8010078d: 85 d2 test %edx,%edx
8010078f: 74 39 je 801007ca <cprintf+0x11a>
80100791: fa cli
for(;;)
80100792: eb fe jmp 80100792 <cprintf+0xe2>
80100794: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
switch(c){
80100798: 83 ff 78 cmp $0x78,%edi
8010079b: 75 5b jne 801007f8 <cprintf+0x148>
printint(*argp++, 16, 0);
8010079d: 8b 03 mov (%ebx),%eax
8010079f: 8d 7b 04 lea 0x4(%ebx),%edi
801007a2: 31 c9 xor %ecx,%ecx
801007a4: ba 10 00 00 00 mov $0x10,%edx
801007a9: 89 fb mov %edi,%ebx
801007ab: e8 f0 fd ff ff call 801005a0 <printint>
break;
801007b0: e9 55 ff ff ff jmp 8010070a <cprintf+0x5a>
acquire(&cons.lock);
801007b5: 83 ec 0c sub $0xc,%esp
801007b8: 68 20 a5 10 80 push $0x8010a520
801007bd: e8 be 3f 00 00 call 80104780 <acquire>
801007c2: 83 c4 10 add $0x10,%esp
801007c5: e9 03 ff ff ff jmp 801006cd <cprintf+0x1d>
801007ca: e8 41 fc ff ff call 80100410 <consputc.part.0>
for(; *s; s++)
801007cf: 83 c3 01 add $0x1,%ebx
801007d2: 0f be 03 movsbl (%ebx),%eax
801007d5: 84 c0 test %al,%al
801007d7: 75 ae jne 80100787 <cprintf+0xd7>
if((s = (char*)*argp++) == 0)
801007d9: 89 fb mov %edi,%ebx
801007db: e9 2a ff ff ff jmp 8010070a <cprintf+0x5a>
if(panicked){
801007e0: 8b 3d 58 a5 10 80 mov 0x8010a558,%edi
801007e6: 85 ff test %edi,%edi
801007e8: 0f 84 12 ff ff ff je 80100700 <cprintf+0x50>
801007ee: fa cli
for(;;)
801007ef: eb fe jmp 801007ef <cprintf+0x13f>
801007f1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
if(panicked){
801007f8: 8b 0d 58 a5 10 80 mov 0x8010a558,%ecx
801007fe: 85 c9 test %ecx,%ecx
80100800: 74 06 je 80100808 <cprintf+0x158>
80100802: fa cli
for(;;)
80100803: eb fe jmp 80100803 <cprintf+0x153>
80100805: 8d 76 00 lea 0x0(%esi),%esi
80100808: b8 25 00 00 00 mov $0x25,%eax
8010080d: e8 fe fb ff ff call 80100410 <consputc.part.0>
if(panicked){
80100812: 8b 15 58 a5 10 80 mov 0x8010a558,%edx
80100818: 85 d2 test %edx,%edx
8010081a: 74 2c je 80100848 <cprintf+0x198>
8010081c: fa cli
for(;;)
8010081d: eb fe jmp 8010081d <cprintf+0x16d>
8010081f: 90 nop
release(&cons.lock);
80100820: 83 ec 0c sub $0xc,%esp
80100823: 68 20 a5 10 80 push $0x8010a520
80100828: e8 13 40 00 00 call 80104840 <release>
8010082d: 83 c4 10 add $0x10,%esp
}
80100830: e9 ee fe ff ff jmp 80100723 <cprintf+0x73>
panic("null fmt");
80100835: 83 ec 0c sub $0xc,%esp
80100838: 68 df 75 10 80 push $0x801075df
8010083d: e8 4e fb ff ff call 80100390 <panic>
80100842: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80100848: 89 f8 mov %edi,%eax
8010084a: e8 c1 fb ff ff call 80100410 <consputc.part.0>
8010084f: e9 b6 fe ff ff jmp 8010070a <cprintf+0x5a>
80100854: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010085b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
8010085f: 90 nop
80100860 <consoleintr>:
{
80100860: f3 0f 1e fb endbr32
80100864: 55 push %ebp
80100865: 89 e5 mov %esp,%ebp
80100867: 57 push %edi
80100868: 56 push %esi
int c, doprocdump = 0;
80100869: 31 f6 xor %esi,%esi
{
8010086b: 53 push %ebx
8010086c: 83 ec 18 sub $0x18,%esp
8010086f: 8b 7d 08 mov 0x8(%ebp),%edi
acquire(&cons.lock);
80100872: 68 20 a5 10 80 push $0x8010a520
80100877: e8 04 3f 00 00 call 80104780 <acquire>
while((c = getc()) >= 0){
8010087c: 83 c4 10 add $0x10,%esp
8010087f: eb 17 jmp 80100898 <consoleintr+0x38>
switch(c){
80100881: 83 fb 08 cmp $0x8,%ebx
80100884: 0f 84 f6 00 00 00 je 80100980 <consoleintr+0x120>
8010088a: 83 fb 10 cmp $0x10,%ebx
8010088d: 0f 85 15 01 00 00 jne 801009a8 <consoleintr+0x148>
80100893: be 01 00 00 00 mov $0x1,%esi
while((c = getc()) >= 0){
80100898: ff d7 call *%edi
8010089a: 89 c3 mov %eax,%ebx
8010089c: 85 c0 test %eax,%eax
8010089e: 0f 88 23 01 00 00 js 801009c7 <consoleintr+0x167>
switch(c){
801008a4: 83 fb 15 cmp $0x15,%ebx
801008a7: 74 77 je 80100920 <consoleintr+0xc0>
801008a9: 7e d6 jle 80100881 <consoleintr+0x21>
801008ab: 83 fb 7f cmp $0x7f,%ebx
801008ae: 0f 84 cc 00 00 00 je 80100980 <consoleintr+0x120>
if(c != 0 && input.e-input.r < INPUT_BUF){
801008b4: a1 68 09 11 80 mov 0x80110968,%eax
801008b9: 89 c2 mov %eax,%edx
801008bb: 2b 15 60 09 11 80 sub 0x80110960,%edx
801008c1: 83 fa 7f cmp $0x7f,%edx
801008c4: 77 d2 ja 80100898 <consoleintr+0x38>
c = (c == '\r') ? '\n' : c;
801008c6: 8d 48 01 lea 0x1(%eax),%ecx
801008c9: 8b 15 58 a5 10 80 mov 0x8010a558,%edx
801008cf: 83 e0 7f and $0x7f,%eax
input.buf[input.e++ % INPUT_BUF] = c;
801008d2: 89 0d 68 09 11 80 mov %ecx,0x80110968
c = (c == '\r') ? '\n' : c;
801008d8: 83 fb 0d cmp $0xd,%ebx
801008db: 0f 84 02 01 00 00 je 801009e3 <consoleintr+0x183>
input.buf[input.e++ % INPUT_BUF] = c;
801008e1: 88 98 e0 08 11 80 mov %bl,-0x7feef720(%eax)
if(panicked){
801008e7: 85 d2 test %edx,%edx
801008e9: 0f 85 ff 00 00 00 jne 801009ee <consoleintr+0x18e>
801008ef: 89 d8 mov %ebx,%eax
801008f1: e8 1a fb ff ff call 80100410 <consputc.part.0>
if(c == '\n' || c == C('D') || input.e == input.r+INPUT_BUF){
801008f6: 83 fb 0a cmp $0xa,%ebx
801008f9: 0f 84 0f 01 00 00 je 80100a0e <consoleintr+0x1ae>
801008ff: 83 fb 04 cmp $0x4,%ebx
80100902: 0f 84 06 01 00 00 je 80100a0e <consoleintr+0x1ae>
80100908: a1 60 09 11 80 mov 0x80110960,%eax
8010090d: 83 e8 80 sub $0xffffff80,%eax
80100910: 39 05 68 09 11 80 cmp %eax,0x80110968
80100916: 75 80 jne 80100898 <consoleintr+0x38>
80100918: e9 f6 00 00 00 jmp 80100a13 <consoleintr+0x1b3>
8010091d: 8d 76 00 lea 0x0(%esi),%esi
while(input.e != input.w &&
80100920: a1 68 09 11 80 mov 0x80110968,%eax
80100925: 39 05 64 09 11 80 cmp %eax,0x80110964
8010092b: 0f 84 67 ff ff ff je 80100898 <consoleintr+0x38>
input.buf[(input.e-1) % INPUT_BUF] != '\n'){
80100931: 83 e8 01 sub $0x1,%eax
80100934: 89 c2 mov %eax,%edx
80100936: 83 e2 7f and $0x7f,%edx
while(input.e != input.w &&
80100939: 80 ba e0 08 11 80 0a cmpb $0xa,-0x7feef720(%edx)
80100940: 0f 84 52 ff ff ff je 80100898 <consoleintr+0x38>
if(panicked){
80100946: 8b 15 58 a5 10 80 mov 0x8010a558,%edx
input.e--;
8010094c: a3 68 09 11 80 mov %eax,0x80110968
if(panicked){
80100951: 85 d2 test %edx,%edx
80100953: 74 0b je 80100960 <consoleintr+0x100>
80100955: fa cli
for(;;)
80100956: eb fe jmp 80100956 <consoleintr+0xf6>
80100958: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010095f: 90 nop
80100960: b8 00 01 00 00 mov $0x100,%eax
80100965: e8 a6 fa ff ff call 80100410 <consputc.part.0>
while(input.e != input.w &&
8010096a: a1 68 09 11 80 mov 0x80110968,%eax
8010096f: 3b 05 64 09 11 80 cmp 0x80110964,%eax
80100975: 75 ba jne 80100931 <consoleintr+0xd1>
80100977: e9 1c ff ff ff jmp 80100898 <consoleintr+0x38>
8010097c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if(input.e != input.w){
80100980: a1 68 09 11 80 mov 0x80110968,%eax
80100985: 3b 05 64 09 11 80 cmp 0x80110964,%eax
8010098b: 0f 84 07 ff ff ff je 80100898 <consoleintr+0x38>
input.e--;
80100991: 83 e8 01 sub $0x1,%eax
80100994: a3 68 09 11 80 mov %eax,0x80110968
if(panicked){
80100999: a1 58 a5 10 80 mov 0x8010a558,%eax
8010099e: 85 c0 test %eax,%eax
801009a0: 74 16 je 801009b8 <consoleintr+0x158>
801009a2: fa cli
for(;;)
801009a3: eb fe jmp 801009a3 <consoleintr+0x143>
801009a5: 8d 76 00 lea 0x0(%esi),%esi
if(c != 0 && input.e-input.r < INPUT_BUF){
801009a8: 85 db test %ebx,%ebx
801009aa: 0f 84 e8 fe ff ff je 80100898 <consoleintr+0x38>
801009b0: e9 ff fe ff ff jmp 801008b4 <consoleintr+0x54>
801009b5: 8d 76 00 lea 0x0(%esi),%esi
801009b8: b8 00 01 00 00 mov $0x100,%eax
801009bd: e8 4e fa ff ff call 80100410 <consputc.part.0>
801009c2: e9 d1 fe ff ff jmp 80100898 <consoleintr+0x38>
release(&cons.lock);
801009c7: 83 ec 0c sub $0xc,%esp
801009ca: 68 20 a5 10 80 push $0x8010a520
801009cf: e8 6c 3e 00 00 call 80104840 <release>
if(doprocdump) {
801009d4: 83 c4 10 add $0x10,%esp
801009d7: 85 f6 test %esi,%esi
801009d9: 75 1d jne 801009f8 <consoleintr+0x198>
}
801009db: 8d 65 f4 lea -0xc(%ebp),%esp
801009de: 5b pop %ebx
801009df: 5e pop %esi
801009e0: 5f pop %edi
801009e1: 5d pop %ebp
801009e2: c3 ret
input.buf[input.e++ % INPUT_BUF] = c;
801009e3: c6 80 e0 08 11 80 0a movb $0xa,-0x7feef720(%eax)
if(panicked){
801009ea: 85 d2 test %edx,%edx
801009ec: 74 16 je 80100a04 <consoleintr+0x1a4>
801009ee: fa cli
for(;;)
801009ef: eb fe jmp 801009ef <consoleintr+0x18f>
801009f1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
}
801009f8: 8d 65 f4 lea -0xc(%ebp),%esp
801009fb: 5b pop %ebx
801009fc: 5e pop %esi
801009fd: 5f pop %edi
801009fe: 5d pop %ebp
procdump(); // now call procdump() wo. cons.lock held
801009ff: e9 cc 37 00 00 jmp 801041d0 <procdump>
80100a04: b8 0a 00 00 00 mov $0xa,%eax
80100a09: e8 02 fa ff ff call 80100410 <consputc.part.0>
if(c == '\n' || c == C('D') || input.e == input.r+INPUT_BUF){
80100a0e: a1 68 09 11 80 mov 0x80110968,%eax
wakeup(&input.r);
80100a13: 83 ec 0c sub $0xc,%esp
input.w = input.e;
80100a16: a3 64 09 11 80 mov %eax,0x80110964
wakeup(&input.r);
80100a1b: 68 60 09 11 80 push $0x80110960
80100a20: e8 bb 36 00 00 call 801040e0 <wakeup>
80100a25: 83 c4 10 add $0x10,%esp
80100a28: e9 6b fe ff ff jmp 80100898 <consoleintr+0x38>
80100a2d: 8d 76 00 lea 0x0(%esi),%esi
80100a30 <consoleinit>:
void
consoleinit(void)
{
80100a30: f3 0f 1e fb endbr32
80100a34: 55 push %ebp
80100a35: 89 e5 mov %esp,%ebp
80100a37: 83 ec 10 sub $0x10,%esp
initlock(&cons.lock, "console");
80100a3a: 68 e8 75 10 80 push $0x801075e8
80100a3f: 68 20 a5 10 80 push $0x8010a520
80100a44: e8 b7 3b 00 00 call 80104600 <initlock>
devsw[CONSOLE].write = consolewrite;
devsw[CONSOLE].read = consoleread;
cons.locking = 1;
ioapicenable(IRQ_KBD, 0);
80100a49: 58 pop %eax
80100a4a: 5a pop %edx
80100a4b: 6a 00 push $0x0
80100a4d: 6a 01 push $0x1
devsw[CONSOLE].write = consolewrite;
80100a4f: c7 05 2c 13 11 80 40 movl $0x80100640,0x8011132c
80100a56: 06 10 80
devsw[CONSOLE].read = consoleread;
80100a59: c7 05 28 13 11 80 90 movl $0x80100290,0x80111328
80100a60: 02 10 80
cons.locking = 1;
80100a63: c7 05 54 a5 10 80 01 movl $0x1,0x8010a554
80100a6a: 00 00 00
ioapicenable(IRQ_KBD, 0);
80100a6d: e8 be 19 00 00 call 80102430 <ioapicenable>
}
80100a72: 83 c4 10 add $0x10,%esp
80100a75: c9 leave
80100a76: c3 ret
80100a77: 66 90 xchg %ax,%ax
80100a79: 66 90 xchg %ax,%ax
80100a7b: 66 90 xchg %ax,%ax
80100a7d: 66 90 xchg %ax,%ax
80100a7f: 90 nop
80100a80 <exec>:
#include "x86.h"
#include "elf.h"
int
exec(char *path, char **argv)
{
80100a80: f3 0f 1e fb endbr32
80100a84: 55 push %ebp
80100a85: 89 e5 mov %esp,%ebp
80100a87: 57 push %edi
80100a88: 56 push %esi
80100a89: 53 push %ebx
80100a8a: 81 ec 0c 01 00 00 sub $0x10c,%esp
uint argc, sz, sp, ustack[3+MAXARG+1];
struct elfhdr elf;
struct inode *ip;
struct proghdr ph;
pde_t *pgdir, *oldpgdir;
struct proc *curproc = myproc();
80100a90: e8 cb 2e 00 00 call 80103960 <myproc>
80100a95: 89 85 ec fe ff ff mov %eax,-0x114(%ebp)
begin_op();
80100a9b: e8 90 22 00 00 call 80102d30 <begin_op>
if((ip = namei(path)) == 0){
80100aa0: 83 ec 0c sub $0xc,%esp
80100aa3: ff 75 08 pushl 0x8(%ebp)
80100aa6: e8 85 15 00 00 call 80102030 <namei>
80100aab: 83 c4 10 add $0x10,%esp
80100aae: 85 c0 test %eax,%eax
80100ab0: 0f 84 fe 02 00 00 je 80100db4 <exec+0x334>
end_op();
cprintf("exec: fail\n");
return -1;
}
ilock(ip);
80100ab6: 83 ec 0c sub $0xc,%esp
80100ab9: 89 c3 mov %eax,%ebx
80100abb: 50 push %eax
80100abc: e8 9f 0c 00 00 call 80101760 <ilock>
pgdir = 0;
// Check ELF header
if(readi(ip, (char*)&elf, 0, sizeof(elf)) != sizeof(elf))
80100ac1: 8d 85 24 ff ff ff lea -0xdc(%ebp),%eax
80100ac7: 6a 34 push $0x34
80100ac9: 6a 00 push $0x0
80100acb: 50 push %eax
80100acc: 53 push %ebx
80100acd: e8 8e 0f 00 00 call 80101a60 <readi>
80100ad2: 83 c4 20 add $0x20,%esp
80100ad5: 83 f8 34 cmp $0x34,%eax
80100ad8: 74 26 je 80100b00 <exec+0x80>
bad:
if(pgdir)
freevm(pgdir);
if(ip){
iunlockput(ip);
80100ada: 83 ec 0c sub $0xc,%esp
80100add: 53 push %ebx
80100ade: e8 1d 0f 00 00 call 80101a00 <iunlockput>
end_op();
80100ae3: e8 b8 22 00 00 call 80102da0 <end_op>
80100ae8: 83 c4 10 add $0x10,%esp
}
return -1;
80100aeb: b8 ff ff ff ff mov $0xffffffff,%eax
}
80100af0: 8d 65 f4 lea -0xc(%ebp),%esp
80100af3: 5b pop %ebx
80100af4: 5e pop %esi
80100af5: 5f pop %edi
80100af6: 5d pop %ebp
80100af7: c3 ret
80100af8: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80100aff: 90 nop
if(elf.magic != ELF_MAGIC)
80100b00: 81 bd 24 ff ff ff 7f cmpl $0x464c457f,-0xdc(%ebp)
80100b07: 45 4c 46
80100b0a: 75 ce jne 80100ada <exec+0x5a>
if((pgdir = setupkvm()) == 0)
80100b0c: e8 ff 65 00 00 call 80107110 <setupkvm>
80100b11: 89 85 f4 fe ff ff mov %eax,-0x10c(%ebp)
80100b17: 85 c0 test %eax,%eax
80100b19: 74 bf je 80100ada <exec+0x5a>
for(i=0, off=elf.phoff; i<elf.phnum; i++, off+=sizeof(ph)){
80100b1b: 66 83 bd 50 ff ff ff cmpw $0x0,-0xb0(%ebp)
80100b22: 00
80100b23: 8b b5 40 ff ff ff mov -0xc0(%ebp),%esi
80100b29: 0f 84 a4 02 00 00 je 80100dd3 <exec+0x353>
sz = 0;
80100b2f: c7 85 f0 fe ff ff 00 movl $0x0,-0x110(%ebp)
80100b36: 00 00 00
for(i=0, off=elf.phoff; i<elf.phnum; i++, off+=sizeof(ph)){
80100b39: 31 ff xor %edi,%edi
80100b3b: e9 86 00 00 00 jmp 80100bc6 <exec+0x146>
if(ph.type != ELF_PROG_LOAD)
80100b40: 83 bd 04 ff ff ff 01 cmpl $0x1,-0xfc(%ebp)
80100b47: 75 6c jne 80100bb5 <exec+0x135>
if(ph.memsz < ph.filesz)
80100b49: 8b 85 18 ff ff ff mov -0xe8(%ebp),%eax
80100b4f: 3b 85 14 ff ff ff cmp -0xec(%ebp),%eax
80100b55: 0f 82 87 00 00 00 jb 80100be2 <exec+0x162>
if(ph.vaddr + ph.memsz < ph.vaddr)
80100b5b: 03 85 0c ff ff ff add -0xf4(%ebp),%eax
80100b61: 72 7f jb 80100be2 <exec+0x162>
if((sz = allocuvm(pgdir, sz, ph.vaddr + ph.memsz)) == 0)
80100b63: 83 ec 04 sub $0x4,%esp
80100b66: 50 push %eax
80100b67: ff b5 f0 fe ff ff pushl -0x110(%ebp)
80100b6d: ff b5 f4 fe ff ff pushl -0x10c(%ebp)
80100b73: e8 b8 63 00 00 call 80106f30 <allocuvm>
80100b78: 83 c4 10 add $0x10,%esp
80100b7b: 89 85 f0 fe ff ff mov %eax,-0x110(%ebp)
80100b81: 85 c0 test %eax,%eax
80100b83: 74 5d je 80100be2 <exec+0x162>
if(ph.vaddr % PGSIZE != 0)
80100b85: 8b 85 0c ff ff ff mov -0xf4(%ebp),%eax
80100b8b: a9 ff 0f 00 00 test $0xfff,%eax
80100b90: 75 50 jne 80100be2 <exec+0x162>
if(loaduvm(pgdir, (char*)ph.vaddr, ip, ph.off, ph.filesz) < 0)
80100b92: 83 ec 0c sub $0xc,%esp
80100b95: ff b5 14 ff ff ff pushl -0xec(%ebp)
80100b9b: ff b5 08 ff ff ff pushl -0xf8(%ebp)
80100ba1: 53 push %ebx
80100ba2: 50 push %eax
80100ba3: ff b5 f4 fe ff ff pushl -0x10c(%ebp)
80100ba9: e8 b2 62 00 00 call 80106e60 <loaduvm>
80100bae: 83 c4 20 add $0x20,%esp
80100bb1: 85 c0 test %eax,%eax
80100bb3: 78 2d js 80100be2 <exec+0x162>
for(i=0, off=elf.phoff; i<elf.phnum; i++, off+=sizeof(ph)){
80100bb5: 0f b7 85 50 ff ff ff movzwl -0xb0(%ebp),%eax
80100bbc: 83 c7 01 add $0x1,%edi
80100bbf: 83 c6 20 add $0x20,%esi
80100bc2: 39 f8 cmp %edi,%eax
80100bc4: 7e 3a jle 80100c00 <exec+0x180>
if(readi(ip, (char*)&ph, off, sizeof(ph)) != sizeof(ph))
80100bc6: 8d 85 04 ff ff ff lea -0xfc(%ebp),%eax
80100bcc: 6a 20 push $0x20
80100bce: 56 push %esi
80100bcf: 50 push %eax
80100bd0: 53 push %ebx
80100bd1: e8 8a 0e 00 00 call 80101a60 <readi>
80100bd6: 83 c4 10 add $0x10,%esp
80100bd9: 83 f8 20 cmp $0x20,%eax
80100bdc: 0f 84 5e ff ff ff je 80100b40 <exec+0xc0>
freevm(pgdir);
80100be2: 83 ec 0c sub $0xc,%esp
80100be5: ff b5 f4 fe ff ff pushl -0x10c(%ebp)
80100beb: e8 a0 64 00 00 call 80107090 <freevm>
if(ip){
80100bf0: 83 c4 10 add $0x10,%esp
80100bf3: e9 e2 fe ff ff jmp 80100ada <exec+0x5a>
80100bf8: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80100bff: 90 nop
80100c00: 8b bd f0 fe ff ff mov -0x110(%ebp),%edi
80100c06: 81 c7 ff 0f 00 00 add $0xfff,%edi
80100c0c: 81 e7 00 f0 ff ff and $0xfffff000,%edi
80100c12: 8d b7 00 20 00 00 lea 0x2000(%edi),%esi
iunlockput(ip);
80100c18: 83 ec 0c sub $0xc,%esp
80100c1b: 53 push %ebx
80100c1c: e8 df 0d 00 00 call 80101a00 <iunlockput>
end_op();
80100c21: e8 7a 21 00 00 call 80102da0 <end_op>
if((sz = allocuvm(pgdir, sz, sz + 2*PGSIZE)) == 0)
80100c26: 83 c4 0c add $0xc,%esp
80100c29: 56 push %esi
80100c2a: 57 push %edi
80100c2b: 8b bd f4 fe ff ff mov -0x10c(%ebp),%edi
80100c31: 57 push %edi
80100c32: e8 f9 62 00 00 call 80106f30 <allocuvm>
80100c37: 83 c4 10 add $0x10,%esp
80100c3a: 89 c6 mov %eax,%esi
80100c3c: 85 c0 test %eax,%eax
80100c3e: 0f 84 94 00 00 00 je 80100cd8 <exec+0x258>
clearpteu(pgdir, (char*)(sz - 2*PGSIZE));
80100c44: 83 ec 08 sub $0x8,%esp
80100c47: 8d 80 00 e0 ff ff lea -0x2000(%eax),%eax
for(argc = 0; argv[argc]; argc++) {
80100c4d: 89 f3 mov %esi,%ebx
clearpteu(pgdir, (char*)(sz - 2*PGSIZE));
80100c4f: 50 push %eax
80100c50: 57 push %edi
for(argc = 0; argv[argc]; argc++) {
80100c51: 31 ff xor %edi,%edi
clearpteu(pgdir, (char*)(sz - 2*PGSIZE));
80100c53: e8 58 65 00 00 call 801071b0 <clearpteu>
for(argc = 0; argv[argc]; argc++) {
80100c58: 8b 45 0c mov 0xc(%ebp),%eax
80100c5b: 83 c4 10 add $0x10,%esp
80100c5e: 8d 95 58 ff ff ff lea -0xa8(%ebp),%edx
80100c64: 8b 00 mov (%eax),%eax
80100c66: 85 c0 test %eax,%eax
80100c68: 0f 84 8b 00 00 00 je 80100cf9 <exec+0x279>
80100c6e: 89 b5 f0 fe ff ff mov %esi,-0x110(%ebp)
80100c74: 8b b5 f4 fe ff ff mov -0x10c(%ebp),%esi
80100c7a: eb 23 jmp 80100c9f <exec+0x21f>
80100c7c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80100c80: 8b 45 0c mov 0xc(%ebp),%eax
ustack[3+argc] = sp;
80100c83: 89 9c bd 64 ff ff ff mov %ebx,-0x9c(%ebp,%edi,4)
for(argc = 0; argv[argc]; argc++) {
80100c8a: 83 c7 01 add $0x1,%edi
ustack[3+argc] = sp;
80100c8d: 8d 95 58 ff ff ff lea -0xa8(%ebp),%edx
for(argc = 0; argv[argc]; argc++) {
80100c93: 8b 04 b8 mov (%eax,%edi,4),%eax
80100c96: 85 c0 test %eax,%eax
80100c98: 74 59 je 80100cf3 <exec+0x273>
if(argc >= MAXARG)
80100c9a: 83 ff 20 cmp $0x20,%edi
80100c9d: 74 39 je 80100cd8 <exec+0x258>
sp = (sp - (strlen(argv[argc]) + 1)) & ~3;
80100c9f: 83 ec 0c sub $0xc,%esp
80100ca2: 50 push %eax
80100ca3: e8 e8 3d 00 00 call 80104a90 <strlen>
80100ca8: f7 d0 not %eax
80100caa: 01 c3 add %eax,%ebx
if(copyout(pgdir, sp, argv[argc], strlen(argv[argc]) + 1) < 0)
80100cac: 58 pop %eax
80100cad: 8b 45 0c mov 0xc(%ebp),%eax
sp = (sp - (strlen(argv[argc]) + 1)) & ~3;
80100cb0: 83 e3 fc and $0xfffffffc,%ebx
if(copyout(pgdir, sp, argv[argc], strlen(argv[argc]) + 1) < 0)
80100cb3: ff 34 b8 pushl (%eax,%edi,4)
80100cb6: e8 d5 3d 00 00 call 80104a90 <strlen>
80100cbb: 83 c0 01 add $0x1,%eax
80100cbe: 50 push %eax
80100cbf: 8b 45 0c mov 0xc(%ebp),%eax
80100cc2: ff 34 b8 pushl (%eax,%edi,4)
80100cc5: 53 push %ebx
80100cc6: 56 push %esi
80100cc7: e8 44 66 00 00 call 80107310 <copyout>
80100ccc: 83 c4 20 add $0x20,%esp
80100ccf: 85 c0 test %eax,%eax
80100cd1: 79 ad jns 80100c80 <exec+0x200>
80100cd3: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80100cd7: 90 nop
freevm(pgdir);
80100cd8: 83 ec 0c sub $0xc,%esp
80100cdb: ff b5 f4 fe ff ff pushl -0x10c(%ebp)
80100ce1: e8 aa 63 00 00 call 80107090 <freevm>
80100ce6: 83 c4 10 add $0x10,%esp
return -1;
80100ce9: b8 ff ff ff ff mov $0xffffffff,%eax
80100cee: e9 fd fd ff ff jmp 80100af0 <exec+0x70>
80100cf3: 8b b5 f0 fe ff ff mov -0x110(%ebp),%esi
ustack[2] = sp - (argc+1)*4; // argv pointer
80100cf9: 8d 04 bd 04 00 00 00 lea 0x4(,%edi,4),%eax
80100d00: 89 d9 mov %ebx,%ecx
ustack[3+argc] = 0;
80100d02: c7 84 bd 64 ff ff ff movl $0x0,-0x9c(%ebp,%edi,4)
80100d09: 00 00 00 00
ustack[2] = sp - (argc+1)*4; // argv pointer
80100d0d: 29 c1 sub %eax,%ecx
sp -= (3+argc+1) * 4;
80100d0f: 83 c0 0c add $0xc,%eax
ustack[1] = argc;
80100d12: 89 bd 5c ff ff ff mov %edi,-0xa4(%ebp)
sp -= (3+argc+1) * 4;
80100d18: 29 c3 sub %eax,%ebx
if(copyout(pgdir, sp, ustack, (3+argc+1)*4) < 0)
80100d1a: 50 push %eax
80100d1b: 52 push %edx
80100d1c: 53 push %ebx
80100d1d: ff b5 f4 fe ff ff pushl -0x10c(%ebp)
ustack[0] = 0xffffffff; // fake return PC
80100d23: c7 85 58 ff ff ff ff movl $0xffffffff,-0xa8(%ebp)
80100d2a: ff ff ff
ustack[2] = sp - (argc+1)*4; // argv pointer
80100d2d: 89 8d 60 ff ff ff mov %ecx,-0xa0(%ebp)
if(copyout(pgdir, sp, ustack, (3+argc+1)*4) < 0)
80100d33: e8 d8 65 00 00 call 80107310 <copyout>
80100d38: 83 c4 10 add $0x10,%esp
80100d3b: 85 c0 test %eax,%eax
80100d3d: 78 99 js 80100cd8 <exec+0x258>
for(last=s=path; *s; s++)
80100d3f: 8b 45 08 mov 0x8(%ebp),%eax
80100d42: 8b 55 08 mov 0x8(%ebp),%edx
80100d45: 0f b6 00 movzbl (%eax),%eax
80100d48: 84 c0 test %al,%al
80100d4a: 74 13 je 80100d5f <exec+0x2df>
80100d4c: 89 d1 mov %edx,%ecx
80100d4e: 66 90 xchg %ax,%ax
if(*s == '/')
80100d50: 83 c1 01 add $0x1,%ecx
80100d53: 3c 2f cmp $0x2f,%al
for(last=s=path; *s; s++)
80100d55: 0f b6 01 movzbl (%ecx),%eax
if(*s == '/')
80100d58: 0f 44 d1 cmove %ecx,%edx
for(last=s=path; *s; s++)
80100d5b: 84 c0 test %al,%al
80100d5d: 75 f1 jne 80100d50 <exec+0x2d0>
safestrcpy(curproc->name, last, sizeof(curproc->name));
80100d5f: 8b bd ec fe ff ff mov -0x114(%ebp),%edi
80100d65: 83 ec 04 sub $0x4,%esp
80100d68: 6a 10 push $0x10
80100d6a: 89 f8 mov %edi,%eax
80100d6c: 52 push %edx
80100d6d: 83 c0 6c add $0x6c,%eax
80100d70: 50 push %eax
80100d71: e8 da 3c 00 00 call 80104a50 <safestrcpy>
curproc->pgdir = pgdir;
80100d76: 8b 8d f4 fe ff ff mov -0x10c(%ebp),%ecx
oldpgdir = curproc->pgdir;
80100d7c: 89 f8 mov %edi,%eax
80100d7e: 8b 7f 04 mov 0x4(%edi),%edi
curproc->sz = sz;
80100d81: 89 30 mov %esi,(%eax)
curproc->pgdir = pgdir;
80100d83: 89 48 04 mov %ecx,0x4(%eax)
curproc->tf->eip = elf.entry; // main
80100d86: 89 c1 mov %eax,%ecx
80100d88: 8b 95 3c ff ff ff mov -0xc4(%ebp),%edx
80100d8e: 8b 40 18 mov 0x18(%eax),%eax
80100d91: 89 50 38 mov %edx,0x38(%eax)
curproc->tf->esp = sp;
80100d94: 8b 41 18 mov 0x18(%ecx),%eax
80100d97: 89 58 44 mov %ebx,0x44(%eax)
switchuvm(curproc);
80100d9a: 89 0c 24 mov %ecx,(%esp)
80100d9d: e8 2e 5f 00 00 call 80106cd0 <switchuvm>
freevm(oldpgdir);
80100da2: 89 3c 24 mov %edi,(%esp)
80100da5: e8 e6 62 00 00 call 80107090 <freevm>
return 0;
80100daa: 83 c4 10 add $0x10,%esp
80100dad: 31 c0 xor %eax,%eax
80100daf: e9 3c fd ff ff jmp 80100af0 <exec+0x70>
end_op();
80100db4: e8 e7 1f 00 00 call 80102da0 <end_op>
cprintf("exec: fail\n");
80100db9: 83 ec 0c sub $0xc,%esp
80100dbc: 68 01 76 10 80 push $0x80107601
80100dc1: e8 ea f8 ff ff call 801006b0 <cprintf>
return -1;
80100dc6: 83 c4 10 add $0x10,%esp
80100dc9: b8 ff ff ff ff mov $0xffffffff,%eax
80100dce: e9 1d fd ff ff jmp 80100af0 <exec+0x70>
for(i=0, off=elf.phoff; i<elf.phnum; i++, off+=sizeof(ph)){
80100dd3: 31 ff xor %edi,%edi
80100dd5: be 00 20 00 00 mov $0x2000,%esi
80100dda: e9 39 fe ff ff jmp 80100c18 <exec+0x198>
80100ddf: 90 nop
80100de0 <fileinit>:
struct file file[NFILE];
} ftable;
void
fileinit(void)
{
80100de0: f3 0f 1e fb endbr32
80100de4: 55 push %ebp
80100de5: 89 e5 mov %esp,%ebp
80100de7: 83 ec 10 sub $0x10,%esp
initlock(&ftable.lock, "ftable");
80100dea: 68 0d 76 10 80 push $0x8010760d
80100def: 68 80 09 11 80 push $0x80110980
80100df4: e8 07 38 00 00 call 80104600 <initlock>
}
80100df9: 83 c4 10 add $0x10,%esp
80100dfc: c9 leave
80100dfd: c3 ret
80100dfe: 66 90 xchg %ax,%ax
80100e00 <filealloc>:
// Allocate a file structure.
struct file*
filealloc(void)
{
80100e00: f3 0f 1e fb endbr32
80100e04: 55 push %ebp
80100e05: 89 e5 mov %esp,%ebp
80100e07: 53 push %ebx
struct file *f;
acquire(&ftable.lock);
for(f = ftable.file; f < ftable.file + NFILE; f++){
80100e08: bb b4 09 11 80 mov $0x801109b4,%ebx
{
80100e0d: 83 ec 10 sub $0x10,%esp
acquire(&ftable.lock);
80100e10: 68 80 09 11 80 push $0x80110980
80100e15: e8 66 39 00 00 call 80104780 <acquire>
80100e1a: 83 c4 10 add $0x10,%esp
80100e1d: eb 0c jmp 80100e2b <filealloc+0x2b>
80100e1f: 90 nop
for(f = ftable.file; f < ftable.file + NFILE; f++){
80100e20: 83 c3 18 add $0x18,%ebx
80100e23: 81 fb 14 13 11 80 cmp $0x80111314,%ebx
80100e29: 74 25 je 80100e50 <filealloc+0x50>
if(f->ref == 0){
80100e2b: 8b 43 04 mov 0x4(%ebx),%eax
80100e2e: 85 c0 test %eax,%eax
80100e30: 75 ee jne 80100e20 <filealloc+0x20>
f->ref = 1;
release(&ftable.lock);
80100e32: 83 ec 0c sub $0xc,%esp
f->ref = 1;
80100e35: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx)
release(&ftable.lock);
80100e3c: 68 80 09 11 80 push $0x80110980
80100e41: e8 fa 39 00 00 call 80104840 <release>
return f;
}
}
release(&ftable.lock);
return 0;
}
80100e46: 89 d8 mov %ebx,%eax
return f;
80100e48: 83 c4 10 add $0x10,%esp
}
80100e4b: 8b 5d fc mov -0x4(%ebp),%ebx
80100e4e: c9 leave
80100e4f: c3 ret
release(&ftable.lock);
80100e50: 83 ec 0c sub $0xc,%esp
return 0;
80100e53: 31 db xor %ebx,%ebx
release(&ftable.lock);
80100e55: 68 80 09 11 80 push $0x80110980
80100e5a: e8 e1 39 00 00 call 80104840 <release>
}
80100e5f: 89 d8 mov %ebx,%eax
return 0;
80100e61: 83 c4 10 add $0x10,%esp
}
80100e64: 8b 5d fc mov -0x4(%ebp),%ebx
80100e67: c9 leave
80100e68: c3 ret
80100e69: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80100e70 <filedup>:
// Increment ref count for file f.
struct file*
filedup(struct file *f)
{
80100e70: f3 0f 1e fb endbr32
80100e74: 55 push %ebp
80100e75: 89 e5 mov %esp,%ebp
80100e77: 53 push %ebx
80100e78: 83 ec 10 sub $0x10,%esp
80100e7b: 8b 5d 08 mov 0x8(%ebp),%ebx
acquire(&ftable.lock);
80100e7e: 68 80 09 11 80 push $0x80110980
80100e83: e8 f8 38 00 00 call 80104780 <acquire>
if(f->ref < 1)
80100e88: 8b 43 04 mov 0x4(%ebx),%eax
80100e8b: 83 c4 10 add $0x10,%esp
80100e8e: 85 c0 test %eax,%eax
80100e90: 7e 1a jle 80100eac <filedup+0x3c>
panic("filedup");
f->ref++;
80100e92: 83 c0 01 add $0x1,%eax
release(&ftable.lock);
80100e95: 83 ec 0c sub $0xc,%esp
f->ref++;
80100e98: 89 43 04 mov %eax,0x4(%ebx)
release(&ftable.lock);
80100e9b: 68 80 09 11 80 push $0x80110980
80100ea0: e8 9b 39 00 00 call 80104840 <release>
return f;
}
80100ea5: 89 d8 mov %ebx,%eax
80100ea7: 8b 5d fc mov -0x4(%ebp),%ebx
80100eaa: c9 leave
80100eab: c3 ret
panic("filedup");
80100eac: 83 ec 0c sub $0xc,%esp
80100eaf: 68 14 76 10 80 push $0x80107614
80100eb4: e8 d7 f4 ff ff call 80100390 <panic>
80100eb9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80100ec0 <fileclose>:
// Close file f. (Decrement ref count, close when reaches 0.)
void
fileclose(struct file *f)
{
80100ec0: f3 0f 1e fb endbr32
80100ec4: 55 push %ebp
80100ec5: 89 e5 mov %esp,%ebp
80100ec7: 57 push %edi
80100ec8: 56 push %esi
80100ec9: 53 push %ebx
80100eca: 83 ec 28 sub $0x28,%esp
80100ecd: 8b 5d 08 mov 0x8(%ebp),%ebx
struct file ff;
acquire(&ftable.lock);
80100ed0: 68 80 09 11 80 push $0x80110980
80100ed5: e8 a6 38 00 00 call 80104780 <acquire>
if(f->ref < 1)
80100eda: 8b 53 04 mov 0x4(%ebx),%edx
80100edd: 83 c4 10 add $0x10,%esp
80100ee0: 85 d2 test %edx,%edx
80100ee2: 0f 8e a1 00 00 00 jle 80100f89 <fileclose+0xc9>
panic("fileclose");
if(--f->ref > 0){
80100ee8: 83 ea 01 sub $0x1,%edx
80100eeb: 89 53 04 mov %edx,0x4(%ebx)
80100eee: 75 40 jne 80100f30 <fileclose+0x70>
release(&ftable.lock);
return;
}
ff = *f;
80100ef0: 0f b6 43 09 movzbl 0x9(%ebx),%eax
f->ref = 0;
f->type = FD_NONE;
release(&ftable.lock);
80100ef4: 83 ec 0c sub $0xc,%esp
ff = *f;
80100ef7: 8b 3b mov (%ebx),%edi
f->type = FD_NONE;
80100ef9: c7 03 00 00 00 00 movl $0x0,(%ebx)
ff = *f;
80100eff: 8b 73 0c mov 0xc(%ebx),%esi
80100f02: 88 45 e7 mov %al,-0x19(%ebp)
80100f05: 8b 43 10 mov 0x10(%ebx),%eax
release(&ftable.lock);
80100f08: 68 80 09 11 80 push $0x80110980
ff = *f;
80100f0d: 89 45 e0 mov %eax,-0x20(%ebp)
release(&ftable.lock);
80100f10: e8 2b 39 00 00 call 80104840 <release>
if(ff.type == FD_PIPE)
80100f15: 83 c4 10 add $0x10,%esp
80100f18: 83 ff 01 cmp $0x1,%edi
80100f1b: 74 53 je 80100f70 <fileclose+0xb0>
pipeclose(ff.pipe, ff.writable);
else if(ff.type == FD_INODE){
80100f1d: 83 ff 02 cmp $0x2,%edi
80100f20: 74 26 je 80100f48 <fileclose+0x88>
begin_op();
iput(ff.ip);
end_op();
}
}
80100f22: 8d 65 f4 lea -0xc(%ebp),%esp
80100f25: 5b pop %ebx
80100f26: 5e pop %esi
80100f27: 5f pop %edi
80100f28: 5d pop %ebp
80100f29: c3 ret
80100f2a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
release(&ftable.lock);
80100f30: c7 45 08 80 09 11 80 movl $0x80110980,0x8(%ebp)
}
80100f37: 8d 65 f4 lea -0xc(%ebp),%esp
80100f3a: 5b pop %ebx
80100f3b: 5e pop %esi
80100f3c: 5f pop %edi
80100f3d: 5d pop %ebp
release(&ftable.lock);
80100f3e: e9 fd 38 00 00 jmp 80104840 <release>
80100f43: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80100f47: 90 nop
begin_op();
80100f48: e8 e3 1d 00 00 call 80102d30 <begin_op>
iput(ff.ip);
80100f4d: 83 ec 0c sub $0xc,%esp
80100f50: ff 75 e0 pushl -0x20(%ebp)
80100f53: e8 38 09 00 00 call 80101890 <iput>
end_op();
80100f58: 83 c4 10 add $0x10,%esp
}
80100f5b: 8d 65 f4 lea -0xc(%ebp),%esp
80100f5e: 5b pop %ebx
80100f5f: 5e pop %esi
80100f60: 5f pop %edi
80100f61: 5d pop %ebp
end_op();
80100f62: e9 39 1e 00 00 jmp 80102da0 <end_op>
80100f67: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80100f6e: 66 90 xchg %ax,%ax
pipeclose(ff.pipe, ff.writable);
80100f70: 0f be 5d e7 movsbl -0x19(%ebp),%ebx
80100f74: 83 ec 08 sub $0x8,%esp
80100f77: 53 push %ebx
80100f78: 56 push %esi
80100f79: e8 82 25 00 00 call 80103500 <pipeclose>
80100f7e: 83 c4 10 add $0x10,%esp
}
80100f81: 8d 65 f4 lea -0xc(%ebp),%esp
80100f84: 5b pop %ebx
80100f85: 5e pop %esi
80100f86: 5f pop %edi
80100f87: 5d pop %ebp
80100f88: c3 ret
panic("fileclose");
80100f89: 83 ec 0c sub $0xc,%esp
80100f8c: 68 1c 76 10 80 push $0x8010761c
80100f91: e8 fa f3 ff ff call 80100390 <panic>
80100f96: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80100f9d: 8d 76 00 lea 0x0(%esi),%esi
80100fa0 <filestat>:
// Get metadata about file f.
int
filestat(struct file *f, struct stat *st)
{
80100fa0: f3 0f 1e fb endbr32
80100fa4: 55 push %ebp
80100fa5: 89 e5 mov %esp,%ebp
80100fa7: 53 push %ebx
80100fa8: 83 ec 04 sub $0x4,%esp
80100fab: 8b 5d 08 mov 0x8(%ebp),%ebx
if(f->type == FD_INODE){
80100fae: 83 3b 02 cmpl $0x2,(%ebx)
80100fb1: 75 2d jne 80100fe0 <filestat+0x40>
ilock(f->ip);
80100fb3: 83 ec 0c sub $0xc,%esp
80100fb6: ff 73 10 pushl 0x10(%ebx)
80100fb9: e8 a2 07 00 00 call 80101760 <ilock>
stati(f->ip, st);
80100fbe: 58 pop %eax
80100fbf: 5a pop %edx
80100fc0: ff 75 0c pushl 0xc(%ebp)
80100fc3: ff 73 10 pushl 0x10(%ebx)
80100fc6: e8 65 0a 00 00 call 80101a30 <stati>
iunlock(f->ip);
80100fcb: 59 pop %ecx
80100fcc: ff 73 10 pushl 0x10(%ebx)
80100fcf: e8 6c 08 00 00 call 80101840 <iunlock>
return 0;
}
return -1;
}
80100fd4: 8b 5d fc mov -0x4(%ebp),%ebx
return 0;
80100fd7: 83 c4 10 add $0x10,%esp
80100fda: 31 c0 xor %eax,%eax
}
80100fdc: c9 leave
80100fdd: c3 ret
80100fde: 66 90 xchg %ax,%ax
80100fe0: 8b 5d fc mov -0x4(%ebp),%ebx
return -1;
80100fe3: b8 ff ff ff ff mov $0xffffffff,%eax
}
80100fe8: c9 leave
80100fe9: c3 ret
80100fea: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80100ff0 <fileread>:
// Read from file f.
int
fileread(struct file *f, char *addr, int n)
{
80100ff0: f3 0f 1e fb endbr32
80100ff4: 55 push %ebp
80100ff5: 89 e5 mov %esp,%ebp
80100ff7: 57 push %edi
80100ff8: 56 push %esi
80100ff9: 53 push %ebx
80100ffa: 83 ec 0c sub $0xc,%esp
80100ffd: 8b 5d 08 mov 0x8(%ebp),%ebx
80101000: 8b 75 0c mov 0xc(%ebp),%esi
80101003: 8b 7d 10 mov 0x10(%ebp),%edi
int r;
if(f->readable == 0)
80101006: 80 7b 08 00 cmpb $0x0,0x8(%ebx)
8010100a: 74 64 je 80101070 <fileread+0x80>
return -1;
if(f->type == FD_PIPE)
8010100c: 8b 03 mov (%ebx),%eax
8010100e: 83 f8 01 cmp $0x1,%eax
80101011: 74 45 je 80101058 <fileread+0x68>
return piperead(f->pipe, addr, n);
if(f->type == FD_INODE){
80101013: 83 f8 02 cmp $0x2,%eax
80101016: 75 5f jne 80101077 <fileread+0x87>
ilock(f->ip);
80101018: 83 ec 0c sub $0xc,%esp
8010101b: ff 73 10 pushl 0x10(%ebx)
8010101e: e8 3d 07 00 00 call 80101760 <ilock>
if((r = readi(f->ip, addr, f->off, n)) > 0)
80101023: 57 push %edi
80101024: ff 73 14 pushl 0x14(%ebx)
80101027: 56 push %esi
80101028: ff 73 10 pushl 0x10(%ebx)
8010102b: e8 30 0a 00 00 call 80101a60 <readi>
80101030: 83 c4 20 add $0x20,%esp
80101033: 89 c6 mov %eax,%esi
80101035: 85 c0 test %eax,%eax
80101037: 7e 03 jle 8010103c <fileread+0x4c>
f->off += r;
80101039: 01 43 14 add %eax,0x14(%ebx)
iunlock(f->ip);
8010103c: 83 ec 0c sub $0xc,%esp
8010103f: ff 73 10 pushl 0x10(%ebx)
80101042: e8 f9 07 00 00 call 80101840 <iunlock>
return r;
80101047: 83 c4 10 add $0x10,%esp
}
panic("fileread");
}
8010104a: 8d 65 f4 lea -0xc(%ebp),%esp
8010104d: 89 f0 mov %esi,%eax
8010104f: 5b pop %ebx
80101050: 5e pop %esi
80101051: 5f pop %edi
80101052: 5d pop %ebp
80101053: c3 ret
80101054: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
return piperead(f->pipe, addr, n);
80101058: 8b 43 0c mov 0xc(%ebx),%eax
8010105b: 89 45 08 mov %eax,0x8(%ebp)
}
8010105e: 8d 65 f4 lea -0xc(%ebp),%esp
80101061: 5b pop %ebx
80101062: 5e pop %esi
80101063: 5f pop %edi
80101064: 5d pop %ebp
return piperead(f->pipe, addr, n);
80101065: e9 36 26 00 00 jmp 801036a0 <piperead>
8010106a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
return -1;
80101070: be ff ff ff ff mov $0xffffffff,%esi
80101075: eb d3 jmp 8010104a <fileread+0x5a>
panic("fileread");
80101077: 83 ec 0c sub $0xc,%esp
8010107a: 68 26 76 10 80 push $0x80107626
8010107f: e8 0c f3 ff ff call 80100390 <panic>
80101084: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010108b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
8010108f: 90 nop
80101090 <filewrite>:
//PAGEBREAK!
// Write to file f.
int
filewrite(struct file *f, char *addr, int n)
{
80101090: f3 0f 1e fb endbr32
80101094: 55 push %ebp
80101095: 89 e5 mov %esp,%ebp
80101097: 57 push %edi
80101098: 56 push %esi
80101099: 53 push %ebx
8010109a: 83 ec 1c sub $0x1c,%esp
8010109d: 8b 45 0c mov 0xc(%ebp),%eax
801010a0: 8b 75 08 mov 0x8(%ebp),%esi
801010a3: 89 45 dc mov %eax,-0x24(%ebp)
801010a6: 8b 45 10 mov 0x10(%ebp),%eax
int r;
if(f->writable == 0)
801010a9: 80 7e 09 00 cmpb $0x0,0x9(%esi)
{
801010ad: 89 45 e4 mov %eax,-0x1c(%ebp)
if(f->writable == 0)
801010b0: 0f 84 c1 00 00 00 je 80101177 <filewrite+0xe7>
return -1;
if(f->type == FD_PIPE)
801010b6: 8b 06 mov (%esi),%eax
801010b8: 83 f8 01 cmp $0x1,%eax
801010bb: 0f 84 c3 00 00 00 je 80101184 <filewrite+0xf4>
return pipewrite(f->pipe, addr, n);
if(f->type == FD_INODE){
801010c1: 83 f8 02 cmp $0x2,%eax
801010c4: 0f 85 cc 00 00 00 jne 80101196 <filewrite+0x106>
// 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 = ((MAXOPBLOCKS-1-1-2) / 2) * 512;
int i = 0;
while(i < n){
801010ca: 8b 45 e4 mov -0x1c(%ebp),%eax
int i = 0;
801010cd: 31 ff xor %edi,%edi
while(i < n){
801010cf: 85 c0 test %eax,%eax
801010d1: 7f 34 jg 80101107 <filewrite+0x77>
801010d3: e9 98 00 00 00 jmp 80101170 <filewrite+0xe0>
801010d8: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801010df: 90 nop
n1 = max;
begin_op();
ilock(f->ip);
if ((r = writei(f->ip, addr + i, f->off, n1)) > 0)
f->off += r;
801010e0: 01 46 14 add %eax,0x14(%esi)
iunlock(f->ip);
801010e3: 83 ec 0c sub $0xc,%esp
801010e6: ff 76 10 pushl 0x10(%esi)
f->off += r;
801010e9: 89 45 e0 mov %eax,-0x20(%ebp)
iunlock(f->ip);
801010ec: e8 4f 07 00 00 call 80101840 <iunlock>
end_op();
801010f1: e8 aa 1c 00 00 call 80102da0 <end_op>
if(r < 0)
break;
if(r != n1)
801010f6: 8b 45 e0 mov -0x20(%ebp),%eax
801010f9: 83 c4 10 add $0x10,%esp
801010fc: 39 c3 cmp %eax,%ebx
801010fe: 75 60 jne 80101160 <filewrite+0xd0>
panic("short filewrite");
i += r;
80101100: 01 df add %ebx,%edi
while(i < n){
80101102: 39 7d e4 cmp %edi,-0x1c(%ebp)
80101105: 7e 69 jle 80101170 <filewrite+0xe0>
int n1 = n - i;
80101107: 8b 5d e4 mov -0x1c(%ebp),%ebx
8010110a: b8 00 06 00 00 mov $0x600,%eax
8010110f: 29 fb sub %edi,%ebx
if(n1 > max)
80101111: 81 fb 00 06 00 00 cmp $0x600,%ebx
80101117: 0f 4f d8 cmovg %eax,%ebx
begin_op();
8010111a: e8 11 1c 00 00 call 80102d30 <begin_op>
ilock(f->ip);
8010111f: 83 ec 0c sub $0xc,%esp
80101122: ff 76 10 pushl 0x10(%esi)
80101125: e8 36 06 00 00 call 80101760 <ilock>
if ((r = writei(f->ip, addr + i, f->off, n1)) > 0)
8010112a: 8b 45 dc mov -0x24(%ebp),%eax
8010112d: 53 push %ebx
8010112e: ff 76 14 pushl 0x14(%esi)
80101131: 01 f8 add %edi,%eax
80101133: 50 push %eax
80101134: ff 76 10 pushl 0x10(%esi)
80101137: e8 24 0a 00 00 call 80101b60 <writei>
8010113c: 83 c4 20 add $0x20,%esp
8010113f: 85 c0 test %eax,%eax
80101141: 7f 9d jg 801010e0 <filewrite+0x50>
iunlock(f->ip);
80101143: 83 ec 0c sub $0xc,%esp
80101146: ff 76 10 pushl 0x10(%esi)
80101149: 89 45 e4 mov %eax,-0x1c(%ebp)
8010114c: e8 ef 06 00 00 call 80101840 <iunlock>
end_op();
80101151: e8 4a 1c 00 00 call 80102da0 <end_op>
if(r < 0)
80101156: 8b 45 e4 mov -0x1c(%ebp),%eax
80101159: 83 c4 10 add $0x10,%esp
8010115c: 85 c0 test %eax,%eax
8010115e: 75 17 jne 80101177 <filewrite+0xe7>
panic("short filewrite");
80101160: 83 ec 0c sub $0xc,%esp
80101163: 68 2f 76 10 80 push $0x8010762f
80101168: e8 23 f2 ff ff call 80100390 <panic>
8010116d: 8d 76 00 lea 0x0(%esi),%esi
}
return i == n ? n : -1;
80101170: 89 f8 mov %edi,%eax
80101172: 3b 7d e4 cmp -0x1c(%ebp),%edi
80101175: 74 05 je 8010117c <filewrite+0xec>
80101177: b8 ff ff ff ff mov $0xffffffff,%eax
}
panic("filewrite");
}
8010117c: 8d 65 f4 lea -0xc(%ebp),%esp
8010117f: 5b pop %ebx
80101180: 5e pop %esi
80101181: 5f pop %edi
80101182: 5d pop %ebp
80101183: c3 ret
return pipewrite(f->pipe, addr, n);
80101184: 8b 46 0c mov 0xc(%esi),%eax
80101187: 89 45 08 mov %eax,0x8(%ebp)
}
8010118a: 8d 65 f4 lea -0xc(%ebp),%esp
8010118d: 5b pop %ebx
8010118e: 5e pop %esi
8010118f: 5f pop %edi
80101190: 5d pop %ebp
return pipewrite(f->pipe, addr, n);
80101191: e9 0a 24 00 00 jmp 801035a0 <pipewrite>
panic("filewrite");
80101196: 83 ec 0c sub $0xc,%esp
80101199: 68 35 76 10 80 push $0x80107635
8010119e: e8 ed f1 ff ff call 80100390 <panic>
801011a3: 66 90 xchg %ax,%ax
801011a5: 66 90 xchg %ax,%ax
801011a7: 66 90 xchg %ax,%ax
801011a9: 66 90 xchg %ax,%ax
801011ab: 66 90 xchg %ax,%ax
801011ad: 66 90 xchg %ax,%ax
801011af: 90 nop
801011b0 <bfree>:
}
// Free a disk block.
static void
bfree(int dev, uint b)
{
801011b0: 55 push %ebp
801011b1: 89 c1 mov %eax,%ecx
struct buf *bp;
int bi, m;
bp = bread(dev, BBLOCK(b, sb));
801011b3: 89 d0 mov %edx,%eax
801011b5: c1 e8 0c shr $0xc,%eax
801011b8: 03 05 98 13 11 80 add 0x80111398,%eax
{
801011be: 89 e5 mov %esp,%ebp
801011c0: 56 push %esi
801011c1: 53 push %ebx
801011c2: 89 d3 mov %edx,%ebx
bp = bread(dev, BBLOCK(b, sb));
801011c4: 83 ec 08 sub $0x8,%esp
801011c7: 50 push %eax
801011c8: 51 push %ecx
801011c9: e8 02 ef ff ff call 801000d0 <bread>
bi = b % BPB;
m = 1 << (bi % 8);
801011ce: 89 d9 mov %ebx,%ecx
if((bp->data[bi/8] & m) == 0)
801011d0: c1 fb 03 sar $0x3,%ebx
m = 1 << (bi % 8);
801011d3: ba 01 00 00 00 mov $0x1,%edx
801011d8: 83 e1 07 and $0x7,%ecx
if((bp->data[bi/8] & m) == 0)
801011db: 81 e3 ff 01 00 00 and $0x1ff,%ebx
801011e1: 83 c4 10 add $0x10,%esp
m = 1 << (bi % 8);
801011e4: d3 e2 shl %cl,%edx
if((bp->data[bi/8] & m) == 0)
801011e6: 0f b6 4c 18 5c movzbl 0x5c(%eax,%ebx,1),%ecx
801011eb: 85 d1 test %edx,%ecx
801011ed: 74 25 je 80101214 <bfree+0x64>
panic("freeing free block");
bp->data[bi/8] &= ~m;
801011ef: f7 d2 not %edx
log_write(bp);
801011f1: 83 ec 0c sub $0xc,%esp
801011f4: 89 c6 mov %eax,%esi
bp->data[bi/8] &= ~m;
801011f6: 21 ca and %ecx,%edx
801011f8: 88 54 18 5c mov %dl,0x5c(%eax,%ebx,1)
log_write(bp);
801011fc: 50 push %eax
801011fd: e8 0e 1d 00 00 call 80102f10 <log_write>
brelse(bp);
80101202: 89 34 24 mov %esi,(%esp)
80101205: e8 e6 ef ff ff call 801001f0 <brelse>
}
8010120a: 83 c4 10 add $0x10,%esp
8010120d: 8d 65 f8 lea -0x8(%ebp),%esp
80101210: 5b pop %ebx
80101211: 5e pop %esi
80101212: 5d pop %ebp
80101213: c3 ret
panic("freeing free block");
80101214: 83 ec 0c sub $0xc,%esp
80101217: 68 3f 76 10 80 push $0x8010763f
8010121c: e8 6f f1 ff ff call 80100390 <panic>
80101221: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80101228: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010122f: 90 nop
80101230 <balloc>:
{
80101230: 55 push %ebp
80101231: 89 e5 mov %esp,%ebp
80101233: 57 push %edi
80101234: 56 push %esi
80101235: 53 push %ebx
80101236: 83 ec 1c sub $0x1c,%esp
for(b = 0; b < sb.size; b += BPB){
80101239: 8b 0d 80 13 11 80 mov 0x80111380,%ecx
{
8010123f: 89 45 d8 mov %eax,-0x28(%ebp)
for(b = 0; b < sb.size; b += BPB){
80101242: 85 c9 test %ecx,%ecx
80101244: 0f 84 87 00 00 00 je 801012d1 <balloc+0xa1>
8010124a: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp)
bp = bread(dev, BBLOCK(b, sb));
80101251: 8b 75 dc mov -0x24(%ebp),%esi
80101254: 83 ec 08 sub $0x8,%esp
80101257: 89 f0 mov %esi,%eax
80101259: c1 f8 0c sar $0xc,%eax
8010125c: 03 05 98 13 11 80 add 0x80111398,%eax
80101262: 50 push %eax
80101263: ff 75 d8 pushl -0x28(%ebp)
80101266: e8 65 ee ff ff call 801000d0 <bread>
8010126b: 83 c4 10 add $0x10,%esp
8010126e: 89 45 e4 mov %eax,-0x1c(%ebp)
for(bi = 0; bi < BPB && b + bi < sb.size; bi++){
80101271: a1 80 13 11 80 mov 0x80111380,%eax
80101276: 89 45 e0 mov %eax,-0x20(%ebp)
80101279: 31 c0 xor %eax,%eax
8010127b: eb 2f jmp 801012ac <balloc+0x7c>
8010127d: 8d 76 00 lea 0x0(%esi),%esi
m = 1 << (bi % 8);
80101280: 89 c1 mov %eax,%ecx
80101282: bb 01 00 00 00 mov $0x1,%ebx
if((bp->data[bi/8] & m) == 0){ // Is block free?
80101287: 8b 55 e4 mov -0x1c(%ebp),%edx
m = 1 << (bi % 8);
8010128a: 83 e1 07 and $0x7,%ecx
8010128d: d3 e3 shl %cl,%ebx
if((bp->data[bi/8] & m) == 0){ // Is block free?
8010128f: 89 c1 mov %eax,%ecx
80101291: c1 f9 03 sar $0x3,%ecx
80101294: 0f b6 7c 0a 5c movzbl 0x5c(%edx,%ecx,1),%edi
80101299: 89 fa mov %edi,%edx
8010129b: 85 df test %ebx,%edi
8010129d: 74 41 je 801012e0 <balloc+0xb0>
for(bi = 0; bi < BPB && b + bi < sb.size; bi++){
8010129f: 83 c0 01 add $0x1,%eax
801012a2: 83 c6 01 add $0x1,%esi
801012a5: 3d 00 10 00 00 cmp $0x1000,%eax
801012aa: 74 05 je 801012b1 <balloc+0x81>
801012ac: 39 75 e0 cmp %esi,-0x20(%ebp)
801012af: 77 cf ja 80101280 <balloc+0x50>
brelse(bp);
801012b1: 83 ec 0c sub $0xc,%esp
801012b4: ff 75 e4 pushl -0x1c(%ebp)
801012b7: e8 34 ef ff ff call 801001f0 <brelse>
for(b = 0; b < sb.size; b += BPB){
801012bc: 81 45 dc 00 10 00 00 addl $0x1000,-0x24(%ebp)
801012c3: 83 c4 10 add $0x10,%esp
801012c6: 8b 45 dc mov -0x24(%ebp),%eax
801012c9: 39 05 80 13 11 80 cmp %eax,0x80111380
801012cf: 77 80 ja 80101251 <balloc+0x21>
panic("balloc: out of blocks");
801012d1: 83 ec 0c sub $0xc,%esp
801012d4: 68 52 76 10 80 push $0x80107652
801012d9: e8 b2 f0 ff ff call 80100390 <panic>
801012de: 66 90 xchg %ax,%ax
bp->data[bi/8] |= m; // Mark block in use.
801012e0: 8b 7d e4 mov -0x1c(%ebp),%edi
log_write(bp);
801012e3: 83 ec 0c sub $0xc,%esp
bp->data[bi/8] |= m; // Mark block in use.
801012e6: 09 da or %ebx,%edx
801012e8: 88 54 0f 5c mov %dl,0x5c(%edi,%ecx,1)
log_write(bp);
801012ec: 57 push %edi
801012ed: e8 1e 1c 00 00 call 80102f10 <log_write>
brelse(bp);
801012f2: 89 3c 24 mov %edi,(%esp)
801012f5: e8 f6 ee ff ff call 801001f0 <brelse>
bp = bread(dev, bno);
801012fa: 58 pop %eax
801012fb: 5a pop %edx
801012fc: 56 push %esi
801012fd: ff 75 d8 pushl -0x28(%ebp)
80101300: e8 cb ed ff ff call 801000d0 <bread>
memset(bp->data, 0, BSIZE);
80101305: 83 c4 0c add $0xc,%esp
bp = bread(dev, bno);
80101308: 89 c3 mov %eax,%ebx
memset(bp->data, 0, BSIZE);
8010130a: 8d 40 5c lea 0x5c(%eax),%eax
8010130d: 68 00 02 00 00 push $0x200
80101312: 6a 00 push $0x0
80101314: 50 push %eax
80101315: e8 76 35 00 00 call 80104890 <memset>
log_write(bp);
8010131a: 89 1c 24 mov %ebx,(%esp)
8010131d: e8 ee 1b 00 00 call 80102f10 <log_write>
brelse(bp);
80101322: 89 1c 24 mov %ebx,(%esp)
80101325: e8 c6 ee ff ff call 801001f0 <brelse>
}
8010132a: 8d 65 f4 lea -0xc(%ebp),%esp
8010132d: 89 f0 mov %esi,%eax
8010132f: 5b pop %ebx
80101330: 5e pop %esi
80101331: 5f pop %edi
80101332: 5d pop %ebp
80101333: c3 ret
80101334: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010133b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
8010133f: 90 nop
80101340 <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)
{
80101340: 55 push %ebp
80101341: 89 e5 mov %esp,%ebp
80101343: 57 push %edi
80101344: 89 c7 mov %eax,%edi
80101346: 56 push %esi
struct inode *ip, *empty;
acquire(&icache.lock);
// Is the inode already cached?
empty = 0;
80101347: 31 f6 xor %esi,%esi
{
80101349: 53 push %ebx
for(ip = &icache.inode[0]; ip < &icache.inode[NINODE]; ip++){
8010134a: bb d4 13 11 80 mov $0x801113d4,%ebx
{
8010134f: 83 ec 28 sub $0x28,%esp
80101352: 89 55 e4 mov %edx,-0x1c(%ebp)
acquire(&icache.lock);
80101355: 68 a0 13 11 80 push $0x801113a0
8010135a: e8 21 34 00 00 call 80104780 <acquire>
for(ip = &icache.inode[0]; ip < &icache.inode[NINODE]; ip++){
8010135f: 8b 55 e4 mov -0x1c(%ebp),%edx
acquire(&icache.lock);
80101362: 83 c4 10 add $0x10,%esp
80101365: eb 1b jmp 80101382 <iget+0x42>
80101367: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010136e: 66 90 xchg %ax,%ax
if(ip->ref > 0 && ip->dev == dev && ip->inum == inum){
80101370: 39 3b cmp %edi,(%ebx)
80101372: 74 6c je 801013e0 <iget+0xa0>
80101374: 81 c3 90 00 00 00 add $0x90,%ebx
for(ip = &icache.inode[0]; ip < &icache.inode[NINODE]; ip++){
8010137a: 81 fb f4 2f 11 80 cmp $0x80112ff4,%ebx
80101380: 73 26 jae 801013a8 <iget+0x68>
if(ip->ref > 0 && ip->dev == dev && ip->inum == inum){
80101382: 8b 4b 08 mov 0x8(%ebx),%ecx
80101385: 85 c9 test %ecx,%ecx
80101387: 7f e7 jg 80101370 <iget+0x30>
ip->ref++;
release(&icache.lock);
return ip;
}
if(empty == 0 && ip->ref == 0) // Remember empty slot.
80101389: 85 f6 test %esi,%esi
8010138b: 75 e7 jne 80101374 <iget+0x34>
8010138d: 89 d8 mov %ebx,%eax
8010138f: 81 c3 90 00 00 00 add $0x90,%ebx
80101395: 85 c9 test %ecx,%ecx
80101397: 75 6e jne 80101407 <iget+0xc7>
80101399: 89 c6 mov %eax,%esi
for(ip = &icache.inode[0]; ip < &icache.inode[NINODE]; ip++){
8010139b: 81 fb f4 2f 11 80 cmp $0x80112ff4,%ebx
801013a1: 72 df jb 80101382 <iget+0x42>
801013a3: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801013a7: 90 nop
empty = ip;
}
// Recycle an inode cache entry.
if(empty == 0)
801013a8: 85 f6 test %esi,%esi
801013aa: 74 73 je 8010141f <iget+0xdf>
ip = empty;
ip->dev = dev;
ip->inum = inum;
ip->ref = 1;
ip->valid = 0;
release(&icache.lock);
801013ac: 83 ec 0c sub $0xc,%esp
ip->dev = dev;
801013af: 89 3e mov %edi,(%esi)
ip->inum = inum;
801013b1: 89 56 04 mov %edx,0x4(%esi)
ip->ref = 1;
801013b4: c7 46 08 01 00 00 00 movl $0x1,0x8(%esi)
ip->valid = 0;
801013bb: c7 46 4c 00 00 00 00 movl $0x0,0x4c(%esi)
release(&icache.lock);
801013c2: 68 a0 13 11 80 push $0x801113a0
801013c7: e8 74 34 00 00 call 80104840 <release>
return ip;
801013cc: 83 c4 10 add $0x10,%esp
}
801013cf: 8d 65 f4 lea -0xc(%ebp),%esp
801013d2: 89 f0 mov %esi,%eax
801013d4: 5b pop %ebx
801013d5: 5e pop %esi
801013d6: 5f pop %edi
801013d7: 5d pop %ebp
801013d8: c3 ret
801013d9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
if(ip->ref > 0 && ip->dev == dev && ip->inum == inum){
801013e0: 39 53 04 cmp %edx,0x4(%ebx)
801013e3: 75 8f jne 80101374 <iget+0x34>
release(&icache.lock);
801013e5: 83 ec 0c sub $0xc,%esp
ip->ref++;
801013e8: 83 c1 01 add $0x1,%ecx
return ip;
801013eb: 89 de mov %ebx,%esi
release(&icache.lock);
801013ed: 68 a0 13 11 80 push $0x801113a0
ip->ref++;
801013f2: 89 4b 08 mov %ecx,0x8(%ebx)
release(&icache.lock);
801013f5: e8 46 34 00 00 call 80104840 <release>
return ip;
801013fa: 83 c4 10 add $0x10,%esp
}
801013fd: 8d 65 f4 lea -0xc(%ebp),%esp
80101400: 89 f0 mov %esi,%eax
80101402: 5b pop %ebx
80101403: 5e pop %esi
80101404: 5f pop %edi
80101405: 5d pop %ebp
80101406: c3 ret
for(ip = &icache.inode[0]; ip < &icache.inode[NINODE]; ip++){
80101407: 81 fb f4 2f 11 80 cmp $0x80112ff4,%ebx
8010140d: 73 10 jae 8010141f <iget+0xdf>
if(ip->ref > 0 && ip->dev == dev && ip->inum == inum){
8010140f: 8b 4b 08 mov 0x8(%ebx),%ecx
80101412: 85 c9 test %ecx,%ecx
80101414: 0f 8f 56 ff ff ff jg 80101370 <iget+0x30>
8010141a: e9 6e ff ff ff jmp 8010138d <iget+0x4d>
panic("iget: no inodes");
8010141f: 83 ec 0c sub $0xc,%esp
80101422: 68 68 76 10 80 push $0x80107668
80101427: e8 64 ef ff ff call 80100390 <panic>
8010142c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80101430 <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)
{
80101430: 55 push %ebp
80101431: 89 e5 mov %esp,%ebp
80101433: 57 push %edi
80101434: 56 push %esi
80101435: 89 c6 mov %eax,%esi
80101437: 53 push %ebx
80101438: 83 ec 1c sub $0x1c,%esp
uint addr, *a;
struct buf *bp;
if(bn < NDIRECT){
8010143b: 83 fa 0b cmp $0xb,%edx
8010143e: 0f 86 84 00 00 00 jbe 801014c8 <bmap+0x98>
if((addr = ip->addrs[bn]) == 0)
ip->addrs[bn] = addr = balloc(ip->dev);
return addr;
}
bn -= NDIRECT;
80101444: 8d 5a f4 lea -0xc(%edx),%ebx
if(bn < NINDIRECT){
80101447: 83 fb 7f cmp $0x7f,%ebx
8010144a: 0f 87 98 00 00 00 ja 801014e8 <bmap+0xb8>
// Load indirect block, allocating if necessary.
if((addr = ip->addrs[NDIRECT]) == 0)
80101450: 8b 80 8c 00 00 00 mov 0x8c(%eax),%eax
80101456: 8b 16 mov (%esi),%edx
80101458: 85 c0 test %eax,%eax
8010145a: 74 54 je 801014b0 <bmap+0x80>
ip->addrs[NDIRECT] = addr = balloc(ip->dev);
bp = bread(ip->dev, addr);
8010145c: 83 ec 08 sub $0x8,%esp
8010145f: 50 push %eax
80101460: 52 push %edx
80101461: e8 6a ec ff ff call 801000d0 <bread>
a = (uint*)bp->data;
if((addr = a[bn]) == 0){
80101466: 83 c4 10 add $0x10,%esp
80101469: 8d 54 98 5c lea 0x5c(%eax,%ebx,4),%edx
bp = bread(ip->dev, addr);
8010146d: 89 c7 mov %eax,%edi
if((addr = a[bn]) == 0){
8010146f: 8b 1a mov (%edx),%ebx
80101471: 85 db test %ebx,%ebx
80101473: 74 1b je 80101490 <bmap+0x60>
a[bn] = addr = balloc(ip->dev);
log_write(bp);
}
brelse(bp);
80101475: 83 ec 0c sub $0xc,%esp
80101478: 57 push %edi
80101479: e8 72 ed ff ff call 801001f0 <brelse>
return addr;
8010147e: 83 c4 10 add $0x10,%esp
}
panic("bmap: out of range");
}
80101481: 8d 65 f4 lea -0xc(%ebp),%esp
80101484: 89 d8 mov %ebx,%eax
80101486: 5b pop %ebx
80101487: 5e pop %esi
80101488: 5f pop %edi
80101489: 5d pop %ebp
8010148a: c3 ret
8010148b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
8010148f: 90 nop
a[bn] = addr = balloc(ip->dev);
80101490: 8b 06 mov (%esi),%eax
80101492: 89 55 e4 mov %edx,-0x1c(%ebp)
80101495: e8 96 fd ff ff call 80101230 <balloc>
8010149a: 8b 55 e4 mov -0x1c(%ebp),%edx
log_write(bp);
8010149d: 83 ec 0c sub $0xc,%esp
a[bn] = addr = balloc(ip->dev);
801014a0: 89 c3 mov %eax,%ebx
801014a2: 89 02 mov %eax,(%edx)
log_write(bp);
801014a4: 57 push %edi
801014a5: e8 66 1a 00 00 call 80102f10 <log_write>
801014aa: 83 c4 10 add $0x10,%esp
801014ad: eb c6 jmp 80101475 <bmap+0x45>
801014af: 90 nop
ip->addrs[NDIRECT] = addr = balloc(ip->dev);
801014b0: 89 d0 mov %edx,%eax
801014b2: e8 79 fd ff ff call 80101230 <balloc>
801014b7: 8b 16 mov (%esi),%edx
801014b9: 89 86 8c 00 00 00 mov %eax,0x8c(%esi)
801014bf: eb 9b jmp 8010145c <bmap+0x2c>
801014c1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
if((addr = ip->addrs[bn]) == 0)
801014c8: 8d 3c 90 lea (%eax,%edx,4),%edi
801014cb: 8b 5f 5c mov 0x5c(%edi),%ebx
801014ce: 85 db test %ebx,%ebx
801014d0: 75 af jne 80101481 <bmap+0x51>
ip->addrs[bn] = addr = balloc(ip->dev);
801014d2: 8b 00 mov (%eax),%eax
801014d4: e8 57 fd ff ff call 80101230 <balloc>
801014d9: 89 47 5c mov %eax,0x5c(%edi)
801014dc: 89 c3 mov %eax,%ebx
}
801014de: 8d 65 f4 lea -0xc(%ebp),%esp
801014e1: 89 d8 mov %ebx,%eax
801014e3: 5b pop %ebx
801014e4: 5e pop %esi
801014e5: 5f pop %edi
801014e6: 5d pop %ebp
801014e7: c3 ret
panic("bmap: out of range");
801014e8: 83 ec 0c sub $0xc,%esp
801014eb: 68 78 76 10 80 push $0x80107678
801014f0: e8 9b ee ff ff call 80100390 <panic>
801014f5: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801014fc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80101500 <readsb>:
{
80101500: f3 0f 1e fb endbr32
80101504: 55 push %ebp
80101505: 89 e5 mov %esp,%ebp
80101507: 56 push %esi
80101508: 53 push %ebx
80101509: 8b 75 0c mov 0xc(%ebp),%esi
bp = bread(dev, 1);
8010150c: 83 ec 08 sub $0x8,%esp
8010150f: 6a 01 push $0x1
80101511: ff 75 08 pushl 0x8(%ebp)
80101514: e8 b7 eb ff ff call 801000d0 <bread>
memmove(sb, bp->data, sizeof(*sb));
80101519: 83 c4 0c add $0xc,%esp
bp = bread(dev, 1);
8010151c: 89 c3 mov %eax,%ebx
memmove(sb, bp->data, sizeof(*sb));
8010151e: 8d 40 5c lea 0x5c(%eax),%eax
80101521: 6a 1c push $0x1c
80101523: 50 push %eax
80101524: 56 push %esi
80101525: e8 06 34 00 00 call 80104930 <memmove>
brelse(bp);
8010152a: 89 5d 08 mov %ebx,0x8(%ebp)
8010152d: 83 c4 10 add $0x10,%esp
}
80101530: 8d 65 f8 lea -0x8(%ebp),%esp
80101533: 5b pop %ebx
80101534: 5e pop %esi
80101535: 5d pop %ebp
brelse(bp);
80101536: e9 b5 ec ff ff jmp 801001f0 <brelse>
8010153b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
8010153f: 90 nop
80101540 <iinit>:
{
80101540: f3 0f 1e fb endbr32
80101544: 55 push %ebp
80101545: 89 e5 mov %esp,%ebp
80101547: 53 push %ebx
80101548: bb e0 13 11 80 mov $0x801113e0,%ebx
8010154d: 83 ec 0c sub $0xc,%esp
initlock(&icache.lock, "icache");
80101550: 68 8b 76 10 80 push $0x8010768b
80101555: 68 a0 13 11 80 push $0x801113a0
8010155a: e8 a1 30 00 00 call 80104600 <initlock>
for(i = 0; i < NINODE; i++) {
8010155f: 83 c4 10 add $0x10,%esp
80101562: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
initsleeplock(&icache.inode[i].lock, "inode");
80101568: 83 ec 08 sub $0x8,%esp
8010156b: 68 92 76 10 80 push $0x80107692
80101570: 53 push %ebx
80101571: 81 c3 90 00 00 00 add $0x90,%ebx
80101577: e8 44 2f 00 00 call 801044c0 <initsleeplock>
for(i = 0; i < NINODE; i++) {
8010157c: 83 c4 10 add $0x10,%esp
8010157f: 81 fb 00 30 11 80 cmp $0x80113000,%ebx
80101585: 75 e1 jne 80101568 <iinit+0x28>
readsb(dev, &sb);
80101587: 83 ec 08 sub $0x8,%esp
8010158a: 68 80 13 11 80 push $0x80111380
8010158f: ff 75 08 pushl 0x8(%ebp)
80101592: e8 69 ff ff ff call 80101500 <readsb>
cprintf("sb: size %d nblocks %d ninodes %d nlog %d logstart %d\
80101597: ff 35 98 13 11 80 pushl 0x80111398
8010159d: ff 35 94 13 11 80 pushl 0x80111394
801015a3: ff 35 90 13 11 80 pushl 0x80111390
801015a9: ff 35 8c 13 11 80 pushl 0x8011138c
801015af: ff 35 88 13 11 80 pushl 0x80111388
801015b5: ff 35 84 13 11 80 pushl 0x80111384
801015bb: ff 35 80 13 11 80 pushl 0x80111380
801015c1: 68 f8 76 10 80 push $0x801076f8
801015c6: e8 e5 f0 ff ff call 801006b0 <cprintf>
}
801015cb: 8b 5d fc mov -0x4(%ebp),%ebx
801015ce: 83 c4 30 add $0x30,%esp
801015d1: c9 leave
801015d2: c3 ret
801015d3: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801015da: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801015e0 <ialloc>:
{
801015e0: f3 0f 1e fb endbr32
801015e4: 55 push %ebp
801015e5: 89 e5 mov %esp,%ebp
801015e7: 57 push %edi
801015e8: 56 push %esi
801015e9: 53 push %ebx
801015ea: 83 ec 1c sub $0x1c,%esp
801015ed: 8b 45 0c mov 0xc(%ebp),%eax
for(inum = 1; inum < sb.ninodes; inum++){
801015f0: 83 3d 88 13 11 80 01 cmpl $0x1,0x80111388
{
801015f7: 8b 75 08 mov 0x8(%ebp),%esi
801015fa: 89 45 e4 mov %eax,-0x1c(%ebp)
for(inum = 1; inum < sb.ninodes; inum++){
801015fd: 0f 86 8d 00 00 00 jbe 80101690 <ialloc+0xb0>
80101603: bf 01 00 00 00 mov $0x1,%edi
80101608: eb 1d jmp 80101627 <ialloc+0x47>
8010160a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
brelse(bp);
80101610: 83 ec 0c sub $0xc,%esp
for(inum = 1; inum < sb.ninodes; inum++){
80101613: 83 c7 01 add $0x1,%edi
brelse(bp);
80101616: 53 push %ebx
80101617: e8 d4 eb ff ff call 801001f0 <brelse>
for(inum = 1; inum < sb.ninodes; inum++){
8010161c: 83 c4 10 add $0x10,%esp
8010161f: 3b 3d 88 13 11 80 cmp 0x80111388,%edi
80101625: 73 69 jae 80101690 <ialloc+0xb0>
bp = bread(dev, IBLOCK(inum, sb));
80101627: 89 f8 mov %edi,%eax
80101629: 83 ec 08 sub $0x8,%esp
8010162c: c1 e8 03 shr $0x3,%eax
8010162f: 03 05 94 13 11 80 add 0x80111394,%eax
80101635: 50 push %eax
80101636: 56 push %esi
80101637: e8 94 ea ff ff call 801000d0 <bread>
if(dip->type == 0){ // a free inode
8010163c: 83 c4 10 add $0x10,%esp
bp = bread(dev, IBLOCK(inum, sb));
8010163f: 89 c3 mov %eax,%ebx
dip = (struct dinode*)bp->data + inum%IPB;
80101641: 89 f8 mov %edi,%eax
80101643: 83 e0 07 and $0x7,%eax
80101646: c1 e0 06 shl $0x6,%eax
80101649: 8d 4c 03 5c lea 0x5c(%ebx,%eax,1),%ecx
if(dip->type == 0){ // a free inode
8010164d: 66 83 39 00 cmpw $0x0,(%ecx)
80101651: 75 bd jne 80101610 <ialloc+0x30>
memset(dip, 0, sizeof(*dip));
80101653: 83 ec 04 sub $0x4,%esp
80101656: 89 4d e0 mov %ecx,-0x20(%ebp)
80101659: 6a 40 push $0x40
8010165b: 6a 00 push $0x0
8010165d: 51 push %ecx
8010165e: e8 2d 32 00 00 call 80104890 <memset>
dip->type = type;
80101663: 0f b7 45 e4 movzwl -0x1c(%ebp),%eax
80101667: 8b 4d e0 mov -0x20(%ebp),%ecx
8010166a: 66 89 01 mov %ax,(%ecx)
log_write(bp); // mark it allocated on the disk
8010166d: 89 1c 24 mov %ebx,(%esp)
80101670: e8 9b 18 00 00 call 80102f10 <log_write>
brelse(bp);
80101675: 89 1c 24 mov %ebx,(%esp)
80101678: e8 73 eb ff ff call 801001f0 <brelse>
return iget(dev, inum);
8010167d: 83 c4 10 add $0x10,%esp
}
80101680: 8d 65 f4 lea -0xc(%ebp),%esp
return iget(dev, inum);
80101683: 89 fa mov %edi,%edx
}
80101685: 5b pop %ebx
return iget(dev, inum);
80101686: 89 f0 mov %esi,%eax
}
80101688: 5e pop %esi
80101689: 5f pop %edi
8010168a: 5d pop %ebp
return iget(dev, inum);
8010168b: e9 b0 fc ff ff jmp 80101340 <iget>
panic("ialloc: no inodes");
80101690: 83 ec 0c sub $0xc,%esp
80101693: 68 98 76 10 80 push $0x80107698
80101698: e8 f3 ec ff ff call 80100390 <panic>
8010169d: 8d 76 00 lea 0x0(%esi),%esi
801016a0 <iupdate>:
{
801016a0: f3 0f 1e fb endbr32
801016a4: 55 push %ebp
801016a5: 89 e5 mov %esp,%ebp
801016a7: 56 push %esi
801016a8: 53 push %ebx
801016a9: 8b 5d 08 mov 0x8(%ebp),%ebx
bp = bread(ip->dev, IBLOCK(ip->inum, sb));
801016ac: 8b 43 04 mov 0x4(%ebx),%eax
memmove(dip->addrs, ip->addrs, sizeof(ip->addrs));
801016af: 83 c3 5c add $0x5c,%ebx
bp = bread(ip->dev, IBLOCK(ip->inum, sb));
801016b2: 83 ec 08 sub $0x8,%esp
801016b5: c1 e8 03 shr $0x3,%eax
801016b8: 03 05 94 13 11 80 add 0x80111394,%eax
801016be: 50 push %eax
801016bf: ff 73 a4 pushl -0x5c(%ebx)
801016c2: e8 09 ea ff ff call 801000d0 <bread>
dip->type = ip->type;
801016c7: 0f b7 53 f4 movzwl -0xc(%ebx),%edx
memmove(dip->addrs, ip->addrs, sizeof(ip->addrs));
801016cb: 83 c4 0c add $0xc,%esp
bp = bread(ip->dev, IBLOCK(ip->inum, sb));
801016ce: 89 c6 mov %eax,%esi
dip = (struct dinode*)bp->data + ip->inum%IPB;
801016d0: 8b 43 a8 mov -0x58(%ebx),%eax
801016d3: 83 e0 07 and $0x7,%eax
801016d6: c1 e0 06 shl $0x6,%eax
801016d9: 8d 44 06 5c lea 0x5c(%esi,%eax,1),%eax
dip->type = ip->type;
801016dd: 66 89 10 mov %dx,(%eax)
dip->major = ip->major;
801016e0: 0f b7 53 f6 movzwl -0xa(%ebx),%edx
memmove(dip->addrs, ip->addrs, sizeof(ip->addrs));
801016e4: 83 c0 0c add $0xc,%eax
dip->major = ip->major;
801016e7: 66 89 50 f6 mov %dx,-0xa(%eax)
dip->minor = ip->minor;
801016eb: 0f b7 53 f8 movzwl -0x8(%ebx),%edx
801016ef: 66 89 50 f8 mov %dx,-0x8(%eax)
dip->nlink = ip->nlink;
801016f3: 0f b7 53 fa movzwl -0x6(%ebx),%edx
801016f7: 66 89 50 fa mov %dx,-0x6(%eax)
dip->size = ip->size;
801016fb: 8b 53 fc mov -0x4(%ebx),%edx
801016fe: 89 50 fc mov %edx,-0x4(%eax)
memmove(dip->addrs, ip->addrs, sizeof(ip->addrs));
80101701: 6a 34 push $0x34
80101703: 53 push %ebx
80101704: 50 push %eax
80101705: e8 26 32 00 00 call 80104930 <memmove>
log_write(bp);
8010170a: 89 34 24 mov %esi,(%esp)
8010170d: e8 fe 17 00 00 call 80102f10 <log_write>
brelse(bp);
80101712: 89 75 08 mov %esi,0x8(%ebp)
80101715: 83 c4 10 add $0x10,%esp
}
80101718: 8d 65 f8 lea -0x8(%ebp),%esp
8010171b: 5b pop %ebx
8010171c: 5e pop %esi
8010171d: 5d pop %ebp
brelse(bp);
8010171e: e9 cd ea ff ff jmp 801001f0 <brelse>
80101723: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010172a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80101730 <idup>:
{
80101730: f3 0f 1e fb endbr32
80101734: 55 push %ebp
80101735: 89 e5 mov %esp,%ebp
80101737: 53 push %ebx
80101738: 83 ec 10 sub $0x10,%esp
8010173b: 8b 5d 08 mov 0x8(%ebp),%ebx
acquire(&icache.lock);
8010173e: 68 a0 13 11 80 push $0x801113a0
80101743: e8 38 30 00 00 call 80104780 <acquire>
ip->ref++;
80101748: 83 43 08 01 addl $0x1,0x8(%ebx)
release(&icache.lock);
8010174c: c7 04 24 a0 13 11 80 movl $0x801113a0,(%esp)
80101753: e8 e8 30 00 00 call 80104840 <release>
}
80101758: 89 d8 mov %ebx,%eax
8010175a: 8b 5d fc mov -0x4(%ebp),%ebx
8010175d: c9 leave
8010175e: c3 ret
8010175f: 90 nop
80101760 <ilock>:
{
80101760: f3 0f 1e fb endbr32
80101764: 55 push %ebp
80101765: 89 e5 mov %esp,%ebp
80101767: 56 push %esi
80101768: 53 push %ebx
80101769: 8b 5d 08 mov 0x8(%ebp),%ebx
if(ip == 0 || ip->ref < 1)
8010176c: 85 db test %ebx,%ebx
8010176e: 0f 84 b3 00 00 00 je 80101827 <ilock+0xc7>
80101774: 8b 53 08 mov 0x8(%ebx),%edx
80101777: 85 d2 test %edx,%edx
80101779: 0f 8e a8 00 00 00 jle 80101827 <ilock+0xc7>
acquiresleep(&ip->lock);
8010177f: 83 ec 0c sub $0xc,%esp
80101782: 8d 43 0c lea 0xc(%ebx),%eax
80101785: 50 push %eax
80101786: e8 75 2d 00 00 call 80104500 <acquiresleep>
if(ip->valid == 0){
8010178b: 8b 43 4c mov 0x4c(%ebx),%eax
8010178e: 83 c4 10 add $0x10,%esp
80101791: 85 c0 test %eax,%eax
80101793: 74 0b je 801017a0 <ilock+0x40>
}
80101795: 8d 65 f8 lea -0x8(%ebp),%esp
80101798: 5b pop %ebx
80101799: 5e pop %esi
8010179a: 5d pop %ebp
8010179b: c3 ret
8010179c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
bp = bread(ip->dev, IBLOCK(ip->inum, sb));
801017a0: 8b 43 04 mov 0x4(%ebx),%eax
801017a3: 83 ec 08 sub $0x8,%esp
801017a6: c1 e8 03 shr $0x3,%eax
801017a9: 03 05 94 13 11 80 add 0x80111394,%eax
801017af: 50 push %eax
801017b0: ff 33 pushl (%ebx)
801017b2: e8 19 e9 ff ff call 801000d0 <bread>
memmove(ip->addrs, dip->addrs, sizeof(ip->addrs));
801017b7: 83 c4 0c add $0xc,%esp
bp = bread(ip->dev, IBLOCK(ip->inum, sb));
801017ba: 89 c6 mov %eax,%esi
dip = (struct dinode*)bp->data + ip->inum%IPB;
801017bc: 8b 43 04 mov 0x4(%ebx),%eax
801017bf: 83 e0 07 and $0x7,%eax
801017c2: c1 e0 06 shl $0x6,%eax
801017c5: 8d 44 06 5c lea 0x5c(%esi,%eax,1),%eax
ip->type = dip->type;
801017c9: 0f b7 10 movzwl (%eax),%edx
memmove(ip->addrs, dip->addrs, sizeof(ip->addrs));
801017cc: 83 c0 0c add $0xc,%eax
ip->type = dip->type;
801017cf: 66 89 53 50 mov %dx,0x50(%ebx)
ip->major = dip->major;
801017d3: 0f b7 50 f6 movzwl -0xa(%eax),%edx
801017d7: 66 89 53 52 mov %dx,0x52(%ebx)
ip->minor = dip->minor;
801017db: 0f b7 50 f8 movzwl -0x8(%eax),%edx
801017df: 66 89 53 54 mov %dx,0x54(%ebx)
ip->nlink = dip->nlink;
801017e3: 0f b7 50 fa movzwl -0x6(%eax),%edx
801017e7: 66 89 53 56 mov %dx,0x56(%ebx)
ip->size = dip->size;
801017eb: 8b 50 fc mov -0x4(%eax),%edx
801017ee: 89 53 58 mov %edx,0x58(%ebx)
memmove(ip->addrs, dip->addrs, sizeof(ip->addrs));
801017f1: 6a 34 push $0x34
801017f3: 50 push %eax
801017f4: 8d 43 5c lea 0x5c(%ebx),%eax
801017f7: 50 push %eax
801017f8: e8 33 31 00 00 call 80104930 <memmove>
brelse(bp);
801017fd: 89 34 24 mov %esi,(%esp)
80101800: e8 eb e9 ff ff call 801001f0 <brelse>
if(ip->type == 0)
80101805: 83 c4 10 add $0x10,%esp
80101808: 66 83 7b 50 00 cmpw $0x0,0x50(%ebx)
ip->valid = 1;
8010180d: c7 43 4c 01 00 00 00 movl $0x1,0x4c(%ebx)
if(ip->type == 0)
80101814: 0f 85 7b ff ff ff jne 80101795 <ilock+0x35>
panic("ilock: no type");
8010181a: 83 ec 0c sub $0xc,%esp
8010181d: 68 b0 76 10 80 push $0x801076b0
80101822: e8 69 eb ff ff call 80100390 <panic>
panic("ilock");
80101827: 83 ec 0c sub $0xc,%esp
8010182a: 68 aa 76 10 80 push $0x801076aa
8010182f: e8 5c eb ff ff call 80100390 <panic>
80101834: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010183b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
8010183f: 90 nop
80101840 <iunlock>:
{
80101840: f3 0f 1e fb endbr32
80101844: 55 push %ebp
80101845: 89 e5 mov %esp,%ebp
80101847: 56 push %esi
80101848: 53 push %ebx
80101849: 8b 5d 08 mov 0x8(%ebp),%ebx
if(ip == 0 || !holdingsleep(&ip->lock) || ip->ref < 1)
8010184c: 85 db test %ebx,%ebx
8010184e: 74 28 je 80101878 <iunlock+0x38>
80101850: 83 ec 0c sub $0xc,%esp
80101853: 8d 73 0c lea 0xc(%ebx),%esi
80101856: 56 push %esi
80101857: e8 44 2d 00 00 call 801045a0 <holdingsleep>
8010185c: 83 c4 10 add $0x10,%esp
8010185f: 85 c0 test %eax,%eax
80101861: 74 15 je 80101878 <iunlock+0x38>
80101863: 8b 43 08 mov 0x8(%ebx),%eax
80101866: 85 c0 test %eax,%eax
80101868: 7e 0e jle 80101878 <iunlock+0x38>
releasesleep(&ip->lock);
8010186a: 89 75 08 mov %esi,0x8(%ebp)
}
8010186d: 8d 65 f8 lea -0x8(%ebp),%esp
80101870: 5b pop %ebx
80101871: 5e pop %esi
80101872: 5d pop %ebp
releasesleep(&ip->lock);
80101873: e9 e8 2c 00 00 jmp 80104560 <releasesleep>
panic("iunlock");
80101878: 83 ec 0c sub $0xc,%esp
8010187b: 68 bf 76 10 80 push $0x801076bf
80101880: e8 0b eb ff ff call 80100390 <panic>
80101885: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010188c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80101890 <iput>:
{
80101890: f3 0f 1e fb endbr32
80101894: 55 push %ebp
80101895: 89 e5 mov %esp,%ebp
80101897: 57 push %edi
80101898: 56 push %esi
80101899: 53 push %ebx
8010189a: 83 ec 28 sub $0x28,%esp
8010189d: 8b 5d 08 mov 0x8(%ebp),%ebx
acquiresleep(&ip->lock);
801018a0: 8d 7b 0c lea 0xc(%ebx),%edi
801018a3: 57 push %edi
801018a4: e8 57 2c 00 00 call 80104500 <acquiresleep>
if(ip->valid && ip->nlink == 0){
801018a9: 8b 53 4c mov 0x4c(%ebx),%edx
801018ac: 83 c4 10 add $0x10,%esp
801018af: 85 d2 test %edx,%edx
801018b1: 74 07 je 801018ba <iput+0x2a>
801018b3: 66 83 7b 56 00 cmpw $0x0,0x56(%ebx)
801018b8: 74 36 je 801018f0 <iput+0x60>
releasesleep(&ip->lock);
801018ba: 83 ec 0c sub $0xc,%esp
801018bd: 57 push %edi
801018be: e8 9d 2c 00 00 call 80104560 <releasesleep>
acquire(&icache.lock);
801018c3: c7 04 24 a0 13 11 80 movl $0x801113a0,(%esp)
801018ca: e8 b1 2e 00 00 call 80104780 <acquire>
ip->ref--;
801018cf: 83 6b 08 01 subl $0x1,0x8(%ebx)
release(&icache.lock);
801018d3: 83 c4 10 add $0x10,%esp
801018d6: c7 45 08 a0 13 11 80 movl $0x801113a0,0x8(%ebp)
}
801018dd: 8d 65 f4 lea -0xc(%ebp),%esp
801018e0: 5b pop %ebx
801018e1: 5e pop %esi
801018e2: 5f pop %edi
801018e3: 5d pop %ebp
release(&icache.lock);
801018e4: e9 57 2f 00 00 jmp 80104840 <release>
801018e9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
acquire(&icache.lock);
801018f0: 83 ec 0c sub $0xc,%esp
801018f3: 68 a0 13 11 80 push $0x801113a0
801018f8: e8 83 2e 00 00 call 80104780 <acquire>
int r = ip->ref;
801018fd: 8b 73 08 mov 0x8(%ebx),%esi
release(&icache.lock);
80101900: c7 04 24 a0 13 11 80 movl $0x801113a0,(%esp)
80101907: e8 34 2f 00 00 call 80104840 <release>
if(r == 1){
8010190c: 83 c4 10 add $0x10,%esp
8010190f: 83 fe 01 cmp $0x1,%esi
80101912: 75 a6 jne 801018ba <iput+0x2a>
80101914: 8d 8b 8c 00 00 00 lea 0x8c(%ebx),%ecx
8010191a: 89 7d e4 mov %edi,-0x1c(%ebp)
8010191d: 8d 73 5c lea 0x5c(%ebx),%esi
80101920: 89 cf mov %ecx,%edi
80101922: eb 0b jmp 8010192f <iput+0x9f>
80101924: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
{
int i, j;
struct buf *bp;
uint *a;
for(i = 0; i < NDIRECT; i++){
80101928: 83 c6 04 add $0x4,%esi
8010192b: 39 fe cmp %edi,%esi
8010192d: 74 19 je 80101948 <iput+0xb8>
if(ip->addrs[i]){
8010192f: 8b 16 mov (%esi),%edx
80101931: 85 d2 test %edx,%edx
80101933: 74 f3 je 80101928 <iput+0x98>
bfree(ip->dev, ip->addrs[i]);
80101935: 8b 03 mov (%ebx),%eax
80101937: e8 74 f8 ff ff call 801011b0 <bfree>
ip->addrs[i] = 0;
8010193c: c7 06 00 00 00 00 movl $0x0,(%esi)
80101942: eb e4 jmp 80101928 <iput+0x98>
80101944: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
}
}
if(ip->addrs[NDIRECT]){
80101948: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax
8010194e: 8b 7d e4 mov -0x1c(%ebp),%edi
80101951: 85 c0 test %eax,%eax
80101953: 75 33 jne 80101988 <iput+0xf8>
bfree(ip->dev, ip->addrs[NDIRECT]);
ip->addrs[NDIRECT] = 0;
}
ip->size = 0;
iupdate(ip);
80101955: 83 ec 0c sub $0xc,%esp
ip->size = 0;
80101958: c7 43 58 00 00 00 00 movl $0x0,0x58(%ebx)
iupdate(ip);
8010195f: 53 push %ebx
80101960: e8 3b fd ff ff call 801016a0 <iupdate>
ip->type = 0;
80101965: 31 c0 xor %eax,%eax
80101967: 66 89 43 50 mov %ax,0x50(%ebx)
iupdate(ip);
8010196b: 89 1c 24 mov %ebx,(%esp)
8010196e: e8 2d fd ff ff call 801016a0 <iupdate>
ip->valid = 0;
80101973: c7 43 4c 00 00 00 00 movl $0x0,0x4c(%ebx)
8010197a: 83 c4 10 add $0x10,%esp
8010197d: e9 38 ff ff ff jmp 801018ba <iput+0x2a>
80101982: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
bp = bread(ip->dev, ip->addrs[NDIRECT]);
80101988: 83 ec 08 sub $0x8,%esp
8010198b: 50 push %eax
8010198c: ff 33 pushl (%ebx)
8010198e: e8 3d e7 ff ff call 801000d0 <bread>
80101993: 89 7d e0 mov %edi,-0x20(%ebp)
80101996: 83 c4 10 add $0x10,%esp
80101999: 8d 88 5c 02 00 00 lea 0x25c(%eax),%ecx
8010199f: 89 45 e4 mov %eax,-0x1c(%ebp)
for(j = 0; j < NINDIRECT; j++){
801019a2: 8d 70 5c lea 0x5c(%eax),%esi
801019a5: 89 cf mov %ecx,%edi
801019a7: eb 0e jmp 801019b7 <iput+0x127>
801019a9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801019b0: 83 c6 04 add $0x4,%esi
801019b3: 39 f7 cmp %esi,%edi
801019b5: 74 19 je 801019d0 <iput+0x140>
if(a[j])
801019b7: 8b 16 mov (%esi),%edx
801019b9: 85 d2 test %edx,%edx
801019bb: 74 f3 je 801019b0 <iput+0x120>
bfree(ip->dev, a[j]);
801019bd: 8b 03 mov (%ebx),%eax
801019bf: e8 ec f7 ff ff call 801011b0 <bfree>
801019c4: eb ea jmp 801019b0 <iput+0x120>
801019c6: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801019cd: 8d 76 00 lea 0x0(%esi),%esi
brelse(bp);
801019d0: 83 ec 0c sub $0xc,%esp
801019d3: ff 75 e4 pushl -0x1c(%ebp)
801019d6: 8b 7d e0 mov -0x20(%ebp),%edi
801019d9: e8 12 e8 ff ff call 801001f0 <brelse>
bfree(ip->dev, ip->addrs[NDIRECT]);
801019de: 8b 93 8c 00 00 00 mov 0x8c(%ebx),%edx
801019e4: 8b 03 mov (%ebx),%eax
801019e6: e8 c5 f7 ff ff call 801011b0 <bfree>
ip->addrs[NDIRECT] = 0;
801019eb: 83 c4 10 add $0x10,%esp
801019ee: c7 83 8c 00 00 00 00 movl $0x0,0x8c(%ebx)
801019f5: 00 00 00
801019f8: e9 58 ff ff ff jmp 80101955 <iput+0xc5>
801019fd: 8d 76 00 lea 0x0(%esi),%esi
80101a00 <iunlockput>:
{
80101a00: f3 0f 1e fb endbr32
80101a04: 55 push %ebp
80101a05: 89 e5 mov %esp,%ebp
80101a07: 53 push %ebx
80101a08: 83 ec 10 sub $0x10,%esp
80101a0b: 8b 5d 08 mov 0x8(%ebp),%ebx
iunlock(ip);
80101a0e: 53 push %ebx
80101a0f: e8 2c fe ff ff call 80101840 <iunlock>
iput(ip);
80101a14: 89 5d 08 mov %ebx,0x8(%ebp)
80101a17: 83 c4 10 add $0x10,%esp
}
80101a1a: 8b 5d fc mov -0x4(%ebp),%ebx
80101a1d: c9 leave
iput(ip);
80101a1e: e9 6d fe ff ff jmp 80101890 <iput>
80101a23: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80101a2a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80101a30 <stati>:
// Copy stat information from inode.
// Caller must hold ip->lock.
void
stati(struct inode *ip, struct stat *st)
{
80101a30: f3 0f 1e fb endbr32
80101a34: 55 push %ebp
80101a35: 89 e5 mov %esp,%ebp
80101a37: 8b 55 08 mov 0x8(%ebp),%edx
80101a3a: 8b 45 0c mov 0xc(%ebp),%eax
st->dev = ip->dev;
80101a3d: 8b 0a mov (%edx),%ecx
80101a3f: 89 48 04 mov %ecx,0x4(%eax)
st->ino = ip->inum;
80101a42: 8b 4a 04 mov 0x4(%edx),%ecx
80101a45: 89 48 08 mov %ecx,0x8(%eax)
st->type = ip->type;
80101a48: 0f b7 4a 50 movzwl 0x50(%edx),%ecx
80101a4c: 66 89 08 mov %cx,(%eax)
st->nlink = ip->nlink;
80101a4f: 0f b7 4a 56 movzwl 0x56(%edx),%ecx
80101a53: 66 89 48 0c mov %cx,0xc(%eax)
st->size = ip->size;
80101a57: 8b 52 58 mov 0x58(%edx),%edx
80101a5a: 89 50 10 mov %edx,0x10(%eax)
}
80101a5d: 5d pop %ebp
80101a5e: c3 ret
80101a5f: 90 nop
80101a60 <readi>:
//PAGEBREAK!
// Read data from inode.
// Caller must hold ip->lock.
int
readi(struct inode *ip, char *dst, uint off, uint n)
{
80101a60: f3 0f 1e fb endbr32
80101a64: 55 push %ebp
80101a65: 89 e5 mov %esp,%ebp
80101a67: 57 push %edi
80101a68: 56 push %esi
80101a69: 53 push %ebx
80101a6a: 83 ec 1c sub $0x1c,%esp
80101a6d: 8b 7d 0c mov 0xc(%ebp),%edi
80101a70: 8b 45 08 mov 0x8(%ebp),%eax
80101a73: 8b 75 10 mov 0x10(%ebp),%esi
80101a76: 89 7d e0 mov %edi,-0x20(%ebp)
80101a79: 8b 7d 14 mov 0x14(%ebp),%edi
uint tot, m;
struct buf *bp;
if(ip->type == T_DEV){
80101a7c: 66 83 78 50 03 cmpw $0x3,0x50(%eax)
{
80101a81: 89 45 d8 mov %eax,-0x28(%ebp)
80101a84: 89 7d e4 mov %edi,-0x1c(%ebp)
if(ip->type == T_DEV){
80101a87: 0f 84 a3 00 00 00 je 80101b30 <readi+0xd0>
if(ip->major < 0 || ip->major >= NDEV || !devsw[ip->major].read)
return -1;
return devsw[ip->major].read(ip, dst, n);
}
if(off > ip->size || off + n < off)
80101a8d: 8b 45 d8 mov -0x28(%ebp),%eax
80101a90: 8b 40 58 mov 0x58(%eax),%eax
80101a93: 39 c6 cmp %eax,%esi
80101a95: 0f 87 b6 00 00 00 ja 80101b51 <readi+0xf1>
80101a9b: 8b 5d e4 mov -0x1c(%ebp),%ebx
80101a9e: 31 c9 xor %ecx,%ecx
80101aa0: 89 da mov %ebx,%edx
80101aa2: 01 f2 add %esi,%edx
80101aa4: 0f 92 c1 setb %cl
80101aa7: 89 cf mov %ecx,%edi
80101aa9: 0f 82 a2 00 00 00 jb 80101b51 <readi+0xf1>
return -1;
if(off + n > ip->size)
n = ip->size - off;
80101aaf: 89 c1 mov %eax,%ecx
80101ab1: 29 f1 sub %esi,%ecx
80101ab3: 39 d0 cmp %edx,%eax
80101ab5: 0f 43 cb cmovae %ebx,%ecx
80101ab8: 89 4d e4 mov %ecx,-0x1c(%ebp)
for(tot=0; tot<n; tot+=m, off+=m, dst+=m){
80101abb: 85 c9 test %ecx,%ecx
80101abd: 74 63 je 80101b22 <readi+0xc2>
80101abf: 90 nop
bp = bread(ip->dev, bmap(ip, off/BSIZE));
80101ac0: 8b 5d d8 mov -0x28(%ebp),%ebx
80101ac3: 89 f2 mov %esi,%edx
80101ac5: c1 ea 09 shr $0x9,%edx
80101ac8: 89 d8 mov %ebx,%eax
80101aca: e8 61 f9 ff ff call 80101430 <bmap>
80101acf: 83 ec 08 sub $0x8,%esp
80101ad2: 50 push %eax
80101ad3: ff 33 pushl (%ebx)
80101ad5: e8 f6 e5 ff ff call 801000d0 <bread>
m = min(n - tot, BSIZE - off%BSIZE);
80101ada: 8b 5d e4 mov -0x1c(%ebp),%ebx
80101add: b9 00 02 00 00 mov $0x200,%ecx
80101ae2: 83 c4 0c add $0xc,%esp
bp = bread(ip->dev, bmap(ip, off/BSIZE));
80101ae5: 89 c2 mov %eax,%edx
m = min(n - tot, BSIZE - off%BSIZE);
80101ae7: 89 f0 mov %esi,%eax
80101ae9: 25 ff 01 00 00 and $0x1ff,%eax
80101aee: 29 fb sub %edi,%ebx
memmove(dst, bp->data + off%BSIZE, m);
80101af0: 89 55 dc mov %edx,-0x24(%ebp)
m = min(n - tot, BSIZE - off%BSIZE);
80101af3: 29 c1 sub %eax,%ecx
memmove(dst, bp->data + off%BSIZE, m);
80101af5: 8d 44 02 5c lea 0x5c(%edx,%eax,1),%eax
m = min(n - tot, BSIZE - off%BSIZE);
80101af9: 39 d9 cmp %ebx,%ecx
80101afb: 0f 46 d9 cmovbe %ecx,%ebx
memmove(dst, bp->data + off%BSIZE, m);
80101afe: 53 push %ebx
for(tot=0; tot<n; tot+=m, off+=m, dst+=m){
80101aff: 01 df add %ebx,%edi
80101b01: 01 de add %ebx,%esi
memmove(dst, bp->data + off%BSIZE, m);
80101b03: 50 push %eax
80101b04: ff 75 e0 pushl -0x20(%ebp)
80101b07: e8 24 2e 00 00 call 80104930 <memmove>
brelse(bp);
80101b0c: 8b 55 dc mov -0x24(%ebp),%edx
80101b0f: 89 14 24 mov %edx,(%esp)
80101b12: e8 d9 e6 ff ff call 801001f0 <brelse>
for(tot=0; tot<n; tot+=m, off+=m, dst+=m){
80101b17: 01 5d e0 add %ebx,-0x20(%ebp)
80101b1a: 83 c4 10 add $0x10,%esp
80101b1d: 39 7d e4 cmp %edi,-0x1c(%ebp)
80101b20: 77 9e ja 80101ac0 <readi+0x60>
}
return n;
80101b22: 8b 45 e4 mov -0x1c(%ebp),%eax
}
80101b25: 8d 65 f4 lea -0xc(%ebp),%esp
80101b28: 5b pop %ebx
80101b29: 5e pop %esi
80101b2a: 5f pop %edi
80101b2b: 5d pop %ebp
80101b2c: c3 ret
80101b2d: 8d 76 00 lea 0x0(%esi),%esi
if(ip->major < 0 || ip->major >= NDEV || !devsw[ip->major].read)
80101b30: 0f bf 40 52 movswl 0x52(%eax),%eax
80101b34: 66 83 f8 09 cmp $0x9,%ax
80101b38: 77 17 ja 80101b51 <readi+0xf1>
80101b3a: 8b 04 c5 20 13 11 80 mov -0x7feeece0(,%eax,8),%eax
80101b41: 85 c0 test %eax,%eax
80101b43: 74 0c je 80101b51 <readi+0xf1>
return devsw[ip->major].read(ip, dst, n);
80101b45: 89 7d 10 mov %edi,0x10(%ebp)
}
80101b48: 8d 65 f4 lea -0xc(%ebp),%esp
80101b4b: 5b pop %ebx
80101b4c: 5e pop %esi
80101b4d: 5f pop %edi
80101b4e: 5d pop %ebp
return devsw[ip->major].read(ip, dst, n);
80101b4f: ff e0 jmp *%eax
return -1;
80101b51: b8 ff ff ff ff mov $0xffffffff,%eax
80101b56: eb cd jmp 80101b25 <readi+0xc5>
80101b58: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80101b5f: 90 nop
80101b60 <writei>:
// PAGEBREAK!
// Write data to inode.
// Caller must hold ip->lock.
int
writei(struct inode *ip, char *src, uint off, uint n)
{
80101b60: f3 0f 1e fb endbr32
80101b64: 55 push %ebp
80101b65: 89 e5 mov %esp,%ebp
80101b67: 57 push %edi
80101b68: 56 push %esi
80101b69: 53 push %ebx
80101b6a: 83 ec 1c sub $0x1c,%esp
80101b6d: 8b 45 08 mov 0x8(%ebp),%eax
80101b70: 8b 75 0c mov 0xc(%ebp),%esi
80101b73: 8b 7d 14 mov 0x14(%ebp),%edi
uint tot, m;
struct buf *bp;
if(ip->type == T_DEV){
80101b76: 66 83 78 50 03 cmpw $0x3,0x50(%eax)
{
80101b7b: 89 75 dc mov %esi,-0x24(%ebp)
80101b7e: 89 45 d8 mov %eax,-0x28(%ebp)
80101b81: 8b 75 10 mov 0x10(%ebp),%esi
80101b84: 89 7d e0 mov %edi,-0x20(%ebp)
if(ip->type == T_DEV){
80101b87: 0f 84 b3 00 00 00 je 80101c40 <writei+0xe0>
if(ip->major < 0 || ip->major >= NDEV || !devsw[ip->major].write)
return -1;
return devsw[ip->major].write(ip, src, n);
}
if(off > ip->size || off + n < off)
80101b8d: 8b 45 d8 mov -0x28(%ebp),%eax
80101b90: 39 70 58 cmp %esi,0x58(%eax)
80101b93: 0f 82 e3 00 00 00 jb 80101c7c <writei+0x11c>
return -1;
if(off + n > MAXFILE*BSIZE)
80101b99: 8b 7d e0 mov -0x20(%ebp),%edi
80101b9c: 89 f8 mov %edi,%eax
80101b9e: 01 f0 add %esi,%eax
80101ba0: 0f 82 d6 00 00 00 jb 80101c7c <writei+0x11c>
80101ba6: 3d 00 18 01 00 cmp $0x11800,%eax
80101bab: 0f 87 cb 00 00 00 ja 80101c7c <writei+0x11c>
return -1;
for(tot=0; tot<n; tot+=m, off+=m, src+=m){
80101bb1: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
80101bb8: 85 ff test %edi,%edi
80101bba: 74 75 je 80101c31 <writei+0xd1>
80101bbc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
bp = bread(ip->dev, bmap(ip, off/BSIZE));
80101bc0: 8b 7d d8 mov -0x28(%ebp),%edi
80101bc3: 89 f2 mov %esi,%edx
80101bc5: c1 ea 09 shr $0x9,%edx
80101bc8: 89 f8 mov %edi,%eax
80101bca: e8 61 f8 ff ff call 80101430 <bmap>
80101bcf: 83 ec 08 sub $0x8,%esp
80101bd2: 50 push %eax
80101bd3: ff 37 pushl (%edi)
80101bd5: e8 f6 e4 ff ff call 801000d0 <bread>
m = min(n - tot, BSIZE - off%BSIZE);
80101bda: b9 00 02 00 00 mov $0x200,%ecx
80101bdf: 8b 5d e0 mov -0x20(%ebp),%ebx
80101be2: 2b 5d e4 sub -0x1c(%ebp),%ebx
bp = bread(ip->dev, bmap(ip, off/BSIZE));
80101be5: 89 c7 mov %eax,%edi
m = min(n - tot, BSIZE - off%BSIZE);
80101be7: 89 f0 mov %esi,%eax
80101be9: 83 c4 0c add $0xc,%esp
80101bec: 25 ff 01 00 00 and $0x1ff,%eax
80101bf1: 29 c1 sub %eax,%ecx
memmove(bp->data + off%BSIZE, src, m);
80101bf3: 8d 44 07 5c lea 0x5c(%edi,%eax,1),%eax
m = min(n - tot, BSIZE - off%BSIZE);
80101bf7: 39 d9 cmp %ebx,%ecx
80101bf9: 0f 46 d9 cmovbe %ecx,%ebx
memmove(bp->data + off%BSIZE, src, m);
80101bfc: 53 push %ebx
for(tot=0; tot<n; tot+=m, off+=m, src+=m){
80101bfd: 01 de add %ebx,%esi
memmove(bp->data + off%BSIZE, src, m);
80101bff: ff 75 dc pushl -0x24(%ebp)
80101c02: 50 push %eax
80101c03: e8 28 2d 00 00 call 80104930 <memmove>
log_write(bp);
80101c08: 89 3c 24 mov %edi,(%esp)
80101c0b: e8 00 13 00 00 call 80102f10 <log_write>
brelse(bp);
80101c10: 89 3c 24 mov %edi,(%esp)
80101c13: e8 d8 e5 ff ff call 801001f0 <brelse>
for(tot=0; tot<n; tot+=m, off+=m, src+=m){
80101c18: 01 5d e4 add %ebx,-0x1c(%ebp)
80101c1b: 83 c4 10 add $0x10,%esp
80101c1e: 8b 45 e4 mov -0x1c(%ebp),%eax
80101c21: 01 5d dc add %ebx,-0x24(%ebp)
80101c24: 39 45 e0 cmp %eax,-0x20(%ebp)
80101c27: 77 97 ja 80101bc0 <writei+0x60>
}
if(n > 0 && off > ip->size){
80101c29: 8b 45 d8 mov -0x28(%ebp),%eax
80101c2c: 3b 70 58 cmp 0x58(%eax),%esi
80101c2f: 77 37 ja 80101c68 <writei+0x108>
ip->size = off;
iupdate(ip);
}
return n;
80101c31: 8b 45 e0 mov -0x20(%ebp),%eax
}
80101c34: 8d 65 f4 lea -0xc(%ebp),%esp
80101c37: 5b pop %ebx
80101c38: 5e pop %esi
80101c39: 5f pop %edi
80101c3a: 5d pop %ebp
80101c3b: c3 ret
80101c3c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if(ip->major < 0 || ip->major >= NDEV || !devsw[ip->major].write)
80101c40: 0f bf 40 52 movswl 0x52(%eax),%eax
80101c44: 66 83 f8 09 cmp $0x9,%ax
80101c48: 77 32 ja 80101c7c <writei+0x11c>
80101c4a: 8b 04 c5 24 13 11 80 mov -0x7feeecdc(,%eax,8),%eax
80101c51: 85 c0 test %eax,%eax
80101c53: 74 27 je 80101c7c <writei+0x11c>
return devsw[ip->major].write(ip, src, n);
80101c55: 89 7d 10 mov %edi,0x10(%ebp)
}
80101c58: 8d 65 f4 lea -0xc(%ebp),%esp
80101c5b: 5b pop %ebx
80101c5c: 5e pop %esi
80101c5d: 5f pop %edi
80101c5e: 5d pop %ebp
return devsw[ip->major].write(ip, src, n);
80101c5f: ff e0 jmp *%eax
80101c61: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
ip->size = off;
80101c68: 8b 45 d8 mov -0x28(%ebp),%eax
iupdate(ip);
80101c6b: 83 ec 0c sub $0xc,%esp
ip->size = off;
80101c6e: 89 70 58 mov %esi,0x58(%eax)
iupdate(ip);
80101c71: 50 push %eax
80101c72: e8 29 fa ff ff call 801016a0 <iupdate>
80101c77: 83 c4 10 add $0x10,%esp
80101c7a: eb b5 jmp 80101c31 <writei+0xd1>
return -1;
80101c7c: b8 ff ff ff ff mov $0xffffffff,%eax
80101c81: eb b1 jmp 80101c34 <writei+0xd4>
80101c83: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80101c8a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80101c90 <namecmp>:
//PAGEBREAK!
// Directories
int
namecmp(const char *s, const char *t)
{
80101c90: f3 0f 1e fb endbr32
80101c94: 55 push %ebp
80101c95: 89 e5 mov %esp,%ebp
80101c97: 83 ec 0c sub $0xc,%esp
return strncmp(s, t, DIRSIZ);
80101c9a: 6a 0e push $0xe
80101c9c: ff 75 0c pushl 0xc(%ebp)
80101c9f: ff 75 08 pushl 0x8(%ebp)
80101ca2: e8 f9 2c 00 00 call 801049a0 <strncmp>
}
80101ca7: c9 leave
80101ca8: c3 ret
80101ca9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80101cb0 <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)
{
80101cb0: f3 0f 1e fb endbr32
80101cb4: 55 push %ebp
80101cb5: 89 e5 mov %esp,%ebp
80101cb7: 57 push %edi
80101cb8: 56 push %esi
80101cb9: 53 push %ebx
80101cba: 83 ec 1c sub $0x1c,%esp
80101cbd: 8b 5d 08 mov 0x8(%ebp),%ebx
uint off, inum;
struct dirent de;
if(dp->type != T_DIR)
80101cc0: 66 83 7b 50 01 cmpw $0x1,0x50(%ebx)
80101cc5: 0f 85 89 00 00 00 jne 80101d54 <dirlookup+0xa4>
panic("dirlookup not DIR");
for(off = 0; off < dp->size; off += sizeof(de)){
80101ccb: 8b 53 58 mov 0x58(%ebx),%edx
80101cce: 31 ff xor %edi,%edi
80101cd0: 8d 75 d8 lea -0x28(%ebp),%esi
80101cd3: 85 d2 test %edx,%edx
80101cd5: 74 42 je 80101d19 <dirlookup+0x69>
80101cd7: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80101cde: 66 90 xchg %ax,%ax
if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
80101ce0: 6a 10 push $0x10
80101ce2: 57 push %edi
80101ce3: 56 push %esi
80101ce4: 53 push %ebx
80101ce5: e8 76 fd ff ff call 80101a60 <readi>
80101cea: 83 c4 10 add $0x10,%esp
80101ced: 83 f8 10 cmp $0x10,%eax
80101cf0: 75 55 jne 80101d47 <dirlookup+0x97>
panic("dirlookup read");
if(de.inum == 0)
80101cf2: 66 83 7d d8 00 cmpw $0x0,-0x28(%ebp)
80101cf7: 74 18 je 80101d11 <dirlookup+0x61>
return strncmp(s, t, DIRSIZ);
80101cf9: 83 ec 04 sub $0x4,%esp
80101cfc: 8d 45 da lea -0x26(%ebp),%eax
80101cff: 6a 0e push $0xe
80101d01: 50 push %eax
80101d02: ff 75 0c pushl 0xc(%ebp)
80101d05: e8 96 2c 00 00 call 801049a0 <strncmp>
continue;
if(namecmp(name, de.name) == 0){
80101d0a: 83 c4 10 add $0x10,%esp
80101d0d: 85 c0 test %eax,%eax
80101d0f: 74 17 je 80101d28 <dirlookup+0x78>
for(off = 0; off < dp->size; off += sizeof(de)){
80101d11: 83 c7 10 add $0x10,%edi
80101d14: 3b 7b 58 cmp 0x58(%ebx),%edi
80101d17: 72 c7 jb 80101ce0 <dirlookup+0x30>
return iget(dp->dev, inum);
}
}
return 0;
}
80101d19: 8d 65 f4 lea -0xc(%ebp),%esp
return 0;
80101d1c: 31 c0 xor %eax,%eax
}
80101d1e: 5b pop %ebx
80101d1f: 5e pop %esi
80101d20: 5f pop %edi
80101d21: 5d pop %ebp
80101d22: c3 ret
80101d23: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80101d27: 90 nop
if(poff)
80101d28: 8b 45 10 mov 0x10(%ebp),%eax
80101d2b: 85 c0 test %eax,%eax
80101d2d: 74 05 je 80101d34 <dirlookup+0x84>
*poff = off;
80101d2f: 8b 45 10 mov 0x10(%ebp),%eax
80101d32: 89 38 mov %edi,(%eax)
inum = de.inum;
80101d34: 0f b7 55 d8 movzwl -0x28(%ebp),%edx
return iget(dp->dev, inum);
80101d38: 8b 03 mov (%ebx),%eax
80101d3a: e8 01 f6 ff ff call 80101340 <iget>
}
80101d3f: 8d 65 f4 lea -0xc(%ebp),%esp
80101d42: 5b pop %ebx
80101d43: 5e pop %esi
80101d44: 5f pop %edi
80101d45: 5d pop %ebp
80101d46: c3 ret
panic("dirlookup read");
80101d47: 83 ec 0c sub $0xc,%esp
80101d4a: 68 d9 76 10 80 push $0x801076d9
80101d4f: e8 3c e6 ff ff call 80100390 <panic>
panic("dirlookup not DIR");
80101d54: 83 ec 0c sub $0xc,%esp
80101d57: 68 c7 76 10 80 push $0x801076c7
80101d5c: e8 2f e6 ff ff call 80100390 <panic>
80101d61: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80101d68: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80101d6f: 90 nop
80101d70 <namex>:
// If parent != 0, return the inode for the parent and copy the final
// path element into name, which must have room for DIRSIZ bytes.
// Must be called inside a transaction since it calls iput().
static struct inode*
namex(char *path, int nameiparent, char *name)
{
80101d70: 55 push %ebp
80101d71: 89 e5 mov %esp,%ebp
80101d73: 57 push %edi
80101d74: 56 push %esi
80101d75: 53 push %ebx
80101d76: 89 c3 mov %eax,%ebx
80101d78: 83 ec 1c sub $0x1c,%esp
struct inode *ip, *next;
if(*path == '/')
80101d7b: 80 38 2f cmpb $0x2f,(%eax)
{
80101d7e: 89 55 e0 mov %edx,-0x20(%ebp)
80101d81: 89 4d e4 mov %ecx,-0x1c(%ebp)
if(*path == '/')
80101d84: 0f 84 86 01 00 00 je 80101f10 <namex+0x1a0>
ip = iget(ROOTDEV, ROOTINO);
else
ip = idup(myproc()->cwd);
80101d8a: e8 d1 1b 00 00 call 80103960 <myproc>
acquire(&icache.lock);
80101d8f: 83 ec 0c sub $0xc,%esp
80101d92: 89 df mov %ebx,%edi
ip = idup(myproc()->cwd);
80101d94: 8b 70 68 mov 0x68(%eax),%esi
acquire(&icache.lock);
80101d97: 68 a0 13 11 80 push $0x801113a0
80101d9c: e8 df 29 00 00 call 80104780 <acquire>
ip->ref++;
80101da1: 83 46 08 01 addl $0x1,0x8(%esi)
release(&icache.lock);
80101da5: c7 04 24 a0 13 11 80 movl $0x801113a0,(%esp)
80101dac: e8 8f 2a 00 00 call 80104840 <release>
80101db1: 83 c4 10 add $0x10,%esp
80101db4: eb 0d jmp 80101dc3 <namex+0x53>
80101db6: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80101dbd: 8d 76 00 lea 0x0(%esi),%esi
path++;
80101dc0: 83 c7 01 add $0x1,%edi
while(*path == '/')
80101dc3: 0f b6 07 movzbl (%edi),%eax
80101dc6: 3c 2f cmp $0x2f,%al
80101dc8: 74 f6 je 80101dc0 <namex+0x50>
if(*path == 0)
80101dca: 84 c0 test %al,%al
80101dcc: 0f 84 ee 00 00 00 je 80101ec0 <namex+0x150>
while(*path != '/' && *path != 0)
80101dd2: 0f b6 07 movzbl (%edi),%eax
80101dd5: 84 c0 test %al,%al
80101dd7: 0f 84 fb 00 00 00 je 80101ed8 <namex+0x168>
80101ddd: 89 fb mov %edi,%ebx
80101ddf: 3c 2f cmp $0x2f,%al
80101de1: 0f 84 f1 00 00 00 je 80101ed8 <namex+0x168>
80101de7: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80101dee: 66 90 xchg %ax,%ax
80101df0: 0f b6 43 01 movzbl 0x1(%ebx),%eax
path++;
80101df4: 83 c3 01 add $0x1,%ebx
while(*path != '/' && *path != 0)
80101df7: 3c 2f cmp $0x2f,%al
80101df9: 74 04 je 80101dff <namex+0x8f>
80101dfb: 84 c0 test %al,%al
80101dfd: 75 f1 jne 80101df0 <namex+0x80>
len = path - s;
80101dff: 89 d8 mov %ebx,%eax
80101e01: 29 f8 sub %edi,%eax
if(len >= DIRSIZ)
80101e03: 83 f8 0d cmp $0xd,%eax
80101e06: 0f 8e 84 00 00 00 jle 80101e90 <namex+0x120>
memmove(name, s, DIRSIZ);
80101e0c: 83 ec 04 sub $0x4,%esp
80101e0f: 6a 0e push $0xe
80101e11: 57 push %edi
path++;
80101e12: 89 df mov %ebx,%edi
memmove(name, s, DIRSIZ);
80101e14: ff 75 e4 pushl -0x1c(%ebp)
80101e17: e8 14 2b 00 00 call 80104930 <memmove>
80101e1c: 83 c4 10 add $0x10,%esp
while(*path == '/')
80101e1f: 80 3b 2f cmpb $0x2f,(%ebx)
80101e22: 75 0c jne 80101e30 <namex+0xc0>
80101e24: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
path++;
80101e28: 83 c7 01 add $0x1,%edi
while(*path == '/')
80101e2b: 80 3f 2f cmpb $0x2f,(%edi)
80101e2e: 74 f8 je 80101e28 <namex+0xb8>
while((path = skipelem(path, name)) != 0){
ilock(ip);
80101e30: 83 ec 0c sub $0xc,%esp
80101e33: 56 push %esi
80101e34: e8 27 f9 ff ff call 80101760 <ilock>
if(ip->type != T_DIR){
80101e39: 83 c4 10 add $0x10,%esp
80101e3c: 66 83 7e 50 01 cmpw $0x1,0x50(%esi)
80101e41: 0f 85 a1 00 00 00 jne 80101ee8 <namex+0x178>
iunlockput(ip);
return 0;
}
if(nameiparent && *path == '\0'){
80101e47: 8b 55 e0 mov -0x20(%ebp),%edx
80101e4a: 85 d2 test %edx,%edx
80101e4c: 74 09 je 80101e57 <namex+0xe7>
80101e4e: 80 3f 00 cmpb $0x0,(%edi)
80101e51: 0f 84 d9 00 00 00 je 80101f30 <namex+0x1c0>
// Stop one level early.
iunlock(ip);
return ip;
}
if((next = dirlookup(ip, name, 0)) == 0){
80101e57: 83 ec 04 sub $0x4,%esp
80101e5a: 6a 00 push $0x0
80101e5c: ff 75 e4 pushl -0x1c(%ebp)
80101e5f: 56 push %esi
80101e60: e8 4b fe ff ff call 80101cb0 <dirlookup>
80101e65: 83 c4 10 add $0x10,%esp
80101e68: 89 c3 mov %eax,%ebx
80101e6a: 85 c0 test %eax,%eax
80101e6c: 74 7a je 80101ee8 <namex+0x178>
iunlock(ip);
80101e6e: 83 ec 0c sub $0xc,%esp
80101e71: 56 push %esi
80101e72: e8 c9 f9 ff ff call 80101840 <iunlock>
iput(ip);
80101e77: 89 34 24 mov %esi,(%esp)
80101e7a: 89 de mov %ebx,%esi
80101e7c: e8 0f fa ff ff call 80101890 <iput>
80101e81: 83 c4 10 add $0x10,%esp
80101e84: e9 3a ff ff ff jmp 80101dc3 <namex+0x53>
80101e89: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80101e90: 8b 55 e4 mov -0x1c(%ebp),%edx
80101e93: 8d 0c 02 lea (%edx,%eax,1),%ecx
80101e96: 89 4d dc mov %ecx,-0x24(%ebp)
memmove(name, s, len);
80101e99: 83 ec 04 sub $0x4,%esp
80101e9c: 50 push %eax
80101e9d: 57 push %edi
name[len] = 0;
80101e9e: 89 df mov %ebx,%edi
memmove(name, s, len);
80101ea0: ff 75 e4 pushl -0x1c(%ebp)
80101ea3: e8 88 2a 00 00 call 80104930 <memmove>
name[len] = 0;
80101ea8: 8b 45 dc mov -0x24(%ebp),%eax
80101eab: 83 c4 10 add $0x10,%esp
80101eae: c6 00 00 movb $0x0,(%eax)
80101eb1: e9 69 ff ff ff jmp 80101e1f <namex+0xaf>
80101eb6: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80101ebd: 8d 76 00 lea 0x0(%esi),%esi
return 0;
}
iunlockput(ip);
ip = next;
}
if(nameiparent){
80101ec0: 8b 45 e0 mov -0x20(%ebp),%eax
80101ec3: 85 c0 test %eax,%eax
80101ec5: 0f 85 85 00 00 00 jne 80101f50 <namex+0x1e0>
iput(ip);
return 0;
}
return ip;
}
80101ecb: 8d 65 f4 lea -0xc(%ebp),%esp
80101ece: 89 f0 mov %esi,%eax
80101ed0: 5b pop %ebx
80101ed1: 5e pop %esi
80101ed2: 5f pop %edi
80101ed3: 5d pop %ebp
80101ed4: c3 ret
80101ed5: 8d 76 00 lea 0x0(%esi),%esi
while(*path != '/' && *path != 0)
80101ed8: 8b 45 e4 mov -0x1c(%ebp),%eax
80101edb: 89 fb mov %edi,%ebx
80101edd: 89 45 dc mov %eax,-0x24(%ebp)
80101ee0: 31 c0 xor %eax,%eax
80101ee2: eb b5 jmp 80101e99 <namex+0x129>
80101ee4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
iunlock(ip);
80101ee8: 83 ec 0c sub $0xc,%esp
80101eeb: 56 push %esi
80101eec: e8 4f f9 ff ff call 80101840 <iunlock>
iput(ip);
80101ef1: 89 34 24 mov %esi,(%esp)
return 0;
80101ef4: 31 f6 xor %esi,%esi
iput(ip);
80101ef6: e8 95 f9 ff ff call 80101890 <iput>
return 0;
80101efb: 83 c4 10 add $0x10,%esp
}
80101efe: 8d 65 f4 lea -0xc(%ebp),%esp
80101f01: 89 f0 mov %esi,%eax
80101f03: 5b pop %ebx
80101f04: 5e pop %esi
80101f05: 5f pop %edi
80101f06: 5d pop %ebp
80101f07: c3 ret
80101f08: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80101f0f: 90 nop
ip = iget(ROOTDEV, ROOTINO);
80101f10: ba 01 00 00 00 mov $0x1,%edx
80101f15: b8 01 00 00 00 mov $0x1,%eax
80101f1a: 89 df mov %ebx,%edi
80101f1c: e8 1f f4 ff ff call 80101340 <iget>
80101f21: 89 c6 mov %eax,%esi
80101f23: e9 9b fe ff ff jmp 80101dc3 <namex+0x53>
80101f28: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80101f2f: 90 nop
iunlock(ip);
80101f30: 83 ec 0c sub $0xc,%esp
80101f33: 56 push %esi
80101f34: e8 07 f9 ff ff call 80101840 <iunlock>
return ip;
80101f39: 83 c4 10 add $0x10,%esp
}
80101f3c: 8d 65 f4 lea -0xc(%ebp),%esp
80101f3f: 89 f0 mov %esi,%eax
80101f41: 5b pop %ebx
80101f42: 5e pop %esi
80101f43: 5f pop %edi
80101f44: 5d pop %ebp
80101f45: c3 ret
80101f46: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80101f4d: 8d 76 00 lea 0x0(%esi),%esi
iput(ip);
80101f50: 83 ec 0c sub $0xc,%esp
80101f53: 56 push %esi
return 0;
80101f54: 31 f6 xor %esi,%esi
iput(ip);
80101f56: e8 35 f9 ff ff call 80101890 <iput>
return 0;
80101f5b: 83 c4 10 add $0x10,%esp
80101f5e: e9 68 ff ff ff jmp 80101ecb <namex+0x15b>
80101f63: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80101f6a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80101f70 <dirlink>:
{
80101f70: f3 0f 1e fb endbr32
80101f74: 55 push %ebp
80101f75: 89 e5 mov %esp,%ebp
80101f77: 57 push %edi
80101f78: 56 push %esi
80101f79: 53 push %ebx
80101f7a: 83 ec 20 sub $0x20,%esp
80101f7d: 8b 5d 08 mov 0x8(%ebp),%ebx
if((ip = dirlookup(dp, name, 0)) != 0){
80101f80: 6a 00 push $0x0
80101f82: ff 75 0c pushl 0xc(%ebp)
80101f85: 53 push %ebx
80101f86: e8 25 fd ff ff call 80101cb0 <dirlookup>
80101f8b: 83 c4 10 add $0x10,%esp
80101f8e: 85 c0 test %eax,%eax
80101f90: 75 6b jne 80101ffd <dirlink+0x8d>
for(off = 0; off < dp->size; off += sizeof(de)){
80101f92: 8b 7b 58 mov 0x58(%ebx),%edi
80101f95: 8d 75 d8 lea -0x28(%ebp),%esi
80101f98: 85 ff test %edi,%edi
80101f9a: 74 2d je 80101fc9 <dirlink+0x59>
80101f9c: 31 ff xor %edi,%edi
80101f9e: 8d 75 d8 lea -0x28(%ebp),%esi
80101fa1: eb 0d jmp 80101fb0 <dirlink+0x40>
80101fa3: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80101fa7: 90 nop
80101fa8: 83 c7 10 add $0x10,%edi
80101fab: 3b 7b 58 cmp 0x58(%ebx),%edi
80101fae: 73 19 jae 80101fc9 <dirlink+0x59>
if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
80101fb0: 6a 10 push $0x10
80101fb2: 57 push %edi
80101fb3: 56 push %esi
80101fb4: 53 push %ebx
80101fb5: e8 a6 fa ff ff call 80101a60 <readi>
80101fba: 83 c4 10 add $0x10,%esp
80101fbd: 83 f8 10 cmp $0x10,%eax
80101fc0: 75 4e jne 80102010 <dirlink+0xa0>
if(de.inum == 0)
80101fc2: 66 83 7d d8 00 cmpw $0x0,-0x28(%ebp)
80101fc7: 75 df jne 80101fa8 <dirlink+0x38>
strncpy(de.name, name, DIRSIZ);
80101fc9: 83 ec 04 sub $0x4,%esp
80101fcc: 8d 45 da lea -0x26(%ebp),%eax
80101fcf: 6a 0e push $0xe
80101fd1: ff 75 0c pushl 0xc(%ebp)
80101fd4: 50 push %eax
80101fd5: e8 16 2a 00 00 call 801049f0 <strncpy>
if(writei(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
80101fda: 6a 10 push $0x10
de.inum = inum;
80101fdc: 8b 45 10 mov 0x10(%ebp),%eax
if(writei(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
80101fdf: 57 push %edi
80101fe0: 56 push %esi
80101fe1: 53 push %ebx
de.inum = inum;
80101fe2: 66 89 45 d8 mov %ax,-0x28(%ebp)
if(writei(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
80101fe6: e8 75 fb ff ff call 80101b60 <writei>
80101feb: 83 c4 20 add $0x20,%esp
80101fee: 83 f8 10 cmp $0x10,%eax
80101ff1: 75 2a jne 8010201d <dirlink+0xad>
return 0;
80101ff3: 31 c0 xor %eax,%eax
}
80101ff5: 8d 65 f4 lea -0xc(%ebp),%esp
80101ff8: 5b pop %ebx
80101ff9: 5e pop %esi
80101ffa: 5f pop %edi
80101ffb: 5d pop %ebp
80101ffc: c3 ret
iput(ip);
80101ffd: 83 ec 0c sub $0xc,%esp
80102000: 50 push %eax
80102001: e8 8a f8 ff ff call 80101890 <iput>
return -1;
80102006: 83 c4 10 add $0x10,%esp
80102009: b8 ff ff ff ff mov $0xffffffff,%eax
8010200e: eb e5 jmp 80101ff5 <dirlink+0x85>
panic("dirlink read");
80102010: 83 ec 0c sub $0xc,%esp
80102013: 68 e8 76 10 80 push $0x801076e8
80102018: e8 73 e3 ff ff call 80100390 <panic>
panic("dirlink");
8010201d: 83 ec 0c sub $0xc,%esp
80102020: 68 c6 7c 10 80 push $0x80107cc6
80102025: e8 66 e3 ff ff call 80100390 <panic>
8010202a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80102030 <namei>:
struct inode*
namei(char *path)
{
80102030: f3 0f 1e fb endbr32
80102034: 55 push %ebp
char name[DIRSIZ];
return namex(path, 0, name);
80102035: 31 d2 xor %edx,%edx
{
80102037: 89 e5 mov %esp,%ebp
80102039: 83 ec 18 sub $0x18,%esp
return namex(path, 0, name);
8010203c: 8b 45 08 mov 0x8(%ebp),%eax
8010203f: 8d 4d ea lea -0x16(%ebp),%ecx
80102042: e8 29 fd ff ff call 80101d70 <namex>
}
80102047: c9 leave
80102048: c3 ret
80102049: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80102050 <nameiparent>:
struct inode*
nameiparent(char *path, char *name)
{
80102050: f3 0f 1e fb endbr32
80102054: 55 push %ebp
return namex(path, 1, name);
80102055: ba 01 00 00 00 mov $0x1,%edx
{
8010205a: 89 e5 mov %esp,%ebp
return namex(path, 1, name);
8010205c: 8b 4d 0c mov 0xc(%ebp),%ecx
8010205f: 8b 45 08 mov 0x8(%ebp),%eax
}
80102062: 5d pop %ebp
return namex(path, 1, name);
80102063: e9 08 fd ff ff jmp 80101d70 <namex>
80102068: 66 90 xchg %ax,%ax
8010206a: 66 90 xchg %ax,%ax
8010206c: 66 90 xchg %ax,%ax
8010206e: 66 90 xchg %ax,%ax
80102070 <idestart>:
}
// Start the request for b. Caller must hold idelock.
static void
idestart(struct buf *b)
{
80102070: 55 push %ebp
80102071: 89 e5 mov %esp,%ebp
80102073: 57 push %edi
80102074: 56 push %esi
80102075: 53 push %ebx
80102076: 83 ec 0c sub $0xc,%esp
if(b == 0)
80102079: 85 c0 test %eax,%eax
8010207b: 0f 84 b4 00 00 00 je 80102135 <idestart+0xc5>
panic("idestart");
if(b->blockno >= FSSIZE)
80102081: 8b 70 08 mov 0x8(%eax),%esi
80102084: 89 c3 mov %eax,%ebx
80102086: 81 fe e7 03 00 00 cmp $0x3e7,%esi
8010208c: 0f 87 96 00 00 00 ja 80102128 <idestart+0xb8>
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102092: b9 f7 01 00 00 mov $0x1f7,%ecx
80102097: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010209e: 66 90 xchg %ax,%ax
801020a0: 89 ca mov %ecx,%edx
801020a2: ec in (%dx),%al
while(((r = inb(0x1f7)) & (IDE_BSY|IDE_DRDY)) != IDE_DRDY)
801020a3: 83 e0 c0 and $0xffffffc0,%eax
801020a6: 3c 40 cmp $0x40,%al
801020a8: 75 f6 jne 801020a0 <idestart+0x30>
asm volatile("out %0,%1" : : "a" (data), "d" (port));
801020aa: 31 ff xor %edi,%edi
801020ac: ba f6 03 00 00 mov $0x3f6,%edx
801020b1: 89 f8 mov %edi,%eax
801020b3: ee out %al,(%dx)
801020b4: b8 01 00 00 00 mov $0x1,%eax
801020b9: ba f2 01 00 00 mov $0x1f2,%edx
801020be: ee out %al,(%dx)
801020bf: ba f3 01 00 00 mov $0x1f3,%edx
801020c4: 89 f0 mov %esi,%eax
801020c6: ee out %al,(%dx)
idewait(0);
outb(0x3f6, 0); // generate interrupt
outb(0x1f2, sector_per_block); // number of sectors
outb(0x1f3, sector & 0xff);
outb(0x1f4, (sector >> 8) & 0xff);
801020c7: 89 f0 mov %esi,%eax
801020c9: ba f4 01 00 00 mov $0x1f4,%edx
801020ce: c1 f8 08 sar $0x8,%eax
801020d1: ee out %al,(%dx)
801020d2: ba f5 01 00 00 mov $0x1f5,%edx
801020d7: 89 f8 mov %edi,%eax
801020d9: ee out %al,(%dx)
outb(0x1f5, (sector >> 16) & 0xff);
outb(0x1f6, 0xe0 | ((b->dev&1)<<4) | ((sector>>24)&0x0f));
801020da: 0f b6 43 04 movzbl 0x4(%ebx),%eax
801020de: ba f6 01 00 00 mov $0x1f6,%edx
801020e3: c1 e0 04 shl $0x4,%eax
801020e6: 83 e0 10 and $0x10,%eax
801020e9: 83 c8 e0 or $0xffffffe0,%eax
801020ec: ee out %al,(%dx)
if(b->flags & B_DIRTY){
801020ed: f6 03 04 testb $0x4,(%ebx)
801020f0: 75 16 jne 80102108 <idestart+0x98>
801020f2: b8 20 00 00 00 mov $0x20,%eax
801020f7: 89 ca mov %ecx,%edx
801020f9: ee out %al,(%dx)
outb(0x1f7, write_cmd);
outsl(0x1f0, b->data, BSIZE/4);
} else {
outb(0x1f7, read_cmd);
}
}
801020fa: 8d 65 f4 lea -0xc(%ebp),%esp
801020fd: 5b pop %ebx
801020fe: 5e pop %esi
801020ff: 5f pop %edi
80102100: 5d pop %ebp
80102101: c3 ret
80102102: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80102108: b8 30 00 00 00 mov $0x30,%eax
8010210d: 89 ca mov %ecx,%edx
8010210f: ee out %al,(%dx)
asm volatile("cld; rep outsl" :
80102110: b9 80 00 00 00 mov $0x80,%ecx
outsl(0x1f0, b->data, BSIZE/4);
80102115: 8d 73 5c lea 0x5c(%ebx),%esi
80102118: ba f0 01 00 00 mov $0x1f0,%edx
8010211d: fc cld
8010211e: f3 6f rep outsl %ds:(%esi),(%dx)
}
80102120: 8d 65 f4 lea -0xc(%ebp),%esp
80102123: 5b pop %ebx
80102124: 5e pop %esi
80102125: 5f pop %edi
80102126: 5d pop %ebp
80102127: c3 ret
panic("incorrect blockno");
80102128: 83 ec 0c sub $0xc,%esp
8010212b: 68 54 77 10 80 push $0x80107754
80102130: e8 5b e2 ff ff call 80100390 <panic>
panic("idestart");
80102135: 83 ec 0c sub $0xc,%esp
80102138: 68 4b 77 10 80 push $0x8010774b
8010213d: e8 4e e2 ff ff call 80100390 <panic>
80102142: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80102149: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80102150 <ideinit>:
{
80102150: f3 0f 1e fb endbr32
80102154: 55 push %ebp
80102155: 89 e5 mov %esp,%ebp
80102157: 83 ec 10 sub $0x10,%esp
initlock(&idelock, "ide");
8010215a: 68 66 77 10 80 push $0x80107766
8010215f: 68 80 a5 10 80 push $0x8010a580
80102164: e8 97 24 00 00 call 80104600 <initlock>
ioapicenable(IRQ_IDE, ncpu - 1);
80102169: 58 pop %eax
8010216a: a1 c0 36 11 80 mov 0x801136c0,%eax
8010216f: 5a pop %edx
80102170: 83 e8 01 sub $0x1,%eax
80102173: 50 push %eax
80102174: 6a 0e push $0xe
80102176: e8 b5 02 00 00 call 80102430 <ioapicenable>
while(((r = inb(0x1f7)) & (IDE_BSY|IDE_DRDY)) != IDE_DRDY)
8010217b: 83 c4 10 add $0x10,%esp
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
8010217e: ba f7 01 00 00 mov $0x1f7,%edx
80102183: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80102187: 90 nop
80102188: ec in (%dx),%al
80102189: 83 e0 c0 and $0xffffffc0,%eax
8010218c: 3c 40 cmp $0x40,%al
8010218e: 75 f8 jne 80102188 <ideinit+0x38>
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80102190: b8 f0 ff ff ff mov $0xfffffff0,%eax
80102195: ba f6 01 00 00 mov $0x1f6,%edx
8010219a: ee out %al,(%dx)
8010219b: b9 e8 03 00 00 mov $0x3e8,%ecx
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
801021a0: ba f7 01 00 00 mov $0x1f7,%edx
801021a5: eb 0e jmp 801021b5 <ideinit+0x65>
801021a7: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801021ae: 66 90 xchg %ax,%ax
for(i=0; i<1000; i++){
801021b0: 83 e9 01 sub $0x1,%ecx
801021b3: 74 0f je 801021c4 <ideinit+0x74>
801021b5: ec in (%dx),%al
if(inb(0x1f7) != 0){
801021b6: 84 c0 test %al,%al
801021b8: 74 f6 je 801021b0 <ideinit+0x60>
havedisk1 = 1;
801021ba: c7 05 60 a5 10 80 01 movl $0x1,0x8010a560
801021c1: 00 00 00
asm volatile("out %0,%1" : : "a" (data), "d" (port));
801021c4: b8 e0 ff ff ff mov $0xffffffe0,%eax
801021c9: ba f6 01 00 00 mov $0x1f6,%edx
801021ce: ee out %al,(%dx)
}
801021cf: c9 leave
801021d0: c3 ret
801021d1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801021d8: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801021df: 90 nop
801021e0 <ideintr>:
// Interrupt handler.
void
ideintr(void)
{
801021e0: f3 0f 1e fb endbr32
801021e4: 55 push %ebp
801021e5: 89 e5 mov %esp,%ebp
801021e7: 57 push %edi
801021e8: 56 push %esi
801021e9: 53 push %ebx
801021ea: 83 ec 18 sub $0x18,%esp
struct buf *b;
// First queued buffer is the active request.
acquire(&idelock);
801021ed: 68 80 a5 10 80 push $0x8010a580
801021f2: e8 89 25 00 00 call 80104780 <acquire>
if((b = idequeue) == 0){
801021f7: 8b 1d 64 a5 10 80 mov 0x8010a564,%ebx
801021fd: 83 c4 10 add $0x10,%esp
80102200: 85 db test %ebx,%ebx
80102202: 74 5f je 80102263 <ideintr+0x83>
release(&idelock);
return;
}
idequeue = b->qnext;
80102204: 8b 43 58 mov 0x58(%ebx),%eax
80102207: a3 64 a5 10 80 mov %eax,0x8010a564
// Read data if needed.
if(!(b->flags & B_DIRTY) && idewait(1) >= 0)
8010220c: 8b 33 mov (%ebx),%esi
8010220e: f7 c6 04 00 00 00 test $0x4,%esi
80102214: 75 2b jne 80102241 <ideintr+0x61>
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102216: ba f7 01 00 00 mov $0x1f7,%edx
8010221b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
8010221f: 90 nop
80102220: ec in (%dx),%al
while(((r = inb(0x1f7)) & (IDE_BSY|IDE_DRDY)) != IDE_DRDY)
80102221: 89 c1 mov %eax,%ecx
80102223: 83 e1 c0 and $0xffffffc0,%ecx
80102226: 80 f9 40 cmp $0x40,%cl
80102229: 75 f5 jne 80102220 <ideintr+0x40>
if(checkerr && (r & (IDE_DF|IDE_ERR)) != 0)
8010222b: a8 21 test $0x21,%al
8010222d: 75 12 jne 80102241 <ideintr+0x61>
insl(0x1f0, b->data, BSIZE/4);
8010222f: 8d 7b 5c lea 0x5c(%ebx),%edi
asm volatile("cld; rep insl" :
80102232: b9 80 00 00 00 mov $0x80,%ecx
80102237: ba f0 01 00 00 mov $0x1f0,%edx
8010223c: fc cld
8010223d: f3 6d rep insl (%dx),%es:(%edi)
8010223f: 8b 33 mov (%ebx),%esi
// Wake process waiting for this buf.
b->flags |= B_VALID;
b->flags &= ~B_DIRTY;
80102241: 83 e6 fb and $0xfffffffb,%esi
wakeup(b);
80102244: 83 ec 0c sub $0xc,%esp
b->flags &= ~B_DIRTY;
80102247: 83 ce 02 or $0x2,%esi
8010224a: 89 33 mov %esi,(%ebx)
wakeup(b);
8010224c: 53 push %ebx
8010224d: e8 8e 1e 00 00 call 801040e0 <wakeup>
// Start disk on next buf in queue.
if(idequeue != 0)
80102252: a1 64 a5 10 80 mov 0x8010a564,%eax
80102257: 83 c4 10 add $0x10,%esp
8010225a: 85 c0 test %eax,%eax
8010225c: 74 05 je 80102263 <ideintr+0x83>
idestart(idequeue);
8010225e: e8 0d fe ff ff call 80102070 <idestart>
release(&idelock);
80102263: 83 ec 0c sub $0xc,%esp
80102266: 68 80 a5 10 80 push $0x8010a580
8010226b: e8 d0 25 00 00 call 80104840 <release>
release(&idelock);
}
80102270: 8d 65 f4 lea -0xc(%ebp),%esp
80102273: 5b pop %ebx
80102274: 5e pop %esi
80102275: 5f pop %edi
80102276: 5d pop %ebp
80102277: c3 ret
80102278: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010227f: 90 nop
80102280 <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)
{
80102280: f3 0f 1e fb endbr32
80102284: 55 push %ebp
80102285: 89 e5 mov %esp,%ebp
80102287: 53 push %ebx
80102288: 83 ec 10 sub $0x10,%esp
8010228b: 8b 5d 08 mov 0x8(%ebp),%ebx
struct buf **pp;
if(!holdingsleep(&b->lock))
8010228e: 8d 43 0c lea 0xc(%ebx),%eax
80102291: 50 push %eax
80102292: e8 09 23 00 00 call 801045a0 <holdingsleep>
80102297: 83 c4 10 add $0x10,%esp
8010229a: 85 c0 test %eax,%eax
8010229c: 0f 84 cf 00 00 00 je 80102371 <iderw+0xf1>
panic("iderw: buf not locked");
if((b->flags & (B_VALID|B_DIRTY)) == B_VALID)
801022a2: 8b 03 mov (%ebx),%eax
801022a4: 83 e0 06 and $0x6,%eax
801022a7: 83 f8 02 cmp $0x2,%eax
801022aa: 0f 84 b4 00 00 00 je 80102364 <iderw+0xe4>
panic("iderw: nothing to do");
if(b->dev != 0 && !havedisk1)
801022b0: 8b 53 04 mov 0x4(%ebx),%edx
801022b3: 85 d2 test %edx,%edx
801022b5: 74 0d je 801022c4 <iderw+0x44>
801022b7: a1 60 a5 10 80 mov 0x8010a560,%eax
801022bc: 85 c0 test %eax,%eax
801022be: 0f 84 93 00 00 00 je 80102357 <iderw+0xd7>
panic("iderw: ide disk 1 not present");
acquire(&idelock); //DOC:acquire-lock
801022c4: 83 ec 0c sub $0xc,%esp
801022c7: 68 80 a5 10 80 push $0x8010a580
801022cc: e8 af 24 00 00 call 80104780 <acquire>
// Append b to idequeue.
b->qnext = 0;
for(pp=&idequeue; *pp; pp=&(*pp)->qnext) //DOC:insert-queue
801022d1: a1 64 a5 10 80 mov 0x8010a564,%eax
b->qnext = 0;
801022d6: c7 43 58 00 00 00 00 movl $0x0,0x58(%ebx)
for(pp=&idequeue; *pp; pp=&(*pp)->qnext) //DOC:insert-queue
801022dd: 83 c4 10 add $0x10,%esp
801022e0: 85 c0 test %eax,%eax
801022e2: 74 6c je 80102350 <iderw+0xd0>
801022e4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801022e8: 89 c2 mov %eax,%edx
801022ea: 8b 40 58 mov 0x58(%eax),%eax
801022ed: 85 c0 test %eax,%eax
801022ef: 75 f7 jne 801022e8 <iderw+0x68>
801022f1: 83 c2 58 add $0x58,%edx
;
*pp = b;
801022f4: 89 1a mov %ebx,(%edx)
// Start disk if necessary.
if(idequeue == b)
801022f6: 39 1d 64 a5 10 80 cmp %ebx,0x8010a564
801022fc: 74 42 je 80102340 <iderw+0xc0>
idestart(b);
// Wait for request to finish.
while((b->flags & (B_VALID|B_DIRTY)) != B_VALID){
801022fe: 8b 03 mov (%ebx),%eax
80102300: 83 e0 06 and $0x6,%eax
80102303: 83 f8 02 cmp $0x2,%eax
80102306: 74 23 je 8010232b <iderw+0xab>
80102308: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010230f: 90 nop
sleep(b, &idelock);
80102310: 83 ec 08 sub $0x8,%esp
80102313: 68 80 a5 10 80 push $0x8010a580
80102318: 53 push %ebx
80102319: e8 02 1c 00 00 call 80103f20 <sleep>
while((b->flags & (B_VALID|B_DIRTY)) != B_VALID){
8010231e: 8b 03 mov (%ebx),%eax
80102320: 83 c4 10 add $0x10,%esp
80102323: 83 e0 06 and $0x6,%eax
80102326: 83 f8 02 cmp $0x2,%eax
80102329: 75 e5 jne 80102310 <iderw+0x90>
}
release(&idelock);
8010232b: c7 45 08 80 a5 10 80 movl $0x8010a580,0x8(%ebp)
}
80102332: 8b 5d fc mov -0x4(%ebp),%ebx
80102335: c9 leave
release(&idelock);
80102336: e9 05 25 00 00 jmp 80104840 <release>
8010233b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
8010233f: 90 nop
idestart(b);
80102340: 89 d8 mov %ebx,%eax
80102342: e8 29 fd ff ff call 80102070 <idestart>
80102347: eb b5 jmp 801022fe <iderw+0x7e>
80102349: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
for(pp=&idequeue; *pp; pp=&(*pp)->qnext) //DOC:insert-queue
80102350: ba 64 a5 10 80 mov $0x8010a564,%edx
80102355: eb 9d jmp 801022f4 <iderw+0x74>
panic("iderw: ide disk 1 not present");
80102357: 83 ec 0c sub $0xc,%esp
8010235a: 68 95 77 10 80 push $0x80107795
8010235f: e8 2c e0 ff ff call 80100390 <panic>
panic("iderw: nothing to do");
80102364: 83 ec 0c sub $0xc,%esp
80102367: 68 80 77 10 80 push $0x80107780
8010236c: e8 1f e0 ff ff call 80100390 <panic>
panic("iderw: buf not locked");
80102371: 83 ec 0c sub $0xc,%esp
80102374: 68 6a 77 10 80 push $0x8010776a
80102379: e8 12 e0 ff ff call 80100390 <panic>
8010237e: 66 90 xchg %ax,%ax
80102380 <ioapicinit>:
ioapic->data = data;
}
void
ioapicinit(void)
{
80102380: f3 0f 1e fb endbr32
80102384: 55 push %ebp
int i, id, maxintr;
ioapic = (volatile struct ioapic*)IOAPIC;
80102385: c7 05 f4 2f 11 80 00 movl $0xfec00000,0x80112ff4
8010238c: 00 c0 fe
{
8010238f: 89 e5 mov %esp,%ebp
80102391: 56 push %esi
80102392: 53 push %ebx
ioapic->reg = reg;
80102393: c7 05 00 00 c0 fe 01 movl $0x1,0xfec00000
8010239a: 00 00 00
return ioapic->data;
8010239d: 8b 15 f4 2f 11 80 mov 0x80112ff4,%edx
801023a3: 8b 72 10 mov 0x10(%edx),%esi
ioapic->reg = reg;
801023a6: c7 02 00 00 00 00 movl $0x0,(%edx)
return ioapic->data;
801023ac: 8b 0d f4 2f 11 80 mov 0x80112ff4,%ecx
maxintr = (ioapicread(REG_VER) >> 16) & 0xFF;
id = ioapicread(REG_ID) >> 24;
if(id != ioapicid)
801023b2: 0f b6 15 20 31 11 80 movzbl 0x80113120,%edx
maxintr = (ioapicread(REG_VER) >> 16) & 0xFF;
801023b9: c1 ee 10 shr $0x10,%esi
801023bc: 89 f0 mov %esi,%eax
801023be: 0f b6 f0 movzbl %al,%esi
return ioapic->data;
801023c1: 8b 41 10 mov 0x10(%ecx),%eax
id = ioapicread(REG_ID) >> 24;
801023c4: c1 e8 18 shr $0x18,%eax
if(id != ioapicid)
801023c7: 39 c2 cmp %eax,%edx
801023c9: 74 16 je 801023e1 <ioapicinit+0x61>
cprintf("ioapicinit: id isn't equal to ioapicid; not a MP\n");
801023cb: 83 ec 0c sub $0xc,%esp
801023ce: 68 b4 77 10 80 push $0x801077b4
801023d3: e8 d8 e2 ff ff call 801006b0 <cprintf>
801023d8: 8b 0d f4 2f 11 80 mov 0x80112ff4,%ecx
801023de: 83 c4 10 add $0x10,%esp
801023e1: 83 c6 21 add $0x21,%esi
{
801023e4: ba 10 00 00 00 mov $0x10,%edx
801023e9: b8 20 00 00 00 mov $0x20,%eax
801023ee: 66 90 xchg %ax,%ax
ioapic->reg = reg;
801023f0: 89 11 mov %edx,(%ecx)
// Mark all interrupts edge-triggered, active high, disabled,
// and not routed to any CPUs.
for(i = 0; i <= maxintr; i++){
ioapicwrite(REG_TABLE+2*i, INT_DISABLED | (T_IRQ0 + i));
801023f2: 89 c3 mov %eax,%ebx
ioapic->data = data;
801023f4: 8b 0d f4 2f 11 80 mov 0x80112ff4,%ecx
801023fa: 83 c0 01 add $0x1,%eax
ioapicwrite(REG_TABLE+2*i, INT_DISABLED | (T_IRQ0 + i));
801023fd: 81 cb 00 00 01 00 or $0x10000,%ebx
ioapic->data = data;
80102403: 89 59 10 mov %ebx,0x10(%ecx)
ioapic->reg = reg;
80102406: 8d 5a 01 lea 0x1(%edx),%ebx
80102409: 83 c2 02 add $0x2,%edx
8010240c: 89 19 mov %ebx,(%ecx)
ioapic->data = data;
8010240e: 8b 0d f4 2f 11 80 mov 0x80112ff4,%ecx
80102414: c7 41 10 00 00 00 00 movl $0x0,0x10(%ecx)
for(i = 0; i <= maxintr; i++){
8010241b: 39 f0 cmp %esi,%eax
8010241d: 75 d1 jne 801023f0 <ioapicinit+0x70>
ioapicwrite(REG_TABLE+2*i+1, 0);
}
}
8010241f: 8d 65 f8 lea -0x8(%ebp),%esp
80102422: 5b pop %ebx
80102423: 5e pop %esi
80102424: 5d pop %ebp
80102425: c3 ret
80102426: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010242d: 8d 76 00 lea 0x0(%esi),%esi
80102430 <ioapicenable>:
void
ioapicenable(int irq, int cpunum)
{
80102430: f3 0f 1e fb endbr32
80102434: 55 push %ebp
ioapic->reg = reg;
80102435: 8b 0d f4 2f 11 80 mov 0x80112ff4,%ecx
{
8010243b: 89 e5 mov %esp,%ebp
8010243d: 8b 45 08 mov 0x8(%ebp),%eax
// 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);
80102440: 8d 50 20 lea 0x20(%eax),%edx
80102443: 8d 44 00 10 lea 0x10(%eax,%eax,1),%eax
ioapic->reg = reg;
80102447: 89 01 mov %eax,(%ecx)
ioapic->data = data;
80102449: 8b 0d f4 2f 11 80 mov 0x80112ff4,%ecx
ioapicwrite(REG_TABLE+2*irq+1, cpunum << 24);
8010244f: 83 c0 01 add $0x1,%eax
ioapic->data = data;
80102452: 89 51 10 mov %edx,0x10(%ecx)
ioapicwrite(REG_TABLE+2*irq+1, cpunum << 24);
80102455: 8b 55 0c mov 0xc(%ebp),%edx
ioapic->reg = reg;
80102458: 89 01 mov %eax,(%ecx)
ioapic->data = data;
8010245a: a1 f4 2f 11 80 mov 0x80112ff4,%eax
ioapicwrite(REG_TABLE+2*irq+1, cpunum << 24);
8010245f: c1 e2 18 shl $0x18,%edx
ioapic->data = data;
80102462: 89 50 10 mov %edx,0x10(%eax)
}
80102465: 5d pop %ebp
80102466: c3 ret
80102467: 66 90 xchg %ax,%ax
80102469: 66 90 xchg %ax,%ax
8010246b: 66 90 xchg %ax,%ax
8010246d: 66 90 xchg %ax,%ax
8010246f: 90 nop
80102470 <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)
{
80102470: f3 0f 1e fb endbr32
80102474: 55 push %ebp
80102475: 89 e5 mov %esp,%ebp
80102477: 53 push %ebx
80102478: 83 ec 04 sub $0x4,%esp
8010247b: 8b 5d 08 mov 0x8(%ebp),%ebx
struct run *r;
if((uint)v % PGSIZE || v < end || V2P(v) >= PHYSTOP)
8010247e: f7 c3 ff 0f 00 00 test $0xfff,%ebx
80102484: 75 7a jne 80102500 <kfree+0x90>
80102486: 81 fb 68 5f 11 80 cmp $0x80115f68,%ebx
8010248c: 72 72 jb 80102500 <kfree+0x90>
8010248e: 8d 83 00 00 00 80 lea -0x80000000(%ebx),%eax
80102494: 3d ff ff ff 0d cmp $0xdffffff,%eax
80102499: 77 65 ja 80102500 <kfree+0x90>
panic("kfree");
// Fill with junk to catch dangling refs.
memset(v, 1, PGSIZE);
8010249b: 83 ec 04 sub $0x4,%esp
8010249e: 68 00 10 00 00 push $0x1000
801024a3: 6a 01 push $0x1
801024a5: 53 push %ebx
801024a6: e8 e5 23 00 00 call 80104890 <memset>
if(kmem.use_lock)
801024ab: 8b 15 34 30 11 80 mov 0x80113034,%edx
801024b1: 83 c4 10 add $0x10,%esp
801024b4: 85 d2 test %edx,%edx
801024b6: 75 20 jne 801024d8 <kfree+0x68>
acquire(&kmem.lock);
r = (struct run*)v;
r->next = kmem.freelist;
801024b8: a1 38 30 11 80 mov 0x80113038,%eax
801024bd: 89 03 mov %eax,(%ebx)
kmem.freelist = r;
if(kmem.use_lock)
801024bf: a1 34 30 11 80 mov 0x80113034,%eax
kmem.freelist = r;
801024c4: 89 1d 38 30 11 80 mov %ebx,0x80113038
if(kmem.use_lock)
801024ca: 85 c0 test %eax,%eax
801024cc: 75 22 jne 801024f0 <kfree+0x80>
release(&kmem.lock);
}
801024ce: 8b 5d fc mov -0x4(%ebp),%ebx
801024d1: c9 leave
801024d2: c3 ret
801024d3: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801024d7: 90 nop
acquire(&kmem.lock);
801024d8: 83 ec 0c sub $0xc,%esp
801024db: 68 00 30 11 80 push $0x80113000
801024e0: e8 9b 22 00 00 call 80104780 <acquire>
801024e5: 83 c4 10 add $0x10,%esp
801024e8: eb ce jmp 801024b8 <kfree+0x48>
801024ea: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
release(&kmem.lock);
801024f0: c7 45 08 00 30 11 80 movl $0x80113000,0x8(%ebp)
}
801024f7: 8b 5d fc mov -0x4(%ebp),%ebx
801024fa: c9 leave
release(&kmem.lock);
801024fb: e9 40 23 00 00 jmp 80104840 <release>
panic("kfree");
80102500: 83 ec 0c sub $0xc,%esp
80102503: 68 e6 77 10 80 push $0x801077e6
80102508: e8 83 de ff ff call 80100390 <panic>
8010250d: 8d 76 00 lea 0x0(%esi),%esi
80102510 <freerange>:
{
80102510: f3 0f 1e fb endbr32
80102514: 55 push %ebp
80102515: 89 e5 mov %esp,%ebp
80102517: 56 push %esi
p = (char*)PGROUNDUP((uint)vstart);
80102518: 8b 45 08 mov 0x8(%ebp),%eax
{
8010251b: 8b 75 0c mov 0xc(%ebp),%esi
8010251e: 53 push %ebx
p = (char*)PGROUNDUP((uint)vstart);
8010251f: 8d 98 ff 0f 00 00 lea 0xfff(%eax),%ebx
80102525: 81 e3 00 f0 ff ff and $0xfffff000,%ebx
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
8010252b: 81 c3 00 10 00 00 add $0x1000,%ebx
80102531: 39 de cmp %ebx,%esi
80102533: 72 1f jb 80102554 <freerange+0x44>
80102535: 8d 76 00 lea 0x0(%esi),%esi
kfree(p);
80102538: 83 ec 0c sub $0xc,%esp
8010253b: 8d 83 00 f0 ff ff lea -0x1000(%ebx),%eax
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
80102541: 81 c3 00 10 00 00 add $0x1000,%ebx
kfree(p);
80102547: 50 push %eax
80102548: e8 23 ff ff ff call 80102470 <kfree>
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
8010254d: 83 c4 10 add $0x10,%esp
80102550: 39 f3 cmp %esi,%ebx
80102552: 76 e4 jbe 80102538 <freerange+0x28>
}
80102554: 8d 65 f8 lea -0x8(%ebp),%esp
80102557: 5b pop %ebx
80102558: 5e pop %esi
80102559: 5d pop %ebp
8010255a: c3 ret
8010255b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
8010255f: 90 nop
80102560 <kinit1>:
{
80102560: f3 0f 1e fb endbr32
80102564: 55 push %ebp
80102565: 89 e5 mov %esp,%ebp
80102567: 56 push %esi
80102568: 53 push %ebx
80102569: 8b 75 0c mov 0xc(%ebp),%esi
initlock(&kmem.lock, "kmem");
8010256c: 83 ec 08 sub $0x8,%esp
8010256f: 68 ec 77 10 80 push $0x801077ec
80102574: 68 00 30 11 80 push $0x80113000
80102579: e8 82 20 00 00 call 80104600 <initlock>
p = (char*)PGROUNDUP((uint)vstart);
8010257e: 8b 45 08 mov 0x8(%ebp),%eax
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
80102581: 83 c4 10 add $0x10,%esp
kmem.use_lock = 0;
80102584: c7 05 34 30 11 80 00 movl $0x0,0x80113034
8010258b: 00 00 00
p = (char*)PGROUNDUP((uint)vstart);
8010258e: 8d 98 ff 0f 00 00 lea 0xfff(%eax),%ebx
80102594: 81 e3 00 f0 ff ff and $0xfffff000,%ebx
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
8010259a: 81 c3 00 10 00 00 add $0x1000,%ebx
801025a0: 39 de cmp %ebx,%esi
801025a2: 72 20 jb 801025c4 <kinit1+0x64>
801025a4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
kfree(p);
801025a8: 83 ec 0c sub $0xc,%esp
801025ab: 8d 83 00 f0 ff ff lea -0x1000(%ebx),%eax
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
801025b1: 81 c3 00 10 00 00 add $0x1000,%ebx
kfree(p);
801025b7: 50 push %eax
801025b8: e8 b3 fe ff ff call 80102470 <kfree>
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
801025bd: 83 c4 10 add $0x10,%esp
801025c0: 39 de cmp %ebx,%esi
801025c2: 73 e4 jae 801025a8 <kinit1+0x48>
}
801025c4: 8d 65 f8 lea -0x8(%ebp),%esp
801025c7: 5b pop %ebx
801025c8: 5e pop %esi
801025c9: 5d pop %ebp
801025ca: c3 ret
801025cb: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801025cf: 90 nop
801025d0 <kinit2>:
{
801025d0: f3 0f 1e fb endbr32
801025d4: 55 push %ebp
801025d5: 89 e5 mov %esp,%ebp
801025d7: 56 push %esi
p = (char*)PGROUNDUP((uint)vstart);
801025d8: 8b 45 08 mov 0x8(%ebp),%eax
{
801025db: 8b 75 0c mov 0xc(%ebp),%esi
801025de: 53 push %ebx
p = (char*)PGROUNDUP((uint)vstart);
801025df: 8d 98 ff 0f 00 00 lea 0xfff(%eax),%ebx
801025e5: 81 e3 00 f0 ff ff and $0xfffff000,%ebx
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
801025eb: 81 c3 00 10 00 00 add $0x1000,%ebx
801025f1: 39 de cmp %ebx,%esi
801025f3: 72 1f jb 80102614 <kinit2+0x44>
801025f5: 8d 76 00 lea 0x0(%esi),%esi
kfree(p);
801025f8: 83 ec 0c sub $0xc,%esp
801025fb: 8d 83 00 f0 ff ff lea -0x1000(%ebx),%eax
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
80102601: 81 c3 00 10 00 00 add $0x1000,%ebx
kfree(p);
80102607: 50 push %eax
80102608: e8 63 fe ff ff call 80102470 <kfree>
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
8010260d: 83 c4 10 add $0x10,%esp
80102610: 39 de cmp %ebx,%esi
80102612: 73 e4 jae 801025f8 <kinit2+0x28>
kmem.use_lock = 1;
80102614: c7 05 34 30 11 80 01 movl $0x1,0x80113034
8010261b: 00 00 00
}
8010261e: 8d 65 f8 lea -0x8(%ebp),%esp
80102621: 5b pop %ebx
80102622: 5e pop %esi
80102623: 5d pop %ebp
80102624: c3 ret
80102625: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010262c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80102630 <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)
{
80102630: f3 0f 1e fb endbr32
struct run *r;
if(kmem.use_lock)
80102634: a1 34 30 11 80 mov 0x80113034,%eax
80102639: 85 c0 test %eax,%eax
8010263b: 75 1b jne 80102658 <kalloc+0x28>
acquire(&kmem.lock);
r = kmem.freelist;
8010263d: a1 38 30 11 80 mov 0x80113038,%eax
if(r)
80102642: 85 c0 test %eax,%eax
80102644: 74 0a je 80102650 <kalloc+0x20>
kmem.freelist = r->next;
80102646: 8b 10 mov (%eax),%edx
80102648: 89 15 38 30 11 80 mov %edx,0x80113038
if(kmem.use_lock)
8010264e: c3 ret
8010264f: 90 nop
release(&kmem.lock);
return (char*)r;
}
80102650: c3 ret
80102651: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
{
80102658: 55 push %ebp
80102659: 89 e5 mov %esp,%ebp
8010265b: 83 ec 24 sub $0x24,%esp
acquire(&kmem.lock);
8010265e: 68 00 30 11 80 push $0x80113000
80102663: e8 18 21 00 00 call 80104780 <acquire>
r = kmem.freelist;
80102668: a1 38 30 11 80 mov 0x80113038,%eax
if(r)
8010266d: 8b 15 34 30 11 80 mov 0x80113034,%edx
80102673: 83 c4 10 add $0x10,%esp
80102676: 85 c0 test %eax,%eax
80102678: 74 08 je 80102682 <kalloc+0x52>
kmem.freelist = r->next;
8010267a: 8b 08 mov (%eax),%ecx
8010267c: 89 0d 38 30 11 80 mov %ecx,0x80113038
if(kmem.use_lock)
80102682: 85 d2 test %edx,%edx
80102684: 74 16 je 8010269c <kalloc+0x6c>
release(&kmem.lock);
80102686: 83 ec 0c sub $0xc,%esp
80102689: 89 45 f4 mov %eax,-0xc(%ebp)
8010268c: 68 00 30 11 80 push $0x80113000
80102691: e8 aa 21 00 00 call 80104840 <release>
return (char*)r;
80102696: 8b 45 f4 mov -0xc(%ebp),%eax
release(&kmem.lock);
80102699: 83 c4 10 add $0x10,%esp
}
8010269c: c9 leave
8010269d: c3 ret
8010269e: 66 90 xchg %ax,%ax
801026a0 <kbdgetc>:
#include "defs.h"
#include "kbd.h"
int
kbdgetc(void)
{
801026a0: f3 0f 1e fb endbr32
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
801026a4: ba 64 00 00 00 mov $0x64,%edx
801026a9: ec in (%dx),%al
normalmap, shiftmap, ctlmap, ctlmap
};
uint st, data, c;
st = inb(KBSTATP);
if((st & KBS_DIB) == 0)
801026aa: a8 01 test $0x1,%al
801026ac: 0f 84 be 00 00 00 je 80102770 <kbdgetc+0xd0>
{
801026b2: 55 push %ebp
801026b3: ba 60 00 00 00 mov $0x60,%edx
801026b8: 89 e5 mov %esp,%ebp
801026ba: 53 push %ebx
801026bb: ec in (%dx),%al
return data;
801026bc: 8b 1d b4 a5 10 80 mov 0x8010a5b4,%ebx
return -1;
data = inb(KBDATAP);
801026c2: 0f b6 d0 movzbl %al,%edx
if(data == 0xE0){
801026c5: 3c e0 cmp $0xe0,%al
801026c7: 74 57 je 80102720 <kbdgetc+0x80>
shift |= E0ESC;
return 0;
} else if(data & 0x80){
801026c9: 89 d9 mov %ebx,%ecx
801026cb: 83 e1 40 and $0x40,%ecx
801026ce: 84 c0 test %al,%al
801026d0: 78 5e js 80102730 <kbdgetc+0x90>
// Key released
data = (shift & E0ESC ? data : data & 0x7F);
shift &= ~(shiftcode[data] | E0ESC);
return 0;
} else if(shift & E0ESC){
801026d2: 85 c9 test %ecx,%ecx
801026d4: 74 09 je 801026df <kbdgetc+0x3f>
// Last character was an E0 escape; or with 0x80
data |= 0x80;
801026d6: 83 c8 80 or $0xffffff80,%eax
shift &= ~E0ESC;
801026d9: 83 e3 bf and $0xffffffbf,%ebx
data |= 0x80;
801026dc: 0f b6 d0 movzbl %al,%edx
}
shift |= shiftcode[data];
801026df: 0f b6 8a 20 79 10 80 movzbl -0x7fef86e0(%edx),%ecx
shift ^= togglecode[data];
801026e6: 0f b6 82 20 78 10 80 movzbl -0x7fef87e0(%edx),%eax
shift |= shiftcode[data];
801026ed: 09 d9 or %ebx,%ecx
shift ^= togglecode[data];
801026ef: 31 c1 xor %eax,%ecx
c = charcode[shift & (CTL | SHIFT)][data];
801026f1: 89 c8 mov %ecx,%eax
shift ^= togglecode[data];
801026f3: 89 0d b4 a5 10 80 mov %ecx,0x8010a5b4
c = charcode[shift & (CTL | SHIFT)][data];
801026f9: 83 e0 03 and $0x3,%eax
if(shift & CAPSLOCK){
801026fc: 83 e1 08 and $0x8,%ecx
c = charcode[shift & (CTL | SHIFT)][data];
801026ff: 8b 04 85 00 78 10 80 mov -0x7fef8800(,%eax,4),%eax
80102706: 0f b6 04 10 movzbl (%eax,%edx,1),%eax
if(shift & CAPSLOCK){
8010270a: 74 0b je 80102717 <kbdgetc+0x77>
if('a' <= c && c <= 'z')
8010270c: 8d 50 9f lea -0x61(%eax),%edx
8010270f: 83 fa 19 cmp $0x19,%edx
80102712: 77 44 ja 80102758 <kbdgetc+0xb8>
c += 'A' - 'a';
80102714: 83 e8 20 sub $0x20,%eax
else if('A' <= c && c <= 'Z')
c += 'a' - 'A';
}
return c;
}
80102717: 5b pop %ebx
80102718: 5d pop %ebp
80102719: c3 ret
8010271a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
shift |= E0ESC;
80102720: 83 cb 40 or $0x40,%ebx
return 0;
80102723: 31 c0 xor %eax,%eax
shift |= E0ESC;
80102725: 89 1d b4 a5 10 80 mov %ebx,0x8010a5b4
}
8010272b: 5b pop %ebx
8010272c: 5d pop %ebp
8010272d: c3 ret
8010272e: 66 90 xchg %ax,%ax
data = (shift & E0ESC ? data : data & 0x7F);
80102730: 83 e0 7f and $0x7f,%eax
80102733: 85 c9 test %ecx,%ecx
80102735: 0f 44 d0 cmove %eax,%edx
return 0;
80102738: 31 c0 xor %eax,%eax
shift &= ~(shiftcode[data] | E0ESC);
8010273a: 0f b6 8a 20 79 10 80 movzbl -0x7fef86e0(%edx),%ecx
80102741: 83 c9 40 or $0x40,%ecx
80102744: 0f b6 c9 movzbl %cl,%ecx
80102747: f7 d1 not %ecx
80102749: 21 d9 and %ebx,%ecx
}
8010274b: 5b pop %ebx
8010274c: 5d pop %ebp
shift &= ~(shiftcode[data] | E0ESC);
8010274d: 89 0d b4 a5 10 80 mov %ecx,0x8010a5b4
}
80102753: c3 ret
80102754: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
else if('A' <= c && c <= 'Z')
80102758: 8d 48 bf lea -0x41(%eax),%ecx
c += 'a' - 'A';
8010275b: 8d 50 20 lea 0x20(%eax),%edx
}
8010275e: 5b pop %ebx
8010275f: 5d pop %ebp
c += 'a' - 'A';
80102760: 83 f9 1a cmp $0x1a,%ecx
80102763: 0f 42 c2 cmovb %edx,%eax
}
80102766: c3 ret
80102767: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010276e: 66 90 xchg %ax,%ax
return -1;
80102770: b8 ff ff ff ff mov $0xffffffff,%eax
}
80102775: c3 ret
80102776: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010277d: 8d 76 00 lea 0x0(%esi),%esi
80102780 <kbdintr>:
void
kbdintr(void)
{
80102780: f3 0f 1e fb endbr32
80102784: 55 push %ebp
80102785: 89 e5 mov %esp,%ebp
80102787: 83 ec 14 sub $0x14,%esp
consoleintr(kbdgetc);
8010278a: 68 a0 26 10 80 push $0x801026a0
8010278f: e8 cc e0 ff ff call 80100860 <consoleintr>
}
80102794: 83 c4 10 add $0x10,%esp
80102797: c9 leave
80102798: c3 ret
80102799: 66 90 xchg %ax,%ax
8010279b: 66 90 xchg %ax,%ax
8010279d: 66 90 xchg %ax,%ax
8010279f: 90 nop
801027a0 <lapicinit>:
lapic[ID]; // wait for write to finish, by reading
}
void
lapicinit(void)
{
801027a0: f3 0f 1e fb endbr32
if(!lapic)
801027a4: a1 3c 30 11 80 mov 0x8011303c,%eax
801027a9: 85 c0 test %eax,%eax
801027ab: 0f 84 c7 00 00 00 je 80102878 <lapicinit+0xd8>
lapic[index] = value;
801027b1: c7 80 f0 00 00 00 3f movl $0x13f,0xf0(%eax)
801027b8: 01 00 00
lapic[ID]; // wait for write to finish, by reading
801027bb: 8b 50 20 mov 0x20(%eax),%edx
lapic[index] = value;
801027be: c7 80 e0 03 00 00 0b movl $0xb,0x3e0(%eax)
801027c5: 00 00 00
lapic[ID]; // wait for write to finish, by reading
801027c8: 8b 50 20 mov 0x20(%eax),%edx
lapic[index] = value;
801027cb: c7 80 20 03 00 00 20 movl $0x20020,0x320(%eax)
801027d2: 00 02 00
lapic[ID]; // wait for write to finish, by reading
801027d5: 8b 50 20 mov 0x20(%eax),%edx
lapic[index] = value;
801027d8: c7 80 80 03 00 00 80 movl $0x989680,0x380(%eax)
801027df: 96 98 00
lapic[ID]; // wait for write to finish, by reading
801027e2: 8b 50 20 mov 0x20(%eax),%edx
lapic[index] = value;
801027e5: c7 80 50 03 00 00 00 movl $0x10000,0x350(%eax)
801027ec: 00 01 00
lapic[ID]; // wait for write to finish, by reading
801027ef: 8b 50 20 mov 0x20(%eax),%edx
lapic[index] = value;
801027f2: c7 80 60 03 00 00 00 movl $0x10000,0x360(%eax)
801027f9: 00 01 00
lapic[ID]; // wait for write to finish, by reading
801027fc: 8b 50 20 mov 0x20(%eax),%edx
lapicw(LINT0, MASKED);
lapicw(LINT1, MASKED);
// Disable performance counter overflow interrupts
// on machines that provide that interrupt entry.
if(((lapic[VER]>>16) & 0xFF) >= 4)
801027ff: 8b 50 30 mov 0x30(%eax),%edx
80102802: c1 ea 10 shr $0x10,%edx
80102805: 81 e2 fc 00 00 00 and $0xfc,%edx
8010280b: 75 73 jne 80102880 <lapicinit+0xe0>
lapic[index] = value;
8010280d: c7 80 70 03 00 00 33 movl $0x33,0x370(%eax)
80102814: 00 00 00
lapic[ID]; // wait for write to finish, by reading
80102817: 8b 50 20 mov 0x20(%eax),%edx
lapic[index] = value;
8010281a: c7 80 80 02 00 00 00 movl $0x0,0x280(%eax)
80102821: 00 00 00
lapic[ID]; // wait for write to finish, by reading
80102824: 8b 50 20 mov 0x20(%eax),%edx
lapic[index] = value;
80102827: c7 80 80 02 00 00 00 movl $0x0,0x280(%eax)
8010282e: 00 00 00
lapic[ID]; // wait for write to finish, by reading
80102831: 8b 50 20 mov 0x20(%eax),%edx
lapic[index] = value;
80102834: c7 80 b0 00 00 00 00 movl $0x0,0xb0(%eax)
8010283b: 00 00 00
lapic[ID]; // wait for write to finish, by reading
8010283e: 8b 50 20 mov 0x20(%eax),%edx
lapic[index] = value;
80102841: c7 80 10 03 00 00 00 movl $0x0,0x310(%eax)
80102848: 00 00 00
lapic[ID]; // wait for write to finish, by reading
8010284b: 8b 50 20 mov 0x20(%eax),%edx
lapic[index] = value;
8010284e: c7 80 00 03 00 00 00 movl $0x88500,0x300(%eax)
80102855: 85 08 00
lapic[ID]; // wait for write to finish, by reading
80102858: 8b 50 20 mov 0x20(%eax),%edx
8010285b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
8010285f: 90 nop
lapicw(EOI, 0);
// Send an Init Level De-Assert to synchronise arbitration ID's.
lapicw(ICRHI, 0);
lapicw(ICRLO, BCAST | INIT | LEVEL);
while(lapic[ICRLO] & DELIVS)
80102860: 8b 90 00 03 00 00 mov 0x300(%eax),%edx
80102866: 80 e6 10 and $0x10,%dh
80102869: 75 f5 jne 80102860 <lapicinit+0xc0>
lapic[index] = value;
8010286b: c7 80 80 00 00 00 00 movl $0x0,0x80(%eax)
80102872: 00 00 00
lapic[ID]; // wait for write to finish, by reading
80102875: 8b 40 20 mov 0x20(%eax),%eax
;
// Enable interrupts on the APIC (but not on the processor).
lapicw(TPR, 0);
}
80102878: c3 ret
80102879: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
lapic[index] = value;
80102880: c7 80 40 03 00 00 00 movl $0x10000,0x340(%eax)
80102887: 00 01 00
lapic[ID]; // wait for write to finish, by reading
8010288a: 8b 50 20 mov 0x20(%eax),%edx
}
8010288d: e9 7b ff ff ff jmp 8010280d <lapicinit+0x6d>
80102892: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80102899: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801028a0 <lapicid>:
int
lapicid(void)
{
801028a0: f3 0f 1e fb endbr32
if (!lapic)
801028a4: a1 3c 30 11 80 mov 0x8011303c,%eax
801028a9: 85 c0 test %eax,%eax
801028ab: 74 0b je 801028b8 <lapicid+0x18>
return 0;
return lapic[ID] >> 24;
801028ad: 8b 40 20 mov 0x20(%eax),%eax
801028b0: c1 e8 18 shr $0x18,%eax
801028b3: c3 ret
801028b4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
return 0;
801028b8: 31 c0 xor %eax,%eax
}
801028ba: c3 ret
801028bb: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801028bf: 90 nop
801028c0 <lapiceoi>:
// Acknowledge interrupt.
void
lapiceoi(void)
{
801028c0: f3 0f 1e fb endbr32
if(lapic)
801028c4: a1 3c 30 11 80 mov 0x8011303c,%eax
801028c9: 85 c0 test %eax,%eax
801028cb: 74 0d je 801028da <lapiceoi+0x1a>
lapic[index] = value;
801028cd: c7 80 b0 00 00 00 00 movl $0x0,0xb0(%eax)
801028d4: 00 00 00
lapic[ID]; // wait for write to finish, by reading
801028d7: 8b 40 20 mov 0x20(%eax),%eax
lapicw(EOI, 0);
}
801028da: c3 ret
801028db: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801028df: 90 nop
801028e0 <microdelay>:
// Spin for a given number of microseconds.
// On real hardware would want to tune this dynamically.
void
microdelay(int us)
{
801028e0: f3 0f 1e fb endbr32
}
801028e4: c3 ret
801028e5: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801028ec: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801028f0 <lapicstartap>:
// Start additional processor running entry code at addr.
// See Appendix B of MultiProcessor Specification.
void
lapicstartap(uchar apicid, uint addr)
{
801028f0: f3 0f 1e fb endbr32
801028f4: 55 push %ebp
asm volatile("out %0,%1" : : "a" (data), "d" (port));
801028f5: b8 0f 00 00 00 mov $0xf,%eax
801028fa: ba 70 00 00 00 mov $0x70,%edx
801028ff: 89 e5 mov %esp,%ebp
80102901: 53 push %ebx
80102902: 8b 4d 0c mov 0xc(%ebp),%ecx
80102905: 8b 5d 08 mov 0x8(%ebp),%ebx
80102908: ee out %al,(%dx)
80102909: b8 0a 00 00 00 mov $0xa,%eax
8010290e: ba 71 00 00 00 mov $0x71,%edx
80102913: ee out %al,(%dx)
// and the warm reset vector (DWORD based at 40:67) to point at
// the AP startup code prior to the [universal startup algorithm]."
outb(CMOS_PORT, 0xF); // offset 0xF is shutdown code
outb(CMOS_PORT+1, 0x0A);
wrv = (ushort*)P2V((0x40<<4 | 0x67)); // Warm reset vector
wrv[0] = 0;
80102914: 31 c0 xor %eax,%eax
wrv[1] = addr >> 4;
// "Universal startup algorithm."
// Send INIT (level-triggered) interrupt to reset other CPU.
lapicw(ICRHI, apicid<<24);
80102916: c1 e3 18 shl $0x18,%ebx
wrv[0] = 0;
80102919: 66 a3 67 04 00 80 mov %ax,0x80000467
wrv[1] = addr >> 4;
8010291f: 89 c8 mov %ecx,%eax
// 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++){
lapicw(ICRHI, apicid<<24);
lapicw(ICRLO, STARTUP | (addr>>12));
80102921: c1 e9 0c shr $0xc,%ecx
lapicw(ICRHI, apicid<<24);
80102924: 89 da mov %ebx,%edx
wrv[1] = addr >> 4;
80102926: c1 e8 04 shr $0x4,%eax
lapicw(ICRLO, STARTUP | (addr>>12));
80102929: 80 cd 06 or $0x6,%ch
wrv[1] = addr >> 4;
8010292c: 66 a3 69 04 00 80 mov %ax,0x80000469
lapic[index] = value;
80102932: a1 3c 30 11 80 mov 0x8011303c,%eax
80102937: 89 98 10 03 00 00 mov %ebx,0x310(%eax)
lapic[ID]; // wait for write to finish, by reading
8010293d: 8b 58 20 mov 0x20(%eax),%ebx
lapic[index] = value;
80102940: c7 80 00 03 00 00 00 movl $0xc500,0x300(%eax)
80102947: c5 00 00
lapic[ID]; // wait for write to finish, by reading
8010294a: 8b 58 20 mov 0x20(%eax),%ebx
lapic[index] = value;
8010294d: c7 80 00 03 00 00 00 movl $0x8500,0x300(%eax)
80102954: 85 00 00
lapic[ID]; // wait for write to finish, by reading
80102957: 8b 58 20 mov 0x20(%eax),%ebx
lapic[index] = value;
8010295a: 89 90 10 03 00 00 mov %edx,0x310(%eax)
lapic[ID]; // wait for write to finish, by reading
80102960: 8b 58 20 mov 0x20(%eax),%ebx
lapic[index] = value;
80102963: 89 88 00 03 00 00 mov %ecx,0x300(%eax)
lapic[ID]; // wait for write to finish, by reading
80102969: 8b 58 20 mov 0x20(%eax),%ebx
lapic[index] = value;
8010296c: 89 90 10 03 00 00 mov %edx,0x310(%eax)
lapic[ID]; // wait for write to finish, by reading
80102972: 8b 50 20 mov 0x20(%eax),%edx
lapic[index] = value;
80102975: 89 88 00 03 00 00 mov %ecx,0x300(%eax)
microdelay(200);
}
}
8010297b: 5b pop %ebx
lapic[ID]; // wait for write to finish, by reading
8010297c: 8b 40 20 mov 0x20(%eax),%eax
}
8010297f: 5d pop %ebp
80102980: c3 ret
80102981: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80102988: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010298f: 90 nop
80102990 <cmostime>:
}
// qemu seems to use 24-hour GWT and the values are BCD encoded
void
cmostime(struct rtcdate *r)
{
80102990: f3 0f 1e fb endbr32
80102994: 55 push %ebp
80102995: b8 0b 00 00 00 mov $0xb,%eax
8010299a: ba 70 00 00 00 mov $0x70,%edx
8010299f: 89 e5 mov %esp,%ebp
801029a1: 57 push %edi
801029a2: 56 push %esi
801029a3: 53 push %ebx
801029a4: 83 ec 4c sub $0x4c,%esp
801029a7: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
801029a8: ba 71 00 00 00 mov $0x71,%edx
801029ad: ec in (%dx),%al
struct rtcdate t1, t2;
int sb, bcd;
sb = cmos_read(CMOS_STATB);
bcd = (sb & (1 << 2)) == 0;
801029ae: 83 e0 04 and $0x4,%eax
asm volatile("out %0,%1" : : "a" (data), "d" (port));
801029b1: bb 70 00 00 00 mov $0x70,%ebx
801029b6: 88 45 b3 mov %al,-0x4d(%ebp)
801029b9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801029c0: 31 c0 xor %eax,%eax
801029c2: 89 da mov %ebx,%edx
801029c4: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
801029c5: b9 71 00 00 00 mov $0x71,%ecx
801029ca: 89 ca mov %ecx,%edx
801029cc: ec in (%dx),%al
801029cd: 88 45 b7 mov %al,-0x49(%ebp)
asm volatile("out %0,%1" : : "a" (data), "d" (port));
801029d0: 89 da mov %ebx,%edx
801029d2: b8 02 00 00 00 mov $0x2,%eax
801029d7: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
801029d8: 89 ca mov %ecx,%edx
801029da: ec in (%dx),%al
801029db: 88 45 b6 mov %al,-0x4a(%ebp)
asm volatile("out %0,%1" : : "a" (data), "d" (port));
801029de: 89 da mov %ebx,%edx
801029e0: b8 04 00 00 00 mov $0x4,%eax
801029e5: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
801029e6: 89 ca mov %ecx,%edx
801029e8: ec in (%dx),%al
801029e9: 88 45 b5 mov %al,-0x4b(%ebp)
asm volatile("out %0,%1" : : "a" (data), "d" (port));
801029ec: 89 da mov %ebx,%edx
801029ee: b8 07 00 00 00 mov $0x7,%eax
801029f3: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
801029f4: 89 ca mov %ecx,%edx
801029f6: ec in (%dx),%al
801029f7: 88 45 b4 mov %al,-0x4c(%ebp)
asm volatile("out %0,%1" : : "a" (data), "d" (port));
801029fa: 89 da mov %ebx,%edx
801029fc: b8 08 00 00 00 mov $0x8,%eax
80102a01: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102a02: 89 ca mov %ecx,%edx
80102a04: ec in (%dx),%al
80102a05: 89 c7 mov %eax,%edi
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80102a07: 89 da mov %ebx,%edx
80102a09: b8 09 00 00 00 mov $0x9,%eax
80102a0e: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102a0f: 89 ca mov %ecx,%edx
80102a11: ec in (%dx),%al
80102a12: 89 c6 mov %eax,%esi
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80102a14: 89 da mov %ebx,%edx
80102a16: b8 0a 00 00 00 mov $0xa,%eax
80102a1b: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102a1c: 89 ca mov %ecx,%edx
80102a1e: ec in (%dx),%al
// make sure CMOS doesn't modify time while we read it
for(;;) {
fill_rtcdate(&t1);
if(cmos_read(CMOS_STATA) & CMOS_UIP)
80102a1f: 84 c0 test %al,%al
80102a21: 78 9d js 801029c0 <cmostime+0x30>
return inb(CMOS_RETURN);
80102a23: 0f b6 45 b7 movzbl -0x49(%ebp),%eax
80102a27: 89 fa mov %edi,%edx
80102a29: 0f b6 fa movzbl %dl,%edi
80102a2c: 89 f2 mov %esi,%edx
80102a2e: 89 45 b8 mov %eax,-0x48(%ebp)
80102a31: 0f b6 45 b6 movzbl -0x4a(%ebp),%eax
80102a35: 0f b6 f2 movzbl %dl,%esi
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80102a38: 89 da mov %ebx,%edx
80102a3a: 89 7d c8 mov %edi,-0x38(%ebp)
80102a3d: 89 45 bc mov %eax,-0x44(%ebp)
80102a40: 0f b6 45 b5 movzbl -0x4b(%ebp),%eax
80102a44: 89 75 cc mov %esi,-0x34(%ebp)
80102a47: 89 45 c0 mov %eax,-0x40(%ebp)
80102a4a: 0f b6 45 b4 movzbl -0x4c(%ebp),%eax
80102a4e: 89 45 c4 mov %eax,-0x3c(%ebp)
80102a51: 31 c0 xor %eax,%eax
80102a53: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102a54: 89 ca mov %ecx,%edx
80102a56: ec in (%dx),%al
80102a57: 0f b6 c0 movzbl %al,%eax
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80102a5a: 89 da mov %ebx,%edx
80102a5c: 89 45 d0 mov %eax,-0x30(%ebp)
80102a5f: b8 02 00 00 00 mov $0x2,%eax
80102a64: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102a65: 89 ca mov %ecx,%edx
80102a67: ec in (%dx),%al
80102a68: 0f b6 c0 movzbl %al,%eax
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80102a6b: 89 da mov %ebx,%edx
80102a6d: 89 45 d4 mov %eax,-0x2c(%ebp)
80102a70: b8 04 00 00 00 mov $0x4,%eax
80102a75: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102a76: 89 ca mov %ecx,%edx
80102a78: ec in (%dx),%al
80102a79: 0f b6 c0 movzbl %al,%eax
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80102a7c: 89 da mov %ebx,%edx
80102a7e: 89 45 d8 mov %eax,-0x28(%ebp)
80102a81: b8 07 00 00 00 mov $0x7,%eax
80102a86: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102a87: 89 ca mov %ecx,%edx
80102a89: ec in (%dx),%al
80102a8a: 0f b6 c0 movzbl %al,%eax
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80102a8d: 89 da mov %ebx,%edx
80102a8f: 89 45 dc mov %eax,-0x24(%ebp)
80102a92: b8 08 00 00 00 mov $0x8,%eax
80102a97: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102a98: 89 ca mov %ecx,%edx
80102a9a: ec in (%dx),%al
80102a9b: 0f b6 c0 movzbl %al,%eax
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80102a9e: 89 da mov %ebx,%edx
80102aa0: 89 45 e0 mov %eax,-0x20(%ebp)
80102aa3: b8 09 00 00 00 mov $0x9,%eax
80102aa8: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102aa9: 89 ca mov %ecx,%edx
80102aab: ec in (%dx),%al
80102aac: 0f b6 c0 movzbl %al,%eax
continue;
fill_rtcdate(&t2);
if(memcmp(&t1, &t2, sizeof(t1)) == 0)
80102aaf: 83 ec 04 sub $0x4,%esp
return inb(CMOS_RETURN);
80102ab2: 89 45 e4 mov %eax,-0x1c(%ebp)
if(memcmp(&t1, &t2, sizeof(t1)) == 0)
80102ab5: 8d 45 d0 lea -0x30(%ebp),%eax
80102ab8: 6a 18 push $0x18
80102aba: 50 push %eax
80102abb: 8d 45 b8 lea -0x48(%ebp),%eax
80102abe: 50 push %eax
80102abf: e8 1c 1e 00 00 call 801048e0 <memcmp>
80102ac4: 83 c4 10 add $0x10,%esp
80102ac7: 85 c0 test %eax,%eax
80102ac9: 0f 85 f1 fe ff ff jne 801029c0 <cmostime+0x30>
break;
}
// convert
if(bcd) {
80102acf: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp)
80102ad3: 75 78 jne 80102b4d <cmostime+0x1bd>
#define CONV(x) (t1.x = ((t1.x >> 4) * 10) + (t1.x & 0xf))
CONV(second);
80102ad5: 8b 45 b8 mov -0x48(%ebp),%eax
80102ad8: 89 c2 mov %eax,%edx
80102ada: 83 e0 0f and $0xf,%eax
80102add: c1 ea 04 shr $0x4,%edx
80102ae0: 8d 14 92 lea (%edx,%edx,4),%edx
80102ae3: 8d 04 50 lea (%eax,%edx,2),%eax
80102ae6: 89 45 b8 mov %eax,-0x48(%ebp)
CONV(minute);
80102ae9: 8b 45 bc mov -0x44(%ebp),%eax
80102aec: 89 c2 mov %eax,%edx
80102aee: 83 e0 0f and $0xf,%eax
80102af1: c1 ea 04 shr $0x4,%edx
80102af4: 8d 14 92 lea (%edx,%edx,4),%edx
80102af7: 8d 04 50 lea (%eax,%edx,2),%eax
80102afa: 89 45 bc mov %eax,-0x44(%ebp)
CONV(hour );
80102afd: 8b 45 c0 mov -0x40(%ebp),%eax
80102b00: 89 c2 mov %eax,%edx
80102b02: 83 e0 0f and $0xf,%eax
80102b05: c1 ea 04 shr $0x4,%edx
80102b08: 8d 14 92 lea (%edx,%edx,4),%edx
80102b0b: 8d 04 50 lea (%eax,%edx,2),%eax
80102b0e: 89 45 c0 mov %eax,-0x40(%ebp)
CONV(day );
80102b11: 8b 45 c4 mov -0x3c(%ebp),%eax
80102b14: 89 c2 mov %eax,%edx
80102b16: 83 e0 0f and $0xf,%eax
80102b19: c1 ea 04 shr $0x4,%edx
80102b1c: 8d 14 92 lea (%edx,%edx,4),%edx
80102b1f: 8d 04 50 lea (%eax,%edx,2),%eax
80102b22: 89 45 c4 mov %eax,-0x3c(%ebp)
CONV(month );
80102b25: 8b 45 c8 mov -0x38(%ebp),%eax
80102b28: 89 c2 mov %eax,%edx
80102b2a: 83 e0 0f and $0xf,%eax
80102b2d: c1 ea 04 shr $0x4,%edx
80102b30: 8d 14 92 lea (%edx,%edx,4),%edx
80102b33: 8d 04 50 lea (%eax,%edx,2),%eax
80102b36: 89 45 c8 mov %eax,-0x38(%ebp)
CONV(year );
80102b39: 8b 45 cc mov -0x34(%ebp),%eax
80102b3c: 89 c2 mov %eax,%edx
80102b3e: 83 e0 0f and $0xf,%eax
80102b41: c1 ea 04 shr $0x4,%edx
80102b44: 8d 14 92 lea (%edx,%edx,4),%edx
80102b47: 8d 04 50 lea (%eax,%edx,2),%eax
80102b4a: 89 45 cc mov %eax,-0x34(%ebp)
#undef CONV
}
*r = t1;
80102b4d: 8b 75 08 mov 0x8(%ebp),%esi
80102b50: 8b 45 b8 mov -0x48(%ebp),%eax
80102b53: 89 06 mov %eax,(%esi)
80102b55: 8b 45 bc mov -0x44(%ebp),%eax
80102b58: 89 46 04 mov %eax,0x4(%esi)
80102b5b: 8b 45 c0 mov -0x40(%ebp),%eax
80102b5e: 89 46 08 mov %eax,0x8(%esi)
80102b61: 8b 45 c4 mov -0x3c(%ebp),%eax
80102b64: 89 46 0c mov %eax,0xc(%esi)
80102b67: 8b 45 c8 mov -0x38(%ebp),%eax
80102b6a: 89 46 10 mov %eax,0x10(%esi)
80102b6d: 8b 45 cc mov -0x34(%ebp),%eax
80102b70: 89 46 14 mov %eax,0x14(%esi)
r->year += 2000;
80102b73: 81 46 14 d0 07 00 00 addl $0x7d0,0x14(%esi)
}
80102b7a: 8d 65 f4 lea -0xc(%ebp),%esp
80102b7d: 5b pop %ebx
80102b7e: 5e pop %esi
80102b7f: 5f pop %edi
80102b80: 5d pop %ebp
80102b81: c3 ret
80102b82: 66 90 xchg %ax,%ax
80102b84: 66 90 xchg %ax,%ax
80102b86: 66 90 xchg %ax,%ax
80102b88: 66 90 xchg %ax,%ax
80102b8a: 66 90 xchg %ax,%ax
80102b8c: 66 90 xchg %ax,%ax
80102b8e: 66 90 xchg %ax,%ax
80102b90 <install_trans>:
static void
install_trans(void)
{
int tail;
for (tail = 0; tail < log.lh.n; tail++) {
80102b90: 8b 0d 88 30 11 80 mov 0x80113088,%ecx
80102b96: 85 c9 test %ecx,%ecx
80102b98: 0f 8e 8a 00 00 00 jle 80102c28 <install_trans+0x98>
{
80102b9e: 55 push %ebp
80102b9f: 89 e5 mov %esp,%ebp
80102ba1: 57 push %edi
for (tail = 0; tail < log.lh.n; tail++) {
80102ba2: 31 ff xor %edi,%edi
{
80102ba4: 56 push %esi
80102ba5: 53 push %ebx
80102ba6: 83 ec 0c sub $0xc,%esp
80102ba9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
struct buf *lbuf = bread(log.dev, log.start+tail+1); // read log block
80102bb0: a1 74 30 11 80 mov 0x80113074,%eax
80102bb5: 83 ec 08 sub $0x8,%esp
80102bb8: 01 f8 add %edi,%eax
80102bba: 83 c0 01 add $0x1,%eax
80102bbd: 50 push %eax
80102bbe: ff 35 84 30 11 80 pushl 0x80113084
80102bc4: e8 07 d5 ff ff call 801000d0 <bread>
80102bc9: 89 c6 mov %eax,%esi
struct buf *dbuf = bread(log.dev, log.lh.block[tail]); // read dst
80102bcb: 58 pop %eax
80102bcc: 5a pop %edx
80102bcd: ff 34 bd 8c 30 11 80 pushl -0x7feecf74(,%edi,4)
80102bd4: ff 35 84 30 11 80 pushl 0x80113084
for (tail = 0; tail < log.lh.n; tail++) {
80102bda: 83 c7 01 add $0x1,%edi
struct buf *dbuf = bread(log.dev, log.lh.block[tail]); // read dst
80102bdd: e8 ee d4 ff ff call 801000d0 <bread>
memmove(dbuf->data, lbuf->data, BSIZE); // copy block to dst
80102be2: 83 c4 0c add $0xc,%esp
struct buf *dbuf = bread(log.dev, log.lh.block[tail]); // read dst
80102be5: 89 c3 mov %eax,%ebx
memmove(dbuf->data, lbuf->data, BSIZE); // copy block to dst
80102be7: 8d 46 5c lea 0x5c(%esi),%eax
80102bea: 68 00 02 00 00 push $0x200
80102bef: 50 push %eax
80102bf0: 8d 43 5c lea 0x5c(%ebx),%eax
80102bf3: 50 push %eax
80102bf4: e8 37 1d 00 00 call 80104930 <memmove>
bwrite(dbuf); // write dst to disk
80102bf9: 89 1c 24 mov %ebx,(%esp)
80102bfc: e8 af d5 ff ff call 801001b0 <bwrite>
brelse(lbuf);
80102c01: 89 34 24 mov %esi,(%esp)
80102c04: e8 e7 d5 ff ff call 801001f0 <brelse>
brelse(dbuf);
80102c09: 89 1c 24 mov %ebx,(%esp)
80102c0c: e8 df d5 ff ff call 801001f0 <brelse>
for (tail = 0; tail < log.lh.n; tail++) {
80102c11: 83 c4 10 add $0x10,%esp
80102c14: 39 3d 88 30 11 80 cmp %edi,0x80113088
80102c1a: 7f 94 jg 80102bb0 <install_trans+0x20>
}
}
80102c1c: 8d 65 f4 lea -0xc(%ebp),%esp
80102c1f: 5b pop %ebx
80102c20: 5e pop %esi
80102c21: 5f pop %edi
80102c22: 5d pop %ebp
80102c23: c3 ret
80102c24: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80102c28: c3 ret
80102c29: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80102c30 <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)
{
80102c30: 55 push %ebp
80102c31: 89 e5 mov %esp,%ebp
80102c33: 53 push %ebx
80102c34: 83 ec 0c sub $0xc,%esp
struct buf *buf = bread(log.dev, log.start);
80102c37: ff 35 74 30 11 80 pushl 0x80113074
80102c3d: ff 35 84 30 11 80 pushl 0x80113084
80102c43: e8 88 d4 ff ff call 801000d0 <bread>
struct logheader *hb = (struct logheader *) (buf->data);
int i;
hb->n = log.lh.n;
for (i = 0; i < log.lh.n; i++) {
80102c48: 83 c4 10 add $0x10,%esp
struct buf *buf = bread(log.dev, log.start);
80102c4b: 89 c3 mov %eax,%ebx
hb->n = log.lh.n;
80102c4d: a1 88 30 11 80 mov 0x80113088,%eax
80102c52: 89 43 5c mov %eax,0x5c(%ebx)
for (i = 0; i < log.lh.n; i++) {
80102c55: 85 c0 test %eax,%eax
80102c57: 7e 19 jle 80102c72 <write_head+0x42>
80102c59: 31 d2 xor %edx,%edx
80102c5b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80102c5f: 90 nop
hb->block[i] = log.lh.block[i];
80102c60: 8b 0c 95 8c 30 11 80 mov -0x7feecf74(,%edx,4),%ecx
80102c67: 89 4c 93 60 mov %ecx,0x60(%ebx,%edx,4)
for (i = 0; i < log.lh.n; i++) {
80102c6b: 83 c2 01 add $0x1,%edx
80102c6e: 39 d0 cmp %edx,%eax
80102c70: 75 ee jne 80102c60 <write_head+0x30>
}
bwrite(buf);
80102c72: 83 ec 0c sub $0xc,%esp
80102c75: 53 push %ebx
80102c76: e8 35 d5 ff ff call 801001b0 <bwrite>
brelse(buf);
80102c7b: 89 1c 24 mov %ebx,(%esp)
80102c7e: e8 6d d5 ff ff call 801001f0 <brelse>
}
80102c83: 8b 5d fc mov -0x4(%ebp),%ebx
80102c86: 83 c4 10 add $0x10,%esp
80102c89: c9 leave
80102c8a: c3 ret
80102c8b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80102c8f: 90 nop
80102c90 <initlog>:
{
80102c90: f3 0f 1e fb endbr32
80102c94: 55 push %ebp
80102c95: 89 e5 mov %esp,%ebp
80102c97: 53 push %ebx
80102c98: 83 ec 2c sub $0x2c,%esp
80102c9b: 8b 5d 08 mov 0x8(%ebp),%ebx
initlock(&log.lock, "log");
80102c9e: 68 20 7a 10 80 push $0x80107a20
80102ca3: 68 40 30 11 80 push $0x80113040
80102ca8: e8 53 19 00 00 call 80104600 <initlock>
readsb(dev, &sb);
80102cad: 58 pop %eax
80102cae: 8d 45 dc lea -0x24(%ebp),%eax
80102cb1: 5a pop %edx
80102cb2: 50 push %eax
80102cb3: 53 push %ebx
80102cb4: e8 47 e8 ff ff call 80101500 <readsb>
log.start = sb.logstart;
80102cb9: 8b 45 ec mov -0x14(%ebp),%eax
struct buf *buf = bread(log.dev, log.start);
80102cbc: 59 pop %ecx
log.dev = dev;
80102cbd: 89 1d 84 30 11 80 mov %ebx,0x80113084
log.size = sb.nlog;
80102cc3: 8b 55 e8 mov -0x18(%ebp),%edx
log.start = sb.logstart;
80102cc6: a3 74 30 11 80 mov %eax,0x80113074
log.size = sb.nlog;
80102ccb: 89 15 78 30 11 80 mov %edx,0x80113078
struct buf *buf = bread(log.dev, log.start);
80102cd1: 5a pop %edx
80102cd2: 50 push %eax
80102cd3: 53 push %ebx
80102cd4: e8 f7 d3 ff ff call 801000d0 <bread>
for (i = 0; i < log.lh.n; i++) {
80102cd9: 83 c4 10 add $0x10,%esp
log.lh.n = lh->n;
80102cdc: 8b 48 5c mov 0x5c(%eax),%ecx
80102cdf: 89 0d 88 30 11 80 mov %ecx,0x80113088
for (i = 0; i < log.lh.n; i++) {
80102ce5: 85 c9 test %ecx,%ecx
80102ce7: 7e 19 jle 80102d02 <initlog+0x72>
80102ce9: 31 d2 xor %edx,%edx
80102ceb: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80102cef: 90 nop
log.lh.block[i] = lh->block[i];
80102cf0: 8b 5c 90 60 mov 0x60(%eax,%edx,4),%ebx
80102cf4: 89 1c 95 8c 30 11 80 mov %ebx,-0x7feecf74(,%edx,4)
for (i = 0; i < log.lh.n; i++) {
80102cfb: 83 c2 01 add $0x1,%edx
80102cfe: 39 d1 cmp %edx,%ecx
80102d00: 75 ee jne 80102cf0 <initlog+0x60>
brelse(buf);
80102d02: 83 ec 0c sub $0xc,%esp
80102d05: 50 push %eax
80102d06: e8 e5 d4 ff ff call 801001f0 <brelse>
static void
recover_from_log(void)
{
read_head();
install_trans(); // if committed, copy from log to disk
80102d0b: e8 80 fe ff ff call 80102b90 <install_trans>
log.lh.n = 0;
80102d10: c7 05 88 30 11 80 00 movl $0x0,0x80113088
80102d17: 00 00 00
write_head(); // clear the log
80102d1a: e8 11 ff ff ff call 80102c30 <write_head>
}
80102d1f: 8b 5d fc mov -0x4(%ebp),%ebx
80102d22: 83 c4 10 add $0x10,%esp
80102d25: c9 leave
80102d26: c3 ret
80102d27: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80102d2e: 66 90 xchg %ax,%ax
80102d30 <begin_op>:
}
// called at the start of each FS system call.
void
begin_op(void)
{
80102d30: f3 0f 1e fb endbr32
80102d34: 55 push %ebp
80102d35: 89 e5 mov %esp,%ebp
80102d37: 83 ec 14 sub $0x14,%esp
acquire(&log.lock);
80102d3a: 68 40 30 11 80 push $0x80113040
80102d3f: e8 3c 1a 00 00 call 80104780 <acquire>
80102d44: 83 c4 10 add $0x10,%esp
80102d47: eb 1c jmp 80102d65 <begin_op+0x35>
80102d49: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
while(1){
if(log.committing){
sleep(&log, &log.lock);
80102d50: 83 ec 08 sub $0x8,%esp
80102d53: 68 40 30 11 80 push $0x80113040
80102d58: 68 40 30 11 80 push $0x80113040
80102d5d: e8 be 11 00 00 call 80103f20 <sleep>
80102d62: 83 c4 10 add $0x10,%esp
if(log.committing){
80102d65: a1 80 30 11 80 mov 0x80113080,%eax
80102d6a: 85 c0 test %eax,%eax
80102d6c: 75 e2 jne 80102d50 <begin_op+0x20>
} else if(log.lh.n + (log.outstanding+1)*MAXOPBLOCKS > LOGSIZE){
80102d6e: a1 7c 30 11 80 mov 0x8011307c,%eax
80102d73: 8b 15 88 30 11 80 mov 0x80113088,%edx
80102d79: 83 c0 01 add $0x1,%eax
80102d7c: 8d 0c 80 lea (%eax,%eax,4),%ecx
80102d7f: 8d 14 4a lea (%edx,%ecx,2),%edx
80102d82: 83 fa 1e cmp $0x1e,%edx
80102d85: 7f c9 jg 80102d50 <begin_op+0x20>
// this op might exhaust log space; wait for commit.
sleep(&log, &log.lock);
} else {
log.outstanding += 1;
release(&log.lock);
80102d87: 83 ec 0c sub $0xc,%esp
log.outstanding += 1;
80102d8a: a3 7c 30 11 80 mov %eax,0x8011307c
release(&log.lock);
80102d8f: 68 40 30 11 80 push $0x80113040
80102d94: e8 a7 1a 00 00 call 80104840 <release>
break;
}
}
}
80102d99: 83 c4 10 add $0x10,%esp
80102d9c: c9 leave
80102d9d: c3 ret
80102d9e: 66 90 xchg %ax,%ax
80102da0 <end_op>:
// called at the end of each FS system call.
// commits if this was the last outstanding operation.
void
end_op(void)
{
80102da0: f3 0f 1e fb endbr32
80102da4: 55 push %ebp
80102da5: 89 e5 mov %esp,%ebp
80102da7: 57 push %edi
80102da8: 56 push %esi
80102da9: 53 push %ebx
80102daa: 83 ec 18 sub $0x18,%esp
int do_commit = 0;
acquire(&log.lock);
80102dad: 68 40 30 11 80 push $0x80113040
80102db2: e8 c9 19 00 00 call 80104780 <acquire>
log.outstanding -= 1;
80102db7: a1 7c 30 11 80 mov 0x8011307c,%eax
if(log.committing)
80102dbc: 8b 35 80 30 11 80 mov 0x80113080,%esi
80102dc2: 83 c4 10 add $0x10,%esp
log.outstanding -= 1;
80102dc5: 8d 58 ff lea -0x1(%eax),%ebx
80102dc8: 89 1d 7c 30 11 80 mov %ebx,0x8011307c
if(log.committing)
80102dce: 85 f6 test %esi,%esi
80102dd0: 0f 85 1e 01 00 00 jne 80102ef4 <end_op+0x154>
panic("log.committing");
if(log.outstanding == 0){
80102dd6: 85 db test %ebx,%ebx
80102dd8: 0f 85 f2 00 00 00 jne 80102ed0 <end_op+0x130>
do_commit = 1;
log.committing = 1;
80102dde: c7 05 80 30 11 80 01 movl $0x1,0x80113080
80102de5: 00 00 00
// begin_op() may be waiting for log space,
// and decrementing log.outstanding has decreased
// the amount of reserved space.
wakeup(&log);
}
release(&log.lock);
80102de8: 83 ec 0c sub $0xc,%esp
80102deb: 68 40 30 11 80 push $0x80113040
80102df0: e8 4b 1a 00 00 call 80104840 <release>
}
static void
commit()
{
if (log.lh.n > 0) {
80102df5: 8b 0d 88 30 11 80 mov 0x80113088,%ecx
80102dfb: 83 c4 10 add $0x10,%esp
80102dfe: 85 c9 test %ecx,%ecx
80102e00: 7f 3e jg 80102e40 <end_op+0xa0>
acquire(&log.lock);
80102e02: 83 ec 0c sub $0xc,%esp
80102e05: 68 40 30 11 80 push $0x80113040
80102e0a: e8 71 19 00 00 call 80104780 <acquire>
wakeup(&log);
80102e0f: c7 04 24 40 30 11 80 movl $0x80113040,(%esp)
log.committing = 0;
80102e16: c7 05 80 30 11 80 00 movl $0x0,0x80113080
80102e1d: 00 00 00
wakeup(&log);
80102e20: e8 bb 12 00 00 call 801040e0 <wakeup>
release(&log.lock);
80102e25: c7 04 24 40 30 11 80 movl $0x80113040,(%esp)
80102e2c: e8 0f 1a 00 00 call 80104840 <release>
80102e31: 83 c4 10 add $0x10,%esp
}
80102e34: 8d 65 f4 lea -0xc(%ebp),%esp
80102e37: 5b pop %ebx
80102e38: 5e pop %esi
80102e39: 5f pop %edi
80102e3a: 5d pop %ebp
80102e3b: c3 ret
80102e3c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
struct buf *to = bread(log.dev, log.start+tail+1); // log block
80102e40: a1 74 30 11 80 mov 0x80113074,%eax
80102e45: 83 ec 08 sub $0x8,%esp
80102e48: 01 d8 add %ebx,%eax
80102e4a: 83 c0 01 add $0x1,%eax
80102e4d: 50 push %eax
80102e4e: ff 35 84 30 11 80 pushl 0x80113084
80102e54: e8 77 d2 ff ff call 801000d0 <bread>
80102e59: 89 c6 mov %eax,%esi
struct buf *from = bread(log.dev, log.lh.block[tail]); // cache block
80102e5b: 58 pop %eax
80102e5c: 5a pop %edx
80102e5d: ff 34 9d 8c 30 11 80 pushl -0x7feecf74(,%ebx,4)
80102e64: ff 35 84 30 11 80 pushl 0x80113084
for (tail = 0; tail < log.lh.n; tail++) {
80102e6a: 83 c3 01 add $0x1,%ebx
struct buf *from = bread(log.dev, log.lh.block[tail]); // cache block
80102e6d: e8 5e d2 ff ff call 801000d0 <bread>
memmove(to->data, from->data, BSIZE);
80102e72: 83 c4 0c add $0xc,%esp
struct buf *from = bread(log.dev, log.lh.block[tail]); // cache block
80102e75: 89 c7 mov %eax,%edi
memmove(to->data, from->data, BSIZE);
80102e77: 8d 40 5c lea 0x5c(%eax),%eax
80102e7a: 68 00 02 00 00 push $0x200
80102e7f: 50 push %eax
80102e80: 8d 46 5c lea 0x5c(%esi),%eax
80102e83: 50 push %eax
80102e84: e8 a7 1a 00 00 call 80104930 <memmove>
bwrite(to); // write the log
80102e89: 89 34 24 mov %esi,(%esp)
80102e8c: e8 1f d3 ff ff call 801001b0 <bwrite>
brelse(from);
80102e91: 89 3c 24 mov %edi,(%esp)
80102e94: e8 57 d3 ff ff call 801001f0 <brelse>
brelse(to);
80102e99: 89 34 24 mov %esi,(%esp)
80102e9c: e8 4f d3 ff ff call 801001f0 <brelse>
for (tail = 0; tail < log.lh.n; tail++) {
80102ea1: 83 c4 10 add $0x10,%esp
80102ea4: 3b 1d 88 30 11 80 cmp 0x80113088,%ebx
80102eaa: 7c 94 jl 80102e40 <end_op+0xa0>
write_log(); // Write modified blocks from cache to log
write_head(); // Write header to disk -- the real commit
80102eac: e8 7f fd ff ff call 80102c30 <write_head>
install_trans(); // Now install writes to home locations
80102eb1: e8 da fc ff ff call 80102b90 <install_trans>
log.lh.n = 0;
80102eb6: c7 05 88 30 11 80 00 movl $0x0,0x80113088
80102ebd: 00 00 00
write_head(); // Erase the transaction from the log
80102ec0: e8 6b fd ff ff call 80102c30 <write_head>
80102ec5: e9 38 ff ff ff jmp 80102e02 <end_op+0x62>
80102eca: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
wakeup(&log);
80102ed0: 83 ec 0c sub $0xc,%esp
80102ed3: 68 40 30 11 80 push $0x80113040
80102ed8: e8 03 12 00 00 call 801040e0 <wakeup>
release(&log.lock);
80102edd: c7 04 24 40 30 11 80 movl $0x80113040,(%esp)
80102ee4: e8 57 19 00 00 call 80104840 <release>
80102ee9: 83 c4 10 add $0x10,%esp
}
80102eec: 8d 65 f4 lea -0xc(%ebp),%esp
80102eef: 5b pop %ebx
80102ef0: 5e pop %esi
80102ef1: 5f pop %edi
80102ef2: 5d pop %ebp
80102ef3: c3 ret
panic("log.committing");
80102ef4: 83 ec 0c sub $0xc,%esp
80102ef7: 68 24 7a 10 80 push $0x80107a24
80102efc: e8 8f d4 ff ff call 80100390 <panic>
80102f01: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80102f08: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80102f0f: 90 nop
80102f10 <log_write>:
// modify bp->data[]
// log_write(bp)
// brelse(bp)
void
log_write(struct buf *b)
{
80102f10: f3 0f 1e fb endbr32
80102f14: 55 push %ebp
80102f15: 89 e5 mov %esp,%ebp
80102f17: 53 push %ebx
80102f18: 83 ec 04 sub $0x4,%esp
int i;
if (log.lh.n >= LOGSIZE || log.lh.n >= log.size - 1)
80102f1b: 8b 15 88 30 11 80 mov 0x80113088,%edx
{
80102f21: 8b 5d 08 mov 0x8(%ebp),%ebx
if (log.lh.n >= LOGSIZE || log.lh.n >= log.size - 1)
80102f24: 83 fa 1d cmp $0x1d,%edx
80102f27: 0f 8f 91 00 00 00 jg 80102fbe <log_write+0xae>
80102f2d: a1 78 30 11 80 mov 0x80113078,%eax
80102f32: 83 e8 01 sub $0x1,%eax
80102f35: 39 c2 cmp %eax,%edx
80102f37: 0f 8d 81 00 00 00 jge 80102fbe <log_write+0xae>
panic("too big a transaction");
if (log.outstanding < 1)
80102f3d: a1 7c 30 11 80 mov 0x8011307c,%eax
80102f42: 85 c0 test %eax,%eax
80102f44: 0f 8e 81 00 00 00 jle 80102fcb <log_write+0xbb>
panic("log_write outside of trans");
acquire(&log.lock);
80102f4a: 83 ec 0c sub $0xc,%esp
80102f4d: 68 40 30 11 80 push $0x80113040
80102f52: e8 29 18 00 00 call 80104780 <acquire>
for (i = 0; i < log.lh.n; i++) {
80102f57: 8b 15 88 30 11 80 mov 0x80113088,%edx
80102f5d: 83 c4 10 add $0x10,%esp
80102f60: 85 d2 test %edx,%edx
80102f62: 7e 4e jle 80102fb2 <log_write+0xa2>
if (log.lh.block[i] == b->blockno) // log absorbtion
80102f64: 8b 4b 08 mov 0x8(%ebx),%ecx
for (i = 0; i < log.lh.n; i++) {
80102f67: 31 c0 xor %eax,%eax
80102f69: eb 0c jmp 80102f77 <log_write+0x67>
80102f6b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80102f6f: 90 nop
80102f70: 83 c0 01 add $0x1,%eax
80102f73: 39 c2 cmp %eax,%edx
80102f75: 74 29 je 80102fa0 <log_write+0x90>
if (log.lh.block[i] == b->blockno) // log absorbtion
80102f77: 39 0c 85 8c 30 11 80 cmp %ecx,-0x7feecf74(,%eax,4)
80102f7e: 75 f0 jne 80102f70 <log_write+0x60>
break;
}
log.lh.block[i] = b->blockno;
80102f80: 89 0c 85 8c 30 11 80 mov %ecx,-0x7feecf74(,%eax,4)
if (i == log.lh.n)
log.lh.n++;
b->flags |= B_DIRTY; // prevent eviction
80102f87: 83 0b 04 orl $0x4,(%ebx)
release(&log.lock);
}
80102f8a: 8b 5d fc mov -0x4(%ebp),%ebx
release(&log.lock);
80102f8d: c7 45 08 40 30 11 80 movl $0x80113040,0x8(%ebp)
}
80102f94: c9 leave
release(&log.lock);
80102f95: e9 a6 18 00 00 jmp 80104840 <release>
80102f9a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
log.lh.block[i] = b->blockno;
80102fa0: 89 0c 95 8c 30 11 80 mov %ecx,-0x7feecf74(,%edx,4)
log.lh.n++;
80102fa7: 83 c2 01 add $0x1,%edx
80102faa: 89 15 88 30 11 80 mov %edx,0x80113088
80102fb0: eb d5 jmp 80102f87 <log_write+0x77>
log.lh.block[i] = b->blockno;
80102fb2: 8b 43 08 mov 0x8(%ebx),%eax
80102fb5: a3 8c 30 11 80 mov %eax,0x8011308c
if (i == log.lh.n)
80102fba: 75 cb jne 80102f87 <log_write+0x77>
80102fbc: eb e9 jmp 80102fa7 <log_write+0x97>
panic("too big a transaction");
80102fbe: 83 ec 0c sub $0xc,%esp
80102fc1: 68 33 7a 10 80 push $0x80107a33
80102fc6: e8 c5 d3 ff ff call 80100390 <panic>
panic("log_write outside of trans");
80102fcb: 83 ec 0c sub $0xc,%esp
80102fce: 68 49 7a 10 80 push $0x80107a49
80102fd3: e8 b8 d3 ff ff call 80100390 <panic>
80102fd8: 66 90 xchg %ax,%ax
80102fda: 66 90 xchg %ax,%ax
80102fdc: 66 90 xchg %ax,%ax
80102fde: 66 90 xchg %ax,%ax
80102fe0 <mpmain>:
}
// Common CPU setup code.
static void
mpmain(void)
{
80102fe0: 55 push %ebp
80102fe1: 89 e5 mov %esp,%ebp
80102fe3: 53 push %ebx
80102fe4: 83 ec 04 sub $0x4,%esp
cprintf("cpu%d: starting %d\n", cpuid(), cpuid());
80102fe7: e8 54 09 00 00 call 80103940 <cpuid>
80102fec: 89 c3 mov %eax,%ebx
80102fee: e8 4d 09 00 00 call 80103940 <cpuid>
80102ff3: 83 ec 04 sub $0x4,%esp
80102ff6: 53 push %ebx
80102ff7: 50 push %eax
80102ff8: 68 64 7a 10 80 push $0x80107a64
80102ffd: e8 ae d6 ff ff call 801006b0 <cprintf>
idtinit(); // load idt register
80103002: e8 d9 2b 00 00 call 80105be0 <idtinit>
xchg(&(mycpu()->started), 1); // tell startothers() we're up
80103007: e8 c4 08 00 00 call 801038d0 <mycpu>
8010300c: 89 c2 mov %eax,%edx
xchg(volatile uint *addr, uint newval)
{
uint result;
// The + in "+m" denotes a read-modify-write operand.
asm volatile("lock; xchgl %0, %1" :
8010300e: b8 01 00 00 00 mov $0x1,%eax
80103013: f0 87 82 a0 00 00 00 lock xchg %eax,0xa0(%edx)
scheduler(); // start running processes
8010301a: e8 11 0c 00 00 call 80103c30 <scheduler>
8010301f: 90 nop
80103020 <mpenter>:
{
80103020: f3 0f 1e fb endbr32
80103024: 55 push %ebp
80103025: 89 e5 mov %esp,%ebp
80103027: 83 ec 08 sub $0x8,%esp
switchkvm();
8010302a: e8 81 3c 00 00 call 80106cb0 <switchkvm>
seginit();
8010302f: e8 ec 3b 00 00 call 80106c20 <seginit>
lapicinit();
80103034: e8 67 f7 ff ff call 801027a0 <lapicinit>
mpmain();
80103039: e8 a2 ff ff ff call 80102fe0 <mpmain>
8010303e: 66 90 xchg %ax,%ax
80103040 <main>:
{
80103040: f3 0f 1e fb endbr32
80103044: 8d 4c 24 04 lea 0x4(%esp),%ecx
80103048: 83 e4 f0 and $0xfffffff0,%esp
8010304b: ff 71 fc pushl -0x4(%ecx)
8010304e: 55 push %ebp
8010304f: 89 e5 mov %esp,%ebp
80103051: 53 push %ebx
80103052: 51 push %ecx
kinit1(end, P2V(4*1024*1024)); // phys page allocator
80103053: 83 ec 08 sub $0x8,%esp
80103056: 68 00 00 40 80 push $0x80400000
8010305b: 68 68 5f 11 80 push $0x80115f68
80103060: e8 fb f4 ff ff call 80102560 <kinit1>
kvmalloc(); // kernel page table
80103065: e8 26 41 00 00 call 80107190 <kvmalloc>
mpinit(); // detect other processors
8010306a: e8 81 01 00 00 call 801031f0 <mpinit>
lapicinit(); // interrupt controller
8010306f: e8 2c f7 ff ff call 801027a0 <lapicinit>
seginit(); // segment descriptors
80103074: e8 a7 3b 00 00 call 80106c20 <seginit>
picinit(); // disable pic
80103079: e8 52 03 00 00 call 801033d0 <picinit>
ioapicinit(); // another interrupt controller
8010307e: e8 fd f2 ff ff call 80102380 <ioapicinit>
consoleinit(); // console hardware
80103083: e8 a8 d9 ff ff call 80100a30 <consoleinit>
uartinit(); // serial port
80103088: e8 53 2e 00 00 call 80105ee0 <uartinit>
pinit(); // process table
8010308d: e8 1e 08 00 00 call 801038b0 <pinit>
tvinit(); // trap vectors
80103092: e8 c9 2a 00 00 call 80105b60 <tvinit>
binit(); // buffer cache
80103097: e8 a4 cf ff ff call 80100040 <binit>
fileinit(); // file table
8010309c: e8 3f dd ff ff call 80100de0 <fileinit>
ideinit(); // disk
801030a1: e8 aa f0 ff ff call 80102150 <ideinit>
// Write entry code to unused memory at 0x7000.
// 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);
801030a6: 83 c4 0c add $0xc,%esp
801030a9: 68 8a 00 00 00 push $0x8a
801030ae: 68 90 a4 10 80 push $0x8010a490
801030b3: 68 00 70 00 80 push $0x80007000
801030b8: e8 73 18 00 00 call 80104930 <memmove>
for(c = cpus; c < cpus+ncpu; c++){
801030bd: 83 c4 10 add $0x10,%esp
801030c0: 69 05 c0 36 11 80 b0 imul $0xb0,0x801136c0,%eax
801030c7: 00 00 00
801030ca: 05 40 31 11 80 add $0x80113140,%eax
801030cf: 3d 40 31 11 80 cmp $0x80113140,%eax
801030d4: 76 7a jbe 80103150 <main+0x110>
801030d6: bb 40 31 11 80 mov $0x80113140,%ebx
801030db: eb 1c jmp 801030f9 <main+0xb9>
801030dd: 8d 76 00 lea 0x0(%esi),%esi
801030e0: 69 05 c0 36 11 80 b0 imul $0xb0,0x801136c0,%eax
801030e7: 00 00 00
801030ea: 81 c3 b0 00 00 00 add $0xb0,%ebx
801030f0: 05 40 31 11 80 add $0x80113140,%eax
801030f5: 39 c3 cmp %eax,%ebx
801030f7: 73 57 jae 80103150 <main+0x110>
if(c == mycpu()) // We've started already.
801030f9: e8 d2 07 00 00 call 801038d0 <mycpu>
801030fe: 39 c3 cmp %eax,%ebx
80103100: 74 de je 801030e0 <main+0xa0>
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();
80103102: e8 29 f5 ff ff call 80102630 <kalloc>
*(void**)(code-4) = stack + KSTACKSIZE;
*(void(**)(void))(code-8) = mpenter;
*(int**)(code-12) = (void *) V2P(entrypgdir);
lapicstartap(c->apicid, V2P(code));
80103107: 83 ec 08 sub $0x8,%esp
*(void(**)(void))(code-8) = mpenter;
8010310a: c7 05 f8 6f 00 80 20 movl $0x80103020,0x80006ff8
80103111: 30 10 80
*(int**)(code-12) = (void *) V2P(entrypgdir);
80103114: c7 05 f4 6f 00 80 00 movl $0x109000,0x80006ff4
8010311b: 90 10 00
*(void**)(code-4) = stack + KSTACKSIZE;
8010311e: 05 00 10 00 00 add $0x1000,%eax
80103123: a3 fc 6f 00 80 mov %eax,0x80006ffc
lapicstartap(c->apicid, V2P(code));
80103128: 0f b6 03 movzbl (%ebx),%eax
8010312b: 68 00 70 00 00 push $0x7000
80103130: 50 push %eax
80103131: e8 ba f7 ff ff call 801028f0 <lapicstartap>
// wait for cpu to finish mpmain()
while(c->started == 0)
80103136: 83 c4 10 add $0x10,%esp
80103139: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80103140: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax
80103146: 85 c0 test %eax,%eax
80103148: 74 f6 je 80103140 <main+0x100>
8010314a: eb 94 jmp 801030e0 <main+0xa0>
8010314c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
kinit2(P2V(4*1024*1024), P2V(PHYSTOP)); // must come after startothers()
80103150: 83 ec 08 sub $0x8,%esp
80103153: 68 00 00 00 8e push $0x8e000000
80103158: 68 00 00 40 80 push $0x80400000
8010315d: e8 6e f4 ff ff call 801025d0 <kinit2>
userinit(); // first user process
80103162: e8 29 08 00 00 call 80103990 <userinit>
mpmain(); // finish this processor's setup
80103167: e8 74 fe ff ff call 80102fe0 <mpmain>
8010316c: 66 90 xchg %ax,%ax
8010316e: 66 90 xchg %ax,%ax
80103170 <mpsearch1>:
}
// Look for an MP structure in the len bytes at addr.
static struct mp*
mpsearch1(uint a, int len)
{
80103170: 55 push %ebp
80103171: 89 e5 mov %esp,%ebp
80103173: 57 push %edi
80103174: 56 push %esi
uchar *e, *p, *addr;
addr = P2V(a);
80103175: 8d b0 00 00 00 80 lea -0x80000000(%eax),%esi
{
8010317b: 53 push %ebx
e = addr+len;
8010317c: 8d 1c 16 lea (%esi,%edx,1),%ebx
{
8010317f: 83 ec 0c sub $0xc,%esp
for(p = addr; p < e; p += sizeof(struct mp))
80103182: 39 de cmp %ebx,%esi
80103184: 72 10 jb 80103196 <mpsearch1+0x26>
80103186: eb 50 jmp 801031d8 <mpsearch1+0x68>
80103188: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010318f: 90 nop
80103190: 89 fe mov %edi,%esi
80103192: 39 fb cmp %edi,%ebx
80103194: 76 42 jbe 801031d8 <mpsearch1+0x68>
if(memcmp(p, "_MP_", 4) == 0 && sum(p, sizeof(struct mp)) == 0)
80103196: 83 ec 04 sub $0x4,%esp
80103199: 8d 7e 10 lea 0x10(%esi),%edi
8010319c: 6a 04 push $0x4
8010319e: 68 78 7a 10 80 push $0x80107a78
801031a3: 56 push %esi
801031a4: e8 37 17 00 00 call 801048e0 <memcmp>
801031a9: 83 c4 10 add $0x10,%esp
801031ac: 85 c0 test %eax,%eax
801031ae: 75 e0 jne 80103190 <mpsearch1+0x20>
801031b0: 89 f2 mov %esi,%edx
801031b2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
sum += addr[i];
801031b8: 0f b6 0a movzbl (%edx),%ecx
801031bb: 83 c2 01 add $0x1,%edx
801031be: 01 c8 add %ecx,%eax
for(i=0; i<len; i++)
801031c0: 39 fa cmp %edi,%edx
801031c2: 75 f4 jne 801031b8 <mpsearch1+0x48>
if(memcmp(p, "_MP_", 4) == 0 && sum(p, sizeof(struct mp)) == 0)
801031c4: 84 c0 test %al,%al
801031c6: 75 c8 jne 80103190 <mpsearch1+0x20>
return (struct mp*)p;
return 0;
}
801031c8: 8d 65 f4 lea -0xc(%ebp),%esp
801031cb: 89 f0 mov %esi,%eax
801031cd: 5b pop %ebx
801031ce: 5e pop %esi
801031cf: 5f pop %edi
801031d0: 5d pop %ebp
801031d1: c3 ret
801031d2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801031d8: 8d 65 f4 lea -0xc(%ebp),%esp
return 0;
801031db: 31 f6 xor %esi,%esi
}
801031dd: 5b pop %ebx
801031de: 89 f0 mov %esi,%eax
801031e0: 5e pop %esi
801031e1: 5f pop %edi
801031e2: 5d pop %ebp
801031e3: c3 ret
801031e4: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801031eb: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801031ef: 90 nop
801031f0 <mpinit>:
return conf;
}
void
mpinit(void)
{
801031f0: f3 0f 1e fb endbr32
801031f4: 55 push %ebp
801031f5: 89 e5 mov %esp,%ebp
801031f7: 57 push %edi
801031f8: 56 push %esi
801031f9: 53 push %ebx
801031fa: 83 ec 1c sub $0x1c,%esp
if((p = ((bda[0x0F]<<8)| bda[0x0E]) << 4)){
801031fd: 0f b6 05 0f 04 00 80 movzbl 0x8000040f,%eax
80103204: 0f b6 15 0e 04 00 80 movzbl 0x8000040e,%edx
8010320b: c1 e0 08 shl $0x8,%eax
8010320e: 09 d0 or %edx,%eax
80103210: c1 e0 04 shl $0x4,%eax
80103213: 75 1b jne 80103230 <mpinit+0x40>
p = ((bda[0x14]<<8)|bda[0x13])*1024;
80103215: 0f b6 05 14 04 00 80 movzbl 0x80000414,%eax
8010321c: 0f b6 15 13 04 00 80 movzbl 0x80000413,%edx
80103223: c1 e0 08 shl $0x8,%eax
80103226: 09 d0 or %edx,%eax
80103228: c1 e0 0a shl $0xa,%eax
if((mp = mpsearch1(p-1024, 1024)))
8010322b: 2d 00 04 00 00 sub $0x400,%eax
if((mp = mpsearch1(p, 1024)))
80103230: ba 00 04 00 00 mov $0x400,%edx
80103235: e8 36 ff ff ff call 80103170 <mpsearch1>
8010323a: 89 c6 mov %eax,%esi
8010323c: 85 c0 test %eax,%eax
8010323e: 0f 84 4c 01 00 00 je 80103390 <mpinit+0x1a0>
if((mp = mpsearch()) == 0 || mp->physaddr == 0)
80103244: 8b 5e 04 mov 0x4(%esi),%ebx
80103247: 85 db test %ebx,%ebx
80103249: 0f 84 61 01 00 00 je 801033b0 <mpinit+0x1c0>
if(memcmp(conf, "PCMP", 4) != 0)
8010324f: 83 ec 04 sub $0x4,%esp
conf = (struct mpconf*) P2V((uint) mp->physaddr);
80103252: 8d 83 00 00 00 80 lea -0x80000000(%ebx),%eax
if(memcmp(conf, "PCMP", 4) != 0)
80103258: 6a 04 push $0x4
8010325a: 68 7d 7a 10 80 push $0x80107a7d
8010325f: 50 push %eax
conf = (struct mpconf*) P2V((uint) mp->physaddr);
80103260: 89 45 e4 mov %eax,-0x1c(%ebp)
if(memcmp(conf, "PCMP", 4) != 0)
80103263: e8 78 16 00 00 call 801048e0 <memcmp>
80103268: 83 c4 10 add $0x10,%esp
8010326b: 85 c0 test %eax,%eax
8010326d: 0f 85 3d 01 00 00 jne 801033b0 <mpinit+0x1c0>
if(conf->version != 1 && conf->version != 4)
80103273: 0f b6 83 06 00 00 80 movzbl -0x7ffffffa(%ebx),%eax
8010327a: 3c 01 cmp $0x1,%al
8010327c: 74 08 je 80103286 <mpinit+0x96>
8010327e: 3c 04 cmp $0x4,%al
80103280: 0f 85 2a 01 00 00 jne 801033b0 <mpinit+0x1c0>
if(sum((uchar*)conf, conf->length) != 0)
80103286: 0f b7 93 04 00 00 80 movzwl -0x7ffffffc(%ebx),%edx
for(i=0; i<len; i++)
8010328d: 66 85 d2 test %dx,%dx
80103290: 74 26 je 801032b8 <mpinit+0xc8>
80103292: 8d 3c 1a lea (%edx,%ebx,1),%edi
80103295: 89 d8 mov %ebx,%eax
sum = 0;
80103297: 31 d2 xor %edx,%edx
80103299: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
sum += addr[i];
801032a0: 0f b6 88 00 00 00 80 movzbl -0x80000000(%eax),%ecx
801032a7: 83 c0 01 add $0x1,%eax
801032aa: 01 ca add %ecx,%edx
for(i=0; i<len; i++)
801032ac: 39 f8 cmp %edi,%eax
801032ae: 75 f0 jne 801032a0 <mpinit+0xb0>
if(sum((uchar*)conf, conf->length) != 0)
801032b0: 84 d2 test %dl,%dl
801032b2: 0f 85 f8 00 00 00 jne 801033b0 <mpinit+0x1c0>
struct mpioapic *ioapic;
if((conf = mpconfig(&mp)) == 0)
panic("Expect to run on an SMP");
ismp = 1;
lapic = (uint*)conf->lapicaddr;
801032b8: 8b 83 24 00 00 80 mov -0x7fffffdc(%ebx),%eax
801032be: a3 3c 30 11 80 mov %eax,0x8011303c
for(p=(uchar*)(conf+1), e=(uchar*)conf+conf->length; p<e; ){
801032c3: 8d 83 2c 00 00 80 lea -0x7fffffd4(%ebx),%eax
801032c9: 0f b7 93 04 00 00 80 movzwl -0x7ffffffc(%ebx),%edx
ismp = 1;
801032d0: bb 01 00 00 00 mov $0x1,%ebx
for(p=(uchar*)(conf+1), e=(uchar*)conf+conf->length; p<e; ){
801032d5: 03 55 e4 add -0x1c(%ebp),%edx
801032d8: 89 5d e4 mov %ebx,-0x1c(%ebp)
801032db: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801032df: 90 nop
801032e0: 39 c2 cmp %eax,%edx
801032e2: 76 15 jbe 801032f9 <mpinit+0x109>
switch(*p){
801032e4: 0f b6 08 movzbl (%eax),%ecx
801032e7: 80 f9 02 cmp $0x2,%cl
801032ea: 74 5c je 80103348 <mpinit+0x158>
801032ec: 77 42 ja 80103330 <mpinit+0x140>
801032ee: 84 c9 test %cl,%cl
801032f0: 74 6e je 80103360 <mpinit+0x170>
p += sizeof(struct mpioapic);
continue;
case MPBUS:
case MPIOINTR:
case MPLINTR:
p += 8;
801032f2: 83 c0 08 add $0x8,%eax
for(p=(uchar*)(conf+1), e=(uchar*)conf+conf->length; p<e; ){
801032f5: 39 c2 cmp %eax,%edx
801032f7: 77 eb ja 801032e4 <mpinit+0xf4>
801032f9: 8b 5d e4 mov -0x1c(%ebp),%ebx
default:
ismp = 0;
break;
}
}
if(!ismp)
801032fc: 85 db test %ebx,%ebx
801032fe: 0f 84 b9 00 00 00 je 801033bd <mpinit+0x1cd>
panic("Didn't find a suitable machine");
if(mp->imcrp){
80103304: 80 7e 0c 00 cmpb $0x0,0xc(%esi)
80103308: 74 15 je 8010331f <mpinit+0x12f>
asm volatile("out %0,%1" : : "a" (data), "d" (port));
8010330a: b8 70 00 00 00 mov $0x70,%eax
8010330f: ba 22 00 00 00 mov $0x22,%edx
80103314: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80103315: ba 23 00 00 00 mov $0x23,%edx
8010331a: ec in (%dx),%al
// 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.
8010331b: 83 c8 01 or $0x1,%eax
asm volatile("out %0,%1" : : "a" (data), "d" (port));
8010331e: ee out %al,(%dx)
}
}
8010331f: 8d 65 f4 lea -0xc(%ebp),%esp
80103322: 5b pop %ebx
80103323: 5e pop %esi
80103324: 5f pop %edi
80103325: 5d pop %ebp
80103326: c3 ret
80103327: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010332e: 66 90 xchg %ax,%ax
switch(*p){
80103330: 83 e9 03 sub $0x3,%ecx
80103333: 80 f9 01 cmp $0x1,%cl
80103336: 76 ba jbe 801032f2 <mpinit+0x102>
80103338: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
8010333f: eb 9f jmp 801032e0 <mpinit+0xf0>
80103341: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
ioapicid = ioapic->apicno;
80103348: 0f b6 48 01 movzbl 0x1(%eax),%ecx
p += sizeof(struct mpioapic);
8010334c: 83 c0 08 add $0x8,%eax
ioapicid = ioapic->apicno;
8010334f: 88 0d 20 31 11 80 mov %cl,0x80113120
continue;
80103355: eb 89 jmp 801032e0 <mpinit+0xf0>
80103357: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010335e: 66 90 xchg %ax,%ax
if(ncpu < NCPU) {
80103360: 8b 0d c0 36 11 80 mov 0x801136c0,%ecx
80103366: 83 f9 07 cmp $0x7,%ecx
80103369: 7f 19 jg 80103384 <mpinit+0x194>
cpus[ncpu].apicid = proc->apicid; // apicid may differ from ncpu
8010336b: 69 f9 b0 00 00 00 imul $0xb0,%ecx,%edi
80103371: 0f b6 58 01 movzbl 0x1(%eax),%ebx
ncpu++;
80103375: 83 c1 01 add $0x1,%ecx
80103378: 89 0d c0 36 11 80 mov %ecx,0x801136c0
cpus[ncpu].apicid = proc->apicid; // apicid may differ from ncpu
8010337e: 88 9f 40 31 11 80 mov %bl,-0x7feecec0(%edi)
p += sizeof(struct mpproc);
80103384: 83 c0 14 add $0x14,%eax
continue;
80103387: e9 54 ff ff ff jmp 801032e0 <mpinit+0xf0>
8010338c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
return mpsearch1(0xF0000, 0x10000);
80103390: ba 00 00 01 00 mov $0x10000,%edx
80103395: b8 00 00 0f 00 mov $0xf0000,%eax
8010339a: e8 d1 fd ff ff call 80103170 <mpsearch1>
8010339f: 89 c6 mov %eax,%esi
if((mp = mpsearch()) == 0 || mp->physaddr == 0)
801033a1: 85 c0 test %eax,%eax
801033a3: 0f 85 9b fe ff ff jne 80103244 <mpinit+0x54>
801033a9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
panic("Expect to run on an SMP");
801033b0: 83 ec 0c sub $0xc,%esp
801033b3: 68 82 7a 10 80 push $0x80107a82
801033b8: e8 d3 cf ff ff call 80100390 <panic>
panic("Didn't find a suitable machine");
801033bd: 83 ec 0c sub $0xc,%esp
801033c0: 68 9c 7a 10 80 push $0x80107a9c
801033c5: e8 c6 cf ff ff call 80100390 <panic>
801033ca: 66 90 xchg %ax,%ax
801033cc: 66 90 xchg %ax,%ax
801033ce: 66 90 xchg %ax,%ax
801033d0 <picinit>:
#define IO_PIC2 0xA0 // Slave (IRQs 8-15)
// Don't use the 8259A interrupt controllers. Xv6 assumes SMP hardware.
void
picinit(void)
{
801033d0: f3 0f 1e fb endbr32
801033d4: b8 ff ff ff ff mov $0xffffffff,%eax
801033d9: ba 21 00 00 00 mov $0x21,%edx
801033de: ee out %al,(%dx)
801033df: ba a1 00 00 00 mov $0xa1,%edx
801033e4: ee out %al,(%dx)
// mask all interrupts
outb(IO_PIC1+1, 0xFF);
outb(IO_PIC2+1, 0xFF);
}
801033e5: c3 ret
801033e6: 66 90 xchg %ax,%ax
801033e8: 66 90 xchg %ax,%ax
801033ea: 66 90 xchg %ax,%ax
801033ec: 66 90 xchg %ax,%ax
801033ee: 66 90 xchg %ax,%ax
801033f0 <pipealloc>:
int writeopen; // write fd is still open
};
int
pipealloc(struct file **f0, struct file **f1)
{
801033f0: f3 0f 1e fb endbr32
801033f4: 55 push %ebp
801033f5: 89 e5 mov %esp,%ebp
801033f7: 57 push %edi
801033f8: 56 push %esi
801033f9: 53 push %ebx
801033fa: 83 ec 0c sub $0xc,%esp
801033fd: 8b 5d 08 mov 0x8(%ebp),%ebx
80103400: 8b 75 0c mov 0xc(%ebp),%esi
struct pipe *p;
p = 0;
*f0 = *f1 = 0;
80103403: c7 06 00 00 00 00 movl $0x0,(%esi)
80103409: c7 03 00 00 00 00 movl $0x0,(%ebx)
if((*f0 = filealloc()) == 0 || (*f1 = filealloc()) == 0)
8010340f: e8 ec d9 ff ff call 80100e00 <filealloc>
80103414: 89 03 mov %eax,(%ebx)
80103416: 85 c0 test %eax,%eax
80103418: 0f 84 ac 00 00 00 je 801034ca <pipealloc+0xda>
8010341e: e8 dd d9 ff ff call 80100e00 <filealloc>
80103423: 89 06 mov %eax,(%esi)
80103425: 85 c0 test %eax,%eax
80103427: 0f 84 8b 00 00 00 je 801034b8 <pipealloc+0xc8>
goto bad;
if((p = (struct pipe*)kalloc()) == 0)
8010342d: e8 fe f1 ff ff call 80102630 <kalloc>
80103432: 89 c7 mov %eax,%edi
80103434: 85 c0 test %eax,%eax
80103436: 0f 84 b4 00 00 00 je 801034f0 <pipealloc+0x100>
goto bad;
p->readopen = 1;
8010343c: c7 80 3c 02 00 00 01 movl $0x1,0x23c(%eax)
80103443: 00 00 00
p->writeopen = 1;
p->nwrite = 0;
p->nread = 0;
initlock(&p->lock, "pipe");
80103446: 83 ec 08 sub $0x8,%esp
p->writeopen = 1;
80103449: c7 80 40 02 00 00 01 movl $0x1,0x240(%eax)
80103450: 00 00 00
p->nwrite = 0;
80103453: c7 80 38 02 00 00 00 movl $0x0,0x238(%eax)
8010345a: 00 00 00
p->nread = 0;
8010345d: c7 80 34 02 00 00 00 movl $0x0,0x234(%eax)
80103464: 00 00 00
initlock(&p->lock, "pipe");
80103467: 68 bb 7a 10 80 push $0x80107abb
8010346c: 50 push %eax
8010346d: e8 8e 11 00 00 call 80104600 <initlock>
(*f0)->type = FD_PIPE;
80103472: 8b 03 mov (%ebx),%eax
(*f0)->pipe = p;
(*f1)->type = FD_PIPE;
(*f1)->readable = 0;
(*f1)->writable = 1;
(*f1)->pipe = p;
return 0;
80103474: 83 c4 10 add $0x10,%esp
(*f0)->type = FD_PIPE;
80103477: c7 00 01 00 00 00 movl $0x1,(%eax)
(*f0)->readable = 1;
8010347d: 8b 03 mov (%ebx),%eax
8010347f: c6 40 08 01 movb $0x1,0x8(%eax)
(*f0)->writable = 0;
80103483: 8b 03 mov (%ebx),%eax
80103485: c6 40 09 00 movb $0x0,0x9(%eax)
(*f0)->pipe = p;
80103489: 8b 03 mov (%ebx),%eax
8010348b: 89 78 0c mov %edi,0xc(%eax)
(*f1)->type = FD_PIPE;
8010348e: 8b 06 mov (%esi),%eax
80103490: c7 00 01 00 00 00 movl $0x1,(%eax)
(*f1)->readable = 0;
80103496: 8b 06 mov (%esi),%eax
80103498: c6 40 08 00 movb $0x0,0x8(%eax)
(*f1)->writable = 1;
8010349c: 8b 06 mov (%esi),%eax
8010349e: c6 40 09 01 movb $0x1,0x9(%eax)
(*f1)->pipe = p;
801034a2: 8b 06 mov (%esi),%eax
801034a4: 89 78 0c mov %edi,0xc(%eax)
if(*f0)
fileclose(*f0);
if(*f1)
fileclose(*f1);
return -1;
}
801034a7: 8d 65 f4 lea -0xc(%ebp),%esp
return 0;
801034aa: 31 c0 xor %eax,%eax
}
801034ac: 5b pop %ebx
801034ad: 5e pop %esi
801034ae: 5f pop %edi
801034af: 5d pop %ebp
801034b0: c3 ret
801034b1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
if(*f0)
801034b8: 8b 03 mov (%ebx),%eax
801034ba: 85 c0 test %eax,%eax
801034bc: 74 1e je 801034dc <pipealloc+0xec>
fileclose(*f0);
801034be: 83 ec 0c sub $0xc,%esp
801034c1: 50 push %eax
801034c2: e8 f9 d9 ff ff call 80100ec0 <fileclose>
801034c7: 83 c4 10 add $0x10,%esp
if(*f1)
801034ca: 8b 06 mov (%esi),%eax
801034cc: 85 c0 test %eax,%eax
801034ce: 74 0c je 801034dc <pipealloc+0xec>
fileclose(*f1);
801034d0: 83 ec 0c sub $0xc,%esp
801034d3: 50 push %eax
801034d4: e8 e7 d9 ff ff call 80100ec0 <fileclose>
801034d9: 83 c4 10 add $0x10,%esp
}
801034dc: 8d 65 f4 lea -0xc(%ebp),%esp
return -1;
801034df: b8 ff ff ff ff mov $0xffffffff,%eax
}
801034e4: 5b pop %ebx
801034e5: 5e pop %esi
801034e6: 5f pop %edi
801034e7: 5d pop %ebp
801034e8: c3 ret
801034e9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
if(*f0)
801034f0: 8b 03 mov (%ebx),%eax
801034f2: 85 c0 test %eax,%eax
801034f4: 75 c8 jne 801034be <pipealloc+0xce>
801034f6: eb d2 jmp 801034ca <pipealloc+0xda>
801034f8: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801034ff: 90 nop
80103500 <pipeclose>:
void
pipeclose(struct pipe *p, int writable)
{
80103500: f3 0f 1e fb endbr32
80103504: 55 push %ebp
80103505: 89 e5 mov %esp,%ebp
80103507: 56 push %esi
80103508: 53 push %ebx
80103509: 8b 5d 08 mov 0x8(%ebp),%ebx
8010350c: 8b 75 0c mov 0xc(%ebp),%esi
acquire(&p->lock);
8010350f: 83 ec 0c sub $0xc,%esp
80103512: 53 push %ebx
80103513: e8 68 12 00 00 call 80104780 <acquire>
if(writable){
80103518: 83 c4 10 add $0x10,%esp
8010351b: 85 f6 test %esi,%esi
8010351d: 74 41 je 80103560 <pipeclose+0x60>
p->writeopen = 0;
wakeup(&p->nread);
8010351f: 83 ec 0c sub $0xc,%esp
80103522: 8d 83 34 02 00 00 lea 0x234(%ebx),%eax
p->writeopen = 0;
80103528: c7 83 40 02 00 00 00 movl $0x0,0x240(%ebx)
8010352f: 00 00 00
wakeup(&p->nread);
80103532: 50 push %eax
80103533: e8 a8 0b 00 00 call 801040e0 <wakeup>
80103538: 83 c4 10 add $0x10,%esp
} else {
p->readopen = 0;
wakeup(&p->nwrite);
}
if(p->readopen == 0 && p->writeopen == 0){
8010353b: 8b 93 3c 02 00 00 mov 0x23c(%ebx),%edx
80103541: 85 d2 test %edx,%edx
80103543: 75 0a jne 8010354f <pipeclose+0x4f>
80103545: 8b 83 40 02 00 00 mov 0x240(%ebx),%eax
8010354b: 85 c0 test %eax,%eax
8010354d: 74 31 je 80103580 <pipeclose+0x80>
release(&p->lock);
kfree((char*)p);
} else
release(&p->lock);
8010354f: 89 5d 08 mov %ebx,0x8(%ebp)
}
80103552: 8d 65 f8 lea -0x8(%ebp),%esp
80103555: 5b pop %ebx
80103556: 5e pop %esi
80103557: 5d pop %ebp
release(&p->lock);
80103558: e9 e3 12 00 00 jmp 80104840 <release>
8010355d: 8d 76 00 lea 0x0(%esi),%esi
wakeup(&p->nwrite);
80103560: 83 ec 0c sub $0xc,%esp
80103563: 8d 83 38 02 00 00 lea 0x238(%ebx),%eax
p->readopen = 0;
80103569: c7 83 3c 02 00 00 00 movl $0x0,0x23c(%ebx)
80103570: 00 00 00
wakeup(&p->nwrite);
80103573: 50 push %eax
80103574: e8 67 0b 00 00 call 801040e0 <wakeup>
80103579: 83 c4 10 add $0x10,%esp
8010357c: eb bd jmp 8010353b <pipeclose+0x3b>
8010357e: 66 90 xchg %ax,%ax
release(&p->lock);
80103580: 83 ec 0c sub $0xc,%esp
80103583: 53 push %ebx
80103584: e8 b7 12 00 00 call 80104840 <release>
kfree((char*)p);
80103589: 89 5d 08 mov %ebx,0x8(%ebp)
8010358c: 83 c4 10 add $0x10,%esp
}
8010358f: 8d 65 f8 lea -0x8(%ebp),%esp
80103592: 5b pop %ebx
80103593: 5e pop %esi
80103594: 5d pop %ebp
kfree((char*)p);
80103595: e9 d6 ee ff ff jmp 80102470 <kfree>
8010359a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801035a0 <pipewrite>:
//PAGEBREAK: 40
int
pipewrite(struct pipe *p, char *addr, int n)
{
801035a0: f3 0f 1e fb endbr32
801035a4: 55 push %ebp
801035a5: 89 e5 mov %esp,%ebp
801035a7: 57 push %edi
801035a8: 56 push %esi
801035a9: 53 push %ebx
801035aa: 83 ec 28 sub $0x28,%esp
801035ad: 8b 5d 08 mov 0x8(%ebp),%ebx
int i;
acquire(&p->lock);
801035b0: 53 push %ebx
801035b1: e8 ca 11 00 00 call 80104780 <acquire>
for(i = 0; i < n; i++){
801035b6: 8b 45 10 mov 0x10(%ebp),%eax
801035b9: 83 c4 10 add $0x10,%esp
801035bc: 85 c0 test %eax,%eax
801035be: 0f 8e bc 00 00 00 jle 80103680 <pipewrite+0xe0>
801035c4: 8b 45 0c mov 0xc(%ebp),%eax
801035c7: 8b 8b 38 02 00 00 mov 0x238(%ebx),%ecx
while(p->nwrite == p->nread + PIPESIZE){ //DOC: pipewrite-full
if(p->readopen == 0 || myproc()->killed){
release(&p->lock);
return -1;
}
wakeup(&p->nread);
801035cd: 8d bb 34 02 00 00 lea 0x234(%ebx),%edi
801035d3: 89 45 e4 mov %eax,-0x1c(%ebp)
801035d6: 03 45 10 add 0x10(%ebp),%eax
801035d9: 89 45 e0 mov %eax,-0x20(%ebp)
while(p->nwrite == p->nread + PIPESIZE){ //DOC: pipewrite-full
801035dc: 8b 83 34 02 00 00 mov 0x234(%ebx),%eax
sleep(&p->nwrite, &p->lock); //DOC: pipewrite-sleep
801035e2: 8d b3 38 02 00 00 lea 0x238(%ebx),%esi
while(p->nwrite == p->nread + PIPESIZE){ //DOC: pipewrite-full
801035e8: 89 ca mov %ecx,%edx
801035ea: 05 00 02 00 00 add $0x200,%eax
801035ef: 39 c1 cmp %eax,%ecx
801035f1: 74 3b je 8010362e <pipewrite+0x8e>
801035f3: eb 63 jmp 80103658 <pipewrite+0xb8>
801035f5: 8d 76 00 lea 0x0(%esi),%esi
if(p->readopen == 0 || myproc()->killed){
801035f8: e8 63 03 00 00 call 80103960 <myproc>
801035fd: 8b 48 24 mov 0x24(%eax),%ecx
80103600: 85 c9 test %ecx,%ecx
80103602: 75 34 jne 80103638 <pipewrite+0x98>
wakeup(&p->nread);
80103604: 83 ec 0c sub $0xc,%esp
80103607: 57 push %edi
80103608: e8 d3 0a 00 00 call 801040e0 <wakeup>
sleep(&p->nwrite, &p->lock); //DOC: pipewrite-sleep
8010360d: 58 pop %eax
8010360e: 5a pop %edx
8010360f: 53 push %ebx
80103610: 56 push %esi
80103611: e8 0a 09 00 00 call 80103f20 <sleep>
while(p->nwrite == p->nread + PIPESIZE){ //DOC: pipewrite-full
80103616: 8b 83 34 02 00 00 mov 0x234(%ebx),%eax
8010361c: 8b 93 38 02 00 00 mov 0x238(%ebx),%edx
80103622: 83 c4 10 add $0x10,%esp
80103625: 05 00 02 00 00 add $0x200,%eax
8010362a: 39 c2 cmp %eax,%edx
8010362c: 75 2a jne 80103658 <pipewrite+0xb8>
if(p->readopen == 0 || myproc()->killed){
8010362e: 8b 83 3c 02 00 00 mov 0x23c(%ebx),%eax
80103634: 85 c0 test %eax,%eax
80103636: 75 c0 jne 801035f8 <pipewrite+0x58>
release(&p->lock);
80103638: 83 ec 0c sub $0xc,%esp
8010363b: 53 push %ebx
8010363c: e8 ff 11 00 00 call 80104840 <release>
return -1;
80103641: 83 c4 10 add $0x10,%esp
80103644: b8 ff ff ff ff mov $0xffffffff,%eax
p->data[p->nwrite++ % PIPESIZE] = addr[i];
}
wakeup(&p->nread); //DOC: pipewrite-wakeup1
release(&p->lock);
return n;
}
80103649: 8d 65 f4 lea -0xc(%ebp),%esp
8010364c: 5b pop %ebx
8010364d: 5e pop %esi
8010364e: 5f pop %edi
8010364f: 5d pop %ebp
80103650: c3 ret
80103651: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
p->data[p->nwrite++ % PIPESIZE] = addr[i];
80103658: 8b 75 e4 mov -0x1c(%ebp),%esi
8010365b: 8d 4a 01 lea 0x1(%edx),%ecx
8010365e: 81 e2 ff 01 00 00 and $0x1ff,%edx
80103664: 89 8b 38 02 00 00 mov %ecx,0x238(%ebx)
8010366a: 0f b6 06 movzbl (%esi),%eax
8010366d: 83 c6 01 add $0x1,%esi
80103670: 89 75 e4 mov %esi,-0x1c(%ebp)
80103673: 88 44 13 34 mov %al,0x34(%ebx,%edx,1)
for(i = 0; i < n; i++){
80103677: 3b 75 e0 cmp -0x20(%ebp),%esi
8010367a: 0f 85 5c ff ff ff jne 801035dc <pipewrite+0x3c>
wakeup(&p->nread); //DOC: pipewrite-wakeup1
80103680: 83 ec 0c sub $0xc,%esp
80103683: 8d 83 34 02 00 00 lea 0x234(%ebx),%eax
80103689: 50 push %eax
8010368a: e8 51 0a 00 00 call 801040e0 <wakeup>
release(&p->lock);
8010368f: 89 1c 24 mov %ebx,(%esp)
80103692: e8 a9 11 00 00 call 80104840 <release>
return n;
80103697: 8b 45 10 mov 0x10(%ebp),%eax
8010369a: 83 c4 10 add $0x10,%esp
8010369d: eb aa jmp 80103649 <pipewrite+0xa9>
8010369f: 90 nop
801036a0 <piperead>:
int
piperead(struct pipe *p, char *addr, int n)
{
801036a0: f3 0f 1e fb endbr32
801036a4: 55 push %ebp
801036a5: 89 e5 mov %esp,%ebp
801036a7: 57 push %edi
801036a8: 56 push %esi
801036a9: 53 push %ebx
801036aa: 83 ec 18 sub $0x18,%esp
801036ad: 8b 75 08 mov 0x8(%ebp),%esi
801036b0: 8b 7d 0c mov 0xc(%ebp),%edi
int i;
acquire(&p->lock);
801036b3: 56 push %esi
801036b4: 8d 9e 34 02 00 00 lea 0x234(%esi),%ebx
801036ba: e8 c1 10 00 00 call 80104780 <acquire>
while(p->nread == p->nwrite && p->writeopen){ //DOC: pipe-empty
801036bf: 8b 86 34 02 00 00 mov 0x234(%esi),%eax
801036c5: 83 c4 10 add $0x10,%esp
801036c8: 39 86 38 02 00 00 cmp %eax,0x238(%esi)
801036ce: 74 33 je 80103703 <piperead+0x63>
801036d0: eb 3b jmp 8010370d <piperead+0x6d>
801036d2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
if(myproc()->killed){
801036d8: e8 83 02 00 00 call 80103960 <myproc>
801036dd: 8b 48 24 mov 0x24(%eax),%ecx
801036e0: 85 c9 test %ecx,%ecx
801036e2: 0f 85 88 00 00 00 jne 80103770 <piperead+0xd0>
release(&p->lock);
return -1;
}
sleep(&p->nread, &p->lock); //DOC: piperead-sleep
801036e8: 83 ec 08 sub $0x8,%esp
801036eb: 56 push %esi
801036ec: 53 push %ebx
801036ed: e8 2e 08 00 00 call 80103f20 <sleep>
while(p->nread == p->nwrite && p->writeopen){ //DOC: pipe-empty
801036f2: 8b 86 38 02 00 00 mov 0x238(%esi),%eax
801036f8: 83 c4 10 add $0x10,%esp
801036fb: 39 86 34 02 00 00 cmp %eax,0x234(%esi)
80103701: 75 0a jne 8010370d <piperead+0x6d>
80103703: 8b 86 40 02 00 00 mov 0x240(%esi),%eax
80103709: 85 c0 test %eax,%eax
8010370b: 75 cb jne 801036d8 <piperead+0x38>
}
for(i = 0; i < n; i++){ //DOC: piperead-copy
8010370d: 8b 55 10 mov 0x10(%ebp),%edx
80103710: 31 db xor %ebx,%ebx
80103712: 85 d2 test %edx,%edx
80103714: 7f 28 jg 8010373e <piperead+0x9e>
80103716: eb 34 jmp 8010374c <piperead+0xac>
80103718: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010371f: 90 nop
if(p->nread == p->nwrite)
break;
addr[i] = p->data[p->nread++ % PIPESIZE];
80103720: 8d 48 01 lea 0x1(%eax),%ecx
80103723: 25 ff 01 00 00 and $0x1ff,%eax
80103728: 89 8e 34 02 00 00 mov %ecx,0x234(%esi)
8010372e: 0f b6 44 06 34 movzbl 0x34(%esi,%eax,1),%eax
80103733: 88 04 1f mov %al,(%edi,%ebx,1)
for(i = 0; i < n; i++){ //DOC: piperead-copy
80103736: 83 c3 01 add $0x1,%ebx
80103739: 39 5d 10 cmp %ebx,0x10(%ebp)
8010373c: 74 0e je 8010374c <piperead+0xac>
if(p->nread == p->nwrite)
8010373e: 8b 86 34 02 00 00 mov 0x234(%esi),%eax
80103744: 3b 86 38 02 00 00 cmp 0x238(%esi),%eax
8010374a: 75 d4 jne 80103720 <piperead+0x80>
}
wakeup(&p->nwrite); //DOC: piperead-wakeup
8010374c: 83 ec 0c sub $0xc,%esp
8010374f: 8d 86 38 02 00 00 lea 0x238(%esi),%eax
80103755: 50 push %eax
80103756: e8 85 09 00 00 call 801040e0 <wakeup>
release(&p->lock);
8010375b: 89 34 24 mov %esi,(%esp)
8010375e: e8 dd 10 00 00 call 80104840 <release>
return i;
80103763: 83 c4 10 add $0x10,%esp
}
80103766: 8d 65 f4 lea -0xc(%ebp),%esp
80103769: 89 d8 mov %ebx,%eax
8010376b: 5b pop %ebx
8010376c: 5e pop %esi
8010376d: 5f pop %edi
8010376e: 5d pop %ebp
8010376f: c3 ret
release(&p->lock);
80103770: 83 ec 0c sub $0xc,%esp
return -1;
80103773: bb ff ff ff ff mov $0xffffffff,%ebx
release(&p->lock);
80103778: 56 push %esi
80103779: e8 c2 10 00 00 call 80104840 <release>
return -1;
8010377e: 83 c4 10 add $0x10,%esp
}
80103781: 8d 65 f4 lea -0xc(%ebp),%esp
80103784: 89 d8 mov %ebx,%eax
80103786: 5b pop %ebx
80103787: 5e pop %esi
80103788: 5f pop %edi
80103789: 5d pop %ebp
8010378a: c3 ret
8010378b: 66 90 xchg %ax,%ax
8010378d: 66 90 xchg %ax,%ax
8010378f: 90 nop
80103790 <allocproc>:
// If found, change state to EMBRYO and initialize
// state required to run in the kernel.
// Otherwise return 0.
static struct proc*
allocproc(void)
{
80103790: 55 push %ebp
80103791: 89 e5 mov %esp,%ebp
80103793: 53 push %ebx
struct proc *p;
char *sp;
acquire(&ptable.lock);
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
80103794: bb 14 37 11 80 mov $0x80113714,%ebx
{
80103799: 83 ec 10 sub $0x10,%esp
acquire(&ptable.lock);
8010379c: 68 e0 36 11 80 push $0x801136e0
801037a1: e8 da 0f 00 00 call 80104780 <acquire>
801037a6: 83 c4 10 add $0x10,%esp
801037a9: eb 10 jmp 801037bb <allocproc+0x2b>
801037ab: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801037af: 90 nop
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
801037b0: 83 eb 80 sub $0xffffff80,%ebx
801037b3: 81 fb 14 57 11 80 cmp $0x80115714,%ebx
801037b9: 74 75 je 80103830 <allocproc+0xa0>
if(p->state == UNUSED)
801037bb: 8b 43 0c mov 0xc(%ebx),%eax
801037be: 85 c0 test %eax,%eax
801037c0: 75 ee jne 801037b0 <allocproc+0x20>
release(&ptable.lock);
return 0;
found:
p->state = EMBRYO;
p->pid = nextpid++;
801037c2: a1 04 a0 10 80 mov 0x8010a004,%eax
release(&ptable.lock);
801037c7: 83 ec 0c sub $0xc,%esp
p->state = EMBRYO;
801037ca: c7 43 0c 01 00 00 00 movl $0x1,0xc(%ebx)
p->pid = nextpid++;
801037d1: 89 43 10 mov %eax,0x10(%ebx)
801037d4: 8d 50 01 lea 0x1(%eax),%edx
release(&ptable.lock);
801037d7: 68 e0 36 11 80 push $0x801136e0
p->pid = nextpid++;
801037dc: 89 15 04 a0 10 80 mov %edx,0x8010a004
release(&ptable.lock);
801037e2: e8 59 10 00 00 call 80104840 <release>
// Allocate kernel stack.
if((p->kstack = kalloc()) == 0){
801037e7: e8 44 ee ff ff call 80102630 <kalloc>
801037ec: 83 c4 10 add $0x10,%esp
801037ef: 89 43 08 mov %eax,0x8(%ebx)
801037f2: 85 c0 test %eax,%eax
801037f4: 74 53 je 80103849 <allocproc+0xb9>
return 0;
}
sp = p->kstack + KSTACKSIZE;
// Leave room for trap frame.
sp -= sizeof *p->tf;
801037f6: 8d 90 b4 0f 00 00 lea 0xfb4(%eax),%edx
sp -= 4;
*(uint*)sp = (uint)trapret;
sp -= sizeof *p->context;
p->context = (struct context*)sp;
memset(p->context, 0, sizeof *p->context);
801037fc: 83 ec 04 sub $0x4,%esp
sp -= sizeof *p->context;
801037ff: 05 9c 0f 00 00 add $0xf9c,%eax
sp -= sizeof *p->tf;
80103804: 89 53 18 mov %edx,0x18(%ebx)
*(uint*)sp = (uint)trapret;
80103807: c7 40 14 4a 5b 10 80 movl $0x80105b4a,0x14(%eax)
p->context = (struct context*)sp;
8010380e: 89 43 1c mov %eax,0x1c(%ebx)
memset(p->context, 0, sizeof *p->context);
80103811: 6a 14 push $0x14
80103813: 6a 00 push $0x0
80103815: 50 push %eax
80103816: e8 75 10 00 00 call 80104890 <memset>
p->context->eip = (uint)forkret;
8010381b: 8b 43 1c mov 0x1c(%ebx),%eax
return p;
8010381e: 83 c4 10 add $0x10,%esp
p->context->eip = (uint)forkret;
80103821: c7 40 10 60 38 10 80 movl $0x80103860,0x10(%eax)
}
80103828: 89 d8 mov %ebx,%eax
8010382a: 8b 5d fc mov -0x4(%ebp),%ebx
8010382d: c9 leave
8010382e: c3 ret
8010382f: 90 nop
release(&ptable.lock);
80103830: 83 ec 0c sub $0xc,%esp
return 0;
80103833: 31 db xor %ebx,%ebx
release(&ptable.lock);
80103835: 68 e0 36 11 80 push $0x801136e0
8010383a: e8 01 10 00 00 call 80104840 <release>
}
8010383f: 89 d8 mov %ebx,%eax
return 0;
80103841: 83 c4 10 add $0x10,%esp
}
80103844: 8b 5d fc mov -0x4(%ebp),%ebx
80103847: c9 leave
80103848: c3 ret
p->state = UNUSED;
80103849: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
return 0;
80103850: 31 db xor %ebx,%ebx
}
80103852: 89 d8 mov %ebx,%eax
80103854: 8b 5d fc mov -0x4(%ebp),%ebx
80103857: c9 leave
80103858: c3 ret
80103859: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80103860 <forkret>:
// A fork child's very first scheduling by scheduler()
// will swtch here. "Return" to user space.
void
forkret(void)
{
80103860: f3 0f 1e fb endbr32
80103864: 55 push %ebp
80103865: 89 e5 mov %esp,%ebp
80103867: 83 ec 14 sub $0x14,%esp
static int first = 1;
// Still holding ptable.lock from scheduler.
release(&ptable.lock);
8010386a: 68 e0 36 11 80 push $0x801136e0
8010386f: e8 cc 0f 00 00 call 80104840 <release>
if (first) {
80103874: a1 00 a0 10 80 mov 0x8010a000,%eax
80103879: 83 c4 10 add $0x10,%esp
8010387c: 85 c0 test %eax,%eax
8010387e: 75 08 jne 80103888 <forkret+0x28>
iinit(ROOTDEV);
initlog(ROOTDEV);
}
// Return to "caller", actually trapret (see allocproc).
}
80103880: c9 leave
80103881: c3 ret
80103882: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
first = 0;
80103888: c7 05 00 a0 10 80 00 movl $0x0,0x8010a000
8010388f: 00 00 00
iinit(ROOTDEV);
80103892: 83 ec 0c sub $0xc,%esp
80103895: 6a 01 push $0x1
80103897: e8 a4 dc ff ff call 80101540 <iinit>
initlog(ROOTDEV);
8010389c: c7 04 24 01 00 00 00 movl $0x1,(%esp)
801038a3: e8 e8 f3 ff ff call 80102c90 <initlog>
}
801038a8: 83 c4 10 add $0x10,%esp
801038ab: c9 leave
801038ac: c3 ret
801038ad: 8d 76 00 lea 0x0(%esi),%esi
801038b0 <pinit>:
{
801038b0: f3 0f 1e fb endbr32
801038b4: 55 push %ebp
801038b5: 89 e5 mov %esp,%ebp
801038b7: 83 ec 10 sub $0x10,%esp
initlock(&ptable.lock, "ptable");
801038ba: 68 c0 7a 10 80 push $0x80107ac0
801038bf: 68 e0 36 11 80 push $0x801136e0
801038c4: e8 37 0d 00 00 call 80104600 <initlock>
}
801038c9: 83 c4 10 add $0x10,%esp
801038cc: c9 leave
801038cd: c3 ret
801038ce: 66 90 xchg %ax,%ax
801038d0 <mycpu>:
{
801038d0: f3 0f 1e fb endbr32
801038d4: 55 push %ebp
801038d5: 89 e5 mov %esp,%ebp
801038d7: 56 push %esi
801038d8: 53 push %ebx
asm volatile("pushfl; popl %0" : "=r" (eflags));
801038d9: 9c pushf
801038da: 58 pop %eax
if(readeflags()&FL_IF)
801038db: f6 c4 02 test $0x2,%ah
801038de: 75 4a jne 8010392a <mycpu+0x5a>
apicid = lapicid();
801038e0: e8 bb ef ff ff call 801028a0 <lapicid>
for (i = 0; i < ncpu; ++i) {
801038e5: 8b 35 c0 36 11 80 mov 0x801136c0,%esi
apicid = lapicid();
801038eb: 89 c3 mov %eax,%ebx
for (i = 0; i < ncpu; ++i) {
801038ed: 85 f6 test %esi,%esi
801038ef: 7e 2c jle 8010391d <mycpu+0x4d>
801038f1: 31 d2 xor %edx,%edx
801038f3: eb 0a jmp 801038ff <mycpu+0x2f>
801038f5: 8d 76 00 lea 0x0(%esi),%esi
801038f8: 83 c2 01 add $0x1,%edx
801038fb: 39 f2 cmp %esi,%edx
801038fd: 74 1e je 8010391d <mycpu+0x4d>
if (cpus[i].apicid == apicid)
801038ff: 69 ca b0 00 00 00 imul $0xb0,%edx,%ecx
80103905: 0f b6 81 40 31 11 80 movzbl -0x7feecec0(%ecx),%eax
8010390c: 39 d8 cmp %ebx,%eax
8010390e: 75 e8 jne 801038f8 <mycpu+0x28>
}
80103910: 8d 65 f8 lea -0x8(%ebp),%esp
return &cpus[i];
80103913: 8d 81 40 31 11 80 lea -0x7feecec0(%ecx),%eax
}
80103919: 5b pop %ebx
8010391a: 5e pop %esi
8010391b: 5d pop %ebp
8010391c: c3 ret
panic("unknown apicid\n");
8010391d: 83 ec 0c sub $0xc,%esp
80103920: 68 c7 7a 10 80 push $0x80107ac7
80103925: e8 66 ca ff ff call 80100390 <panic>
panic("mycpu called with interrupts enabled\n");
8010392a: 83 ec 0c sub $0xc,%esp
8010392d: 68 a4 7b 10 80 push $0x80107ba4
80103932: e8 59 ca ff ff call 80100390 <panic>
80103937: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010393e: 66 90 xchg %ax,%ax
80103940 <cpuid>:
cpuid() {
80103940: f3 0f 1e fb endbr32
80103944: 55 push %ebp
80103945: 89 e5 mov %esp,%ebp
80103947: 83 ec 08 sub $0x8,%esp
return mycpu()-cpus;
8010394a: e8 81 ff ff ff call 801038d0 <mycpu>
}
8010394f: c9 leave
return mycpu()-cpus;
80103950: 2d 40 31 11 80 sub $0x80113140,%eax
80103955: c1 f8 04 sar $0x4,%eax
80103958: 69 c0 a3 8b 2e ba imul $0xba2e8ba3,%eax,%eax
}
8010395e: c3 ret
8010395f: 90 nop
80103960 <myproc>:
myproc(void) {
80103960: f3 0f 1e fb endbr32
80103964: 55 push %ebp
80103965: 89 e5 mov %esp,%ebp
80103967: 53 push %ebx
80103968: 83 ec 04 sub $0x4,%esp
pushcli();
8010396b: e8 10 0d 00 00 call 80104680 <pushcli>
c = mycpu();
80103970: e8 5b ff ff ff call 801038d0 <mycpu>
p = c->proc;
80103975: 8b 98 ac 00 00 00 mov 0xac(%eax),%ebx
popcli();
8010397b: e8 50 0d 00 00 call 801046d0 <popcli>
}
80103980: 83 c4 04 add $0x4,%esp
80103983: 89 d8 mov %ebx,%eax
80103985: 5b pop %ebx
80103986: 5d pop %ebp
80103987: c3 ret
80103988: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010398f: 90 nop
80103990 <userinit>:
{
80103990: f3 0f 1e fb endbr32
80103994: 55 push %ebp
80103995: 89 e5 mov %esp,%ebp
80103997: 53 push %ebx
80103998: 83 ec 04 sub $0x4,%esp
p = allocproc();
8010399b: e8 f0 fd ff ff call 80103790 <allocproc>
801039a0: 89 c3 mov %eax,%ebx
initproc = p;
801039a2: a3 b8 a5 10 80 mov %eax,0x8010a5b8
if((p->pgdir = setupkvm()) == 0)
801039a7: e8 64 37 00 00 call 80107110 <setupkvm>
801039ac: 89 43 04 mov %eax,0x4(%ebx)
801039af: 85 c0 test %eax,%eax
801039b1: 0f 84 bd 00 00 00 je 80103a74 <userinit+0xe4>
inituvm(p->pgdir, _binary_initcode_start, (int)_binary_initcode_size);
801039b7: 83 ec 04 sub $0x4,%esp
801039ba: 68 2c 00 00 00 push $0x2c
801039bf: 68 64 a4 10 80 push $0x8010a464
801039c4: 50 push %eax
801039c5: e8 16 34 00 00 call 80106de0 <inituvm>
memset(p->tf, 0, sizeof(*p->tf));
801039ca: 83 c4 0c add $0xc,%esp
p->sz = PGSIZE;
801039cd: c7 03 00 10 00 00 movl $0x1000,(%ebx)
memset(p->tf, 0, sizeof(*p->tf));
801039d3: 6a 4c push $0x4c
801039d5: 6a 00 push $0x0
801039d7: ff 73 18 pushl 0x18(%ebx)
801039da: e8 b1 0e 00 00 call 80104890 <memset>
p->tf->cs = (SEG_UCODE << 3) | DPL_USER;
801039df: 8b 43 18 mov 0x18(%ebx),%eax
801039e2: ba 1b 00 00 00 mov $0x1b,%edx
safestrcpy(p->name, "initcode", sizeof(p->name));
801039e7: 83 c4 0c add $0xc,%esp
p->tf->ds = (SEG_UDATA << 3) | DPL_USER;
801039ea: b9 23 00 00 00 mov $0x23,%ecx
p->tf->cs = (SEG_UCODE << 3) | DPL_USER;
801039ef: 66 89 50 3c mov %dx,0x3c(%eax)
p->tf->ds = (SEG_UDATA << 3) | DPL_USER;
801039f3: 8b 43 18 mov 0x18(%ebx),%eax
801039f6: 66 89 48 2c mov %cx,0x2c(%eax)
p->tf->es = p->tf->ds;
801039fa: 8b 43 18 mov 0x18(%ebx),%eax
801039fd: 0f b7 50 2c movzwl 0x2c(%eax),%edx
80103a01: 66 89 50 28 mov %dx,0x28(%eax)
p->tf->ss = p->tf->ds;
80103a05: 8b 43 18 mov 0x18(%ebx),%eax
80103a08: 0f b7 50 2c movzwl 0x2c(%eax),%edx
80103a0c: 66 89 50 48 mov %dx,0x48(%eax)
p->tf->eflags = FL_IF;
80103a10: 8b 43 18 mov 0x18(%ebx),%eax
80103a13: c7 40 40 00 02 00 00 movl $0x200,0x40(%eax)
p->tf->esp = PGSIZE;
80103a1a: 8b 43 18 mov 0x18(%ebx),%eax
80103a1d: c7 40 44 00 10 00 00 movl $0x1000,0x44(%eax)
p->tf->eip = 0; // beginning of initcode.S
80103a24: 8b 43 18 mov 0x18(%ebx),%eax
80103a27: c7 40 38 00 00 00 00 movl $0x0,0x38(%eax)
safestrcpy(p->name, "initcode", sizeof(p->name));
80103a2e: 8d 43 6c lea 0x6c(%ebx),%eax
80103a31: 6a 10 push $0x10
80103a33: 68 f0 7a 10 80 push $0x80107af0
80103a38: 50 push %eax
80103a39: e8 12 10 00 00 call 80104a50 <safestrcpy>
p->cwd = namei("/");
80103a3e: c7 04 24 f9 7a 10 80 movl $0x80107af9,(%esp)
80103a45: e8 e6 e5 ff ff call 80102030 <namei>
80103a4a: 89 43 68 mov %eax,0x68(%ebx)
acquire(&ptable.lock);
80103a4d: c7 04 24 e0 36 11 80 movl $0x801136e0,(%esp)
80103a54: e8 27 0d 00 00 call 80104780 <acquire>
p->state = RUNNABLE;
80103a59: c7 43 0c 03 00 00 00 movl $0x3,0xc(%ebx)
release(&ptable.lock);
80103a60: c7 04 24 e0 36 11 80 movl $0x801136e0,(%esp)
80103a67: e8 d4 0d 00 00 call 80104840 <release>
}
80103a6c: 8b 5d fc mov -0x4(%ebp),%ebx
80103a6f: 83 c4 10 add $0x10,%esp
80103a72: c9 leave
80103a73: c3 ret
panic("userinit: out of memory?");
80103a74: 83 ec 0c sub $0xc,%esp
80103a77: 68 d7 7a 10 80 push $0x80107ad7
80103a7c: e8 0f c9 ff ff call 80100390 <panic>
80103a81: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80103a88: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80103a8f: 90 nop
80103a90 <growproc>:
{
80103a90: f3 0f 1e fb endbr32
80103a94: 55 push %ebp
80103a95: 89 e5 mov %esp,%ebp
80103a97: 56 push %esi
80103a98: 53 push %ebx
80103a99: 8b 75 08 mov 0x8(%ebp),%esi
pushcli();
80103a9c: e8 df 0b 00 00 call 80104680 <pushcli>
c = mycpu();
80103aa1: e8 2a fe ff ff call 801038d0 <mycpu>
p = c->proc;
80103aa6: 8b 98 ac 00 00 00 mov 0xac(%eax),%ebx
popcli();
80103aac: e8 1f 0c 00 00 call 801046d0 <popcli>
sz = curproc->sz;
80103ab1: 8b 03 mov (%ebx),%eax
if(n > 0){
80103ab3: 85 f6 test %esi,%esi
80103ab5: 7f 19 jg 80103ad0 <growproc+0x40>
} else if(n < 0){
80103ab7: 75 37 jne 80103af0 <growproc+0x60>
switchuvm(curproc);
80103ab9: 83 ec 0c sub $0xc,%esp
curproc->sz = sz;
80103abc: 89 03 mov %eax,(%ebx)
switchuvm(curproc);
80103abe: 53 push %ebx
80103abf: e8 0c 32 00 00 call 80106cd0 <switchuvm>
return 0;
80103ac4: 83 c4 10 add $0x10,%esp
80103ac7: 31 c0 xor %eax,%eax
}
80103ac9: 8d 65 f8 lea -0x8(%ebp),%esp
80103acc: 5b pop %ebx
80103acd: 5e pop %esi
80103ace: 5d pop %ebp
80103acf: c3 ret
if((sz = allocuvm(curproc->pgdir, sz, sz + n)) == 0)
80103ad0: 83 ec 04 sub $0x4,%esp
80103ad3: 01 c6 add %eax,%esi
80103ad5: 56 push %esi
80103ad6: 50 push %eax
80103ad7: ff 73 04 pushl 0x4(%ebx)
80103ada: e8 51 34 00 00 call 80106f30 <allocuvm>
80103adf: 83 c4 10 add $0x10,%esp
80103ae2: 85 c0 test %eax,%eax
80103ae4: 75 d3 jne 80103ab9 <growproc+0x29>
return -1;
80103ae6: b8 ff ff ff ff mov $0xffffffff,%eax
80103aeb: eb dc jmp 80103ac9 <growproc+0x39>
80103aed: 8d 76 00 lea 0x0(%esi),%esi
if((sz = deallocuvm(curproc->pgdir, sz, sz + n)) == 0)
80103af0: 83 ec 04 sub $0x4,%esp
80103af3: 01 c6 add %eax,%esi
80103af5: 56 push %esi
80103af6: 50 push %eax
80103af7: ff 73 04 pushl 0x4(%ebx)
80103afa: e8 61 35 00 00 call 80107060 <deallocuvm>
80103aff: 83 c4 10 add $0x10,%esp
80103b02: 85 c0 test %eax,%eax
80103b04: 75 b3 jne 80103ab9 <growproc+0x29>
80103b06: eb de jmp 80103ae6 <growproc+0x56>
80103b08: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80103b0f: 90 nop
80103b10 <fork>:
{
80103b10: f3 0f 1e fb endbr32
80103b14: 55 push %ebp
80103b15: 89 e5 mov %esp,%ebp
80103b17: 57 push %edi
80103b18: 56 push %esi
80103b19: 53 push %ebx
80103b1a: 83 ec 1c sub $0x1c,%esp
pushcli();
80103b1d: e8 5e 0b 00 00 call 80104680 <pushcli>
c = mycpu();
80103b22: e8 a9 fd ff ff call 801038d0 <mycpu>
p = c->proc;
80103b27: 8b 98 ac 00 00 00 mov 0xac(%eax),%ebx
popcli();
80103b2d: e8 9e 0b 00 00 call 801046d0 <popcli>
if((np = allocproc()) == 0){
80103b32: e8 59 fc ff ff call 80103790 <allocproc>
80103b37: 89 45 e4 mov %eax,-0x1c(%ebp)
80103b3a: 85 c0 test %eax,%eax
80103b3c: 0f 84 bb 00 00 00 je 80103bfd <fork+0xed>
if((np->pgdir = copyuvm(curproc->pgdir, curproc->sz)) == 0){
80103b42: 83 ec 08 sub $0x8,%esp
80103b45: ff 33 pushl (%ebx)
80103b47: 89 c7 mov %eax,%edi
80103b49: ff 73 04 pushl 0x4(%ebx)
80103b4c: e8 8f 36 00 00 call 801071e0 <copyuvm>
80103b51: 83 c4 10 add $0x10,%esp
80103b54: 89 47 04 mov %eax,0x4(%edi)
80103b57: 85 c0 test %eax,%eax
80103b59: 0f 84 a5 00 00 00 je 80103c04 <fork+0xf4>
np->sz = curproc->sz;
80103b5f: 8b 03 mov (%ebx),%eax
80103b61: 8b 4d e4 mov -0x1c(%ebp),%ecx
80103b64: 89 01 mov %eax,(%ecx)
*np->tf = *curproc->tf;
80103b66: 8b 79 18 mov 0x18(%ecx),%edi
np->parent = curproc;
80103b69: 89 c8 mov %ecx,%eax
80103b6b: 89 59 14 mov %ebx,0x14(%ecx)
*np->tf = *curproc->tf;
80103b6e: b9 13 00 00 00 mov $0x13,%ecx
80103b73: 8b 73 18 mov 0x18(%ebx),%esi
80103b76: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
for(i = 0; i < NOFILE; i++)
80103b78: 31 f6 xor %esi,%esi
np->tf->eax = 0;
80103b7a: 8b 40 18 mov 0x18(%eax),%eax
80103b7d: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax)
for(i = 0; i < NOFILE; i++)
80103b84: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if(curproc->ofile[i])
80103b88: 8b 44 b3 28 mov 0x28(%ebx,%esi,4),%eax
80103b8c: 85 c0 test %eax,%eax
80103b8e: 74 13 je 80103ba3 <fork+0x93>
np->ofile[i] = filedup(curproc->ofile[i]);
80103b90: 83 ec 0c sub $0xc,%esp
80103b93: 50 push %eax
80103b94: e8 d7 d2 ff ff call 80100e70 <filedup>
80103b99: 8b 55 e4 mov -0x1c(%ebp),%edx
80103b9c: 83 c4 10 add $0x10,%esp
80103b9f: 89 44 b2 28 mov %eax,0x28(%edx,%esi,4)
for(i = 0; i < NOFILE; i++)
80103ba3: 83 c6 01 add $0x1,%esi
80103ba6: 83 fe 10 cmp $0x10,%esi
80103ba9: 75 dd jne 80103b88 <fork+0x78>
np->cwd = idup(curproc->cwd);
80103bab: 83 ec 0c sub $0xc,%esp
80103bae: ff 73 68 pushl 0x68(%ebx)
safestrcpy(np->name, curproc->name, sizeof(curproc->name));
80103bb1: 83 c3 6c add $0x6c,%ebx
np->cwd = idup(curproc->cwd);
80103bb4: e8 77 db ff ff call 80101730 <idup>
80103bb9: 8b 7d e4 mov -0x1c(%ebp),%edi
safestrcpy(np->name, curproc->name, sizeof(curproc->name));
80103bbc: 83 c4 0c add $0xc,%esp
np->cwd = idup(curproc->cwd);
80103bbf: 89 47 68 mov %eax,0x68(%edi)
safestrcpy(np->name, curproc->name, sizeof(curproc->name));
80103bc2: 8d 47 6c lea 0x6c(%edi),%eax
80103bc5: 6a 10 push $0x10
80103bc7: 53 push %ebx
80103bc8: 50 push %eax
80103bc9: e8 82 0e 00 00 call 80104a50 <safestrcpy>
pid = np->pid;
80103bce: 8b 5f 10 mov 0x10(%edi),%ebx
acquire(&ptable.lock);
80103bd1: c7 04 24 e0 36 11 80 movl $0x801136e0,(%esp)
80103bd8: e8 a3 0b 00 00 call 80104780 <acquire>
np->state = RUNNABLE;
80103bdd: c7 47 0c 03 00 00 00 movl $0x3,0xc(%edi)
release(&ptable.lock);
80103be4: c7 04 24 e0 36 11 80 movl $0x801136e0,(%esp)
80103beb: e8 50 0c 00 00 call 80104840 <release>
return pid;
80103bf0: 83 c4 10 add $0x10,%esp
}
80103bf3: 8d 65 f4 lea -0xc(%ebp),%esp
80103bf6: 89 d8 mov %ebx,%eax
80103bf8: 5b pop %ebx
80103bf9: 5e pop %esi
80103bfa: 5f pop %edi
80103bfb: 5d pop %ebp
80103bfc: c3 ret
return -1;
80103bfd: bb ff ff ff ff mov $0xffffffff,%ebx
80103c02: eb ef jmp 80103bf3 <fork+0xe3>
kfree(np->kstack);
80103c04: 8b 5d e4 mov -0x1c(%ebp),%ebx
80103c07: 83 ec 0c sub $0xc,%esp
80103c0a: ff 73 08 pushl 0x8(%ebx)
80103c0d: e8 5e e8 ff ff call 80102470 <kfree>
np->kstack = 0;
80103c12: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
return -1;
80103c19: 83 c4 10 add $0x10,%esp
np->state = UNUSED;
80103c1c: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
return -1;
80103c23: bb ff ff ff ff mov $0xffffffff,%ebx
80103c28: eb c9 jmp 80103bf3 <fork+0xe3>
80103c2a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80103c30 <scheduler>:
{
80103c30: f3 0f 1e fb endbr32
80103c34: 55 push %ebp
80103c35: 89 e5 mov %esp,%ebp
80103c37: 57 push %edi
80103c38: 56 push %esi
80103c39: 53 push %ebx
80103c3a: 83 ec 0c sub $0xc,%esp
struct cpu *c = mycpu();
80103c3d: e8 8e fc ff ff call 801038d0 <mycpu>
c->proc = 0;
80103c42: c7 80 ac 00 00 00 00 movl $0x0,0xac(%eax)
80103c49: 00 00 00
struct cpu *c = mycpu();
80103c4c: 89 c6 mov %eax,%esi
c->proc = 0;
80103c4e: 8d 78 04 lea 0x4(%eax),%edi
80103c51: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
asm volatile("sti");
80103c58: fb sti
acquire(&ptable.lock);
80103c59: 83 ec 0c sub $0xc,%esp
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80103c5c: bb 14 37 11 80 mov $0x80113714,%ebx
acquire(&ptable.lock);
80103c61: 68 e0 36 11 80 push $0x801136e0
80103c66: e8 15 0b 00 00 call 80104780 <acquire>
80103c6b: 83 c4 10 add $0x10,%esp
80103c6e: 66 90 xchg %ax,%ax
if(p->state != RUNNABLE)
80103c70: 83 7b 0c 03 cmpl $0x3,0xc(%ebx)
80103c74: 75 33 jne 80103ca9 <scheduler+0x79>
switchuvm(p);
80103c76: 83 ec 0c sub $0xc,%esp
c->proc = p;
80103c79: 89 9e ac 00 00 00 mov %ebx,0xac(%esi)
switchuvm(p);
80103c7f: 53 push %ebx
80103c80: e8 4b 30 00 00 call 80106cd0 <switchuvm>
swtch(&(c->scheduler), p->context);
80103c85: 58 pop %eax
80103c86: 5a pop %edx
80103c87: ff 73 1c pushl 0x1c(%ebx)
80103c8a: 57 push %edi
p->state = RUNNING;
80103c8b: c7 43 0c 04 00 00 00 movl $0x4,0xc(%ebx)
swtch(&(c->scheduler), p->context);
80103c92: e8 1c 0e 00 00 call 80104ab3 <swtch>
switchkvm();
80103c97: e8 14 30 00 00 call 80106cb0 <switchkvm>
c->proc = 0;
80103c9c: 83 c4 10 add $0x10,%esp
80103c9f: c7 86 ac 00 00 00 00 movl $0x0,0xac(%esi)
80103ca6: 00 00 00
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80103ca9: 83 eb 80 sub $0xffffff80,%ebx
80103cac: 81 fb 14 57 11 80 cmp $0x80115714,%ebx
80103cb2: 75 bc jne 80103c70 <scheduler+0x40>
release(&ptable.lock);
80103cb4: 83 ec 0c sub $0xc,%esp
80103cb7: 68 e0 36 11 80 push $0x801136e0
80103cbc: e8 7f 0b 00 00 call 80104840 <release>
sti();
80103cc1: 83 c4 10 add $0x10,%esp
80103cc4: eb 92 jmp 80103c58 <scheduler+0x28>
80103cc6: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80103ccd: 8d 76 00 lea 0x0(%esi),%esi
80103cd0 <sched>:
{
80103cd0: f3 0f 1e fb endbr32
80103cd4: 55 push %ebp
80103cd5: 89 e5 mov %esp,%ebp
80103cd7: 56 push %esi
80103cd8: 53 push %ebx
pushcli();
80103cd9: e8 a2 09 00 00 call 80104680 <pushcli>
c = mycpu();
80103cde: e8 ed fb ff ff call 801038d0 <mycpu>
p = c->proc;
80103ce3: 8b 98 ac 00 00 00 mov 0xac(%eax),%ebx
popcli();
80103ce9: e8 e2 09 00 00 call 801046d0 <popcli>
if(!holding(&ptable.lock))
80103cee: 83 ec 0c sub $0xc,%esp
80103cf1: 68 e0 36 11 80 push $0x801136e0
80103cf6: e8 35 0a 00 00 call 80104730 <holding>
80103cfb: 83 c4 10 add $0x10,%esp
80103cfe: 85 c0 test %eax,%eax
80103d00: 74 4f je 80103d51 <sched+0x81>
if(mycpu()->ncli != 1)
80103d02: e8 c9 fb ff ff call 801038d0 <mycpu>
80103d07: 83 b8 a4 00 00 00 01 cmpl $0x1,0xa4(%eax)
80103d0e: 75 68 jne 80103d78 <sched+0xa8>
if(p->state == RUNNING)
80103d10: 83 7b 0c 04 cmpl $0x4,0xc(%ebx)
80103d14: 74 55 je 80103d6b <sched+0x9b>
asm volatile("pushfl; popl %0" : "=r" (eflags));
80103d16: 9c pushf
80103d17: 58 pop %eax
if(readeflags()&FL_IF)
80103d18: f6 c4 02 test $0x2,%ah
80103d1b: 75 41 jne 80103d5e <sched+0x8e>
intena = mycpu()->intena;
80103d1d: e8 ae fb ff ff call 801038d0 <mycpu>
swtch(&p->context, mycpu()->scheduler);
80103d22: 83 c3 1c add $0x1c,%ebx
intena = mycpu()->intena;
80103d25: 8b b0 a8 00 00 00 mov 0xa8(%eax),%esi
swtch(&p->context, mycpu()->scheduler);
80103d2b: e8 a0 fb ff ff call 801038d0 <mycpu>
80103d30: 83 ec 08 sub $0x8,%esp
80103d33: ff 70 04 pushl 0x4(%eax)
80103d36: 53 push %ebx
80103d37: e8 77 0d 00 00 call 80104ab3 <swtch>
mycpu()->intena = intena;
80103d3c: e8 8f fb ff ff call 801038d0 <mycpu>
}
80103d41: 83 c4 10 add $0x10,%esp
mycpu()->intena = intena;
80103d44: 89 b0 a8 00 00 00 mov %esi,0xa8(%eax)
}
80103d4a: 8d 65 f8 lea -0x8(%ebp),%esp
80103d4d: 5b pop %ebx
80103d4e: 5e pop %esi
80103d4f: 5d pop %ebp
80103d50: c3 ret
panic("sched ptable.lock");
80103d51: 83 ec 0c sub $0xc,%esp
80103d54: 68 fb 7a 10 80 push $0x80107afb
80103d59: e8 32 c6 ff ff call 80100390 <panic>
panic("sched interruptible");
80103d5e: 83 ec 0c sub $0xc,%esp
80103d61: 68 27 7b 10 80 push $0x80107b27
80103d66: e8 25 c6 ff ff call 80100390 <panic>
panic("sched running");
80103d6b: 83 ec 0c sub $0xc,%esp
80103d6e: 68 19 7b 10 80 push $0x80107b19
80103d73: e8 18 c6 ff ff call 80100390 <panic>
panic("sched locks");
80103d78: 83 ec 0c sub $0xc,%esp
80103d7b: 68 0d 7b 10 80 push $0x80107b0d
80103d80: e8 0b c6 ff ff call 80100390 <panic>
80103d85: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80103d8c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80103d90 <exit>:
{
80103d90: f3 0f 1e fb endbr32
80103d94: 55 push %ebp
80103d95: 89 e5 mov %esp,%ebp
80103d97: 57 push %edi
80103d98: 56 push %esi
80103d99: 53 push %ebx
80103d9a: 83 ec 0c sub $0xc,%esp
pushcli();
80103d9d: e8 de 08 00 00 call 80104680 <pushcli>
c = mycpu();
80103da2: e8 29 fb ff ff call 801038d0 <mycpu>
p = c->proc;
80103da7: 8b b0 ac 00 00 00 mov 0xac(%eax),%esi
popcli();
80103dad: e8 1e 09 00 00 call 801046d0 <popcli>
if(curproc == initproc)
80103db2: 8d 5e 28 lea 0x28(%esi),%ebx
80103db5: 8d 7e 68 lea 0x68(%esi),%edi
80103db8: 39 35 b8 a5 10 80 cmp %esi,0x8010a5b8
80103dbe: 0f 84 f3 00 00 00 je 80103eb7 <exit+0x127>
80103dc4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if(curproc->ofile[fd]){
80103dc8: 8b 03 mov (%ebx),%eax
80103dca: 85 c0 test %eax,%eax
80103dcc: 74 12 je 80103de0 <exit+0x50>
fileclose(curproc->ofile[fd]);
80103dce: 83 ec 0c sub $0xc,%esp
80103dd1: 50 push %eax
80103dd2: e8 e9 d0 ff ff call 80100ec0 <fileclose>
curproc->ofile[fd] = 0;
80103dd7: c7 03 00 00 00 00 movl $0x0,(%ebx)
80103ddd: 83 c4 10 add $0x10,%esp
for(fd = 0; fd < NOFILE; fd++){
80103de0: 83 c3 04 add $0x4,%ebx
80103de3: 39 df cmp %ebx,%edi
80103de5: 75 e1 jne 80103dc8 <exit+0x38>
begin_op();
80103de7: e8 44 ef ff ff call 80102d30 <begin_op>
iput(curproc->cwd);
80103dec: 83 ec 0c sub $0xc,%esp
80103def: ff 76 68 pushl 0x68(%esi)
80103df2: e8 99 da ff ff call 80101890 <iput>
end_op();
80103df7: e8 a4 ef ff ff call 80102da0 <end_op>
curproc->cwd = 0;
80103dfc: c7 46 68 00 00 00 00 movl $0x0,0x68(%esi)
acquire(&ptable.lock);
80103e03: c7 04 24 e0 36 11 80 movl $0x801136e0,(%esp)
80103e0a: e8 71 09 00 00 call 80104780 <acquire>
wakeup1(curproc->parent);
80103e0f: 8b 56 14 mov 0x14(%esi),%edx
80103e12: 83 c4 10 add $0x10,%esp
static void
wakeup1(void *chan)
{
struct proc *p;
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
80103e15: b8 14 37 11 80 mov $0x80113714,%eax
80103e1a: eb 0e jmp 80103e2a <exit+0x9a>
80103e1c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80103e20: 83 e8 80 sub $0xffffff80,%eax
80103e23: 3d 14 57 11 80 cmp $0x80115714,%eax
80103e28: 74 1c je 80103e46 <exit+0xb6>
if(p->state == SLEEPING && p->chan == chan)
80103e2a: 83 78 0c 02 cmpl $0x2,0xc(%eax)
80103e2e: 75 f0 jne 80103e20 <exit+0x90>
80103e30: 3b 50 20 cmp 0x20(%eax),%edx
80103e33: 75 eb jne 80103e20 <exit+0x90>
p->state = RUNNABLE;
80103e35: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax)
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
80103e3c: 83 e8 80 sub $0xffffff80,%eax
80103e3f: 3d 14 57 11 80 cmp $0x80115714,%eax
80103e44: 75 e4 jne 80103e2a <exit+0x9a>
p->parent = initproc;
80103e46: 8b 0d b8 a5 10 80 mov 0x8010a5b8,%ecx
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80103e4c: ba 14 37 11 80 mov $0x80113714,%edx
80103e51: eb 10 jmp 80103e63 <exit+0xd3>
80103e53: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80103e57: 90 nop
80103e58: 83 ea 80 sub $0xffffff80,%edx
80103e5b: 81 fa 14 57 11 80 cmp $0x80115714,%edx
80103e61: 74 3b je 80103e9e <exit+0x10e>
if(p->parent == curproc){
80103e63: 39 72 14 cmp %esi,0x14(%edx)
80103e66: 75 f0 jne 80103e58 <exit+0xc8>
if(p->state == ZOMBIE)
80103e68: 83 7a 0c 05 cmpl $0x5,0xc(%edx)
p->parent = initproc;
80103e6c: 89 4a 14 mov %ecx,0x14(%edx)
if(p->state == ZOMBIE)
80103e6f: 75 e7 jne 80103e58 <exit+0xc8>
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
80103e71: b8 14 37 11 80 mov $0x80113714,%eax
80103e76: eb 12 jmp 80103e8a <exit+0xfa>
80103e78: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80103e7f: 90 nop
80103e80: 83 e8 80 sub $0xffffff80,%eax
80103e83: 3d 14 57 11 80 cmp $0x80115714,%eax
80103e88: 74 ce je 80103e58 <exit+0xc8>
if(p->state == SLEEPING && p->chan == chan)
80103e8a: 83 78 0c 02 cmpl $0x2,0xc(%eax)
80103e8e: 75 f0 jne 80103e80 <exit+0xf0>
80103e90: 3b 48 20 cmp 0x20(%eax),%ecx
80103e93: 75 eb jne 80103e80 <exit+0xf0>
p->state = RUNNABLE;
80103e95: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax)
80103e9c: eb e2 jmp 80103e80 <exit+0xf0>
curproc->state = ZOMBIE;
80103e9e: c7 46 0c 05 00 00 00 movl $0x5,0xc(%esi)
sched();
80103ea5: e8 26 fe ff ff call 80103cd0 <sched>
panic("zombie exit");
80103eaa: 83 ec 0c sub $0xc,%esp
80103ead: 68 48 7b 10 80 push $0x80107b48
80103eb2: e8 d9 c4 ff ff call 80100390 <panic>
panic("init exiting");
80103eb7: 83 ec 0c sub $0xc,%esp
80103eba: 68 3b 7b 10 80 push $0x80107b3b
80103ebf: e8 cc c4 ff ff call 80100390 <panic>
80103ec4: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80103ecb: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80103ecf: 90 nop
80103ed0 <yield>:
{
80103ed0: f3 0f 1e fb endbr32
80103ed4: 55 push %ebp
80103ed5: 89 e5 mov %esp,%ebp
80103ed7: 53 push %ebx
80103ed8: 83 ec 10 sub $0x10,%esp
acquire(&ptable.lock); //DOC: yieldlock
80103edb: 68 e0 36 11 80 push $0x801136e0
80103ee0: e8 9b 08 00 00 call 80104780 <acquire>
pushcli();
80103ee5: e8 96 07 00 00 call 80104680 <pushcli>
c = mycpu();
80103eea: e8 e1 f9 ff ff call 801038d0 <mycpu>
p = c->proc;
80103eef: 8b 98 ac 00 00 00 mov 0xac(%eax),%ebx
popcli();
80103ef5: e8 d6 07 00 00 call 801046d0 <popcli>
myproc()->state = RUNNABLE;
80103efa: c7 43 0c 03 00 00 00 movl $0x3,0xc(%ebx)
sched();
80103f01: e8 ca fd ff ff call 80103cd0 <sched>
release(&ptable.lock);
80103f06: c7 04 24 e0 36 11 80 movl $0x801136e0,(%esp)
80103f0d: e8 2e 09 00 00 call 80104840 <release>
}
80103f12: 8b 5d fc mov -0x4(%ebp),%ebx
80103f15: 83 c4 10 add $0x10,%esp
80103f18: c9 leave
80103f19: c3 ret
80103f1a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80103f20 <sleep>:
{
80103f20: f3 0f 1e fb endbr32
80103f24: 55 push %ebp
80103f25: 89 e5 mov %esp,%ebp
80103f27: 57 push %edi
80103f28: 56 push %esi
80103f29: 53 push %ebx
80103f2a: 83 ec 0c sub $0xc,%esp
80103f2d: 8b 7d 08 mov 0x8(%ebp),%edi
80103f30: 8b 75 0c mov 0xc(%ebp),%esi
pushcli();
80103f33: e8 48 07 00 00 call 80104680 <pushcli>
c = mycpu();
80103f38: e8 93 f9 ff ff call 801038d0 <mycpu>
p = c->proc;
80103f3d: 8b 98 ac 00 00 00 mov 0xac(%eax),%ebx
popcli();
80103f43: e8 88 07 00 00 call 801046d0 <popcli>
if(p == 0)
80103f48: 85 db test %ebx,%ebx
80103f4a: 0f 84 83 00 00 00 je 80103fd3 <sleep+0xb3>
if(lk == 0)
80103f50: 85 f6 test %esi,%esi
80103f52: 74 72 je 80103fc6 <sleep+0xa6>
if(lk != &ptable.lock){ //DOC: sleeplock0
80103f54: 81 fe e0 36 11 80 cmp $0x801136e0,%esi
80103f5a: 74 4c je 80103fa8 <sleep+0x88>
acquire(&ptable.lock); //DOC: sleeplock1
80103f5c: 83 ec 0c sub $0xc,%esp
80103f5f: 68 e0 36 11 80 push $0x801136e0
80103f64: e8 17 08 00 00 call 80104780 <acquire>
release(lk);
80103f69: 89 34 24 mov %esi,(%esp)
80103f6c: e8 cf 08 00 00 call 80104840 <release>
p->chan = chan;
80103f71: 89 7b 20 mov %edi,0x20(%ebx)
p->state = SLEEPING;
80103f74: c7 43 0c 02 00 00 00 movl $0x2,0xc(%ebx)
sched();
80103f7b: e8 50 fd ff ff call 80103cd0 <sched>
p->chan = 0;
80103f80: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx)
release(&ptable.lock);
80103f87: c7 04 24 e0 36 11 80 movl $0x801136e0,(%esp)
80103f8e: e8 ad 08 00 00 call 80104840 <release>
acquire(lk);
80103f93: 89 75 08 mov %esi,0x8(%ebp)
80103f96: 83 c4 10 add $0x10,%esp
}
80103f99: 8d 65 f4 lea -0xc(%ebp),%esp
80103f9c: 5b pop %ebx
80103f9d: 5e pop %esi
80103f9e: 5f pop %edi
80103f9f: 5d pop %ebp
acquire(lk);
80103fa0: e9 db 07 00 00 jmp 80104780 <acquire>
80103fa5: 8d 76 00 lea 0x0(%esi),%esi
p->chan = chan;
80103fa8: 89 7b 20 mov %edi,0x20(%ebx)
p->state = SLEEPING;
80103fab: c7 43 0c 02 00 00 00 movl $0x2,0xc(%ebx)
sched();
80103fb2: e8 19 fd ff ff call 80103cd0 <sched>
p->chan = 0;
80103fb7: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx)
}
80103fbe: 8d 65 f4 lea -0xc(%ebp),%esp
80103fc1: 5b pop %ebx
80103fc2: 5e pop %esi
80103fc3: 5f pop %edi
80103fc4: 5d pop %ebp
80103fc5: c3 ret
panic("sleep without lk");
80103fc6: 83 ec 0c sub $0xc,%esp
80103fc9: 68 5a 7b 10 80 push $0x80107b5a
80103fce: e8 bd c3 ff ff call 80100390 <panic>
panic("sleep");
80103fd3: 83 ec 0c sub $0xc,%esp
80103fd6: 68 54 7b 10 80 push $0x80107b54
80103fdb: e8 b0 c3 ff ff call 80100390 <panic>
80103fe0 <wait>:
{
80103fe0: f3 0f 1e fb endbr32
80103fe4: 55 push %ebp
80103fe5: 89 e5 mov %esp,%ebp
80103fe7: 56 push %esi
80103fe8: 53 push %ebx
pushcli();
80103fe9: e8 92 06 00 00 call 80104680 <pushcli>
c = mycpu();
80103fee: e8 dd f8 ff ff call 801038d0 <mycpu>
p = c->proc;
80103ff3: 8b b0 ac 00 00 00 mov 0xac(%eax),%esi
popcli();
80103ff9: e8 d2 06 00 00 call 801046d0 <popcli>
acquire(&ptable.lock);
80103ffe: 83 ec 0c sub $0xc,%esp
80104001: 68 e0 36 11 80 push $0x801136e0
80104006: e8 75 07 00 00 call 80104780 <acquire>
8010400b: 83 c4 10 add $0x10,%esp
havekids = 0;
8010400e: 31 c0 xor %eax,%eax
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80104010: bb 14 37 11 80 mov $0x80113714,%ebx
80104015: eb 14 jmp 8010402b <wait+0x4b>
80104017: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010401e: 66 90 xchg %ax,%ax
80104020: 83 eb 80 sub $0xffffff80,%ebx
80104023: 81 fb 14 57 11 80 cmp $0x80115714,%ebx
80104029: 74 1b je 80104046 <wait+0x66>
if(p->parent != curproc)
8010402b: 39 73 14 cmp %esi,0x14(%ebx)
8010402e: 75 f0 jne 80104020 <wait+0x40>
if(p->state == ZOMBIE){
80104030: 83 7b 0c 05 cmpl $0x5,0xc(%ebx)
80104034: 74 32 je 80104068 <wait+0x88>
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80104036: 83 eb 80 sub $0xffffff80,%ebx
havekids = 1;
80104039: b8 01 00 00 00 mov $0x1,%eax
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
8010403e: 81 fb 14 57 11 80 cmp $0x80115714,%ebx
80104044: 75 e5 jne 8010402b <wait+0x4b>
if(!havekids || curproc->killed){
80104046: 85 c0 test %eax,%eax
80104048: 74 74 je 801040be <wait+0xde>
8010404a: 8b 46 24 mov 0x24(%esi),%eax
8010404d: 85 c0 test %eax,%eax
8010404f: 75 6d jne 801040be <wait+0xde>
sleep(curproc, &ptable.lock); //DOC: wait-sleep
80104051: 83 ec 08 sub $0x8,%esp
80104054: 68 e0 36 11 80 push $0x801136e0
80104059: 56 push %esi
8010405a: e8 c1 fe ff ff call 80103f20 <sleep>
havekids = 0;
8010405f: 83 c4 10 add $0x10,%esp
80104062: eb aa jmp 8010400e <wait+0x2e>
80104064: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
kfree(p->kstack);
80104068: 83 ec 0c sub $0xc,%esp
8010406b: ff 73 08 pushl 0x8(%ebx)
pid = p->pid;
8010406e: 8b 73 10 mov 0x10(%ebx),%esi
kfree(p->kstack);
80104071: e8 fa e3 ff ff call 80102470 <kfree>
freevm(p->pgdir);
80104076: 5a pop %edx
80104077: ff 73 04 pushl 0x4(%ebx)
p->kstack = 0;
8010407a: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
freevm(p->pgdir);
80104081: e8 0a 30 00 00 call 80107090 <freevm>
release(&ptable.lock);
80104086: c7 04 24 e0 36 11 80 movl $0x801136e0,(%esp)
p->pid = 0;
8010408d: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx)
p->parent = 0;
80104094: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx)
p->name[0] = 0;
8010409b: c6 43 6c 00 movb $0x0,0x6c(%ebx)
p->killed = 0;
8010409f: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
p->state = UNUSED;
801040a6: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
release(&ptable.lock);
801040ad: e8 8e 07 00 00 call 80104840 <release>
return pid;
801040b2: 83 c4 10 add $0x10,%esp
}
801040b5: 8d 65 f8 lea -0x8(%ebp),%esp
801040b8: 89 f0 mov %esi,%eax
801040ba: 5b pop %ebx
801040bb: 5e pop %esi
801040bc: 5d pop %ebp
801040bd: c3 ret
release(&ptable.lock);
801040be: 83 ec 0c sub $0xc,%esp
return -1;
801040c1: be ff ff ff ff mov $0xffffffff,%esi
release(&ptable.lock);
801040c6: 68 e0 36 11 80 push $0x801136e0
801040cb: e8 70 07 00 00 call 80104840 <release>
return -1;
801040d0: 83 c4 10 add $0x10,%esp
801040d3: eb e0 jmp 801040b5 <wait+0xd5>
801040d5: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801040dc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801040e0 <wakeup>:
}
// Wake up all processes sleeping on chan.
void
wakeup(void *chan)
{
801040e0: f3 0f 1e fb endbr32
801040e4: 55 push %ebp
801040e5: 89 e5 mov %esp,%ebp
801040e7: 53 push %ebx
801040e8: 83 ec 10 sub $0x10,%esp
801040eb: 8b 5d 08 mov 0x8(%ebp),%ebx
acquire(&ptable.lock);
801040ee: 68 e0 36 11 80 push $0x801136e0
801040f3: e8 88 06 00 00 call 80104780 <acquire>
801040f8: 83 c4 10 add $0x10,%esp
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
801040fb: b8 14 37 11 80 mov $0x80113714,%eax
80104100: eb 10 jmp 80104112 <wakeup+0x32>
80104102: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80104108: 83 e8 80 sub $0xffffff80,%eax
8010410b: 3d 14 57 11 80 cmp $0x80115714,%eax
80104110: 74 1c je 8010412e <wakeup+0x4e>
if(p->state == SLEEPING && p->chan == chan)
80104112: 83 78 0c 02 cmpl $0x2,0xc(%eax)
80104116: 75 f0 jne 80104108 <wakeup+0x28>
80104118: 3b 58 20 cmp 0x20(%eax),%ebx
8010411b: 75 eb jne 80104108 <wakeup+0x28>
p->state = RUNNABLE;
8010411d: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax)
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
80104124: 83 e8 80 sub $0xffffff80,%eax
80104127: 3d 14 57 11 80 cmp $0x80115714,%eax
8010412c: 75 e4 jne 80104112 <wakeup+0x32>
wakeup1(chan);
release(&ptable.lock);
8010412e: c7 45 08 e0 36 11 80 movl $0x801136e0,0x8(%ebp)
}
80104135: 8b 5d fc mov -0x4(%ebp),%ebx
80104138: c9 leave
release(&ptable.lock);
80104139: e9 02 07 00 00 jmp 80104840 <release>
8010413e: 66 90 xchg %ax,%ax
80104140 <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)
{
80104140: f3 0f 1e fb endbr32
80104144: 55 push %ebp
80104145: 89 e5 mov %esp,%ebp
80104147: 53 push %ebx
80104148: 83 ec 10 sub $0x10,%esp
8010414b: 8b 5d 08 mov 0x8(%ebp),%ebx
struct proc *p;
acquire(&ptable.lock);
8010414e: 68 e0 36 11 80 push $0x801136e0
80104153: e8 28 06 00 00 call 80104780 <acquire>
80104158: 83 c4 10 add $0x10,%esp
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
8010415b: b8 14 37 11 80 mov $0x80113714,%eax
80104160: eb 10 jmp 80104172 <kill+0x32>
80104162: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80104168: 83 e8 80 sub $0xffffff80,%eax
8010416b: 3d 14 57 11 80 cmp $0x80115714,%eax
80104170: 74 36 je 801041a8 <kill+0x68>
if(p->pid == pid){
80104172: 39 58 10 cmp %ebx,0x10(%eax)
80104175: 75 f1 jne 80104168 <kill+0x28>
p->killed = 1;
// Wake process from sleep if necessary.
if(p->state == SLEEPING)
80104177: 83 78 0c 02 cmpl $0x2,0xc(%eax)
p->killed = 1;
8010417b: c7 40 24 01 00 00 00 movl $0x1,0x24(%eax)
if(p->state == SLEEPING)
80104182: 75 07 jne 8010418b <kill+0x4b>
p->state = RUNNABLE;
80104184: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax)
release(&ptable.lock);
8010418b: 83 ec 0c sub $0xc,%esp
8010418e: 68 e0 36 11 80 push $0x801136e0
80104193: e8 a8 06 00 00 call 80104840 <release>
return 0;
}
}
release(&ptable.lock);
return -1;
}
80104198: 8b 5d fc mov -0x4(%ebp),%ebx
return 0;
8010419b: 83 c4 10 add $0x10,%esp
8010419e: 31 c0 xor %eax,%eax
}
801041a0: c9 leave
801041a1: c3 ret
801041a2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
release(&ptable.lock);
801041a8: 83 ec 0c sub $0xc,%esp
801041ab: 68 e0 36 11 80 push $0x801136e0
801041b0: e8 8b 06 00 00 call 80104840 <release>
}
801041b5: 8b 5d fc mov -0x4(%ebp),%ebx
return -1;
801041b8: 83 c4 10 add $0x10,%esp
801041bb: b8 ff ff ff ff mov $0xffffffff,%eax
}
801041c0: c9 leave
801041c1: c3 ret
801041c2: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801041c9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801041d0 <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)
{
801041d0: f3 0f 1e fb endbr32
801041d4: 55 push %ebp
801041d5: 89 e5 mov %esp,%ebp
801041d7: 57 push %edi
801041d8: 56 push %esi
801041d9: 8d 75 e8 lea -0x18(%ebp),%esi
801041dc: 53 push %ebx
801041dd: bb 80 37 11 80 mov $0x80113780,%ebx
801041e2: 83 ec 3c sub $0x3c,%esp
801041e5: eb 28 jmp 8010420f <procdump+0x3f>
801041e7: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801041ee: 66 90 xchg %ax,%ax
if(p->state == SLEEPING){
getcallerpcs((uint*)p->context->ebp+2, pc);
for(i=0; i<10 && pc[i] != 0; i++)
cprintf(" %p", pc[i]);
}
cprintf("\n");
801041f0: 83 ec 0c sub $0xc,%esp
801041f3: 68 df 7e 10 80 push $0x80107edf
801041f8: e8 b3 c4 ff ff call 801006b0 <cprintf>
801041fd: 83 c4 10 add $0x10,%esp
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80104200: 83 eb 80 sub $0xffffff80,%ebx
80104203: 81 fb 80 57 11 80 cmp $0x80115780,%ebx
80104209: 0f 84 81 00 00 00 je 80104290 <procdump+0xc0>
if(p->state == UNUSED)
8010420f: 8b 43 a0 mov -0x60(%ebx),%eax
80104212: 85 c0 test %eax,%eax
80104214: 74 ea je 80104200 <procdump+0x30>
state = "???";
80104216: ba 6b 7b 10 80 mov $0x80107b6b,%edx
if(p->state >= 0 && p->state < NELEM(states) && states[p->state])
8010421b: 83 f8 05 cmp $0x5,%eax
8010421e: 77 11 ja 80104231 <procdump+0x61>
80104220: 8b 14 85 cc 7b 10 80 mov -0x7fef8434(,%eax,4),%edx
state = "???";
80104227: b8 6b 7b 10 80 mov $0x80107b6b,%eax
8010422c: 85 d2 test %edx,%edx
8010422e: 0f 44 d0 cmove %eax,%edx
cprintf("%d %s %s", p->pid, state, p->name);
80104231: 53 push %ebx
80104232: 52 push %edx
80104233: ff 73 a4 pushl -0x5c(%ebx)
80104236: 68 6f 7b 10 80 push $0x80107b6f
8010423b: e8 70 c4 ff ff call 801006b0 <cprintf>
if(p->state == SLEEPING){
80104240: 83 c4 10 add $0x10,%esp
80104243: 83 7b a0 02 cmpl $0x2,-0x60(%ebx)
80104247: 75 a7 jne 801041f0 <procdump+0x20>
getcallerpcs((uint*)p->context->ebp+2, pc);
80104249: 83 ec 08 sub $0x8,%esp
8010424c: 8d 45 c0 lea -0x40(%ebp),%eax
8010424f: 8d 7d c0 lea -0x40(%ebp),%edi
80104252: 50 push %eax
80104253: 8b 43 b0 mov -0x50(%ebx),%eax
80104256: 8b 40 0c mov 0xc(%eax),%eax
80104259: 83 c0 08 add $0x8,%eax
8010425c: 50 push %eax
8010425d: e8 be 03 00 00 call 80104620 <getcallerpcs>
for(i=0; i<10 && pc[i] != 0; i++)
80104262: 83 c4 10 add $0x10,%esp
80104265: 8d 76 00 lea 0x0(%esi),%esi
80104268: 8b 17 mov (%edi),%edx
8010426a: 85 d2 test %edx,%edx
8010426c: 74 82 je 801041f0 <procdump+0x20>
cprintf(" %p", pc[i]);
8010426e: 83 ec 08 sub $0x8,%esp
80104271: 83 c7 04 add $0x4,%edi
80104274: 52 push %edx
80104275: 68 c1 75 10 80 push $0x801075c1
8010427a: e8 31 c4 ff ff call 801006b0 <cprintf>
for(i=0; i<10 && pc[i] != 0; i++)
8010427f: 83 c4 10 add $0x10,%esp
80104282: 39 fe cmp %edi,%esi
80104284: 75 e2 jne 80104268 <procdump+0x98>
80104286: e9 65 ff ff ff jmp 801041f0 <procdump+0x20>
8010428b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
8010428f: 90 nop
}
}
80104290: 8d 65 f4 lea -0xc(%ebp),%esp
80104293: 5b pop %ebx
80104294: 5e pop %esi
80104295: 5f pop %edi
80104296: 5d pop %ebp
80104297: c3 ret
80104298: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010429f: 90 nop
801042a0 <clone>:
int clone(void(*fcn)(void*,void*), void *arg1, void *arg2, void* stack)
{
801042a0: f3 0f 1e fb endbr32
801042a4: 55 push %ebp
801042a5: 89 e5 mov %esp,%ebp
801042a7: 57 push %edi
801042a8: 56 push %esi
801042a9: 53 push %ebx
801042aa: 83 ec 1c sub $0x1c,%esp
pushcli();
801042ad: e8 ce 03 00 00 call 80104680 <pushcli>
c = mycpu();
801042b2: e8 19 f6 ff ff call 801038d0 <mycpu>
p = c->proc;
801042b7: 8b 90 ac 00 00 00 mov 0xac(%eax),%edx
801042bd: 89 55 e4 mov %edx,-0x1c(%ebp)
popcli();
801042c0: e8 0b 04 00 00 call 801046d0 <popcli>
struct proc *np;
struct proc *p = myproc();
// Allocate process.
if((np = allocproc()) == 0)
801042c5: e8 c6 f4 ff ff call 80103790 <allocproc>
801042ca: 85 c0 test %eax,%eax
801042cc: 0f 84 d9 00 00 00 je 801043ab <clone+0x10b>
return -1;
// Copy process data to the new thread
np->pgdir = p->pgdir;
801042d2: 8b 55 e4 mov -0x1c(%ebp),%edx
801042d5: 89 c3 mov %eax,%ebx
np->sz = p->sz;
np->parent = p;
*np->tf = *p->tf;
801042d7: b9 13 00 00 00 mov $0x13,%ecx
801042dc: 8b 7b 18 mov 0x18(%ebx),%edi
np->pgdir = p->pgdir;
801042df: 8b 42 04 mov 0x4(%edx),%eax
801042e2: 89 43 04 mov %eax,0x4(%ebx)
np->sz = p->sz;
801042e5: 8b 02 mov (%edx),%eax
np->parent = p;
801042e7: 89 53 14 mov %edx,0x14(%ebx)
np->sz = p->sz;
801042ea: 89 03 mov %eax,(%ebx)
void * stackArg1, *stackArg2, *stackRet;
//pushing the fake return address to the stack of thread
stackRet = stack + PGSIZE -3*sizeof(void *);
*(uint*)stackRet = 0xFFFFFFF;
801042ec: 8b 45 14 mov 0x14(%ebp),%eax
*np->tf = *p->tf;
801042ef: 8b 72 18 mov 0x18(%edx),%esi
801042f2: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
//pushing the first argument to the stack of thread
stackArg1 = stack + PGSIZE -2*sizeof(void *);
*(uint*)stackArg1 = (uint)arg1;
801042f4: 8b 4d 14 mov 0x14(%ebp),%ecx
np->tf->eip = (uint) fcn; //begin excuting code from this function
// Duplicate the files used by the current process(thread) to be used
// also by the new thread
int i;
for(i = 0; i < NOFILE; i++)
801042f7: 31 f6 xor %esi,%esi
801042f9: 89 d7 mov %edx,%edi
*(uint*)stackRet = 0xFFFFFFF;
801042fb: c7 80 f4 0f 00 00 ff movl $0xfffffff,0xff4(%eax)
80104302: ff ff 0f
*(uint*)stackArg1 = (uint)arg1;
80104305: 8b 45 0c mov 0xc(%ebp),%eax
80104308: 89 81 f8 0f 00 00 mov %eax,0xff8(%ecx)
*(uint*)stackArg2 = (uint)arg2;
8010430e: 8b 45 10 mov 0x10(%ebp),%eax
80104311: 89 81 fc 0f 00 00 mov %eax,0xffc(%ecx)
np->tf->esp = (uint) stack; //putting the address of stack in the stack pointer
80104317: 8b 43 18 mov 0x18(%ebx),%eax
8010431a: 89 48 44 mov %ecx,0x44(%eax)
np->tf->eax = 0;
8010431d: 8b 43 18 mov 0x18(%ebx),%eax
80104320: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax)
np->tf->esp += PGSIZE -3*sizeof(void*) ;
80104327: 8b 43 18 mov 0x18(%ebx),%eax
np->threadstack = stack; //saving the address of the stack
8010432a: 89 4b 7c mov %ecx,0x7c(%ebx)
np->tf->esp += PGSIZE -3*sizeof(void*) ;
8010432d: 81 40 44 f4 0f 00 00 addl $0xff4,0x44(%eax)
np->tf->ebp = np->tf->esp;
80104334: 8b 43 18 mov 0x18(%ebx),%eax
80104337: 8b 48 44 mov 0x44(%eax),%ecx
8010433a: 89 48 08 mov %ecx,0x8(%eax)
np->tf->eip = (uint) fcn; //begin excuting code from this function
8010433d: 8b 4d 08 mov 0x8(%ebp),%ecx
80104340: 8b 43 18 mov 0x18(%ebx),%eax
80104343: 89 48 38 mov %ecx,0x38(%eax)
for(i = 0; i < NOFILE; i++)
80104346: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010434d: 8d 76 00 lea 0x0(%esi),%esi
if(p->ofile[i])
80104350: 8b 44 b7 28 mov 0x28(%edi,%esi,4),%eax
80104354: 85 c0 test %eax,%eax
80104356: 74 10 je 80104368 <clone+0xc8>
np->ofile[i] = filedup(p->ofile[i]);
80104358: 83 ec 0c sub $0xc,%esp
8010435b: 50 push %eax
8010435c: e8 0f cb ff ff call 80100e70 <filedup>
80104361: 83 c4 10 add $0x10,%esp
80104364: 89 44 b3 28 mov %eax,0x28(%ebx,%esi,4)
for(i = 0; i < NOFILE; i++)
80104368: 83 c6 01 add $0x1,%esi
8010436b: 83 fe 10 cmp $0x10,%esi
8010436e: 75 e0 jne 80104350 <clone+0xb0>
// Duplicate the current directory to be used by the new thread
np->cwd = idup(p->cwd);
80104370: 83 ec 0c sub $0xc,%esp
80104373: ff 77 68 pushl 0x68(%edi)
80104376: 89 7d e4 mov %edi,-0x1c(%ebp)
80104379: e8 b2 d3 ff ff call 80101730 <idup>
// Make the state of the new thread to be runnable
np->state = RUNNABLE;
// Make the two threads belong to the current process
safestrcpy(np->name, p->name, sizeof(p->name));
8010437e: 8b 55 e4 mov -0x1c(%ebp),%edx
80104381: 83 c4 0c add $0xc,%esp
np->state = RUNNABLE;
80104384: c7 43 0c 03 00 00 00 movl $0x3,0xc(%ebx)
np->cwd = idup(p->cwd);
8010438b: 89 43 68 mov %eax,0x68(%ebx)
safestrcpy(np->name, p->name, sizeof(p->name));
8010438e: 8d 43 6c lea 0x6c(%ebx),%eax
80104391: 83 c2 6c add $0x6c,%edx
80104394: 6a 10 push $0x10
80104396: 52 push %edx
80104397: 50 push %eax
80104398: e8 b3 06 00 00 call 80104a50 <safestrcpy>
return np->pid;
8010439d: 8b 43 10 mov 0x10(%ebx),%eax
801043a0: 83 c4 10 add $0x10,%esp
}
801043a3: 8d 65 f4 lea -0xc(%ebp),%esp
801043a6: 5b pop %ebx
801043a7: 5e pop %esi
801043a8: 5f pop %edi
801043a9: 5d pop %ebp
801043aa: c3 ret
return -1;
801043ab: b8 ff ff ff ff mov $0xffffffff,%eax
801043b0: eb f1 jmp 801043a3 <clone+0x103>
801043b2: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801043b9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801043c0 <join>:
int
join(void** stack)
{
801043c0: f3 0f 1e fb endbr32
801043c4: 55 push %ebp
801043c5: 89 e5 mov %esp,%ebp
801043c7: 56 push %esi
801043c8: 53 push %ebx
pushcli();
801043c9: e8 b2 02 00 00 call 80104680 <pushcli>
c = mycpu();
801043ce: e8 fd f4 ff ff call 801038d0 <mycpu>
p = c->proc;
801043d3: 8b b0 ac 00 00 00 mov 0xac(%eax),%esi
popcli();
801043d9: e8 f2 02 00 00 call 801046d0 <popcli>
struct proc *p; // The thread iterator
int havekids, pid;
struct proc *cp = myproc();
acquire(&ptable.lock);
801043de: 83 ec 0c sub $0xc,%esp
801043e1: 68 e0 36 11 80 push $0x801136e0
801043e6: e8 95 03 00 00 call 80104780 <acquire>
801043eb: 83 c4 10 add $0x10,%esp
for(;;){
// Scan through table looking for zombie children.
havekids = 0;
801043ee: 31 c0 xor %eax,%eax
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
801043f0: bb 14 37 11 80 mov $0x80113714,%ebx
801043f5: eb 14 jmp 8010440b <join+0x4b>
801043f7: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801043fe: 66 90 xchg %ax,%ax
80104400: 83 eb 80 sub $0xffffff80,%ebx
80104403: 81 fb 14 57 11 80 cmp $0x80115714,%ebx
80104409: 74 23 je 8010442e <join+0x6e>
// If the current process is not my parent or share the same address space...
if(p->parent != cp || p->pgdir != p->parent->pgdir)
8010440b: 39 73 14 cmp %esi,0x14(%ebx)
8010440e: 75 f0 jne 80104400 <join+0x40>
80104410: 8b 56 04 mov 0x4(%esi),%edx
80104413: 39 53 04 cmp %edx,0x4(%ebx)
80104416: 75 e8 jne 80104400 <join+0x40>
continue; // You are not a thread
havekids = 1;
if(p->state == ZOMBIE){
80104418: 83 7b 0c 05 cmpl $0x5,0xc(%ebx)
8010441c: 74 32 je 80104450 <join+0x90>
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
8010441e: 83 eb 80 sub $0xffffff80,%ebx
havekids = 1;
80104421: b8 01 00 00 00 mov $0x1,%eax
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80104426: 81 fb 14 57 11 80 cmp $0x80115714,%ebx
8010442c: 75 dd jne 8010440b <join+0x4b>
}
}
// No point waiting if we don't have any children.
if(!havekids || cp->killed){
8010442e: 85 c0 test %eax,%eax
80104430: 74 72 je 801044a4 <join+0xe4>
80104432: 8b 46 24 mov 0x24(%esi),%eax
80104435: 85 c0 test %eax,%eax
80104437: 75 6b jne 801044a4 <join+0xe4>
release(&ptable.lock);
return -1;
}
// Wait for children to exit. (See wakeup1 call in proc_exit.)
sleep(cp, &ptable.lock); //DOC: wait-sleep
80104439: 83 ec 08 sub $0x8,%esp
8010443c: 68 e0 36 11 80 push $0x801136e0
80104441: 56 push %esi
80104442: e8 d9 fa ff ff call 80103f20 <sleep>
havekids = 0;
80104447: 83 c4 10 add $0x10,%esp
8010444a: eb a2 jmp 801043ee <join+0x2e>
8010444c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
kfree(p->kstack);
80104450: 83 ec 0c sub $0xc,%esp
80104453: ff 73 08 pushl 0x8(%ebx)
pid = p->pid;
80104456: 8b 73 10 mov 0x10(%ebx),%esi
kfree(p->kstack);
80104459: e8 12 e0 ff ff call 80102470 <kfree>
release(&ptable.lock);
8010445e: c7 04 24 e0 36 11 80 movl $0x801136e0,(%esp)
p->kstack = 0;
80104465: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
p->pid = 0;
8010446c: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx)
p->parent = 0;
80104473: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx)
p->name[0] = 0;
8010447a: c6 43 6c 00 movb $0x0,0x6c(%ebx)
p->killed = 0;
8010447e: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
p->state = UNUSED;
80104485: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
p->threadstack = 0;
8010448c: c7 43 7c 00 00 00 00 movl $0x0,0x7c(%ebx)
release(&ptable.lock);
80104493: e8 a8 03 00 00 call 80104840 <release>
return pid;
80104498: 83 c4 10 add $0x10,%esp
}
8010449b: 8d 65 f8 lea -0x8(%ebp),%esp
8010449e: 89 f0 mov %esi,%eax
801044a0: 5b pop %ebx
801044a1: 5e pop %esi
801044a2: 5d pop %ebp
801044a3: c3 ret
release(&ptable.lock);
801044a4: 83 ec 0c sub $0xc,%esp
return -1;
801044a7: be ff ff ff ff mov $0xffffffff,%esi
release(&ptable.lock);
801044ac: 68 e0 36 11 80 push $0x801136e0
801044b1: e8 8a 03 00 00 call 80104840 <release>
return -1;
801044b6: 83 c4 10 add $0x10,%esp
801044b9: eb e0 jmp 8010449b <join+0xdb>
801044bb: 66 90 xchg %ax,%ax
801044bd: 66 90 xchg %ax,%ax
801044bf: 90 nop
801044c0 <initsleeplock>:
#include "spinlock.h"
#include "sleeplock.h"
void
initsleeplock(struct sleeplock *lk, char *name)
{
801044c0: f3 0f 1e fb endbr32
801044c4: 55 push %ebp
801044c5: 89 e5 mov %esp,%ebp
801044c7: 53 push %ebx
801044c8: 83 ec 0c sub $0xc,%esp
801044cb: 8b 5d 08 mov 0x8(%ebp),%ebx
initlock(&lk->lk, "sleep lock");
801044ce: 68 e4 7b 10 80 push $0x80107be4
801044d3: 8d 43 04 lea 0x4(%ebx),%eax
801044d6: 50 push %eax
801044d7: e8 24 01 00 00 call 80104600 <initlock>
lk->name = name;
801044dc: 8b 45 0c mov 0xc(%ebp),%eax
lk->locked = 0;
801044df: c7 03 00 00 00 00 movl $0x0,(%ebx)
lk->pid = 0;
}
801044e5: 83 c4 10 add $0x10,%esp
lk->pid = 0;
801044e8: c7 43 3c 00 00 00 00 movl $0x0,0x3c(%ebx)
lk->name = name;
801044ef: 89 43 38 mov %eax,0x38(%ebx)
}
801044f2: 8b 5d fc mov -0x4(%ebp),%ebx
801044f5: c9 leave
801044f6: c3 ret
801044f7: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801044fe: 66 90 xchg %ax,%ax
80104500 <acquiresleep>:
void
acquiresleep(struct sleeplock *lk)
{
80104500: f3 0f 1e fb endbr32
80104504: 55 push %ebp
80104505: 89 e5 mov %esp,%ebp
80104507: 56 push %esi
80104508: 53 push %ebx
80104509: 8b 5d 08 mov 0x8(%ebp),%ebx
acquire(&lk->lk);
8010450c: 8d 73 04 lea 0x4(%ebx),%esi
8010450f: 83 ec 0c sub $0xc,%esp
80104512: 56 push %esi
80104513: e8 68 02 00 00 call 80104780 <acquire>
while (lk->locked) {
80104518: 8b 13 mov (%ebx),%edx
8010451a: 83 c4 10 add $0x10,%esp
8010451d: 85 d2 test %edx,%edx
8010451f: 74 1a je 8010453b <acquiresleep+0x3b>
80104521: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
sleep(lk, &lk->lk);
80104528: 83 ec 08 sub $0x8,%esp
8010452b: 56 push %esi
8010452c: 53 push %ebx
8010452d: e8 ee f9 ff ff call 80103f20 <sleep>
while (lk->locked) {
80104532: 8b 03 mov (%ebx),%eax
80104534: 83 c4 10 add $0x10,%esp
80104537: 85 c0 test %eax,%eax
80104539: 75 ed jne 80104528 <acquiresleep+0x28>
}
lk->locked = 1;
8010453b: c7 03 01 00 00 00 movl $0x1,(%ebx)
lk->pid = myproc()->pid;
80104541: e8 1a f4 ff ff call 80103960 <myproc>
80104546: 8b 40 10 mov 0x10(%eax),%eax
80104549: 89 43 3c mov %eax,0x3c(%ebx)
release(&lk->lk);
8010454c: 89 75 08 mov %esi,0x8(%ebp)
}
8010454f: 8d 65 f8 lea -0x8(%ebp),%esp
80104552: 5b pop %ebx
80104553: 5e pop %esi
80104554: 5d pop %ebp
release(&lk->lk);
80104555: e9 e6 02 00 00 jmp 80104840 <release>
8010455a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80104560 <releasesleep>:
void
releasesleep(struct sleeplock *lk)
{
80104560: f3 0f 1e fb endbr32
80104564: 55 push %ebp
80104565: 89 e5 mov %esp,%ebp
80104567: 56 push %esi
80104568: 53 push %ebx
80104569: 8b 5d 08 mov 0x8(%ebp),%ebx
acquire(&lk->lk);
8010456c: 8d 73 04 lea 0x4(%ebx),%esi
8010456f: 83 ec 0c sub $0xc,%esp
80104572: 56 push %esi
80104573: e8 08 02 00 00 call 80104780 <acquire>
lk->locked = 0;
80104578: c7 03 00 00 00 00 movl $0x0,(%ebx)
lk->pid = 0;
8010457e: c7 43 3c 00 00 00 00 movl $0x0,0x3c(%ebx)
wakeup(lk);
80104585: 89 1c 24 mov %ebx,(%esp)
80104588: e8 53 fb ff ff call 801040e0 <wakeup>
release(&lk->lk);
8010458d: 89 75 08 mov %esi,0x8(%ebp)
80104590: 83 c4 10 add $0x10,%esp
}
80104593: 8d 65 f8 lea -0x8(%ebp),%esp
80104596: 5b pop %ebx
80104597: 5e pop %esi
80104598: 5d pop %ebp
release(&lk->lk);
80104599: e9 a2 02 00 00 jmp 80104840 <release>
8010459e: 66 90 xchg %ax,%ax
801045a0 <holdingsleep>:
int
holdingsleep(struct sleeplock *lk)
{
801045a0: f3 0f 1e fb endbr32
801045a4: 55 push %ebp
801045a5: 89 e5 mov %esp,%ebp
801045a7: 57 push %edi
801045a8: 31 ff xor %edi,%edi
801045aa: 56 push %esi
801045ab: 53 push %ebx
801045ac: 83 ec 18 sub $0x18,%esp
801045af: 8b 5d 08 mov 0x8(%ebp),%ebx
int r;
acquire(&lk->lk);
801045b2: 8d 73 04 lea 0x4(%ebx),%esi
801045b5: 56 push %esi
801045b6: e8 c5 01 00 00 call 80104780 <acquire>
r = lk->locked && (lk->pid == myproc()->pid);
801045bb: 8b 03 mov (%ebx),%eax
801045bd: 83 c4 10 add $0x10,%esp
801045c0: 85 c0 test %eax,%eax
801045c2: 75 1c jne 801045e0 <holdingsleep+0x40>
release(&lk->lk);
801045c4: 83 ec 0c sub $0xc,%esp
801045c7: 56 push %esi
801045c8: e8 73 02 00 00 call 80104840 <release>
return r;
}
801045cd: 8d 65 f4 lea -0xc(%ebp),%esp
801045d0: 89 f8 mov %edi,%eax
801045d2: 5b pop %ebx
801045d3: 5e pop %esi
801045d4: 5f pop %edi
801045d5: 5d pop %ebp
801045d6: c3 ret
801045d7: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801045de: 66 90 xchg %ax,%ax
r = lk->locked && (lk->pid == myproc()->pid);
801045e0: 8b 5b 3c mov 0x3c(%ebx),%ebx
801045e3: e8 78 f3 ff ff call 80103960 <myproc>
801045e8: 39 58 10 cmp %ebx,0x10(%eax)
801045eb: 0f 94 c0 sete %al
801045ee: 0f b6 c0 movzbl %al,%eax
801045f1: 89 c7 mov %eax,%edi
801045f3: eb cf jmp 801045c4 <holdingsleep+0x24>
801045f5: 66 90 xchg %ax,%ax
801045f7: 66 90 xchg %ax,%ax
801045f9: 66 90 xchg %ax,%ax
801045fb: 66 90 xchg %ax,%ax
801045fd: 66 90 xchg %ax,%ax
801045ff: 90 nop
80104600 <initlock>:
#include "proc.h"
#include "spinlock.h"
void
initlock(struct spinlock *lk, char *name)
{
80104600: f3 0f 1e fb endbr32
80104604: 55 push %ebp
80104605: 89 e5 mov %esp,%ebp
80104607: 8b 45 08 mov 0x8(%ebp),%eax
lk->name = name;
8010460a: 8b 55 0c mov 0xc(%ebp),%edx
lk->locked = 0;
8010460d: c7 00 00 00 00 00 movl $0x0,(%eax)
lk->name = name;
80104613: 89 50 04 mov %edx,0x4(%eax)
lk->cpu = 0;
80104616: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
}
8010461d: 5d pop %ebp
8010461e: c3 ret
8010461f: 90 nop
80104620 <getcallerpcs>:
}
// Record the current call stack in pcs[] by following the %ebp chain.
void
getcallerpcs(void *v, uint pcs[])
{
80104620: f3 0f 1e fb endbr32
80104624: 55 push %ebp
uint *ebp;
int i;
ebp = (uint*)v - 2;
for(i = 0; i < 10; i++){
80104625: 31 d2 xor %edx,%edx
{
80104627: 89 e5 mov %esp,%ebp
80104629: 53 push %ebx
ebp = (uint*)v - 2;
8010462a: 8b 45 08 mov 0x8(%ebp),%eax
{
8010462d: 8b 4d 0c mov 0xc(%ebp),%ecx
ebp = (uint*)v - 2;
80104630: 83 e8 08 sub $0x8,%eax
for(i = 0; i < 10; i++){
80104633: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104637: 90 nop
if(ebp == 0 || ebp < (uint*)KERNBASE || ebp == (uint*)0xffffffff)
80104638: 8d 98 00 00 00 80 lea -0x80000000(%eax),%ebx
8010463e: 81 fb fe ff ff 7f cmp $0x7ffffffe,%ebx
80104644: 77 1a ja 80104660 <getcallerpcs+0x40>
break;
pcs[i] = ebp[1]; // saved %eip
80104646: 8b 58 04 mov 0x4(%eax),%ebx
80104649: 89 1c 91 mov %ebx,(%ecx,%edx,4)
for(i = 0; i < 10; i++){
8010464c: 83 c2 01 add $0x1,%edx
ebp = (uint*)ebp[0]; // saved %ebp
8010464f: 8b 00 mov (%eax),%eax
for(i = 0; i < 10; i++){
80104651: 83 fa 0a cmp $0xa,%edx
80104654: 75 e2 jne 80104638 <getcallerpcs+0x18>
}
for(; i < 10; i++)
pcs[i] = 0;
}
80104656: 5b pop %ebx
80104657: 5d pop %ebp
80104658: c3 ret
80104659: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
for(; i < 10; i++)
80104660: 8d 04 91 lea (%ecx,%edx,4),%eax
80104663: 8d 51 28 lea 0x28(%ecx),%edx
80104666: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010466d: 8d 76 00 lea 0x0(%esi),%esi
pcs[i] = 0;
80104670: c7 00 00 00 00 00 movl $0x0,(%eax)
for(; i < 10; i++)
80104676: 83 c0 04 add $0x4,%eax
80104679: 39 d0 cmp %edx,%eax
8010467b: 75 f3 jne 80104670 <getcallerpcs+0x50>
}
8010467d: 5b pop %ebx
8010467e: 5d pop %ebp
8010467f: c3 ret
80104680 <pushcli>:
// it takes two popcli to undo two pushcli. Also, if interrupts
// are off, then pushcli, popcli leaves them off.
void
pushcli(void)
{
80104680: f3 0f 1e fb endbr32
80104684: 55 push %ebp
80104685: 89 e5 mov %esp,%ebp
80104687: 53 push %ebx
80104688: 83 ec 04 sub $0x4,%esp
8010468b: 9c pushf
8010468c: 5b pop %ebx
asm volatile("cli");
8010468d: fa cli
int eflags;
eflags = readeflags();
cli();
if(mycpu()->ncli == 0)
8010468e: e8 3d f2 ff ff call 801038d0 <mycpu>
80104693: 8b 80 a4 00 00 00 mov 0xa4(%eax),%eax
80104699: 85 c0 test %eax,%eax
8010469b: 74 13 je 801046b0 <pushcli+0x30>
mycpu()->intena = eflags & FL_IF;
mycpu()->ncli += 1;
8010469d: e8 2e f2 ff ff call 801038d0 <mycpu>
801046a2: 83 80 a4 00 00 00 01 addl $0x1,0xa4(%eax)
}
801046a9: 83 c4 04 add $0x4,%esp
801046ac: 5b pop %ebx
801046ad: 5d pop %ebp
801046ae: c3 ret
801046af: 90 nop
mycpu()->intena = eflags & FL_IF;
801046b0: e8 1b f2 ff ff call 801038d0 <mycpu>
801046b5: 81 e3 00 02 00 00 and $0x200,%ebx
801046bb: 89 98 a8 00 00 00 mov %ebx,0xa8(%eax)
801046c1: eb da jmp 8010469d <pushcli+0x1d>
801046c3: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801046ca: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801046d0 <popcli>:
void
popcli(void)
{
801046d0: f3 0f 1e fb endbr32
801046d4: 55 push %ebp
801046d5: 89 e5 mov %esp,%ebp
801046d7: 83 ec 08 sub $0x8,%esp
asm volatile("pushfl; popl %0" : "=r" (eflags));
801046da: 9c pushf
801046db: 58 pop %eax
if(readeflags()&FL_IF)
801046dc: f6 c4 02 test $0x2,%ah
801046df: 75 31 jne 80104712 <popcli+0x42>
panic("popcli - interruptible");
if(--mycpu()->ncli < 0)
801046e1: e8 ea f1 ff ff call 801038d0 <mycpu>
801046e6: 83 a8 a4 00 00 00 01 subl $0x1,0xa4(%eax)
801046ed: 78 30 js 8010471f <popcli+0x4f>
panic("popcli");
if(mycpu()->ncli == 0 && mycpu()->intena)
801046ef: e8 dc f1 ff ff call 801038d0 <mycpu>
801046f4: 8b 90 a4 00 00 00 mov 0xa4(%eax),%edx
801046fa: 85 d2 test %edx,%edx
801046fc: 74 02 je 80104700 <popcli+0x30>
sti();
}
801046fe: c9 leave
801046ff: c3 ret
if(mycpu()->ncli == 0 && mycpu()->intena)
80104700: e8 cb f1 ff ff call 801038d0 <mycpu>
80104705: 8b 80 a8 00 00 00 mov 0xa8(%eax),%eax
8010470b: 85 c0 test %eax,%eax
8010470d: 74 ef je 801046fe <popcli+0x2e>
asm volatile("sti");
8010470f: fb sti
}
80104710: c9 leave
80104711: c3 ret
panic("popcli - interruptible");
80104712: 83 ec 0c sub $0xc,%esp
80104715: 68 ef 7b 10 80 push $0x80107bef
8010471a: e8 71 bc ff ff call 80100390 <panic>
panic("popcli");
8010471f: 83 ec 0c sub $0xc,%esp
80104722: 68 06 7c 10 80 push $0x80107c06
80104727: e8 64 bc ff ff call 80100390 <panic>
8010472c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104730 <holding>:
{
80104730: f3 0f 1e fb endbr32
80104734: 55 push %ebp
80104735: 89 e5 mov %esp,%ebp
80104737: 56 push %esi
80104738: 53 push %ebx
80104739: 8b 75 08 mov 0x8(%ebp),%esi
8010473c: 31 db xor %ebx,%ebx
pushcli();
8010473e: e8 3d ff ff ff call 80104680 <pushcli>
r = lock->locked && lock->cpu == mycpu();
80104743: 8b 06 mov (%esi),%eax
80104745: 85 c0 test %eax,%eax
80104747: 75 0f jne 80104758 <holding+0x28>
popcli();
80104749: e8 82 ff ff ff call 801046d0 <popcli>
}
8010474e: 89 d8 mov %ebx,%eax
80104750: 5b pop %ebx
80104751: 5e pop %esi
80104752: 5d pop %ebp
80104753: c3 ret
80104754: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
r = lock->locked && lock->cpu == mycpu();
80104758: 8b 5e 08 mov 0x8(%esi),%ebx
8010475b: e8 70 f1 ff ff call 801038d0 <mycpu>
80104760: 39 c3 cmp %eax,%ebx
80104762: 0f 94 c3 sete %bl
popcli();
80104765: e8 66 ff ff ff call 801046d0 <popcli>
r = lock->locked && lock->cpu == mycpu();
8010476a: 0f b6 db movzbl %bl,%ebx
}
8010476d: 89 d8 mov %ebx,%eax
8010476f: 5b pop %ebx
80104770: 5e pop %esi
80104771: 5d pop %ebp
80104772: c3 ret
80104773: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010477a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80104780 <acquire>:
{
80104780: f3 0f 1e fb endbr32
80104784: 55 push %ebp
80104785: 89 e5 mov %esp,%ebp
80104787: 56 push %esi
80104788: 53 push %ebx
pushcli(); // disable interrupts to avoid deadlock.
80104789: e8 f2 fe ff ff call 80104680 <pushcli>
if(holding(lk))
8010478e: 8b 5d 08 mov 0x8(%ebp),%ebx
80104791: 83 ec 0c sub $0xc,%esp
80104794: 53 push %ebx
80104795: e8 96 ff ff ff call 80104730 <holding>
8010479a: 83 c4 10 add $0x10,%esp
8010479d: 85 c0 test %eax,%eax
8010479f: 0f 85 7f 00 00 00 jne 80104824 <acquire+0xa4>
801047a5: 89 c6 mov %eax,%esi
asm volatile("lock; xchgl %0, %1" :
801047a7: ba 01 00 00 00 mov $0x1,%edx
801047ac: eb 05 jmp 801047b3 <acquire+0x33>
801047ae: 66 90 xchg %ax,%ax
801047b0: 8b 5d 08 mov 0x8(%ebp),%ebx
801047b3: 89 d0 mov %edx,%eax
801047b5: f0 87 03 lock xchg %eax,(%ebx)
while(xchg(&lk->locked, 1) != 0)
801047b8: 85 c0 test %eax,%eax
801047ba: 75 f4 jne 801047b0 <acquire+0x30>
__sync_synchronize();
801047bc: f0 83 0c 24 00 lock orl $0x0,(%esp)
lk->cpu = mycpu();
801047c1: 8b 5d 08 mov 0x8(%ebp),%ebx
801047c4: e8 07 f1 ff ff call 801038d0 <mycpu>
801047c9: 89 43 08 mov %eax,0x8(%ebx)
ebp = (uint*)v - 2;
801047cc: 89 e8 mov %ebp,%eax
801047ce: 66 90 xchg %ax,%ax
if(ebp == 0 || ebp < (uint*)KERNBASE || ebp == (uint*)0xffffffff)
801047d0: 8d 90 00 00 00 80 lea -0x80000000(%eax),%edx
801047d6: 81 fa fe ff ff 7f cmp $0x7ffffffe,%edx
801047dc: 77 22 ja 80104800 <acquire+0x80>
pcs[i] = ebp[1]; // saved %eip
801047de: 8b 50 04 mov 0x4(%eax),%edx
801047e1: 89 54 b3 0c mov %edx,0xc(%ebx,%esi,4)
for(i = 0; i < 10; i++){
801047e5: 83 c6 01 add $0x1,%esi
ebp = (uint*)ebp[0]; // saved %ebp
801047e8: 8b 00 mov (%eax),%eax
for(i = 0; i < 10; i++){
801047ea: 83 fe 0a cmp $0xa,%esi
801047ed: 75 e1 jne 801047d0 <acquire+0x50>
}
801047ef: 8d 65 f8 lea -0x8(%ebp),%esp
801047f2: 5b pop %ebx
801047f3: 5e pop %esi
801047f4: 5d pop %ebp
801047f5: c3 ret
801047f6: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801047fd: 8d 76 00 lea 0x0(%esi),%esi
for(; i < 10; i++)
80104800: 8d 44 b3 0c lea 0xc(%ebx,%esi,4),%eax
80104804: 83 c3 34 add $0x34,%ebx
80104807: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010480e: 66 90 xchg %ax,%ax
pcs[i] = 0;
80104810: c7 00 00 00 00 00 movl $0x0,(%eax)
for(; i < 10; i++)
80104816: 83 c0 04 add $0x4,%eax
80104819: 39 d8 cmp %ebx,%eax
8010481b: 75 f3 jne 80104810 <acquire+0x90>
}
8010481d: 8d 65 f8 lea -0x8(%ebp),%esp
80104820: 5b pop %ebx
80104821: 5e pop %esi
80104822: 5d pop %ebp
80104823: c3 ret
panic("acquire");
80104824: 83 ec 0c sub $0xc,%esp
80104827: 68 0d 7c 10 80 push $0x80107c0d
8010482c: e8 5f bb ff ff call 80100390 <panic>
80104831: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104838: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010483f: 90 nop
80104840 <release>:
{
80104840: f3 0f 1e fb endbr32
80104844: 55 push %ebp
80104845: 89 e5 mov %esp,%ebp
80104847: 53 push %ebx
80104848: 83 ec 10 sub $0x10,%esp
8010484b: 8b 5d 08 mov 0x8(%ebp),%ebx
if(!holding(lk))
8010484e: 53 push %ebx
8010484f: e8 dc fe ff ff call 80104730 <holding>
80104854: 83 c4 10 add $0x10,%esp
80104857: 85 c0 test %eax,%eax
80104859: 74 22 je 8010487d <release+0x3d>
lk->pcs[0] = 0;
8010485b: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
lk->cpu = 0;
80104862: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
__sync_synchronize();
80104869: f0 83 0c 24 00 lock orl $0x0,(%esp)
asm volatile("movl $0, %0" : "+m" (lk->locked) : );
8010486e: c7 03 00 00 00 00 movl $0x0,(%ebx)
}
80104874: 8b 5d fc mov -0x4(%ebp),%ebx
80104877: c9 leave
popcli();
80104878: e9 53 fe ff ff jmp 801046d0 <popcli>
panic("release");
8010487d: 83 ec 0c sub $0xc,%esp
80104880: 68 15 7c 10 80 push $0x80107c15
80104885: e8 06 bb ff ff call 80100390 <panic>
8010488a: 66 90 xchg %ax,%ax
8010488c: 66 90 xchg %ax,%ax
8010488e: 66 90 xchg %ax,%ax
80104890 <memset>:
#include "types.h"
#include "x86.h"
void*
memset(void *dst, int c, uint n)
{
80104890: f3 0f 1e fb endbr32
80104894: 55 push %ebp
80104895: 89 e5 mov %esp,%ebp
80104897: 57 push %edi
80104898: 8b 55 08 mov 0x8(%ebp),%edx
8010489b: 8b 4d 10 mov 0x10(%ebp),%ecx
8010489e: 53 push %ebx
8010489f: 8b 45 0c mov 0xc(%ebp),%eax
if ((int)dst%4 == 0 && n%4 == 0){
801048a2: 89 d7 mov %edx,%edi
801048a4: 09 cf or %ecx,%edi
801048a6: 83 e7 03 and $0x3,%edi
801048a9: 75 25 jne 801048d0 <memset+0x40>
c &= 0xFF;
801048ab: 0f b6 f8 movzbl %al,%edi
stosl(dst, (c<<24)|(c<<16)|(c<<8)|c, n/4);
801048ae: c1 e0 18 shl $0x18,%eax
801048b1: 89 fb mov %edi,%ebx
801048b3: c1 e9 02 shr $0x2,%ecx
801048b6: c1 e3 10 shl $0x10,%ebx
801048b9: 09 d8 or %ebx,%eax
801048bb: 09 f8 or %edi,%eax
801048bd: c1 e7 08 shl $0x8,%edi
801048c0: 09 f8 or %edi,%eax
asm volatile("cld; rep stosl" :
801048c2: 89 d7 mov %edx,%edi
801048c4: fc cld
801048c5: f3 ab rep stos %eax,%es:(%edi)
} else
stosb(dst, c, n);
return dst;
}
801048c7: 5b pop %ebx
801048c8: 89 d0 mov %edx,%eax
801048ca: 5f pop %edi
801048cb: 5d pop %ebp
801048cc: c3 ret
801048cd: 8d 76 00 lea 0x0(%esi),%esi
asm volatile("cld; rep stosb" :
801048d0: 89 d7 mov %edx,%edi
801048d2: fc cld
801048d3: f3 aa rep stos %al,%es:(%edi)
801048d5: 5b pop %ebx
801048d6: 89 d0 mov %edx,%eax
801048d8: 5f pop %edi
801048d9: 5d pop %ebp
801048da: c3 ret
801048db: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801048df: 90 nop
801048e0 <memcmp>:
int
memcmp(const void *v1, const void *v2, uint n)
{
801048e0: f3 0f 1e fb endbr32
801048e4: 55 push %ebp
801048e5: 89 e5 mov %esp,%ebp
801048e7: 56 push %esi
801048e8: 8b 75 10 mov 0x10(%ebp),%esi
801048eb: 8b 55 08 mov 0x8(%ebp),%edx
801048ee: 53 push %ebx
801048ef: 8b 45 0c mov 0xc(%ebp),%eax
const uchar *s1, *s2;
s1 = v1;
s2 = v2;
while(n-- > 0){
801048f2: 85 f6 test %esi,%esi
801048f4: 74 2a je 80104920 <memcmp+0x40>
801048f6: 01 c6 add %eax,%esi
801048f8: eb 10 jmp 8010490a <memcmp+0x2a>
801048fa: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
if(*s1 != *s2)
return *s1 - *s2;
s1++, s2++;
80104900: 83 c0 01 add $0x1,%eax
80104903: 83 c2 01 add $0x1,%edx
while(n-- > 0){
80104906: 39 f0 cmp %esi,%eax
80104908: 74 16 je 80104920 <memcmp+0x40>
if(*s1 != *s2)
8010490a: 0f b6 0a movzbl (%edx),%ecx
8010490d: 0f b6 18 movzbl (%eax),%ebx
80104910: 38 d9 cmp %bl,%cl
80104912: 74 ec je 80104900 <memcmp+0x20>
return *s1 - *s2;
80104914: 0f b6 c1 movzbl %cl,%eax
80104917: 29 d8 sub %ebx,%eax
}
return 0;
}
80104919: 5b pop %ebx
8010491a: 5e pop %esi
8010491b: 5d pop %ebp
8010491c: c3 ret
8010491d: 8d 76 00 lea 0x0(%esi),%esi
80104920: 5b pop %ebx
return 0;
80104921: 31 c0 xor %eax,%eax
}
80104923: 5e pop %esi
80104924: 5d pop %ebp
80104925: c3 ret
80104926: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010492d: 8d 76 00 lea 0x0(%esi),%esi
80104930 <memmove>:
void*
memmove(void *dst, const void *src, uint n)
{
80104930: f3 0f 1e fb endbr32
80104934: 55 push %ebp
80104935: 89 e5 mov %esp,%ebp
80104937: 57 push %edi
80104938: 8b 55 08 mov 0x8(%ebp),%edx
8010493b: 8b 4d 10 mov 0x10(%ebp),%ecx
8010493e: 56 push %esi
8010493f: 8b 75 0c mov 0xc(%ebp),%esi
const char *s;
char *d;
s = src;
d = dst;
if(s < d && s + n > d){
80104942: 39 d6 cmp %edx,%esi
80104944: 73 2a jae 80104970 <memmove+0x40>
80104946: 8d 3c 0e lea (%esi,%ecx,1),%edi
80104949: 39 fa cmp %edi,%edx
8010494b: 73 23 jae 80104970 <memmove+0x40>
8010494d: 8d 41 ff lea -0x1(%ecx),%eax
s += n;
d += n;
while(n-- > 0)
80104950: 85 c9 test %ecx,%ecx
80104952: 74 13 je 80104967 <memmove+0x37>
80104954: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
*--d = *--s;
80104958: 0f b6 0c 06 movzbl (%esi,%eax,1),%ecx
8010495c: 88 0c 02 mov %cl,(%edx,%eax,1)
while(n-- > 0)
8010495f: 83 e8 01 sub $0x1,%eax
80104962: 83 f8 ff cmp $0xffffffff,%eax
80104965: 75 f1 jne 80104958 <memmove+0x28>
} else
while(n-- > 0)
*d++ = *s++;
return dst;
}
80104967: 5e pop %esi
80104968: 89 d0 mov %edx,%eax
8010496a: 5f pop %edi
8010496b: 5d pop %ebp
8010496c: c3 ret
8010496d: 8d 76 00 lea 0x0(%esi),%esi
while(n-- > 0)
80104970: 8d 04 0e lea (%esi,%ecx,1),%eax
80104973: 89 d7 mov %edx,%edi
80104975: 85 c9 test %ecx,%ecx
80104977: 74 ee je 80104967 <memmove+0x37>
80104979: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
*d++ = *s++;
80104980: a4 movsb %ds:(%esi),%es:(%edi)
while(n-- > 0)
80104981: 39 f0 cmp %esi,%eax
80104983: 75 fb jne 80104980 <memmove+0x50>
}
80104985: 5e pop %esi
80104986: 89 d0 mov %edx,%eax
80104988: 5f pop %edi
80104989: 5d pop %ebp
8010498a: c3 ret
8010498b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
8010498f: 90 nop
80104990 <memcpy>:
// memcpy exists to placate GCC. Use memmove.
void*
memcpy(void *dst, const void *src, uint n)
{
80104990: f3 0f 1e fb endbr32
return memmove(dst, src, n);
80104994: eb 9a jmp 80104930 <memmove>
80104996: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010499d: 8d 76 00 lea 0x0(%esi),%esi
801049a0 <strncmp>:
}
int
strncmp(const char *p, const char *q, uint n)
{
801049a0: f3 0f 1e fb endbr32
801049a4: 55 push %ebp
801049a5: 89 e5 mov %esp,%ebp
801049a7: 56 push %esi
801049a8: 8b 75 10 mov 0x10(%ebp),%esi
801049ab: 8b 4d 08 mov 0x8(%ebp),%ecx
801049ae: 53 push %ebx
801049af: 8b 45 0c mov 0xc(%ebp),%eax
while(n > 0 && *p && *p == *q)
801049b2: 85 f6 test %esi,%esi
801049b4: 74 32 je 801049e8 <strncmp+0x48>
801049b6: 01 c6 add %eax,%esi
801049b8: eb 14 jmp 801049ce <strncmp+0x2e>
801049ba: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801049c0: 38 da cmp %bl,%dl
801049c2: 75 14 jne 801049d8 <strncmp+0x38>
n--, p++, q++;
801049c4: 83 c0 01 add $0x1,%eax
801049c7: 83 c1 01 add $0x1,%ecx
while(n > 0 && *p && *p == *q)
801049ca: 39 f0 cmp %esi,%eax
801049cc: 74 1a je 801049e8 <strncmp+0x48>
801049ce: 0f b6 11 movzbl (%ecx),%edx
801049d1: 0f b6 18 movzbl (%eax),%ebx
801049d4: 84 d2 test %dl,%dl
801049d6: 75 e8 jne 801049c0 <strncmp+0x20>
if(n == 0)
return 0;
return (uchar)*p - (uchar)*q;
801049d8: 0f b6 c2 movzbl %dl,%eax
801049db: 29 d8 sub %ebx,%eax
}
801049dd: 5b pop %ebx
801049de: 5e pop %esi
801049df: 5d pop %ebp
801049e0: c3 ret
801049e1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801049e8: 5b pop %ebx
return 0;
801049e9: 31 c0 xor %eax,%eax
}
801049eb: 5e pop %esi
801049ec: 5d pop %ebp
801049ed: c3 ret
801049ee: 66 90 xchg %ax,%ax
801049f0 <strncpy>:
char*
strncpy(char *s, const char *t, int n)
{
801049f0: f3 0f 1e fb endbr32
801049f4: 55 push %ebp
801049f5: 89 e5 mov %esp,%ebp
801049f7: 57 push %edi
801049f8: 56 push %esi
801049f9: 8b 75 08 mov 0x8(%ebp),%esi
801049fc: 53 push %ebx
801049fd: 8b 45 10 mov 0x10(%ebp),%eax
char *os;
os = s;
while(n-- > 0 && (*s++ = *t++) != 0)
80104a00: 89 f2 mov %esi,%edx
80104a02: eb 1b jmp 80104a1f <strncpy+0x2f>
80104a04: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104a08: 83 45 0c 01 addl $0x1,0xc(%ebp)
80104a0c: 8b 7d 0c mov 0xc(%ebp),%edi
80104a0f: 83 c2 01 add $0x1,%edx
80104a12: 0f b6 7f ff movzbl -0x1(%edi),%edi
80104a16: 89 f9 mov %edi,%ecx
80104a18: 88 4a ff mov %cl,-0x1(%edx)
80104a1b: 84 c9 test %cl,%cl
80104a1d: 74 09 je 80104a28 <strncpy+0x38>
80104a1f: 89 c3 mov %eax,%ebx
80104a21: 83 e8 01 sub $0x1,%eax
80104a24: 85 db test %ebx,%ebx
80104a26: 7f e0 jg 80104a08 <strncpy+0x18>
;
while(n-- > 0)
80104a28: 89 d1 mov %edx,%ecx
80104a2a: 85 c0 test %eax,%eax
80104a2c: 7e 15 jle 80104a43 <strncpy+0x53>
80104a2e: 66 90 xchg %ax,%ax
*s++ = 0;
80104a30: 83 c1 01 add $0x1,%ecx
80104a33: c6 41 ff 00 movb $0x0,-0x1(%ecx)
while(n-- > 0)
80104a37: 89 c8 mov %ecx,%eax
80104a39: f7 d0 not %eax
80104a3b: 01 d0 add %edx,%eax
80104a3d: 01 d8 add %ebx,%eax
80104a3f: 85 c0 test %eax,%eax
80104a41: 7f ed jg 80104a30 <strncpy+0x40>
return os;
}
80104a43: 5b pop %ebx
80104a44: 89 f0 mov %esi,%eax
80104a46: 5e pop %esi
80104a47: 5f pop %edi
80104a48: 5d pop %ebp
80104a49: c3 ret
80104a4a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80104a50 <safestrcpy>:
// Like strncpy but guaranteed to NUL-terminate.
char*
safestrcpy(char *s, const char *t, int n)
{
80104a50: f3 0f 1e fb endbr32
80104a54: 55 push %ebp
80104a55: 89 e5 mov %esp,%ebp
80104a57: 56 push %esi
80104a58: 8b 55 10 mov 0x10(%ebp),%edx
80104a5b: 8b 75 08 mov 0x8(%ebp),%esi
80104a5e: 53 push %ebx
80104a5f: 8b 45 0c mov 0xc(%ebp),%eax
char *os;
os = s;
if(n <= 0)
80104a62: 85 d2 test %edx,%edx
80104a64: 7e 21 jle 80104a87 <safestrcpy+0x37>
80104a66: 8d 5c 10 ff lea -0x1(%eax,%edx,1),%ebx
80104a6a: 89 f2 mov %esi,%edx
80104a6c: eb 12 jmp 80104a80 <safestrcpy+0x30>
80104a6e: 66 90 xchg %ax,%ax
return os;
while(--n > 0 && (*s++ = *t++) != 0)
80104a70: 0f b6 08 movzbl (%eax),%ecx
80104a73: 83 c0 01 add $0x1,%eax
80104a76: 83 c2 01 add $0x1,%edx
80104a79: 88 4a ff mov %cl,-0x1(%edx)
80104a7c: 84 c9 test %cl,%cl
80104a7e: 74 04 je 80104a84 <safestrcpy+0x34>
80104a80: 39 d8 cmp %ebx,%eax
80104a82: 75 ec jne 80104a70 <safestrcpy+0x20>
;
*s = 0;
80104a84: c6 02 00 movb $0x0,(%edx)
return os;
}
80104a87: 89 f0 mov %esi,%eax
80104a89: 5b pop %ebx
80104a8a: 5e pop %esi
80104a8b: 5d pop %ebp
80104a8c: c3 ret
80104a8d: 8d 76 00 lea 0x0(%esi),%esi
80104a90 <strlen>:
int
strlen(const char *s)
{
80104a90: f3 0f 1e fb endbr32
80104a94: 55 push %ebp
int n;
for(n = 0; s[n]; n++)
80104a95: 31 c0 xor %eax,%eax
{
80104a97: 89 e5 mov %esp,%ebp
80104a99: 8b 55 08 mov 0x8(%ebp),%edx
for(n = 0; s[n]; n++)
80104a9c: 80 3a 00 cmpb $0x0,(%edx)
80104a9f: 74 10 je 80104ab1 <strlen+0x21>
80104aa1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104aa8: 83 c0 01 add $0x1,%eax
80104aab: 80 3c 02 00 cmpb $0x0,(%edx,%eax,1)
80104aaf: 75 f7 jne 80104aa8 <strlen+0x18>
;
return n;
}
80104ab1: 5d pop %ebp
80104ab2: c3 ret
80104ab3 <swtch>:
# a struct context, and save its address in *old.
# Switch stacks to new and pop previously-saved registers.
.globl swtch
swtch:
movl 4(%esp), %eax
80104ab3: 8b 44 24 04 mov 0x4(%esp),%eax
movl 8(%esp), %edx
80104ab7: 8b 54 24 08 mov 0x8(%esp),%edx
# Save old callee-saved registers
pushl %ebp
80104abb: 55 push %ebp
pushl %ebx
80104abc: 53 push %ebx
pushl %esi
80104abd: 56 push %esi
pushl %edi
80104abe: 57 push %edi
# Switch stacks
movl %esp, (%eax)
80104abf: 89 20 mov %esp,(%eax)
movl %edx, %esp
80104ac1: 89 d4 mov %edx,%esp
# Load new callee-saved registers
popl %edi
80104ac3: 5f pop %edi
popl %esi
80104ac4: 5e pop %esi
popl %ebx
80104ac5: 5b pop %ebx
popl %ebp
80104ac6: 5d pop %ebp
ret
80104ac7: c3 ret
80104ac8: 66 90 xchg %ax,%ax
80104aca: 66 90 xchg %ax,%ax
80104acc: 66 90 xchg %ax,%ax
80104ace: 66 90 xchg %ax,%ax
80104ad0 <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)
{
80104ad0: f3 0f 1e fb endbr32
80104ad4: 55 push %ebp
80104ad5: 89 e5 mov %esp,%ebp
80104ad7: 53 push %ebx
80104ad8: 83 ec 04 sub $0x4,%esp
80104adb: 8b 5d 08 mov 0x8(%ebp),%ebx
struct proc *curproc = myproc();
80104ade: e8 7d ee ff ff call 80103960 <myproc>
if(addr >= curproc->sz || addr+4 > curproc->sz)
80104ae3: 8b 00 mov (%eax),%eax
80104ae5: 39 d8 cmp %ebx,%eax
80104ae7: 76 17 jbe 80104b00 <fetchint+0x30>
80104ae9: 8d 53 04 lea 0x4(%ebx),%edx
80104aec: 39 d0 cmp %edx,%eax
80104aee: 72 10 jb 80104b00 <fetchint+0x30>
return -1;
*ip = *(int*)(addr);
80104af0: 8b 45 0c mov 0xc(%ebp),%eax
80104af3: 8b 13 mov (%ebx),%edx
80104af5: 89 10 mov %edx,(%eax)
return 0;
80104af7: 31 c0 xor %eax,%eax
}
80104af9: 83 c4 04 add $0x4,%esp
80104afc: 5b pop %ebx
80104afd: 5d pop %ebp
80104afe: c3 ret
80104aff: 90 nop
return -1;
80104b00: b8 ff ff ff ff mov $0xffffffff,%eax
80104b05: eb f2 jmp 80104af9 <fetchint+0x29>
80104b07: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104b0e: 66 90 xchg %ax,%ax
80104b10 <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)
{
80104b10: f3 0f 1e fb endbr32
80104b14: 55 push %ebp
80104b15: 89 e5 mov %esp,%ebp
80104b17: 53 push %ebx
80104b18: 83 ec 04 sub $0x4,%esp
80104b1b: 8b 5d 08 mov 0x8(%ebp),%ebx
char *s, *ep;
struct proc *curproc = myproc();
80104b1e: e8 3d ee ff ff call 80103960 <myproc>
if(addr >= curproc->sz)
80104b23: 39 18 cmp %ebx,(%eax)
80104b25: 76 31 jbe 80104b58 <fetchstr+0x48>
return -1;
*pp = (char*)addr;
80104b27: 8b 55 0c mov 0xc(%ebp),%edx
80104b2a: 89 1a mov %ebx,(%edx)
ep = (char*)curproc->sz;
80104b2c: 8b 10 mov (%eax),%edx
for(s = *pp; s < ep; s++){
80104b2e: 39 d3 cmp %edx,%ebx
80104b30: 73 26 jae 80104b58 <fetchstr+0x48>
80104b32: 89 d8 mov %ebx,%eax
80104b34: eb 11 jmp 80104b47 <fetchstr+0x37>
80104b36: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104b3d: 8d 76 00 lea 0x0(%esi),%esi
80104b40: 83 c0 01 add $0x1,%eax
80104b43: 39 c2 cmp %eax,%edx
80104b45: 76 11 jbe 80104b58 <fetchstr+0x48>
if(*s == 0)
80104b47: 80 38 00 cmpb $0x0,(%eax)
80104b4a: 75 f4 jne 80104b40 <fetchstr+0x30>
return s - *pp;
}
return -1;
}
80104b4c: 83 c4 04 add $0x4,%esp
return s - *pp;
80104b4f: 29 d8 sub %ebx,%eax
}
80104b51: 5b pop %ebx
80104b52: 5d pop %ebp
80104b53: c3 ret
80104b54: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104b58: 83 c4 04 add $0x4,%esp
return -1;
80104b5b: b8 ff ff ff ff mov $0xffffffff,%eax
}
80104b60: 5b pop %ebx
80104b61: 5d pop %ebp
80104b62: c3 ret
80104b63: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104b6a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80104b70 <argint>:
// Fetch the nth 32-bit system call argument.
int
argint(int n, int *ip)
{
80104b70: f3 0f 1e fb endbr32
80104b74: 55 push %ebp
80104b75: 89 e5 mov %esp,%ebp
80104b77: 56 push %esi
80104b78: 53 push %ebx
return fetchint((myproc()->tf->esp) + 4 + 4*n, ip);
80104b79: e8 e2 ed ff ff call 80103960 <myproc>
80104b7e: 8b 55 08 mov 0x8(%ebp),%edx
80104b81: 8b 40 18 mov 0x18(%eax),%eax
80104b84: 8b 40 44 mov 0x44(%eax),%eax
80104b87: 8d 1c 90 lea (%eax,%edx,4),%ebx
struct proc *curproc = myproc();
80104b8a: e8 d1 ed ff ff call 80103960 <myproc>
return fetchint((myproc()->tf->esp) + 4 + 4*n, ip);
80104b8f: 8d 73 04 lea 0x4(%ebx),%esi
if(addr >= curproc->sz || addr+4 > curproc->sz)
80104b92: 8b 00 mov (%eax),%eax
80104b94: 39 c6 cmp %eax,%esi
80104b96: 73 18 jae 80104bb0 <argint+0x40>
80104b98: 8d 53 08 lea 0x8(%ebx),%edx
80104b9b: 39 d0 cmp %edx,%eax
80104b9d: 72 11 jb 80104bb0 <argint+0x40>
*ip = *(int*)(addr);
80104b9f: 8b 45 0c mov 0xc(%ebp),%eax
80104ba2: 8b 53 04 mov 0x4(%ebx),%edx
80104ba5: 89 10 mov %edx,(%eax)
return 0;
80104ba7: 31 c0 xor %eax,%eax
}
80104ba9: 5b pop %ebx
80104baa: 5e pop %esi
80104bab: 5d pop %ebp
80104bac: c3 ret
80104bad: 8d 76 00 lea 0x0(%esi),%esi
return -1;
80104bb0: b8 ff ff ff ff mov $0xffffffff,%eax
return fetchint((myproc()->tf->esp) + 4 + 4*n, ip);
80104bb5: eb f2 jmp 80104ba9 <argint+0x39>
80104bb7: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104bbe: 66 90 xchg %ax,%ax
80104bc0 <argptr>:
// Fetch the nth word-sized system call argument as a pointer
// to a block of memory of size bytes. Check that the pointer
// lies within the process address space.
int
argptr(int n, char **pp, int size)
{
80104bc0: f3 0f 1e fb endbr32
80104bc4: 55 push %ebp
80104bc5: 89 e5 mov %esp,%ebp
80104bc7: 56 push %esi
80104bc8: 53 push %ebx
80104bc9: 83 ec 10 sub $0x10,%esp
80104bcc: 8b 5d 10 mov 0x10(%ebp),%ebx
int i;
struct proc *curproc = myproc();
80104bcf: e8 8c ed ff ff call 80103960 <myproc>
if(argint(n, &i) < 0)
80104bd4: 83 ec 08 sub $0x8,%esp
struct proc *curproc = myproc();
80104bd7: 89 c6 mov %eax,%esi
if(argint(n, &i) < 0)
80104bd9: 8d 45 f4 lea -0xc(%ebp),%eax
80104bdc: 50 push %eax
80104bdd: ff 75 08 pushl 0x8(%ebp)
80104be0: e8 8b ff ff ff call 80104b70 <argint>
return -1;
if(size < 0 || (uint)i >= curproc->sz || (uint)i+size > curproc->sz)
80104be5: 83 c4 10 add $0x10,%esp
80104be8: 85 c0 test %eax,%eax
80104bea: 78 24 js 80104c10 <argptr+0x50>
80104bec: 85 db test %ebx,%ebx
80104bee: 78 20 js 80104c10 <argptr+0x50>
80104bf0: 8b 16 mov (%esi),%edx
80104bf2: 8b 45 f4 mov -0xc(%ebp),%eax
80104bf5: 39 c2 cmp %eax,%edx
80104bf7: 76 17 jbe 80104c10 <argptr+0x50>
80104bf9: 01 c3 add %eax,%ebx
80104bfb: 39 da cmp %ebx,%edx
80104bfd: 72 11 jb 80104c10 <argptr+0x50>
return -1;
*pp = (char*)i;
80104bff: 8b 55 0c mov 0xc(%ebp),%edx
80104c02: 89 02 mov %eax,(%edx)
return 0;
80104c04: 31 c0 xor %eax,%eax
}
80104c06: 8d 65 f8 lea -0x8(%ebp),%esp
80104c09: 5b pop %ebx
80104c0a: 5e pop %esi
80104c0b: 5d pop %ebp
80104c0c: c3 ret
80104c0d: 8d 76 00 lea 0x0(%esi),%esi
return -1;
80104c10: b8 ff ff ff ff mov $0xffffffff,%eax
80104c15: eb ef jmp 80104c06 <argptr+0x46>
80104c17: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104c1e: 66 90 xchg %ax,%ax
80104c20 <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)
{
80104c20: f3 0f 1e fb endbr32
80104c24: 55 push %ebp
80104c25: 89 e5 mov %esp,%ebp
80104c27: 83 ec 20 sub $0x20,%esp
int addr;
if(argint(n, &addr) < 0)
80104c2a: 8d 45 f4 lea -0xc(%ebp),%eax
80104c2d: 50 push %eax
80104c2e: ff 75 08 pushl 0x8(%ebp)
80104c31: e8 3a ff ff ff call 80104b70 <argint>
80104c36: 83 c4 10 add $0x10,%esp
80104c39: 85 c0 test %eax,%eax
80104c3b: 78 13 js 80104c50 <argstr+0x30>
return -1;
return fetchstr(addr, pp);
80104c3d: 83 ec 08 sub $0x8,%esp
80104c40: ff 75 0c pushl 0xc(%ebp)
80104c43: ff 75 f4 pushl -0xc(%ebp)
80104c46: e8 c5 fe ff ff call 80104b10 <fetchstr>
80104c4b: 83 c4 10 add $0x10,%esp
}
80104c4e: c9 leave
80104c4f: c3 ret
80104c50: c9 leave
return -1;
80104c51: b8 ff ff ff ff mov $0xffffffff,%eax
}
80104c56: c3 ret
80104c57: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104c5e: 66 90 xchg %ax,%ax
80104c60 <syscall>:
[SYS_join] sys_join,
};
void
syscall(void)
{
80104c60: f3 0f 1e fb endbr32
80104c64: 55 push %ebp
80104c65: 89 e5 mov %esp,%ebp
80104c67: 53 push %ebx
80104c68: 83 ec 04 sub $0x4,%esp
int num;
struct proc *curproc = myproc();
80104c6b: e8 f0 ec ff ff call 80103960 <myproc>
80104c70: 89 c3 mov %eax,%ebx
num = curproc->tf->eax;
80104c72: 8b 40 18 mov 0x18(%eax),%eax
80104c75: 8b 40 1c mov 0x1c(%eax),%eax
if(num > 0 && num < NELEM(syscalls) && syscalls[num]) {
80104c78: 8d 50 ff lea -0x1(%eax),%edx
80104c7b: 83 fa 16 cmp $0x16,%edx
80104c7e: 77 20 ja 80104ca0 <syscall+0x40>
80104c80: 8b 14 85 40 7c 10 80 mov -0x7fef83c0(,%eax,4),%edx
80104c87: 85 d2 test %edx,%edx
80104c89: 74 15 je 80104ca0 <syscall+0x40>
curproc->tf->eax = syscalls[num]();
80104c8b: ff d2 call *%edx
80104c8d: 89 c2 mov %eax,%edx
80104c8f: 8b 43 18 mov 0x18(%ebx),%eax
80104c92: 89 50 1c mov %edx,0x1c(%eax)
} else {
cprintf("%d %s: unknown sys call %d\n",
curproc->pid, curproc->name, num);
curproc->tf->eax = -1;
}
}
80104c95: 8b 5d fc mov -0x4(%ebp),%ebx
80104c98: c9 leave
80104c99: c3 ret
80104c9a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
cprintf("%d %s: unknown sys call %d\n",
80104ca0: 50 push %eax
curproc->pid, curproc->name, num);
80104ca1: 8d 43 6c lea 0x6c(%ebx),%eax
cprintf("%d %s: unknown sys call %d\n",
80104ca4: 50 push %eax
80104ca5: ff 73 10 pushl 0x10(%ebx)
80104ca8: 68 1d 7c 10 80 push $0x80107c1d
80104cad: e8 fe b9 ff ff call 801006b0 <cprintf>
curproc->tf->eax = -1;
80104cb2: 8b 43 18 mov 0x18(%ebx),%eax
80104cb5: 83 c4 10 add $0x10,%esp
80104cb8: c7 40 1c ff ff ff ff movl $0xffffffff,0x1c(%eax)
}
80104cbf: 8b 5d fc mov -0x4(%ebp),%ebx
80104cc2: c9 leave
80104cc3: c3 ret
80104cc4: 66 90 xchg %ax,%ax
80104cc6: 66 90 xchg %ax,%ax
80104cc8: 66 90 xchg %ax,%ax
80104cca: 66 90 xchg %ax,%ax
80104ccc: 66 90 xchg %ax,%ax
80104cce: 66 90 xchg %ax,%ax
80104cd0 <create>:
return -1;
}
static struct inode*
create(char *path, short type, short major, short minor)
{
80104cd0: 55 push %ebp
80104cd1: 89 e5 mov %esp,%ebp
80104cd3: 57 push %edi
80104cd4: 56 push %esi
struct inode *ip, *dp;
char name[DIRSIZ];
if((dp = nameiparent(path, name)) == 0)
80104cd5: 8d 7d da lea -0x26(%ebp),%edi
{
80104cd8: 53 push %ebx
80104cd9: 83 ec 34 sub $0x34,%esp
80104cdc: 89 4d d0 mov %ecx,-0x30(%ebp)
80104cdf: 8b 4d 08 mov 0x8(%ebp),%ecx
if((dp = nameiparent(path, name)) == 0)
80104ce2: 57 push %edi
80104ce3: 50 push %eax
{
80104ce4: 89 55 d4 mov %edx,-0x2c(%ebp)
80104ce7: 89 4d cc mov %ecx,-0x34(%ebp)
if((dp = nameiparent(path, name)) == 0)
80104cea: e8 61 d3 ff ff call 80102050 <nameiparent>
80104cef: 83 c4 10 add $0x10,%esp
80104cf2: 85 c0 test %eax,%eax
80104cf4: 0f 84 46 01 00 00 je 80104e40 <create+0x170>
return 0;
ilock(dp);
80104cfa: 83 ec 0c sub $0xc,%esp
80104cfd: 89 c3 mov %eax,%ebx
80104cff: 50 push %eax
80104d00: e8 5b ca ff ff call 80101760 <ilock>
if((ip = dirlookup(dp, name, 0)) != 0){
80104d05: 83 c4 0c add $0xc,%esp
80104d08: 6a 00 push $0x0
80104d0a: 57 push %edi
80104d0b: 53 push %ebx
80104d0c: e8 9f cf ff ff call 80101cb0 <dirlookup>
80104d11: 83 c4 10 add $0x10,%esp
80104d14: 89 c6 mov %eax,%esi
80104d16: 85 c0 test %eax,%eax
80104d18: 74 56 je 80104d70 <create+0xa0>
iunlockput(dp);
80104d1a: 83 ec 0c sub $0xc,%esp
80104d1d: 53 push %ebx
80104d1e: e8 dd cc ff ff call 80101a00 <iunlockput>
ilock(ip);
80104d23: 89 34 24 mov %esi,(%esp)
80104d26: e8 35 ca ff ff call 80101760 <ilock>
if(type == T_FILE && ip->type == T_FILE)
80104d2b: 83 c4 10 add $0x10,%esp
80104d2e: 66 83 7d d4 02 cmpw $0x2,-0x2c(%ebp)
80104d33: 75 1b jne 80104d50 <create+0x80>
80104d35: 66 83 7e 50 02 cmpw $0x2,0x50(%esi)
80104d3a: 75 14 jne 80104d50 <create+0x80>
panic("create: dirlink");
iunlockput(dp);
return ip;
}
80104d3c: 8d 65 f4 lea -0xc(%ebp),%esp
80104d3f: 89 f0 mov %esi,%eax
80104d41: 5b pop %ebx
80104d42: 5e pop %esi
80104d43: 5f pop %edi
80104d44: 5d pop %ebp
80104d45: c3 ret
80104d46: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104d4d: 8d 76 00 lea 0x0(%esi),%esi
iunlockput(ip);
80104d50: 83 ec 0c sub $0xc,%esp
80104d53: 56 push %esi
return 0;
80104d54: 31 f6 xor %esi,%esi
iunlockput(ip);
80104d56: e8 a5 cc ff ff call 80101a00 <iunlockput>
return 0;
80104d5b: 83 c4 10 add $0x10,%esp
}
80104d5e: 8d 65 f4 lea -0xc(%ebp),%esp
80104d61: 89 f0 mov %esi,%eax
80104d63: 5b pop %ebx
80104d64: 5e pop %esi
80104d65: 5f pop %edi
80104d66: 5d pop %ebp
80104d67: c3 ret
80104d68: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104d6f: 90 nop
if((ip = ialloc(dp->dev, type)) == 0)
80104d70: 0f bf 45 d4 movswl -0x2c(%ebp),%eax
80104d74: 83 ec 08 sub $0x8,%esp
80104d77: 50 push %eax
80104d78: ff 33 pushl (%ebx)
80104d7a: e8 61 c8 ff ff call 801015e0 <ialloc>
80104d7f: 83 c4 10 add $0x10,%esp
80104d82: 89 c6 mov %eax,%esi
80104d84: 85 c0 test %eax,%eax
80104d86: 0f 84 cd 00 00 00 je 80104e59 <create+0x189>
ilock(ip);
80104d8c: 83 ec 0c sub $0xc,%esp
80104d8f: 50 push %eax
80104d90: e8 cb c9 ff ff call 80101760 <ilock>
ip->major = major;
80104d95: 0f b7 45 d0 movzwl -0x30(%ebp),%eax
80104d99: 66 89 46 52 mov %ax,0x52(%esi)
ip->minor = minor;
80104d9d: 0f b7 45 cc movzwl -0x34(%ebp),%eax
80104da1: 66 89 46 54 mov %ax,0x54(%esi)
ip->nlink = 1;
80104da5: b8 01 00 00 00 mov $0x1,%eax
80104daa: 66 89 46 56 mov %ax,0x56(%esi)
iupdate(ip);
80104dae: 89 34 24 mov %esi,(%esp)
80104db1: e8 ea c8 ff ff call 801016a0 <iupdate>
if(type == T_DIR){ // Create . and .. entries.
80104db6: 83 c4 10 add $0x10,%esp
80104db9: 66 83 7d d4 01 cmpw $0x1,-0x2c(%ebp)
80104dbe: 74 30 je 80104df0 <create+0x120>
if(dirlink(dp, name, ip->inum) < 0)
80104dc0: 83 ec 04 sub $0x4,%esp
80104dc3: ff 76 04 pushl 0x4(%esi)
80104dc6: 57 push %edi
80104dc7: 53 push %ebx
80104dc8: e8 a3 d1 ff ff call 80101f70 <dirlink>
80104dcd: 83 c4 10 add $0x10,%esp
80104dd0: 85 c0 test %eax,%eax
80104dd2: 78 78 js 80104e4c <create+0x17c>
iunlockput(dp);
80104dd4: 83 ec 0c sub $0xc,%esp
80104dd7: 53 push %ebx
80104dd8: e8 23 cc ff ff call 80101a00 <iunlockput>
return ip;
80104ddd: 83 c4 10 add $0x10,%esp
}
80104de0: 8d 65 f4 lea -0xc(%ebp),%esp
80104de3: 89 f0 mov %esi,%eax
80104de5: 5b pop %ebx
80104de6: 5e pop %esi
80104de7: 5f pop %edi
80104de8: 5d pop %ebp
80104de9: c3 ret
80104dea: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
iupdate(dp);
80104df0: 83 ec 0c sub $0xc,%esp
dp->nlink++; // for ".."
80104df3: 66 83 43 56 01 addw $0x1,0x56(%ebx)
iupdate(dp);
80104df8: 53 push %ebx
80104df9: e8 a2 c8 ff ff call 801016a0 <iupdate>
if(dirlink(ip, ".", ip->inum) < 0 || dirlink(ip, "..", dp->inum) < 0)
80104dfe: 83 c4 0c add $0xc,%esp
80104e01: ff 76 04 pushl 0x4(%esi)
80104e04: 68 bc 7c 10 80 push $0x80107cbc
80104e09: 56 push %esi
80104e0a: e8 61 d1 ff ff call 80101f70 <dirlink>
80104e0f: 83 c4 10 add $0x10,%esp
80104e12: 85 c0 test %eax,%eax
80104e14: 78 18 js 80104e2e <create+0x15e>
80104e16: 83 ec 04 sub $0x4,%esp
80104e19: ff 73 04 pushl 0x4(%ebx)
80104e1c: 68 bb 7c 10 80 push $0x80107cbb
80104e21: 56 push %esi
80104e22: e8 49 d1 ff ff call 80101f70 <dirlink>
80104e27: 83 c4 10 add $0x10,%esp
80104e2a: 85 c0 test %eax,%eax
80104e2c: 79 92 jns 80104dc0 <create+0xf0>
panic("create dots");
80104e2e: 83 ec 0c sub $0xc,%esp
80104e31: 68 af 7c 10 80 push $0x80107caf
80104e36: e8 55 b5 ff ff call 80100390 <panic>
80104e3b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104e3f: 90 nop
}
80104e40: 8d 65 f4 lea -0xc(%ebp),%esp
return 0;
80104e43: 31 f6 xor %esi,%esi
}
80104e45: 5b pop %ebx
80104e46: 89 f0 mov %esi,%eax
80104e48: 5e pop %esi
80104e49: 5f pop %edi
80104e4a: 5d pop %ebp
80104e4b: c3 ret
panic("create: dirlink");
80104e4c: 83 ec 0c sub $0xc,%esp
80104e4f: 68 be 7c 10 80 push $0x80107cbe
80104e54: e8 37 b5 ff ff call 80100390 <panic>
panic("create: ialloc");
80104e59: 83 ec 0c sub $0xc,%esp
80104e5c: 68 a0 7c 10 80 push $0x80107ca0
80104e61: e8 2a b5 ff ff call 80100390 <panic>
80104e66: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104e6d: 8d 76 00 lea 0x0(%esi),%esi
80104e70 <argfd.constprop.0>:
argfd(int n, int *pfd, struct file **pf)
80104e70: 55 push %ebp
80104e71: 89 e5 mov %esp,%ebp
80104e73: 56 push %esi
80104e74: 89 d6 mov %edx,%esi
80104e76: 53 push %ebx
80104e77: 89 c3 mov %eax,%ebx
if(argint(n, &fd) < 0)
80104e79: 8d 45 f4 lea -0xc(%ebp),%eax
argfd(int n, int *pfd, struct file **pf)
80104e7c: 83 ec 18 sub $0x18,%esp
if(argint(n, &fd) < 0)
80104e7f: 50 push %eax
80104e80: 6a 00 push $0x0
80104e82: e8 e9 fc ff ff call 80104b70 <argint>
80104e87: 83 c4 10 add $0x10,%esp
80104e8a: 85 c0 test %eax,%eax
80104e8c: 78 2a js 80104eb8 <argfd.constprop.0+0x48>
if(fd < 0 || fd >= NOFILE || (f=myproc()->ofile[fd]) == 0)
80104e8e: 83 7d f4 0f cmpl $0xf,-0xc(%ebp)
80104e92: 77 24 ja 80104eb8 <argfd.constprop.0+0x48>
80104e94: e8 c7 ea ff ff call 80103960 <myproc>
80104e99: 8b 55 f4 mov -0xc(%ebp),%edx
80104e9c: 8b 44 90 28 mov 0x28(%eax,%edx,4),%eax
80104ea0: 85 c0 test %eax,%eax
80104ea2: 74 14 je 80104eb8 <argfd.constprop.0+0x48>
if(pfd)
80104ea4: 85 db test %ebx,%ebx
80104ea6: 74 02 je 80104eaa <argfd.constprop.0+0x3a>
*pfd = fd;
80104ea8: 89 13 mov %edx,(%ebx)
*pf = f;
80104eaa: 89 06 mov %eax,(%esi)
return 0;
80104eac: 31 c0 xor %eax,%eax
}
80104eae: 8d 65 f8 lea -0x8(%ebp),%esp
80104eb1: 5b pop %ebx
80104eb2: 5e pop %esi
80104eb3: 5d pop %ebp
80104eb4: c3 ret
80104eb5: 8d 76 00 lea 0x0(%esi),%esi
return -1;
80104eb8: b8 ff ff ff ff mov $0xffffffff,%eax
80104ebd: eb ef jmp 80104eae <argfd.constprop.0+0x3e>
80104ebf: 90 nop
80104ec0 <sys_dup>:
{
80104ec0: f3 0f 1e fb endbr32
80104ec4: 55 push %ebp
if(argfd(0, 0, &f) < 0)
80104ec5: 31 c0 xor %eax,%eax
{
80104ec7: 89 e5 mov %esp,%ebp
80104ec9: 56 push %esi
80104eca: 53 push %ebx
if(argfd(0, 0, &f) < 0)
80104ecb: 8d 55 f4 lea -0xc(%ebp),%edx
{
80104ece: 83 ec 10 sub $0x10,%esp
if(argfd(0, 0, &f) < 0)
80104ed1: e8 9a ff ff ff call 80104e70 <argfd.constprop.0>
80104ed6: 85 c0 test %eax,%eax
80104ed8: 78 1e js 80104ef8 <sys_dup+0x38>
if((fd=fdalloc(f)) < 0)
80104eda: 8b 75 f4 mov -0xc(%ebp),%esi
for(fd = 0; fd < NOFILE; fd++){
80104edd: 31 db xor %ebx,%ebx
struct proc *curproc = myproc();
80104edf: e8 7c ea ff ff call 80103960 <myproc>
for(fd = 0; fd < NOFILE; fd++){
80104ee4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if(curproc->ofile[fd] == 0){
80104ee8: 8b 54 98 28 mov 0x28(%eax,%ebx,4),%edx
80104eec: 85 d2 test %edx,%edx
80104eee: 74 20 je 80104f10 <sys_dup+0x50>
for(fd = 0; fd < NOFILE; fd++){
80104ef0: 83 c3 01 add $0x1,%ebx
80104ef3: 83 fb 10 cmp $0x10,%ebx
80104ef6: 75 f0 jne 80104ee8 <sys_dup+0x28>
}
80104ef8: 8d 65 f8 lea -0x8(%ebp),%esp
return -1;
80104efb: bb ff ff ff ff mov $0xffffffff,%ebx
}
80104f00: 89 d8 mov %ebx,%eax
80104f02: 5b pop %ebx
80104f03: 5e pop %esi
80104f04: 5d pop %ebp
80104f05: c3 ret
80104f06: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104f0d: 8d 76 00 lea 0x0(%esi),%esi
curproc->ofile[fd] = f;
80104f10: 89 74 98 28 mov %esi,0x28(%eax,%ebx,4)
filedup(f);
80104f14: 83 ec 0c sub $0xc,%esp
80104f17: ff 75 f4 pushl -0xc(%ebp)
80104f1a: e8 51 bf ff ff call 80100e70 <filedup>
return fd;
80104f1f: 83 c4 10 add $0x10,%esp
}
80104f22: 8d 65 f8 lea -0x8(%ebp),%esp
80104f25: 89 d8 mov %ebx,%eax
80104f27: 5b pop %ebx
80104f28: 5e pop %esi
80104f29: 5d pop %ebp
80104f2a: c3 ret
80104f2b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104f2f: 90 nop
80104f30 <sys_read>:
{
80104f30: f3 0f 1e fb endbr32
80104f34: 55 push %ebp
if(argfd(0, 0, &f) < 0 || argint(2, &n) < 0 || argptr(1, &p, n) < 0)
80104f35: 31 c0 xor %eax,%eax
{
80104f37: 89 e5 mov %esp,%ebp
80104f39: 83 ec 18 sub $0x18,%esp
if(argfd(0, 0, &f) < 0 || argint(2, &n) < 0 || argptr(1, &p, n) < 0)
80104f3c: 8d 55 ec lea -0x14(%ebp),%edx
80104f3f: e8 2c ff ff ff call 80104e70 <argfd.constprop.0>
80104f44: 85 c0 test %eax,%eax
80104f46: 78 48 js 80104f90 <sys_read+0x60>
80104f48: 83 ec 08 sub $0x8,%esp
80104f4b: 8d 45 f0 lea -0x10(%ebp),%eax
80104f4e: 50 push %eax
80104f4f: 6a 02 push $0x2
80104f51: e8 1a fc ff ff call 80104b70 <argint>
80104f56: 83 c4 10 add $0x10,%esp
80104f59: 85 c0 test %eax,%eax
80104f5b: 78 33 js 80104f90 <sys_read+0x60>
80104f5d: 83 ec 04 sub $0x4,%esp
80104f60: 8d 45 f4 lea -0xc(%ebp),%eax
80104f63: ff 75 f0 pushl -0x10(%ebp)
80104f66: 50 push %eax
80104f67: 6a 01 push $0x1
80104f69: e8 52 fc ff ff call 80104bc0 <argptr>
80104f6e: 83 c4 10 add $0x10,%esp
80104f71: 85 c0 test %eax,%eax
80104f73: 78 1b js 80104f90 <sys_read+0x60>
return fileread(f, p, n);
80104f75: 83 ec 04 sub $0x4,%esp
80104f78: ff 75 f0 pushl -0x10(%ebp)
80104f7b: ff 75 f4 pushl -0xc(%ebp)
80104f7e: ff 75 ec pushl -0x14(%ebp)
80104f81: e8 6a c0 ff ff call 80100ff0 <fileread>
80104f86: 83 c4 10 add $0x10,%esp
}
80104f89: c9 leave
80104f8a: c3 ret
80104f8b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104f8f: 90 nop
80104f90: c9 leave
return -1;
80104f91: b8 ff ff ff ff mov $0xffffffff,%eax
}
80104f96: c3 ret
80104f97: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104f9e: 66 90 xchg %ax,%ax
80104fa0 <sys_write>:
{
80104fa0: f3 0f 1e fb endbr32
80104fa4: 55 push %ebp
if(argfd(0, 0, &f) < 0 || argint(2, &n) < 0 || argptr(1, &p, n) < 0)
80104fa5: 31 c0 xor %eax,%eax
{
80104fa7: 89 e5 mov %esp,%ebp
80104fa9: 83 ec 18 sub $0x18,%esp
if(argfd(0, 0, &f) < 0 || argint(2, &n) < 0 || argptr(1, &p, n) < 0)
80104fac: 8d 55 ec lea -0x14(%ebp),%edx
80104faf: e8 bc fe ff ff call 80104e70 <argfd.constprop.0>
80104fb4: 85 c0 test %eax,%eax
80104fb6: 78 48 js 80105000 <sys_write+0x60>
80104fb8: 83 ec 08 sub $0x8,%esp
80104fbb: 8d 45 f0 lea -0x10(%ebp),%eax
80104fbe: 50 push %eax
80104fbf: 6a 02 push $0x2
80104fc1: e8 aa fb ff ff call 80104b70 <argint>
80104fc6: 83 c4 10 add $0x10,%esp
80104fc9: 85 c0 test %eax,%eax
80104fcb: 78 33 js 80105000 <sys_write+0x60>
80104fcd: 83 ec 04 sub $0x4,%esp
80104fd0: 8d 45 f4 lea -0xc(%ebp),%eax
80104fd3: ff 75 f0 pushl -0x10(%ebp)
80104fd6: 50 push %eax
80104fd7: 6a 01 push $0x1
80104fd9: e8 e2 fb ff ff call 80104bc0 <argptr>
80104fde: 83 c4 10 add $0x10,%esp
80104fe1: 85 c0 test %eax,%eax
80104fe3: 78 1b js 80105000 <sys_write+0x60>
return filewrite(f, p, n);
80104fe5: 83 ec 04 sub $0x4,%esp
80104fe8: ff 75 f0 pushl -0x10(%ebp)
80104feb: ff 75 f4 pushl -0xc(%ebp)
80104fee: ff 75 ec pushl -0x14(%ebp)
80104ff1: e8 9a c0 ff ff call 80101090 <filewrite>
80104ff6: 83 c4 10 add $0x10,%esp
}
80104ff9: c9 leave
80104ffa: c3 ret
80104ffb: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104fff: 90 nop
80105000: c9 leave
return -1;
80105001: b8 ff ff ff ff mov $0xffffffff,%eax
}
80105006: c3 ret
80105007: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010500e: 66 90 xchg %ax,%ax
80105010 <sys_close>:
{
80105010: f3 0f 1e fb endbr32
80105014: 55 push %ebp
80105015: 89 e5 mov %esp,%ebp
80105017: 83 ec 18 sub $0x18,%esp
if(argfd(0, &fd, &f) < 0)
8010501a: 8d 55 f4 lea -0xc(%ebp),%edx
8010501d: 8d 45 f0 lea -0x10(%ebp),%eax
80105020: e8 4b fe ff ff call 80104e70 <argfd.constprop.0>
80105025: 85 c0 test %eax,%eax
80105027: 78 27 js 80105050 <sys_close+0x40>
myproc()->ofile[fd] = 0;
80105029: e8 32 e9 ff ff call 80103960 <myproc>
8010502e: 8b 55 f0 mov -0x10(%ebp),%edx
fileclose(f);
80105031: 83 ec 0c sub $0xc,%esp
myproc()->ofile[fd] = 0;
80105034: c7 44 90 28 00 00 00 movl $0x0,0x28(%eax,%edx,4)
8010503b: 00
fileclose(f);
8010503c: ff 75 f4 pushl -0xc(%ebp)
8010503f: e8 7c be ff ff call 80100ec0 <fileclose>
return 0;
80105044: 83 c4 10 add $0x10,%esp
80105047: 31 c0 xor %eax,%eax
}
80105049: c9 leave
8010504a: c3 ret
8010504b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
8010504f: 90 nop
80105050: c9 leave
return -1;
80105051: b8 ff ff ff ff mov $0xffffffff,%eax
}
80105056: c3 ret
80105057: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010505e: 66 90 xchg %ax,%ax
80105060 <sys_fstat>:
{
80105060: f3 0f 1e fb endbr32
80105064: 55 push %ebp
if(argfd(0, 0, &f) < 0 || argptr(1, (void*)&st, sizeof(*st)) < 0)
80105065: 31 c0 xor %eax,%eax
{
80105067: 89 e5 mov %esp,%ebp
80105069: 83 ec 18 sub $0x18,%esp
if(argfd(0, 0, &f) < 0 || argptr(1, (void*)&st, sizeof(*st)) < 0)
8010506c: 8d 55 f0 lea -0x10(%ebp),%edx
8010506f: e8 fc fd ff ff call 80104e70 <argfd.constprop.0>
80105074: 85 c0 test %eax,%eax
80105076: 78 30 js 801050a8 <sys_fstat+0x48>
80105078: 83 ec 04 sub $0x4,%esp
8010507b: 8d 45 f4 lea -0xc(%ebp),%eax
8010507e: 6a 14 push $0x14
80105080: 50 push %eax
80105081: 6a 01 push $0x1
80105083: e8 38 fb ff ff call 80104bc0 <argptr>
80105088: 83 c4 10 add $0x10,%esp
8010508b: 85 c0 test %eax,%eax
8010508d: 78 19 js 801050a8 <sys_fstat+0x48>
return filestat(f, st);
8010508f: 83 ec 08 sub $0x8,%esp
80105092: ff 75 f4 pushl -0xc(%ebp)
80105095: ff 75 f0 pushl -0x10(%ebp)
80105098: e8 03 bf ff ff call 80100fa0 <filestat>
8010509d: 83 c4 10 add $0x10,%esp
}
801050a0: c9 leave
801050a1: c3 ret
801050a2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801050a8: c9 leave
return -1;
801050a9: b8 ff ff ff ff mov $0xffffffff,%eax
}
801050ae: c3 ret
801050af: 90 nop
801050b0 <sys_link>:
{
801050b0: f3 0f 1e fb endbr32
801050b4: 55 push %ebp
801050b5: 89 e5 mov %esp,%ebp
801050b7: 57 push %edi
801050b8: 56 push %esi
if(argstr(0, &old) < 0 || argstr(1, &new) < 0)
801050b9: 8d 45 d4 lea -0x2c(%ebp),%eax
{
801050bc: 53 push %ebx
801050bd: 83 ec 34 sub $0x34,%esp
if(argstr(0, &old) < 0 || argstr(1, &new) < 0)
801050c0: 50 push %eax
801050c1: 6a 00 push $0x0
801050c3: e8 58 fb ff ff call 80104c20 <argstr>
801050c8: 83 c4 10 add $0x10,%esp
801050cb: 85 c0 test %eax,%eax
801050cd: 0f 88 ff 00 00 00 js 801051d2 <sys_link+0x122>
801050d3: 83 ec 08 sub $0x8,%esp
801050d6: 8d 45 d0 lea -0x30(%ebp),%eax
801050d9: 50 push %eax
801050da: 6a 01 push $0x1
801050dc: e8 3f fb ff ff call 80104c20 <argstr>
801050e1: 83 c4 10 add $0x10,%esp
801050e4: 85 c0 test %eax,%eax
801050e6: 0f 88 e6 00 00 00 js 801051d2 <sys_link+0x122>
begin_op();
801050ec: e8 3f dc ff ff call 80102d30 <begin_op>
if((ip = namei(old)) == 0){
801050f1: 83 ec 0c sub $0xc,%esp
801050f4: ff 75 d4 pushl -0x2c(%ebp)
801050f7: e8 34 cf ff ff call 80102030 <namei>
801050fc: 83 c4 10 add $0x10,%esp
801050ff: 89 c3 mov %eax,%ebx
80105101: 85 c0 test %eax,%eax
80105103: 0f 84 e8 00 00 00 je 801051f1 <sys_link+0x141>
ilock(ip);
80105109: 83 ec 0c sub $0xc,%esp
8010510c: 50 push %eax
8010510d: e8 4e c6 ff ff call 80101760 <ilock>
if(ip->type == T_DIR){
80105112: 83 c4 10 add $0x10,%esp
80105115: 66 83 7b 50 01 cmpw $0x1,0x50(%ebx)
8010511a: 0f 84 b9 00 00 00 je 801051d9 <sys_link+0x129>
iupdate(ip);
80105120: 83 ec 0c sub $0xc,%esp
ip->nlink++;
80105123: 66 83 43 56 01 addw $0x1,0x56(%ebx)
if((dp = nameiparent(new, name)) == 0)
80105128: 8d 7d da lea -0x26(%ebp),%edi
iupdate(ip);
8010512b: 53 push %ebx
8010512c: e8 6f c5 ff ff call 801016a0 <iupdate>
iunlock(ip);
80105131: 89 1c 24 mov %ebx,(%esp)
80105134: e8 07 c7 ff ff call 80101840 <iunlock>
if((dp = nameiparent(new, name)) == 0)
80105139: 58 pop %eax
8010513a: 5a pop %edx
8010513b: 57 push %edi
8010513c: ff 75 d0 pushl -0x30(%ebp)
8010513f: e8 0c cf ff ff call 80102050 <nameiparent>
80105144: 83 c4 10 add $0x10,%esp
80105147: 89 c6 mov %eax,%esi
80105149: 85 c0 test %eax,%eax
8010514b: 74 5f je 801051ac <sys_link+0xfc>
ilock(dp);
8010514d: 83 ec 0c sub $0xc,%esp
80105150: 50 push %eax
80105151: e8 0a c6 ff ff call 80101760 <ilock>
if(dp->dev != ip->dev || dirlink(dp, name, ip->inum) < 0){
80105156: 8b 03 mov (%ebx),%eax
80105158: 83 c4 10 add $0x10,%esp
8010515b: 39 06 cmp %eax,(%esi)
8010515d: 75 41 jne 801051a0 <sys_link+0xf0>
8010515f: 83 ec 04 sub $0x4,%esp
80105162: ff 73 04 pushl 0x4(%ebx)
80105165: 57 push %edi
80105166: 56 push %esi
80105167: e8 04 ce ff ff call 80101f70 <dirlink>
8010516c: 83 c4 10 add $0x10,%esp
8010516f: 85 c0 test %eax,%eax
80105171: 78 2d js 801051a0 <sys_link+0xf0>
iunlockput(dp);
80105173: 83 ec 0c sub $0xc,%esp
80105176: 56 push %esi
80105177: e8 84 c8 ff ff call 80101a00 <iunlockput>
iput(ip);
8010517c: 89 1c 24 mov %ebx,(%esp)
8010517f: e8 0c c7 ff ff call 80101890 <iput>
end_op();
80105184: e8 17 dc ff ff call 80102da0 <end_op>
return 0;
80105189: 83 c4 10 add $0x10,%esp
8010518c: 31 c0 xor %eax,%eax
}
8010518e: 8d 65 f4 lea -0xc(%ebp),%esp
80105191: 5b pop %ebx
80105192: 5e pop %esi
80105193: 5f pop %edi
80105194: 5d pop %ebp
80105195: c3 ret
80105196: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010519d: 8d 76 00 lea 0x0(%esi),%esi
iunlockput(dp);
801051a0: 83 ec 0c sub $0xc,%esp
801051a3: 56 push %esi
801051a4: e8 57 c8 ff ff call 80101a00 <iunlockput>
goto bad;
801051a9: 83 c4 10 add $0x10,%esp
ilock(ip);
801051ac: 83 ec 0c sub $0xc,%esp
801051af: 53 push %ebx
801051b0: e8 ab c5 ff ff call 80101760 <ilock>
ip->nlink--;
801051b5: 66 83 6b 56 01 subw $0x1,0x56(%ebx)
iupdate(ip);
801051ba: 89 1c 24 mov %ebx,(%esp)
801051bd: e8 de c4 ff ff call 801016a0 <iupdate>
iunlockput(ip);
801051c2: 89 1c 24 mov %ebx,(%esp)
801051c5: e8 36 c8 ff ff call 80101a00 <iunlockput>
end_op();
801051ca: e8 d1 db ff ff call 80102da0 <end_op>
return -1;
801051cf: 83 c4 10 add $0x10,%esp
801051d2: b8 ff ff ff ff mov $0xffffffff,%eax
801051d7: eb b5 jmp 8010518e <sys_link+0xde>
iunlockput(ip);
801051d9: 83 ec 0c sub $0xc,%esp
801051dc: 53 push %ebx
801051dd: e8 1e c8 ff ff call 80101a00 <iunlockput>
end_op();
801051e2: e8 b9 db ff ff call 80102da0 <end_op>
return -1;
801051e7: 83 c4 10 add $0x10,%esp
801051ea: b8 ff ff ff ff mov $0xffffffff,%eax
801051ef: eb 9d jmp 8010518e <sys_link+0xde>
end_op();
801051f1: e8 aa db ff ff call 80102da0 <end_op>
return -1;
801051f6: b8 ff ff ff ff mov $0xffffffff,%eax
801051fb: eb 91 jmp 8010518e <sys_link+0xde>
801051fd: 8d 76 00 lea 0x0(%esi),%esi
80105200 <sys_unlink>:
{
80105200: f3 0f 1e fb endbr32
80105204: 55 push %ebp
80105205: 89 e5 mov %esp,%ebp
80105207: 57 push %edi
80105208: 56 push %esi
if(argstr(0, &path) < 0)
80105209: 8d 45 c0 lea -0x40(%ebp),%eax
{
8010520c: 53 push %ebx
8010520d: 83 ec 54 sub $0x54,%esp
if(argstr(0, &path) < 0)
80105210: 50 push %eax
80105211: 6a 00 push $0x0
80105213: e8 08 fa ff ff call 80104c20 <argstr>
80105218: 83 c4 10 add $0x10,%esp
8010521b: 85 c0 test %eax,%eax
8010521d: 0f 88 7d 01 00 00 js 801053a0 <sys_unlink+0x1a0>
begin_op();
80105223: e8 08 db ff ff call 80102d30 <begin_op>
if((dp = nameiparent(path, name)) == 0){
80105228: 8d 5d ca lea -0x36(%ebp),%ebx
8010522b: 83 ec 08 sub $0x8,%esp
8010522e: 53 push %ebx
8010522f: ff 75 c0 pushl -0x40(%ebp)
80105232: e8 19 ce ff ff call 80102050 <nameiparent>
80105237: 83 c4 10 add $0x10,%esp
8010523a: 89 c6 mov %eax,%esi
8010523c: 85 c0 test %eax,%eax
8010523e: 0f 84 66 01 00 00 je 801053aa <sys_unlink+0x1aa>
ilock(dp);
80105244: 83 ec 0c sub $0xc,%esp
80105247: 50 push %eax
80105248: e8 13 c5 ff ff call 80101760 <ilock>
if(namecmp(name, ".") == 0 || namecmp(name, "..") == 0)
8010524d: 58 pop %eax
8010524e: 5a pop %edx
8010524f: 68 bc 7c 10 80 push $0x80107cbc
80105254: 53 push %ebx
80105255: e8 36 ca ff ff call 80101c90 <namecmp>
8010525a: 83 c4 10 add $0x10,%esp
8010525d: 85 c0 test %eax,%eax
8010525f: 0f 84 03 01 00 00 je 80105368 <sys_unlink+0x168>
80105265: 83 ec 08 sub $0x8,%esp
80105268: 68 bb 7c 10 80 push $0x80107cbb
8010526d: 53 push %ebx
8010526e: e8 1d ca ff ff call 80101c90 <namecmp>
80105273: 83 c4 10 add $0x10,%esp
80105276: 85 c0 test %eax,%eax
80105278: 0f 84 ea 00 00 00 je 80105368 <sys_unlink+0x168>
if((ip = dirlookup(dp, name, &off)) == 0)
8010527e: 83 ec 04 sub $0x4,%esp
80105281: 8d 45 c4 lea -0x3c(%ebp),%eax
80105284: 50 push %eax
80105285: 53 push %ebx
80105286: 56 push %esi
80105287: e8 24 ca ff ff call 80101cb0 <dirlookup>
8010528c: 83 c4 10 add $0x10,%esp
8010528f: 89 c3 mov %eax,%ebx
80105291: 85 c0 test %eax,%eax
80105293: 0f 84 cf 00 00 00 je 80105368 <sys_unlink+0x168>
ilock(ip);
80105299: 83 ec 0c sub $0xc,%esp
8010529c: 50 push %eax
8010529d: e8 be c4 ff ff call 80101760 <ilock>
if(ip->nlink < 1)
801052a2: 83 c4 10 add $0x10,%esp
801052a5: 66 83 7b 56 00 cmpw $0x0,0x56(%ebx)
801052aa: 0f 8e 23 01 00 00 jle 801053d3 <sys_unlink+0x1d3>
if(ip->type == T_DIR && !isdirempty(ip)){
801052b0: 66 83 7b 50 01 cmpw $0x1,0x50(%ebx)
801052b5: 8d 7d d8 lea -0x28(%ebp),%edi
801052b8: 74 66 je 80105320 <sys_unlink+0x120>
memset(&de, 0, sizeof(de));
801052ba: 83 ec 04 sub $0x4,%esp
801052bd: 6a 10 push $0x10
801052bf: 6a 00 push $0x0
801052c1: 57 push %edi
801052c2: e8 c9 f5 ff ff call 80104890 <memset>
if(writei(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
801052c7: 6a 10 push $0x10
801052c9: ff 75 c4 pushl -0x3c(%ebp)
801052cc: 57 push %edi
801052cd: 56 push %esi
801052ce: e8 8d c8 ff ff call 80101b60 <writei>
801052d3: 83 c4 20 add $0x20,%esp
801052d6: 83 f8 10 cmp $0x10,%eax
801052d9: 0f 85 e7 00 00 00 jne 801053c6 <sys_unlink+0x1c6>
if(ip->type == T_DIR){
801052df: 66 83 7b 50 01 cmpw $0x1,0x50(%ebx)
801052e4: 0f 84 96 00 00 00 je 80105380 <sys_unlink+0x180>
iunlockput(dp);
801052ea: 83 ec 0c sub $0xc,%esp
801052ed: 56 push %esi
801052ee: e8 0d c7 ff ff call 80101a00 <iunlockput>
ip->nlink--;
801052f3: 66 83 6b 56 01 subw $0x1,0x56(%ebx)
iupdate(ip);
801052f8: 89 1c 24 mov %ebx,(%esp)
801052fb: e8 a0 c3 ff ff call 801016a0 <iupdate>
iunlockput(ip);
80105300: 89 1c 24 mov %ebx,(%esp)
80105303: e8 f8 c6 ff ff call 80101a00 <iunlockput>
end_op();
80105308: e8 93 da ff ff call 80102da0 <end_op>
return 0;
8010530d: 83 c4 10 add $0x10,%esp
80105310: 31 c0 xor %eax,%eax
}
80105312: 8d 65 f4 lea -0xc(%ebp),%esp
80105315: 5b pop %ebx
80105316: 5e pop %esi
80105317: 5f pop %edi
80105318: 5d pop %ebp
80105319: c3 ret
8010531a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
for(off=2*sizeof(de); off<dp->size; off+=sizeof(de)){
80105320: 83 7b 58 20 cmpl $0x20,0x58(%ebx)
80105324: 76 94 jbe 801052ba <sys_unlink+0xba>
80105326: ba 20 00 00 00 mov $0x20,%edx
8010532b: eb 0b jmp 80105338 <sys_unlink+0x138>
8010532d: 8d 76 00 lea 0x0(%esi),%esi
80105330: 83 c2 10 add $0x10,%edx
80105333: 39 53 58 cmp %edx,0x58(%ebx)
80105336: 76 82 jbe 801052ba <sys_unlink+0xba>
if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
80105338: 6a 10 push $0x10
8010533a: 52 push %edx
8010533b: 57 push %edi
8010533c: 53 push %ebx
8010533d: 89 55 b4 mov %edx,-0x4c(%ebp)
80105340: e8 1b c7 ff ff call 80101a60 <readi>
80105345: 83 c4 10 add $0x10,%esp
80105348: 8b 55 b4 mov -0x4c(%ebp),%edx
8010534b: 83 f8 10 cmp $0x10,%eax
8010534e: 75 69 jne 801053b9 <sys_unlink+0x1b9>
if(de.inum != 0)
80105350: 66 83 7d d8 00 cmpw $0x0,-0x28(%ebp)
80105355: 74 d9 je 80105330 <sys_unlink+0x130>
iunlockput(ip);
80105357: 83 ec 0c sub $0xc,%esp
8010535a: 53 push %ebx
8010535b: e8 a0 c6 ff ff call 80101a00 <iunlockput>
goto bad;
80105360: 83 c4 10 add $0x10,%esp
80105363: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80105367: 90 nop
iunlockput(dp);
80105368: 83 ec 0c sub $0xc,%esp
8010536b: 56 push %esi
8010536c: e8 8f c6 ff ff call 80101a00 <iunlockput>
end_op();
80105371: e8 2a da ff ff call 80102da0 <end_op>
return -1;
80105376: 83 c4 10 add $0x10,%esp
80105379: b8 ff ff ff ff mov $0xffffffff,%eax
8010537e: eb 92 jmp 80105312 <sys_unlink+0x112>
iupdate(dp);
80105380: 83 ec 0c sub $0xc,%esp
dp->nlink--;
80105383: 66 83 6e 56 01 subw $0x1,0x56(%esi)
iupdate(dp);
80105388: 56 push %esi
80105389: e8 12 c3 ff ff call 801016a0 <iupdate>
8010538e: 83 c4 10 add $0x10,%esp
80105391: e9 54 ff ff ff jmp 801052ea <sys_unlink+0xea>
80105396: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010539d: 8d 76 00 lea 0x0(%esi),%esi
return -1;
801053a0: b8 ff ff ff ff mov $0xffffffff,%eax
801053a5: e9 68 ff ff ff jmp 80105312 <sys_unlink+0x112>
end_op();
801053aa: e8 f1 d9 ff ff call 80102da0 <end_op>
return -1;
801053af: b8 ff ff ff ff mov $0xffffffff,%eax
801053b4: e9 59 ff ff ff jmp 80105312 <sys_unlink+0x112>
panic("isdirempty: readi");
801053b9: 83 ec 0c sub $0xc,%esp
801053bc: 68 e0 7c 10 80 push $0x80107ce0
801053c1: e8 ca af ff ff call 80100390 <panic>
panic("unlink: writei");
801053c6: 83 ec 0c sub $0xc,%esp
801053c9: 68 f2 7c 10 80 push $0x80107cf2
801053ce: e8 bd af ff ff call 80100390 <panic>
panic("unlink: nlink < 1");
801053d3: 83 ec 0c sub $0xc,%esp
801053d6: 68 ce 7c 10 80 push $0x80107cce
801053db: e8 b0 af ff ff call 80100390 <panic>
801053e0 <sys_open>:
int
sys_open(void)
{
801053e0: f3 0f 1e fb endbr32
801053e4: 55 push %ebp
801053e5: 89 e5 mov %esp,%ebp
801053e7: 57 push %edi
801053e8: 56 push %esi
char *path;
int fd, omode;
struct file *f;
struct inode *ip;
if(argstr(0, &path) < 0 || argint(1, &omode) < 0)
801053e9: 8d 45 e0 lea -0x20(%ebp),%eax
{
801053ec: 53 push %ebx
801053ed: 83 ec 24 sub $0x24,%esp
if(argstr(0, &path) < 0 || argint(1, &omode) < 0)
801053f0: 50 push %eax
801053f1: 6a 00 push $0x0
801053f3: e8 28 f8 ff ff call 80104c20 <argstr>
801053f8: 83 c4 10 add $0x10,%esp
801053fb: 85 c0 test %eax,%eax
801053fd: 0f 88 8a 00 00 00 js 8010548d <sys_open+0xad>
80105403: 83 ec 08 sub $0x8,%esp
80105406: 8d 45 e4 lea -0x1c(%ebp),%eax
80105409: 50 push %eax
8010540a: 6a 01 push $0x1
8010540c: e8 5f f7 ff ff call 80104b70 <argint>
80105411: 83 c4 10 add $0x10,%esp
80105414: 85 c0 test %eax,%eax
80105416: 78 75 js 8010548d <sys_open+0xad>
return -1;
begin_op();
80105418: e8 13 d9 ff ff call 80102d30 <begin_op>
if(omode & O_CREATE){
8010541d: f6 45 e5 02 testb $0x2,-0x1b(%ebp)
80105421: 75 75 jne 80105498 <sys_open+0xb8>
if(ip == 0){
end_op();
return -1;
}
} else {
if((ip = namei(path)) == 0){
80105423: 83 ec 0c sub $0xc,%esp
80105426: ff 75 e0 pushl -0x20(%ebp)
80105429: e8 02 cc ff ff call 80102030 <namei>
8010542e: 83 c4 10 add $0x10,%esp
80105431: 89 c6 mov %eax,%esi
80105433: 85 c0 test %eax,%eax
80105435: 74 7e je 801054b5 <sys_open+0xd5>
end_op();
return -1;
}
ilock(ip);
80105437: 83 ec 0c sub $0xc,%esp
8010543a: 50 push %eax
8010543b: e8 20 c3 ff ff call 80101760 <ilock>
if(ip->type == T_DIR && omode != O_RDONLY){
80105440: 83 c4 10 add $0x10,%esp
80105443: 66 83 7e 50 01 cmpw $0x1,0x50(%esi)
80105448: 0f 84 c2 00 00 00 je 80105510 <sys_open+0x130>
end_op();
return -1;
}
}
if((f = filealloc()) == 0 || (fd = fdalloc(f)) < 0){
8010544e: e8 ad b9 ff ff call 80100e00 <filealloc>
80105453: 89 c7 mov %eax,%edi
80105455: 85 c0 test %eax,%eax
80105457: 74 23 je 8010547c <sys_open+0x9c>
struct proc *curproc = myproc();
80105459: e8 02 e5 ff ff call 80103960 <myproc>
for(fd = 0; fd < NOFILE; fd++){
8010545e: 31 db xor %ebx,%ebx
if(curproc->ofile[fd] == 0){
80105460: 8b 54 98 28 mov 0x28(%eax,%ebx,4),%edx
80105464: 85 d2 test %edx,%edx
80105466: 74 60 je 801054c8 <sys_open+0xe8>
for(fd = 0; fd < NOFILE; fd++){
80105468: 83 c3 01 add $0x1,%ebx
8010546b: 83 fb 10 cmp $0x10,%ebx
8010546e: 75 f0 jne 80105460 <sys_open+0x80>
if(f)
fileclose(f);
80105470: 83 ec 0c sub $0xc,%esp
80105473: 57 push %edi
80105474: e8 47 ba ff ff call 80100ec0 <fileclose>
80105479: 83 c4 10 add $0x10,%esp
iunlockput(ip);
8010547c: 83 ec 0c sub $0xc,%esp
8010547f: 56 push %esi
80105480: e8 7b c5 ff ff call 80101a00 <iunlockput>
end_op();
80105485: e8 16 d9 ff ff call 80102da0 <end_op>
return -1;
8010548a: 83 c4 10 add $0x10,%esp
8010548d: bb ff ff ff ff mov $0xffffffff,%ebx
80105492: eb 6d jmp 80105501 <sys_open+0x121>
80105494: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
ip = create(path, T_FILE, 0, 0);
80105498: 83 ec 0c sub $0xc,%esp
8010549b: 8b 45 e0 mov -0x20(%ebp),%eax
8010549e: 31 c9 xor %ecx,%ecx
801054a0: ba 02 00 00 00 mov $0x2,%edx
801054a5: 6a 00 push $0x0
801054a7: e8 24 f8 ff ff call 80104cd0 <create>
if(ip == 0){
801054ac: 83 c4 10 add $0x10,%esp
ip = create(path, T_FILE, 0, 0);
801054af: 89 c6 mov %eax,%esi
if(ip == 0){
801054b1: 85 c0 test %eax,%eax
801054b3: 75 99 jne 8010544e <sys_open+0x6e>
end_op();
801054b5: e8 e6 d8 ff ff call 80102da0 <end_op>
return -1;
801054ba: bb ff ff ff ff mov $0xffffffff,%ebx
801054bf: eb 40 jmp 80105501 <sys_open+0x121>
801054c1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
}
iunlock(ip);
801054c8: 83 ec 0c sub $0xc,%esp
curproc->ofile[fd] = f;
801054cb: 89 7c 98 28 mov %edi,0x28(%eax,%ebx,4)
iunlock(ip);
801054cf: 56 push %esi
801054d0: e8 6b c3 ff ff call 80101840 <iunlock>
end_op();
801054d5: e8 c6 d8 ff ff call 80102da0 <end_op>
f->type = FD_INODE;
801054da: c7 07 02 00 00 00 movl $0x2,(%edi)
f->ip = ip;
f->off = 0;
f->readable = !(omode & O_WRONLY);
801054e0: 8b 55 e4 mov -0x1c(%ebp),%edx
f->writable = (omode & O_WRONLY) || (omode & O_RDWR);
801054e3: 83 c4 10 add $0x10,%esp
f->ip = ip;
801054e6: 89 77 10 mov %esi,0x10(%edi)
f->readable = !(omode & O_WRONLY);
801054e9: 89 d0 mov %edx,%eax
f->off = 0;
801054eb: c7 47 14 00 00 00 00 movl $0x0,0x14(%edi)
f->readable = !(omode & O_WRONLY);
801054f2: f7 d0 not %eax
801054f4: 83 e0 01 and $0x1,%eax
f->writable = (omode & O_WRONLY) || (omode & O_RDWR);
801054f7: 83 e2 03 and $0x3,%edx
f->readable = !(omode & O_WRONLY);
801054fa: 88 47 08 mov %al,0x8(%edi)
f->writable = (omode & O_WRONLY) || (omode & O_RDWR);
801054fd: 0f 95 47 09 setne 0x9(%edi)
return fd;
}
80105501: 8d 65 f4 lea -0xc(%ebp),%esp
80105504: 89 d8 mov %ebx,%eax
80105506: 5b pop %ebx
80105507: 5e pop %esi
80105508: 5f pop %edi
80105509: 5d pop %ebp
8010550a: c3 ret
8010550b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
8010550f: 90 nop
if(ip->type == T_DIR && omode != O_RDONLY){
80105510: 8b 4d e4 mov -0x1c(%ebp),%ecx
80105513: 85 c9 test %ecx,%ecx
80105515: 0f 84 33 ff ff ff je 8010544e <sys_open+0x6e>
8010551b: e9 5c ff ff ff jmp 8010547c <sys_open+0x9c>
80105520 <sys_mkdir>:
int
sys_mkdir(void)
{
80105520: f3 0f 1e fb endbr32
80105524: 55 push %ebp
80105525: 89 e5 mov %esp,%ebp
80105527: 83 ec 18 sub $0x18,%esp
char *path;
struct inode *ip;
begin_op();
8010552a: e8 01 d8 ff ff call 80102d30 <begin_op>
if(argstr(0, &path) < 0 || (ip = create(path, T_DIR, 0, 0)) == 0){
8010552f: 83 ec 08 sub $0x8,%esp
80105532: 8d 45 f4 lea -0xc(%ebp),%eax
80105535: 50 push %eax
80105536: 6a 00 push $0x0
80105538: e8 e3 f6 ff ff call 80104c20 <argstr>
8010553d: 83 c4 10 add $0x10,%esp
80105540: 85 c0 test %eax,%eax
80105542: 78 34 js 80105578 <sys_mkdir+0x58>
80105544: 83 ec 0c sub $0xc,%esp
80105547: 8b 45 f4 mov -0xc(%ebp),%eax
8010554a: 31 c9 xor %ecx,%ecx
8010554c: ba 01 00 00 00 mov $0x1,%edx
80105551: 6a 00 push $0x0
80105553: e8 78 f7 ff ff call 80104cd0 <create>
80105558: 83 c4 10 add $0x10,%esp
8010555b: 85 c0 test %eax,%eax
8010555d: 74 19 je 80105578 <sys_mkdir+0x58>
end_op();
return -1;
}
iunlockput(ip);
8010555f: 83 ec 0c sub $0xc,%esp
80105562: 50 push %eax
80105563: e8 98 c4 ff ff call 80101a00 <iunlockput>
end_op();
80105568: e8 33 d8 ff ff call 80102da0 <end_op>
return 0;
8010556d: 83 c4 10 add $0x10,%esp
80105570: 31 c0 xor %eax,%eax
}
80105572: c9 leave
80105573: c3 ret
80105574: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
end_op();
80105578: e8 23 d8 ff ff call 80102da0 <end_op>
return -1;
8010557d: b8 ff ff ff ff mov $0xffffffff,%eax
}
80105582: c9 leave
80105583: c3 ret
80105584: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010558b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
8010558f: 90 nop
80105590 <sys_mknod>:
int
sys_mknod(void)
{
80105590: f3 0f 1e fb endbr32
80105594: 55 push %ebp
80105595: 89 e5 mov %esp,%ebp
80105597: 83 ec 18 sub $0x18,%esp
struct inode *ip;
char *path;
int major, minor;
begin_op();
8010559a: e8 91 d7 ff ff call 80102d30 <begin_op>
if((argstr(0, &path)) < 0 ||
8010559f: 83 ec 08 sub $0x8,%esp
801055a2: 8d 45 ec lea -0x14(%ebp),%eax
801055a5: 50 push %eax
801055a6: 6a 00 push $0x0
801055a8: e8 73 f6 ff ff call 80104c20 <argstr>
801055ad: 83 c4 10 add $0x10,%esp
801055b0: 85 c0 test %eax,%eax
801055b2: 78 64 js 80105618 <sys_mknod+0x88>
argint(1, &major) < 0 ||
801055b4: 83 ec 08 sub $0x8,%esp
801055b7: 8d 45 f0 lea -0x10(%ebp),%eax
801055ba: 50 push %eax
801055bb: 6a 01 push $0x1
801055bd: e8 ae f5 ff ff call 80104b70 <argint>
if((argstr(0, &path)) < 0 ||
801055c2: 83 c4 10 add $0x10,%esp
801055c5: 85 c0 test %eax,%eax
801055c7: 78 4f js 80105618 <sys_mknod+0x88>
argint(2, &minor) < 0 ||
801055c9: 83 ec 08 sub $0x8,%esp
801055cc: 8d 45 f4 lea -0xc(%ebp),%eax
801055cf: 50 push %eax
801055d0: 6a 02 push $0x2
801055d2: e8 99 f5 ff ff call 80104b70 <argint>
argint(1, &major) < 0 ||
801055d7: 83 c4 10 add $0x10,%esp
801055da: 85 c0 test %eax,%eax
801055dc: 78 3a js 80105618 <sys_mknod+0x88>
(ip = create(path, T_DEV, major, minor)) == 0){
801055de: 0f bf 45 f4 movswl -0xc(%ebp),%eax
801055e2: 83 ec 0c sub $0xc,%esp
801055e5: 0f bf 4d f0 movswl -0x10(%ebp),%ecx
801055e9: ba 03 00 00 00 mov $0x3,%edx
801055ee: 50 push %eax
801055ef: 8b 45 ec mov -0x14(%ebp),%eax
801055f2: e8 d9 f6 ff ff call 80104cd0 <create>
argint(2, &minor) < 0 ||
801055f7: 83 c4 10 add $0x10,%esp
801055fa: 85 c0 test %eax,%eax
801055fc: 74 1a je 80105618 <sys_mknod+0x88>
end_op();
return -1;
}
iunlockput(ip);
801055fe: 83 ec 0c sub $0xc,%esp
80105601: 50 push %eax
80105602: e8 f9 c3 ff ff call 80101a00 <iunlockput>
end_op();
80105607: e8 94 d7 ff ff call 80102da0 <end_op>
return 0;
8010560c: 83 c4 10 add $0x10,%esp
8010560f: 31 c0 xor %eax,%eax
}
80105611: c9 leave
80105612: c3 ret
80105613: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80105617: 90 nop
end_op();
80105618: e8 83 d7 ff ff call 80102da0 <end_op>
return -1;
8010561d: b8 ff ff ff ff mov $0xffffffff,%eax
}
80105622: c9 leave
80105623: c3 ret
80105624: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010562b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
8010562f: 90 nop
80105630 <sys_chdir>:
int
sys_chdir(void)
{
80105630: f3 0f 1e fb endbr32
80105634: 55 push %ebp
80105635: 89 e5 mov %esp,%ebp
80105637: 56 push %esi
80105638: 53 push %ebx
80105639: 83 ec 10 sub $0x10,%esp
char *path;
struct inode *ip;
struct proc *curproc = myproc();
8010563c: e8 1f e3 ff ff call 80103960 <myproc>
80105641: 89 c6 mov %eax,%esi
begin_op();
80105643: e8 e8 d6 ff ff call 80102d30 <begin_op>
if(argstr(0, &path) < 0 || (ip = namei(path)) == 0){
80105648: 83 ec 08 sub $0x8,%esp
8010564b: 8d 45 f4 lea -0xc(%ebp),%eax
8010564e: 50 push %eax
8010564f: 6a 00 push $0x0
80105651: e8 ca f5 ff ff call 80104c20 <argstr>
80105656: 83 c4 10 add $0x10,%esp
80105659: 85 c0 test %eax,%eax
8010565b: 78 73 js 801056d0 <sys_chdir+0xa0>
8010565d: 83 ec 0c sub $0xc,%esp
80105660: ff 75 f4 pushl -0xc(%ebp)
80105663: e8 c8 c9 ff ff call 80102030 <namei>
80105668: 83 c4 10 add $0x10,%esp
8010566b: 89 c3 mov %eax,%ebx
8010566d: 85 c0 test %eax,%eax
8010566f: 74 5f je 801056d0 <sys_chdir+0xa0>
end_op();
return -1;
}
ilock(ip);
80105671: 83 ec 0c sub $0xc,%esp
80105674: 50 push %eax
80105675: e8 e6 c0 ff ff call 80101760 <ilock>
if(ip->type != T_DIR){
8010567a: 83 c4 10 add $0x10,%esp
8010567d: 66 83 7b 50 01 cmpw $0x1,0x50(%ebx)
80105682: 75 2c jne 801056b0 <sys_chdir+0x80>
iunlockput(ip);
end_op();
return -1;
}
iunlock(ip);
80105684: 83 ec 0c sub $0xc,%esp
80105687: 53 push %ebx
80105688: e8 b3 c1 ff ff call 80101840 <iunlock>
iput(curproc->cwd);
8010568d: 58 pop %eax
8010568e: ff 76 68 pushl 0x68(%esi)
80105691: e8 fa c1 ff ff call 80101890 <iput>
end_op();
80105696: e8 05 d7 ff ff call 80102da0 <end_op>
curproc->cwd = ip;
8010569b: 89 5e 68 mov %ebx,0x68(%esi)
return 0;
8010569e: 83 c4 10 add $0x10,%esp
801056a1: 31 c0 xor %eax,%eax
}
801056a3: 8d 65 f8 lea -0x8(%ebp),%esp
801056a6: 5b pop %ebx
801056a7: 5e pop %esi
801056a8: 5d pop %ebp
801056a9: c3 ret
801056aa: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
iunlockput(ip);
801056b0: 83 ec 0c sub $0xc,%esp
801056b3: 53 push %ebx
801056b4: e8 47 c3 ff ff call 80101a00 <iunlockput>
end_op();
801056b9: e8 e2 d6 ff ff call 80102da0 <end_op>
return -1;
801056be: 83 c4 10 add $0x10,%esp
801056c1: b8 ff ff ff ff mov $0xffffffff,%eax
801056c6: eb db jmp 801056a3 <sys_chdir+0x73>
801056c8: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801056cf: 90 nop
end_op();
801056d0: e8 cb d6 ff ff call 80102da0 <end_op>
return -1;
801056d5: b8 ff ff ff ff mov $0xffffffff,%eax
801056da: eb c7 jmp 801056a3 <sys_chdir+0x73>
801056dc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801056e0 <sys_exec>:
int
sys_exec(void)
{
801056e0: f3 0f 1e fb endbr32
801056e4: 55 push %ebp
801056e5: 89 e5 mov %esp,%ebp
801056e7: 57 push %edi
801056e8: 56 push %esi
char *path, *argv[MAXARG];
int i;
uint uargv, uarg;
if(argstr(0, &path) < 0 || argint(1, (int*)&uargv) < 0){
801056e9: 8d 85 5c ff ff ff lea -0xa4(%ebp),%eax
{
801056ef: 53 push %ebx
801056f0: 81 ec a4 00 00 00 sub $0xa4,%esp
if(argstr(0, &path) < 0 || argint(1, (int*)&uargv) < 0){
801056f6: 50 push %eax
801056f7: 6a 00 push $0x0
801056f9: e8 22 f5 ff ff call 80104c20 <argstr>
801056fe: 83 c4 10 add $0x10,%esp
80105701: 85 c0 test %eax,%eax
80105703: 0f 88 8b 00 00 00 js 80105794 <sys_exec+0xb4>
80105709: 83 ec 08 sub $0x8,%esp
8010570c: 8d 85 60 ff ff ff lea -0xa0(%ebp),%eax
80105712: 50 push %eax
80105713: 6a 01 push $0x1
80105715: e8 56 f4 ff ff call 80104b70 <argint>
8010571a: 83 c4 10 add $0x10,%esp
8010571d: 85 c0 test %eax,%eax
8010571f: 78 73 js 80105794 <sys_exec+0xb4>
return -1;
}
memset(argv, 0, sizeof(argv));
80105721: 83 ec 04 sub $0x4,%esp
80105724: 8d 85 68 ff ff ff lea -0x98(%ebp),%eax
for(i=0;; i++){
8010572a: 31 db xor %ebx,%ebx
memset(argv, 0, sizeof(argv));
8010572c: 68 80 00 00 00 push $0x80
80105731: 8d bd 64 ff ff ff lea -0x9c(%ebp),%edi
80105737: 6a 00 push $0x0
80105739: 50 push %eax
8010573a: e8 51 f1 ff ff call 80104890 <memset>
8010573f: 83 c4 10 add $0x10,%esp
80105742: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
if(i >= NELEM(argv))
return -1;
if(fetchint(uargv+4*i, (int*)&uarg) < 0)
80105748: 8b 85 60 ff ff ff mov -0xa0(%ebp),%eax
8010574e: 8d 34 9d 00 00 00 00 lea 0x0(,%ebx,4),%esi
80105755: 83 ec 08 sub $0x8,%esp
80105758: 57 push %edi
80105759: 01 f0 add %esi,%eax
8010575b: 50 push %eax
8010575c: e8 6f f3 ff ff call 80104ad0 <fetchint>
80105761: 83 c4 10 add $0x10,%esp
80105764: 85 c0 test %eax,%eax
80105766: 78 2c js 80105794 <sys_exec+0xb4>
return -1;
if(uarg == 0){
80105768: 8b 85 64 ff ff ff mov -0x9c(%ebp),%eax
8010576e: 85 c0 test %eax,%eax
80105770: 74 36 je 801057a8 <sys_exec+0xc8>
argv[i] = 0;
break;
}
if(fetchstr(uarg, &argv[i]) < 0)
80105772: 8d 8d 68 ff ff ff lea -0x98(%ebp),%ecx
80105778: 83 ec 08 sub $0x8,%esp
8010577b: 8d 14 31 lea (%ecx,%esi,1),%edx
8010577e: 52 push %edx
8010577f: 50 push %eax
80105780: e8 8b f3 ff ff call 80104b10 <fetchstr>
80105785: 83 c4 10 add $0x10,%esp
80105788: 85 c0 test %eax,%eax
8010578a: 78 08 js 80105794 <sys_exec+0xb4>
for(i=0;; i++){
8010578c: 83 c3 01 add $0x1,%ebx
if(i >= NELEM(argv))
8010578f: 83 fb 20 cmp $0x20,%ebx
80105792: 75 b4 jne 80105748 <sys_exec+0x68>
return -1;
}
return exec(path, argv);
}
80105794: 8d 65 f4 lea -0xc(%ebp),%esp
return -1;
80105797: b8 ff ff ff ff mov $0xffffffff,%eax
}
8010579c: 5b pop %ebx
8010579d: 5e pop %esi
8010579e: 5f pop %edi
8010579f: 5d pop %ebp
801057a0: c3 ret
801057a1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
return exec(path, argv);
801057a8: 83 ec 08 sub $0x8,%esp
801057ab: 8d 85 68 ff ff ff lea -0x98(%ebp),%eax
argv[i] = 0;
801057b1: c7 84 9d 68 ff ff ff movl $0x0,-0x98(%ebp,%ebx,4)
801057b8: 00 00 00 00
return exec(path, argv);
801057bc: 50 push %eax
801057bd: ff b5 5c ff ff ff pushl -0xa4(%ebp)
801057c3: e8 b8 b2 ff ff call 80100a80 <exec>
801057c8: 83 c4 10 add $0x10,%esp
}
801057cb: 8d 65 f4 lea -0xc(%ebp),%esp
801057ce: 5b pop %ebx
801057cf: 5e pop %esi
801057d0: 5f pop %edi
801057d1: 5d pop %ebp
801057d2: c3 ret
801057d3: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801057da: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801057e0 <sys_pipe>:
int
sys_pipe(void)
{
801057e0: f3 0f 1e fb endbr32
801057e4: 55 push %ebp
801057e5: 89 e5 mov %esp,%ebp
801057e7: 57 push %edi
801057e8: 56 push %esi
int *fd;
struct file *rf, *wf;
int fd0, fd1;
if(argptr(0, (void*)&fd, 2*sizeof(fd[0])) < 0)
801057e9: 8d 45 dc lea -0x24(%ebp),%eax
{
801057ec: 53 push %ebx
801057ed: 83 ec 20 sub $0x20,%esp
if(argptr(0, (void*)&fd, 2*sizeof(fd[0])) < 0)
801057f0: 6a 08 push $0x8
801057f2: 50 push %eax
801057f3: 6a 00 push $0x0
801057f5: e8 c6 f3 ff ff call 80104bc0 <argptr>
801057fa: 83 c4 10 add $0x10,%esp
801057fd: 85 c0 test %eax,%eax
801057ff: 78 4e js 8010584f <sys_pipe+0x6f>
return -1;
if(pipealloc(&rf, &wf) < 0)
80105801: 83 ec 08 sub $0x8,%esp
80105804: 8d 45 e4 lea -0x1c(%ebp),%eax
80105807: 50 push %eax
80105808: 8d 45 e0 lea -0x20(%ebp),%eax
8010580b: 50 push %eax
8010580c: e8 df db ff ff call 801033f0 <pipealloc>
80105811: 83 c4 10 add $0x10,%esp
80105814: 85 c0 test %eax,%eax
80105816: 78 37 js 8010584f <sys_pipe+0x6f>
return -1;
fd0 = -1;
if((fd0 = fdalloc(rf)) < 0 || (fd1 = fdalloc(wf)) < 0){
80105818: 8b 7d e0 mov -0x20(%ebp),%edi
for(fd = 0; fd < NOFILE; fd++){
8010581b: 31 db xor %ebx,%ebx
struct proc *curproc = myproc();
8010581d: e8 3e e1 ff ff call 80103960 <myproc>
for(fd = 0; fd < NOFILE; fd++){
80105822: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
if(curproc->ofile[fd] == 0){
80105828: 8b 74 98 28 mov 0x28(%eax,%ebx,4),%esi
8010582c: 85 f6 test %esi,%esi
8010582e: 74 30 je 80105860 <sys_pipe+0x80>
for(fd = 0; fd < NOFILE; fd++){
80105830: 83 c3 01 add $0x1,%ebx
80105833: 83 fb 10 cmp $0x10,%ebx
80105836: 75 f0 jne 80105828 <sys_pipe+0x48>
if(fd0 >= 0)
myproc()->ofile[fd0] = 0;
fileclose(rf);
80105838: 83 ec 0c sub $0xc,%esp
8010583b: ff 75 e0 pushl -0x20(%ebp)
8010583e: e8 7d b6 ff ff call 80100ec0 <fileclose>
fileclose(wf);
80105843: 58 pop %eax
80105844: ff 75 e4 pushl -0x1c(%ebp)
80105847: e8 74 b6 ff ff call 80100ec0 <fileclose>
return -1;
8010584c: 83 c4 10 add $0x10,%esp
8010584f: b8 ff ff ff ff mov $0xffffffff,%eax
80105854: eb 5b jmp 801058b1 <sys_pipe+0xd1>
80105856: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010585d: 8d 76 00 lea 0x0(%esi),%esi
curproc->ofile[fd] = f;
80105860: 8d 73 08 lea 0x8(%ebx),%esi
80105863: 89 7c b0 08 mov %edi,0x8(%eax,%esi,4)
if((fd0 = fdalloc(rf)) < 0 || (fd1 = fdalloc(wf)) < 0){
80105867: 8b 7d e4 mov -0x1c(%ebp),%edi
struct proc *curproc = myproc();
8010586a: e8 f1 e0 ff ff call 80103960 <myproc>
for(fd = 0; fd < NOFILE; fd++){
8010586f: 31 d2 xor %edx,%edx
80105871: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
if(curproc->ofile[fd] == 0){
80105878: 8b 4c 90 28 mov 0x28(%eax,%edx,4),%ecx
8010587c: 85 c9 test %ecx,%ecx
8010587e: 74 20 je 801058a0 <sys_pipe+0xc0>
for(fd = 0; fd < NOFILE; fd++){
80105880: 83 c2 01 add $0x1,%edx
80105883: 83 fa 10 cmp $0x10,%edx
80105886: 75 f0 jne 80105878 <sys_pipe+0x98>
myproc()->ofile[fd0] = 0;
80105888: e8 d3 e0 ff ff call 80103960 <myproc>
8010588d: c7 44 b0 08 00 00 00 movl $0x0,0x8(%eax,%esi,4)
80105894: 00
80105895: eb a1 jmp 80105838 <sys_pipe+0x58>
80105897: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010589e: 66 90 xchg %ax,%ax
curproc->ofile[fd] = f;
801058a0: 89 7c 90 28 mov %edi,0x28(%eax,%edx,4)
}
fd[0] = fd0;
801058a4: 8b 45 dc mov -0x24(%ebp),%eax
801058a7: 89 18 mov %ebx,(%eax)
fd[1] = fd1;
801058a9: 8b 45 dc mov -0x24(%ebp),%eax
801058ac: 89 50 04 mov %edx,0x4(%eax)
return 0;
801058af: 31 c0 xor %eax,%eax
}
801058b1: 8d 65 f4 lea -0xc(%ebp),%esp
801058b4: 5b pop %ebx
801058b5: 5e pop %esi
801058b6: 5f pop %edi
801058b7: 5d pop %ebp
801058b8: c3 ret
801058b9: 66 90 xchg %ax,%ax
801058bb: 66 90 xchg %ax,%ax
801058bd: 66 90 xchg %ax,%ax
801058bf: 90 nop
801058c0 <sys_fork>:
#include "mmu.h"
#include "proc.h"
int
sys_fork(void)
{
801058c0: f3 0f 1e fb endbr32
return fork();
801058c4: e9 47 e2 ff ff jmp 80103b10 <fork>
801058c9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801058d0 <sys_exit>:
}
int
sys_exit(void)
{
801058d0: f3 0f 1e fb endbr32
801058d4: 55 push %ebp
801058d5: 89 e5 mov %esp,%ebp
801058d7: 83 ec 08 sub $0x8,%esp
exit();
801058da: e8 b1 e4 ff ff call 80103d90 <exit>
return 0; // not reached
}
801058df: 31 c0 xor %eax,%eax
801058e1: c9 leave
801058e2: c3 ret
801058e3: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801058ea: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801058f0 <sys_wait>:
int
sys_wait(void)
{
801058f0: f3 0f 1e fb endbr32
return wait();
801058f4: e9 e7 e6 ff ff jmp 80103fe0 <wait>
801058f9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80105900 <sys_kill>:
}
int
sys_kill(void)
{
80105900: f3 0f 1e fb endbr32
80105904: 55 push %ebp
80105905: 89 e5 mov %esp,%ebp
80105907: 83 ec 20 sub $0x20,%esp
int pid;
if(argint(0, &pid) < 0)
8010590a: 8d 45 f4 lea -0xc(%ebp),%eax
8010590d: 50 push %eax
8010590e: 6a 00 push $0x0
80105910: e8 5b f2 ff ff call 80104b70 <argint>
80105915: 83 c4 10 add $0x10,%esp
80105918: 85 c0 test %eax,%eax
8010591a: 78 14 js 80105930 <sys_kill+0x30>
return -1;
return kill(pid);
8010591c: 83 ec 0c sub $0xc,%esp
8010591f: ff 75 f4 pushl -0xc(%ebp)
80105922: e8 19 e8 ff ff call 80104140 <kill>
80105927: 83 c4 10 add $0x10,%esp
}
8010592a: c9 leave
8010592b: c3 ret
8010592c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80105930: c9 leave
return -1;
80105931: b8 ff ff ff ff mov $0xffffffff,%eax
}
80105936: c3 ret
80105937: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010593e: 66 90 xchg %ax,%ax
80105940 <sys_getpid>:
int
sys_getpid(void)
{
80105940: f3 0f 1e fb endbr32
80105944: 55 push %ebp
80105945: 89 e5 mov %esp,%ebp
80105947: 83 ec 08 sub $0x8,%esp
return myproc()->pid;
8010594a: e8 11 e0 ff ff call 80103960 <myproc>
8010594f: 8b 40 10 mov 0x10(%eax),%eax
}
80105952: c9 leave
80105953: c3 ret
80105954: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010595b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
8010595f: 90 nop
80105960 <sys_sbrk>:
int
sys_sbrk(void)
{
80105960: f3 0f 1e fb endbr32
80105964: 55 push %ebp
80105965: 89 e5 mov %esp,%ebp
80105967: 53 push %ebx
int addr;
int n;
if(argint(0, &n) < 0)
80105968: 8d 45 f4 lea -0xc(%ebp),%eax
{
8010596b: 83 ec 1c sub $0x1c,%esp
if(argint(0, &n) < 0)
8010596e: 50 push %eax
8010596f: 6a 00 push $0x0
80105971: e8 fa f1 ff ff call 80104b70 <argint>
80105976: 83 c4 10 add $0x10,%esp
80105979: 85 c0 test %eax,%eax
8010597b: 78 23 js 801059a0 <sys_sbrk+0x40>
return -1;
addr = myproc()->sz;
8010597d: e8 de df ff ff call 80103960 <myproc>
if(growproc(n) < 0)
80105982: 83 ec 0c sub $0xc,%esp
addr = myproc()->sz;
80105985: 8b 18 mov (%eax),%ebx
if(growproc(n) < 0)
80105987: ff 75 f4 pushl -0xc(%ebp)
8010598a: e8 01 e1 ff ff call 80103a90 <growproc>
8010598f: 83 c4 10 add $0x10,%esp
80105992: 85 c0 test %eax,%eax
80105994: 78 0a js 801059a0 <sys_sbrk+0x40>
return -1;
return addr;
}
80105996: 89 d8 mov %ebx,%eax
80105998: 8b 5d fc mov -0x4(%ebp),%ebx
8010599b: c9 leave
8010599c: c3 ret
8010599d: 8d 76 00 lea 0x0(%esi),%esi
return -1;
801059a0: bb ff ff ff ff mov $0xffffffff,%ebx
801059a5: eb ef jmp 80105996 <sys_sbrk+0x36>
801059a7: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801059ae: 66 90 xchg %ax,%ax
801059b0 <sys_sleep>:
int
sys_sleep(void)
{
801059b0: f3 0f 1e fb endbr32
801059b4: 55 push %ebp
801059b5: 89 e5 mov %esp,%ebp
801059b7: 53 push %ebx
int n;
uint ticks0;
if(argint(0, &n) < 0)
801059b8: 8d 45 f4 lea -0xc(%ebp),%eax
{
801059bb: 83 ec 1c sub $0x1c,%esp
if(argint(0, &n) < 0)
801059be: 50 push %eax
801059bf: 6a 00 push $0x0
801059c1: e8 aa f1 ff ff call 80104b70 <argint>
801059c6: 83 c4 10 add $0x10,%esp
801059c9: 85 c0 test %eax,%eax
801059cb: 0f 88 86 00 00 00 js 80105a57 <sys_sleep+0xa7>
return -1;
acquire(&tickslock);
801059d1: 83 ec 0c sub $0xc,%esp
801059d4: 68 20 57 11 80 push $0x80115720
801059d9: e8 a2 ed ff ff call 80104780 <acquire>
ticks0 = ticks;
while(ticks - ticks0 < n){
801059de: 8b 55 f4 mov -0xc(%ebp),%edx
ticks0 = ticks;
801059e1: 8b 1d 60 5f 11 80 mov 0x80115f60,%ebx
while(ticks - ticks0 < n){
801059e7: 83 c4 10 add $0x10,%esp
801059ea: 85 d2 test %edx,%edx
801059ec: 75 23 jne 80105a11 <sys_sleep+0x61>
801059ee: eb 50 jmp 80105a40 <sys_sleep+0x90>
if(myproc()->killed){
release(&tickslock);
return -1;
}
sleep(&ticks, &tickslock);
801059f0: 83 ec 08 sub $0x8,%esp
801059f3: 68 20 57 11 80 push $0x80115720
801059f8: 68 60 5f 11 80 push $0x80115f60
801059fd: e8 1e e5 ff ff call 80103f20 <sleep>
while(ticks - ticks0 < n){
80105a02: a1 60 5f 11 80 mov 0x80115f60,%eax
80105a07: 83 c4 10 add $0x10,%esp
80105a0a: 29 d8 sub %ebx,%eax
80105a0c: 3b 45 f4 cmp -0xc(%ebp),%eax
80105a0f: 73 2f jae 80105a40 <sys_sleep+0x90>
if(myproc()->killed){
80105a11: e8 4a df ff ff call 80103960 <myproc>
80105a16: 8b 40 24 mov 0x24(%eax),%eax
80105a19: 85 c0 test %eax,%eax
80105a1b: 74 d3 je 801059f0 <sys_sleep+0x40>
release(&tickslock);
80105a1d: 83 ec 0c sub $0xc,%esp
80105a20: 68 20 57 11 80 push $0x80115720
80105a25: e8 16 ee ff ff call 80104840 <release>
}
release(&tickslock);
return 0;
}
80105a2a: 8b 5d fc mov -0x4(%ebp),%ebx
return -1;
80105a2d: 83 c4 10 add $0x10,%esp
80105a30: b8 ff ff ff ff mov $0xffffffff,%eax
}
80105a35: c9 leave
80105a36: c3 ret
80105a37: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80105a3e: 66 90 xchg %ax,%ax
release(&tickslock);
80105a40: 83 ec 0c sub $0xc,%esp
80105a43: 68 20 57 11 80 push $0x80115720
80105a48: e8 f3 ed ff ff call 80104840 <release>
return 0;
80105a4d: 83 c4 10 add $0x10,%esp
80105a50: 31 c0 xor %eax,%eax
}
80105a52: 8b 5d fc mov -0x4(%ebp),%ebx
80105a55: c9 leave
80105a56: c3 ret
return -1;
80105a57: b8 ff ff ff ff mov $0xffffffff,%eax
80105a5c: eb f4 jmp 80105a52 <sys_sleep+0xa2>
80105a5e: 66 90 xchg %ax,%ax
80105a60 <sys_uptime>:
// return how many clock tick interrupts have occurred
// since start.
int
sys_uptime(void)
{
80105a60: f3 0f 1e fb endbr32
80105a64: 55 push %ebp
80105a65: 89 e5 mov %esp,%ebp
80105a67: 53 push %ebx
80105a68: 83 ec 10 sub $0x10,%esp
uint xticks;
acquire(&tickslock);
80105a6b: 68 20 57 11 80 push $0x80115720
80105a70: e8 0b ed ff ff call 80104780 <acquire>
xticks = ticks;
80105a75: 8b 1d 60 5f 11 80 mov 0x80115f60,%ebx
release(&tickslock);
80105a7b: c7 04 24 20 57 11 80 movl $0x80115720,(%esp)
80105a82: e8 b9 ed ff ff call 80104840 <release>
return xticks;
}
80105a87: 89 d8 mov %ebx,%eax
80105a89: 8b 5d fc mov -0x4(%ebp),%ebx
80105a8c: c9 leave
80105a8d: c3 ret
80105a8e: 66 90 xchg %ax,%ax
80105a90 <sys_clone>:
int
sys_clone(void)
{
80105a90: f3 0f 1e fb endbr32
80105a94: 55 push %ebp
80105a95: 89 e5 mov %esp,%ebp
80105a97: 83 ec 20 sub $0x20,%esp
int fcn, arg1, arg2, stack;
if(argint(0, &fcn)<0 || argint(1, &arg1)<0 || argint(2, &arg2)<0 || argint(3, &stack)<0)
80105a9a: 8d 45 e8 lea -0x18(%ebp),%eax
80105a9d: 50 push %eax
80105a9e: 6a 00 push $0x0
80105aa0: e8 cb f0 ff ff call 80104b70 <argint>
80105aa5: 83 c4 10 add $0x10,%esp
80105aa8: 85 c0 test %eax,%eax
80105aaa: 78 5c js 80105b08 <sys_clone+0x78>
80105aac: 83 ec 08 sub $0x8,%esp
80105aaf: 8d 45 ec lea -0x14(%ebp),%eax
80105ab2: 50 push %eax
80105ab3: 6a 01 push $0x1
80105ab5: e8 b6 f0 ff ff call 80104b70 <argint>
80105aba: 83 c4 10 add $0x10,%esp
80105abd: 85 c0 test %eax,%eax
80105abf: 78 47 js 80105b08 <sys_clone+0x78>
80105ac1: 83 ec 08 sub $0x8,%esp
80105ac4: 8d 45 f0 lea -0x10(%ebp),%eax
80105ac7: 50 push %eax
80105ac8: 6a 02 push $0x2
80105aca: e8 a1 f0 ff ff call 80104b70 <argint>
80105acf: 83 c4 10 add $0x10,%esp
80105ad2: 85 c0 test %eax,%eax
80105ad4: 78 32 js 80105b08 <sys_clone+0x78>
80105ad6: 83 ec 08 sub $0x8,%esp
80105ad9: 8d 45 f4 lea -0xc(%ebp),%eax
80105adc: 50 push %eax
80105add: 6a 03 push $0x3
80105adf: e8 8c f0 ff ff call 80104b70 <argint>
80105ae4: 83 c4 10 add $0x10,%esp
80105ae7: 85 c0 test %eax,%eax
80105ae9: 78 1d js 80105b08 <sys_clone+0x78>
return -1;
return clone((void *)fcn, (void *)arg1, (void *)arg2, (void *)stack);
80105aeb: ff 75 f4 pushl -0xc(%ebp)
80105aee: ff 75 f0 pushl -0x10(%ebp)
80105af1: ff 75 ec pushl -0x14(%ebp)
80105af4: ff 75 e8 pushl -0x18(%ebp)
80105af7: e8 a4 e7 ff ff call 801042a0 <clone>
80105afc: 83 c4 10 add $0x10,%esp
}
80105aff: c9 leave
80105b00: c3 ret
80105b01: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80105b08: c9 leave
return -1;
80105b09: b8 ff ff ff ff mov $0xffffffff,%eax
}
80105b0e: c3 ret
80105b0f: 90 nop
80105b10 <sys_join>:
int
sys_join(void)
{
80105b10: f3 0f 1e fb endbr32
80105b14: 55 push %ebp
80105b15: 89 e5 mov %esp,%ebp
80105b17: 83 ec 20 sub $0x20,%esp
void **stack;
int stackArg;
stackArg = argint(0, &stackArg);
80105b1a: 8d 45 f4 lea -0xc(%ebp),%eax
80105b1d: 50 push %eax
80105b1e: 6a 00 push $0x0
80105b20: e8 4b f0 ff ff call 80104b70 <argint>
80105b25: 89 45 f4 mov %eax,-0xc(%ebp)
stack = (void**) stackArg;
return join(stack);
80105b28: 89 04 24 mov %eax,(%esp)
80105b2b: e8 90 e8 ff ff call 801043c0 <join>
80105b30: c9 leave
80105b31: c3 ret
80105b32 <alltraps>:
# vectors.S sends all traps here.
.globl alltraps
alltraps:
# Build trap frame.
pushl %ds
80105b32: 1e push %ds
pushl %es
80105b33: 06 push %es
pushl %fs
80105b34: 0f a0 push %fs
pushl %gs
80105b36: 0f a8 push %gs
pushal
80105b38: 60 pusha
# Set up data segments.
movw $(SEG_KDATA<<3), %ax
80105b39: 66 b8 10 00 mov $0x10,%ax
movw %ax, %ds
80105b3d: 8e d8 mov %eax,%ds
movw %ax, %es
80105b3f: 8e c0 mov %eax,%es
# Call trap(tf), where tf=%esp
pushl %esp
80105b41: 54 push %esp
call trap
80105b42: e8 c9 00 00 00 call 80105c10 <trap>
addl $4, %esp
80105b47: 83 c4 04 add $0x4,%esp
80105b4a <trapret>:
# Return falls through to trapret...
.globl trapret
trapret:
popal
80105b4a: 61 popa
popl %gs
80105b4b: 0f a9 pop %gs
popl %fs
80105b4d: 0f a1 pop %fs
popl %es
80105b4f: 07 pop %es
popl %ds
80105b50: 1f pop %ds
addl $0x8, %esp # trapno and errcode
80105b51: 83 c4 08 add $0x8,%esp
iret
80105b54: cf iret
80105b55: 66 90 xchg %ax,%ax
80105b57: 66 90 xchg %ax,%ax
80105b59: 66 90 xchg %ax,%ax
80105b5b: 66 90 xchg %ax,%ax
80105b5d: 66 90 xchg %ax,%ax
80105b5f: 90 nop
80105b60 <tvinit>:
struct spinlock tickslock;
uint ticks;
void
tvinit(void)
{
80105b60: f3 0f 1e fb endbr32
80105b64: 55 push %ebp
int i;
for(i = 0; i < 256; i++)
80105b65: 31 c0 xor %eax,%eax
{
80105b67: 89 e5 mov %esp,%ebp
80105b69: 83 ec 08 sub $0x8,%esp
80105b6c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
SETGATE(idt[i], 0, SEG_KCODE<<3, vectors[i], 0);
80105b70: 8b 14 85 08 a0 10 80 mov -0x7fef5ff8(,%eax,4),%edx
80105b77: c7 04 c5 62 57 11 80 movl $0x8e000008,-0x7feea89e(,%eax,8)
80105b7e: 08 00 00 8e
80105b82: 66 89 14 c5 60 57 11 mov %dx,-0x7feea8a0(,%eax,8)
80105b89: 80
80105b8a: c1 ea 10 shr $0x10,%edx
80105b8d: 66 89 14 c5 66 57 11 mov %dx,-0x7feea89a(,%eax,8)
80105b94: 80
for(i = 0; i < 256; i++)
80105b95: 83 c0 01 add $0x1,%eax
80105b98: 3d 00 01 00 00 cmp $0x100,%eax
80105b9d: 75 d1 jne 80105b70 <tvinit+0x10>
SETGATE(idt[T_SYSCALL], 1, SEG_KCODE<<3, vectors[T_SYSCALL], DPL_USER);
initlock(&tickslock, "time");
80105b9f: 83 ec 08 sub $0x8,%esp
SETGATE(idt[T_SYSCALL], 1, SEG_KCODE<<3, vectors[T_SYSCALL], DPL_USER);
80105ba2: a1 08 a1 10 80 mov 0x8010a108,%eax
80105ba7: c7 05 62 59 11 80 08 movl $0xef000008,0x80115962
80105bae: 00 00 ef
initlock(&tickslock, "time");
80105bb1: 68 01 7d 10 80 push $0x80107d01
80105bb6: 68 20 57 11 80 push $0x80115720
SETGATE(idt[T_SYSCALL], 1, SEG_KCODE<<3, vectors[T_SYSCALL], DPL_USER);
80105bbb: 66 a3 60 59 11 80 mov %ax,0x80115960
80105bc1: c1 e8 10 shr $0x10,%eax
80105bc4: 66 a3 66 59 11 80 mov %ax,0x80115966
initlock(&tickslock, "time");
80105bca: e8 31 ea ff ff call 80104600 <initlock>
}
80105bcf: 83 c4 10 add $0x10,%esp
80105bd2: c9 leave
80105bd3: c3 ret
80105bd4: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80105bdb: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80105bdf: 90 nop
80105be0 <idtinit>:
void
idtinit(void)
{
80105be0: f3 0f 1e fb endbr32
80105be4: 55 push %ebp
pd[0] = size-1;
80105be5: b8 ff 07 00 00 mov $0x7ff,%eax
80105bea: 89 e5 mov %esp,%ebp
80105bec: 83 ec 10 sub $0x10,%esp
80105bef: 66 89 45 fa mov %ax,-0x6(%ebp)
pd[1] = (uint)p;
80105bf3: b8 60 57 11 80 mov $0x80115760,%eax
80105bf8: 66 89 45 fc mov %ax,-0x4(%ebp)
pd[2] = (uint)p >> 16;
80105bfc: c1 e8 10 shr $0x10,%eax
80105bff: 66 89 45 fe mov %ax,-0x2(%ebp)
asm volatile("lidt (%0)" : : "r" (pd));
80105c03: 8d 45 fa lea -0x6(%ebp),%eax
80105c06: 0f 01 18 lidtl (%eax)
lidt(idt, sizeof(idt));
}
80105c09: c9 leave
80105c0a: c3 ret
80105c0b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80105c0f: 90 nop
80105c10 <trap>:
//PAGEBREAK: 41
void
trap(struct trapframe *tf)
{
80105c10: f3 0f 1e fb endbr32
80105c14: 55 push %ebp
80105c15: 89 e5 mov %esp,%ebp
80105c17: 57 push %edi
80105c18: 56 push %esi
80105c19: 53 push %ebx
80105c1a: 83 ec 1c sub $0x1c,%esp
80105c1d: 8b 5d 08 mov 0x8(%ebp),%ebx
if(tf->trapno == T_SYSCALL){
80105c20: 8b 43 30 mov 0x30(%ebx),%eax
80105c23: 83 f8 40 cmp $0x40,%eax
80105c26: 0f 84 bc 01 00 00 je 80105de8 <trap+0x1d8>
if(myproc()->killed)
exit();
return;
}
switch(tf->trapno){
80105c2c: 83 e8 20 sub $0x20,%eax
80105c2f: 83 f8 1f cmp $0x1f,%eax
80105c32: 77 08 ja 80105c3c <trap+0x2c>
80105c34: 3e ff 24 85 a8 7d 10 notrack jmp *-0x7fef8258(,%eax,4)
80105c3b: 80
lapiceoi();
break;
//PAGEBREAK: 13
default:
if(myproc() == 0 || (tf->cs&3) == 0){
80105c3c: e8 1f dd ff ff call 80103960 <myproc>
80105c41: 8b 7b 38 mov 0x38(%ebx),%edi
80105c44: 85 c0 test %eax,%eax
80105c46: 0f 84 eb 01 00 00 je 80105e37 <trap+0x227>
80105c4c: f6 43 3c 03 testb $0x3,0x3c(%ebx)
80105c50: 0f 84 e1 01 00 00 je 80105e37 <trap+0x227>
static inline uint
rcr2(void)
{
uint val;
asm volatile("movl %%cr2,%0" : "=r" (val));
80105c56: 0f 20 d1 mov %cr2,%ecx
80105c59: 89 4d d8 mov %ecx,-0x28(%ebp)
cprintf("unexpected trap %d from cpu %d eip %x (cr2=0x%x)\n",
tf->trapno, cpuid(), tf->eip, rcr2());
panic("trap");
}
// In user space, assume process misbehaved.
cprintf("pid %d %s: trap %d err %d on cpu %d "
80105c5c: e8 df dc ff ff call 80103940 <cpuid>
80105c61: 8b 73 30 mov 0x30(%ebx),%esi
80105c64: 89 45 dc mov %eax,-0x24(%ebp)
80105c67: 8b 43 34 mov 0x34(%ebx),%eax
80105c6a: 89 45 e4 mov %eax,-0x1c(%ebp)
"eip 0x%x addr 0x%x--kill proc\n",
myproc()->pid, myproc()->name, tf->trapno,
80105c6d: e8 ee dc ff ff call 80103960 <myproc>
80105c72: 89 45 e0 mov %eax,-0x20(%ebp)
80105c75: e8 e6 dc ff ff call 80103960 <myproc>
cprintf("pid %d %s: trap %d err %d on cpu %d "
80105c7a: 8b 4d d8 mov -0x28(%ebp),%ecx
80105c7d: 8b 55 dc mov -0x24(%ebp),%edx
80105c80: 51 push %ecx
80105c81: 57 push %edi
80105c82: 52 push %edx
80105c83: ff 75 e4 pushl -0x1c(%ebp)
80105c86: 56 push %esi
myproc()->pid, myproc()->name, tf->trapno,
80105c87: 8b 75 e0 mov -0x20(%ebp),%esi
80105c8a: 83 c6 6c add $0x6c,%esi
cprintf("pid %d %s: trap %d err %d on cpu %d "
80105c8d: 56 push %esi
80105c8e: ff 70 10 pushl 0x10(%eax)
80105c91: 68 64 7d 10 80 push $0x80107d64
80105c96: e8 15 aa ff ff call 801006b0 <cprintf>
tf->err, cpuid(), tf->eip, rcr2());
myproc()->killed = 1;
80105c9b: 83 c4 20 add $0x20,%esp
80105c9e: e8 bd dc ff ff call 80103960 <myproc>
80105ca3: c7 40 24 01 00 00 00 movl $0x1,0x24(%eax)
}
// 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(myproc() && myproc()->killed && (tf->cs&3) == DPL_USER)
80105caa: e8 b1 dc ff ff call 80103960 <myproc>
80105caf: 85 c0 test %eax,%eax
80105cb1: 74 1d je 80105cd0 <trap+0xc0>
80105cb3: e8 a8 dc ff ff call 80103960 <myproc>
80105cb8: 8b 50 24 mov 0x24(%eax),%edx
80105cbb: 85 d2 test %edx,%edx
80105cbd: 74 11 je 80105cd0 <trap+0xc0>
80105cbf: 0f b7 43 3c movzwl 0x3c(%ebx),%eax
80105cc3: 83 e0 03 and $0x3,%eax
80105cc6: 66 83 f8 03 cmp $0x3,%ax
80105cca: 0f 84 50 01 00 00 je 80105e20 <trap+0x210>
exit();
// Force process to give up CPU on clock tick.
// If interrupts were on while locks held, would need to check nlock.
if(myproc() && myproc()->state == RUNNING &&
80105cd0: e8 8b dc ff ff call 80103960 <myproc>
80105cd5: 85 c0 test %eax,%eax
80105cd7: 74 0f je 80105ce8 <trap+0xd8>
80105cd9: e8 82 dc ff ff call 80103960 <myproc>
80105cde: 83 78 0c 04 cmpl $0x4,0xc(%eax)
80105ce2: 0f 84 e8 00 00 00 je 80105dd0 <trap+0x1c0>
tf->trapno == T_IRQ0+IRQ_TIMER)
yield();
// Check if the process has been killed since we yielded
if(myproc() && myproc()->killed && (tf->cs&3) == DPL_USER)
80105ce8: e8 73 dc ff ff call 80103960 <myproc>
80105ced: 85 c0 test %eax,%eax
80105cef: 74 1d je 80105d0e <trap+0xfe>
80105cf1: e8 6a dc ff ff call 80103960 <myproc>
80105cf6: 8b 40 24 mov 0x24(%eax),%eax
80105cf9: 85 c0 test %eax,%eax
80105cfb: 74 11 je 80105d0e <trap+0xfe>
80105cfd: 0f b7 43 3c movzwl 0x3c(%ebx),%eax
80105d01: 83 e0 03 and $0x3,%eax
80105d04: 66 83 f8 03 cmp $0x3,%ax
80105d08: 0f 84 03 01 00 00 je 80105e11 <trap+0x201>
exit();
}
80105d0e: 8d 65 f4 lea -0xc(%ebp),%esp
80105d11: 5b pop %ebx
80105d12: 5e pop %esi
80105d13: 5f pop %edi
80105d14: 5d pop %ebp
80105d15: c3 ret
ideintr();
80105d16: e8 c5 c4 ff ff call 801021e0 <ideintr>
lapiceoi();
80105d1b: e8 a0 cb ff ff call 801028c0 <lapiceoi>
if(myproc() && myproc()->killed && (tf->cs&3) == DPL_USER)
80105d20: e8 3b dc ff ff call 80103960 <myproc>
80105d25: 85 c0 test %eax,%eax
80105d27: 75 8a jne 80105cb3 <trap+0xa3>
80105d29: eb a5 jmp 80105cd0 <trap+0xc0>
if(cpuid() == 0){
80105d2b: e8 10 dc ff ff call 80103940 <cpuid>
80105d30: 85 c0 test %eax,%eax
80105d32: 75 e7 jne 80105d1b <trap+0x10b>
acquire(&tickslock);
80105d34: 83 ec 0c sub $0xc,%esp
80105d37: 68 20 57 11 80 push $0x80115720
80105d3c: e8 3f ea ff ff call 80104780 <acquire>
wakeup(&ticks);
80105d41: c7 04 24 60 5f 11 80 movl $0x80115f60,(%esp)
ticks++;
80105d48: 83 05 60 5f 11 80 01 addl $0x1,0x80115f60
wakeup(&ticks);
80105d4f: e8 8c e3 ff ff call 801040e0 <wakeup>
release(&tickslock);
80105d54: c7 04 24 20 57 11 80 movl $0x80115720,(%esp)
80105d5b: e8 e0 ea ff ff call 80104840 <release>
80105d60: 83 c4 10 add $0x10,%esp
lapiceoi();
80105d63: eb b6 jmp 80105d1b <trap+0x10b>
kbdintr();
80105d65: e8 16 ca ff ff call 80102780 <kbdintr>
lapiceoi();
80105d6a: e8 51 cb ff ff call 801028c0 <lapiceoi>
if(myproc() && myproc()->killed && (tf->cs&3) == DPL_USER)
80105d6f: e8 ec db ff ff call 80103960 <myproc>
80105d74: 85 c0 test %eax,%eax
80105d76: 0f 85 37 ff ff ff jne 80105cb3 <trap+0xa3>
80105d7c: e9 4f ff ff ff jmp 80105cd0 <trap+0xc0>
uartintr();
80105d81: e8 4a 02 00 00 call 80105fd0 <uartintr>
lapiceoi();
80105d86: e8 35 cb ff ff call 801028c0 <lapiceoi>
if(myproc() && myproc()->killed && (tf->cs&3) == DPL_USER)
80105d8b: e8 d0 db ff ff call 80103960 <myproc>
80105d90: 85 c0 test %eax,%eax
80105d92: 0f 85 1b ff ff ff jne 80105cb3 <trap+0xa3>
80105d98: e9 33 ff ff ff jmp 80105cd0 <trap+0xc0>
cprintf("cpu%d: spurious interrupt at %x:%x\n",
80105d9d: 8b 7b 38 mov 0x38(%ebx),%edi
80105da0: 0f b7 73 3c movzwl 0x3c(%ebx),%esi
80105da4: e8 97 db ff ff call 80103940 <cpuid>
80105da9: 57 push %edi
80105daa: 56 push %esi
80105dab: 50 push %eax
80105dac: 68 0c 7d 10 80 push $0x80107d0c
80105db1: e8 fa a8 ff ff call 801006b0 <cprintf>
lapiceoi();
80105db6: e8 05 cb ff ff call 801028c0 <lapiceoi>
break;
80105dbb: 83 c4 10 add $0x10,%esp
if(myproc() && myproc()->killed && (tf->cs&3) == DPL_USER)
80105dbe: e8 9d db ff ff call 80103960 <myproc>
80105dc3: 85 c0 test %eax,%eax
80105dc5: 0f 85 e8 fe ff ff jne 80105cb3 <trap+0xa3>
80105dcb: e9 00 ff ff ff jmp 80105cd0 <trap+0xc0>
if(myproc() && myproc()->state == RUNNING &&
80105dd0: 83 7b 30 20 cmpl $0x20,0x30(%ebx)
80105dd4: 0f 85 0e ff ff ff jne 80105ce8 <trap+0xd8>
yield();
80105dda: e8 f1 e0 ff ff call 80103ed0 <yield>
80105ddf: e9 04 ff ff ff jmp 80105ce8 <trap+0xd8>
80105de4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if(myproc()->killed)
80105de8: e8 73 db ff ff call 80103960 <myproc>
80105ded: 8b 70 24 mov 0x24(%eax),%esi
80105df0: 85 f6 test %esi,%esi
80105df2: 75 3c jne 80105e30 <trap+0x220>
myproc()->tf = tf;
80105df4: e8 67 db ff ff call 80103960 <myproc>
80105df9: 89 58 18 mov %ebx,0x18(%eax)
syscall();
80105dfc: e8 5f ee ff ff call 80104c60 <syscall>
if(myproc()->killed)
80105e01: e8 5a db ff ff call 80103960 <myproc>
80105e06: 8b 48 24 mov 0x24(%eax),%ecx
80105e09: 85 c9 test %ecx,%ecx
80105e0b: 0f 84 fd fe ff ff je 80105d0e <trap+0xfe>
}
80105e11: 8d 65 f4 lea -0xc(%ebp),%esp
80105e14: 5b pop %ebx
80105e15: 5e pop %esi
80105e16: 5f pop %edi
80105e17: 5d pop %ebp
exit();
80105e18: e9 73 df ff ff jmp 80103d90 <exit>
80105e1d: 8d 76 00 lea 0x0(%esi),%esi
exit();
80105e20: e8 6b df ff ff call 80103d90 <exit>
80105e25: e9 a6 fe ff ff jmp 80105cd0 <trap+0xc0>
80105e2a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
exit();
80105e30: e8 5b df ff ff call 80103d90 <exit>
80105e35: eb bd jmp 80105df4 <trap+0x1e4>
80105e37: 0f 20 d6 mov %cr2,%esi
cprintf("unexpected trap %d from cpu %d eip %x (cr2=0x%x)\n",
80105e3a: e8 01 db ff ff call 80103940 <cpuid>
80105e3f: 83 ec 0c sub $0xc,%esp
80105e42: 56 push %esi
80105e43: 57 push %edi
80105e44: 50 push %eax
80105e45: ff 73 30 pushl 0x30(%ebx)
80105e48: 68 30 7d 10 80 push $0x80107d30
80105e4d: e8 5e a8 ff ff call 801006b0 <cprintf>
panic("trap");
80105e52: 83 c4 14 add $0x14,%esp
80105e55: 68 06 7d 10 80 push $0x80107d06
80105e5a: e8 31 a5 ff ff call 80100390 <panic>
80105e5f: 90 nop
80105e60 <uartgetc>:
outb(COM1+0, c);
}
static int
uartgetc(void)
{
80105e60: f3 0f 1e fb endbr32
if(!uart)
80105e64: a1 bc a5 10 80 mov 0x8010a5bc,%eax
80105e69: 85 c0 test %eax,%eax
80105e6b: 74 1b je 80105e88 <uartgetc+0x28>
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80105e6d: ba fd 03 00 00 mov $0x3fd,%edx
80105e72: ec in (%dx),%al
return -1;
if(!(inb(COM1+5) & 0x01))
80105e73: a8 01 test $0x1,%al
80105e75: 74 11 je 80105e88 <uartgetc+0x28>
80105e77: ba f8 03 00 00 mov $0x3f8,%edx
80105e7c: ec in (%dx),%al
return -1;
return inb(COM1+0);
80105e7d: 0f b6 c0 movzbl %al,%eax
80105e80: c3 ret
80105e81: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
return -1;
80105e88: b8 ff ff ff ff mov $0xffffffff,%eax
}
80105e8d: c3 ret
80105e8e: 66 90 xchg %ax,%ax
80105e90 <uartputc.part.0>:
uartputc(int c)
80105e90: 55 push %ebp
80105e91: 89 e5 mov %esp,%ebp
80105e93: 57 push %edi
80105e94: 89 c7 mov %eax,%edi
80105e96: 56 push %esi
80105e97: be fd 03 00 00 mov $0x3fd,%esi
80105e9c: 53 push %ebx
80105e9d: bb 80 00 00 00 mov $0x80,%ebx
80105ea2: 83 ec 0c sub $0xc,%esp
80105ea5: eb 1b jmp 80105ec2 <uartputc.part.0+0x32>
80105ea7: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80105eae: 66 90 xchg %ax,%ax
microdelay(10);
80105eb0: 83 ec 0c sub $0xc,%esp
80105eb3: 6a 0a push $0xa
80105eb5: e8 26 ca ff ff call 801028e0 <microdelay>
for(i = 0; i < 128 && !(inb(COM1+5) & 0x20); i++)
80105eba: 83 c4 10 add $0x10,%esp
80105ebd: 83 eb 01 sub $0x1,%ebx
80105ec0: 74 07 je 80105ec9 <uartputc.part.0+0x39>
80105ec2: 89 f2 mov %esi,%edx
80105ec4: ec in (%dx),%al
80105ec5: a8 20 test $0x20,%al
80105ec7: 74 e7 je 80105eb0 <uartputc.part.0+0x20>
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80105ec9: ba f8 03 00 00 mov $0x3f8,%edx
80105ece: 89 f8 mov %edi,%eax
80105ed0: ee out %al,(%dx)
}
80105ed1: 8d 65 f4 lea -0xc(%ebp),%esp
80105ed4: 5b pop %ebx
80105ed5: 5e pop %esi
80105ed6: 5f pop %edi
80105ed7: 5d pop %ebp
80105ed8: c3 ret
80105ed9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80105ee0 <uartinit>:
{
80105ee0: f3 0f 1e fb endbr32
80105ee4: 55 push %ebp
80105ee5: 31 c9 xor %ecx,%ecx
80105ee7: 89 c8 mov %ecx,%eax
80105ee9: 89 e5 mov %esp,%ebp
80105eeb: 57 push %edi
80105eec: 56 push %esi
80105eed: 53 push %ebx
80105eee: bb fa 03 00 00 mov $0x3fa,%ebx
80105ef3: 89 da mov %ebx,%edx
80105ef5: 83 ec 0c sub $0xc,%esp
80105ef8: ee out %al,(%dx)
80105ef9: bf fb 03 00 00 mov $0x3fb,%edi
80105efe: b8 80 ff ff ff mov $0xffffff80,%eax
80105f03: 89 fa mov %edi,%edx
80105f05: ee out %al,(%dx)
80105f06: b8 0c 00 00 00 mov $0xc,%eax
80105f0b: ba f8 03 00 00 mov $0x3f8,%edx
80105f10: ee out %al,(%dx)
80105f11: be f9 03 00 00 mov $0x3f9,%esi
80105f16: 89 c8 mov %ecx,%eax
80105f18: 89 f2 mov %esi,%edx
80105f1a: ee out %al,(%dx)
80105f1b: b8 03 00 00 00 mov $0x3,%eax
80105f20: 89 fa mov %edi,%edx
80105f22: ee out %al,(%dx)
80105f23: ba fc 03 00 00 mov $0x3fc,%edx
80105f28: 89 c8 mov %ecx,%eax
80105f2a: ee out %al,(%dx)
80105f2b: b8 01 00 00 00 mov $0x1,%eax
80105f30: 89 f2 mov %esi,%edx
80105f32: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80105f33: ba fd 03 00 00 mov $0x3fd,%edx
80105f38: ec in (%dx),%al
if(inb(COM1+5) == 0xFF)
80105f39: 3c ff cmp $0xff,%al
80105f3b: 74 52 je 80105f8f <uartinit+0xaf>
uart = 1;
80105f3d: c7 05 bc a5 10 80 01 movl $0x1,0x8010a5bc
80105f44: 00 00 00
80105f47: 89 da mov %ebx,%edx
80105f49: ec in (%dx),%al
80105f4a: ba f8 03 00 00 mov $0x3f8,%edx
80105f4f: ec in (%dx),%al
ioapicenable(IRQ_COM1, 0);
80105f50: 83 ec 08 sub $0x8,%esp
80105f53: be 76 00 00 00 mov $0x76,%esi
for(p="xv6...\n"; *p; p++)
80105f58: bb 28 7e 10 80 mov $0x80107e28,%ebx
ioapicenable(IRQ_COM1, 0);
80105f5d: 6a 00 push $0x0
80105f5f: 6a 04 push $0x4
80105f61: e8 ca c4 ff ff call 80102430 <ioapicenable>
80105f66: 83 c4 10 add $0x10,%esp
for(p="xv6...\n"; *p; p++)
80105f69: b8 78 00 00 00 mov $0x78,%eax
80105f6e: eb 04 jmp 80105f74 <uartinit+0x94>
80105f70: 0f b6 73 01 movzbl 0x1(%ebx),%esi
if(!uart)
80105f74: 8b 15 bc a5 10 80 mov 0x8010a5bc,%edx
80105f7a: 85 d2 test %edx,%edx
80105f7c: 74 08 je 80105f86 <uartinit+0xa6>
uartputc(*p);
80105f7e: 0f be c0 movsbl %al,%eax
80105f81: e8 0a ff ff ff call 80105e90 <uartputc.part.0>
for(p="xv6...\n"; *p; p++)
80105f86: 89 f0 mov %esi,%eax
80105f88: 83 c3 01 add $0x1,%ebx
80105f8b: 84 c0 test %al,%al
80105f8d: 75 e1 jne 80105f70 <uartinit+0x90>
}
80105f8f: 8d 65 f4 lea -0xc(%ebp),%esp
80105f92: 5b pop %ebx
80105f93: 5e pop %esi
80105f94: 5f pop %edi
80105f95: 5d pop %ebp
80105f96: c3 ret
80105f97: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80105f9e: 66 90 xchg %ax,%ax
80105fa0 <uartputc>:
{
80105fa0: f3 0f 1e fb endbr32
80105fa4: 55 push %ebp
if(!uart)
80105fa5: 8b 15 bc a5 10 80 mov 0x8010a5bc,%edx
{
80105fab: 89 e5 mov %esp,%ebp
80105fad: 8b 45 08 mov 0x8(%ebp),%eax
if(!uart)
80105fb0: 85 d2 test %edx,%edx
80105fb2: 74 0c je 80105fc0 <uartputc+0x20>
}
80105fb4: 5d pop %ebp
80105fb5: e9 d6 fe ff ff jmp 80105e90 <uartputc.part.0>
80105fba: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80105fc0: 5d pop %ebp
80105fc1: c3 ret
80105fc2: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80105fc9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80105fd0 <uartintr>:
void
uartintr(void)
{
80105fd0: f3 0f 1e fb endbr32
80105fd4: 55 push %ebp
80105fd5: 89 e5 mov %esp,%ebp
80105fd7: 83 ec 14 sub $0x14,%esp
consoleintr(uartgetc);
80105fda: 68 60 5e 10 80 push $0x80105e60
80105fdf: e8 7c a8 ff ff call 80100860 <consoleintr>
}
80105fe4: 83 c4 10 add $0x10,%esp
80105fe7: c9 leave
80105fe8: c3 ret
80105fe9 <vector0>:
# generated by vectors.pl - do not edit
# handlers
.globl alltraps
.globl vector0
vector0:
pushl $0
80105fe9: 6a 00 push $0x0
pushl $0
80105feb: 6a 00 push $0x0
jmp alltraps
80105fed: e9 40 fb ff ff jmp 80105b32 <alltraps>
80105ff2 <vector1>:
.globl vector1
vector1:
pushl $0
80105ff2: 6a 00 push $0x0
pushl $1
80105ff4: 6a 01 push $0x1
jmp alltraps
80105ff6: e9 37 fb ff ff jmp 80105b32 <alltraps>
80105ffb <vector2>:
.globl vector2
vector2:
pushl $0
80105ffb: 6a 00 push $0x0
pushl $2
80105ffd: 6a 02 push $0x2
jmp alltraps
80105fff: e9 2e fb ff ff jmp 80105b32 <alltraps>
80106004 <vector3>:
.globl vector3
vector3:
pushl $0
80106004: 6a 00 push $0x0
pushl $3
80106006: 6a 03 push $0x3
jmp alltraps
80106008: e9 25 fb ff ff jmp 80105b32 <alltraps>
8010600d <vector4>:
.globl vector4
vector4:
pushl $0
8010600d: 6a 00 push $0x0
pushl $4
8010600f: 6a 04 push $0x4
jmp alltraps
80106011: e9 1c fb ff ff jmp 80105b32 <alltraps>
80106016 <vector5>:
.globl vector5
vector5:
pushl $0
80106016: 6a 00 push $0x0
pushl $5
80106018: 6a 05 push $0x5
jmp alltraps
8010601a: e9 13 fb ff ff jmp 80105b32 <alltraps>
8010601f <vector6>:
.globl vector6
vector6:
pushl $0
8010601f: 6a 00 push $0x0
pushl $6
80106021: 6a 06 push $0x6
jmp alltraps
80106023: e9 0a fb ff ff jmp 80105b32 <alltraps>
80106028 <vector7>:
.globl vector7
vector7:
pushl $0
80106028: 6a 00 push $0x0
pushl $7
8010602a: 6a 07 push $0x7
jmp alltraps
8010602c: e9 01 fb ff ff jmp 80105b32 <alltraps>
80106031 <vector8>:
.globl vector8
vector8:
pushl $8
80106031: 6a 08 push $0x8
jmp alltraps
80106033: e9 fa fa ff ff jmp 80105b32 <alltraps>
80106038 <vector9>:
.globl vector9
vector9:
pushl $0
80106038: 6a 00 push $0x0
pushl $9
8010603a: 6a 09 push $0x9
jmp alltraps
8010603c: e9 f1 fa ff ff jmp 80105b32 <alltraps>
80106041 <vector10>:
.globl vector10
vector10:
pushl $10
80106041: 6a 0a push $0xa
jmp alltraps
80106043: e9 ea fa ff ff jmp 80105b32 <alltraps>
80106048 <vector11>:
.globl vector11
vector11:
pushl $11
80106048: 6a 0b push $0xb
jmp alltraps
8010604a: e9 e3 fa ff ff jmp 80105b32 <alltraps>
8010604f <vector12>:
.globl vector12
vector12:
pushl $12
8010604f: 6a 0c push $0xc
jmp alltraps
80106051: e9 dc fa ff ff jmp 80105b32 <alltraps>
80106056 <vector13>:
.globl vector13
vector13:
pushl $13
80106056: 6a 0d push $0xd
jmp alltraps
80106058: e9 d5 fa ff ff jmp 80105b32 <alltraps>
8010605d <vector14>:
.globl vector14
vector14:
pushl $14
8010605d: 6a 0e push $0xe
jmp alltraps
8010605f: e9 ce fa ff ff jmp 80105b32 <alltraps>
80106064 <vector15>:
.globl vector15
vector15:
pushl $0
80106064: 6a 00 push $0x0
pushl $15
80106066: 6a 0f push $0xf
jmp alltraps
80106068: e9 c5 fa ff ff jmp 80105b32 <alltraps>
8010606d <vector16>:
.globl vector16
vector16:
pushl $0
8010606d: 6a 00 push $0x0
pushl $16
8010606f: 6a 10 push $0x10
jmp alltraps
80106071: e9 bc fa ff ff jmp 80105b32 <alltraps>
80106076 <vector17>:
.globl vector17
vector17:
pushl $17
80106076: 6a 11 push $0x11
jmp alltraps
80106078: e9 b5 fa ff ff jmp 80105b32 <alltraps>
8010607d <vector18>:
.globl vector18
vector18:
pushl $0
8010607d: 6a 00 push $0x0
pushl $18
8010607f: 6a 12 push $0x12
jmp alltraps
80106081: e9 ac fa ff ff jmp 80105b32 <alltraps>
80106086 <vector19>:
.globl vector19
vector19:
pushl $0
80106086: 6a 00 push $0x0
pushl $19
80106088: 6a 13 push $0x13
jmp alltraps
8010608a: e9 a3 fa ff ff jmp 80105b32 <alltraps>
8010608f <vector20>:
.globl vector20
vector20:
pushl $0
8010608f: 6a 00 push $0x0
pushl $20
80106091: 6a 14 push $0x14
jmp alltraps
80106093: e9 9a fa ff ff jmp 80105b32 <alltraps>
80106098 <vector21>:
.globl vector21
vector21:
pushl $0
80106098: 6a 00 push $0x0
pushl $21
8010609a: 6a 15 push $0x15
jmp alltraps
8010609c: e9 91 fa ff ff jmp 80105b32 <alltraps>
801060a1 <vector22>:
.globl vector22
vector22:
pushl $0
801060a1: 6a 00 push $0x0
pushl $22
801060a3: 6a 16 push $0x16
jmp alltraps
801060a5: e9 88 fa ff ff jmp 80105b32 <alltraps>
801060aa <vector23>:
.globl vector23
vector23:
pushl $0
801060aa: 6a 00 push $0x0
pushl $23
801060ac: 6a 17 push $0x17
jmp alltraps
801060ae: e9 7f fa ff ff jmp 80105b32 <alltraps>
801060b3 <vector24>:
.globl vector24
vector24:
pushl $0
801060b3: 6a 00 push $0x0
pushl $24
801060b5: 6a 18 push $0x18
jmp alltraps
801060b7: e9 76 fa ff ff jmp 80105b32 <alltraps>
801060bc <vector25>:
.globl vector25
vector25:
pushl $0
801060bc: 6a 00 push $0x0
pushl $25
801060be: 6a 19 push $0x19
jmp alltraps
801060c0: e9 6d fa ff ff jmp 80105b32 <alltraps>
801060c5 <vector26>:
.globl vector26
vector26:
pushl $0
801060c5: 6a 00 push $0x0
pushl $26
801060c7: 6a 1a push $0x1a
jmp alltraps
801060c9: e9 64 fa ff ff jmp 80105b32 <alltraps>
801060ce <vector27>:
.globl vector27
vector27:
pushl $0
801060ce: 6a 00 push $0x0
pushl $27
801060d0: 6a 1b push $0x1b
jmp alltraps
801060d2: e9 5b fa ff ff jmp 80105b32 <alltraps>
801060d7 <vector28>:
.globl vector28
vector28:
pushl $0
801060d7: 6a 00 push $0x0
pushl $28
801060d9: 6a 1c push $0x1c
jmp alltraps
801060db: e9 52 fa ff ff jmp 80105b32 <alltraps>
801060e0 <vector29>:
.globl vector29
vector29:
pushl $0
801060e0: 6a 00 push $0x0
pushl $29
801060e2: 6a 1d push $0x1d
jmp alltraps
801060e4: e9 49 fa ff ff jmp 80105b32 <alltraps>
801060e9 <vector30>:
.globl vector30
vector30:
pushl $0
801060e9: 6a 00 push $0x0
pushl $30
801060eb: 6a 1e push $0x1e
jmp alltraps
801060ed: e9 40 fa ff ff jmp 80105b32 <alltraps>
801060f2 <vector31>:
.globl vector31
vector31:
pushl $0
801060f2: 6a 00 push $0x0
pushl $31
801060f4: 6a 1f push $0x1f
jmp alltraps
801060f6: e9 37 fa ff ff jmp 80105b32 <alltraps>
801060fb <vector32>:
.globl vector32
vector32:
pushl $0
801060fb: 6a 00 push $0x0
pushl $32
801060fd: 6a 20 push $0x20
jmp alltraps
801060ff: e9 2e fa ff ff jmp 80105b32 <alltraps>
80106104 <vector33>:
.globl vector33
vector33:
pushl $0
80106104: 6a 00 push $0x0
pushl $33
80106106: 6a 21 push $0x21
jmp alltraps
80106108: e9 25 fa ff ff jmp 80105b32 <alltraps>
8010610d <vector34>:
.globl vector34
vector34:
pushl $0
8010610d: 6a 00 push $0x0
pushl $34
8010610f: 6a 22 push $0x22
jmp alltraps
80106111: e9 1c fa ff ff jmp 80105b32 <alltraps>
80106116 <vector35>:
.globl vector35
vector35:
pushl $0
80106116: 6a 00 push $0x0
pushl $35
80106118: 6a 23 push $0x23
jmp alltraps
8010611a: e9 13 fa ff ff jmp 80105b32 <alltraps>
8010611f <vector36>:
.globl vector36
vector36:
pushl $0
8010611f: 6a 00 push $0x0
pushl $36
80106121: 6a 24 push $0x24
jmp alltraps
80106123: e9 0a fa ff ff jmp 80105b32 <alltraps>
80106128 <vector37>:
.globl vector37
vector37:
pushl $0
80106128: 6a 00 push $0x0
pushl $37
8010612a: 6a 25 push $0x25
jmp alltraps
8010612c: e9 01 fa ff ff jmp 80105b32 <alltraps>
80106131 <vector38>:
.globl vector38
vector38:
pushl $0
80106131: 6a 00 push $0x0
pushl $38
80106133: 6a 26 push $0x26
jmp alltraps
80106135: e9 f8 f9 ff ff jmp 80105b32 <alltraps>
8010613a <vector39>:
.globl vector39
vector39:
pushl $0
8010613a: 6a 00 push $0x0
pushl $39
8010613c: 6a 27 push $0x27
jmp alltraps
8010613e: e9 ef f9 ff ff jmp 80105b32 <alltraps>
80106143 <vector40>:
.globl vector40
vector40:
pushl $0
80106143: 6a 00 push $0x0
pushl $40
80106145: 6a 28 push $0x28
jmp alltraps
80106147: e9 e6 f9 ff ff jmp 80105b32 <alltraps>
8010614c <vector41>:
.globl vector41
vector41:
pushl $0
8010614c: 6a 00 push $0x0
pushl $41
8010614e: 6a 29 push $0x29
jmp alltraps
80106150: e9 dd f9 ff ff jmp 80105b32 <alltraps>
80106155 <vector42>:
.globl vector42
vector42:
pushl $0
80106155: 6a 00 push $0x0
pushl $42
80106157: 6a 2a push $0x2a
jmp alltraps
80106159: e9 d4 f9 ff ff jmp 80105b32 <alltraps>
8010615e <vector43>:
.globl vector43
vector43:
pushl $0
8010615e: 6a 00 push $0x0
pushl $43
80106160: 6a 2b push $0x2b
jmp alltraps
80106162: e9 cb f9 ff ff jmp 80105b32 <alltraps>
80106167 <vector44>:
.globl vector44
vector44:
pushl $0
80106167: 6a 00 push $0x0
pushl $44
80106169: 6a 2c push $0x2c
jmp alltraps
8010616b: e9 c2 f9 ff ff jmp 80105b32 <alltraps>
80106170 <vector45>:
.globl vector45
vector45:
pushl $0
80106170: 6a 00 push $0x0
pushl $45
80106172: 6a 2d push $0x2d
jmp alltraps
80106174: e9 b9 f9 ff ff jmp 80105b32 <alltraps>
80106179 <vector46>:
.globl vector46
vector46:
pushl $0
80106179: 6a 00 push $0x0
pushl $46
8010617b: 6a 2e push $0x2e
jmp alltraps
8010617d: e9 b0 f9 ff ff jmp 80105b32 <alltraps>
80106182 <vector47>:
.globl vector47
vector47:
pushl $0
80106182: 6a 00 push $0x0
pushl $47
80106184: 6a 2f push $0x2f
jmp alltraps
80106186: e9 a7 f9 ff ff jmp 80105b32 <alltraps>
8010618b <vector48>:
.globl vector48
vector48:
pushl $0
8010618b: 6a 00 push $0x0
pushl $48
8010618d: 6a 30 push $0x30
jmp alltraps
8010618f: e9 9e f9 ff ff jmp 80105b32 <alltraps>
80106194 <vector49>:
.globl vector49
vector49:
pushl $0
80106194: 6a 00 push $0x0
pushl $49
80106196: 6a 31 push $0x31
jmp alltraps
80106198: e9 95 f9 ff ff jmp 80105b32 <alltraps>
8010619d <vector50>:
.globl vector50
vector50:
pushl $0
8010619d: 6a 00 push $0x0
pushl $50
8010619f: 6a 32 push $0x32
jmp alltraps
801061a1: e9 8c f9 ff ff jmp 80105b32 <alltraps>
801061a6 <vector51>:
.globl vector51
vector51:
pushl $0
801061a6: 6a 00 push $0x0
pushl $51
801061a8: 6a 33 push $0x33
jmp alltraps
801061aa: e9 83 f9 ff ff jmp 80105b32 <alltraps>
801061af <vector52>:
.globl vector52
vector52:
pushl $0
801061af: 6a 00 push $0x0
pushl $52
801061b1: 6a 34 push $0x34
jmp alltraps
801061b3: e9 7a f9 ff ff jmp 80105b32 <alltraps>
801061b8 <vector53>:
.globl vector53
vector53:
pushl $0
801061b8: 6a 00 push $0x0
pushl $53
801061ba: 6a 35 push $0x35
jmp alltraps
801061bc: e9 71 f9 ff ff jmp 80105b32 <alltraps>
801061c1 <vector54>:
.globl vector54
vector54:
pushl $0
801061c1: 6a 00 push $0x0
pushl $54
801061c3: 6a 36 push $0x36
jmp alltraps
801061c5: e9 68 f9 ff ff jmp 80105b32 <alltraps>
801061ca <vector55>:
.globl vector55
vector55:
pushl $0
801061ca: 6a 00 push $0x0
pushl $55
801061cc: 6a 37 push $0x37
jmp alltraps
801061ce: e9 5f f9 ff ff jmp 80105b32 <alltraps>
801061d3 <vector56>:
.globl vector56
vector56:
pushl $0
801061d3: 6a 00 push $0x0
pushl $56
801061d5: 6a 38 push $0x38
jmp alltraps
801061d7: e9 56 f9 ff ff jmp 80105b32 <alltraps>
801061dc <vector57>:
.globl vector57
vector57:
pushl $0
801061dc: 6a 00 push $0x0
pushl $57
801061de: 6a 39 push $0x39
jmp alltraps
801061e0: e9 4d f9 ff ff jmp 80105b32 <alltraps>
801061e5 <vector58>:
.globl vector58
vector58:
pushl $0
801061e5: 6a 00 push $0x0
pushl $58
801061e7: 6a 3a push $0x3a
jmp alltraps
801061e9: e9 44 f9 ff ff jmp 80105b32 <alltraps>
801061ee <vector59>:
.globl vector59
vector59:
pushl $0
801061ee: 6a 00 push $0x0
pushl $59
801061f0: 6a 3b push $0x3b
jmp alltraps
801061f2: e9 3b f9 ff ff jmp 80105b32 <alltraps>
801061f7 <vector60>:
.globl vector60
vector60:
pushl $0
801061f7: 6a 00 push $0x0
pushl $60
801061f9: 6a 3c push $0x3c
jmp alltraps
801061fb: e9 32 f9 ff ff jmp 80105b32 <alltraps>
80106200 <vector61>:
.globl vector61
vector61:
pushl $0
80106200: 6a 00 push $0x0
pushl $61
80106202: 6a 3d push $0x3d
jmp alltraps
80106204: e9 29 f9 ff ff jmp 80105b32 <alltraps>
80106209 <vector62>:
.globl vector62
vector62:
pushl $0
80106209: 6a 00 push $0x0
pushl $62
8010620b: 6a 3e push $0x3e
jmp alltraps
8010620d: e9 20 f9 ff ff jmp 80105b32 <alltraps>
80106212 <vector63>:
.globl vector63
vector63:
pushl $0
80106212: 6a 00 push $0x0
pushl $63
80106214: 6a 3f push $0x3f
jmp alltraps
80106216: e9 17 f9 ff ff jmp 80105b32 <alltraps>
8010621b <vector64>:
.globl vector64
vector64:
pushl $0
8010621b: 6a 00 push $0x0
pushl $64
8010621d: 6a 40 push $0x40
jmp alltraps
8010621f: e9 0e f9 ff ff jmp 80105b32 <alltraps>
80106224 <vector65>:
.globl vector65
vector65:
pushl $0
80106224: 6a 00 push $0x0
pushl $65
80106226: 6a 41 push $0x41
jmp alltraps
80106228: e9 05 f9 ff ff jmp 80105b32 <alltraps>
8010622d <vector66>:
.globl vector66
vector66:
pushl $0
8010622d: 6a 00 push $0x0
pushl $66
8010622f: 6a 42 push $0x42
jmp alltraps
80106231: e9 fc f8 ff ff jmp 80105b32 <alltraps>
80106236 <vector67>:
.globl vector67
vector67:
pushl $0
80106236: 6a 00 push $0x0
pushl $67
80106238: 6a 43 push $0x43
jmp alltraps
8010623a: e9 f3 f8 ff ff jmp 80105b32 <alltraps>
8010623f <vector68>:
.globl vector68
vector68:
pushl $0
8010623f: 6a 00 push $0x0
pushl $68
80106241: 6a 44 push $0x44
jmp alltraps
80106243: e9 ea f8 ff ff jmp 80105b32 <alltraps>
80106248 <vector69>:
.globl vector69
vector69:
pushl $0
80106248: 6a 00 push $0x0
pushl $69
8010624a: 6a 45 push $0x45
jmp alltraps
8010624c: e9 e1 f8 ff ff jmp 80105b32 <alltraps>
80106251 <vector70>:
.globl vector70
vector70:
pushl $0
80106251: 6a 00 push $0x0
pushl $70
80106253: 6a 46 push $0x46
jmp alltraps
80106255: e9 d8 f8 ff ff jmp 80105b32 <alltraps>
8010625a <vector71>:
.globl vector71
vector71:
pushl $0
8010625a: 6a 00 push $0x0
pushl $71
8010625c: 6a 47 push $0x47
jmp alltraps
8010625e: e9 cf f8 ff ff jmp 80105b32 <alltraps>
80106263 <vector72>:
.globl vector72
vector72:
pushl $0
80106263: 6a 00 push $0x0
pushl $72
80106265: 6a 48 push $0x48
jmp alltraps
80106267: e9 c6 f8 ff ff jmp 80105b32 <alltraps>
8010626c <vector73>:
.globl vector73
vector73:
pushl $0
8010626c: 6a 00 push $0x0
pushl $73
8010626e: 6a 49 push $0x49
jmp alltraps
80106270: e9 bd f8 ff ff jmp 80105b32 <alltraps>
80106275 <vector74>:
.globl vector74
vector74:
pushl $0
80106275: 6a 00 push $0x0
pushl $74
80106277: 6a 4a push $0x4a
jmp alltraps
80106279: e9 b4 f8 ff ff jmp 80105b32 <alltraps>
8010627e <vector75>:
.globl vector75
vector75:
pushl $0
8010627e: 6a 00 push $0x0
pushl $75
80106280: 6a 4b push $0x4b
jmp alltraps
80106282: e9 ab f8 ff ff jmp 80105b32 <alltraps>
80106287 <vector76>:
.globl vector76
vector76:
pushl $0
80106287: 6a 00 push $0x0
pushl $76
80106289: 6a 4c push $0x4c
jmp alltraps
8010628b: e9 a2 f8 ff ff jmp 80105b32 <alltraps>
80106290 <vector77>:
.globl vector77
vector77:
pushl $0
80106290: 6a 00 push $0x0
pushl $77
80106292: 6a 4d push $0x4d
jmp alltraps
80106294: e9 99 f8 ff ff jmp 80105b32 <alltraps>
80106299 <vector78>:
.globl vector78
vector78:
pushl $0
80106299: 6a 00 push $0x0
pushl $78
8010629b: 6a 4e push $0x4e
jmp alltraps
8010629d: e9 90 f8 ff ff jmp 80105b32 <alltraps>
801062a2 <vector79>:
.globl vector79
vector79:
pushl $0
801062a2: 6a 00 push $0x0
pushl $79
801062a4: 6a 4f push $0x4f
jmp alltraps
801062a6: e9 87 f8 ff ff jmp 80105b32 <alltraps>
801062ab <vector80>:
.globl vector80
vector80:
pushl $0
801062ab: 6a 00 push $0x0
pushl $80
801062ad: 6a 50 push $0x50
jmp alltraps
801062af: e9 7e f8 ff ff jmp 80105b32 <alltraps>
801062b4 <vector81>:
.globl vector81
vector81:
pushl $0
801062b4: 6a 00 push $0x0
pushl $81
801062b6: 6a 51 push $0x51
jmp alltraps
801062b8: e9 75 f8 ff ff jmp 80105b32 <alltraps>
801062bd <vector82>:
.globl vector82
vector82:
pushl $0
801062bd: 6a 00 push $0x0
pushl $82
801062bf: 6a 52 push $0x52
jmp alltraps
801062c1: e9 6c f8 ff ff jmp 80105b32 <alltraps>
801062c6 <vector83>:
.globl vector83
vector83:
pushl $0
801062c6: 6a 00 push $0x0
pushl $83
801062c8: 6a 53 push $0x53
jmp alltraps
801062ca: e9 63 f8 ff ff jmp 80105b32 <alltraps>
801062cf <vector84>:
.globl vector84
vector84:
pushl $0
801062cf: 6a 00 push $0x0
pushl $84
801062d1: 6a 54 push $0x54
jmp alltraps
801062d3: e9 5a f8 ff ff jmp 80105b32 <alltraps>
801062d8 <vector85>:
.globl vector85
vector85:
pushl $0
801062d8: 6a 00 push $0x0
pushl $85
801062da: 6a 55 push $0x55
jmp alltraps
801062dc: e9 51 f8 ff ff jmp 80105b32 <alltraps>
801062e1 <vector86>:
.globl vector86
vector86:
pushl $0
801062e1: 6a 00 push $0x0
pushl $86
801062e3: 6a 56 push $0x56
jmp alltraps
801062e5: e9 48 f8 ff ff jmp 80105b32 <alltraps>
801062ea <vector87>:
.globl vector87
vector87:
pushl $0
801062ea: 6a 00 push $0x0
pushl $87
801062ec: 6a 57 push $0x57
jmp alltraps
801062ee: e9 3f f8 ff ff jmp 80105b32 <alltraps>
801062f3 <vector88>:
.globl vector88
vector88:
pushl $0
801062f3: 6a 00 push $0x0
pushl $88
801062f5: 6a 58 push $0x58
jmp alltraps
801062f7: e9 36 f8 ff ff jmp 80105b32 <alltraps>
801062fc <vector89>:
.globl vector89
vector89:
pushl $0
801062fc: 6a 00 push $0x0
pushl $89
801062fe: 6a 59 push $0x59
jmp alltraps
80106300: e9 2d f8 ff ff jmp 80105b32 <alltraps>
80106305 <vector90>:
.globl vector90
vector90:
pushl $0
80106305: 6a 00 push $0x0
pushl $90
80106307: 6a 5a push $0x5a
jmp alltraps
80106309: e9 24 f8 ff ff jmp 80105b32 <alltraps>
8010630e <vector91>:
.globl vector91
vector91:
pushl $0
8010630e: 6a 00 push $0x0
pushl $91
80106310: 6a 5b push $0x5b
jmp alltraps
80106312: e9 1b f8 ff ff jmp 80105b32 <alltraps>
80106317 <vector92>:
.globl vector92
vector92:
pushl $0
80106317: 6a 00 push $0x0
pushl $92
80106319: 6a 5c push $0x5c
jmp alltraps
8010631b: e9 12 f8 ff ff jmp 80105b32 <alltraps>
80106320 <vector93>:
.globl vector93
vector93:
pushl $0
80106320: 6a 00 push $0x0
pushl $93
80106322: 6a 5d push $0x5d
jmp alltraps
80106324: e9 09 f8 ff ff jmp 80105b32 <alltraps>
80106329 <vector94>:
.globl vector94
vector94:
pushl $0
80106329: 6a 00 push $0x0
pushl $94
8010632b: 6a 5e push $0x5e
jmp alltraps
8010632d: e9 00 f8 ff ff jmp 80105b32 <alltraps>
80106332 <vector95>:
.globl vector95
vector95:
pushl $0
80106332: 6a 00 push $0x0
pushl $95
80106334: 6a 5f push $0x5f
jmp alltraps
80106336: e9 f7 f7 ff ff jmp 80105b32 <alltraps>
8010633b <vector96>:
.globl vector96
vector96:
pushl $0
8010633b: 6a 00 push $0x0
pushl $96
8010633d: 6a 60 push $0x60
jmp alltraps
8010633f: e9 ee f7 ff ff jmp 80105b32 <alltraps>
80106344 <vector97>:
.globl vector97
vector97:
pushl $0
80106344: 6a 00 push $0x0
pushl $97
80106346: 6a 61 push $0x61
jmp alltraps
80106348: e9 e5 f7 ff ff jmp 80105b32 <alltraps>
8010634d <vector98>:
.globl vector98
vector98:
pushl $0
8010634d: 6a 00 push $0x0
pushl $98
8010634f: 6a 62 push $0x62
jmp alltraps
80106351: e9 dc f7 ff ff jmp 80105b32 <alltraps>
80106356 <vector99>:
.globl vector99
vector99:
pushl $0
80106356: 6a 00 push $0x0
pushl $99
80106358: 6a 63 push $0x63
jmp alltraps
8010635a: e9 d3 f7 ff ff jmp 80105b32 <alltraps>
8010635f <vector100>:
.globl vector100
vector100:
pushl $0
8010635f: 6a 00 push $0x0
pushl $100
80106361: 6a 64 push $0x64
jmp alltraps
80106363: e9 ca f7 ff ff jmp 80105b32 <alltraps>
80106368 <vector101>:
.globl vector101
vector101:
pushl $0
80106368: 6a 00 push $0x0
pushl $101
8010636a: 6a 65 push $0x65
jmp alltraps
8010636c: e9 c1 f7 ff ff jmp 80105b32 <alltraps>
80106371 <vector102>:
.globl vector102
vector102:
pushl $0
80106371: 6a 00 push $0x0
pushl $102
80106373: 6a 66 push $0x66
jmp alltraps
80106375: e9 b8 f7 ff ff jmp 80105b32 <alltraps>
8010637a <vector103>:
.globl vector103
vector103:
pushl $0
8010637a: 6a 00 push $0x0
pushl $103
8010637c: 6a 67 push $0x67
jmp alltraps
8010637e: e9 af f7 ff ff jmp 80105b32 <alltraps>
80106383 <vector104>:
.globl vector104
vector104:
pushl $0
80106383: 6a 00 push $0x0
pushl $104
80106385: 6a 68 push $0x68
jmp alltraps
80106387: e9 a6 f7 ff ff jmp 80105b32 <alltraps>
8010638c <vector105>:
.globl vector105
vector105:
pushl $0
8010638c: 6a 00 push $0x0
pushl $105
8010638e: 6a 69 push $0x69
jmp alltraps
80106390: e9 9d f7 ff ff jmp 80105b32 <alltraps>
80106395 <vector106>:
.globl vector106
vector106:
pushl $0
80106395: 6a 00 push $0x0
pushl $106
80106397: 6a 6a push $0x6a
jmp alltraps
80106399: e9 94 f7 ff ff jmp 80105b32 <alltraps>
8010639e <vector107>:
.globl vector107
vector107:
pushl $0
8010639e: 6a 00 push $0x0
pushl $107
801063a0: 6a 6b push $0x6b
jmp alltraps
801063a2: e9 8b f7 ff ff jmp 80105b32 <alltraps>
801063a7 <vector108>:
.globl vector108
vector108:
pushl $0
801063a7: 6a 00 push $0x0
pushl $108
801063a9: 6a 6c push $0x6c
jmp alltraps
801063ab: e9 82 f7 ff ff jmp 80105b32 <alltraps>
801063b0 <vector109>:
.globl vector109
vector109:
pushl $0
801063b0: 6a 00 push $0x0
pushl $109
801063b2: 6a 6d push $0x6d
jmp alltraps
801063b4: e9 79 f7 ff ff jmp 80105b32 <alltraps>
801063b9 <vector110>:
.globl vector110
vector110:
pushl $0
801063b9: 6a 00 push $0x0
pushl $110
801063bb: 6a 6e push $0x6e
jmp alltraps
801063bd: e9 70 f7 ff ff jmp 80105b32 <alltraps>
801063c2 <vector111>:
.globl vector111
vector111:
pushl $0
801063c2: 6a 00 push $0x0
pushl $111
801063c4: 6a 6f push $0x6f
jmp alltraps
801063c6: e9 67 f7 ff ff jmp 80105b32 <alltraps>
801063cb <vector112>:
.globl vector112
vector112:
pushl $0
801063cb: 6a 00 push $0x0
pushl $112
801063cd: 6a 70 push $0x70
jmp alltraps
801063cf: e9 5e f7 ff ff jmp 80105b32 <alltraps>
801063d4 <vector113>:
.globl vector113
vector113:
pushl $0
801063d4: 6a 00 push $0x0
pushl $113
801063d6: 6a 71 push $0x71
jmp alltraps
801063d8: e9 55 f7 ff ff jmp 80105b32 <alltraps>
801063dd <vector114>:
.globl vector114
vector114:
pushl $0
801063dd: 6a 00 push $0x0
pushl $114
801063df: 6a 72 push $0x72
jmp alltraps
801063e1: e9 4c f7 ff ff jmp 80105b32 <alltraps>
801063e6 <vector115>:
.globl vector115
vector115:
pushl $0
801063e6: 6a 00 push $0x0
pushl $115
801063e8: 6a 73 push $0x73
jmp alltraps
801063ea: e9 43 f7 ff ff jmp 80105b32 <alltraps>
801063ef <vector116>:
.globl vector116
vector116:
pushl $0
801063ef: 6a 00 push $0x0
pushl $116
801063f1: 6a 74 push $0x74
jmp alltraps
801063f3: e9 3a f7 ff ff jmp 80105b32 <alltraps>
801063f8 <vector117>:
.globl vector117
vector117:
pushl $0
801063f8: 6a 00 push $0x0
pushl $117
801063fa: 6a 75 push $0x75
jmp alltraps
801063fc: e9 31 f7 ff ff jmp 80105b32 <alltraps>
80106401 <vector118>:
.globl vector118
vector118:
pushl $0
80106401: 6a 00 push $0x0
pushl $118
80106403: 6a 76 push $0x76
jmp alltraps
80106405: e9 28 f7 ff ff jmp 80105b32 <alltraps>
8010640a <vector119>:
.globl vector119
vector119:
pushl $0
8010640a: 6a 00 push $0x0
pushl $119
8010640c: 6a 77 push $0x77
jmp alltraps
8010640e: e9 1f f7 ff ff jmp 80105b32 <alltraps>
80106413 <vector120>:
.globl vector120
vector120:
pushl $0
80106413: 6a 00 push $0x0
pushl $120
80106415: 6a 78 push $0x78
jmp alltraps
80106417: e9 16 f7 ff ff jmp 80105b32 <alltraps>
8010641c <vector121>:
.globl vector121
vector121:
pushl $0
8010641c: 6a 00 push $0x0
pushl $121
8010641e: 6a 79 push $0x79
jmp alltraps
80106420: e9 0d f7 ff ff jmp 80105b32 <alltraps>
80106425 <vector122>:
.globl vector122
vector122:
pushl $0
80106425: 6a 00 push $0x0
pushl $122
80106427: 6a 7a push $0x7a
jmp alltraps
80106429: e9 04 f7 ff ff jmp 80105b32 <alltraps>
8010642e <vector123>:
.globl vector123
vector123:
pushl $0
8010642e: 6a 00 push $0x0
pushl $123
80106430: 6a 7b push $0x7b
jmp alltraps
80106432: e9 fb f6 ff ff jmp 80105b32 <alltraps>
80106437 <vector124>:
.globl vector124
vector124:
pushl $0
80106437: 6a 00 push $0x0
pushl $124
80106439: 6a 7c push $0x7c
jmp alltraps
8010643b: e9 f2 f6 ff ff jmp 80105b32 <alltraps>
80106440 <vector125>:
.globl vector125
vector125:
pushl $0
80106440: 6a 00 push $0x0
pushl $125
80106442: 6a 7d push $0x7d
jmp alltraps
80106444: e9 e9 f6 ff ff jmp 80105b32 <alltraps>
80106449 <vector126>:
.globl vector126
vector126:
pushl $0
80106449: 6a 00 push $0x0
pushl $126
8010644b: 6a 7e push $0x7e
jmp alltraps
8010644d: e9 e0 f6 ff ff jmp 80105b32 <alltraps>
80106452 <vector127>:
.globl vector127
vector127:
pushl $0
80106452: 6a 00 push $0x0
pushl $127
80106454: 6a 7f push $0x7f
jmp alltraps
80106456: e9 d7 f6 ff ff jmp 80105b32 <alltraps>
8010645b <vector128>:
.globl vector128
vector128:
pushl $0
8010645b: 6a 00 push $0x0
pushl $128
8010645d: 68 80 00 00 00 push $0x80
jmp alltraps
80106462: e9 cb f6 ff ff jmp 80105b32 <alltraps>
80106467 <vector129>:
.globl vector129
vector129:
pushl $0
80106467: 6a 00 push $0x0
pushl $129
80106469: 68 81 00 00 00 push $0x81
jmp alltraps
8010646e: e9 bf f6 ff ff jmp 80105b32 <alltraps>
80106473 <vector130>:
.globl vector130
vector130:
pushl $0
80106473: 6a 00 push $0x0
pushl $130
80106475: 68 82 00 00 00 push $0x82
jmp alltraps
8010647a: e9 b3 f6 ff ff jmp 80105b32 <alltraps>
8010647f <vector131>:
.globl vector131
vector131:
pushl $0
8010647f: 6a 00 push $0x0
pushl $131
80106481: 68 83 00 00 00 push $0x83
jmp alltraps
80106486: e9 a7 f6 ff ff jmp 80105b32 <alltraps>
8010648b <vector132>:
.globl vector132
vector132:
pushl $0
8010648b: 6a 00 push $0x0
pushl $132
8010648d: 68 84 00 00 00 push $0x84
jmp alltraps
80106492: e9 9b f6 ff ff jmp 80105b32 <alltraps>
80106497 <vector133>:
.globl vector133
vector133:
pushl $0
80106497: 6a 00 push $0x0
pushl $133
80106499: 68 85 00 00 00 push $0x85
jmp alltraps
8010649e: e9 8f f6 ff ff jmp 80105b32 <alltraps>
801064a3 <vector134>:
.globl vector134
vector134:
pushl $0
801064a3: 6a 00 push $0x0
pushl $134
801064a5: 68 86 00 00 00 push $0x86
jmp alltraps
801064aa: e9 83 f6 ff ff jmp 80105b32 <alltraps>
801064af <vector135>:
.globl vector135
vector135:
pushl $0
801064af: 6a 00 push $0x0
pushl $135
801064b1: 68 87 00 00 00 push $0x87
jmp alltraps
801064b6: e9 77 f6 ff ff jmp 80105b32 <alltraps>
801064bb <vector136>:
.globl vector136
vector136:
pushl $0
801064bb: 6a 00 push $0x0
pushl $136
801064bd: 68 88 00 00 00 push $0x88
jmp alltraps
801064c2: e9 6b f6 ff ff jmp 80105b32 <alltraps>
801064c7 <vector137>:
.globl vector137
vector137:
pushl $0
801064c7: 6a 00 push $0x0
pushl $137
801064c9: 68 89 00 00 00 push $0x89
jmp alltraps
801064ce: e9 5f f6 ff ff jmp 80105b32 <alltraps>
801064d3 <vector138>:
.globl vector138
vector138:
pushl $0
801064d3: 6a 00 push $0x0
pushl $138
801064d5: 68 8a 00 00 00 push $0x8a
jmp alltraps
801064da: e9 53 f6 ff ff jmp 80105b32 <alltraps>
801064df <vector139>:
.globl vector139
vector139:
pushl $0
801064df: 6a 00 push $0x0
pushl $139
801064e1: 68 8b 00 00 00 push $0x8b
jmp alltraps
801064e6: e9 47 f6 ff ff jmp 80105b32 <alltraps>
801064eb <vector140>:
.globl vector140
vector140:
pushl $0
801064eb: 6a 00 push $0x0
pushl $140
801064ed: 68 8c 00 00 00 push $0x8c
jmp alltraps
801064f2: e9 3b f6 ff ff jmp 80105b32 <alltraps>
801064f7 <vector141>:
.globl vector141
vector141:
pushl $0
801064f7: 6a 00 push $0x0
pushl $141
801064f9: 68 8d 00 00 00 push $0x8d
jmp alltraps
801064fe: e9 2f f6 ff ff jmp 80105b32 <alltraps>
80106503 <vector142>:
.globl vector142
vector142:
pushl $0
80106503: 6a 00 push $0x0
pushl $142
80106505: 68 8e 00 00 00 push $0x8e
jmp alltraps
8010650a: e9 23 f6 ff ff jmp 80105b32 <alltraps>
8010650f <vector143>:
.globl vector143
vector143:
pushl $0
8010650f: 6a 00 push $0x0
pushl $143
80106511: 68 8f 00 00 00 push $0x8f
jmp alltraps
80106516: e9 17 f6 ff ff jmp 80105b32 <alltraps>
8010651b <vector144>:
.globl vector144
vector144:
pushl $0
8010651b: 6a 00 push $0x0
pushl $144
8010651d: 68 90 00 00 00 push $0x90
jmp alltraps
80106522: e9 0b f6 ff ff jmp 80105b32 <alltraps>
80106527 <vector145>:
.globl vector145
vector145:
pushl $0
80106527: 6a 00 push $0x0
pushl $145
80106529: 68 91 00 00 00 push $0x91
jmp alltraps
8010652e: e9 ff f5 ff ff jmp 80105b32 <alltraps>
80106533 <vector146>:
.globl vector146
vector146:
pushl $0
80106533: 6a 00 push $0x0
pushl $146
80106535: 68 92 00 00 00 push $0x92
jmp alltraps
8010653a: e9 f3 f5 ff ff jmp 80105b32 <alltraps>
8010653f <vector147>:
.globl vector147
vector147:
pushl $0
8010653f: 6a 00 push $0x0
pushl $147
80106541: 68 93 00 00 00 push $0x93
jmp alltraps
80106546: e9 e7 f5 ff ff jmp 80105b32 <alltraps>
8010654b <vector148>:
.globl vector148
vector148:
pushl $0
8010654b: 6a 00 push $0x0
pushl $148
8010654d: 68 94 00 00 00 push $0x94
jmp alltraps
80106552: e9 db f5 ff ff jmp 80105b32 <alltraps>
80106557 <vector149>:
.globl vector149
vector149:
pushl $0
80106557: 6a 00 push $0x0
pushl $149
80106559: 68 95 00 00 00 push $0x95
jmp alltraps
8010655e: e9 cf f5 ff ff jmp 80105b32 <alltraps>
80106563 <vector150>:
.globl vector150
vector150:
pushl $0
80106563: 6a 00 push $0x0
pushl $150
80106565: 68 96 00 00 00 push $0x96
jmp alltraps
8010656a: e9 c3 f5 ff ff jmp 80105b32 <alltraps>
8010656f <vector151>:
.globl vector151
vector151:
pushl $0
8010656f: 6a 00 push $0x0
pushl $151
80106571: 68 97 00 00 00 push $0x97
jmp alltraps
80106576: e9 b7 f5 ff ff jmp 80105b32 <alltraps>
8010657b <vector152>:
.globl vector152
vector152:
pushl $0
8010657b: 6a 00 push $0x0
pushl $152
8010657d: 68 98 00 00 00 push $0x98
jmp alltraps
80106582: e9 ab f5 ff ff jmp 80105b32 <alltraps>
80106587 <vector153>:
.globl vector153
vector153:
pushl $0
80106587: 6a 00 push $0x0
pushl $153
80106589: 68 99 00 00 00 push $0x99
jmp alltraps
8010658e: e9 9f f5 ff ff jmp 80105b32 <alltraps>
80106593 <vector154>:
.globl vector154
vector154:
pushl $0
80106593: 6a 00 push $0x0
pushl $154
80106595: 68 9a 00 00 00 push $0x9a
jmp alltraps
8010659a: e9 93 f5 ff ff jmp 80105b32 <alltraps>
8010659f <vector155>:
.globl vector155
vector155:
pushl $0
8010659f: 6a 00 push $0x0
pushl $155
801065a1: 68 9b 00 00 00 push $0x9b
jmp alltraps
801065a6: e9 87 f5 ff ff jmp 80105b32 <alltraps>
801065ab <vector156>:
.globl vector156
vector156:
pushl $0
801065ab: 6a 00 push $0x0
pushl $156
801065ad: 68 9c 00 00 00 push $0x9c
jmp alltraps
801065b2: e9 7b f5 ff ff jmp 80105b32 <alltraps>
801065b7 <vector157>:
.globl vector157
vector157:
pushl $0
801065b7: 6a 00 push $0x0
pushl $157
801065b9: 68 9d 00 00 00 push $0x9d
jmp alltraps
801065be: e9 6f f5 ff ff jmp 80105b32 <alltraps>
801065c3 <vector158>:
.globl vector158
vector158:
pushl $0
801065c3: 6a 00 push $0x0
pushl $158
801065c5: 68 9e 00 00 00 push $0x9e
jmp alltraps
801065ca: e9 63 f5 ff ff jmp 80105b32 <alltraps>
801065cf <vector159>:
.globl vector159
vector159:
pushl $0
801065cf: 6a 00 push $0x0
pushl $159
801065d1: 68 9f 00 00 00 push $0x9f
jmp alltraps
801065d6: e9 57 f5 ff ff jmp 80105b32 <alltraps>
801065db <vector160>:
.globl vector160
vector160:
pushl $0
801065db: 6a 00 push $0x0
pushl $160
801065dd: 68 a0 00 00 00 push $0xa0
jmp alltraps
801065e2: e9 4b f5 ff ff jmp 80105b32 <alltraps>
801065e7 <vector161>:
.globl vector161
vector161:
pushl $0
801065e7: 6a 00 push $0x0
pushl $161
801065e9: 68 a1 00 00 00 push $0xa1
jmp alltraps
801065ee: e9 3f f5 ff ff jmp 80105b32 <alltraps>
801065f3 <vector162>:
.globl vector162
vector162:
pushl $0
801065f3: 6a 00 push $0x0
pushl $162
801065f5: 68 a2 00 00 00 push $0xa2
jmp alltraps
801065fa: e9 33 f5 ff ff jmp 80105b32 <alltraps>
801065ff <vector163>:
.globl vector163
vector163:
pushl $0
801065ff: 6a 00 push $0x0
pushl $163
80106601: 68 a3 00 00 00 push $0xa3
jmp alltraps
80106606: e9 27 f5 ff ff jmp 80105b32 <alltraps>
8010660b <vector164>:
.globl vector164
vector164:
pushl $0
8010660b: 6a 00 push $0x0
pushl $164
8010660d: 68 a4 00 00 00 push $0xa4
jmp alltraps
80106612: e9 1b f5 ff ff jmp 80105b32 <alltraps>
80106617 <vector165>:
.globl vector165
vector165:
pushl $0
80106617: 6a 00 push $0x0
pushl $165
80106619: 68 a5 00 00 00 push $0xa5
jmp alltraps
8010661e: e9 0f f5 ff ff jmp 80105b32 <alltraps>
80106623 <vector166>:
.globl vector166
vector166:
pushl $0
80106623: 6a 00 push $0x0
pushl $166
80106625: 68 a6 00 00 00 push $0xa6
jmp alltraps
8010662a: e9 03 f5 ff ff jmp 80105b32 <alltraps>
8010662f <vector167>:
.globl vector167
vector167:
pushl $0
8010662f: 6a 00 push $0x0
pushl $167
80106631: 68 a7 00 00 00 push $0xa7
jmp alltraps
80106636: e9 f7 f4 ff ff jmp 80105b32 <alltraps>
8010663b <vector168>:
.globl vector168
vector168:
pushl $0
8010663b: 6a 00 push $0x0
pushl $168
8010663d: 68 a8 00 00 00 push $0xa8
jmp alltraps
80106642: e9 eb f4 ff ff jmp 80105b32 <alltraps>
80106647 <vector169>:
.globl vector169
vector169:
pushl $0
80106647: 6a 00 push $0x0
pushl $169
80106649: 68 a9 00 00 00 push $0xa9
jmp alltraps
8010664e: e9 df f4 ff ff jmp 80105b32 <alltraps>
80106653 <vector170>:
.globl vector170
vector170:
pushl $0
80106653: 6a 00 push $0x0
pushl $170
80106655: 68 aa 00 00 00 push $0xaa
jmp alltraps
8010665a: e9 d3 f4 ff ff jmp 80105b32 <alltraps>
8010665f <vector171>:
.globl vector171
vector171:
pushl $0
8010665f: 6a 00 push $0x0
pushl $171
80106661: 68 ab 00 00 00 push $0xab
jmp alltraps
80106666: e9 c7 f4 ff ff jmp 80105b32 <alltraps>
8010666b <vector172>:
.globl vector172
vector172:
pushl $0
8010666b: 6a 00 push $0x0
pushl $172
8010666d: 68 ac 00 00 00 push $0xac
jmp alltraps
80106672: e9 bb f4 ff ff jmp 80105b32 <alltraps>
80106677 <vector173>:
.globl vector173
vector173:
pushl $0
80106677: 6a 00 push $0x0
pushl $173
80106679: 68 ad 00 00 00 push $0xad
jmp alltraps
8010667e: e9 af f4 ff ff jmp 80105b32 <alltraps>
80106683 <vector174>:
.globl vector174
vector174:
pushl $0
80106683: 6a 00 push $0x0
pushl $174
80106685: 68 ae 00 00 00 push $0xae
jmp alltraps
8010668a: e9 a3 f4 ff ff jmp 80105b32 <alltraps>
8010668f <vector175>:
.globl vector175
vector175:
pushl $0
8010668f: 6a 00 push $0x0
pushl $175
80106691: 68 af 00 00 00 push $0xaf
jmp alltraps
80106696: e9 97 f4 ff ff jmp 80105b32 <alltraps>
8010669b <vector176>:
.globl vector176
vector176:
pushl $0
8010669b: 6a 00 push $0x0
pushl $176
8010669d: 68 b0 00 00 00 push $0xb0
jmp alltraps
801066a2: e9 8b f4 ff ff jmp 80105b32 <alltraps>
801066a7 <vector177>:
.globl vector177
vector177:
pushl $0
801066a7: 6a 00 push $0x0
pushl $177
801066a9: 68 b1 00 00 00 push $0xb1
jmp alltraps
801066ae: e9 7f f4 ff ff jmp 80105b32 <alltraps>
801066b3 <vector178>:
.globl vector178
vector178:
pushl $0
801066b3: 6a 00 push $0x0
pushl $178
801066b5: 68 b2 00 00 00 push $0xb2
jmp alltraps
801066ba: e9 73 f4 ff ff jmp 80105b32 <alltraps>
801066bf <vector179>:
.globl vector179
vector179:
pushl $0
801066bf: 6a 00 push $0x0
pushl $179
801066c1: 68 b3 00 00 00 push $0xb3
jmp alltraps
801066c6: e9 67 f4 ff ff jmp 80105b32 <alltraps>
801066cb <vector180>:
.globl vector180
vector180:
pushl $0
801066cb: 6a 00 push $0x0
pushl $180
801066cd: 68 b4 00 00 00 push $0xb4
jmp alltraps
801066d2: e9 5b f4 ff ff jmp 80105b32 <alltraps>
801066d7 <vector181>:
.globl vector181
vector181:
pushl $0
801066d7: 6a 00 push $0x0
pushl $181
801066d9: 68 b5 00 00 00 push $0xb5
jmp alltraps
801066de: e9 4f f4 ff ff jmp 80105b32 <alltraps>
801066e3 <vector182>:
.globl vector182
vector182:
pushl $0
801066e3: 6a 00 push $0x0
pushl $182
801066e5: 68 b6 00 00 00 push $0xb6
jmp alltraps
801066ea: e9 43 f4 ff ff jmp 80105b32 <alltraps>
801066ef <vector183>:
.globl vector183
vector183:
pushl $0
801066ef: 6a 00 push $0x0
pushl $183
801066f1: 68 b7 00 00 00 push $0xb7
jmp alltraps
801066f6: e9 37 f4 ff ff jmp 80105b32 <alltraps>
801066fb <vector184>:
.globl vector184
vector184:
pushl $0
801066fb: 6a 00 push $0x0
pushl $184
801066fd: 68 b8 00 00 00 push $0xb8
jmp alltraps
80106702: e9 2b f4 ff ff jmp 80105b32 <alltraps>
80106707 <vector185>:
.globl vector185
vector185:
pushl $0
80106707: 6a 00 push $0x0
pushl $185
80106709: 68 b9 00 00 00 push $0xb9
jmp alltraps
8010670e: e9 1f f4 ff ff jmp 80105b32 <alltraps>
80106713 <vector186>:
.globl vector186
vector186:
pushl $0
80106713: 6a 00 push $0x0
pushl $186
80106715: 68 ba 00 00 00 push $0xba
jmp alltraps
8010671a: e9 13 f4 ff ff jmp 80105b32 <alltraps>
8010671f <vector187>:
.globl vector187
vector187:
pushl $0
8010671f: 6a 00 push $0x0
pushl $187
80106721: 68 bb 00 00 00 push $0xbb
jmp alltraps
80106726: e9 07 f4 ff ff jmp 80105b32 <alltraps>
8010672b <vector188>:
.globl vector188
vector188:
pushl $0
8010672b: 6a 00 push $0x0
pushl $188
8010672d: 68 bc 00 00 00 push $0xbc
jmp alltraps
80106732: e9 fb f3 ff ff jmp 80105b32 <alltraps>
80106737 <vector189>:
.globl vector189
vector189:
pushl $0
80106737: 6a 00 push $0x0
pushl $189
80106739: 68 bd 00 00 00 push $0xbd
jmp alltraps
8010673e: e9 ef f3 ff ff jmp 80105b32 <alltraps>
80106743 <vector190>:
.globl vector190
vector190:
pushl $0
80106743: 6a 00 push $0x0
pushl $190
80106745: 68 be 00 00 00 push $0xbe
jmp alltraps
8010674a: e9 e3 f3 ff ff jmp 80105b32 <alltraps>
8010674f <vector191>:
.globl vector191
vector191:
pushl $0
8010674f: 6a 00 push $0x0
pushl $191
80106751: 68 bf 00 00 00 push $0xbf
jmp alltraps
80106756: e9 d7 f3 ff ff jmp 80105b32 <alltraps>
8010675b <vector192>:
.globl vector192
vector192:
pushl $0
8010675b: 6a 00 push $0x0
pushl $192
8010675d: 68 c0 00 00 00 push $0xc0
jmp alltraps
80106762: e9 cb f3 ff ff jmp 80105b32 <alltraps>
80106767 <vector193>:
.globl vector193
vector193:
pushl $0
80106767: 6a 00 push $0x0
pushl $193
80106769: 68 c1 00 00 00 push $0xc1
jmp alltraps
8010676e: e9 bf f3 ff ff jmp 80105b32 <alltraps>
80106773 <vector194>:
.globl vector194
vector194:
pushl $0
80106773: 6a 00 push $0x0
pushl $194
80106775: 68 c2 00 00 00 push $0xc2
jmp alltraps
8010677a: e9 b3 f3 ff ff jmp 80105b32 <alltraps>
8010677f <vector195>:
.globl vector195
vector195:
pushl $0
8010677f: 6a 00 push $0x0
pushl $195
80106781: 68 c3 00 00 00 push $0xc3
jmp alltraps
80106786: e9 a7 f3 ff ff jmp 80105b32 <alltraps>
8010678b <vector196>:
.globl vector196
vector196:
pushl $0
8010678b: 6a 00 push $0x0
pushl $196
8010678d: 68 c4 00 00 00 push $0xc4
jmp alltraps
80106792: e9 9b f3 ff ff jmp 80105b32 <alltraps>
80106797 <vector197>:
.globl vector197
vector197:
pushl $0
80106797: 6a 00 push $0x0
pushl $197
80106799: 68 c5 00 00 00 push $0xc5
jmp alltraps
8010679e: e9 8f f3 ff ff jmp 80105b32 <alltraps>
801067a3 <vector198>:
.globl vector198
vector198:
pushl $0
801067a3: 6a 00 push $0x0
pushl $198
801067a5: 68 c6 00 00 00 push $0xc6
jmp alltraps
801067aa: e9 83 f3 ff ff jmp 80105b32 <alltraps>
801067af <vector199>:
.globl vector199
vector199:
pushl $0
801067af: 6a 00 push $0x0
pushl $199
801067b1: 68 c7 00 00 00 push $0xc7
jmp alltraps
801067b6: e9 77 f3 ff ff jmp 80105b32 <alltraps>
801067bb <vector200>:
.globl vector200
vector200:
pushl $0
801067bb: 6a 00 push $0x0
pushl $200
801067bd: 68 c8 00 00 00 push $0xc8
jmp alltraps
801067c2: e9 6b f3 ff ff jmp 80105b32 <alltraps>
801067c7 <vector201>:
.globl vector201
vector201:
pushl $0
801067c7: 6a 00 push $0x0
pushl $201
801067c9: 68 c9 00 00 00 push $0xc9
jmp alltraps
801067ce: e9 5f f3 ff ff jmp 80105b32 <alltraps>
801067d3 <vector202>:
.globl vector202
vector202:
pushl $0
801067d3: 6a 00 push $0x0
pushl $202
801067d5: 68 ca 00 00 00 push $0xca
jmp alltraps
801067da: e9 53 f3 ff ff jmp 80105b32 <alltraps>
801067df <vector203>:
.globl vector203
vector203:
pushl $0
801067df: 6a 00 push $0x0
pushl $203
801067e1: 68 cb 00 00 00 push $0xcb
jmp alltraps
801067e6: e9 47 f3 ff ff jmp 80105b32 <alltraps>
801067eb <vector204>:
.globl vector204
vector204:
pushl $0
801067eb: 6a 00 push $0x0
pushl $204
801067ed: 68 cc 00 00 00 push $0xcc
jmp alltraps
801067f2: e9 3b f3 ff ff jmp 80105b32 <alltraps>
801067f7 <vector205>:
.globl vector205
vector205:
pushl $0
801067f7: 6a 00 push $0x0
pushl $205
801067f9: 68 cd 00 00 00 push $0xcd
jmp alltraps
801067fe: e9 2f f3 ff ff jmp 80105b32 <alltraps>
80106803 <vector206>:
.globl vector206
vector206:
pushl $0
80106803: 6a 00 push $0x0
pushl $206
80106805: 68 ce 00 00 00 push $0xce
jmp alltraps
8010680a: e9 23 f3 ff ff jmp 80105b32 <alltraps>
8010680f <vector207>:
.globl vector207
vector207:
pushl $0
8010680f: 6a 00 push $0x0
pushl $207
80106811: 68 cf 00 00 00 push $0xcf
jmp alltraps
80106816: e9 17 f3 ff ff jmp 80105b32 <alltraps>
8010681b <vector208>:
.globl vector208
vector208:
pushl $0
8010681b: 6a 00 push $0x0
pushl $208
8010681d: 68 d0 00 00 00 push $0xd0
jmp alltraps
80106822: e9 0b f3 ff ff jmp 80105b32 <alltraps>
80106827 <vector209>:
.globl vector209
vector209:
pushl $0
80106827: 6a 00 push $0x0
pushl $209
80106829: 68 d1 00 00 00 push $0xd1
jmp alltraps
8010682e: e9 ff f2 ff ff jmp 80105b32 <alltraps>
80106833 <vector210>:
.globl vector210
vector210:
pushl $0
80106833: 6a 00 push $0x0
pushl $210
80106835: 68 d2 00 00 00 push $0xd2
jmp alltraps
8010683a: e9 f3 f2 ff ff jmp 80105b32 <alltraps>
8010683f <vector211>:
.globl vector211
vector211:
pushl $0
8010683f: 6a 00 push $0x0
pushl $211
80106841: 68 d3 00 00 00 push $0xd3
jmp alltraps
80106846: e9 e7 f2 ff ff jmp 80105b32 <alltraps>
8010684b <vector212>:
.globl vector212
vector212:
pushl $0
8010684b: 6a 00 push $0x0
pushl $212
8010684d: 68 d4 00 00 00 push $0xd4
jmp alltraps
80106852: e9 db f2 ff ff jmp 80105b32 <alltraps>
80106857 <vector213>:
.globl vector213
vector213:
pushl $0
80106857: 6a 00 push $0x0
pushl $213
80106859: 68 d5 00 00 00 push $0xd5
jmp alltraps
8010685e: e9 cf f2 ff ff jmp 80105b32 <alltraps>
80106863 <vector214>:
.globl vector214
vector214:
pushl $0
80106863: 6a 00 push $0x0
pushl $214
80106865: 68 d6 00 00 00 push $0xd6
jmp alltraps
8010686a: e9 c3 f2 ff ff jmp 80105b32 <alltraps>
8010686f <vector215>:
.globl vector215
vector215:
pushl $0
8010686f: 6a 00 push $0x0
pushl $215
80106871: 68 d7 00 00 00 push $0xd7
jmp alltraps
80106876: e9 b7 f2 ff ff jmp 80105b32 <alltraps>
8010687b <vector216>:
.globl vector216
vector216:
pushl $0
8010687b: 6a 00 push $0x0
pushl $216
8010687d: 68 d8 00 00 00 push $0xd8
jmp alltraps
80106882: e9 ab f2 ff ff jmp 80105b32 <alltraps>
80106887 <vector217>:
.globl vector217
vector217:
pushl $0
80106887: 6a 00 push $0x0
pushl $217
80106889: 68 d9 00 00 00 push $0xd9
jmp alltraps
8010688e: e9 9f f2 ff ff jmp 80105b32 <alltraps>
80106893 <vector218>:
.globl vector218
vector218:
pushl $0
80106893: 6a 00 push $0x0
pushl $218
80106895: 68 da 00 00 00 push $0xda
jmp alltraps
8010689a: e9 93 f2 ff ff jmp 80105b32 <alltraps>
8010689f <vector219>:
.globl vector219
vector219:
pushl $0
8010689f: 6a 00 push $0x0
pushl $219
801068a1: 68 db 00 00 00 push $0xdb
jmp alltraps
801068a6: e9 87 f2 ff ff jmp 80105b32 <alltraps>
801068ab <vector220>:
.globl vector220
vector220:
pushl $0
801068ab: 6a 00 push $0x0
pushl $220
801068ad: 68 dc 00 00 00 push $0xdc
jmp alltraps
801068b2: e9 7b f2 ff ff jmp 80105b32 <alltraps>
801068b7 <vector221>:
.globl vector221
vector221:
pushl $0
801068b7: 6a 00 push $0x0
pushl $221
801068b9: 68 dd 00 00 00 push $0xdd
jmp alltraps
801068be: e9 6f f2 ff ff jmp 80105b32 <alltraps>
801068c3 <vector222>:
.globl vector222
vector222:
pushl $0
801068c3: 6a 00 push $0x0
pushl $222
801068c5: 68 de 00 00 00 push $0xde
jmp alltraps
801068ca: e9 63 f2 ff ff jmp 80105b32 <alltraps>
801068cf <vector223>:
.globl vector223
vector223:
pushl $0
801068cf: 6a 00 push $0x0
pushl $223
801068d1: 68 df 00 00 00 push $0xdf
jmp alltraps
801068d6: e9 57 f2 ff ff jmp 80105b32 <alltraps>
801068db <vector224>:
.globl vector224
vector224:
pushl $0
801068db: 6a 00 push $0x0
pushl $224
801068dd: 68 e0 00 00 00 push $0xe0
jmp alltraps
801068e2: e9 4b f2 ff ff jmp 80105b32 <alltraps>
801068e7 <vector225>:
.globl vector225
vector225:
pushl $0
801068e7: 6a 00 push $0x0
pushl $225
801068e9: 68 e1 00 00 00 push $0xe1
jmp alltraps
801068ee: e9 3f f2 ff ff jmp 80105b32 <alltraps>
801068f3 <vector226>:
.globl vector226
vector226:
pushl $0
801068f3: 6a 00 push $0x0
pushl $226
801068f5: 68 e2 00 00 00 push $0xe2
jmp alltraps
801068fa: e9 33 f2 ff ff jmp 80105b32 <alltraps>
801068ff <vector227>:
.globl vector227
vector227:
pushl $0
801068ff: 6a 00 push $0x0
pushl $227
80106901: 68 e3 00 00 00 push $0xe3
jmp alltraps
80106906: e9 27 f2 ff ff jmp 80105b32 <alltraps>
8010690b <vector228>:
.globl vector228
vector228:
pushl $0
8010690b: 6a 00 push $0x0
pushl $228
8010690d: 68 e4 00 00 00 push $0xe4
jmp alltraps
80106912: e9 1b f2 ff ff jmp 80105b32 <alltraps>
80106917 <vector229>:
.globl vector229
vector229:
pushl $0
80106917: 6a 00 push $0x0
pushl $229
80106919: 68 e5 00 00 00 push $0xe5
jmp alltraps
8010691e: e9 0f f2 ff ff jmp 80105b32 <alltraps>
80106923 <vector230>:
.globl vector230
vector230:
pushl $0
80106923: 6a 00 push $0x0
pushl $230
80106925: 68 e6 00 00 00 push $0xe6
jmp alltraps
8010692a: e9 03 f2 ff ff jmp 80105b32 <alltraps>
8010692f <vector231>:
.globl vector231
vector231:
pushl $0
8010692f: 6a 00 push $0x0
pushl $231
80106931: 68 e7 00 00 00 push $0xe7
jmp alltraps
80106936: e9 f7 f1 ff ff jmp 80105b32 <alltraps>
8010693b <vector232>:
.globl vector232
vector232:
pushl $0
8010693b: 6a 00 push $0x0
pushl $232
8010693d: 68 e8 00 00 00 push $0xe8
jmp alltraps
80106942: e9 eb f1 ff ff jmp 80105b32 <alltraps>
80106947 <vector233>:
.globl vector233
vector233:
pushl $0
80106947: 6a 00 push $0x0
pushl $233
80106949: 68 e9 00 00 00 push $0xe9
jmp alltraps
8010694e: e9 df f1 ff ff jmp 80105b32 <alltraps>
80106953 <vector234>:
.globl vector234
vector234:
pushl $0
80106953: 6a 00 push $0x0
pushl $234
80106955: 68 ea 00 00 00 push $0xea
jmp alltraps
8010695a: e9 d3 f1 ff ff jmp 80105b32 <alltraps>
8010695f <vector235>:
.globl vector235
vector235:
pushl $0
8010695f: 6a 00 push $0x0
pushl $235
80106961: 68 eb 00 00 00 push $0xeb
jmp alltraps
80106966: e9 c7 f1 ff ff jmp 80105b32 <alltraps>
8010696b <vector236>:
.globl vector236
vector236:
pushl $0
8010696b: 6a 00 push $0x0
pushl $236
8010696d: 68 ec 00 00 00 push $0xec
jmp alltraps
80106972: e9 bb f1 ff ff jmp 80105b32 <alltraps>
80106977 <vector237>:
.globl vector237
vector237:
pushl $0
80106977: 6a 00 push $0x0
pushl $237
80106979: 68 ed 00 00 00 push $0xed
jmp alltraps
8010697e: e9 af f1 ff ff jmp 80105b32 <alltraps>
80106983 <vector238>:
.globl vector238
vector238:
pushl $0
80106983: 6a 00 push $0x0
pushl $238
80106985: 68 ee 00 00 00 push $0xee
jmp alltraps
8010698a: e9 a3 f1 ff ff jmp 80105b32 <alltraps>
8010698f <vector239>:
.globl vector239
vector239:
pushl $0
8010698f: 6a 00 push $0x0
pushl $239
80106991: 68 ef 00 00 00 push $0xef
jmp alltraps
80106996: e9 97 f1 ff ff jmp 80105b32 <alltraps>
8010699b <vector240>:
.globl vector240
vector240:
pushl $0
8010699b: 6a 00 push $0x0
pushl $240
8010699d: 68 f0 00 00 00 push $0xf0
jmp alltraps
801069a2: e9 8b f1 ff ff jmp 80105b32 <alltraps>
801069a7 <vector241>:
.globl vector241
vector241:
pushl $0
801069a7: 6a 00 push $0x0
pushl $241
801069a9: 68 f1 00 00 00 push $0xf1
jmp alltraps
801069ae: e9 7f f1 ff ff jmp 80105b32 <alltraps>
801069b3 <vector242>:
.globl vector242
vector242:
pushl $0
801069b3: 6a 00 push $0x0
pushl $242
801069b5: 68 f2 00 00 00 push $0xf2
jmp alltraps
801069ba: e9 73 f1 ff ff jmp 80105b32 <alltraps>
801069bf <vector243>:
.globl vector243
vector243:
pushl $0
801069bf: 6a 00 push $0x0
pushl $243
801069c1: 68 f3 00 00 00 push $0xf3
jmp alltraps
801069c6: e9 67 f1 ff ff jmp 80105b32 <alltraps>
801069cb <vector244>:
.globl vector244
vector244:
pushl $0
801069cb: 6a 00 push $0x0
pushl $244
801069cd: 68 f4 00 00 00 push $0xf4
jmp alltraps
801069d2: e9 5b f1 ff ff jmp 80105b32 <alltraps>
801069d7 <vector245>:
.globl vector245
vector245:
pushl $0
801069d7: 6a 00 push $0x0
pushl $245
801069d9: 68 f5 00 00 00 push $0xf5
jmp alltraps
801069de: e9 4f f1 ff ff jmp 80105b32 <alltraps>
801069e3 <vector246>:
.globl vector246
vector246:
pushl $0
801069e3: 6a 00 push $0x0
pushl $246
801069e5: 68 f6 00 00 00 push $0xf6
jmp alltraps
801069ea: e9 43 f1 ff ff jmp 80105b32 <alltraps>
801069ef <vector247>:
.globl vector247
vector247:
pushl $0
801069ef: 6a 00 push $0x0
pushl $247
801069f1: 68 f7 00 00 00 push $0xf7
jmp alltraps
801069f6: e9 37 f1 ff ff jmp 80105b32 <alltraps>
801069fb <vector248>:
.globl vector248
vector248:
pushl $0
801069fb: 6a 00 push $0x0
pushl $248
801069fd: 68 f8 00 00 00 push $0xf8
jmp alltraps
80106a02: e9 2b f1 ff ff jmp 80105b32 <alltraps>
80106a07 <vector249>:
.globl vector249
vector249:
pushl $0
80106a07: 6a 00 push $0x0
pushl $249
80106a09: 68 f9 00 00 00 push $0xf9
jmp alltraps
80106a0e: e9 1f f1 ff ff jmp 80105b32 <alltraps>
80106a13 <vector250>:
.globl vector250
vector250:
pushl $0
80106a13: 6a 00 push $0x0
pushl $250
80106a15: 68 fa 00 00 00 push $0xfa
jmp alltraps
80106a1a: e9 13 f1 ff ff jmp 80105b32 <alltraps>
80106a1f <vector251>:
.globl vector251
vector251:
pushl $0
80106a1f: 6a 00 push $0x0
pushl $251
80106a21: 68 fb 00 00 00 push $0xfb
jmp alltraps
80106a26: e9 07 f1 ff ff jmp 80105b32 <alltraps>
80106a2b <vector252>:
.globl vector252
vector252:
pushl $0
80106a2b: 6a 00 push $0x0
pushl $252
80106a2d: 68 fc 00 00 00 push $0xfc
jmp alltraps
80106a32: e9 fb f0 ff ff jmp 80105b32 <alltraps>
80106a37 <vector253>:
.globl vector253
vector253:
pushl $0
80106a37: 6a 00 push $0x0
pushl $253
80106a39: 68 fd 00 00 00 push $0xfd
jmp alltraps
80106a3e: e9 ef f0 ff ff jmp 80105b32 <alltraps>
80106a43 <vector254>:
.globl vector254
vector254:
pushl $0
80106a43: 6a 00 push $0x0
pushl $254
80106a45: 68 fe 00 00 00 push $0xfe
jmp alltraps
80106a4a: e9 e3 f0 ff ff jmp 80105b32 <alltraps>
80106a4f <vector255>:
.globl vector255
vector255:
pushl $0
80106a4f: 6a 00 push $0x0
pushl $255
80106a51: 68 ff 00 00 00 push $0xff
jmp alltraps
80106a56: e9 d7 f0 ff ff jmp 80105b32 <alltraps>
80106a5b: 66 90 xchg %ax,%ax
80106a5d: 66 90 xchg %ax,%ax
80106a5f: 90 nop
80106a60 <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)
{
80106a60: 55 push %ebp
80106a61: 89 e5 mov %esp,%ebp
80106a63: 57 push %edi
80106a64: 56 push %esi
80106a65: 89 d6 mov %edx,%esi
pde_t *pde;
pte_t *pgtab;
pde = &pgdir[PDX(va)];
80106a67: c1 ea 16 shr $0x16,%edx
{
80106a6a: 53 push %ebx
pde = &pgdir[PDX(va)];
80106a6b: 8d 3c 90 lea (%eax,%edx,4),%edi
{
80106a6e: 83 ec 0c sub $0xc,%esp
if(*pde & PTE_P){
80106a71: 8b 1f mov (%edi),%ebx
80106a73: f6 c3 01 test $0x1,%bl
80106a76: 74 28 je 80106aa0 <walkpgdir+0x40>
pgtab = (pte_t*)P2V(PTE_ADDR(*pde));
80106a78: 81 e3 00 f0 ff ff and $0xfffff000,%ebx
80106a7e: 81 c3 00 00 00 80 add $0x80000000,%ebx
// 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;
}
return &pgtab[PTX(va)];
80106a84: 89 f0 mov %esi,%eax
}
80106a86: 8d 65 f4 lea -0xc(%ebp),%esp
return &pgtab[PTX(va)];
80106a89: c1 e8 0a shr $0xa,%eax
80106a8c: 25 fc 0f 00 00 and $0xffc,%eax
80106a91: 01 d8 add %ebx,%eax
}
80106a93: 5b pop %ebx
80106a94: 5e pop %esi
80106a95: 5f pop %edi
80106a96: 5d pop %ebp
80106a97: c3 ret
80106a98: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80106a9f: 90 nop
if(!alloc || (pgtab = (pte_t*)kalloc()) == 0)
80106aa0: 85 c9 test %ecx,%ecx
80106aa2: 74 2c je 80106ad0 <walkpgdir+0x70>
80106aa4: e8 87 bb ff ff call 80102630 <kalloc>
80106aa9: 89 c3 mov %eax,%ebx
80106aab: 85 c0 test %eax,%eax
80106aad: 74 21 je 80106ad0 <walkpgdir+0x70>
memset(pgtab, 0, PGSIZE);
80106aaf: 83 ec 04 sub $0x4,%esp
80106ab2: 68 00 10 00 00 push $0x1000
80106ab7: 6a 00 push $0x0
80106ab9: 50 push %eax
80106aba: e8 d1 dd ff ff call 80104890 <memset>
*pde = V2P(pgtab) | PTE_P | PTE_W | PTE_U;
80106abf: 8d 83 00 00 00 80 lea -0x80000000(%ebx),%eax
80106ac5: 83 c4 10 add $0x10,%esp
80106ac8: 83 c8 07 or $0x7,%eax
80106acb: 89 07 mov %eax,(%edi)
80106acd: eb b5 jmp 80106a84 <walkpgdir+0x24>
80106acf: 90 nop
}
80106ad0: 8d 65 f4 lea -0xc(%ebp),%esp
return 0;
80106ad3: 31 c0 xor %eax,%eax
}
80106ad5: 5b pop %ebx
80106ad6: 5e pop %esi
80106ad7: 5f pop %edi
80106ad8: 5d pop %ebp
80106ad9: c3 ret
80106ada: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80106ae0 <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)
{
80106ae0: 55 push %ebp
80106ae1: 89 e5 mov %esp,%ebp
80106ae3: 57 push %edi
80106ae4: 89 c7 mov %eax,%edi
char *a, *last;
pte_t *pte;
a = (char*)PGROUNDDOWN((uint)va);
last = (char*)PGROUNDDOWN(((uint)va) + size - 1);
80106ae6: 8d 44 0a ff lea -0x1(%edx,%ecx,1),%eax
{
80106aea: 56 push %esi
last = (char*)PGROUNDDOWN(((uint)va) + size - 1);
80106aeb: 25 00 f0 ff ff and $0xfffff000,%eax
a = (char*)PGROUNDDOWN((uint)va);
80106af0: 89 d6 mov %edx,%esi
{
80106af2: 53 push %ebx
a = (char*)PGROUNDDOWN((uint)va);
80106af3: 81 e6 00 f0 ff ff and $0xfffff000,%esi
{
80106af9: 83 ec 1c sub $0x1c,%esp
last = (char*)PGROUNDDOWN(((uint)va) + size - 1);
80106afc: 89 45 e0 mov %eax,-0x20(%ebp)
80106aff: 8b 45 08 mov 0x8(%ebp),%eax
80106b02: 29 f0 sub %esi,%eax
80106b04: 89 45 e4 mov %eax,-0x1c(%ebp)
80106b07: eb 1f jmp 80106b28 <mappages+0x48>
80106b09: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
for(;;){
if((pte = walkpgdir(pgdir, a, 1)) == 0)
return -1;
if(*pte & PTE_P)
80106b10: f6 00 01 testb $0x1,(%eax)
80106b13: 75 45 jne 80106b5a <mappages+0x7a>
panic("remap");
*pte = pa | perm | PTE_P;
80106b15: 0b 5d 0c or 0xc(%ebp),%ebx
80106b18: 83 cb 01 or $0x1,%ebx
80106b1b: 89 18 mov %ebx,(%eax)
if(a == last)
80106b1d: 3b 75 e0 cmp -0x20(%ebp),%esi
80106b20: 74 2e je 80106b50 <mappages+0x70>
break;
a += PGSIZE;
80106b22: 81 c6 00 10 00 00 add $0x1000,%esi
for(;;){
80106b28: 8b 45 e4 mov -0x1c(%ebp),%eax
if((pte = walkpgdir(pgdir, a, 1)) == 0)
80106b2b: b9 01 00 00 00 mov $0x1,%ecx
80106b30: 89 f2 mov %esi,%edx
80106b32: 8d 1c 06 lea (%esi,%eax,1),%ebx
80106b35: 89 f8 mov %edi,%eax
80106b37: e8 24 ff ff ff call 80106a60 <walkpgdir>
80106b3c: 85 c0 test %eax,%eax
80106b3e: 75 d0 jne 80106b10 <mappages+0x30>
pa += PGSIZE;
}
return 0;
}
80106b40: 8d 65 f4 lea -0xc(%ebp),%esp
return -1;
80106b43: b8 ff ff ff ff mov $0xffffffff,%eax
}
80106b48: 5b pop %ebx
80106b49: 5e pop %esi
80106b4a: 5f pop %edi
80106b4b: 5d pop %ebp
80106b4c: c3 ret
80106b4d: 8d 76 00 lea 0x0(%esi),%esi
80106b50: 8d 65 f4 lea -0xc(%ebp),%esp
return 0;
80106b53: 31 c0 xor %eax,%eax
}
80106b55: 5b pop %ebx
80106b56: 5e pop %esi
80106b57: 5f pop %edi
80106b58: 5d pop %ebp
80106b59: c3 ret
panic("remap");
80106b5a: 83 ec 0c sub $0xc,%esp
80106b5d: 68 30 7e 10 80 push $0x80107e30
80106b62: e8 29 98 ff ff call 80100390 <panic>
80106b67: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80106b6e: 66 90 xchg %ax,%ax
80106b70 <deallocuvm.part.0>:
// Deallocate user pages to bring the process size from oldsz to
// 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)
80106b70: 55 push %ebp
80106b71: 89 e5 mov %esp,%ebp
80106b73: 57 push %edi
80106b74: 56 push %esi
80106b75: 89 c6 mov %eax,%esi
80106b77: 53 push %ebx
80106b78: 89 d3 mov %edx,%ebx
uint a, pa;
if(newsz >= oldsz)
return oldsz;
a = PGROUNDUP(newsz);
80106b7a: 8d 91 ff 0f 00 00 lea 0xfff(%ecx),%edx
80106b80: 81 e2 00 f0 ff ff and $0xfffff000,%edx
deallocuvm(pde_t *pgdir, uint oldsz, uint newsz)
80106b86: 83 ec 1c sub $0x1c,%esp
80106b89: 89 4d e0 mov %ecx,-0x20(%ebp)
for(; a < oldsz; a += PGSIZE){
80106b8c: 39 da cmp %ebx,%edx
80106b8e: 73 5b jae 80106beb <deallocuvm.part.0+0x7b>
80106b90: 89 5d e4 mov %ebx,-0x1c(%ebp)
80106b93: 89 d7 mov %edx,%edi
80106b95: eb 14 jmp 80106bab <deallocuvm.part.0+0x3b>
80106b97: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80106b9e: 66 90 xchg %ax,%ax
80106ba0: 81 c7 00 10 00 00 add $0x1000,%edi
80106ba6: 39 7d e4 cmp %edi,-0x1c(%ebp)
80106ba9: 76 40 jbe 80106beb <deallocuvm.part.0+0x7b>
pte = walkpgdir(pgdir, (char*)a, 0);
80106bab: 31 c9 xor %ecx,%ecx
80106bad: 89 fa mov %edi,%edx
80106baf: 89 f0 mov %esi,%eax
80106bb1: e8 aa fe ff ff call 80106a60 <walkpgdir>
80106bb6: 89 c3 mov %eax,%ebx
if(!pte)
80106bb8: 85 c0 test %eax,%eax
80106bba: 74 44 je 80106c00 <deallocuvm.part.0+0x90>
a = PGADDR(PDX(a) + 1, 0, 0) - PGSIZE;
else if((*pte & PTE_P) != 0){
80106bbc: 8b 00 mov (%eax),%eax
80106bbe: a8 01 test $0x1,%al
80106bc0: 74 de je 80106ba0 <deallocuvm.part.0+0x30>
pa = PTE_ADDR(*pte);
if(pa == 0)
80106bc2: 25 00 f0 ff ff and $0xfffff000,%eax
80106bc7: 74 47 je 80106c10 <deallocuvm.part.0+0xa0>
panic("kfree");
char *v = P2V(pa);
kfree(v);
80106bc9: 83 ec 0c sub $0xc,%esp
char *v = P2V(pa);
80106bcc: 05 00 00 00 80 add $0x80000000,%eax
80106bd1: 81 c7 00 10 00 00 add $0x1000,%edi
kfree(v);
80106bd7: 50 push %eax
80106bd8: e8 93 b8 ff ff call 80102470 <kfree>
*pte = 0;
80106bdd: c7 03 00 00 00 00 movl $0x0,(%ebx)
80106be3: 83 c4 10 add $0x10,%esp
for(; a < oldsz; a += PGSIZE){
80106be6: 39 7d e4 cmp %edi,-0x1c(%ebp)
80106be9: 77 c0 ja 80106bab <deallocuvm.part.0+0x3b>
}
}
return newsz;
}
80106beb: 8b 45 e0 mov -0x20(%ebp),%eax
80106bee: 8d 65 f4 lea -0xc(%ebp),%esp
80106bf1: 5b pop %ebx
80106bf2: 5e pop %esi
80106bf3: 5f pop %edi
80106bf4: 5d pop %ebp
80106bf5: c3 ret
80106bf6: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80106bfd: 8d 76 00 lea 0x0(%esi),%esi
a = PGADDR(PDX(a) + 1, 0, 0) - PGSIZE;
80106c00: 89 fa mov %edi,%edx
80106c02: 81 e2 00 00 c0 ff and $0xffc00000,%edx
80106c08: 8d ba 00 00 40 00 lea 0x400000(%edx),%edi
80106c0e: eb 96 jmp 80106ba6 <deallocuvm.part.0+0x36>
panic("kfree");
80106c10: 83 ec 0c sub $0xc,%esp
80106c13: 68 e6 77 10 80 push $0x801077e6
80106c18: e8 73 97 ff ff call 80100390 <panic>
80106c1d: 8d 76 00 lea 0x0(%esi),%esi
80106c20 <seginit>:
{
80106c20: f3 0f 1e fb endbr32
80106c24: 55 push %ebp
80106c25: 89 e5 mov %esp,%ebp
80106c27: 83 ec 18 sub $0x18,%esp
c = &cpus[cpuid()];
80106c2a: e8 11 cd ff ff call 80103940 <cpuid>
pd[0] = size-1;
80106c2f: ba 2f 00 00 00 mov $0x2f,%edx
80106c34: 69 c0 b0 00 00 00 imul $0xb0,%eax,%eax
80106c3a: 66 89 55 f2 mov %dx,-0xe(%ebp)
c->gdt[SEG_KCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, 0);
80106c3e: c7 80 b8 31 11 80 ff movl $0xffff,-0x7feece48(%eax)
80106c45: ff 00 00
80106c48: c7 80 bc 31 11 80 00 movl $0xcf9a00,-0x7feece44(%eax)
80106c4f: 9a cf 00
c->gdt[SEG_KDATA] = SEG(STA_W, 0, 0xffffffff, 0);
80106c52: c7 80 c0 31 11 80 ff movl $0xffff,-0x7feece40(%eax)
80106c59: ff 00 00
80106c5c: c7 80 c4 31 11 80 00 movl $0xcf9200,-0x7feece3c(%eax)
80106c63: 92 cf 00
c->gdt[SEG_UCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, DPL_USER);
80106c66: c7 80 c8 31 11 80 ff movl $0xffff,-0x7feece38(%eax)
80106c6d: ff 00 00
80106c70: c7 80 cc 31 11 80 00 movl $0xcffa00,-0x7feece34(%eax)
80106c77: fa cf 00
c->gdt[SEG_UDATA] = SEG(STA_W, 0, 0xffffffff, DPL_USER);
80106c7a: c7 80 d0 31 11 80 ff movl $0xffff,-0x7feece30(%eax)
80106c81: ff 00 00
80106c84: c7 80 d4 31 11 80 00 movl $0xcff200,-0x7feece2c(%eax)
80106c8b: f2 cf 00
lgdt(c->gdt, sizeof(c->gdt));
80106c8e: 05 b0 31 11 80 add $0x801131b0,%eax
pd[1] = (uint)p;
80106c93: 66 89 45 f4 mov %ax,-0xc(%ebp)
pd[2] = (uint)p >> 16;
80106c97: c1 e8 10 shr $0x10,%eax
80106c9a: 66 89 45 f6 mov %ax,-0xa(%ebp)
asm volatile("lgdt (%0)" : : "r" (pd));
80106c9e: 8d 45 f2 lea -0xe(%ebp),%eax
80106ca1: 0f 01 10 lgdtl (%eax)
}
80106ca4: c9 leave
80106ca5: c3 ret
80106ca6: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80106cad: 8d 76 00 lea 0x0(%esi),%esi
80106cb0 <switchkvm>:
{
80106cb0: f3 0f 1e fb endbr32
lcr3(V2P(kpgdir)); // switch to the kernel page table
80106cb4: a1 64 5f 11 80 mov 0x80115f64,%eax
80106cb9: 05 00 00 00 80 add $0x80000000,%eax
}
static inline void
lcr3(uint val)
{
asm volatile("movl %0,%%cr3" : : "r" (val));
80106cbe: 0f 22 d8 mov %eax,%cr3
}
80106cc1: c3 ret
80106cc2: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80106cc9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80106cd0 <switchuvm>:
{
80106cd0: f3 0f 1e fb endbr32
80106cd4: 55 push %ebp
80106cd5: 89 e5 mov %esp,%ebp
80106cd7: 57 push %edi
80106cd8: 56 push %esi
80106cd9: 53 push %ebx
80106cda: 83 ec 1c sub $0x1c,%esp
80106cdd: 8b 75 08 mov 0x8(%ebp),%esi
if(p == 0)
80106ce0: 85 f6 test %esi,%esi
80106ce2: 0f 84 cb 00 00 00 je 80106db3 <switchuvm+0xe3>
if(p->kstack == 0)
80106ce8: 8b 46 08 mov 0x8(%esi),%eax
80106ceb: 85 c0 test %eax,%eax
80106ced: 0f 84 da 00 00 00 je 80106dcd <switchuvm+0xfd>
if(p->pgdir == 0)
80106cf3: 8b 46 04 mov 0x4(%esi),%eax
80106cf6: 85 c0 test %eax,%eax
80106cf8: 0f 84 c2 00 00 00 je 80106dc0 <switchuvm+0xf0>
pushcli();
80106cfe: e8 7d d9 ff ff call 80104680 <pushcli>
mycpu()->gdt[SEG_TSS] = SEG16(STS_T32A, &mycpu()->ts,
80106d03: e8 c8 cb ff ff call 801038d0 <mycpu>
80106d08: 89 c3 mov %eax,%ebx
80106d0a: e8 c1 cb ff ff call 801038d0 <mycpu>
80106d0f: 89 c7 mov %eax,%edi
80106d11: e8 ba cb ff ff call 801038d0 <mycpu>
80106d16: 83 c7 08 add $0x8,%edi
80106d19: 89 45 e4 mov %eax,-0x1c(%ebp)
80106d1c: e8 af cb ff ff call 801038d0 <mycpu>
80106d21: 8b 4d e4 mov -0x1c(%ebp),%ecx
80106d24: ba 67 00 00 00 mov $0x67,%edx
80106d29: 66 89 bb 9a 00 00 00 mov %di,0x9a(%ebx)
80106d30: 83 c0 08 add $0x8,%eax
80106d33: 66 89 93 98 00 00 00 mov %dx,0x98(%ebx)
mycpu()->ts.iomb = (ushort) 0xFFFF;
80106d3a: bf ff ff ff ff mov $0xffffffff,%edi
mycpu()->gdt[SEG_TSS] = SEG16(STS_T32A, &mycpu()->ts,
80106d3f: 83 c1 08 add $0x8,%ecx
80106d42: c1 e8 18 shr $0x18,%eax
80106d45: c1 e9 10 shr $0x10,%ecx
80106d48: 88 83 9f 00 00 00 mov %al,0x9f(%ebx)
80106d4e: 88 8b 9c 00 00 00 mov %cl,0x9c(%ebx)
80106d54: b9 99 40 00 00 mov $0x4099,%ecx
80106d59: 66 89 8b 9d 00 00 00 mov %cx,0x9d(%ebx)
mycpu()->ts.ss0 = SEG_KDATA << 3;
80106d60: bb 10 00 00 00 mov $0x10,%ebx
mycpu()->gdt[SEG_TSS].s = 0;
80106d65: e8 66 cb ff ff call 801038d0 <mycpu>
80106d6a: 80 a0 9d 00 00 00 ef andb $0xef,0x9d(%eax)
mycpu()->ts.ss0 = SEG_KDATA << 3;
80106d71: e8 5a cb ff ff call 801038d0 <mycpu>
80106d76: 66 89 58 10 mov %bx,0x10(%eax)
mycpu()->ts.esp0 = (uint)p->kstack + KSTACKSIZE;
80106d7a: 8b 5e 08 mov 0x8(%esi),%ebx
80106d7d: 81 c3 00 10 00 00 add $0x1000,%ebx
80106d83: e8 48 cb ff ff call 801038d0 <mycpu>
80106d88: 89 58 0c mov %ebx,0xc(%eax)
mycpu()->ts.iomb = (ushort) 0xFFFF;
80106d8b: e8 40 cb ff ff call 801038d0 <mycpu>
80106d90: 66 89 78 6e mov %di,0x6e(%eax)
asm volatile("ltr %0" : : "r" (sel));
80106d94: b8 28 00 00 00 mov $0x28,%eax
80106d99: 0f 00 d8 ltr %ax
lcr3(V2P(p->pgdir)); // switch to process's address space
80106d9c: 8b 46 04 mov 0x4(%esi),%eax
80106d9f: 05 00 00 00 80 add $0x80000000,%eax
asm volatile("movl %0,%%cr3" : : "r" (val));
80106da4: 0f 22 d8 mov %eax,%cr3
}
80106da7: 8d 65 f4 lea -0xc(%ebp),%esp
80106daa: 5b pop %ebx
80106dab: 5e pop %esi
80106dac: 5f pop %edi
80106dad: 5d pop %ebp
popcli();
80106dae: e9 1d d9 ff ff jmp 801046d0 <popcli>
panic("switchuvm: no process");
80106db3: 83 ec 0c sub $0xc,%esp
80106db6: 68 36 7e 10 80 push $0x80107e36
80106dbb: e8 d0 95 ff ff call 80100390 <panic>
panic("switchuvm: no pgdir");
80106dc0: 83 ec 0c sub $0xc,%esp
80106dc3: 68 61 7e 10 80 push $0x80107e61
80106dc8: e8 c3 95 ff ff call 80100390 <panic>
panic("switchuvm: no kstack");
80106dcd: 83 ec 0c sub $0xc,%esp
80106dd0: 68 4c 7e 10 80 push $0x80107e4c
80106dd5: e8 b6 95 ff ff call 80100390 <panic>
80106dda: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80106de0 <inituvm>:
{
80106de0: f3 0f 1e fb endbr32
80106de4: 55 push %ebp
80106de5: 89 e5 mov %esp,%ebp
80106de7: 57 push %edi
80106de8: 56 push %esi
80106de9: 53 push %ebx
80106dea: 83 ec 1c sub $0x1c,%esp
80106ded: 8b 45 0c mov 0xc(%ebp),%eax
80106df0: 8b 75 10 mov 0x10(%ebp),%esi
80106df3: 8b 7d 08 mov 0x8(%ebp),%edi
80106df6: 89 45 e4 mov %eax,-0x1c(%ebp)
if(sz >= PGSIZE)
80106df9: 81 fe ff 0f 00 00 cmp $0xfff,%esi
80106dff: 77 4b ja 80106e4c <inituvm+0x6c>
mem = kalloc();
80106e01: e8 2a b8 ff ff call 80102630 <kalloc>
memset(mem, 0, PGSIZE);
80106e06: 83 ec 04 sub $0x4,%esp
80106e09: 68 00 10 00 00 push $0x1000
mem = kalloc();
80106e0e: 89 c3 mov %eax,%ebx
memset(mem, 0, PGSIZE);
80106e10: 6a 00 push $0x0
80106e12: 50 push %eax
80106e13: e8 78 da ff ff call 80104890 <memset>
mappages(pgdir, 0, PGSIZE, V2P(mem), PTE_W|PTE_U);
80106e18: 58 pop %eax
80106e19: 8d 83 00 00 00 80 lea -0x80000000(%ebx),%eax
80106e1f: 5a pop %edx
80106e20: 6a 06 push $0x6
80106e22: b9 00 10 00 00 mov $0x1000,%ecx
80106e27: 31 d2 xor %edx,%edx
80106e29: 50 push %eax
80106e2a: 89 f8 mov %edi,%eax
80106e2c: e8 af fc ff ff call 80106ae0 <mappages>
memmove(mem, init, sz);
80106e31: 8b 45 e4 mov -0x1c(%ebp),%eax
80106e34: 89 75 10 mov %esi,0x10(%ebp)
80106e37: 83 c4 10 add $0x10,%esp
80106e3a: 89 5d 08 mov %ebx,0x8(%ebp)
80106e3d: 89 45 0c mov %eax,0xc(%ebp)
}
80106e40: 8d 65 f4 lea -0xc(%ebp),%esp
80106e43: 5b pop %ebx
80106e44: 5e pop %esi
80106e45: 5f pop %edi
80106e46: 5d pop %ebp
memmove(mem, init, sz);
80106e47: e9 e4 da ff ff jmp 80104930 <memmove>
panic("inituvm: more than a page");
80106e4c: 83 ec 0c sub $0xc,%esp
80106e4f: 68 75 7e 10 80 push $0x80107e75
80106e54: e8 37 95 ff ff call 80100390 <panic>
80106e59: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80106e60 <loaduvm>:
{
80106e60: f3 0f 1e fb endbr32
80106e64: 55 push %ebp
80106e65: 89 e5 mov %esp,%ebp
80106e67: 57 push %edi
80106e68: 56 push %esi
80106e69: 53 push %ebx
80106e6a: 83 ec 1c sub $0x1c,%esp
80106e6d: 8b 45 0c mov 0xc(%ebp),%eax
80106e70: 8b 75 18 mov 0x18(%ebp),%esi
if((uint) addr % PGSIZE != 0)
80106e73: a9 ff 0f 00 00 test $0xfff,%eax
80106e78: 0f 85 99 00 00 00 jne 80106f17 <loaduvm+0xb7>
for(i = 0; i < sz; i += PGSIZE){
80106e7e: 01 f0 add %esi,%eax
80106e80: 89 f3 mov %esi,%ebx
80106e82: 89 45 e4 mov %eax,-0x1c(%ebp)
if(readi(ip, P2V(pa), offset+i, n) != n)
80106e85: 8b 45 14 mov 0x14(%ebp),%eax
80106e88: 01 f0 add %esi,%eax
80106e8a: 89 45 e0 mov %eax,-0x20(%ebp)
for(i = 0; i < sz; i += PGSIZE){
80106e8d: 85 f6 test %esi,%esi
80106e8f: 75 15 jne 80106ea6 <loaduvm+0x46>
80106e91: eb 6d jmp 80106f00 <loaduvm+0xa0>
80106e93: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80106e97: 90 nop
80106e98: 81 eb 00 10 00 00 sub $0x1000,%ebx
80106e9e: 89 f0 mov %esi,%eax
80106ea0: 29 d8 sub %ebx,%eax
80106ea2: 39 c6 cmp %eax,%esi
80106ea4: 76 5a jbe 80106f00 <loaduvm+0xa0>
if((pte = walkpgdir(pgdir, addr+i, 0)) == 0)
80106ea6: 8b 55 e4 mov -0x1c(%ebp),%edx
80106ea9: 8b 45 08 mov 0x8(%ebp),%eax
80106eac: 31 c9 xor %ecx,%ecx
80106eae: 29 da sub %ebx,%edx
80106eb0: e8 ab fb ff ff call 80106a60 <walkpgdir>
80106eb5: 85 c0 test %eax,%eax
80106eb7: 74 51 je 80106f0a <loaduvm+0xaa>
pa = PTE_ADDR(*pte);
80106eb9: 8b 00 mov (%eax),%eax
if(readi(ip, P2V(pa), offset+i, n) != n)
80106ebb: 8b 4d e0 mov -0x20(%ebp),%ecx
if(sz - i < PGSIZE)
80106ebe: bf 00 10 00 00 mov $0x1000,%edi
pa = PTE_ADDR(*pte);
80106ec3: 25 00 f0 ff ff and $0xfffff000,%eax
if(sz - i < PGSIZE)
80106ec8: 81 fb ff 0f 00 00 cmp $0xfff,%ebx
80106ece: 0f 46 fb cmovbe %ebx,%edi
if(readi(ip, P2V(pa), offset+i, n) != n)
80106ed1: 29 d9 sub %ebx,%ecx
80106ed3: 05 00 00 00 80 add $0x80000000,%eax
80106ed8: 57 push %edi
80106ed9: 51 push %ecx
80106eda: 50 push %eax
80106edb: ff 75 10 pushl 0x10(%ebp)
80106ede: e8 7d ab ff ff call 80101a60 <readi>
80106ee3: 83 c4 10 add $0x10,%esp
80106ee6: 39 f8 cmp %edi,%eax
80106ee8: 74 ae je 80106e98 <loaduvm+0x38>
}
80106eea: 8d 65 f4 lea -0xc(%ebp),%esp
return -1;
80106eed: b8 ff ff ff ff mov $0xffffffff,%eax
}
80106ef2: 5b pop %ebx
80106ef3: 5e pop %esi
80106ef4: 5f pop %edi
80106ef5: 5d pop %ebp
80106ef6: c3 ret
80106ef7: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80106efe: 66 90 xchg %ax,%ax
80106f00: 8d 65 f4 lea -0xc(%ebp),%esp
return 0;
80106f03: 31 c0 xor %eax,%eax
}
80106f05: 5b pop %ebx
80106f06: 5e pop %esi
80106f07: 5f pop %edi
80106f08: 5d pop %ebp
80106f09: c3 ret
panic("loaduvm: address should exist");
80106f0a: 83 ec 0c sub $0xc,%esp
80106f0d: 68 8f 7e 10 80 push $0x80107e8f
80106f12: e8 79 94 ff ff call 80100390 <panic>
panic("loaduvm: addr must be page aligned");
80106f17: 83 ec 0c sub $0xc,%esp
80106f1a: 68 30 7f 10 80 push $0x80107f30
80106f1f: e8 6c 94 ff ff call 80100390 <panic>
80106f24: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80106f2b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80106f2f: 90 nop
80106f30 <allocuvm>:
{
80106f30: f3 0f 1e fb endbr32
80106f34: 55 push %ebp
80106f35: 89 e5 mov %esp,%ebp
80106f37: 57 push %edi
80106f38: 56 push %esi
80106f39: 53 push %ebx
80106f3a: 83 ec 1c sub $0x1c,%esp
if(newsz >= KERNBASE)
80106f3d: 8b 45 10 mov 0x10(%ebp),%eax
{
80106f40: 8b 7d 08 mov 0x8(%ebp),%edi
if(newsz >= KERNBASE)
80106f43: 89 45 e4 mov %eax,-0x1c(%ebp)
80106f46: 85 c0 test %eax,%eax
80106f48: 0f 88 b2 00 00 00 js 80107000 <allocuvm+0xd0>
if(newsz < oldsz)
80106f4e: 3b 45 0c cmp 0xc(%ebp),%eax
return oldsz;
80106f51: 8b 45 0c mov 0xc(%ebp),%eax
if(newsz < oldsz)
80106f54: 0f 82 96 00 00 00 jb 80106ff0 <allocuvm+0xc0>
a = PGROUNDUP(oldsz);
80106f5a: 8d b0 ff 0f 00 00 lea 0xfff(%eax),%esi
80106f60: 81 e6 00 f0 ff ff and $0xfffff000,%esi
for(; a < newsz; a += PGSIZE){
80106f66: 39 75 10 cmp %esi,0x10(%ebp)
80106f69: 77 40 ja 80106fab <allocuvm+0x7b>
80106f6b: e9 83 00 00 00 jmp 80106ff3 <allocuvm+0xc3>
memset(mem, 0, PGSIZE);
80106f70: 83 ec 04 sub $0x4,%esp
80106f73: 68 00 10 00 00 push $0x1000
80106f78: 6a 00 push $0x0
80106f7a: 50 push %eax
80106f7b: e8 10 d9 ff ff call 80104890 <memset>
if(mappages(pgdir, (char*)a, PGSIZE, V2P(mem), PTE_W|PTE_U) < 0){
80106f80: 58 pop %eax
80106f81: 8d 83 00 00 00 80 lea -0x80000000(%ebx),%eax
80106f87: 5a pop %edx
80106f88: 6a 06 push $0x6
80106f8a: b9 00 10 00 00 mov $0x1000,%ecx
80106f8f: 89 f2 mov %esi,%edx
80106f91: 50 push %eax
80106f92: 89 f8 mov %edi,%eax
80106f94: e8 47 fb ff ff call 80106ae0 <mappages>
80106f99: 83 c4 10 add $0x10,%esp
80106f9c: 85 c0 test %eax,%eax
80106f9e: 78 78 js 80107018 <allocuvm+0xe8>
for(; a < newsz; a += PGSIZE){
80106fa0: 81 c6 00 10 00 00 add $0x1000,%esi
80106fa6: 39 75 10 cmp %esi,0x10(%ebp)
80106fa9: 76 48 jbe 80106ff3 <allocuvm+0xc3>
mem = kalloc();
80106fab: e8 80 b6 ff ff call 80102630 <kalloc>
80106fb0: 89 c3 mov %eax,%ebx
if(mem == 0){
80106fb2: 85 c0 test %eax,%eax
80106fb4: 75 ba jne 80106f70 <allocuvm+0x40>
cprintf("allocuvm out of memory\n");
80106fb6: 83 ec 0c sub $0xc,%esp
80106fb9: 68 ad 7e 10 80 push $0x80107ead
80106fbe: e8 ed 96 ff ff call 801006b0 <cprintf>
if(newsz >= oldsz)
80106fc3: 8b 45 0c mov 0xc(%ebp),%eax
80106fc6: 83 c4 10 add $0x10,%esp
80106fc9: 39 45 10 cmp %eax,0x10(%ebp)
80106fcc: 74 32 je 80107000 <allocuvm+0xd0>
80106fce: 8b 55 10 mov 0x10(%ebp),%edx
80106fd1: 89 c1 mov %eax,%ecx
80106fd3: 89 f8 mov %edi,%eax
80106fd5: e8 96 fb ff ff call 80106b70 <deallocuvm.part.0>
return 0;
80106fda: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
}
80106fe1: 8b 45 e4 mov -0x1c(%ebp),%eax
80106fe4: 8d 65 f4 lea -0xc(%ebp),%esp
80106fe7: 5b pop %ebx
80106fe8: 5e pop %esi
80106fe9: 5f pop %edi
80106fea: 5d pop %ebp
80106feb: c3 ret
80106fec: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
return oldsz;
80106ff0: 89 45 e4 mov %eax,-0x1c(%ebp)
}
80106ff3: 8b 45 e4 mov -0x1c(%ebp),%eax
80106ff6: 8d 65 f4 lea -0xc(%ebp),%esp
80106ff9: 5b pop %ebx
80106ffa: 5e pop %esi
80106ffb: 5f pop %edi
80106ffc: 5d pop %ebp
80106ffd: c3 ret
80106ffe: 66 90 xchg %ax,%ax
return 0;
80107000: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
}
80107007: 8b 45 e4 mov -0x1c(%ebp),%eax
8010700a: 8d 65 f4 lea -0xc(%ebp),%esp
8010700d: 5b pop %ebx
8010700e: 5e pop %esi
8010700f: 5f pop %edi
80107010: 5d pop %ebp
80107011: c3 ret
80107012: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
cprintf("allocuvm out of memory (2)\n");
80107018: 83 ec 0c sub $0xc,%esp
8010701b: 68 c5 7e 10 80 push $0x80107ec5
80107020: e8 8b 96 ff ff call 801006b0 <cprintf>
if(newsz >= oldsz)
80107025: 8b 45 0c mov 0xc(%ebp),%eax
80107028: 83 c4 10 add $0x10,%esp
8010702b: 39 45 10 cmp %eax,0x10(%ebp)
8010702e: 74 0c je 8010703c <allocuvm+0x10c>
80107030: 8b 55 10 mov 0x10(%ebp),%edx
80107033: 89 c1 mov %eax,%ecx
80107035: 89 f8 mov %edi,%eax
80107037: e8 34 fb ff ff call 80106b70 <deallocuvm.part.0>
kfree(mem);
8010703c: 83 ec 0c sub $0xc,%esp
8010703f: 53 push %ebx
80107040: e8 2b b4 ff ff call 80102470 <kfree>
return 0;
80107045: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
8010704c: 83 c4 10 add $0x10,%esp
}
8010704f: 8b 45 e4 mov -0x1c(%ebp),%eax
80107052: 8d 65 f4 lea -0xc(%ebp),%esp
80107055: 5b pop %ebx
80107056: 5e pop %esi
80107057: 5f pop %edi
80107058: 5d pop %ebp
80107059: c3 ret
8010705a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80107060 <deallocuvm>:
{
80107060: f3 0f 1e fb endbr32
80107064: 55 push %ebp
80107065: 89 e5 mov %esp,%ebp
80107067: 8b 55 0c mov 0xc(%ebp),%edx
8010706a: 8b 4d 10 mov 0x10(%ebp),%ecx
8010706d: 8b 45 08 mov 0x8(%ebp),%eax
if(newsz >= oldsz)
80107070: 39 d1 cmp %edx,%ecx
80107072: 73 0c jae 80107080 <deallocuvm+0x20>
}
80107074: 5d pop %ebp
80107075: e9 f6 fa ff ff jmp 80106b70 <deallocuvm.part.0>
8010707a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80107080: 89 d0 mov %edx,%eax
80107082: 5d pop %ebp
80107083: c3 ret
80107084: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010708b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
8010708f: 90 nop
80107090 <freevm>:
// Free a page table and all the physical memory pages
// in the user part.
void
freevm(pde_t *pgdir)
{
80107090: f3 0f 1e fb endbr32
80107094: 55 push %ebp
80107095: 89 e5 mov %esp,%ebp
80107097: 57 push %edi
80107098: 56 push %esi
80107099: 53 push %ebx
8010709a: 83 ec 0c sub $0xc,%esp
8010709d: 8b 75 08 mov 0x8(%ebp),%esi
uint i;
if(pgdir == 0)
801070a0: 85 f6 test %esi,%esi
801070a2: 74 55 je 801070f9 <freevm+0x69>
if(newsz >= oldsz)
801070a4: 31 c9 xor %ecx,%ecx
801070a6: ba 00 00 00 80 mov $0x80000000,%edx
801070ab: 89 f0 mov %esi,%eax
801070ad: 89 f3 mov %esi,%ebx
801070af: e8 bc fa ff ff call 80106b70 <deallocuvm.part.0>
panic("freevm: no pgdir");
deallocuvm(pgdir, KERNBASE, 0);
for(i = 0; i < NPDENTRIES; i++){
801070b4: 8d be 00 10 00 00 lea 0x1000(%esi),%edi
801070ba: eb 0b jmp 801070c7 <freevm+0x37>
801070bc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801070c0: 83 c3 04 add $0x4,%ebx
801070c3: 39 df cmp %ebx,%edi
801070c5: 74 23 je 801070ea <freevm+0x5a>
if(pgdir[i] & PTE_P){
801070c7: 8b 03 mov (%ebx),%eax
801070c9: a8 01 test $0x1,%al
801070cb: 74 f3 je 801070c0 <freevm+0x30>
char * v = P2V(PTE_ADDR(pgdir[i]));
801070cd: 25 00 f0 ff ff and $0xfffff000,%eax
kfree(v);
801070d2: 83 ec 0c sub $0xc,%esp
801070d5: 83 c3 04 add $0x4,%ebx
char * v = P2V(PTE_ADDR(pgdir[i]));
801070d8: 05 00 00 00 80 add $0x80000000,%eax
kfree(v);
801070dd: 50 push %eax
801070de: e8 8d b3 ff ff call 80102470 <kfree>
801070e3: 83 c4 10 add $0x10,%esp
for(i = 0; i < NPDENTRIES; i++){
801070e6: 39 df cmp %ebx,%edi
801070e8: 75 dd jne 801070c7 <freevm+0x37>
}
}
kfree((char*)pgdir);
801070ea: 89 75 08 mov %esi,0x8(%ebp)
}
801070ed: 8d 65 f4 lea -0xc(%ebp),%esp
801070f0: 5b pop %ebx
801070f1: 5e pop %esi
801070f2: 5f pop %edi
801070f3: 5d pop %ebp
kfree((char*)pgdir);
801070f4: e9 77 b3 ff ff jmp 80102470 <kfree>
panic("freevm: no pgdir");
801070f9: 83 ec 0c sub $0xc,%esp
801070fc: 68 e1 7e 10 80 push $0x80107ee1
80107101: e8 8a 92 ff ff call 80100390 <panic>
80107106: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010710d: 8d 76 00 lea 0x0(%esi),%esi
80107110 <setupkvm>:
{
80107110: f3 0f 1e fb endbr32
80107114: 55 push %ebp
80107115: 89 e5 mov %esp,%ebp
80107117: 56 push %esi
80107118: 53 push %ebx
if((pgdir = (pde_t*)kalloc()) == 0)
80107119: e8 12 b5 ff ff call 80102630 <kalloc>
8010711e: 89 c6 mov %eax,%esi
80107120: 85 c0 test %eax,%eax
80107122: 74 42 je 80107166 <setupkvm+0x56>
memset(pgdir, 0, PGSIZE);
80107124: 83 ec 04 sub $0x4,%esp
for(k = kmap; k < &kmap[NELEM(kmap)]; k++)
80107127: bb 20 a4 10 80 mov $0x8010a420,%ebx
memset(pgdir, 0, PGSIZE);
8010712c: 68 00 10 00 00 push $0x1000
80107131: 6a 00 push $0x0
80107133: 50 push %eax
80107134: e8 57 d7 ff ff call 80104890 <memset>
80107139: 83 c4 10 add $0x10,%esp
(uint)k->phys_start, k->perm) < 0) {
8010713c: 8b 43 04 mov 0x4(%ebx),%eax
if(mappages(pgdir, k->virt, k->phys_end - k->phys_start,
8010713f: 83 ec 08 sub $0x8,%esp
80107142: 8b 4b 08 mov 0x8(%ebx),%ecx
80107145: ff 73 0c pushl 0xc(%ebx)
80107148: 8b 13 mov (%ebx),%edx
8010714a: 50 push %eax
8010714b: 29 c1 sub %eax,%ecx
8010714d: 89 f0 mov %esi,%eax
8010714f: e8 8c f9 ff ff call 80106ae0 <mappages>
80107154: 83 c4 10 add $0x10,%esp
80107157: 85 c0 test %eax,%eax
80107159: 78 15 js 80107170 <setupkvm+0x60>
for(k = kmap; k < &kmap[NELEM(kmap)]; k++)
8010715b: 83 c3 10 add $0x10,%ebx
8010715e: 81 fb 60 a4 10 80 cmp $0x8010a460,%ebx
80107164: 75 d6 jne 8010713c <setupkvm+0x2c>
}
80107166: 8d 65 f8 lea -0x8(%ebp),%esp
80107169: 89 f0 mov %esi,%eax
8010716b: 5b pop %ebx
8010716c: 5e pop %esi
8010716d: 5d pop %ebp
8010716e: c3 ret
8010716f: 90 nop
freevm(pgdir);
80107170: 83 ec 0c sub $0xc,%esp
80107173: 56 push %esi
return 0;
80107174: 31 f6 xor %esi,%esi
freevm(pgdir);
80107176: e8 15 ff ff ff call 80107090 <freevm>
return 0;
8010717b: 83 c4 10 add $0x10,%esp
}
8010717e: 8d 65 f8 lea -0x8(%ebp),%esp
80107181: 89 f0 mov %esi,%eax
80107183: 5b pop %ebx
80107184: 5e pop %esi
80107185: 5d pop %ebp
80107186: c3 ret
80107187: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010718e: 66 90 xchg %ax,%ax
80107190 <kvmalloc>:
{
80107190: f3 0f 1e fb endbr32
80107194: 55 push %ebp
80107195: 89 e5 mov %esp,%ebp
80107197: 83 ec 08 sub $0x8,%esp
kpgdir = setupkvm();
8010719a: e8 71 ff ff ff call 80107110 <setupkvm>
8010719f: a3 64 5f 11 80 mov %eax,0x80115f64
lcr3(V2P(kpgdir)); // switch to the kernel page table
801071a4: 05 00 00 00 80 add $0x80000000,%eax
801071a9: 0f 22 d8 mov %eax,%cr3
}
801071ac: c9 leave
801071ad: c3 ret
801071ae: 66 90 xchg %ax,%ax
801071b0 <clearpteu>:
// Clear PTE_U on a page. Used to create an inaccessible
// page beneath the user stack.
void
clearpteu(pde_t *pgdir, char *uva)
{
801071b0: f3 0f 1e fb endbr32
801071b4: 55 push %ebp
pte_t *pte;
pte = walkpgdir(pgdir, uva, 0);
801071b5: 31 c9 xor %ecx,%ecx
{
801071b7: 89 e5 mov %esp,%ebp
801071b9: 83 ec 08 sub $0x8,%esp
pte = walkpgdir(pgdir, uva, 0);
801071bc: 8b 55 0c mov 0xc(%ebp),%edx
801071bf: 8b 45 08 mov 0x8(%ebp),%eax
801071c2: e8 99 f8 ff ff call 80106a60 <walkpgdir>
if(pte == 0)
801071c7: 85 c0 test %eax,%eax
801071c9: 74 05 je 801071d0 <clearpteu+0x20>
panic("clearpteu");
*pte &= ~PTE_U;
801071cb: 83 20 fb andl $0xfffffffb,(%eax)
}
801071ce: c9 leave
801071cf: c3 ret
panic("clearpteu");
801071d0: 83 ec 0c sub $0xc,%esp
801071d3: 68 f2 7e 10 80 push $0x80107ef2
801071d8: e8 b3 91 ff ff call 80100390 <panic>
801071dd: 8d 76 00 lea 0x0(%esi),%esi
801071e0 <copyuvm>:
// Given a parent process's page table, create a copy
// of it for a child.
pde_t*
copyuvm(pde_t *pgdir, uint sz)
{
801071e0: f3 0f 1e fb endbr32
801071e4: 55 push %ebp
801071e5: 89 e5 mov %esp,%ebp
801071e7: 57 push %edi
801071e8: 56 push %esi
801071e9: 53 push %ebx
801071ea: 83 ec 1c sub $0x1c,%esp
pde_t *d;
pte_t *pte;
uint pa, i, flags;
char *mem;
if((d = setupkvm()) == 0)
801071ed: e8 1e ff ff ff call 80107110 <setupkvm>
801071f2: 89 45 e0 mov %eax,-0x20(%ebp)
801071f5: 85 c0 test %eax,%eax
801071f7: 0f 84 9b 00 00 00 je 80107298 <copyuvm+0xb8>
return 0;
for(i = 0; i < sz; i += PGSIZE){
801071fd: 8b 4d 0c mov 0xc(%ebp),%ecx
80107200: 85 c9 test %ecx,%ecx
80107202: 0f 84 90 00 00 00 je 80107298 <copyuvm+0xb8>
80107208: 31 f6 xor %esi,%esi
8010720a: eb 46 jmp 80107252 <copyuvm+0x72>
8010720c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
panic("copyuvm: page not present");
pa = PTE_ADDR(*pte);
flags = PTE_FLAGS(*pte);
if((mem = kalloc()) == 0)
goto bad;
memmove(mem, (char*)P2V(pa), PGSIZE);
80107210: 83 ec 04 sub $0x4,%esp
80107213: 81 c7 00 00 00 80 add $0x80000000,%edi
80107219: 68 00 10 00 00 push $0x1000
8010721e: 57 push %edi
8010721f: 50 push %eax
80107220: e8 0b d7 ff ff call 80104930 <memmove>
if(mappages(d, (void*)i, PGSIZE, V2P(mem), flags) < 0) {
80107225: 58 pop %eax
80107226: 8d 83 00 00 00 80 lea -0x80000000(%ebx),%eax
8010722c: 5a pop %edx
8010722d: ff 75 e4 pushl -0x1c(%ebp)
80107230: b9 00 10 00 00 mov $0x1000,%ecx
80107235: 89 f2 mov %esi,%edx
80107237: 50 push %eax
80107238: 8b 45 e0 mov -0x20(%ebp),%eax
8010723b: e8 a0 f8 ff ff call 80106ae0 <mappages>
80107240: 83 c4 10 add $0x10,%esp
80107243: 85 c0 test %eax,%eax
80107245: 78 61 js 801072a8 <copyuvm+0xc8>
for(i = 0; i < sz; i += PGSIZE){
80107247: 81 c6 00 10 00 00 add $0x1000,%esi
8010724d: 39 75 0c cmp %esi,0xc(%ebp)
80107250: 76 46 jbe 80107298 <copyuvm+0xb8>
if((pte = walkpgdir(pgdir, (void *) i, 0)) == 0)
80107252: 8b 45 08 mov 0x8(%ebp),%eax
80107255: 31 c9 xor %ecx,%ecx
80107257: 89 f2 mov %esi,%edx
80107259: e8 02 f8 ff ff call 80106a60 <walkpgdir>
8010725e: 85 c0 test %eax,%eax
80107260: 74 61 je 801072c3 <copyuvm+0xe3>
if(!(*pte & PTE_P))
80107262: 8b 00 mov (%eax),%eax
80107264: a8 01 test $0x1,%al
80107266: 74 4e je 801072b6 <copyuvm+0xd6>
pa = PTE_ADDR(*pte);
80107268: 89 c7 mov %eax,%edi
flags = PTE_FLAGS(*pte);
8010726a: 25 ff 0f 00 00 and $0xfff,%eax
8010726f: 89 45 e4 mov %eax,-0x1c(%ebp)
pa = PTE_ADDR(*pte);
80107272: 81 e7 00 f0 ff ff and $0xfffff000,%edi
if((mem = kalloc()) == 0)
80107278: e8 b3 b3 ff ff call 80102630 <kalloc>
8010727d: 89 c3 mov %eax,%ebx
8010727f: 85 c0 test %eax,%eax
80107281: 75 8d jne 80107210 <copyuvm+0x30>
}
}
return d;
bad:
freevm(d);
80107283: 83 ec 0c sub $0xc,%esp
80107286: ff 75 e0 pushl -0x20(%ebp)
80107289: e8 02 fe ff ff call 80107090 <freevm>
return 0;
8010728e: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
80107295: 83 c4 10 add $0x10,%esp
}
80107298: 8b 45 e0 mov -0x20(%ebp),%eax
8010729b: 8d 65 f4 lea -0xc(%ebp),%esp
8010729e: 5b pop %ebx
8010729f: 5e pop %esi
801072a0: 5f pop %edi
801072a1: 5d pop %ebp
801072a2: c3 ret
801072a3: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801072a7: 90 nop
kfree(mem);
801072a8: 83 ec 0c sub $0xc,%esp
801072ab: 53 push %ebx
801072ac: e8 bf b1 ff ff call 80102470 <kfree>
goto bad;
801072b1: 83 c4 10 add $0x10,%esp
801072b4: eb cd jmp 80107283 <copyuvm+0xa3>
panic("copyuvm: page not present");
801072b6: 83 ec 0c sub $0xc,%esp
801072b9: 68 16 7f 10 80 push $0x80107f16
801072be: e8 cd 90 ff ff call 80100390 <panic>
panic("copyuvm: pte should exist");
801072c3: 83 ec 0c sub $0xc,%esp
801072c6: 68 fc 7e 10 80 push $0x80107efc
801072cb: e8 c0 90 ff ff call 80100390 <panic>
801072d0 <uva2ka>:
//PAGEBREAK!
// Map user virtual address to kernel address.
char*
uva2ka(pde_t *pgdir, char *uva)
{
801072d0: f3 0f 1e fb endbr32
801072d4: 55 push %ebp
pte_t *pte;
pte = walkpgdir(pgdir, uva, 0);
801072d5: 31 c9 xor %ecx,%ecx
{
801072d7: 89 e5 mov %esp,%ebp
801072d9: 83 ec 08 sub $0x8,%esp
pte = walkpgdir(pgdir, uva, 0);
801072dc: 8b 55 0c mov 0xc(%ebp),%edx
801072df: 8b 45 08 mov 0x8(%ebp),%eax
801072e2: e8 79 f7 ff ff call 80106a60 <walkpgdir>
if((*pte & PTE_P) == 0)
801072e7: 8b 00 mov (%eax),%eax
return 0;
if((*pte & PTE_U) == 0)
return 0;
return (char*)P2V(PTE_ADDR(*pte));
}
801072e9: c9 leave
if((*pte & PTE_U) == 0)
801072ea: 89 c2 mov %eax,%edx
return (char*)P2V(PTE_ADDR(*pte));
801072ec: 25 00 f0 ff ff and $0xfffff000,%eax
if((*pte & PTE_U) == 0)
801072f1: 83 e2 05 and $0x5,%edx
return (char*)P2V(PTE_ADDR(*pte));
801072f4: 05 00 00 00 80 add $0x80000000,%eax
801072f9: 83 fa 05 cmp $0x5,%edx
801072fc: ba 00 00 00 00 mov $0x0,%edx
80107301: 0f 45 c2 cmovne %edx,%eax
}
80107304: c3 ret
80107305: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010730c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80107310 <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)
{
80107310: f3 0f 1e fb endbr32
80107314: 55 push %ebp
80107315: 89 e5 mov %esp,%ebp
80107317: 57 push %edi
80107318: 56 push %esi
80107319: 53 push %ebx
8010731a: 83 ec 0c sub $0xc,%esp
8010731d: 8b 75 14 mov 0x14(%ebp),%esi
80107320: 8b 55 0c mov 0xc(%ebp),%edx
char *buf, *pa0;
uint n, va0;
buf = (char*)p;
while(len > 0){
80107323: 85 f6 test %esi,%esi
80107325: 75 3c jne 80107363 <copyout+0x53>
80107327: eb 67 jmp 80107390 <copyout+0x80>
80107329: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
va0 = (uint)PGROUNDDOWN(va);
pa0 = uva2ka(pgdir, (char*)va0);
if(pa0 == 0)
return -1;
n = PGSIZE - (va - va0);
80107330: 8b 55 0c mov 0xc(%ebp),%edx
80107333: 89 fb mov %edi,%ebx
80107335: 29 d3 sub %edx,%ebx
80107337: 81 c3 00 10 00 00 add $0x1000,%ebx
if(n > len)
8010733d: 39 f3 cmp %esi,%ebx
8010733f: 0f 47 de cmova %esi,%ebx
n = len;
memmove(pa0 + (va - va0), buf, n);
80107342: 29 fa sub %edi,%edx
80107344: 83 ec 04 sub $0x4,%esp
80107347: 01 c2 add %eax,%edx
80107349: 53 push %ebx
8010734a: ff 75 10 pushl 0x10(%ebp)
8010734d: 52 push %edx
8010734e: e8 dd d5 ff ff call 80104930 <memmove>
len -= n;
buf += n;
80107353: 01 5d 10 add %ebx,0x10(%ebp)
va = va0 + PGSIZE;
80107356: 8d 97 00 10 00 00 lea 0x1000(%edi),%edx
while(len > 0){
8010735c: 83 c4 10 add $0x10,%esp
8010735f: 29 de sub %ebx,%esi
80107361: 74 2d je 80107390 <copyout+0x80>
va0 = (uint)PGROUNDDOWN(va);
80107363: 89 d7 mov %edx,%edi
pa0 = uva2ka(pgdir, (char*)va0);
80107365: 83 ec 08 sub $0x8,%esp
va0 = (uint)PGROUNDDOWN(va);
80107368: 89 55 0c mov %edx,0xc(%ebp)
8010736b: 81 e7 00 f0 ff ff and $0xfffff000,%edi
pa0 = uva2ka(pgdir, (char*)va0);
80107371: 57 push %edi
80107372: ff 75 08 pushl 0x8(%ebp)
80107375: e8 56 ff ff ff call 801072d0 <uva2ka>
if(pa0 == 0)
8010737a: 83 c4 10 add $0x10,%esp
8010737d: 85 c0 test %eax,%eax
8010737f: 75 af jne 80107330 <copyout+0x20>
}
return 0;
}
80107381: 8d 65 f4 lea -0xc(%ebp),%esp
return -1;
80107384: b8 ff ff ff ff mov $0xffffffff,%eax
}
80107389: 5b pop %ebx
8010738a: 5e pop %esi
8010738b: 5f pop %edi
8010738c: 5d pop %ebp
8010738d: c3 ret
8010738e: 66 90 xchg %ax,%ax
80107390: 8d 65 f4 lea -0xc(%ebp),%esp
return 0;
80107393: 31 c0 xor %eax,%eax
}
80107395: 5b pop %ebx
80107396: 5e pop %esi
80107397: 5f pop %edi
80107398: 5d pop %ebp
80107399: c3 ret
8010739a: 66 90 xchg %ax,%ax
8010739c: 66 90 xchg %ax,%ax
8010739e: 66 90 xchg %ax,%ax
801073a0 <sgenrand>:
static int mti=N+1; /* mti==N+1 means mt[N] is not initialized */
/* initializing the array with a NONZERO seed */
void
sgenrand(unsigned long seed)
{
801073a0: f3 0f 1e fb endbr32
801073a4: 55 push %ebp
801073a5: b8 c4 a5 10 80 mov $0x8010a5c4,%eax
801073aa: 89 e5 mov %esp,%ebp
801073ac: 8b 55 08 mov 0x8(%ebp),%edx
/* setting initial seeds to mt[N] using */
/* the generator Line 25 of Table 1 in */
/* [KNUTH 1981, The Art of Computer Programming */
/* Vol. 2 (2nd Ed.), pp102] */
mt[0]= seed & 0xffffffff;
801073af: 89 15 c0 a5 10 80 mov %edx,0x8010a5c0
for (mti=1; mti<N; mti++)
801073b5: eb 0c jmp 801073c3 <sgenrand+0x23>
801073b7: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801073be: 66 90 xchg %ax,%ax
801073c0: 83 c0 04 add $0x4,%eax
mt[mti] = (69069 * mt[mti-1]) & 0xffffffff;
801073c3: 69 d2 cd 0d 01 00 imul $0x10dcd,%edx,%edx
801073c9: 89 10 mov %edx,(%eax)
for (mti=1; mti<N; mti++)
801073cb: 3d 7c af 10 80 cmp $0x8010af7c,%eax
801073d0: 75 ee jne 801073c0 <sgenrand+0x20>
801073d2: c7 05 60 a4 10 80 70 movl $0x270,0x8010a460
801073d9: 02 00 00
}
801073dc: 5d pop %ebp
801073dd: c3 ret
801073de: 66 90 xchg %ax,%ax
801073e0 <genrand>:
long /* for integer generation */
genrand()
{
801073e0: f3 0f 1e fb endbr32
unsigned long y;
static unsigned long mag01[2]={0x0, MATRIX_A};
/* mag01[x] = x * MATRIX_A for x=0,1 */
if (mti >= N) { /* generate N words at one time */
801073e4: a1 60 a4 10 80 mov 0x8010a460,%eax
801073e9: 3d 6f 02 00 00 cmp $0x26f,%eax
801073ee: 7f 3c jg 8010742c <genrand+0x4c>
801073f0: 8d 50 01 lea 0x1(%eax),%edx
801073f3: 8b 04 85 c0 a5 10 80 mov -0x7fef5a40(,%eax,4),%eax
mt[N-1] = mt[M-1] ^ (y >> 1) ^ mag01[y & 0x1];
mti = 0;
}
y = mt[mti++];
801073fa: 89 15 60 a4 10 80 mov %edx,0x8010a460
y ^= TEMPERING_SHIFT_U(y);
80107400: 89 c2 mov %eax,%edx
80107402: c1 ea 0b shr $0xb,%edx
80107405: 31 c2 xor %eax,%edx
y ^= TEMPERING_SHIFT_S(y) & TEMPERING_MASK_B;
80107407: 89 d0 mov %edx,%eax
80107409: c1 e0 07 shl $0x7,%eax
8010740c: 25 80 56 2c 9d and $0x9d2c5680,%eax
80107411: 31 c2 xor %eax,%edx
y ^= TEMPERING_SHIFT_T(y) & TEMPERING_MASK_C;
80107413: 89 d0 mov %edx,%eax
80107415: c1 e0 0f shl $0xf,%eax
80107418: 25 00 00 c6 ef and $0xefc60000,%eax
8010741d: 31 d0 xor %edx,%eax
y ^= TEMPERING_SHIFT_L(y);
8010741f: 89 c2 mov %eax,%edx
80107421: c1 ea 12 shr $0x12,%edx
80107424: 31 d0 xor %edx,%eax
// Strip off uppermost bit because we want a long,
// not an unsigned long
return y & RAND_MAX;
80107426: 25 ff ff ff 7f and $0x7fffffff,%eax
}
8010742b: c3 ret
if (mti == N+1) /* if sgenrand() has not been called, */
8010742c: 3d 71 02 00 00 cmp $0x271,%eax
80107431: 0f 84 d2 00 00 00 je 80107509 <genrand+0x129>
mt[0]= seed & 0xffffffff;
80107437: 31 c0 xor %eax,%eax
80107439: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
y = (mt[kk]&UPPER_MASK)|(mt[kk+1]&LOWER_MASK);
80107440: 8b 0c 85 c0 a5 10 80 mov -0x7fef5a40(,%eax,4),%ecx
80107447: 83 c0 01 add $0x1,%eax
8010744a: 8b 14 85 c0 a5 10 80 mov -0x7fef5a40(,%eax,4),%edx
80107451: 81 e1 00 00 00 80 and $0x80000000,%ecx
80107457: 81 e2 ff ff ff 7f and $0x7fffffff,%edx
8010745d: 09 ca or %ecx,%edx
mt[kk] = mt[kk+M] ^ (y >> 1) ^ mag01[y & 0x1];
8010745f: 89 d1 mov %edx,%ecx
80107461: 83 e2 01 and $0x1,%edx
80107464: d1 e9 shr %ecx
80107466: 33 0c 85 f0 ab 10 80 xor -0x7fef5410(,%eax,4),%ecx
8010746d: 33 0c 95 54 7f 10 80 xor -0x7fef80ac(,%edx,4),%ecx
80107474: 89 0c 85 bc a5 10 80 mov %ecx,-0x7fef5a44(,%eax,4)
for (kk=0;kk<N-M;kk++) {
8010747b: 3d e3 00 00 00 cmp $0xe3,%eax
80107480: 75 be jne 80107440 <genrand+0x60>
80107482: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
y = (mt[kk]&UPPER_MASK)|(mt[kk+1]&LOWER_MASK);
80107488: 8b 0c 85 c0 a5 10 80 mov -0x7fef5a40(,%eax,4),%ecx
8010748f: 83 c0 01 add $0x1,%eax
80107492: 8b 14 85 c0 a5 10 80 mov -0x7fef5a40(,%eax,4),%edx
80107499: 81 e1 00 00 00 80 and $0x80000000,%ecx
8010749f: 81 e2 ff ff ff 7f and $0x7fffffff,%edx
801074a5: 09 ca or %ecx,%edx
mt[kk] = mt[kk+(M-N)] ^ (y >> 1) ^ mag01[y & 0x1];
801074a7: 89 d1 mov %edx,%ecx
801074a9: 83 e2 01 and $0x1,%edx
801074ac: d1 e9 shr %ecx
801074ae: 33 0c 85 30 a2 10 80 xor -0x7fef5dd0(,%eax,4),%ecx
801074b5: 33 0c 95 54 7f 10 80 xor -0x7fef80ac(,%edx,4),%ecx
801074bc: 89 0c 85 bc a5 10 80 mov %ecx,-0x7fef5a44(,%eax,4)
for (;kk<N-1;kk++) {
801074c3: 3d 6f 02 00 00 cmp $0x26f,%eax
801074c8: 75 be jne 80107488 <genrand+0xa8>
y = (mt[N-1]&UPPER_MASK)|(mt[0]&LOWER_MASK);
801074ca: a1 c0 a5 10 80 mov 0x8010a5c0,%eax
801074cf: 8b 0d 7c af 10 80 mov 0x8010af7c,%ecx
801074d5: 89 c2 mov %eax,%edx
801074d7: 81 e1 00 00 00 80 and $0x80000000,%ecx
801074dd: 81 e2 ff ff ff 7f and $0x7fffffff,%edx
801074e3: 09 d1 or %edx,%ecx
mt[N-1] = mt[M-1] ^ (y >> 1) ^ mag01[y & 0x1];
801074e5: 89 ca mov %ecx,%edx
801074e7: 83 e1 01 and $0x1,%ecx
801074ea: d1 ea shr %edx
801074ec: 33 15 f0 ab 10 80 xor 0x8010abf0,%edx
801074f2: 33 14 8d 54 7f 10 80 xor -0x7fef80ac(,%ecx,4),%edx
801074f9: 89 15 7c af 10 80 mov %edx,0x8010af7c
801074ff: ba 01 00 00 00 mov $0x1,%edx
80107504: e9 f1 fe ff ff jmp 801073fa <genrand+0x1a>
mt[0]= seed & 0xffffffff;
80107509: b8 c4 a5 10 80 mov $0x8010a5c4,%eax
8010750e: b9 7c af 10 80 mov $0x8010af7c,%ecx
80107513: ba 05 11 00 00 mov $0x1105,%edx
80107518: c7 05 c0 a5 10 80 05 movl $0x1105,0x8010a5c0
8010751f: 11 00 00
for (mti=1; mti<N; mti++)
80107522: eb 07 jmp 8010752b <genrand+0x14b>
80107524: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80107528: 83 c0 04 add $0x4,%eax
mt[mti] = (69069 * mt[mti-1]) & 0xffffffff;
8010752b: 69 d2 cd 0d 01 00 imul $0x10dcd,%edx,%edx
80107531: 89 10 mov %edx,(%eax)
for (mti=1; mti<N; mti++)
80107533: 39 c1 cmp %eax,%ecx
80107535: 75 f1 jne 80107528 <genrand+0x148>
80107537: e9 fb fe ff ff jmp 80107437 <genrand+0x57>
8010753c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80107540 <random_at_most>:
// Assumes 0 <= max <= RAND_MAX
// Returns in the half-open interval [0, max]
long random_at_most(long max) {
80107540: f3 0f 1e fb endbr32
80107544: 55 push %ebp
unsigned long
// max <= RAND_MAX < ULONG_MAX, so this is okay.
num_bins = (unsigned long) max + 1,
num_rand = (unsigned long) RAND_MAX + 1,
bin_size = num_rand / num_bins,
80107545: 31 d2 xor %edx,%edx
long random_at_most(long max) {
80107547: 89 e5 mov %esp,%ebp
80107549: 56 push %esi
num_bins = (unsigned long) max + 1,
8010754a: 8b 45 08 mov 0x8(%ebp),%eax
long random_at_most(long max) {
8010754d: 53 push %ebx
bin_size = num_rand / num_bins,
8010754e: bb 00 00 00 80 mov $0x80000000,%ebx
num_bins = (unsigned long) max + 1,
80107553: 8d 48 01 lea 0x1(%eax),%ecx
bin_size = num_rand / num_bins,
80107556: 89 d8 mov %ebx,%eax
80107558: f7 f1 div %ecx
8010755a: 89 c6 mov %eax,%esi
8010755c: 29 d3 sub %edx,%ebx
8010755e: 66 90 xchg %ax,%ax
defect = num_rand % num_bins;
long x;
do {
x = genrand();
80107560: e8 7b fe ff ff call 801073e0 <genrand>
}
// This is carefully written not to overflow
while (num_rand - defect <= (unsigned long)x);
80107565: 39 d8 cmp %ebx,%eax
80107567: 73 f7 jae 80107560 <random_at_most+0x20>
// Truncated division is intentional
return x/bin_size;
80107569: 31 d2 xor %edx,%edx
8010756b: 5b pop %ebx
return x/bin_size;
8010756c: f7 f6 div %esi
8010756e: 5e pop %esi
8010756f: 5d pop %ebp
80107570: c3 ret
| 38.411401
| 90
| 0.524041
|
0a87083553891ddcd9594c0d78c0b7985b0aeed3
| 6,722
|
asm
|
Assembly
|
Transynther/x86/_processed/AVXALIGN/_st_/i7-7700_9_0x48.log_21829_2132.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/AVXALIGN/_st_/i7-7700_9_0x48.log_21829_2132.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/AVXALIGN/_st_/i7-7700_9_0x48.log_21829_2132.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 3
|
2020-07-14T17:07:07.000Z
|
2022-03-21T01:12:22.000Z
|
.global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r15
push %r8
push %r9
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_D_ht+0x3994, %r8
clflush (%r8)
nop
dec %rsi
mov $0x6162636465666768, %rcx
movq %rcx, %xmm6
and $0xffffffffffffffc0, %r8
vmovntdq %ymm6, (%r8)
nop
nop
sub $61537, %rsi
lea addresses_WC_ht+0xf0fd, %r9
nop
nop
nop
nop
cmp %r15, %r15
movw $0x6162, (%r9)
nop
cmp %r15, %r15
lea addresses_normal_ht+0x100d6, %rsi
lea addresses_WT_ht+0x1d94, %rdi
nop
nop
nop
xor %rdx, %rdx
mov $85, %rcx
rep movsq
nop
and %rsi, %rsi
lea addresses_D_ht+0x1b23c, %rsi
lea addresses_WC_ht+0x115c3, %rdi
clflush (%rdi)
nop
dec %r15
mov $65, %rcx
rep movsw
sub %rdi, %rdi
lea addresses_A_ht+0xdd94, %rsi
lea addresses_normal_ht+0x1715c, %rdi
and $34311, %r12
mov $80, %rcx
rep movsb
nop
nop
nop
nop
xor %rsi, %rsi
lea addresses_A_ht+0xa744, %rdi
nop
nop
nop
xor $26942, %rdx
vmovups (%rdi), %ymm2
vextracti128 $1, %ymm2, %xmm2
vpextrq $1, %xmm2, %r8
inc %r15
lea addresses_A_ht+0x214c, %rsi
lea addresses_A_ht+0x1cd94, %rdi
xor $48022, %r15
mov $74, %rcx
rep movsl
nop
nop
nop
nop
sub %r9, %r9
lea addresses_WT_ht+0x16694, %rdx
nop
add %r9, %r9
mov (%rdx), %ecx
nop
cmp %r15, %r15
lea addresses_WT_ht+0x1d474, %rsi
lea addresses_WC_ht+0x14394, %rdi
nop
nop
nop
nop
nop
inc %r9
mov $82, %rcx
rep movsq
inc %rsi
lea addresses_WC_ht+0xd394, %rsi
clflush (%rsi)
nop
nop
sub %rdx, %rdx
movw $0x6162, (%rsi)
nop
nop
nop
nop
dec %rsi
lea addresses_A_ht+0xcd14, %rdx
sub $61342, %r15
movb (%rdx), %cl
nop
nop
nop
nop
nop
cmp %r15, %r15
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %r9
pop %r8
pop %r15
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r15
push %r8
push %rbp
push %rsi
// Faulty Load
lea addresses_D+0x1ad94, %r15
clflush (%r15)
nop
nop
nop
dec %rsi
mov (%r15), %ebp
lea oracles, %r8
and $0xff, %rbp
shlq $12, %rbp
mov (%r8,%rbp,1), %rbp
pop %rsi
pop %rbp
pop %r8
pop %r15
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_D', 'AVXalign': False, 'congruent': 0, 'size': 16, 'same': False, 'NT': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_D', 'AVXalign': True, 'congruent': 0, 'size': 4, 'same': True, 'NT': False}}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 10, 'size': 32, 'same': False, 'NT': True}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 0, 'size': 2, 'same': False, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 10, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 0, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 0, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 3, 'size': 32, 'same': False, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 10, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 8, 'size': 4, 'same': False, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 4, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 9, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 8, 'size': 2, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 7, 'size': 1, 'same': False, 'NT': False}}
{'36': 21829}
36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36
*/
| 39.309942
| 2,999
| 0.658584
|
39654392faedf5af17fea573fe4ee6452e1b4989
| 1,772
|
asm
|
Assembly
|
programs/oeis/164/A164576.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | 1
|
2021-03-15T11:38:20.000Z
|
2021-03-15T11:38:20.000Z
|
programs/oeis/164/A164576.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/164/A164576.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | null | null | null |
; A164576: Integer averages of the set of the first positive squares up to some n^2.
; 1,11,20,46,63,105,130,188,221,295,336,426,475,581,638,760,825,963,1036,1190,1271,1441,1530,1716,1813,2015,2120,2338,2451,2685,2806,3056,3185,3451,3588,3870,4015,4313,4466,4780,4941,5271,5440,5786,5963,6325,6510,6888,7081,7475,7676,8086,8295,8721,8938,9380,9605,10063,10296,10770,11011,11501,11750,12256,12513,13035,13300,13838,14111,14665,14946,15516,15805,16391,16688,17290,17595,18213,18526,19160,19481,20131,20460,21126,21463,22145,22490,23188,23541,24255,24616,25346,25715,26461,26838,27600,27985,28763,29156,29950,30351,31161,31570,32396,32813,33655,34080,34938,35371,36245,36686,37576,38025,38931,39388,40310,40775,41713,42186,43140,43621,44591,45080,46066,46563,47565,48070,49088,49601,50635,51156,52206,52735,53801,54338,55420,55965,57063,57616,58730,59291,60421,60990,62136,62713,63875,64460,65638,66231,67425,68026,69236,69845,71071,71688,72930,73555,74813,75446,76720,77361,78651,79300,80606,81263,82585,83250,84588,85261,86615,87296,88666,89355,90741,91438,92840,93545,94963,95676,97110,97831,99281,100010,101476,102213,103695,104440,105938,106691,108205,108966,110496,111265,112811,113588,115150,115935,117513,118306,119900,120701,122311,123120,124746,125563,127205,128030,129688,130521,132195,133036,134726,135575,137281,138138,139860,140725,142463,143336,145090,145971,147741,148630,150416,151313,153115,154020,155838,156751,158585,159506,161356,162285,164151,165088,166970,167915,169813,170766,172680,173641,175571,176540,178486,179463,181425,182410,184388,185381,187375
mov $3,$0
mov $4,$0
add $4,1
lpb $4
mov $0,$3
sub $4,1
sub $0,$4
mov $2,4
mul $2,$0
mod $0,2
mul $0,2
lpb $0
gcd $0,3
mul $2,2
add $2,1
lpe
add $2,1
add $1,$2
lpe
| 77.043478
| 1,488
| 0.784989
|
f913ff9a58aa258351b3755ba60ed62b3ecd9be0
| 1,868
|
asm
|
Assembly
|
programs/oeis/100/A100071.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/100/A100071.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/100/A100071.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A100071: a(n) = n * binomial(n-1, floor((n-1)/2)) = n * max_{i=0..n} binomial(n-1, i).
; 0,1,2,6,12,30,60,140,280,630,1260,2772,5544,12012,24024,51480,102960,218790,437580,923780,1847560,3879876,7759752,16224936,32449872,67603900,135207800,280816200,561632400,1163381400,2326762800,4808643120,9617286240,19835652870,39671305740,81676217700,163352435400,335780006100,671560012200,1378465288200,2756930576400,5651707681620,11303415363240,23145088600920,46290177201840,94684453367400,189368906734800,386971244197200,773942488394400,1580132580471900,3160265160943800,6446940928325352,12893881856650704,26283682246249512,52567364492499024,107081668410646160,214163336821292320,435975364243345080,871950728486690160,1773968723472921360,3547937446945842720,7214139475456546864,14428278950913093728,29321986255081448544,58643972510162897088,119120569161268384710,238241138322536769420,483701705079089804580,967403410158179609160,1963259861791599795060,3926519723583199590120,7965225724983062025672,15930451449966124051344,32303415440209084881892,64606830880418169763784,130959792325171965737400,261919584650343931474800,530731789949381124304200,1061463579898762248608400,2150144174666723529232400,4300288349333447058464800,8708083907400230293391220,17416167814800460586782440,35257120210449712895193720,70514240420899425790387440,142707391328010742671022200,285414782656021485342044400,577467118397066726157159600,1154934236794133452314319200,2336116978969951755817600200,4672233957939903511635200400,9448295337167360434640071920,18896590674334720869280143840,38203976798111500887892464720,76407953596223001775784929440,154441608332791173802118474400,308883216665582347604236948800,624201500345030994116895500700,1248403000690061988233791001400,2522283613639104833370312431400
mov $2,2
add $2,$0
div $2,2
mov $1,$2
mov $3,$0
bin $3,$2
mul $3,2
mul $1,$3
div $1,2
mov $0,$1
| 133.428571
| 1,681
| 0.897752
|
082ccb0f35523950f051da2dec38a9eec3144d5e
| 800
|
asm
|
Assembly
|
src/kernel/context_asm.asm
|
jaeh/IncludeOS
|
1cc2bcf36758ff5ef3099e0c0c1ee55f0bb1de02
|
[
"Apache-2.0"
] | 3,673
|
2015-12-01T22:14:02.000Z
|
2019-03-22T03:07:20.000Z
|
src/kernel/context_asm.asm
|
jaeh/IncludeOS
|
1cc2bcf36758ff5ef3099e0c0c1ee55f0bb1de02
|
[
"Apache-2.0"
] | 960
|
2015-12-01T20:40:36.000Z
|
2019-03-22T13:21:21.000Z
|
src/kernel/context_asm.asm
|
jaeh/IncludeOS
|
1cc2bcf36758ff5ef3099e0c0c1ee55f0bb1de02
|
[
"Apache-2.0"
] | 357
|
2015-12-02T09:32:50.000Z
|
2019-03-22T09:32:34.000Z
|
USE32
global __context_switch
extern __context_switch_delegate
section .text
__context_switch:
; retrieve stack location
;pop ebx
; delegate reference
;pop ecx
; create stack frame
push ebp
mov ebp, esp
; save special purpose stuff
push esi
push edi
; save current ESP for later
mov eax, esp
; change to new stack
mov esp, ecx
and esp, 0xfffffff0
; room for arguments
sub esp, 16
; store old ESP on new stack
mov DWORD [esp ], eax
; delegate
mov DWORD [esp+4], edx
; call function that can call delegates
call __context_switch_delegate
; restore old stack
mov esp, [esp]
; restore special stuff
pop edi
pop esi
; return to origin
pop ebp
ret
| 17.777778
| 43
| 0.62125
|
5ea3a8dacad18408c127a1c4686c5cd7566c2834
| 1,065
|
asm
|
Assembly
|
programs/oeis/260/A260479.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/260/A260479.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/260/A260479.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
; A260479: Positions of 0 in the infinite palindromic word at A260455.
; 1,3,4,6,8,10,11,13,14,16,17,19,21,23,24,26,28,30,31,33,35,37,38,40,41,43,44,46,48,50,51,53,54,56,57,59,61,63,64,66,67,69,70,72,74,76,77,79,81,83,84,86,88,90,91,93,94,96,97,99,101,103,104,106,108,110,111,113,115,117,118,120,121,123,124,126,128,130,131,133,135,137,138,140,142,144,145,147,148,150,151,153,155,157,158,160,161,163,164,166,168,170,171,173,174,176,177,179,181,183,184,186,188,190,191,193,195,197,198,200,201,203,204,206,208,210,211,213,214,216,217,219,221,223,224,226,227,229,230,232,234,236,237,239,241,243,244,246,248,250,251,253,254,256,257,259,261,263,264,266,267,269,270,272,274,276,277,279,280,282,283,285,287,289,290,292,294,296,297,299,301,303,304,306,307,309,310,312,314,316,317,319,321,323,324,326,328,330,331,333,334,336,337,339,341,343,344,346,348,350,351,353,355,357,358,360,361,363,364,366,368,370,371,373,374,376,377,379,381,383,384,386,387,389,390,392,394,396,397,399,401,403,404,406,408,410,411,413,414,416
mov $1,$0
lpb $0,1
add $1,$0
div $0,-2
lpe
add $1,1
| 106.5
| 936
| 0.722066
|
253e150ed6ada4bb250fd68d30f0069ffb0770ee
| 1,121
|
asm
|
Assembly
|
programs/oeis/320/A320947.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/320/A320947.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/320/A320947.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
; A320947: a(n) is the number of dominoes, among all domino tilings of the 2 X n rectangle, sharing a length-2 side with the boundary of the rectangle.
; 1,4,8,16,30,56,102,184,328,580,1018,1776,3082,5324,9160,15704,26838,45736,77742,131840,223112,376844,635378,1069536,1797650,3017236,5057672,8467744,14161038,23657240,39482358,65832136,109671112,182552404,303629290,504636624,838126618,1391078876,2307381832,3824952680,6337002822,10493115784,17365947198,28726051856,47494816520,78490674716,129658115042,214091219904,353364388898,583013092900,961550019848,1585293134896,2612745714942,4304671432184,7089952289670,11673791446744,19215446603848,31620108642916,52018128706522,85551681401520,140665827619882,231226970585324,379998277280968,624340188505976,1025558885502390,1684234434363496,2765349099936462,4539474674725664,7450270695158408
mov $4,2
mov $5,$0
lpb $4,1
mov $0,$5
sub $4,1
add $0,$4
sub $0,1
cal $0,23610 ; Convolution of Fibonacci numbers and {F(2), F(3), F(4), ...}.
mul $0,2
sub $0,1
mov $2,$4
mov $3,$0
lpb $2,1
mov $1,$3
sub $2,1
lpe
lpe
lpb $5,1
sub $1,$3
mov $5,0
lpe
| 44.84
| 684
| 0.776985
|
5a30b3e45840a02f4a4049693275a8b45b20f1b8
| 1,944
|
asm
|
Assembly
|
programs/oeis/282/A282124.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/282/A282124.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/282/A282124.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A282124: Decimal representation of the x-axis, from the origin to the right edge, of the n-th stage of growth of the two-dimensional cellular automaton defined by "Rule 430", based on the 5-celled von Neumann neighborhood.
; 1,3,3,15,11,63,43,255,171,1023,683,4095,2731,16383,10923,65535,43691,262143,174763,1048575,699051,4194303,2796203,16777215,11184811,67108863,44739243,268435455,178956971,1073741823,715827883,4294967295,2863311531,17179869183,11453246123,68719476735,45812984491,274877906943,183251937963,1099511627775,733007751851,4398046511103,2932031007403,17592186044415,11728124029611,70368744177663,46912496118443,281474976710655,187649984473771,1125899906842623,750599937895083,4503599627370495,3002399751580331,18014398509481983,12009599006321323,72057594037927935,48038396025285291,288230376151711743,192153584101141163,1152921504606846975,768614336404564651,4611686018427387903,3074457345618258603,18446744073709551615,12297829382473034411,73786976294838206463,49191317529892137643,295147905179352825855,196765270119568550571,1180591620717411303423,787061080478274202283,4722366482869645213695,3148244321913096809131,18889465931478580854783,12592977287652387236523,75557863725914323419135,50371909150609548946091,302231454903657293676543,201487636602438195784363,1208925819614629174706175,805950546409752783137451,4835703278458516698824703,3223802185639011132549803,19342813113834066795298815,12895208742556044530199211,77371252455336267181195263,51580834970224178120796843,309485009821345068724781055,206323339880896712483187371,1237940039285380274899124223,825293359523586849932749483,4951760157141521099596496895,3301173438094347399730997931,19807040628566084398385987583,13204693752377389598923991723,79228162514264337593543950335,52818775009509558395695966891,316912650057057350374175801343,211275100038038233582783867563,1267650600228229401496703205375
mov $1,2
pow $1,$0
sub $1,1
dif $1,3
mul $1,2
add $1,1
mov $0,$1
| 176.727273
| 1,652
| 0.906893
|
14950333d156d86796c358c7e67092c04cd9bf3f
| 1,655
|
asm
|
Assembly
|
programs/oeis/015/A015441.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/015/A015441.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/015/A015441.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A015441: Generalized Fibonacci numbers.
; 0,1,1,7,13,55,133,463,1261,4039,11605,35839,105469,320503,953317,2876335,8596237,25854247,77431669,232557151,697147165,2092490071,6275373061,18830313487,56482551853,169464432775,508359743893,1525146340543,4575304803901,13726182847159,41178011670565,123535108753519,370603178776909,1111813831298023,3335432903959477,10006315891747615,30018913315504477,90056808665990167,270170288559017029,810511140554958031,2431532871909060205,7294599715238808391,21883796946693169621,65651395238126019967,196954176918285037693,590862548347041157495,1772587609856751383653,5317762899938998328623,15953288559079506630541,47859865958713496602279,143579597313190536385525,430738793065471515999199,1292216376944614734312349,3876649135337443830307543,11629947397005132236181637,34889842209029795218026895,104669526591060588635116717,314008579845239359943278087,942025739391602891753978389,2826077218463039051413646911,8478231654812656401937517245,25434694965590890710419398711,76304084894466829122044502181,228912254688012173384560894447,686736764054813148116827907533,2060210292182886188424193274215,6180630876511765077125160719413,18541892629609082207670320364703,55625677888679672670421284681181,166877033666334165916443206869399,500631100998412201938970914956485,1501893302996417197437630156172879,4505679908986890409071455645911789,13517039726965393593697236582949063,40551119180886736048125970458419797,121653357542679097610309389956114175,364960072627999513899065212706632957
add $0,1
mov $1,5
mov $3,9
lpb $0
sub $0,1
trn $2,4
add $3,$1
mov $1,$2
add $1,1
sub $3,1
mov $2,$3
mul $2,6
lpe
div $1,74
mov $0,$1
| 87.105263
| 1,462
| 0.900906
|
8ffc2cc3b4eb51110e59de37fc4b1882a7eb3b2b
| 1,900
|
asm
|
Assembly
|
programs/oeis/017/A017035.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/017/A017035.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/017/A017035.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A017035: a(n) = (7*n + 4)^7.
; 16384,19487171,612220032,6103515625,34359738368,137231006679,435817657216,1174711139837,2799360000000,6060711605323,12151280273024,22876792454961,40867559636992,69833729609375,114868566764928,182803912081669,282621973446656,425927596977747,627485170000000,905824306333433,1283918464548864,1789940649848551,2458100350228352,3329565857578125,4453476124377088,5888046306640859,7701771143776896,9974730326005057,12800000000000000,16285174563412143,20554002898923904,25748143198497941,32029040528474112,39579931286171875,48607978698654848,59346543514314249,72057594037927936,87034259659851767,104603532030000000,125129118027271453,149014448675078144,176705848153633131,208695867059654272,245526784064140625,287794280118878208,336151289362331839,391312030875579776,454056225438947877,525233501440000000,605767994083541363,696663142054291584,799006685782884121,913975871465848832,1042842864990234375,1186980379913527168,1347867523649523629,1527095866010812416,1726375734258523387,1947542738810000000,2192564533755051873,2463547816331444224,2762745569510280911,3092564551841937792,3455573038713203125,3854508819166281728,4292287452430319619,4772010788316105856,5296975755624608297,5870683422720000000,6496848334417832983,7179408129339016064,7922533441880253501,8730638092951601152,9608389573631796875,10560719825892021888,11592836324538749809,12710233464526340096,13918704257790032607,15224352343750000000,16633604317637114693,18153222380791087104,19790317317081631891,21552361799603318912,23447204031794765625,25483081727132827648,27668636431552444199,30012928192742795136,32525450580470426317,35216146062080000000,38095421737323327003,41174165436667337344,44463762187231646081,47976111050506371072,51723642336000859375,55719335194973979008,59976735598396632789,64509974703297150976,69333787611640219427,74463532525890000000,79915210305408099913
mul $0,7
add $0,4
pow $0,7
| 271.428571
| 1,840
| 0.93
|
e9c04d71c1b9bd88983839d8559d83141def07d1
| 549
|
asm
|
Assembly
|
oeis/157/A157958.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/157/A157958.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/157/A157958.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A157958: a(n) = 242*n + 1.
; 243,485,727,969,1211,1453,1695,1937,2179,2421,2663,2905,3147,3389,3631,3873,4115,4357,4599,4841,5083,5325,5567,5809,6051,6293,6535,6777,7019,7261,7503,7745,7987,8229,8471,8713,8955,9197,9439,9681,9923,10165,10407,10649,10891,11133,11375,11617,11859,12101,12343,12585,12827,13069,13311,13553,13795,14037,14279,14521,14763,15005,15247,15489,15731,15973,16215,16457,16699,16941,17183,17425,17667,17909,18151,18393,18635,18877,19119,19361,19603,19845,20087,20329,20571,20813,21055,21297,21539,21781
mul $0,242
add $0,243
| 91.5
| 496
| 0.788707
|
b3de7041144deb3601b84edff9f879fd6c17b4ab
| 100,487
|
asm
|
Assembly
|
test_programs/q-tris_perf_test.asm
|
mfkiwl/QNICE-FPGA-hyperRAM
|
aabc8291ac1e0c4666c51f84acddf599d7521e53
|
[
"BSD-3-Clause"
] | 53
|
2016-04-12T07:22:49.000Z
|
2022-03-25T09:24:48.000Z
|
test_programs/q-tris_perf_test.asm
|
mfkiwl/QNICE-FPGA-hyperRAM
|
aabc8291ac1e0c4666c51f84acddf599d7521e53
|
[
"BSD-3-Clause"
] | 196
|
2020-06-05T04:59:50.000Z
|
2021-03-13T21:27:11.000Z
|
test_programs/q-tris_perf_test.asm
|
mfkiwl/QNICE-FPGA-hyperRAM
|
aabc8291ac1e0c4666c51f84acddf599d7521e53
|
[
"BSD-3-Clause"
] | 15
|
2017-07-31T11:26:56.000Z
|
2022-02-22T14:22:46.000Z
|
; ****************************************************************************
; Q-TRIS
;
; Tetris clone and the first game ever developed for QNICE-FPGA.
;
; The rules of the game are very close to the "official" Tetris rules as
; they can be found e.g. on http://tetris.wikia.com/wiki/Tetris_Guideline
;
; Clearing a larger amount of lines at once (e.g. Double, Triple, Q-TRIS)
; leads to much higher scores. The scoring algorithm is:
; (<amount of cleared lines> ^ 2) x <Level>
;
; Clearing a certain treshold of lines leads to the next level. The game
; speed increases from level top level. If you clear 1.000 lines, then
; you win the game.
;
; The game uses the PS2/USB keyboard and VGA, no matter how STDIN/STDOUT
; are routed. All speed calculations are based on a 50 MHz CPU that is equal
; to the CPU revision contained in release V1.3.
;
; The game can run stand-alone, i.e. instead of the Monitor as the "ROM"
; for the QNICE-FPGA - or - it can run regularly as an app. In the latter case
; it loads to 0x8000. #define QTRIS_STANDALONE for the standalone mode.
;
; done by sy2002 in January and February 2016
; ****************************************************************************
;
; PERFORMANCE TEST VERSION TO DETERMINE THE MIPS DURING PLAYING Q-TRIS
;
; ISA 1.5:
;
; Measurement #1 done on MEGA65 by sy2002 on July, 13th 2020:
; Clock cycles: 0003 C771 F13E = 16.231.035.198 => 324,62 sec
; Instructions: 0000 EA6E 73D1 = 3.933.107.153 => 12,12 MIPS
;
; Measurement #2 done on Nexys 4 DDR by sy2002 on July, 14th 2020:
; Clock cycles: 0001 0078 BDA3 = 4.302.880.163 => 86,06 sec
; Instructions: 0000 3E2F CF3E = 1.043.320.638 => 12,12 MIPS
;
; ISA 1.6:
;
; Measurement #3 done on Nexys 4 DDR by sy2002 on August, 18th 2020:
; Clock cycles: 0005 33BE B478 = 22.342.972.536 => 446,86 sec => 7:27 min
; Instructions: 0001 5996 6BCC = 5.797.997.516 => 3,85 cycles / instruction
; => 12,97 MIPS
;
; ****************************************************************************
#undef QTRIS_STANDALONE
#include "../dist_kit/sysdef.asm"
#include "../dist_kit/monitor.def"
#ifdef QTRIS_STANDALONE
.ORG 0x0000 ; start at 0x0000
AND 0x00FF, SR ; make sure we are at rbank 0
MOVE 0xFEFF, SP ; setup stack pointer
#else
.ORG 0x8000 ; start at 0x8000
#endif
; PERFORMANCE TEST CODE
MOVE IO$CYC_STATE, R0 ; reset hw cycle counter
MOVE 1, @R0
MOVE IO$INS_STATE, R0 ; reset hw instruction counter
MOVE 1, @R0
; STANDARD Q-TRIS CODE
RSUB INIT_SCREENHW, 1 ; clear screen, no hw cursor
RSUB INIT_GLOBALS, 1 ; init global variables
RSUB PAINT_PLAYFIELD, 1 ; paint playfield & logo
RSUB PAINT_STATS, 1 ; paint score, level, etc.
RSUB HANDLE_PAUSE, 1 ; check space, inc pseudo rnd
NEXT_GAME RSUB DRAW_FROM_BAG, 1 ; randomizer algorithm
MOVE R8, R3 ; R3: result = next Tetromino
; use "draw from bag" algorithm to dice a new Tetromino
MAIN_LOOP RSUB DRAW_FROM_BAG, 1 ; dice another Tetromino
MOVE R3, R4 ; R4: old "next" = new current
MOVE R8, R3 ; R3: dice result = new "next"
RSUB PAINT_NEXT_TTR, 1 ; fill the preview window
MOVE RenderedNumber, R0 ; make sure the renderer...
MOVE NEW_TTR, @R0 ; ...treats this TTR as new
; show score, level, lines, stats and check if game is won
RSUB PAINT_STATS, 1 ; update all stats on screen
MOVE Level, R0
CMP GAME_WON, @R0 ; game won?
RBRA CALC_TTR_POS, !Z ; no: new TTR emerges
MOVE 1, R8 ; make sure "you win" is shown
RBRA END_GAME_W, 1
; calculate the position where new Tetrominos emerge from
CALC_TTR_POS MOVE Tetromino_Y, R1
MOVE -8, @R1 ; y start pos = -8
MOVE PLAYFIELD_X, R0 ; x start pos is the middle...
ADD PLAYFIELD_W, R0 ; ... of the playfield ...
SHR 1, R0 ; ..which is ((X+W) / 2) - of
MOVE TTR_SX_Offs, R1 ; of is taken from TTR_SX_Offs
MOVE R4, R2
ADD R2, R1
ADD @R1, R0
MOVE Tetromino_X, R1
MOVE R0, @R1
; drop the Tetromino using the speed given from the current
; Level: SPEED_DELAY uses a look up table for the speed and
; executes the MULTITASK routine for keyboard handling while
; wasting CPU cycles to slow down the game
DROP RSUB HANDLE_PAUSE, 1 ; pause game, if needed
XOR R8, R8 ; R8 = 0 means move down
RSUB DECIDE_MOVE, 1 ; can we move down?
CMP 0, R9
RBRA HNDL_COMPL_ROWS, Z ; no: handle completed rows
MOVE R4, R8 ; yes: move down one row
XOR R9, R9
MOVE 1, R10
XOR R11, R11
RSUB UPDATE_TTR, 1
MOVE 1, R8 ; multitask on while delay
RSUB SPEED_DELAY, 1 ; game speed regulation
RBRA DROP, 1
; detect a potential game over and handle completed rows
HNDL_COMPL_ROWS MOVE Tetromino_Y, R1
CMP -5, @R1 ; reached upper boundary?
RBRA END_GAME_L, V ; yes: end game (game over)
RSUB COMPLETED_ROWS, 1 ; no: handle completed rows
; next iteration
RBRA MAIN_LOOP, 1
; handle end of the game
END_GAME_L XOR R8, R8 ; show "game over" message
END_GAME_W RSUB HANDLE_END, 1 ; prepare for next round
RBRA NEXT_GAME, 1 ; play next game
; end Q-TRIS (will only be called in non-stand-alone mode)
EXIT SYSCALL(vga_init, 1) ; cursor blinking, etc.
SYSCALL(vga_cls, 1) ; clear screen
; PERFORMANCE TEST CODE
MOVE IO$CYC_STATE, R0
MOVE 0, @R0 ; stop hw cycle counter
MOVE IO$INS_STATE, R0
MOVE 0, @R0 ; stop hw instruction counter
; output cycle counter
MOVE PERF_STR, R8
SYSCALL(puts, 1) ; output info string
MOVE IO$CYC_HI, R1
MOVE @R1, R8
SYSCALL(puthex, 1) ; output hi word of 48bit counter
MOVE SPACE_STR, R8
SYSCALL(puts, 1)
MOVE IO$CYC_MID, R1
MOVE @R1, R8
SYSCALL(puthex, 1) ; output mid word of 48bit counter
MOVE SPACE_STR, R8
SYSCALL(puts, 1)
MOVE IO$CYC_LO, R1
MOVE @R1, R8
SYSCALL(puthex, 1) ; output lo word of 48bit counter
SYSCALL(crlf, 1)
; output instruction counter
MOVE INS_STR, R8
SYSCALL(puts, 1) ; output info string
MOVE IO$INS_HI, R1
MOVE @R1, R8
SYSCALL(puthex, 1) ; output hi word of 48bit counter
MOVE SPACE_STR, R8
SYSCALL(puts, 1)
MOVE IO$INS_MID, R1
MOVE @R1, R8
SYSCALL(puthex, 1) ; output mid word of 48bit counter
MOVE SPACE_STR, R8
SYSCALL(puts, 1)
MOVE IO$INS_LO, R1
MOVE @R1, R8
SYSCALL(puthex, 1) ; output lo word of 48bit counter
SYSCALL(exit, 1) ; return to monitor
; PERFORMANCE TEST CODE
PERF_STR .ASCII_W "Overall clock cycles: "
INS_STR .ASCII_W "Overall instructions: "
SPACE_STR .ASCII_W " "
; STANDARD GAME FROM HERE ONWARDS
NEW_TTR .EQU 0xFFFF ; signal value for RenderedNumber: new Tetromino
; Game logo
QTRIS_X .EQU 25 ; x-pos on screen
QTRIS_Y .EQU 1 ; y-pos on screen
QTRIS_W .EQU 53 ; width of the pattern in chars (without zero term.)
QTRIS_H .EQU 6 ; height of the pattern in lines
QTris .ASCII_W " ____ _______ _____ _____ _____ "
.ASCII_W " / __ \ |__ __| | __ \ |_ _| / ____|"
.ASCII_W "| | | | ______ | | | |__) | | | | (___ "
.ASCII_W "| | | | |______| | | | _ / | | \___ \ "
.ASCII_W "| |__| | | | | | \ \ _| |_ ____) |"
.ASCII_W " \___\_\ |_| |_| \_\ |_____| |_____/ "
; Logos (game over, game won) and restart message
GAME_OVER_X .EQU 33
GAME_OVER_Y .EQU 2
GAME_OVER_W .EQU 37
GAME_OVER_H .EQU 12
Game_Over .ASCII_W " _____ __ __ ______ "
.ASCII_W " / ____| /\ | \/ | | ____|"
.ASCII_W "| | __ / \ | \ / | | |__ "
.ASCII_W "| | |_ | / /\ \ | |\/| | | __| "
.ASCII_W "| |__| | / ____ \ | | | | | |____ "
.ASCII_W " \_____| /_/ \_\ |_| |_| |______|"
.ASCII_W " ____ __ __ ______ _____ "
.ASCII_W " / __ \ \ \ / / | ____| | __ \ "
.ASCII_W "| | | | \ \ / / | |__ | |__) |"
.ASCII_W "| | | | \ \/ / | __| | _ / "
.ASCII_W "| |__| | \ / | |____ | | \ \ "
.ASCII_W " \____/ \/ |______| |_| \_\ "
GAME_WON_X .EQU 36
GAME_WON_Y .EQU 2
GAME_WON_W .EQU 30
GAME_WON_H .EQU 12
Game_Won .ASCII_W " __ __ ____ _ _ "
.ASCII_W " \ \ / / / __ \ | | | | "
.ASCII_W " \ \_/ / | | | | | | | | "
.ASCII_W " \ / | | | | | | | | "
.ASCII_W " | | | |__| | | |__| | "
.ASCII_W " |_| \____/ \____/ "
.ASCII_W "__ __ _____ _ _ "
.ASCII_W "\ \ / / |_ _| | \ | |"
.ASCII_W " \ \ /\ / / | | | \| |"
.ASCII_W " \ \/ \/ / | | | . ` |"
.ASCII_W " \ /\ / _| |_ | |\ |"
.ASCII_W " \/ \/ |_____| |_| \_|"
#ifdef QTRIS_STANDALONE
RESTMSG_X .EQU 39
RESTMSG_Y .EQU 16
RestartMsg .ASCII_W "Space key to restart game"
#else
RESTMSG_X .EQU 25
RESTMSG_Y .EQU 16
RestartMsg .ASCII_W "Space key to restart game F12 or CTRL+E to exit game"
#endif
; Credits and help text
CAH_X .EQU 41
CAH_Y .EQU 8
CAH_W .EQU 40
#ifdef QTRIS_STANDALONE
CAH_H .EQU 9 ; do not show the "Exit the game..." string
#else
CAH_H .EQU 10
#endif
CRE_A_HELP .ASCII_W "Q-TRIS V1.1 by sy2002 in May 2016 "
.ASCII_W " "
.ASCII_W "How to play: "
.ASCII_W " "
.ASCII_W "* Space key starts game and pauses "
.ASCII_W "* Cursor left / right / down to move "
.ASCII_W "* Drop using cursor up "
.ASCII_W "* Rotate left using the 'x' key "
.ASCII_W "* Rotate right using the 'c' key "
.ASCII_W "* Exit the game using F12 or CTRL+E "
; Stats (_LX, _LY = label coordinates, _X, _Y = display coordinates)
STSCORE_LX .EQU 25
STSCORE_LY .EQU 20
STSCORE_X .EQU 25
STSCORE_Y .EQU 22
Stat_Score .ASCII_W "Score:"
STLEVEL_LX .EQU 70
STLEVEL_LY .EQU 20
STLEVEL_X .EQU 70
STLEVEL_Y .EQU 22
Stat_Level .ASCII_W "Level:"
STLINES_LX .EQU 25
STLINES_LY .EQU 32
STLINES_X .EQU 33
STLINES_Y .EQU 32
Stat_Lines .ASCII_W "Lines:"
STSINGLE_LX .EQU 25
STSINGLE_LY .EQU 34
STSINGLE_X .EQU 33
STSINGLE_Y .EQU 34
Stat_Single .ASCII_W "Single:"
STDOUBLE_LX .EQU 25
STDOUBLE_LY .EQU 35
STDOUBLE_X .EQU 33
STDOUBLE_Y .EQU 35
Stat_Double .ASCII_W "Double:"
STTRIPLE_LX .EQU 25
STTRIPLE_LY .EQU 36
STTRIPLE_X .EQU 33
STTRIPLE_Y .EQU 36
Stat_Triple .ASCII_W "Triple:"
STQTRIS_LX .EQU 25
STQTRIS_LY .EQU 37
STQTRIS_X .EQU 33
STQTRIS_Y .EQU 37
Stat_QTris .ASCII_W "Q-Tris:"
; Digits 0..9
DIGITS_DX .EQU 7 ; width of one digit
DIGITS_DY .EQU 7 ; height of one digit
DIGITS_WPD .EQU 56 ; words per digits in memory (incl. zero terminator)
DIGITS_XSP .EQU 1 ; space between two digits on screen
Digits .ASCII_W " ### "
.ASCII_W " # # "
.ASCII_W "# #"
.ASCII_W "# #"
.ASCII_W "# #"
.ASCII_W " # # "
.ASCII_W " ### "
.ASCII_W " # "
.ASCII_W " ## "
.ASCII_W " # # "
.ASCII_W " # "
.ASCII_W " # "
.ASCII_W " # "
.ASCII_W " ##### "
.ASCII_W " ##### "
.ASCII_W "# #"
.ASCII_W " #"
.ASCII_W " ##### "
.ASCII_W "# "
.ASCII_W "# "
.ASCII_W "#######"
.ASCII_W " ##### "
.ASCII_W "# #"
.ASCII_W " #"
.ASCII_W " ##### "
.ASCII_W " #"
.ASCII_W "# #"
.ASCII_W " ##### "
.ASCII_W "# "
.ASCII_W "# # "
.ASCII_W "# # "
.ASCII_W "# # "
.ASCII_W "#######"
.ASCII_W " # "
.ASCII_W " # "
.ASCII_W "#######"
.ASCII_W "# "
.ASCII_W "# "
.ASCII_W "###### "
.ASCII_W " #"
.ASCII_W "# #"
.ASCII_W " ##### "
.ASCII_W " ##### "
.ASCII_W "# #"
.ASCII_W "# "
.ASCII_W "###### "
.ASCII_W "# #"
.ASCII_W "# #"
.ASCII_W " ##### "
.ASCII_W "#######"
.ASCII_W "# # "
.ASCII_W " # "
.ASCII_W " # "
.ASCII_W " # "
.ASCII_W " # "
.ASCII_W " # "
.ASCII_W " ##### "
.ASCII_W "# #"
.ASCII_W "# #"
.ASCII_W " ##### "
.ASCII_W "# #"
.ASCII_W "# #"
.ASCII_W " ##### "
.ASCII_W " ##### "
.ASCII_W "# #"
.ASCII_W "# #"
.ASCII_W " ######"
.ASCII_W " #"
.ASCII_W "# #"
.ASCII_W " ##### "
; special painting characters
WALL_L .EQU 0x09 ; left wall
WALL_R .EQU 0x08 ; right wall
LN_COMPLETE .EQU 0x11 ; line(s) completed blink char (together with 0x20)
; specifications of the net playfield (without walls)
PLAYFIELD_X .EQU 2 ; x-pos on screen
PLAYFIELD_Y .EQU 0 ; y-pos on screen
PLAYFIELD_H .EQU 40 ; height
PLAYFIELD_W .EQU 20 ; width
; Tetromino patterns
TTR_AMOUNT .EQU 7
Tetrominos .DW 0x20, 0x20, 0x20, 0x20 ; Tetromino "I"
.DW 0x00, 0x00, 0x00, 0x00
.DW 0x20, 0x0E, 0x0E, 0x20 ; Tetromino "O"
.DW 0x20, 0x0E, 0x0E, 0x20
.DW 0x20, 0x10, 0x20, 0x20 ; Tetromino "T"
.DW 0x10, 0x10, 0x10, 0x20
.DW 0x20, 0xAE, 0xAE, 0x20 ; Tetromino "S"
.DW 0xAE, 0xAE, 0x20, 0x20
.DW 0xA9, 0xA9, 0x20, 0x20 ; Tetromino "Z"
.DW 0x20, 0xA9, 0xA9, 0x20
.DW 0x20, 0x20, 0x23, 0x20 ; Tetromino "L"
.DW 0x23, 0x23, 0x23, 0x20
.DW 0x4F, 0x20, 0x20, 0x20 ; Tetromino "J"
.DW 0x4F, 0x4F, 0x4F, 0x20
; Tetromino painting offsets for centering them in the 8x8 box
TTR_Offs .DW 0, 1 ; Tetromino "I"
.DW 0, 2 ; Tetromino "O"
.DW 1, 2 ; Tetromino "T"
.DW 1, 2 ; Tetromino "S"
.DW 1, 2 ; Tetromino "Z"
.DW 1, 2 ; Tetromino "L"
.DW 1, 2 ; Tetromino "J"
; Tetromino starting position x offset for centering them on screen
TTR_SX_Offs .DW -1 ; Tetromino "I"
.DW -1 ; Tetromino "O"
.DW -2 ; Tetromino "T"
.DW -2 ; Tetromino "S"
.DW -2 ; Tetromino "Z"
.DW -2 ; Tetromino "L"
.DW -2 ; Tetromino "J"
; When rotating a Tetromino, take care, that it still fits to the grid
TTR_Rot_Xo .DW -1
.DW 0
.DW -1
.DW -1
.DW -1
.DW -1
.DW -1
; Preview window for next Tetromino
PREVIEW_X .EQU 25
PREVIEW_Y .EQU 10
PREVIEW_W .EQU 12
PREVIEW_H .EQU 8
Preview_Win .DW 0x86, 0x8A, 0x8D, 0x4E, 0x65, 0x78, 0x74, 0x87, 0x8A, 0x8A, 0x8A, 0x8C, 0
.DW 0x85, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x85, 0
.DW 0x85, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x85, 0
.DW 0x85, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x85, 0
.DW 0x85, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x85, 0
.DW 0x85, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x85, 0
.DW 0x85, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x85, 0
.DW 0x83, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x89, 0
; Level advancement table
; how many lines does the player need to clear to advance one level
Level_Thresh .DW 5 ; 5 Lines => Level 2
.DW 10 ; 10 Lines => Level 3
.DW 20 ; 20 Lines => Level 4
.DW 40 ; 40 Lines => Level 5
.DW 80 ; 80 Lines => Level 6
.DW 160 ; 160 Lines => Level 7
.DW 320 ; 320 Lines => Level 8
.DW 640 ; 640 Lines => Level 9
.DW 1000 ; 1000 Lines => Game Won
.DW 2000 ; dummy for non existing "Level 10"
GAME_WON .EQU 10 ; game is won, when "Level 10" is reached
; Level speed table
; speed is defined by wasted cycles, both numbers are multiplied
; second number is also used for blinking frequency, so adjust carefully
; (preferably only adjust the first number)
Level_Speed .DW 946, 251 ; Level 1 (was 800 at V1.21)
.DW 827, 251 ; Level 2 (was 700 at V1.21)
.DW 709, 251 ; Level 3 (was 600 at V1.21)
.DW 591, 251 ; Level 4 (was 500 at V1.21)
.DW 532, 251 ; Level 5 (was 450 at V1.21)
.DW 473, 251 ; Level 6 (was 400 at V1.21)
.DW 414, 251 ; Level 7 (was 350 at V1.21)
.DW 355, 251 ; Level 8 (was 300 at V1.21)
.DW 296, 251 ; Level 9 (was 250 at V1.21)
.DW 296, 251 ; non existing "Level 10" => Game Won
; ****************************************************************************
; HANDLE_END
; Displays either the normal "game over" message or the "you win" message,
; depending on the parameter R8. Then handle the keyboard for triggering
; a restart or for triggering a game exit.
; R8: 0 = game over message; 1 = you win message
; ****************************************************************************
HANDLE_END INCRB
MOVE R8, R0
MOVE QTRIS_X, R8 ; clear rect for message
MOVE QTRIS_Y, R9
MOVE QTRIS_W, R10
ADD 1, R10
MOVE 18, R11
RSUB CLR_RECT, 1
CMP 1, R0 ; print win message?
RBRA _HANDLE_END_GO, !Z ; no: print game over
MOVE Game_Won, R8 ; yes: print win message
MOVE GAME_WON_X, R9
MOVE GAME_WON_Y, R10
MOVE GAME_WON_W, R11
MOVE GAME_WON_H, R12
RSUB PRINT_PATTERN, 1
RBRA _HANDLE_END_RM, 1
_HANDLE_END_GO MOVE Game_Over, R8 ; print game over
MOVE GAME_OVER_X, R9
MOVE GAME_OVER_Y, R10
MOVE GAME_OVER_W, R11
MOVE GAME_OVER_H, R12
RSUB PRINT_PATTERN, 1
_HANDLE_END_RM MOVE RestartMsg, R8 ; print restart message
MOVE RESTMSG_X, R9
MOVE RESTMSG_Y, R10
RSUB PRINT_STR_AT, 1
MOVE Pause, R0 ; Wait for space to be pressed
MOVE 1, @R0
RSUB HANDLE_PAUSE, 1
RSUB CLR_SCR, 1 ; rebuild clean screen
RSUB PAINT_PLAYFIELD, 1
RSUB RESTART_GAME, 1 ; reset global game variables
DECRB
RET
; ****************************************************************************
; HANDLE_STATS
; Uses the current level and the amount of cleared lines to update all
; global statistic variables including score, lines, line-stats. Also
; takes care that the level upgrade happens.
; R8: amount of cleared lines
; ****************************************************************************
HANDLE_STATS INCRB
MOVE R8, R0
MOVE R9, R1
MOVE R10, R2
MOVE R11, R3
INCRB
CMP 0, R8 ; no line cleared
RBRA _H_STATS_RET, Z
; update "how-many-lines-cleared" specific stat variables
; (treat them like an array; as they are ordered linearily
; in memory, we can do that)
MOVE Lines_Single, R0 ; "pointer to the array"
ADD R8, R0 ; index to "array"
SUB 1, R0 ; 1 cleared = Lines_Single
ADD 1, @R0 ; update stat
; update line counter
MOVE Lines, R0
MOVE Lines_Old, R1
MOVE @R0, @R1
ADD R8, @R0
; ascend the level ladder
MOVE Level_Thresh, R3 ; Level threshold table
MOVE Level, R4 ; calculate next treshold ...
ADD @R4, R3 ; ... for current level
SUB 1, R3
CMP @R3, @R0 ; lines < treshold?
RBRA _H_STATS_SCORE, N ; yes: go on, calculate score
ADD 1, @R4 ; no: increase level
; score += (squared amount of lines) x (level)
; the amount of lines is squared, to reward the player
; when clearing large blocks
; the level is multipled to account for the higher difficulty
; in higher levels
_H_STATS_SCORE MOVE R8, R9
RSUB MUL, 1
MOVE R10, R8
MOVE Level, R9
MOVE @R9, R9
RSUB MUL, 1
MOVE Score, R0
ADD R10, @R0
_H_STATS_RET DECRB
MOVE R0, R8
MOVE R1, R9
MOVE R2, R10
MOVE R3, R11
DECRB
RET
; ****************************************************************************
; HANDLE_PAUSE
; If "Pause" == 1, then wait for space to be pressed again and while
; waiting, PseudoRandom is incremented.
; ****************************************************************************
HANDLE_PAUSE INCRB
; skip this function if no pause mode
MOVE Pause, R4
CMP 0, @R4
RBRA _HP_RET, Z
; check for key press and read key
MOVE IO$KBD_STATE, R0 ; check keyboard state reg.
MOVE PseudoRandom, R2
_HP_WAITFORKEY ADD 1, @R2 ; inc pseudo random number
MOVE KBD$NEW_ANY, R1
AND @R0, R1 ; any key pressed?
RBRA _HP_WAITFORKEY, Z ; no: loop
; key pressed: space? yes, pause ends, no: loop goes on
MOVE IO$KBD_DATA, R5
MOVE @R5, R5 ; read pressed key
CMP KBD$SPACE, R5 ; space pressed?
RBRA _HP_END_PAUSE, Z ; yes: end pause
#ifndef QTRIS_STANDALONE
CMP KBD$CTRL_E, R5 ; CTRL+E pressed?
RBRA EXIT, Z ; yes: exit game
CMP KBD$F12, R5 ; F12 pressed?
RBRA EXIT, Z ; yes: exit game
#endif
RBRA _HP_WAITFORKEY, 1 ; unknown key: loop
; disable pause mode
_HP_END_PAUSE MOVE 0, @R4
_HP_RET DECRB
RET
; ****************************************************************************
; PAINT_NEXT_TTR
; Fill the preview window by painting the next upcoming Tetromino.
; R8: number of upcoming Tetromino
; ****************************************************************************
PAINT_NEXT_TTR INCRB
MOVE R8, R0
MOVE R9, R1
MOVE R10, R2
MOVE R11, R3
MOVE R12, R4
INCRB
MOVE R8, R0
; print preview window
MOVE Preview_Win, R8
MOVE PREVIEW_X, R9
MOVE PREVIEW_Y, R10
MOVE PREVIEW_W, R11
MOVE PREVIEW_H, R12
RSUB PRINT_PATTERN, 1
; render preview TTR
MOVE RenderedNumber, R1 ; make sure the renderer...
MOVE NEW_TTR, @R1 ; ...treats this TTR as new
MOVE R0, R8 ; original TTR to be shown
XOR R9, R9 ; no rotation
RSUB RENDER_TTR, 1
; paint preview TTR
MOVE PREVIEW_X, R8
ADD 2, R8
MOVE PREVIEW_Y, R9
MOVE 1, R10
RSUB PAINT_TTR, 1
DECRB
MOVE R0, R8
MOVE R1, R9
MOVE R2, R10
MOVE R3, R11
MOVE R4, R12
DECRB
RET
; ****************************************************************************
; DRAW_FROM_BAG
; Implements the "Random Generator" according to the official
; Tetris Guideline, e.g. as seen here:
;
; http://tetris.wikia.com/wiki/Random_Generator
;
; Random Generator generates a sequence of all Tetrominos permuted randomly,
; as if they were drawn from a bag. Then it deals all seven Tetrominos to
; the piece sequence before generating another bag.
;
; R8: Number between 0 and (TTR_AMOUNT - 1)
; ****************************************************************************
DRAW_FROM_BAG INCRB
MOVE Tetromino_BFill, R0 ; empty bag?
CMP 0, @R0
RBRA _DFB_START, !Z
; create new bag
MOVE Tetromino_Bag, R1 ; R1: pointer to bag
XOR R2, R2 ; R2: counter to fill bag
_DFB_FILL MOVE R2, @R1++ ; fill bag: 0, 1, 2, 3, ...
ADD 1, R2
CMP TTR_AMOUNT, R2 ; bag full?
RBRA _DFB_FILL, !Z ; no: go on filling
MOVE TTR_AMOUNT, @R0 ; yes: store new bag size
RBRA _DFB_MODULO, 1
_DFB_START CMP TTR_AMOUNT, @R0 ; bag completely full?
RBRA _DFB_MODULO, Z ; yes
; compress bag by filling all empty spots (marked by -1)
; with their right neighbour
MOVE Tetromino_Bag, R1
XOR R2, R2
_DFB_CP_CMP CMP -1, @R1 ; empty spot?
RBRA _DFB_CP_ES, Z
_DFB_CP_NEXT ADD 1, R1
ADD 1, R2
CMP TTR_AMOUNT, R2
RBRA _DFB_CP_CMP, !Z
RBRA _DFB_MODULO, 1
_DFB_CP_ES MOVE R1, R3 ; R3: bagpointer (saved)
MOVE R2, R4 ; R4: counter (saved)
_DFB_CP_ESCP CMP TTR_AMOUNT, R4 ; end of bag reached?
RBRA _DFB_CP_NEXT, Z ; yes: back to upper loop
MOVE R3, R5
ADD 1, R5
MOVE @R5, @R3
ADD 1, R3
ADD 1, R4
RBRA _DFB_CP_ESCP, 1
; calculate last byte of "PseudoRandom" modulo the amount
; of Tetrominos in the current compressed bag to draw
; a Tetromino
_DFB_MODULO MOVE PseudoRandom, R1
MOVE @R1, R1
AND 0x00FF, R1
_DFB_DO_MOD_C CMP R1, @R0
RBRA _DFB_DO_MOD_S, N
CMP R1, @R0
RBRA _DFB_DO_MOD_S, Z
RBRA _DFB_DRAW, 1
_DFB_DO_MOD_S SUB @R0, R1
RBRA _DFB_DO_MOD_C, 1
; draw a Tetromino
_DFB_DRAW MOVE Tetromino_Bag, R2
ADD R1, R2
MOVE @R2, R8
MOVE -1, @R2
SUB 1, @R0
DECRB
RET
; ****************************************************************************
; COMPLETED_ROWS
; Handle completed rows: The current Tetromino_Y position is the starting
; point, from where overall 8 lines on the screen (4 Tetromino "pixels") are
; checked. Completed rows are marked within the list "CompletedRows".
; Then the completed rows are visualzed by a blinking "graphics effect",
; which blinks as often as lines were cleard.
; After that they are cleared with space characters and then the whole
; playfield is compressed accordingly.
; ****************************************************************************
COMPLETED_ROWS INCRB
MOVE R8, R0 ; save R8 .. R12
MOVE R9, R1
MOVE R10, R2
MOVE R11, R3
MOVE R12, R4
INCRB
MOVE VGA$CR_X, R0 ; screen memory access
MOVE VGA$CR_Y, R1
MOVE VGA$CHAR, R2
MOVE NumberOfCompl, R8 ; assume zero completed rows
MOVE 0, @R8
MOVE CompletedRows, R7 ; list with all compl. rows
; handle negative y values
MOVE 8, R4 ; R4: how many y-lines visible
MOVE Tetromino_Y, R3
MOVE @R3, R3 ; R3 = Tetromino Y start coord
CMP 0, R3 ; is it < 0?
RBRA _CRH_START, !V ; no: start
MOVE R3, R4 ; yes: how many lines visible?
ADD 8, R4 ; R4: how many y-lines visible
RBRA _CRH_RET, Z ; return, if no y-lines visib.
MOVE 0, R3 ; R3: assume 0 as start coord
; scan the environemnt of the recently dropped Tetromino
; by checking, if whole screen lines are "non-spaces"
; and if so, remember this line in @R7 (CompletedRows)
_CRH_START MOVE R3, R11 ; remember y-start coord
MOVE R4, R12 ; remember amount of visib. y
_CRH_NEXT_Y MOVE 0, @R7 ; asumme: row is not completed
MOVE Playfield_MY, R6 ; get maximum y-coord
CMP R3, @R6 ; current y > maximum y coord
RBRA _CRH_NEXT_LINE, V ; yes: skip line
MOVE R3, @R1 ; hw cursor y to the first row
MOVE PLAYFIELD_X, @R0 ; hw cursor x to the left
MOVE PLAYFIELD_W, R5 ; init column counter
_CRH_NEXT_X CMP 0x20, @R2 ; a single space is enough...
RBRA _CRH_NEXT_LINE, Z ; ...to detect non-completion
ADD 1, @R0 ; next x-coordinate
SUB 1, R5 ; dec width cnt, line done?
RBRA _CRH_NEXT_X, !Z ; loop if line is not done
MOVE 1, @R7 ; line fully scanned: complete
ADD 1, @R8 ; one more "blink"
_CRH_NEXT_LINE SUB 1, R4 ; one less line to check
RBRA _CRH_CHK_COMPL, Z ; all lines scanned, now check
ADD 1, R3 ; increase y counter
ADD 1, R7 ; next element in compl. list
RBRA _CRH_NEXT_Y, 1 ; scan next line
; blink completed lines
_CRH_CHK_COMPL CMP 0, @R8 ; any lines completed?
RBRA _CRH_RET, Z ; no: return
MOVE R11, R9 ; first scanned line on scrn
MOVE R12, R10 ; amount of lines to process
MOVE @R8, R3 ; amount of "blinks"
SHR 1, R3 ; 2 screen pixels = 1 real row
MOVE R3, R8 ; process cleared lines ...
RSUB HANDLE_STATS, 1 ; ... by updating all stats
_CRH_BLINK MOVE LN_COMPLETE, R8 ; completion character
RSUB PAINT_LN_COMPL, 1 ; paint it
MOVE 0, R8 ; no "multitasking" while...
RSUB SPEED_DELAY, 1 ; ...performing a delay
MOVE 0x20, R8 ; use the space character ...
RSUB PAINT_LN_COMPL, 1 ; to clear the compl. char
MOVE 0, R8 ; and again no "multitasking"
RSUB SPEED_DELAY, 1 ; while waiting
SUB 1, R3 ; done blinking?
RBRA _CRH_BLINK, !Z ; no: go on blinking
; let the playfield fall down to fill the cleared lines
MOVE R11, R3
MOVE R12, R5
CRH_PD_NEXT_Y MOVE Playfield_MY, R7
CMP R3, @R7 ; y > playfield size?
RBRA _CRH_RET, V ; yes: return
MOVE R3, @R1 ; hw cursor to y start line
MOVE PLAYFIELD_X, @R0 ; hw cursor to x start column
MOVE PLAYFIELD_W, R4 ; width of one column
CRH_PD_NEXT_X CMP 0x20, @R2 ; is there a space char?
RBRA _CRH_PD_NEXT_LN, !Z ; one non-space means: not clr
ADD 1, @R0 ; yes: next column
SUB 1, R4 ; column done?
RBRA CRH_PD_NEXT_X, !Z ; no: continue checking
MOVE R3, R8 ; line is cleared, so ...
RSUB PF_FALL_DN, 1 ; let the playfield fall down
MOVE 0, R8 ; no "multitasking"...
RSUB SPEED_DELAY, 1 ; ...while delaying
_CRH_PD_NEXT_LN ADD 1, R3 ; scan again: one line deeper
SUB 1, R5 ; whole Tetromino env. scanned
RBRA CRH_PD_NEXT_Y, !Z ; no: continue scanning
_CRH_RET DECRB
MOVE R0, R8 ; restore R8 .. R12
MOVE R1, R9
MOVE R2, R10
MOVE R3, R11
MOVE R4, R12
DECRB
RET
; ****************************************************************************
; PF_FALL_DN
; Let the whole playfield above line R8 let fall down into line R8.
; R8: the line that has been cleared and that should be filled now
; ****************************************************************************
PF_FALL_DN INCRB
MOVE VGA$CR_X, R0 ; screen memory access
MOVE VGA$CR_Y, R1
MOVE VGA$CHAR, R2
MOVE R8, @R1 ; hw y cursor to cleared ln
_PFFD_NY SUB 1, @R1 ; take the line above it
RBRA _PFFD_RET, N ; return, if out of bounds
MOVE PLAYFIELD_X, @R0 ; first column
MOVE PLAYFIELD_W, R4 ; amount of chars per column
_PFFD_NX MOVE @R2, R5 ; take one char above
ADD 1, @R1 ; go one line down
MOVE R5, @R2 ; copy the char from above
SUB 1, @R1 ; go up one line for next char
ADD 1, @R0 ; next x-position
SUB 1, R4 ; any column left?
RBRA _PFFD_NX, !Z ; yes: go on
RBRA _PFFD_NY, 1 ; no: next line
_PFFD_RET DECRB
RET
; ****************************************************************************
; PAINT_LN_COMPL
; Scans the list of completed lines in "CompletedRows" and paints all of
; these lines using the character submitted in R8 onto the screen.
; Note, that CompletedRows is always relative to the current Tetromino.
; R8: character to be painted
; R9: y-start position on screen (relative to the Tetromino)
; R10: amount of lines within the Tetromino to process
; ****************************************************************************
PAINT_LN_COMPL INCRB
MOVE VGA$CR_X, R0 ; screen memory access
MOVE VGA$CR_Y, R1
MOVE VGA$CHAR, R2
MOVE CompletedRows, R7 ; list with all compl. rows
MOVE R9, R3 ; first scanned line on scrn
MOVE R10, R4 ; amount of lines to process
MOVE Playfield_MY, R6 ; current y line larger ...
_PLN_NEXT_CLY CMP R3, @R6 ; ... than maximum y position?
RBRA _PLN_RET, V ; yes: return
CMP 1, @R7 ; current line completed?
RBRA _PLN_N_COMPL_NY, !Z ; no: next line
MOVE PLAYFIELD_W, R5 ; yes: init column counter
MOVE PLAYFIELD_X, @R0 ; hw cursor to start column
MOVE R3, @R1 ; hw cursor to correct y pos
_PLN_NEXT_CLC MOVE R8, @R2 ; paint completion char
ADD 1, @R0
SUB 1, R5
RBRA _PLN_NEXT_CLC, !Z
_PLN_N_COMPL_NY ADD 1, R3
ADD 1, R7
SUB 1, R4
RBRA _PLN_NEXT_CLY, !Z
_PLN_RET DECRB
RET
; ****************************************************************************
; DECIDE_MOVE
; Checks if a planned move in a certain direction (R8) is possible. It does
; so by checking, if for each pixel in the 8x8 Tetromino matrix there is
; room to move in the desired direction.
; R8: direction: 0 = down, 1 = left, 2 = right, 3 = actual pos. (rotation)
; R9: returns true (1) is the move is OK and false (0) if not
; ****************************************************************************
DECIDE_MOVE INCRB
MOVE 1, R9 ; assume return true
MOVE R8, R0 ; save R8, R10, R11, R12
MOVE R10, R1
MOVE R11, R2
MOVE R12, R3
INCRB
; R0: hw x-cursor
; R1: hw y-cursor
MOVE VGA$CR_X, R0
MOVE VGA$CR_Y, R1
; R3: lowest possible y-position
MOVE Playfield_MY, R3
MOVE @R3, R3
; Set up an x and y "checking" offset: this offset is added
; to the current Tetromino x|y position for checking if
; the playfield is free there. Obviously depends on R8
; R10: x-checking-offset
; R11: y-checking-offset
CMP 0, R8 ; look downwards?
RBRA _DM_N_DN, !Z ; no: continue to check
XOR R10, R10 ; yes: x-offset is 0 then...
MOVE 1, R11 ; ...and y-offset is 1
RBRA _DM_START, 1
_DM_N_DN CMP 1, R8 ; look left?
RBRA _DM_N_LT, !Z ; no: continue to check
MOVE -1, R10 ; yes: left means -1 as x-offs
XOR R11, R11 ; and 0 as y-offs
RBRA _DM_START, 1
_DM_N_LT CMP 2, R8 ; look right?
RBRA _DM_N_RT, !Z ; no: continue to check
MOVE 1, R10 ; yes: right means 1 as x-offs
XOR R11, R11 ; and 0 as y offs
RBRA _DM_START, 1
_DM_N_RT CMP 3, R8 ; look at the actual position?
RBRA _DM_RET, !Z ; no: illegal param. => return
XOR R10, R10 ; yes: x-offset is 0...
XOR R11, R11 ; ... and y-offset is 0
; set HW cursor to the y start pos of the Tetromino
; 8x8 matrix and apply the scanning offset
; R8 is needed as @R1 is not able to store negative values
; but as we slide in Tetrominos from negative y-positions, we
; need to be able to handle negative values
_DM_START MOVE Tetromino_Y, R6
MOVE @R6, R8
ADD R11, R8 ; apply the y scanning offset
MOVE R8, @R1 ; set HW cursor to Tetromini_Y
MOVE 0, R4 ; R4: line counter (y)
_DM_LOOP_Y MOVE R4, R5 ; R5: y offset = 8 x y
SHL 3, R5
MOVE Tetromino_X, R6 ; set hw cursor to x start...
MOVE @R6, @R0 ; ...pos of Tetromino 8x8...
ADD R10, @R0 ; matrix and aplly scan offs
MOVE 0, R6 ; R6: column counter (x)
_DM_LOOP_X MOVE RenderedTTR, R7 ; pointer to Tetromino pattern
ADD R6, R7 ; add x offset
ADD R5, R7 ; add y offset (R5 = 8 x R4)
; basic idea: is there a pixel within the Tetromino pattern?
; if yes, then first check, if we are still at negative y
; values (sliding in) or if we reached the bottom of the scrn
; and if both are false, then check, if below or right or
; left (depending on the initial R8 parameter) of the pixel
; there is an obstacle on the screen, that is not the
; own pixel of the Tetromino
CMP 0x20, @R7 ; empty "pixel" in Tetromino?
RBRA _DM_PX_FOUND, !Z ; no: there is a pixel
RBRA _DM_INCX, 1 ; yes: skip to next pixel
_DM_PX_FOUND CMP 0, R8 ; negative y scanning coord?
RBRA _DM_EMULATE_WL, V ; yes: emulate walls
CMP @R1, R3 ; maximum y-position reached?
RBRA _DM_OBSTACLE, V ; yes (@R1 > R3): return false
MOVE VGA$CHAR, R2 ; hw register for reading scrn
CMP 0x20, @R2 ; empty "pixel" on screen?
RBRA _DM_IS_IT_OWN, !Z ; no: check if it is an own px
RBRA _DM_INCX, 1 ; yes: go to next checking pos
; while we are at negative y-positions, we need to emulate the
; walls of the playfield, so that the player cannot trick the
; game and move Tetrominos "over" the walls using very fast
; actions (e.g. double-rotate a "L" and then move it to the
; left very rapidly: it would stick - or - just move a "Z"
; very rapidly to the left: it would stick, too)
_DM_EMULATE_WL MOVE PLAYFIELD_X, R2
SUB 1, R2
CMP R2, @R0 ; emulate left wall
RBRA _DM_IS_IT_OWN, Z
MOVE PLAYFIELD_X, R2
ADD PLAYFIELD_W, R2
CMP R2, @R0 ; emulate right wall
RBRA _DM_IS_IT_OWN, Z
RBRA _DM_INCX, 1
_DM_IS_IT_OWN MOVE R4, R12 ; current y position
ADD R11, R12 ; apply y scanning offset
CMP 0, R12 ; y negative out-of-bound?
RBRA _DM_INCX, V ; yes: skip to next pixel
CMP 8, R12 ; y positive out-of-bound?
RBRA _DM_OBSTACLE, Z ; yes: obstacle found
MOVE R6, R2 ; current x position
ADD R10, R2 ; apply x scanning offset
CMP 0, R2 ; x negative out-of-bound?
RBRA _DM_OBSTACLE, V ; yes: obstacle found
CMP 8, R2 ; x positive out-of-bound?
RBRA _DM_OBSTACLE, Z ; yes: obstacle found
SHL 3, R12 ; (R12 = y) x 8 (line offset)
ADD R2, R12 ; add (R2 = x)
ADD RenderedTTR, R12 ; completing the offset
CMP 0x20, @R12 ; Tetromino empty here?
RBRA _DM_OBSTACLE, Z ; then obstacle is found
; Arriving here means: No obstacle found in the classical
; movement situations, so we could jump to the next pixel
; by branching to _DM_INCX. But there is a special case:
; Rotation: if R10 == R11 == 0, then we have a rotation, and
; in this case, we want to know, if "under" the pixels of the
; potentially rotated Tetromino there are other pixels of
; other elements, because then the rotation is not allowed
; ("other elements" can also be the playfield borders)
CMP 0, R10 ; R10 == 0?
RBRA _DM_INCX, !Z ; no rotation, no obstacle
CMP 0, R11 ; R11 == 0?
RBRA _DM_INCX, !Z ; no rotation, no obstacle
RBRA _DM_OBSTACLE, 1 ; rotation: obstacle found
_DM_OBSTACLE MOVE 0, R9 ; obstacle detected ...
RBRA _DM_RET, 1 ; ... return false
_DM_INCX ADD 1, R6 ; next column...
ADD 1, @R0 ; ...ditto for hardware cursor
CMP 8, R6 ; line end reached?
RBRA _DM_LOOP_X, !Z ; no: go on
_DM_INCY ADD 1, R4 ; next line, ditto for the..
ADD 1, R8 ; ..hw crs buffer R8 and for..
MOVE R8, @R1 ; ..the hw cursor itself
CMP 8, R4 ; Tetromino end reached?
RBRA _DM_LOOP_Y, !Z ; no go on
_DM_RET DECRB ; restore R8, R10, R11, R12
MOVE R0, R8
MOVE R1, R10
MOVE R2, R11
MOVE R3, R12
DECRB
RET
; ****************************************************************************
; MULTITASK
; Perform tasks, that shall happen "all the time" in the "background", i.e.
; even when cycles are wasted.
; ****************************************************************************
MULTITASK INCRB
; inc the "random" number
MOVE PseudoRandom, R0
ADD 1, @R0
; check for key press and read key
MOVE IO$KBD_STATE, R0 ; check keyboard state reg.
MOVE KBD$NEW_ANY, R1
AND @R0, R1 ; any key pressed?
RBRA _MT_RET, Z ; no: return
; key pressed: inc "random" value and read key value
MOVE PseudoRandom, R0
ADD 1, @R0
MOVE IO$KBD_DATA, R0
MOVE @R0, R0
; save parameter registers
MOVE R8, R1
MOVE R9, R2
MOVE R10, R3
MOVE R11, R4
MOVE RenderedNumber, R5
MOVE @R5, R8
XOR R9, R9
XOR R10, R10
XOR R11, R11
; cursor left: move left
CMP KBD$CUR_LEFT, R0
RBRA _MT_N_LEFT, !Z
MOVE 1, R8
RSUB DECIDE_MOVE, 1 ; can we move left?
CMP 0, R9
RBRA _MT_RET_REST, Z ; no: return
MOVE @R5, R8 ; yes: restore R8 ...
MOVE -2, R9 ; ... and move left
RSUB UPDATE_TTR, 1
RBRA _MT_RET_REST, 1
; cursor right: move right
_MT_N_LEFT CMP KBD$CUR_RIGHT, R0
RBRA _MT_N_RIGHT, !Z
MOVE 2, R8
RSUB DECIDE_MOVE, 1 ; can we move right?
CMP 0, R9
RBRA _MT_RET_REST, Z ; no: return
MOVE @R5, R8 ; yes: restore R8 ...
MOVE 2, R9 ; ... and move right
RSUB UPDATE_TTR, 1
RBRA _MT_RET_REST, 1
; x: rotate left
_MT_N_RIGHT CMP 0x78, R0 ; "x" = ASCII 0x78
RBRA _MT_N_x, !Z
MOVE 1, R11
RSUB UPDATE_TTR, 1
RBRA _MT_RET_REST, 1
; c: rotate right
_MT_N_x CMP 0x63, R0 ; "c" = ASCII 0x63
RBRA _MT_N_c, !Z
MOVE 2, R11
RSUB UPDATE_TTR, 1
RBRA _MT_RET_REST, 1
; cursor down: move down one row
_MT_N_c CMP KBD$CUR_DOWN, R0
RBRA _MT_N_DOWN, !Z
XOR R8, R8
RSUB DECIDE_MOVE, 1 ; can we move down?
CMP 0, R9
RBRA _MT_RET_REST, Z ; no: return
MOVE @R5, R8 ; yes: restore R8
XOR R9, R9
MOVE 1, R10 ; move down
RSUB UPDATE_TTR, 1
RBRA _MT_RET_REST, 1
; cursor up: drop Tetromino as far as possible
_MT_N_DOWN CMP KBD$CUR_UP, R0
RBRA _MT_N_UP, !Z
MOVE Tetromino_Y, R11
MOVE @R11, R6 ; remember original y pos
XOR R10, R10 ; R10: line counter = 0
XOR R8, R8
_MT_DROP_DM RSUB DECIDE_MOVE, 1 ; can we move down one more ln
CMP 1, R9
RBRA _MT_DROP_CHK, !Z ; no: check how many we could
ADD 1, R10 ; yes: inc line counter
ADD 1, @R11 ; inc y pos: check a ln deeper
RBRA _MT_DROP_DM, 1
_MT_DROP_CHK MOVE R6, @R11 ; restore original y pos
CMP 0, R10 ; can we drop 1 or more lines?
RBRA _MT_RET_REST, Z ; no: return
MOVE @R5, R8 ; yes: restore Tetromino num.
XOR R9, R9 ; delta x = 0; dx still in R10
XOR R11, R11 ; no rotation
RSUB UPDATE_TTR, 1 ; drop by R10 lines
RBRA _MT_RET_REST, 1
; activate pause mode
_MT_N_UP CMP KBD$SPACE, R0
RBRA _MT_ELSE, !Z
MOVE Pause, R8
MOVE 1, @R8
RBRA _MT_RET_REST, 1
#ifdef QTRIS_STANDALONE
_MT_ELSE RBRA _MT_RET_REST, 1
#else
; CTRL+E or F12 exit
_MT_ELSE CMP KBD$CTRL_E, R0
RBRA EXIT, Z
CMP KBD$F12, R0
RBRA EXIT, Z
RBRA _MT_RET_REST, 1
#endif
; restore parameter registers
_MT_RET_REST MOVE R1, R8
MOVE R2, R9
MOVE R3, R10
MOVE R4, R11
_MT_RET DECRB
RET
; ****************************************************************************
; UPDATE_TTR
; Deletes the old Tetromino from the screen, re-renders it, if necessary
; due to a new Tetromino or due to rotation, updates the global coordinates
; and paints the new one.
; R8: new number of Tetromino
; R9: delta x
; R10: delta y
; R11: rotation
; ****************************************************************************
UPDATE_TTR INCRB
; save original values of the parameter registers
MOVE R8, R0
MOVE R9, R1
MOVE R10, R2
MOVE R11, R3
; delete old Tetromino
MOVE Tetromino_X, R4
MOVE @R4, R8
MOVE Tetromino_Y, R4
MOVE @R4, R9
MOVE 0, R10
RSUB PAINT_TTR, 1
; if the current Tetromino is a new one, the rotate x-pos
; compensation mechanism needs to be deactivated
MOVE RenderedNumber, R4
CMP NEW_TTR, @R4
RBRA _UTTR_IGN_OLD, Z ; new Tetromino
MOVE Tetromino_HV, R4 ; existing: is it currently
MOVE @R4, R5 ; horizontal or vertical
RBRA _UTTR_RENDER, 1
_UTTR_IGN_OLD MOVE 0, R5
; render new tetromino to render buffer
_UTTR_RENDER MOVE R0, R8
MOVE R3, R9
RSUB RENDER_TTR, 1
; if the Tetromino was rotated, we need to compensate
; the x-axis position to still make it fit into the grid
MOVE Tetromino_HV, R4 ; get new HV orientation
MOVE @R4, R4
CMP R4, R5
RBRA _UTTR_PAINT, Z ; orientation did not change
MOVE TTR_Rot_Xo, R6 ; look up compensation...
ADD R8, R6 ; ...per Tetromino
CMP 0, R5 ; if was horizontal before...
RBRA _UTTR_WAS_H, Z
ADD @R6, R1 ; ...then we need to add
RBRA _UTTR_PAINT, 1
_UTTR_WAS_H SUB @R6, R1 ; ...otherwise we need to sub
; paint new Tetromino
_UTTR_PAINT MOVE Tetromino_X, R4
ADD R1, @R4
MOVE @R4, R8
MOVE Tetromino_Y, R4
ADD R2, @R4
MOVE @R4, R9
MOVE 1, R10
RSUB PAINT_TTR, 1
; restore paramter registers
MOVE R0, R8
MOVE R1, R9
MOVE R2, R10
MOVE R3, R11
DECRB
RET
; ****************************************************************************
; PAINT_TTR
; Draws or clears the tetromino at the specified xy-pos respecting
; "transparency" which is defined as 0x20 ("space"). Negative y-positions
; are possible to allow the "slide-in" effect for each new Tetromino.
; Uses RenderedTTR as source.
; R8: x-pos
; R9: y-pos
; R10: 0 = clear, 1 = paint
; ****************************************************************************
PAINT_TTR INCRB
MOVE VGA$CR_X, R0 ; R0: hw cursor X
MOVE VGA$CR_Y, R1 ; R1: hw cursor Y
MOVE VGA$CHAR, R2 ; R2: print at hw cursor pos
MOVE R8, @R0 ; set hw x pos
MOVE RenderedTTR, R3 ; source memory location
MOVE 0, R5 ; R5: line counter
_PAINT_TTR_YL MOVE 8, R4 ; R4: column counter
MOVE R9, R7 ; is R9+R5 < 0, i.e. is the...
ADD R5, R7 ; y-pos negative?
CMP 0, R7
RBRA _PAINT_TTR_XL, !V ; no: go on painting
ADD 8, R3 ; yes: skip line
RBRA _PAINT_NEXT_LN, 1
_PAINT_TTR_XL CMP 0x20, @R3 ; transparent "pixel"?
RBRA _PAINT_TTR_SKIP, Z ; yes: skip painting
MOVE R7, @R1 ; set hw cursor y-pos
CMP 0, R10 ; no: check: clear or paint?
RBRA _PAINT_CLEAR, Z ; clear
MOVE @R3, @R2 ; paint
RBRA _PAINT_TTR_SKIP, 1
_PAINT_CLEAR MOVE 0x20, @R2 ; clear
_PAINT_TTR_SKIP ADD 1, R3 ; next source "pixel"
ADD 1, @R0 ; next screen x-pos
SUB 1, R4 ; column counter
RBRA _PAINT_TTR_XL, !Z ; column done? no: go on
_PAINT_NEXT_LN MOVE R8, @R0 ; yes: reset x-pos
ADD 1, R5 ; line counter to next line
CMP 8, R5 ; all lines done?
RBRA _PAINT_TTR_YL, !Z ; no: go on
DECRB
RET
; ****************************************************************************
; CLEAR_RBUF
; Clears a 8x8 render buffer by filling it with spaces (ASCII 0x20).
; R8: pointer to render buffer
; ****************************************************************************
CLEAR_RBUF INCRB
MOVE R8, R0 ; preserve R8s value
MOVE 64, R1 ; 8x8 matrix to be cleared
_CLEAR_RBUF_L MOVE 0x20, @R0++ ; clear current "pixel"
SUB 1, R1 ; next "pixel"
RBRA _CLEAR_RBUF_L, !Z ; done? no: go on
DECRB
RET
; ****************************************************************************
; RENDER_TTR
; Renders the Tetromino and rotates it, if specified by R9.
;
; Automatically remembers the last Tetromino and its position so that
; subsequent calls can be performed. The 8x8 buffer RenderedTTR contains
; the resulting pattern. RenderedTemp is used temporarily and RenderedNumber
; is used to remember, which tetromino has been rendered last time.
;
; Additionally, when rotating, the routine checks, if the resulting,
; rendered Tetromino is still "valid", i.e. not outside the boundaries
; and also not overlapping with any existing piece; otherwise the rotation
; command is ignored and the old pattern in copied back from RenderedTemp.
; For the outside caller to know, if the rotation was performed or ignored,
; Tetromino_HV can be checked.
;
; R8: number of tetromino between 0..<amount of Tetrominos>
; R9: rotation: 0 = do not rotate, 1 = rotate left, 2 = rotate right
; ****************************************************************************
RENDER_TTR INCRB
; if no rotation necessary, do not use RenderedTemp
; the pointer to the buffer to be used will
; be in R4 afterwards
CMP 0, R9 ; do not rotate?
RBRA _RTTR_ANY_ROT, !Z ; no, so do rotate
MOVE RenderedTTR, R4 ; yes, so do not rotate
RBRA _RTTR_CHK_AR, 1
_RTTR_ANY_ROT MOVE RenderedTemp, R4 ; do rotate, so use Temp
; check, if this tetromino has already been rendered before
; and if yes, skip the rendering process and go directly
; to the rotation part
_RTTR_CHK_AR MOVE RenderedNumber, R0 ; did we already render the...
CMP @R0, R8 ; ...currently requested piece
RBRA _RTTR_BCLR, !Z ; no: render it now
MOVE RenderedTTR, R0 ; yes: copy TTR to
MOVE RenderedTemp, R1 ; ...Temp because the...
MOVE 64, R3 ; ...rotation algorithm...
_RTTR_COPYLOOP MOVE @R0++, @R1++ ; ...needs it to be there...
SUB 1, R3
RBRA _RTTR_COPYLOOP, !Z
RBRA _RTTR_ROTATE, 1 ; ...and then directly rotate
; clear old renderings
_RTTR_BCLR MOVE R8, @R0 ; remember # in RenderedNumber
MOVE R4, R8 ; clear the correct buffer ...
RSUB CLEAR_RBUF, 1 ; ... as R4 contains the value
MOVE @R0, R8 ; restore R8
; all Tetrominos start horizontal
MOVE Tetromino_HV, R0
MOVE 0, @R0
; calculate start address of Tetromino pattern
; R0: contains the source memory location
MOVE Tetrominos, R0 ; start address of patterns
MOVE R8, R1 ; addr = (# x 8) + start
SHL 3, R1 ; SHL 3 means x 8
ADD R1, R0 ; R0: source memory location
; calculate the start address within the destination memory
; location and take the TTR_Offs table for centering the
; Tetrominos within the 8x8 matrix into consideration
; R1: contains the destination memory location
MOVE R4, R1 ; R1: destination mem. loc.
MOVE R8, R3 ; TTR_Offs = # x 2
SHL 1, R3
ADD TTR_Offs, R3
MOVE @R3++, R2 ; fetch x correction...
ADD R2, R1 ; and add it to the dest. mem.
MOVE @R3, R2 ; fetch y correction...
SHL 3, R2 ; multiply by 8 because ...
ADD R2, R1 ; ... of 8 chars per ln
; double the size of the Tetromino in x and y direction
; i.e. "each source pixel times 4"
; and render the Tetromino in neutral/up position
MOVE 2, R3 ; R3: source line counter
_RTTR_YL MOVE 4, R2 ; R2: source column counter
_RTTR_XL MOVE @R0, @R1++ ; source => dest x|y
MOVE @R0, @R1 ; source => dest x+1|y
ADD 7, R1
MOVE @R0, @R1++ ; source => dest x|y+1
MOVE @R0, @R1 ; source => dest x+1|y+1
SUB 7, R1 ; next dest coord = x+2|y
ADD 1, R0 ; inc x
SUB 1, R2 ; column done?
RBRA _RTTR_XL, !Z ; no: go on
ADD 8, R1 ; next dest coord = x|y+1
SUB 1, R3 ; row done?
RBRA _RTTR_YL, !Z ; no: go on
_RTTR_ROTATE CMP 0, R9 ; do not rotate?
RBRA _RTTR_END, Z ; yes, do not rotate: end
CMP 2, R9 ; rotate right?
RBRA _RTTR_RR, Z ; yes
; rotate left:
; walk through the source tile column by column starting from
; the rightmost column and ending at the leftmost column
; going through each column from top to bottom and copy
; the resulting bytes from left to right to the destination
MOVE RenderedTTR, R2 ; R2: dest.: rotated Tetromino
MOVE 7, R1 ; R1: source x
_RTTR_DYL MOVE RenderedTemp, R0 ; R0: source: raw Tetromino
ADD R1, R0 ; select right source column
XOR R3, R3 ; dest column counter
_RTTR_DXL MOVE @R0, @R2++ ; copy "pixel"
ADD 8, R0 ; next source line
ADD 1, R3 ; next dest column
CMP 8, R3 ; end of source line?
RBRA _RTTR_DXL, !Z
SUB 1, R1
RBRA _RTTR_DYL, !N ; < 0 means 8 cols are done
RBRA _RTTR_ROT_DONE, 1
; rotate right:
; walk through the source tile column by column starting from
; the leftmost column and ending at the rightmost column
; going through each column from bottom to top and copy
; the resulting bytes from left to right to the destination
_RTTR_RR MOVE RenderedTTR, R2 ; R2: dest.: rotated Tetromino
XOR R3, R3 ; R3: source column counter
_RTTR_RR_DYL MOVE RenderedTemp, R0 ; R0: source: raw Tetromino
ADD R3, R0 ; select right source column
ADD 56, R0 ; go to the last row
MOVE 8, R4 ; 8 "pixels" per row
_RTTR_RR_DXL MOVE @R0, @R2++ ; copy "pixel"
SUB 8, R0 ; go up one row
SUB 1, R4 ; all "pixels" copied in col.
RBRA _RTTR_RR_DXL, !Z ; no: go on
ADD 1, R3 ; yes: next col
CMP 8, R3 ; all cols copied?
RBRA _RTTR_RR_DYL, !Z ; no: go on
; after any rotation (left or right):
; check if the rotated Tetromino is still "valid", i.e. not
; outside the playfield and not obscuring existing "pixels"
_RTTR_ROT_DONE MOVE R8, R6 ; save R8 & R9
MOVE R9, R7
MOVE 3, R8 ; check, if the rotation...
RSUB DECIDE_MOVE, 1 ; ... is allowed
CMP 1, R9 ; rotation allowed?
RBRA _RTTR_END_ROTOK, Z ; yes: flip HV orientation
; in case of an invalid rotation: copy back the non-rotated
; Tetromino shape, to RenderedTTR and undo the rotation
MOVE RenderedTemp, R0
MOVE RenderedTTR, R1
MOVE 64, R3
MOVE 1, R4
_RTTR_COPYL2 MOVE @R0++, @R1++
SUB R4, R3
RBRA _RTTR_COPYL2, !Z
RBRA _RTTR_END_REST, 1
_RTTR_END_ROTOK MOVE Tetromino_HV, R0 ; each rotation flips...
XOR 1, @R0 ; ...the orientation
_RTTR_END_REST MOVE R6, R8 ; restore R8 & R9
MOVE R7, R9
_RTTR_END DECRB
RET
; ****************************************************************************
; PAINT_PLAYFIELD
; Paint the actual playfield including the logo.
; Registers are not preserved!
; ****************************************************************************
PAINT_PLAYFIELD INCRB
MOVE VGA$CR_X, R0 ; R0: hw cursor X
MOVE VGA$CR_Y, R1 ; R1: hw cursor Y
MOVE VGA$CHAR, R2 ; R2: print at hw cursor pos
MOVE WALL_L, R3 ; R3: left boundary char
MOVE WALL_R, R4 ; R4: right boundary char
MOVE PLAYFIELD_X, R5 ; R5: right boundary x-coord.
ADD PLAYFIELD_W, R5
MOVE PLAYFIELD_H, R6 ; R6: playfield height
MOVE PLAYFIELD_Y, @R1 ; hw cursor y = start y pos
_PPF_NEXT_LINE MOVE PLAYFIELD_X, @R0 ; hw cursor x = start x pos
SUB 1, @R0 ; PLAYFIELD_X is a net coord.
MOVE R3, @R2 ; print left boundary
MOVE R5, @R0 ; hw cursor to right x pos
MOVE R4, @R2 ; print right boundary
ADD 1, @R1 ; paint to next line
SUB 1, R6 ; one line done
RBRA _PPF_NEXT_LINE, !Z ; loop until all lines done
; print Q-TRIS logo
MOVE QTris, R8 ; pointer to pattern
MOVE QTRIS_X, R9 ; start x-pos on screen
MOVE QTRIS_Y, R10 ; start y-pos on screen
MOVE QTRIS_W, R11 ; width of pattern
MOVE QTRIS_H, R12 ; height of pattern
RSUB PRINT_PATTERN, 1
; print preview window
MOVE Preview_Win, R8
MOVE PREVIEW_X, R9
MOVE PREVIEW_Y, R10
MOVE PREVIEW_W, R11
MOVE PREVIEW_H, R12
RSUB PRINT_PATTERN, 1
; print credits and help text
MOVE CRE_A_HELP, R8
MOVE CAH_X, R9
MOVE CAH_Y, R10
MOVE CAH_W, R11
MOVE CAH_H, R12
RSUB PRINT_PATTERN, 1
; print stat labels
MOVE Stat_Score, R8
MOVE STSCORE_LX, R9
MOVE STSCORE_LY, R10
RSUB PRINT_STR_AT, 1
MOVE Stat_Level, R8
MOVE STLEVEL_LX, R9
MOVE STLEVEL_LY, R10
RSUB PRINT_STR_AT, 1
MOVE Stat_Lines, R8
MOVE STLINES_LX, R9
MOVE STLINES_LY, R10
RSUB PRINT_STR_AT, 1
MOVE Stat_Single, R8
MOVE STSINGLE_LX, R9
MOVE STSINGLE_LY, R10
RSUB PRINT_STR_AT, 1
MOVE Stat_Double, R8
MOVE STDOUBLE_LX, R9
MOVE STDOUBLE_LY, R10
RSUB PRINT_STR_AT, 1
MOVE Stat_Triple, R8
MOVE STTRIPLE_LX, R9
MOVE STTRIPLE_LY, R10
RSUB PRINT_STR_AT, 1
MOVE Stat_QTris, R8
MOVE STQTRIS_LX, R9
MOVE STQTRIS_LY, R10
RSUB PRINT_STR_AT, 1
DECRB
RET
; ****************************************************************************
; PRINT_PATTERN
; Prints a rectangular pattern consisting of zero terminated strings.
; R8: pointer to pattern
; R9: x-pos
; R10: y-pos
; R11: width
; R12: height
; ****************************************************************************
PRINT_PATTERN INCRB
MOVE R8, R0
MOVE R10, R1
MOVE R12, R2
_PP_NEXT_Y MOVE R11, R3
RSUB PRINT_STR_AT, 1
MOVE R3, R11
SUB 1, R2
RBRA _PP_RET, Z
ADD R11, R8
ADD 1, R8
ADD 1, R10
RBRA _PP_NEXT_Y, 1
_PP_RET MOVE R0, R8
MOVE R1, R10
DECRB
RET
; ****************************************************************************
; PRINT_STR_AT
; print a zero terminated string at x/y pos
; only one-liners are allowed
; R8: pointer to string
; R9/R10: x/y pos
; R11 (output): x-pos of last printed character plus one
; ****************************************************************************
PRINT_STR_AT INCRB
MOVE VGA$CR_Y, R0 ; set hw cursor to y-pos
MOVE R10, @R0
MOVE VGA$CR_X, R0
MOVE VGA$CHAR, R1
MOVE R8, R3
MOVE R9, R4
_PRINT_STR_LOOP MOVE R4, @R0 ; set x-pos
MOVE @R3, @R1 ; print character
RSUB WAIT_FOR_VGA, 1 ; VGA is slower than CPU
ADD 1, R3 ; next character in string
ADD 1, R4 ; increase x-pos on screen
CMP 0, @R3 ; string end?
RBRA _PRINT_STR_LOOP, !Z ; no: continue printing
MOVE R4, R11
DECRB
RET
; ****************************************************************************
; PAINT_STATS
; Prints/paints the statistics, such as score, level, lines and the stats
; about the lines themselves: single, double, triple, QTris (quadruple)
; ****************************************************************************
PAINT_STATS INCRB
; speed optimization: only when the level changes or the
; amount of completed line changes, this routine shall be
; executed
MOVE Level, R8
MOVE Level_Old, R9
CMP @R8, @R9
RBRA _P_STATS_START, !Z
MOVE Lines, R8
MOVE Lines_Old, R9
CMP @R8, @R9
RBRA _P_STATS_START, !Z
RBRA _P_STATS_RET, 1
; level
_P_STATS_START MOVE Level, R8
MOVE @R8, R8
MOVE GAME_WON, R9 ; non existing level number
SUB 1, R9 ; maximum existing level num.
CMP R8, R9 ; current level > max. lnum.?
RBRA _P_STATS_PL, !N
MOVE R9, R8 ; yes: set lnum. to max lnum.
_P_STATS_PL MOVE STLEVEL_X, R9 ; no: paint digit
MOVE STLEVEL_Y, R10
RSUB PAINT_DIGIT, 1 ; ASCII art painting
MOVE Level_Old, R9 ; remember that this level...
MOVE R8, @R9 ; ...has already been painted
MOVE Score, R8
MOVE @R8, R8
MOVE STSCORE_X, R9
MOVE STSCORE_Y, R10
RSUB PAINT_DECIMAL,1 ; ASCII art painting
; amount of completed lines incl. detailed stats
MOVE Lines, R8
MOVE @R8, R8
MOVE STLINES_X, R9
MOVE STLINES_Y, R10
RSUB PRINT_DECIMAL, 1
MOVE Lines_Old, R9 ; remember that this amount...
MOVE R8, @R9 ; of lines has been painted
MOVE Lines_Single, R8
MOVE @R8, R8
MOVE STSINGLE_X, R9
MOVE STSINGLE_Y, R10
RSUB PRINT_DECIMAL, 1
MOVE Lines_Double, R8
MOVE @R8, R8
MOVE STDOUBLE_X, R9
MOVE STDOUBLE_Y, R10
RSUB PRINT_DECIMAL, 1
MOVE Lines_Triple, R8
MOVE @R8, R8
MOVE STTRIPLE_X, R9
MOVE STTRIPLE_Y, R10
RSUB PRINT_DECIMAL, 1
MOVE Lines_QTris, R8
MOVE @R8, R8
MOVE STQTRIS_X, R9
MOVE STQTRIS_Y, R10
RSUB PRINT_DECIMAL, 1
_P_STATS_RET DECRB
RET
; ****************************************************************************
; PAINT_DECIMAL
; Paints a 16-bit decimal number (max 5 digits) using the ASCII art font
; "Digits" in a left-aligned way. No trailing zeros.
; R8: decimal number
; R9: x coordinate
; R10: y coordinate
; ****************************************************************************
PAINT_DECIMAL INCRB
MOVE R8, R0 ; save R8 .. R10
MOVE R9, R1
MOVE R10, R2
INCRB
MOVE R9, R1
; decimal conversion
MOVE _PD_DECIMAL, R9 ; result array
RSUB MAKE_DECIMAL, 1 ; R9 now contains R8s digits
; remove trailing zeros
MOVE 5, R0 ; how many digits to paint?
_PAINT_D_RTZ CMP 0, @R9 ; current digit zero?
RBRA _PAINT_D_NTZ, !Z ; no: trailing zeros removed
CMP 1, R0 ; special case: R8 = 0
RBRA _PAINT_D_NTZ, Z ; paint the 0
ADD 1, R9 ; skip this 0
SUB 1, R0 ; one less digit to be painted
RBRA _PAINT_D_RTZ, 1
_PAINT_D_NTZ MOVE R9, R2 ; save pointer to R8s digits
MOVE R1, R9 ; restore x-coordinate
_PAINT_D_LOOP MOVE @R2, R8 ; dereference pointer
RSUB PAINT_DIGIT, 1 ; ASCII art paiting
ADD DIGITS_DX, R9 ; x-coord: skip to end of char
ADD DIGITS_XSP, R9 ; space between chars
ADD 1, R2 ; increase pointer, next digit
SUB 1, R0 ; any digits left?
RBRA _PAINT_D_LOOP, !Z ; yes: loop, next digit
DECRB
MOVE R0, R8 ; restore R8 .. R10
MOVE R1, R9
MOVE R2, R10
DECRB
RET
; ****************************************************************************
; PRINT_DECIMAL
; Prints a 16-bit decimal number (max 5 digits) in a right-aligned way.
; No trailing zeros.
; R8: decimal number
; R9: x coordinate (of leftmost digit), due to right-alignment, the real
; coord. of the first printed digit might deviate
; R10: y coordinate
; ****************************************************************************
PRINT_DECIMAL INCRB
MOVE R8, R0 ; save R8 .. R11
MOVE R9, R1
MOVE R10, R2
MOVE R11, R3
INCRB
MOVE _PD_DECIMAL, R9 ; result array
RSUB MAKE_DECIMAL, 1 ; R9 now contains R8s digits
MOVE _PD_DEC_STR_BUF, R1 ; zero terminated string buf.
; ASCII converson of digits
MOVE 5, R2 ; five digits hardcoded
_PD_ASCII_CNV MOVE @R9++, @R1 ; ASCII conversion of digits:
ADD 0x30, @R1++ ; add ASCII code of "0"
SUB 1, R2
RBRA _PD_ASCII_CNV, !Z
; remove leading zeros
MOVE 5, R2
MOVE _PD_DEC_STR_BUF, R1
_PD_RM_LEAD_0s CMP 0x30, @R1
RBRA _PD_PRINT, !Z
SUB 1, R2
RBRA _PD_PRINT, Z
MOVE 0x20, @R1++
RBRA _PD_RM_LEAD_0s, 1
; print string
_PD_PRINT MOVE _PD_DEC_STR_BUF, R8 ; str. buffer to be printed
DECRB
MOVE R1, R9 ; x coord (restore R9)
MOVE R2, R10 ; y coord (restore R10)
INCRB
RSUB PRINT_STR_AT, 1 ; print
DECRB
MOVE R0, R8 ; only R8 & R11 need to be
MOVE R3, R11 ; restored (R9, R10 above)
DECRB
RET
; ****************************************************************************
; PAINT_DIGIT
; Paints a decimal digit using the ASCII art font "Digits".
; R8: digit to print
; R9: x coordinate
; R10: y coordinate
; ****************************************************************************
PAINT_DIGIT INCRB
MOVE R8, R0 ; save R8 .. R10
MOVE R9, R1
MOVE R10, R2
MOVE R11, R3
MOVE R12, R4
INCRB
MOVE DIGITS_WPD, R9 ; calculate offset for digit
RSUB MUL, 1 ; pattern: R8 x DIGITS_WPD
MOVE Digits, R8 ; apply offset
ADD R10, R8
DECRB
MOVE R1, R9 ; x-pos
MOVE R2, R10 ; y-pos
INCRB
MOVE DIGITS_DX, R11 ; width
MOVE DIGITS_DY, R12 ; height
RSUB PRINT_PATTERN, 1 ; paint digit
DECRB
MOVE R0, R8 ; restore R8 .. R10
MOVE R1, R9
MOVE R2, R10
MOVE R3, R11
MOVE R4, R12
DECRB
RET
; ****************************************************************************
; WAIT_FOR_VGA
; VGA is much slower than CPU, so for example between
; drawing multiple characters, CPU needs to wait until
; the drawing of the old character finished
; ****************************************************************************
WAIT_FOR_VGA INCRB
MOVE VGA$STATE, R0
_WAIT_FOR_VGAL MOVE @R0, R1
AND VGA$BUSY, R1
RBRA _WAIT_FOR_VGAL, !Z
DECRB
RET
; ****************************************************************************
; SPEED_DELAY
; Wastes (a x b) iterations whereas a and b are determined by the level
; speed table (Level_Speed) and the current game level (Level).
; While wasting cycles, SPEED_DELAY can perform the "background tasks",
; that are defined in MULTITASK.
; In mode R8 = 0, the delay of the second multiplier is doubled for
; compensating the missing delay of the multitasking.
; R8: 0 = no background tasks (MULTITASK); 1 = perform MULTITASK
; ****************************************************************************
SPEED_DELAY INCRB
; retrieve the two multipliers and store them to R0 and R1
MOVE Level, R7
MOVE @R7, R0
SUB 1, R0 ; level counting starts with 1
SHL 1, R0 ; 2 words per table entry
MOVE Level_Speed, R7
ADD R0, R7 ; select table row
MOVE @R7++, R0 ; R0 contains first multiplier
MOVE @R7, R1 ; R1 contains second mult.
CMP 1, R8 ; in R8 = 1 mode ...
RBRA _SPEED_DELAY_SS, Z ; ... skip the doubling
SHL 1, R1 ; double the second multiplier
_SPEED_DELAY_SS MOVE R1, R2 ; remeber R1
MOVE 1, R3 ; for more precise counting
; waste cycles but continue to multitask while waiting
_SPEED_DELAY_L CMP 0, R8 ; multitasking?
RBRA _SPEED_DELAY_SM, Z ; no: skip it
RSUB MULTITASK, 1
_SPEED_DELAY_SM SUB R3, R1
RBRA _SPEED_DELAY_L, !Z
MOVE R2, R1
SUB R3, R0
RBRA _SPEED_DELAY_L, !Z
DECRB
RET
; ****************************************************************************
; MAKE_DECIMAL
; 16-bit decimal converter: Input a 16-bit number and receive a 5-element
; list of digits between 0 and 9. Highest decimal at the lowest
; memory address, unused leading decimals are filled with zero.
; No overflow or sanity checks are performed.
; performed.
; R8: 16-bit number
; R9: pointer to the 5-word list that will contain the decimal digits
; ****************************************************************************
MAKE_DECIMAL INCRB
MOVE R8, R6 ; preserve R8 & R9
MOVE R9, R7
MOVE 10, R4 ; R4 = 10
XOR R5, R5 ; R5 = 0
MOVE R9, R0 ; R0: points to result list
ADD 5, R0 ; lowest digit at end of list
_MD_LOOP MOVE R4, R9 ; divide by 10
RSUB DIV_AND_MODULO, 1 ; R8 = "shrinked" dividend
MOVE R9, @--R0 ; extract current digit place
CMP R5, R8 ; done?
RBRA _MD_LOOP, !Z ; no: next iteration
_MD_LEADING_0 CMP R7, R0 ; enough leading "0" there?
RBRA _MD_RET, Z ; yes: return
MOVE 0, @--R0 ; no: add a "0" digit
RBRA _MD_LEADING_0, 1
_MD_RET MOVE R6, R8 ; restore R8 & R9
MOVE R7, R9
DECRB
RET
; ****************************************************************************
; DIV_AND_MODULO
; 16-bit integer division including modulo.
; Ignores the sign of the dividend and the divisor.
; Division by zero yields to an endless loop.
; Input:
; R8: Dividend
; R9: Divisor
; Output:
; R8: Integer quotient
; R9: Modulo
; ****************************************************************************
DIV_AND_MODULO INCRB
XOR R0, R0 ; R0 = 0
CMP R0, R8 ; 0 divided by x = 0 ...
RBRA _DAM_START, !Z
MOVE R0, R9 ; ... and the modulo is 0, too
RBRA _DAM_RET, 1
_DAM_START MOVE R9, R1 ; R1: divisor
MOVE R8, R9 ; R9: modulo
MOVE 1, R2 ; R2 is 1 for speeding up
XOR R8, R8 ; R8: resulting int quotient
_DAM_LOOP ADD R2, R8 ; calculate quotient
SUB R1, R9 ; division by repeated sub.
RBRA _DAM_COR_OFS, V ; wrap around: correct offset
CMP R0, R9
RBRA _DAM_RET, Z ; zero: done and return
RBRA _DAM_LOOP, 1
; correct the values, as we did add 1 one time too much to the
; quotient and subtracted the divisor one time too much from
; the modulo for the sake of having a maxium tight inner loop
_DAM_COR_OFS SUB R2, R8
ADD R1, R9
_DAM_RET DECRB
RET
; ****************************************************************************
; MUL
; 16-bit integer multiplication, that only calculates the low-word of the
; multiplication, i.e. (factor 1 x factor 2) needs to be smaller than
; 65535, otherwise the result wraps around. The factors as well as the
; result are treated as unsigned.
; Input:
; R8: factor 1
; R9: factor 2
; Output:
; R10: low word of (factor 1 x factor 2)
; ****************************************************************************
MUL INCRB
XOR R10, R10 ; result = 0
CMP R10, R8 ; if factor 1 = 0 ...
RBRA _MUL_RET, Z ; ... then the result is 0
MOVE R8, R0 ; counter for repeated adding
MOVE 1, R1 ; R1 = 1
XOR R2, R2 ; R2 = 0
_MUL_LOOP ADD R9, R10 ; multiply by rep. additions
SUB R1, R0 ; are we done?
RBRA _MUL_COR_OFS, V ; yes due to overflow: return
CMP R2, R0 ; are we done?
RBRA _MUL_RET, Z ; yes due to counter = 0
RBRA _MUL_LOOP, 1
_MUL_COR_OFS SUB R9, R10 ; we added one time too often
_MUL_RET DECRB
RET
; ****************************************************************************
; CLR_SCR
; Clear the screen
; ****************************************************************************
CLR_SCR INCRB
MOVE VGA$STATE, R0
OR VGA$CLR_SCRN, @R0
RSUB WAIT_FOR_VGA, 1
DECRB
RET
; ****************************************************************************
; CLR_RECT
; Clears the specified rectangle by printing spaces (0x20).
; Minimum width/height is 1. No sanity checks are performed.
; R8|R9: x|y start coordinates
; R10|R11: width, height
; ****************************************************************************
CLR_RECT INCRB
MOVE VGA$CR_X, R0 ; VGA register access
MOVE VGA$CR_Y, R1
MOVE VGA$CHAR, R2
MOVE 1, R3 ; increase performance
MOVE 0x20, R4 ; ASCII 0x20 = space
MOVE R10, R5 ; calculate end coordinates
ADD R8, R5 ; R5: x end coordinate
MOVE R11, R6
ADD R9, R6 ; R6: y end coordinate
MOVE R9, @R1 ; set y hw cursor to y
_CLR_RECT_YL MOVE R8, @R0 ; set x hw cursor to x
_CLR_RECT_XL MOVE R4, @R2 ; clear position
ADD R3, @R0 ; next x
CMP R5, @R0 ; x end coordinate reached?
RBRA _CLR_RECT_XL, !Z ; no: continue looping x
ADD R3, @R1 ; next y
CMP R6, @R1 ; y end coordinate reached?
RBRA _CLR_RECT_YL, !Z ; no: conitnue looping y
DECRB
RET
; ****************************************************************************
; INIT_SCREENHW
; Clear the screen and do not display the hardware cursor
; ****************************************************************************
INIT_SCREENHW INCRB
MOVE VGA$STATE, R0
#ifdef QTRIS_STANDALONE
MOVE 0x00E0, @R0 ; enable everything
OR VGA$COLOR_GREEN, @R0 ; Set font color to green
#endif
RSUB CLR_SCR, 1
NOT VGA$EN_HW_CURSOR, R1 ; no blinking hw cursor
AND @R0, R1
MOVE R1, @R0
DECRB
RET
; ****************************************************************************
; INIT_GLOBALS
; Initialize global variables at startup.
; ****************************************************************************
INIT_GLOBALS INCRB
MOVE PseudoRandom, R0 ; Init PseudoRandom to 0
MOVE 0, @R0
MOVE Playfield_MY, R0 ; maximum playfield y pos
MOVE PLAYFIELD_Y, @R0
ADD PLAYFIELD_H, @R0
SUB 1, @R0
MOVE Pause, R0 ; first game starts paused
MOVE 1, @R0
RSUB RESTART_GAME, 1 ; init game dependent vars.
DECRB
RET
; ****************************************************************************
; RESTART_GAME
; Reset all global variables, that are needed from game to game.
; ****************************************************************************
RESTART_GAME INCRB
MOVE RenderedNumber, R0 ; make sure, that very first..
MOVE NEW_TTR, @R0 ; ..Tetromino is rendered
MOVE Level, R0 ; start with Level 1
MOVE 1, @R0
MOVE Level_Old, R0
MOVE 0, @R0
MOVE Tetromino_BFill, R0 ; bag is empty
MOVE 0, @R0
MOVE Score, R0 ; initialize stats
MOVE 0, @R0
MOVE Lines, R0
MOVE 0, @R0
MOVE Lines_Old, R0
MOVE -1, @R0
MOVE Lines_Single, R0
MOVE 0, @R0
MOVE Lines_Double, R0
MOVE 0, @R0
MOVE Lines_Triple, R0
MOVE 0, @R0
MOVE Lines_QTris, R0
MOVE 0, @R0
DECRB
RET
; ****************************************************************************
; LOCAL VARIABLES
; ****************************************************************************
#ifdef QTRIS_STANDALONE
.ORG 0x8000 ; ensure variables are in RAM
#endif
; PRINT_DECIMAL
_PD_DECIMAL .BLOCK 5 ; array that stores the digits
_PD_DEC_STR_BUF .BLOCK 5 ; zero terminated string buffer
.DW 0
; ****************************************************************************
; GLOBAL VARIABLES
; ****************************************************************************
RenderedNumber .BLOCK 1 ; Number of last Tetromino that was rendered
RenderedTTR .BLOCK 64 ; Tetromino rendered in the correct angle
RenderedTemp .BLOCK 64 ; Tetromino rendered in neutral position
Score .BLOCK 1 ; Score of the player in current game
Level .BLOCK 1 ; Current level (determines speed and score)
Level_Old .BLOCK 1 ; Speed optimization when painting stats
Lines .BLOCK 1 ; Amount of completed lines in current game:
Lines_Old .BLOCK 1 ; Speed optimization when painting stats
Lines_Single .BLOCK 1 ; ... cleared as single
Lines_Double .BLOCK 1 ; ... cleared as double (needs to follow Single)
Lines_Triple .BLOCK 1 ; ... cleared as triples (needs to follow Double)
Lines_QTris .BLOCK 1 ; ... cleared as quadruples aka Q-Tris (fllw Trpl)
PseudoRandom .BLOCK 1 ; Pseudo random number is just a fast counter
Pause .BLOCK 1 ; Game currently paused?
Playfield_MY .BLOCK 1 ; Maximum Y-Coord = PLAYFIELD_Y + PLAYFIELD_H - 1
Tetromino_X .BLOCK 1 ; x-pos of current Tetromino on screen
Tetromino_Y .BLOCK 1 ; y-pos of current Tetromino on screen
Tetromino_HV .BLOCK 1 ; Tetromino currently horiz. (0) or vert. (1)
Tetromino_Bag .BLOCK 7 ; Bag for the Random Generator
Tetromino_BFill .BLOCK 1 ; How many Tetrominos are in the bag?
CompletedRows .BLOCK 8 ; List that stores completed rows
NumberOfCompl .BLOCK 1 ; Amount of completed rows (equals blink amount)
| 43.519706
| 93
| 0.422861
|
f2d918e7ade72cc10c5d101663500a1480ced9b6
| 513
|
asm
|
Assembly
|
programs/oeis/054/A054088.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/054/A054088.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/054/A054088.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
; A054088: a(n) = A054086(3n); also a bisection of A003511.
; 2,5,8,10,13,16,19,21,24,27,30,32,35,38,40,43,46,49,51,54,57,60,62,65,68,71,73,76,79,81,84,87,90,92,95,98,101,103,106,109,112,114,117,120,122,125,128,131,133,136,139,142,144,147,150
mov $3,$0
add $0,4
mul $0,2
mov $5,$0
mov $6,$0
add $6,4
add $5,$6
mov $0,$5
lpb $0,1
sub $0,14
trn $0,1
sub $6,1
mov $2,$6
add $2,4
sub $6,1
mov $4,$6
sub $4,5
mov $1,$4
mov $6,$2
sub $6,4
lpe
sub $1,3
lpb $3,1
add $1,1
sub $3,1
lpe
add $1,1
| 16.548387
| 182
| 0.582846
|
9767e3f11eca80d47f564f7651b376716884a566
| 663
|
asm
|
Assembly
|
libsrc/_DEVELOPMENT/adt/w_array/z80/asm_w_array_empty.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 640
|
2017-01-14T23:33:45.000Z
|
2022-03-30T11:28:42.000Z
|
libsrc/_DEVELOPMENT/adt/w_array/z80/asm_w_array_empty.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 1,600
|
2017-01-15T16:12:02.000Z
|
2022-03-31T12:11:12.000Z
|
libsrc/_DEVELOPMENT/adt/w_array/z80/asm_w_array_empty.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 215
|
2017-01-17T10:43:03.000Z
|
2022-03-23T17:25:02.000Z
|
; ===============================================================
; Mar 2014
; ===============================================================
;
; int w_array_empty(w_array_t *a)
;
; Return non-zero if the array is empty.
;
; ===============================================================
SECTION code_clib
SECTION code_adt_w_array
PUBLIC asm_w_array_empty
EXTERN l_testword_hl
defc asm_w_array_empty = l_testword_hl - 2
; enter : hl = array *
;
; exit : if array is empty
;
; hl = 1
; z flag set
;
; if array is not empty
;
; hl = 0
; nz flag set
;
; uses : af, hl
| 19.5
| 65
| 0.387632
|
4b7e44629347facb8788aff2652999ff13082a5a
| 300
|
asm
|
Assembly
|
libsrc/_DEVELOPMENT/arch/zx/esxdos/c/sccz80/esxdos_m_gethandle.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 640
|
2017-01-14T23:33:45.000Z
|
2022-03-30T11:28:42.000Z
|
libsrc/_DEVELOPMENT/arch/zx/esxdos/c/sccz80/esxdos_m_gethandle.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 1,600
|
2017-01-15T16:12:02.000Z
|
2022-03-31T12:11:12.000Z
|
libsrc/_DEVELOPMENT/arch/zx/esxdos/c/sccz80/esxdos_m_gethandle.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 215
|
2017-01-17T10:43:03.000Z
|
2022-03-23T17:25:02.000Z
|
; uchar esxdos_m_gethandle(void)
SECTION code_clib
SECTION code_esxdos
PUBLIC esxdos_m_gethandle
EXTERN asm_esxdos_m_gethandle
defc esxdos_m_gethandle = asm_esxdos_m_gethandle
; SDCC bridge for Classic
IF __CLASSIC
PUBLIC _esxdos_m_gethandle
defc _esxdos_m_gethandle = esxdos_m_gethandle
ENDIF
| 16.666667
| 48
| 0.863333
|
1e4c6001398fe48109a34472d7769e2b61d69738
| 1,241
|
asm
|
Assembly
|
1file.asm
|
kgonzalez712/CE4301-PI
|
9e4ab2bebd21d323ad5643fd9266dcc94e8956f4
|
[
"MIT"
] | null | null | null |
1file.asm
|
kgonzalez712/CE4301-PI
|
9e4ab2bebd21d323ad5643fd9266dcc94e8956f4
|
[
"MIT"
] | null | null | null |
1file.asm
|
kgonzalez712/CE4301-PI
|
9e4ab2bebd21d323ad5643fd9266dcc94e8956f4
|
[
"MIT"
] | null | null | null |
END equ 250
;THIS FILE creates a 250x250 file filled with 1s
section .text
global _start ;must be declared for using gcc
_start: ;tell linker entry point
;create the file
mov eax, 8
mov ebx, file_out
mov ecx, 0777 ;read, write and execute by all
mov edx,2
int 0x80 ;call kernel
mov [fd_out], eax
mov r9,1
_comp:
cmp r9,END
jle _loop
jmp _done
_loop:
; write into the file
mov edx,len ;number of bytes
mov ecx, msg ;message to write
mov ebx, [fd_out] ;file descriptor
mov eax,4 ;system call number (sys_write)
int 0x80 ;call kernel
inc r9
jmp _comp
_done:
; close the file
mov eax, 6
mov ebx, [fd_out]
mov eax,1 ;system call number (sys_exit)
int 0x80 ;call kernel
section .data
msg db '111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111',0x0a
len equ $-msg
file_out db 'output.txt'
section .bss
fd_out resb 2
| 25.326531
| 263
| 0.65834
|
7ab4c95db21474761b494f62106fa60ab759a24e
| 2,118
|
asm
|
Assembly
|
tools/win32/prepsrc.asm
|
scientech-com-ua/case
|
04fcd96f47d8dc4dcb25c301bc461a5ae0b1df01
|
[
"BSD-2-Clause"
] | 17
|
2015-03-02T14:27:44.000Z
|
2021-04-19T18:52:18.000Z
|
tools/win32/prepsrc.asm
|
scientech-com-ua/case
|
04fcd96f47d8dc4dcb25c301bc461a5ae0b1df01
|
[
"BSD-2-Clause"
] | 1
|
2020-06-13T19:39:50.000Z
|
2020-06-13T20:25:59.000Z
|
tools/win32/prepsrc.asm
|
scientech-com-ua/case
|
04fcd96f47d8dc4dcb25c301bc461a5ae0b1df01
|
[
"BSD-2-Clause"
] | 2
|
2016-06-13T21:48:10.000Z
|
2021-05-15T07:48:24.000Z
|
format PE console 4.0
entry start
include 'win32a.inc'
section '.data' data readable writeable
_usage db 'preprocessed source dumper for flat assembler',0Dh,0Ah
db 'usage: prepsrc <input> <output>',0Dh,0Ah
db 0
_error_prefix db 'error: ',0
_error_suffix db '.',0Dh,0Ah,0
input_file dd 0
output_file dd 0
display_handle dd ?
bytes_count dd ?
params rb 1000h
section '.text' code readable executable
start:
mov [display_handle],STD_OUTPUT_HANDLE
call get_params
jnc make_dump
mov esi,_usage
call display_string
invoke ExitProcess,2
make_dump:
call preprocessed_source
invoke ExitProcess,0
error:
mov [display_handle],STD_ERROR_HANDLE
mov esi,_error_prefix
call display_string
pop esi
call display_string
mov esi,_error_suffix
call display_string
invoke ExitProcess,1
get_params:
invoke GetCommandLine
mov esi,eax
mov edi,params
find_command_start:
lodsb
cmp al,20h
je find_command_start
cmp al,22h
je skip_quoted_name
skip_name:
lodsb
cmp al,20h
je find_param
or al,al
jz all_params
jmp skip_name
skip_quoted_name:
lodsb
cmp al,22h
je find_param
or al,al
jz all_params
jmp skip_quoted_name
find_param:
lodsb
cmp al,20h
je find_param
cmp al,0Dh
je all_params
or al,al
jz all_params
cmp [input_file],0
jne get_output_file
mov [input_file],edi
jmp process_param
get_output_file:
cmp [output_file],0
jne bad_params
mov [output_file],edi
process_param:
cmp al,22h
je string_param
copy_param:
stosb
lodsb
cmp al,20h
je param_end
cmp al,0Dh
je param_end
or al,al
jz param_end
jmp copy_param
string_param:
lodsb
cmp al,22h
je string_param_end
cmp al,0Dh
je param_end
or al,al
jz param_end
stosb
jmp string_param
bad_params:
stc
ret
param_end:
dec esi
string_param_end:
xor al,al
stosb
jmp find_param
all_params:
cmp [input_file],0
je bad_params
cmp [output_file],0
je bad_params
clc
ret
include 'system.inc'
include '..\prepsrc.inc'
section '.idata' import data readable writeable
library kernel32,'KERNEL32.DLL'
include 'api\kernel32.inc'
| 15.23741
| 67
| 0.743154
|
0a45a81fe1682f74e5ac9f4a2a14b6faaa0e7299
| 775
|
asm
|
Assembly
|
sumGivenNumbers.asm
|
ARBII-xD/AssemblyCodes
|
c06b6de70da0d7be48ab0f404ffbfc889db6e43d
|
[
"MIT"
] | null | null | null |
sumGivenNumbers.asm
|
ARBII-xD/AssemblyCodes
|
c06b6de70da0d7be48ab0f404ffbfc889db6e43d
|
[
"MIT"
] | null | null | null |
sumGivenNumbers.asm
|
ARBII-xD/AssemblyCodes
|
c06b6de70da0d7be48ab0f404ffbfc889db6e43d
|
[
"MIT"
] | null | null | null |
.data
msg1: .asciiz "ENTER THE INTEGER: "
.text
.globl main
.ent main
main:
li $v0,4 #preparing msg1 for display
la $a0,msg1
syscall
li $v0,5 #taking input from user and stored to $v0
syscall
move $t1,$v0 #move input value to the $t1 register
addi $16,$s0,0 #initializing the loop variable in $16 register
LOOP:
slt $8,$16,$t1 #compare the loop variable to the user's input
beq $8,0,Exit #if loop variable reaches the user's input, the loop will break
add $t2,$t2,$16 # $t2 = $t2 + $16
addi $16,$16,1 # $16 +=1
j LOOP
Exit: add $t2,$t2,$16 #final summed value is on $t2
li $v0,4
la $a0,msg1 #Display the output
syscall
li $v0,1
move $a0,$t2
syscall
jr $ra
.end main
| 19.871795
| 82
| 0.602581
|
bf60577ae6a5b66bb70995361081ef1fd7243999
| 2,301
|
asm
|
Assembly
|
programs/oeis/299/A299288.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/299/A299288.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/299/A299288.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
; A299288: Partial sums of A299287.
; 1,11,44,116,242,438,719,1101,1599,2229,3006,3946,5064,6376,7897,9643,11629,13871,16384,19184,22286,25706,29459,33561,38027,42873,48114,53766,59844,66364,73341,80791,88729,97171,106132,115628,125674,136286,147479,159269,171671,184701,198374,212706,227712,243408,259809,276931,294789,313399,332776,352936,373894,395666,418267,441713,466019,491201,517274,544254,572156,600996,630789,661551,693297,726043,759804,794596,830434,867334,905311,944381,984559,1025861,1068302,1111898,1156664,1202616,1249769,1298139,1347741,1398591,1450704,1504096,1558782,1614778,1672099,1730761,1790779,1852169,1914946,1979126,2044724,2111756,2180237,2250183,2321609,2394531,2468964,2544924,2622426,2701486,2782119,2864341,2948167,3033613,3120694,3209426,3299824,3391904,3485681,3581171,3678389,3777351,3878072,3980568,4084854,4190946,4298859,4408609,4520211,4633681,4749034,4866286,4985452,5106548,5229589,5354591,5481569,5610539,5741516,5874516,6009554,6146646,6285807,6427053,6570399,6715861,6863454,7013194,7165096,7319176,7475449,7633931,7794637,7957583,8122784,8290256,8460014,8632074,8806451,8983161,9162219,9343641,9527442,9713638,9902244,10093276,10286749,10482679,10681081,10881971,11085364,11291276,11499722,11710718,11924279,12140421,12359159,12580509,12804486,13031106,13260384,13492336,13726977,13964323,14204389,14447191,14692744,14941064,15192166,15446066,15702779,15962321,16224707,16489953,16758074,17029086,17303004,17579844,17859621,18142351,18428049,18716731,19008412,19303108,19600834,19901606,20205439,20512349,20822351,21135461,21451694,21771066,22093592,22419288,22748169,23080251,23415549,23754079,24095856,24440896,24789214,25140826,25495747,25853993,26215579,26580521,26948834,27320534,27695636,28074156,28456109,28841511,29230377,29622723,30018564,30417916,30820794,31227214,31637191,32050741,32467879,32888621,33312982,33740978,34172624,34607936,35046929,35489619,35936021,36386151,36840024,37297656,37759062,38224258,38693259,39166081,39642739,40123249
mov $11,$0
add $11,1
lpb $11,1
clr $0,9
sub $11,1
sub $0,$11
pow $0,2
add $1,$0
mul $0,16
add $1,1
mov $6,3
lpb $0,1
div $0,2
add $0,1
div $1,4
add $4,3
add $6,$0
mov $0,2
sub $6,$1
mov $1,$4
sub $6,5
add $1,$6
lpe
add $10,$1
lpe
mov $1,$10
| 76.7
| 1,960
| 0.81269
|
56ef515a1f6e0f86f42164f2f58eaae6e20a4d0a
| 662
|
asm
|
Assembly
|
oeis/060/A060603.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/060/A060603.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/060/A060603.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A060603: Number of ways of expressing an n-cycle in the symmetric group S_n as a product of n+1 transpositions.
; 0,1,27,640,15625,408240,11529602,352321536,11622614670,412500000000,15692141883605,637501182050304,27561634699895023,1263990776407224320,61305144653320312500,3135946492530623774720,168757013424812699892108,9531667356240586227646464,563849601863189372900334015,34865152000000000000000000000,2249396002078603270731732902085,151167192703008209037365336866816,10565516807923043489383646652746902,766898071688913371558221846885171200,57731597280508140102028846740722656250
add $0,1
mov $1,1
add $1,$0
pow $0,$1
mul $0,$1
sub $1,2
mul $0,$1
div $0,24
| 55.166667
| 469
| 0.865559
|
5afe55aceb123aec763b711bde613d1817c2b75a
| 180
|
asm
|
Assembly
|
data/wildPokemon/ceruleancave2.asm
|
AmateurPanda92/pokemon-rby-dx
|
f7ba1cc50b22d93ed176571e074a52d73360da93
|
[
"MIT"
] | 9
|
2020-07-12T19:44:21.000Z
|
2022-03-03T23:32:40.000Z
|
data/wildPokemon/ceruleancave2.asm
|
JStar-debug2020/pokemon-rby-dx
|
c2fdd8145d96683addbd8d9075f946a68d1527a1
|
[
"MIT"
] | 7
|
2020-07-16T10:48:52.000Z
|
2021-01-28T18:32:02.000Z
|
data/wildPokemon/ceruleancave2.asm
|
JStar-debug2020/pokemon-rby-dx
|
c2fdd8145d96683addbd8d9075f946a68d1527a1
|
[
"MIT"
] | 2
|
2021-03-28T18:33:43.000Z
|
2021-05-06T13:12:09.000Z
|
DungeonMons2:
db $0F
db 51,DODRIO
db 51,VENOMOTH
db 51,KADABRA
db 52,RHYDON
db 52,MAROWAK
db 52,ELECTRODE
db 56,CHANSEY
db 54,WIGGLYTUFF
db 55,DITTO
db 60,DITTO
db $00
| 12.857143
| 17
| 0.722222
|
5d119e650f27a018962a74246c91cdd8c481232d
| 359
|
asm
|
Assembly
|
programs/oeis/244/A244331.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/244/A244331.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/244/A244331.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A244331: Number of binary digits in the high-water marks of the terms of the continued fraction of the base-2 Champernowne constant.
; 0,1,3,9,23,53,115,241,495,1005,2027,4073,8167,16357,32739,65505,131039,262109,524251,1048537,2097111,4194261,8388563,16777169
mov $1,2
pow $1,$0
mul $0,2
mul $1,2
mov $2,$0
cmp $2,0
add $0,$2
sub $1,$0
sub $1,1
mov $0,$1
| 25.642857
| 134
| 0.724234
|
ed0589d249e85de3a3488c978f3d44c75b90e68b
| 688
|
asm
|
Assembly
|
data/pokemon/base_stats/venomoth.asm
|
Trap-Master/spacworld97-thingy
|
a144827abecacdfec6cdc3baa32098e9290adf70
|
[
"blessing"
] | null | null | null |
data/pokemon/base_stats/venomoth.asm
|
Trap-Master/spacworld97-thingy
|
a144827abecacdfec6cdc3baa32098e9290adf70
|
[
"blessing"
] | null | null | null |
data/pokemon/base_stats/venomoth.asm
|
Trap-Master/spacworld97-thingy
|
a144827abecacdfec6cdc3baa32098e9290adf70
|
[
"blessing"
] | null | null | null |
db 0 ; species ID placeholder
db 70, 65, 60, 90, 90, 75
; hp atk def spd sat sdf
db BUG, POISON ; type
db 75 ; catch rate
db 138 ; base exp
db NO_ITEM, NO_ITEM ; items
db GENDER_F0 ; gender ratio
db 100 ; unknown 1
db 20 ; step cycles to hatch
db 5 ; unknown 2
INCBIN "gfx/pokemon/venomoth/front.dimensions"
db 0, 0, 0, 0 ; padding
db GROWTH_MEDIUM_FAST ; growth rate
dn EGG_BUG, EGG_BUG ; egg groups
; tm/hm learnset
tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, PSYCHIC_M, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, SWIFT, REST, ATTRACT, THIEF, FLASH
; end
| 31.272727
| 230
| 0.709302
|
6c982e1fd57381acafc6e1010c53f044299fe496
| 295
|
asm
|
Assembly
|
programs/oeis/022/A022102.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | 1
|
2021-03-15T11:38:20.000Z
|
2021-03-15T11:38:20.000Z
|
programs/oeis/022/A022102.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/022/A022102.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | null | null | null |
; A022102: Fibonacci sequence beginning 1, 12.
; 1,12,13,25,38,63,101,164,265,429,694,1123,1817,2940,4757,7697,12454,20151,32605,52756,85361,138117,223478,361595,585073,946668,1531741,2478409,4010150,6488559,10498709
mov $1,1
mov $3,12
lpb $0
sub $0,1
mov $2,$1
mov $1,$3
add $3,$2
lpe
| 24.583333
| 169
| 0.715254
|
3eb52875971d76565867665c2cbe9fe5516904dd
| 4,744
|
asm
|
Assembly
|
ArmPkg/Library/ArmLib/Arm/ArmLibSupport.asm
|
GlovePuppet/edk2
|
8028f03032182f2c72e7699e1d14322bb5586581
|
[
"BSD-2-Clause"
] | 2,757
|
2018-04-28T21:41:36.000Z
|
2022-03-29T06:33:36.000Z
|
ArmPkg/Library/ArmLib/Arm/ArmLibSupport.asm
|
HouQiming/edk2
|
ba07eef98ec49068d6453aba2aed73f6e7d7f600
|
[
"BSD-2-Clause"
] | 20
|
2019-07-23T15:29:32.000Z
|
2022-01-21T12:53:04.000Z
|
ArmPkg/Library/ArmLib/Arm/ArmLibSupport.asm
|
HouQiming/edk2
|
ba07eef98ec49068d6453aba2aed73f6e7d7f600
|
[
"BSD-2-Clause"
] | 449
|
2018-05-09T05:54:05.000Z
|
2022-03-30T14:54:18.000Z
|
//------------------------------------------------------------------------------
//
// Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
// Copyright (c) 2011 - 2016, ARM Limited. All rights reserved.
//
// 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.
//
//------------------------------------------------------------------------------
INCLUDE AsmMacroIoLib.inc
INCLUDE AsmMacroExport.inc
RVCT_ASM_EXPORT ArmReadMidr
mrc p15,0,R0,c0,c0,0
bx LR
RVCT_ASM_EXPORT ArmCacheInfo
mrc p15,0,R0,c0,c0,1
bx LR
RVCT_ASM_EXPORT ArmGetInterruptState
mrs R0,CPSR
tst R0,#0x80 // Check if IRQ is enabled.
moveq R0,#1
movne R0,#0
bx LR
RVCT_ASM_EXPORT ArmGetFiqState
mrs R0,CPSR
tst R0,#0x40 // Check if FIQ is enabled.
moveq R0,#1
movne R0,#0
bx LR
RVCT_ASM_EXPORT ArmSetDomainAccessControl
mcr p15,0,r0,c3,c0,0
bx lr
RVCT_ASM_EXPORT CPSRMaskInsert
stmfd sp!, {r4-r12, lr} // save all the banked registers
mov r3, sp // copy the stack pointer into a non-banked register
mrs r2, cpsr // read the cpsr
bic r2, r2, r0 // clear mask in the cpsr
and r1, r1, r0 // clear bits outside the mask in the input
orr r2, r2, r1 // set field
msr cpsr_cxsf, r2 // write back cpsr (may have caused a mode switch)
isb
mov sp, r3 // restore stack pointer
ldmfd sp!, {r4-r12, lr} // restore registers
bx lr // return (hopefully thumb-safe!) // return (hopefully thumb-safe!)
RVCT_ASM_EXPORT CPSRRead
mrs r0, cpsr
bx lr
RVCT_ASM_EXPORT ArmReadCpacr
mrc p15, 0, r0, c1, c0, 2
bx lr
RVCT_ASM_EXPORT ArmWriteCpacr
mcr p15, 0, r0, c1, c0, 2
isb
bx lr
RVCT_ASM_EXPORT ArmWriteAuxCr
mcr p15, 0, r0, c1, c0, 1
bx lr
RVCT_ASM_EXPORT ArmReadAuxCr
mrc p15, 0, r0, c1, c0, 1
bx lr
RVCT_ASM_EXPORT ArmSetTTBR0
mcr p15,0,r0,c2,c0,0
isb
bx lr
RVCT_ASM_EXPORT ArmSetTTBCR
mcr p15, 0, r0, c2, c0, 2
isb
bx lr
RVCT_ASM_EXPORT ArmGetTTBR0BaseAddress
mrc p15,0,r0,c2,c0,0
MOV32 r1, 0xFFFFC000
and r0, r0, r1
isb
bx lr
//
//VOID
//ArmUpdateTranslationTableEntry (
// IN VOID *TranslationTableEntry // R0
// IN VOID *MVA // R1
// );
RVCT_ASM_EXPORT ArmUpdateTranslationTableEntry
mcr p15,0,R0,c7,c14,1 // DCCIMVAC Clean data cache by MVA
dsb
mcr p15,0,R1,c8,c7,1 // TLBIMVA TLB Invalidate MVA
mcr p15,0,R9,c7,c5,6 // BPIALL Invalidate Branch predictor array. R9 == NoOp
dsb
isb
bx lr
RVCT_ASM_EXPORT ArmInvalidateTlb
mov r0,#0
mcr p15,0,r0,c8,c7,0
mcr p15,0,R9,c7,c5,6 // BPIALL Invalidate Branch predictor array. R9 == NoOp
dsb
isb
bx lr
RVCT_ASM_EXPORT ArmReadScr
mrc p15, 0, r0, c1, c1, 0
bx lr
RVCT_ASM_EXPORT ArmWriteScr
mcr p15, 0, r0, c1, c1, 0
isb
bx lr
RVCT_ASM_EXPORT ArmReadHVBar
mrc p15, 4, r0, c12, c0, 0
bx lr
RVCT_ASM_EXPORT ArmWriteHVBar
mcr p15, 4, r0, c12, c0, 0
bx lr
RVCT_ASM_EXPORT ArmReadMVBar
mrc p15, 0, r0, c12, c0, 1
bx lr
RVCT_ASM_EXPORT ArmWriteMVBar
mcr p15, 0, r0, c12, c0, 1
bx lr
RVCT_ASM_EXPORT ArmCallWFE
wfe
bx lr
RVCT_ASM_EXPORT ArmCallSEV
sev
bx lr
RVCT_ASM_EXPORT ArmReadSctlr
mrc p15, 0, r0, c1, c0, 0 // Read SCTLR into R0 (Read control register configuration data)
bx lr
RVCT_ASM_EXPORT ArmWriteSctlr
mcr p15, 0, r0, c1, c0, 0
bx lr
RVCT_ASM_EXPORT ArmReadCpuActlr
mrc p15, 0, r0, c1, c0, 1
bx lr
RVCT_ASM_EXPORT ArmWriteCpuActlr
mcr p15, 0, r0, c1, c0, 1
dsb
isb
bx lr
RVCT_ASM_EXPORT ArmGetPhysicalAddressBits
mrc p15, 0, r0, c0, c1, 4 ; MMFR0
and r0, r0, #0xf ; VMSA [3:0]
cmp r0, #5 ; >= 5 implies LPAE support
movlt r0, #32 ; 32 bits if no LPAE
movge r0, #40 ; 40 bits if LPAE
bx lr
END
| 26.209945
| 108
| 0.568086
|
1ea6ef6819657d80f3b529547eabac6b481a8505
| 6,215
|
asm
|
Assembly
|
Transynther/x86/_processed/NC/_zr_/i7-7700_9_0x48_notsx.log_21829_1653.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/NC/_zr_/i7-7700_9_0x48_notsx.log_21829_1653.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/NC/_zr_/i7-7700_9_0x48_notsx.log_21829_1653.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 3
|
2020-07-14T17:07:07.000Z
|
2022-03-21T01:12:22.000Z
|
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r11
push %r12
push %r13
push %r15
push %rcx
push %rdi
push %rsi
lea addresses_normal_ht+0x1360b, %rsi
lea addresses_D_ht+0xaaa3, %rdi
nop
nop
nop
nop
add $60860, %r12
mov $33, %rcx
rep movsq
nop
cmp %r15, %r15
lea addresses_WT_ht+0x19223, %r15
nop
nop
nop
nop
nop
inc %rcx
mov $0x6162636465666768, %rdi
movq %rdi, %xmm1
and $0xffffffffffffffc0, %r15
movaps %xmm1, (%r15)
and %rsi, %rsi
lea addresses_WC_ht+0x16023, %r10
nop
xor $25014, %r13
mov $0x6162636465666768, %rsi
movq %rsi, (%r10)
nop
nop
nop
sub %rsi, %rsi
lea addresses_D_ht+0xc223, %r10
nop
nop
nop
nop
dec %rsi
mov (%r10), %r12
nop
nop
nop
nop
nop
and %r12, %r12
lea addresses_UC_ht+0x7e23, %rdi
nop
nop
nop
nop
nop
sub $55226, %r10
mov (%rdi), %esi
nop
nop
nop
nop
nop
add $59575, %r13
lea addresses_WC_ht+0x6e23, %rsi
lea addresses_WC_ht+0xc4a7, %rdi
nop
nop
sub $52087, %r11
mov $45, %rcx
rep movsw
nop
nop
add %rsi, %rsi
lea addresses_WC_ht+0x1b0f9, %r13
nop
nop
add %rsi, %rsi
vmovups (%r13), %ymm6
vextracti128 $1, %ymm6, %xmm6
vpextrq $1, %xmm6, %r12
nop
nop
nop
nop
sub %r11, %r11
lea addresses_normal_ht+0x2023, %r15
nop
nop
nop
nop
nop
and $17873, %rdi
mov (%r15), %si
nop
nop
nop
nop
nop
sub $3510, %r15
pop %rsi
pop %rdi
pop %rcx
pop %r15
pop %r13
pop %r12
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r15
push %r8
push %rbx
push %rcx
push %rsi
// Load
lea addresses_RW+0xdc23, %rcx
nop
nop
add %rsi, %rsi
mov (%rcx), %r12d
nop
and %r15, %r15
// Faulty Load
mov $0x42a53d0000000023, %rcx
add %r8, %r8
mov (%rcx), %bx
lea oracles, %rsi
and $0xff, %rbx
shlq $12, %rbx
mov (%rsi,%rbx,1), %rbx
pop %rsi
pop %rcx
pop %rbx
pop %r8
pop %r15
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_NC', 'congruent': 0}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': True, 'AVXalign': False, 'size': 4, 'type': 'addresses_RW', 'congruent': 10}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_NC', 'congruent': 0}}
<gen_prepare_buffer>
{'dst': {'same': False, 'congruent': 6, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'src': {'same': True, 'congruent': 3, 'type': 'addresses_normal_ht'}}
{'dst': {'same': True, 'NT': False, 'AVXalign': True, 'size': 16, 'type': 'addresses_WT_ht', 'congruent': 7}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_WC_ht', 'congruent': 8}, 'OP': 'STOR'}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_D_ht', 'congruent': 9}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_UC_ht', 'congruent': 8}}
{'dst': {'same': True, 'congruent': 2, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'src': {'same': True, 'congruent': 9, 'type': 'addresses_WC_ht'}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_WC_ht', 'congruent': 0}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_normal_ht', 'congruent': 8}}
{'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
*/
| 36.775148
| 2,999
| 0.658246
|
d53daf0780d98f3450f2c5deae8901f0b97a4bae
| 472
|
asm
|
Assembly
|
programs/oeis/171/A171405.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/171/A171405.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/171/A171405.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A171405: Sum of divisors of n, excluding divisors 2 and 3.
; 1,1,1,5,6,7,8,13,10,16,12,23,14,22,21,29,18,34,20,40,29,34,24,55,31,40,37,54,30,67,32,61,45,52,48,86,38,58,53,88,42,91,44,82,75,70,48,119,57,91,69,96,54,115,72,118,77,88,60,163,62,94,101,125,84,139,68,124,93,142
add $0,1
mov $2,$0
lpb $0
mov $3,$2
mov $4,$0
cmp $4,0
add $0,$4
dif $3,$0
cmp $3,$2
cmp $3,0
mul $3,$0
sub $0,1
lpb $3
add $1,$3
mov $3,3
lpe
lpe
add $1,1
mov $0,$1
| 20.521739
| 213
| 0.584746
|
b91542b17a24b7d93790148222cbfe0d40e7d314
| 441
|
asm
|
Assembly
|
oeis/052/A052288.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/052/A052288.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/052/A052288.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A052288: First differences of the average of two consecutive primes (A024675).
; Submitted by Jamie Morken(w2)
; 2,3,3,3,3,3,5,4,4,5,3,3,5,6,4,4,5,3,4,5,5,7,6,3,3,3,3,9,9,5,4,6,6,4,6,5,5,6,4,6,6,3,3,7,12,8,3,3,5,4,6,8,6,6,4,4,5,3,6,12,9,3,3,9,10,8,6,3,5,7,7,6,5,5,7,6,6,9,6,6,6,4,5,5,7,6,3,3,8,10,6,6,6,5,9,7,10,12,8,8
add $0,1
mov $1,$0
seq $0,40 ; The prime numbers.
add $1,2
seq $1,40 ; The prime numbers.
sub $1,$0
mov $0,$1
div $0,2
| 33.923077
| 207
| 0.603175
|
fe47863f0179f3c039c40094ce7e001c5e335d43
| 285
|
asm
|
Assembly
|
BitEpicness/counter.asm
|
davidov541/BitEpicness
|
6f2dfddff55f4d9054bd9670dc49851a3444b0ef
|
[
"Apache-2.0"
] | null | null | null |
BitEpicness/counter.asm
|
davidov541/BitEpicness
|
6f2dfddff55f4d9054bd9670dc49851a3444b0ef
|
[
"Apache-2.0"
] | null | null | null |
BitEpicness/counter.asm
|
davidov541/BitEpicness
|
6f2dfddff55f4d9054bd9670dc49851a3444b0ef
|
[
"Apache-2.0"
] | null | null | null |
move $s0, $0 //0
ldi $s1, 1000 //1,2
la $t1, inner //3,4
// Reset timer
loop: wp $0, 1 //5
// Wait for timer to reach 1 second
inner: rp $t0, 1 //6
blt $t0, $s1, $t1 //7
// Reached 1 second
addi $s0, 1 //8
move $s0, $rr //9
wp $s0, 0 //10
j loop //11
| 21.923077
| 37
| 0.494737
|
67d3c54a0fd76327e185d6155a7f04b66efa0974
| 1,320
|
asm
|
Assembly
|
libsrc/_DEVELOPMENT/math/float/math32/z80/h32_coeff_atanf.asm
|
Frodevan/z88dk
|
f27af9fe840ff995c63c80a73673ba7ee33fffac
|
[
"ClArtistic"
] | 640
|
2017-01-14T23:33:45.000Z
|
2022-03-30T11:28:42.000Z
|
libsrc/_DEVELOPMENT/math/float/math32/z80/h32_coeff_atanf.asm
|
Frodevan/z88dk
|
f27af9fe840ff995c63c80a73673ba7ee33fffac
|
[
"ClArtistic"
] | 1,600
|
2017-01-15T16:12:02.000Z
|
2022-03-31T12:11:12.000Z
|
libsrc/_DEVELOPMENT/math/float/math32/z80/h32_coeff_atanf.asm
|
Frodevan/z88dk
|
f27af9fe840ff995c63c80a73673ba7ee33fffac
|
[
"ClArtistic"
] | 215
|
2017-01-17T10:43:03.000Z
|
2022-03-23T17:25:02.000Z
|
;
; feilipu, 2019 May
;
; This Source Code Form is subject to the terms of the Mozilla Public
; License, v. 2.0. If a copy of the MPL was not distributed with this
; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;
;-------------------------------------------------------------------------
; Coefficients for atanf()
;-------------------------------------------------------------------------
;
; Approximation of f(x) = atan(x)
; with weight function g(x) = atan(x)
; on interval [ 0, 1 ]
; with a polynomial of degree 7.
;
; float f(float x)
; {
; float u = +5.3387679e-2f;
; u = u * x + -2.2568632e-1f;
; u = u * x + +3.2087456e-1f;
; u = u * x + -3.4700353e-2f;
; u = u * x + -3.2812673e-1f;
; u = u * x + -3.5815786e-4f;
; u = u * x + +1.0000081e+0f;
; return u * x + 4.2012834e-19f;
; }
;
;-------------------------------------------------------------------------
SECTION rodata_fp_math32
PUBLIC _m32_coeff_atan
._m32_coeff_atan
DEFQ 0x00000000; +4.2012834e-19 or approximately 0.0
DEFQ 0x3F800000; +1.0000081e+0 or approximately 1.0
DEFQ 0xB9BBC722; -3.5815786e-4
DEFQ 0xBEA8003A; -3.2812673e-1
DEFQ 0xBD0E21F5; -3.4700353e-2
DEFQ 0x3EA449AC; +3.2087456e-1
DEFQ 0xBE671A51; -2.2568632e-1
DEFQ 0x3D5AAD0A; +5.3387679e-2
| 29.333333
| 74
| 0.515909
|
aa7fe0592a26bdf0f6f33ec689fd33da179962f6
| 55
|
asm
|
Assembly
|
tests/incbinstr/7.asm
|
NullMember/customasm
|
6e34d6432583a41278e6b3596f1817ae82149531
|
[
"Apache-2.0"
] | null | null | null |
tests/incbinstr/7.asm
|
NullMember/customasm
|
6e34d6432583a41278e6b3596f1817ae82149531
|
[
"Apache-2.0"
] | null | null | null |
tests/incbinstr/7.asm
|
NullMember/customasm
|
6e34d6432583a41278e6b3596f1817ae82149531
|
[
"Apache-2.0"
] | null | null | null |
#d x
#d incbinstr(x) ; error: not found
x = "data1.txt"
| 18.333333
| 34
| 0.636364
|
91af061f1bd1572ed14d87622b4b42751f22e5f4
| 659
|
asm
|
Assembly
|
oeis/124/A124932.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/124/A124932.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/124/A124932.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A124932: Triangle read by rows: T(n,k) = k*(k+1)*binomial(n,k)/2 (1 <= k <= n).
; Submitted by Christian Krause
; 1,2,3,3,9,6,4,18,24,10,5,30,60,50,15,6,45,120,150,90,21,7,63,210,350,315,147,28,8,84,336,700,840,588,224,36,9,108,504,1260,1890,1764,1008,324,45,10,135,720,2100,3780,4410,3360,1620,450,55,11,165,990,3300,6930,9702,9240,5940,2475,605,66,12,198,1320,4950,11880,19404,22176,17820,9900,3630,792,78,13,234,1716,7150,19305,36036,48048,46332,32175,15730,5148,1014,91,14,273,2184,10010,30030,63063,96096,108108,90090
mov $2,1
lpb $0
add $1,1
sub $0,$1
add $2,1
lpe
bin $1,$0
mul $2,$1
mov $1,2
add $1,$0
mul $1,30
mul $1,$2
mov $0,$1
div $0,60
| 34.684211
| 410
| 0.681335
|
d66fb09747d1ee97ad80a0f1274952ee58a7df39
| 4,353
|
asm
|
Assembly
|
src/entry/bootsector.asm
|
marvinborner/SegelBoot
|
c9b5256eb58fd4dce5b027c1a2aadaaf2638c33b
|
[
"MIT"
] | 1
|
2021-07-04T23:19:29.000Z
|
2021-07-04T23:19:29.000Z
|
src/entry/bootsector.asm
|
marvinborner/SegelBoot
|
c9b5256eb58fd4dce5b027c1a2aadaaf2638c33b
|
[
"MIT"
] | null | null | null |
src/entry/bootsector.asm
|
marvinborner/SegelBoot
|
c9b5256eb58fd4dce5b027c1a2aadaaf2638c33b
|
[
"MIT"
] | null | null | null |
; MIT License, Copyright (c) 2021 Marvin Borner
; This file includes definitions to reduce magic numbers
%include "src/entry/definitions.asm"
bits 16 ; Real mode is 16 Bit
org LOCATION ; Bootsector location
global _start
_start:
jmp .skip_bpb ; Some BIOSes override the BPB area
nop
times 87 db 0 ; Fill BPB area with 0
.skip_bpb:
; Clear registers (some BIOSes are weird)
xor bx, bx
mov ds, bx
mov es, bx
mov ss, bx
; Other registers may contain relevant data
mov sp, LOCATION ; Set stack (top) pointer - grows downwards
mov ax, SCREEN_CLEAR ; Clear screen command
int SCREEN_INT ; CLEAR!
; Print friendly welcome message
mov si, hello_msg
call print
call disk_support ; Is disk supported? Implicitly verifies that this is a 386+ architecture
mov esp, LOCATION ; Clear upper 16 Bit of esp, now that 16 Bit support is guaranteed
cli ; Disable interrupts
jmp load_stage ; Load and execute main stage
; Print function uses si as string pointer
print:
; a and b regs get partially destroyed - push for restoration
push bx
push ax
mov ah, SCREEN_OUT ; Set VGA command
xor bh, bh ; Clear b register (according to BIOS spec)
.putch:
lodsb ; Load next string byte (using ds:si)
test al, al ; Test loaded byte
jz .end ; End if al is zero (using previous test); NULL-termination
int SCREEN_INT ; WRITE!
jmp .putch ; Continue
.end:
; Restore ax/bx
pop ax
pop bx
ret
; Check if disk is supported using ID checks and LBA test
disk_support:
; BIOS puts the disk id into dl
cmp dl, 0x80
jb disk_error ; Error if below 0x80 - probably floppy disk
cmp dl, 0x8f
ja disk_error ; Error if above 0x8f - invalid
; Check if int 0x13 and LBA are supported
mov ah, DISK_EXT_CHECK ; Set needed interrupt values
mov bx, DISK_EXT_CHECK_REQ
int DISK_INT ; CHECK!
jc disk_error ; Carry means something went wrong
cmp bx, DISK_EXT_CHECK_RESP
jne disk_error ; Response is incorrect => error!
ret
; Read sectors from disk using dap information
disk_read:
mov si, dap
mov ah, DISK_READ
int DISK_INT
jc error_loop
ret
; Loads the main stage (main.c)
load_stage:
mov bx, loader
mov [dap.dest], bx
call disk_read
lgdt [gdt] ; Load GDT
; Set protected mode (32 Bit mode)
mov eax, cr0
or ax, 1 ; Set PE (Protection Enable) Bit
mov cr0, eax
jmp 0x08:protected_mode
bits 32
protected_mode:
; Set segment registers
mov ax, 0x10
mov ds, ax
mov es, ax
mov fs, ax
mov gs, ax
mov ss, ax
push dx ; Pass disk
call loader
jmp error_loop
bits 16
; Error handling
error_loop:
cli ; Disable interrupts
hlt ; Wait for interrupt; should wait forever
jmp error_loop ; Loop if returns anyway
disk_error:
mov si, disk_msg
call print
jmp error_loop
; Messages (NULL-terminated strings with newline/return)
hello_msg db "Hello world! Booting...", NEWLINE, RETURN, NULL
disk_msg db "Disk is invalid or unsupported", NEWLINE, RETURN, NULL
; Disk configuration data for DISK_READ interrupt (filled according to spec)
dap: ; Disk Address Packet
db 0x10 ; Disk address packet size
db 0 ; Always 0
.count:
dw 64 ; Number of sectors (512B each) to read ; 0x8000
.dest:
dw 0 ; Destination offset
dw 0 ; Destination segment
.lba:
dd 1 ; LBA number ; Inter stage is directly after first LBA (0)
dd 0 ; More storage bytes
; Global Descriptor Table (GDT)
; There are better explanations for the constants in definitions.asm
gdt:
dw .size - 1 + 8 ; GDT size
dd .start - 8 ; GDT start address
.start:
; Code
dw 0xffff ; Limit
dw 0x0000 ; Base (low 16 bits)
db 0x00 ; Base (mid 8 bits)
db GDT_PRESENT | GDT_DESCRIPTOR | GDT_EXECUTABLE | GDT_READWRITE ; Access
db GDT_GRANULARITY | GDT_SIZE | 0xf ; Granularity
db 0x00 ; Base (high 8 bits)
; Data
dw 0xffff ; Limit
dw 0x0000 ; Base (low 16 bits)
db 0x00 ; Base (mid 8 bits)
db GDT_PRESENT | GDT_DESCRIPTOR | GDT_READWRITE ; Access; Data isn't executable
db GDT_GRANULARITY | GDT_SIZE | 0xf ; Granularity
db 0x00 ; Base (high 8 bits)
.end:
.size: equ .end - .start
; The partition table gets inserted here (0x1b8 -> @440B)
times 0x1b8 - ($ - $$) db 0
times SECTOR_SIZE - 2 - ($ - $$) db 0 ; Fill until 512 (SECTOR_SIZE) - 2 bytes; -2 because of 2B signature
dw SECTOR_END_SIG ; Bootsector end signature
loader:
incbin "build/loader.bin"
; Limit to 0x8000 due to ext2 superblock start at 1024 on partition 1
times 0x8000 - ($ - $$) db 0
superblock:
| 24.455056
| 106
| 0.727774
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.