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
|
---|---|---|---|---|
Dave/Algebra/Naturals/Excercises.agda | DavidStahl97/formal-proofs | 0 | 3350 | <filename>Dave/Algebra/Naturals/Excercises.agda
module Dave.Algebra.Naturals.Excercises where
open import Dave.Algebra.Naturals.Addition
+-rearrange : ∀ (m n p q : ℕ) → (m + n) + (p + q) ≡ m + (n + p) + q
+-rearrange m n p q = begin
(m + n) + (p + q) ≡⟨ IsSemigroup.assoc ℕ-+-IsSemigroup m n (p + q) ⟩
m + (n + (p + q)) ≡⟨ cong (λ a → m + a) (sym (IsSemigroup.assoc ℕ-+-IsSemigroup n p q)) ⟩
m + ((n + p) + q) ≡⟨ sym (IsSemigroup.assoc ℕ-+-IsSemigroup m (n + p) q) ⟩
(m + (n + p)) + q ∎
+-swap : ∀ (m n p : ℕ) → m + (n + p) ≡ n + (m + p)
+-swap m n p = begin
m + (n + p) ≡⟨ +-comm m (n + p) ⟩
(n + p) + m ≡⟨ IsSemigroup.assoc ℕ-+-IsSemigroup n p m ⟩
n + (p + m) ≡⟨ cong (λ a → n + a) (+-comm p m) ⟩
n + (m + p) ∎ |
libsrc/_DEVELOPMENT/math/float/math48/c/sdcc_ix/cm48_sdccix_atan_fastcall.asm | meesokim/z88dk | 0 | 101371 |
; float atan(float x) __z88dk_fastcall
SECTION code_fp_math48
PUBLIC cm48_sdccix_atan_fastcall
EXTERN cm48_sdccixp_dx2m48, am48_atan, cm48_sdccixp_m482d
cm48_sdccix_atan_fastcall:
call cm48_sdccixp_dx2m48
call am48_atan
jp cm48_sdccixp_m482d
|
src/q_bingo-q_gtk-q_intl.adb | jfuica/bingada | 4 | 6553 | <gh_stars>1-10
--*****************************************************************************
--*
--* PROJECT: Bingada
--*
--* FILE: q_bingo-q_gtk-q_intl.adb
--*
--* AUTHOR: <NAME>
--*
--*****************************************************************************
with Gtkada.Intl;
with Text_Io;
package body Q_Bingo.Q_Gtk.Q_Intl is
--==================================================================
--C_PATH : CONSTANT STRING := "/usr/local/share/locale";
procedure P_Initialise is
begin
if Gtkada.Intl.Getlocale = "C" then
Gtkada.Intl.Setlocale
(Category => Gtkada.Intl.Lc_Messages,Locale => "en_GB");
Text_Io.Put_Line ("DEFAULT LOCALE changed to : " & Gtkada.Intl.Getlocale);
else
Gtkada.Intl.Setlocale;
end if;
Gtkada.Intl.Bind_Text_Domain
(Domain => "bingada",
Dirname => "./messages");
Gtkada.Intl.Text_Domain ("bingada");
end P_Initialise;
--==================================================================
end Q_Bingo.Q_Gtk.Q_Intl;
|
exercises/exercise11/eg_CMOS_date.asm | Dark15/assembly | 1 | 175133 | <gh_stars>1-10
;功能:显示CMOS的年月日
;环境:NASM,Windows
;命令:in、out、shr
;版本:V1.0,2018-6-6本末终始
;设置显示区
mov ax,0xb800
mov es,ax
xor bx,bx
;从CMOS读“年的前两位”,并显示。如:20
mov al,0x32
out 0x70,al
in al,0x71
mov ah,al ;将两位BCD码分别处理和显示
shr al,4 ;高位
and ah,0x0F ;低位
add al,0x30
mov [es:bx],al
inc bx
inc bx
add ah,0x30
mov [es:bx],ah
inc bx
inc bx
;从CMOS读“年的后两位”,并显示。如:18-
mov al,0x9
out 0x70,al
in al,0x71
mov ah,al ;将两位BCD码分别处理和显示
shr al,4 ;高位
and ah,0x0F ;低位
add al,0x30
mov [es:bx],al
inc bx
inc bx
add ah,0x30
mov [es:bx],ah
inc bx
inc bx
mov byte [es:bx],'-'
inc bx
inc bx
;从CMOS读“月”,并显示。如:06-
mov al,0x8
out 0x70,al
in al,0x71
mov ah,al ;将两位BCD码分别处理和显示
shr al,4 ;高位
and ah,0x0F ;低位
add al,0x30
mov [es:bx],al
inc bx
inc bx
add ah,0x30
mov [es:bx],ah
inc bx
inc bx
mov byte [es:bx],'-'
inc bx
inc bx
;从CMOS读“日”,并显示。如:07
mov al,0x7
out 0x70,al
in al,0x71
mov ah,al ;将两位BCD码分别处理和显示
shr al,4 ;高位
and ah,0x0F ;低位
add al,0x30
mov [es:bx],al
inc bx
inc bx
add ah,0x30
mov [es:bx],ah
inc bx
inc bx
;终止。死循环
jmp near $
times 510-($-$$) db 0
db 0x55,0xaa
|
tb/tprog/asm/test.sra.asm | mshaklunov/mips_onemore | 0 | 7300 | <filename>tb/tprog/asm/test.sra.asm
#SRA INSTRUCTION
#RUN ALL SHIFTING MODES (0-31) WITH DIFFERENT SIGNED BIT OF THE SHIFTED NUMBER
#EACH RESULT'S BIT GO THROUGH 0 AND 1
#1 SIGNED BIT IS ZERO
lui $1 0x7FFF
ori $1 0xFFFF
lui $2 0x7FFF
ori $2 0xFFFF
sra $3 $1 0
bne $3 $2 fail
lui $2 0x3FFF
ori $2 0xFFFF
sra $3 $1 1
bne $3 $2 fail
lui $2 0x1FFF
ori $2 0xFFFF
sra $3 $1 2
bne $3 $2 fail
lui $2 0x0FFF
ori $2 0xFFFF
sra $3 $1 3
bne $3 $2 fail
lui $2 0x07FF
ori $2 0xFFFF
sra $3 $1 4
bne $3 $2 fail
lui $2 0x03FF
ori $2 0xFFFF
sra $3 $1 5
bne $3 $2 fail
lui $2 0x01FF
ori $2 0xFFFF
sra $3 $1 6
bne $3 $2 fail
lui $2 0x00FF
ori $2 0xFFFF
sra $3 $1 7
bne $3 $2 fail
lui $2 0x007F
ori $2 0xFFFF
sra $3 $1 8
bne $3 $2 fail
lui $2 0x003F
ori $2 0xFFFF
sra $3 $1 9
bne $3 $2 fail
lui $2 0x001F
ori $2 0xFFFF
sra $3 $1 10
bne $3 $2 fail
lui $2 0x000F
ori $2 0xFFFF
sra $3 $1 11
bne $3 $2 fail
lui $2 0x0007
ori $2 0xFFFF
sra $3 $1 12
bne $3 $2 fail
lui $2 0x0003
ori $2 0xFFFF
sra $3 $1 13
bne $3 $2 fail
lui $2 0x0001
ori $2 0xFFFF
sra $3 $1 14
bne $3 $2 fail
lui $2 0x0000
ori $2 0xFFFF
sra $3 $1 15
bne $3 $2 fail
lui $2 0x0000
ori $2 0x7FFF
sra $3 $1 16
bne $3 $2 fail
lui $2 0x0000
ori $2 0x3FFF
sra $3 $1 17
bne $3 $2 fail
lui $2 0x0000
ori $2 0x1FFF
sra $3 $1 18
bne $3 $2 fail
lui $2 0x0000
ori $2 0x0FFF
sra $3 $1 19
bne $3 $2 fail
lui $2 0x0000
ori $2 0x07FF
sra $3 $1 20
bne $3 $2 fail
lui $2 0x0000
ori $2 0x03FF
sra $3 $1 21
bne $3 $2 fail
lui $2 0x0000
ori $2 0x01FF
sra $3 $1 22
bne $3 $2 fail
lui $2 0x0000
ori $2 0x00FF
sra $3 $1 23
bne $3 $2 fail
lui $2 0x0000
ori $2 0x007F
sra $3 $1 24
bne $3 $2 fail
lui $2 0x0000
ori $2 0x003F
sra $3 $1 25
bne $3 $2 fail
lui $2 0x0000
ori $2 0x001F
sra $3 $1 26
bne $3 $2 fail
lui $2 0x0000
ori $2 0x000F
sra $3 $1 27
bne $3 $2 fail
lui $2 0x0000
ori $2 0x0007
sra $3 $1 28
bne $3 $2 fail
lui $2 0x0000
ori $2 0x0003
sra $3 $1 29
bne $3 $2 fail
lui $2 0x0000
ori $2 0x0001
sra $3 $1 30
bne $3 $2 fail
lui $2 0x0000
ori $2 0x0000
sra $3 $1 31
bne $3 $2 fail
#2 SIGNED BIT IS ONE
lui $1 0x8000
ori $1 0x0000
lui $2 0x8000
ori $2 0x0000
sra $3 $1 0
bne $3 $2 fail
lui $2 0xC000
ori $2 0x0000
sra $3 $1 1
bne $3 $2 fail
lui $2 0xE000
ori $2 0x0000
sra $3 $1 2
bne $3 $2 fail
lui $2 0xF000
ori $2 0x0000
sra $3 $1 3
bne $3 $2 fail
lui $2 0xF800
ori $2 0x0000
sra $3 $1 4
bne $3 $2 fail
lui $2 0xFC00
ori $2 0x0000
sra $3 $1 5
bne $3 $2 fail
lui $2 0xFE00
ori $2 0x0000
sra $3 $1 6
bne $3 $2 fail
lui $2 0xFF00
ori $2 0x0000
sra $3 $1 7
bne $3 $2 fail
lui $2 0xFF80
ori $2 0x0000
sra $3 $1 8
bne $3 $2 fail
lui $2 0xFFC0
ori $2 0x0000
sra $3 $1 9
bne $3 $2 fail
lui $2 0xFFE0
ori $2 0x0000
sra $3 $1 10
bne $3 $2 fail
lui $2 0xFFF0
ori $2 0x0000
sra $3 $1 11
bne $3 $2 fail
lui $2 0xFFF8
ori $2 0x0000
sra $3 $1 12
bne $3 $2 fail
lui $2 0xFFFC
ori $2 0x0000
sra $3 $1 13
bne $3 $2 fail
lui $2 0xFFFE
ori $2 0x0000
sra $3 $1 14
bne $3 $2 fail
lui $2 0xFFFF
ori $2 0x0000
sra $3 $1 15
bne $3 $2 fail
lui $2 0xFFFF
ori $2 0x8000
sra $3 $1 16
bne $3 $2 fail
lui $2 0xFFFF
ori $2 0xC000
sra $3 $1 17
bne $3 $2 fail
lui $2 0xFFFF
ori $2 0xE000
sra $3 $1 18
bne $3 $2 fail
lui $2 0xFFFF
ori $2 0xF000
sra $3 $1 19
bne $3 $2 fail
lui $2 0xFFFF
ori $2 0xF800
sra $3 $1 20
bne $3 $2 fail
lui $2 0xFFFF
ori $2 0xFC00
sra $3 $1 21
bne $3 $2 fail
lui $2 0xFFFF
ori $2 0xFE00
sra $3 $1 22
bne $3 $2 fail
lui $2 0xFFFF
ori $2 0xFF00
sra $3 $1 23
bne $3 $2 fail
lui $2 0xFFFF
ori $2 0xFF80
sra $3 $1 24
bne $3 $2 fail
lui $2 0xFFFF
ori $2 0xFFC0
sra $3 $1 25
bne $3 $2 fail
lui $2 0xFFFF
ori $2 0xFFE0
sra $3 $1 26
bne $3 $2 fail
lui $2 0xFFFF
ori $2 0xFFF0
sra $3 $1 27
bne $3 $2 fail
lui $2 0xFFFF
ori $2 0xFFF8
sra $3 $1 28
bne $3 $2 fail
lui $2 0xFFFF
ori $2 0xFFFC
sra $3 $1 29
bne $3 $2 fail
lui $2 0xFFFF
ori $2 0xFFFE
sra $3 $1 30
bne $3 $2 fail
lui $2 0xFFFF
ori $2 0xFFFF
sra $3 $1 31
bne $3 $2 fail
sll $0 $0 0
|
oeis/194/A194730.asm | neoneye/loda-programs | 11 | 85498 | <gh_stars>10-100
; A194730: Number of 10-ary words either empty or beginning with the first character of the alphabet, that can be built by inserting n doublets into the initially empty word.
; Submitted by <NAME>
; 1,1,19,442,11395,312814,8960878,264735892,8006545891,246643289830,7711583225338,244082045341036,7805301802531534,251791585570781452,8183989442287618300,267755464909548758440,8810802978165549384355,291414010749705281701270,9682413601764489497897410,323022301854353983289496700,10816435543309635944491534810,363404133437045251882981533220,12246745497353991696760203437380,413870249166907303482525856316440,14022379772504129864222146681166350,476218385571138426042624614032471324
sub $0,1
mul $0,2
add $0,1
max $0,0
seq $0,121725 ; Generalized central coefficients for k=3.
|
kernel/arch/i386/cpu/gdt/gdt_load.asm | qookei/quack | 16 | 246041 | bits 32
global gdt_load
gdtr:
dw 0
dd 0
gdt_load:
mov [gdtr + 2], ecx
mov [gdtr], dx
lgdt [gdtr]
jmp 0x08:.reload_cs
.reload_cs:
mov ax, 0x10
mov ds, ax
mov es, ax
mov fs, ax
mov gs, ax
mov ss, ax
mov ax, 0x28
ltr ax
ret
|
Klient/klient_assets_package.ads | albinjal/Ada_Project | 4 | 3346 | <gh_stars>1-10
with TJa.Sockets; use TJa.Sockets;
package klient_assets_package is
type Arr is array (1..5) of Integer;
type Protocoll_Type is array (1..15) of Integer;
type Rolls_Type is private;
DATATYPE_ERROR: exception;
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
procedure Bootup(Socket: out Socket_Type; Adress: in String; Port: in Positive);
-- procedure Fill_Protocoll_Empty(Proto: in out Protocoll_Type); REMOVE REMOVE REMOVE REMOVE REMOVE REMOVE REMOVE REMOVE REMOVE REMOVE REMOVE REMOVE REMOVE REMOVE REMOVE
procedure Get_Rolls(Socket: in Socket_Type; Roll: out Rolls_Type);
procedure graphics;
procedure Place(Socket: Socket_Type; Dices: Rolls_Type; Protocoll: in out Protocoll_Type; Player: in Positive);
procedure Playerroll(Socket: in Socket_Type);
procedure Start_Game(Socket: in Socket_Type; Player: out Positive; Prot1, Prot2: out Protocoll_Type);
procedure Watch_Placement(Socket: Socket_Type; Dices: Rolls_Type; Protocoll: in out Protocoll_Type; Player: in Positive);
--procedure protocoll (Prot1, Prot2 : in Protocoll_Type);
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
function Calcfirstsum(Prot: in Protocoll_Type) return Integer;
function Calctotsum(Prot: in Protocoll_Type) return Integer;
function Bonus(Prot: in Protocoll_Type) return Integer;
function Read(C: in Character) return Natural;
function GetR(Roll: in Rolls_Type)
return Arr;
function GetI(Roll: in Rolls_Type)
return Integer;
function Calcpoints(Prot: Protocoll_Type; Rolls: Arr)
return Protocoll_Type;
function Roll_loop(Socket: Socket_Type; Player: Positive; Own_Protocoll: in Protocoll_Type)
return Rolls_Type;
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
private
type Rolls_Type is
record
I: Natural;
Rolls: Arr;
end record;
end Klient_Assets_Package;
|
source/amf/utp/amf-internals-factories-utp_factories.adb | svn2github/matreshka | 24 | 453 | <filename>source/amf/utp/amf-internals-factories-utp_factories.adb<gh_stars>10-100
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2012, <NAME> <<EMAIL>> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE 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 --
-- HOLDER 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. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
-- This file is generated, don't edit it.
------------------------------------------------------------------------------
with AMF.Internals.Elements;
with AMF.Internals.Extents;
with AMF.Internals.Helpers;
with AMF.Internals.Links;
with AMF.Internals.Listener_Registry;
with AMF.Internals.Tables.UTP_Constructors;
with AMF.Internals.Tables.Utp_Metamodel;
with AMF.Utp.Holders.Verdicts;
package body AMF.Internals.Factories.Utp_Factories is
None_Img : constant League.Strings.Universal_String
:= League.Strings.To_Universal_String ("none");
Pass_Img : constant League.Strings.Universal_String
:= League.Strings.To_Universal_String ("pass");
Inconclusive_Img : constant League.Strings.Universal_String
:= League.Strings.To_Universal_String ("inconclusive");
Fail_Img : constant League.Strings.Universal_String
:= League.Strings.To_Universal_String ("fail");
Error_Img : constant League.Strings.Universal_String
:= League.Strings.To_Universal_String ("error");
function Convert_Duration_To_String
(Value : League.Holders.Holder) return League.Strings.Universal_String
is separate;
function Create_Duration_From_String
(Image : League.Strings.Universal_String) return League.Holders.Holder
is separate;
function Convert_Time_To_String
(Value : League.Holders.Holder) return League.Strings.Universal_String
is separate;
function Create_Time_From_String
(Image : League.Strings.Universal_String) return League.Holders.Holder
is separate;
function Convert_Timezone_To_String
(Value : League.Holders.Holder) return League.Strings.Universal_String
is separate;
function Create_Timezone_From_String
(Image : League.Strings.Universal_String) return League.Holders.Holder
is separate;
-----------------
-- Constructor --
-----------------
function Constructor
(Extent : AMF.Internals.AMF_Extent)
return not null AMF.Factories.Factory_Access is
begin
return new Utp_Factory'(Extent => Extent);
end Constructor;
-----------------------
-- Convert_To_String --
-----------------------
overriding function Convert_To_String
(Self : not null access Utp_Factory;
Data_Type : not null access AMF.CMOF.Data_Types.CMOF_Data_Type'Class;
Value : League.Holders.Holder) return League.Strings.Universal_String
is
pragma Unreferenced (Self);
DT : constant AMF.Internals.CMOF_Element
:= AMF.Internals.Elements.Element_Base'Class (Data_Type.all).Element;
begin
if DT = AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Duration then
return Convert_Duration_To_String (Value);
elsif DT = AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Time then
return Convert_Time_To_String (Value);
elsif DT = AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Timezone then
return Convert_Timezone_To_String (Value);
elsif DT = AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Verdict then
declare
Item : constant AMF.Utp.Utp_Verdict
:= AMF.Utp.Holders.Verdicts.Element (Value);
begin
case Item is
when AMF.Utp.None =>
return None_Img;
when AMF.Utp.Pass =>
return Pass_Img;
when AMF.Utp.Inconclusive =>
return Inconclusive_Img;
when AMF.Utp.Fail =>
return Fail_Img;
when AMF.Utp.Error =>
return Error_Img;
end case;
end;
else
raise Program_Error;
end if;
end Convert_To_String;
------------
-- Create --
------------
overriding function Create
(Self : not null access Utp_Factory;
Meta_Class : not null access AMF.CMOF.Classes.CMOF_Class'Class)
return not null AMF.Elements.Element_Access
is
MC : constant AMF.Internals.CMOF_Element
:= AMF.Internals.Elements.Element_Base'Class (Meta_Class.all).Element;
Element : AMF.Internals.AMF_Element;
begin
if MC = AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Coding_Rule then
Element := AMF.Internals.Tables.UTP_Constructors.Create_Utp_Coding_Rule;
elsif MC = AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Data_Partition then
Element := AMF.Internals.Tables.UTP_Constructors.Create_Utp_Data_Partition;
elsif MC = AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Data_Pool then
Element := AMF.Internals.Tables.UTP_Constructors.Create_Utp_Data_Pool;
elsif MC = AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Data_Selector then
Element := AMF.Internals.Tables.UTP_Constructors.Create_Utp_Data_Selector;
elsif MC = AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Default then
Element := AMF.Internals.Tables.UTP_Constructors.Create_Utp_Default;
elsif MC = AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Default_Application then
Element := AMF.Internals.Tables.UTP_Constructors.Create_Utp_Default_Application;
elsif MC = AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Determ_Alt then
Element := AMF.Internals.Tables.UTP_Constructors.Create_Utp_Determ_Alt;
elsif MC = AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Finish_Action then
Element := AMF.Internals.Tables.UTP_Constructors.Create_Utp_Finish_Action;
elsif MC = AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Get_Timezone_Action then
Element := AMF.Internals.Tables.UTP_Constructors.Create_Utp_Get_Timezone_Action;
elsif MC = AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Literal_Any then
Element := AMF.Internals.Tables.UTP_Constructors.Create_Utp_Literal_Any;
elsif MC = AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Literal_Any_Or_Null then
Element := AMF.Internals.Tables.UTP_Constructors.Create_Utp_Literal_Any_Or_Null;
elsif MC = AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Log_Action then
Element := AMF.Internals.Tables.UTP_Constructors.Create_Utp_Log_Action;
elsif MC = AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Managed_Element then
Element := AMF.Internals.Tables.UTP_Constructors.Create_Utp_Managed_Element;
elsif MC = AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Read_Timer_Action then
Element := AMF.Internals.Tables.UTP_Constructors.Create_Utp_Read_Timer_Action;
elsif MC = AMF.Internals.Tables.Utp_Metamodel.MC_Utp_SUT then
Element := AMF.Internals.Tables.UTP_Constructors.Create_Utp_SUT;
elsif MC = AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Set_Timezone_Action then
Element := AMF.Internals.Tables.UTP_Constructors.Create_Utp_Set_Timezone_Action;
elsif MC = AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Start_Timer_Action then
Element := AMF.Internals.Tables.UTP_Constructors.Create_Utp_Start_Timer_Action;
elsif MC = AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Stop_Timer_Action then
Element := AMF.Internals.Tables.UTP_Constructors.Create_Utp_Stop_Timer_Action;
elsif MC = AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Test_Case then
Element := AMF.Internals.Tables.UTP_Constructors.Create_Utp_Test_Case;
elsif MC = AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Test_Component then
Element := AMF.Internals.Tables.UTP_Constructors.Create_Utp_Test_Component;
elsif MC = AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Test_Context then
Element := AMF.Internals.Tables.UTP_Constructors.Create_Utp_Test_Context;
elsif MC = AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Test_Log then
Element := AMF.Internals.Tables.UTP_Constructors.Create_Utp_Test_Log;
elsif MC = AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Test_Log_Application then
Element := AMF.Internals.Tables.UTP_Constructors.Create_Utp_Test_Log_Application;
elsif MC = AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Test_Objective then
Element := AMF.Internals.Tables.UTP_Constructors.Create_Utp_Test_Objective;
elsif MC = AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Test_Suite then
Element := AMF.Internals.Tables.UTP_Constructors.Create_Utp_Test_Suite;
elsif MC = AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Time_Out then
Element := AMF.Internals.Tables.UTP_Constructors.Create_Utp_Time_Out;
elsif MC = AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Time_Out_Action then
Element := AMF.Internals.Tables.UTP_Constructors.Create_Utp_Time_Out_Action;
elsif MC = AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Time_Out_Message then
Element := AMF.Internals.Tables.UTP_Constructors.Create_Utp_Time_Out_Message;
elsif MC = AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Timer_Running_Action then
Element := AMF.Internals.Tables.UTP_Constructors.Create_Utp_Timer_Running_Action;
elsif MC = AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Validation_Action then
Element := AMF.Internals.Tables.UTP_Constructors.Create_Utp_Validation_Action;
else
raise Program_Error;
end if;
AMF.Internals.Extents.Internal_Append (Self.Extent, Element);
AMF.Internals.Listener_Registry.Notify_Instance_Create
(AMF.Internals.Helpers.To_Element (Element));
return AMF.Internals.Helpers.To_Element (Element);
end Create;
------------------------
-- Create_From_String --
------------------------
overriding function Create_From_String
(Self : not null access Utp_Factory;
Data_Type : not null access AMF.CMOF.Data_Types.CMOF_Data_Type'Class;
Image : League.Strings.Universal_String) return League.Holders.Holder
is
pragma Unreferenced (Self);
use type League.Strings.Universal_String;
DT : constant AMF.Internals.CMOF_Element
:= AMF.Internals.Elements.Element_Base'Class (Data_Type.all).Element;
begin
if DT = AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Duration then
return Create_Duration_From_String (Image);
elsif DT = AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Time then
return Create_Time_From_String (Image);
elsif DT = AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Timezone then
return Create_Timezone_From_String (Image);
elsif DT = AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Verdict then
if Image = None_Img then
return
AMF.Utp.Holders.Verdicts.To_Holder
(AMF.Utp.None);
elsif Image = Pass_Img then
return
AMF.Utp.Holders.Verdicts.To_Holder
(AMF.Utp.Pass);
elsif Image = Inconclusive_Img then
return
AMF.Utp.Holders.Verdicts.To_Holder
(AMF.Utp.Inconclusive);
elsif Image = Fail_Img then
return
AMF.Utp.Holders.Verdicts.To_Holder
(AMF.Utp.Fail);
elsif Image = Error_Img then
return
AMF.Utp.Holders.Verdicts.To_Holder
(AMF.Utp.Error);
else
raise Constraint_Error;
end if;
else
raise Program_Error;
end if;
end Create_From_String;
-----------------
-- Create_Link --
-----------------
overriding function Create_Link
(Self : not null access Utp_Factory;
Association :
not null access AMF.CMOF.Associations.CMOF_Association'Class;
First_Element : not null AMF.Elements.Element_Access;
Second_Element : not null AMF.Elements.Element_Access)
return not null AMF.Links.Link_Access
is
pragma Unreferenced (Self);
begin
return
AMF.Internals.Links.Proxy
(AMF.Internals.Links.Create_Link
(AMF.Internals.Elements.Element_Base'Class
(Association.all).Element,
AMF.Internals.Helpers.To_Element (First_Element),
AMF.Internals.Helpers.To_Element (Second_Element)));
end Create_Link;
-----------------
-- Get_Package --
-----------------
overriding function Get_Package
(Self : not null access constant Utp_Factory)
return AMF.CMOF.Packages.Collections.Set_Of_CMOF_Package
is
pragma Unreferenced (Self);
begin
return Result : AMF.CMOF.Packages.Collections.Set_Of_CMOF_Package do
Result.Add (Get_Package);
end return;
end Get_Package;
-----------------
-- Get_Package --
-----------------
function Get_Package return not null AMF.CMOF.Packages.CMOF_Package_Access is
begin
return
AMF.CMOF.Packages.CMOF_Package_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.Utp_Metamodel.MM_Utp_Utp));
end Get_Package;
------------------------
-- Create_Coding_Rule --
------------------------
overriding function Create_Coding_Rule
(Self : not null access Utp_Factory)
return AMF.Utp.Coding_Rules.Utp_Coding_Rule_Access is
begin
return
AMF.Utp.Coding_Rules.Utp_Coding_Rule_Access
(Self.Create
(AMF.CMOF.Classes.CMOF_Class_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Coding_Rule))));
end Create_Coding_Rule;
---------------------------
-- Create_Data_Partition --
---------------------------
overriding function Create_Data_Partition
(Self : not null access Utp_Factory)
return AMF.Utp.Data_Partitions.Utp_Data_Partition_Access is
begin
return
AMF.Utp.Data_Partitions.Utp_Data_Partition_Access
(Self.Create
(AMF.CMOF.Classes.CMOF_Class_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Data_Partition))));
end Create_Data_Partition;
----------------------
-- Create_Data_Pool --
----------------------
overriding function Create_Data_Pool
(Self : not null access Utp_Factory)
return AMF.Utp.Data_Pools.Utp_Data_Pool_Access is
begin
return
AMF.Utp.Data_Pools.Utp_Data_Pool_Access
(Self.Create
(AMF.CMOF.Classes.CMOF_Class_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Data_Pool))));
end Create_Data_Pool;
--------------------------
-- Create_Data_Selector --
--------------------------
overriding function Create_Data_Selector
(Self : not null access Utp_Factory)
return AMF.Utp.Data_Selectors.Utp_Data_Selector_Access is
begin
return
AMF.Utp.Data_Selectors.Utp_Data_Selector_Access
(Self.Create
(AMF.CMOF.Classes.CMOF_Class_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Data_Selector))));
end Create_Data_Selector;
--------------------
-- Create_Default --
--------------------
overriding function Create_Default
(Self : not null access Utp_Factory)
return AMF.Utp.Defaults.Utp_Default_Access is
begin
return
AMF.Utp.Defaults.Utp_Default_Access
(Self.Create
(AMF.CMOF.Classes.CMOF_Class_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Default))));
end Create_Default;
--------------------------------
-- Create_Default_Application --
--------------------------------
overriding function Create_Default_Application
(Self : not null access Utp_Factory)
return AMF.Utp.Default_Applications.Utp_Default_Application_Access is
begin
return
AMF.Utp.Default_Applications.Utp_Default_Application_Access
(Self.Create
(AMF.CMOF.Classes.CMOF_Class_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Default_Application))));
end Create_Default_Application;
-----------------------
-- Create_Determ_Alt --
-----------------------
overriding function Create_Determ_Alt
(Self : not null access Utp_Factory)
return AMF.Utp.Determ_Alts.Utp_Determ_Alt_Access is
begin
return
AMF.Utp.Determ_Alts.Utp_Determ_Alt_Access
(Self.Create
(AMF.CMOF.Classes.CMOF_Class_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Determ_Alt))));
end Create_Determ_Alt;
--------------------------
-- Create_Finish_Action --
--------------------------
overriding function Create_Finish_Action
(Self : not null access Utp_Factory)
return AMF.Utp.Finish_Actions.Utp_Finish_Action_Access is
begin
return
AMF.Utp.Finish_Actions.Utp_Finish_Action_Access
(Self.Create
(AMF.CMOF.Classes.CMOF_Class_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Finish_Action))));
end Create_Finish_Action;
--------------------------------
-- Create_Get_Timezone_Action --
--------------------------------
overriding function Create_Get_Timezone_Action
(Self : not null access Utp_Factory)
return AMF.Utp.Get_Timezone_Actions.Utp_Get_Timezone_Action_Access is
begin
return
AMF.Utp.Get_Timezone_Actions.Utp_Get_Timezone_Action_Access
(Self.Create
(AMF.CMOF.Classes.CMOF_Class_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Get_Timezone_Action))));
end Create_Get_Timezone_Action;
------------------------
-- Create_Literal_Any --
------------------------
overriding function Create_Literal_Any
(Self : not null access Utp_Factory)
return AMF.Utp.Literal_Anies.Utp_Literal_Any_Access is
begin
return
AMF.Utp.Literal_Anies.Utp_Literal_Any_Access
(Self.Create
(AMF.CMOF.Classes.CMOF_Class_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Literal_Any))));
end Create_Literal_Any;
--------------------------------
-- Create_Literal_Any_Or_Null --
--------------------------------
overriding function Create_Literal_Any_Or_Null
(Self : not null access Utp_Factory)
return AMF.Utp.Literal_Any_Or_Nulls.Utp_Literal_Any_Or_Null_Access is
begin
return
AMF.Utp.Literal_Any_Or_Nulls.Utp_Literal_Any_Or_Null_Access
(Self.Create
(AMF.CMOF.Classes.CMOF_Class_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Literal_Any_Or_Null))));
end Create_Literal_Any_Or_Null;
-----------------------
-- Create_Log_Action --
-----------------------
overriding function Create_Log_Action
(Self : not null access Utp_Factory)
return AMF.Utp.Log_Actions.Utp_Log_Action_Access is
begin
return
AMF.Utp.Log_Actions.Utp_Log_Action_Access
(Self.Create
(AMF.CMOF.Classes.CMOF_Class_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Log_Action))));
end Create_Log_Action;
----------------------------
-- Create_Managed_Element --
----------------------------
overriding function Create_Managed_Element
(Self : not null access Utp_Factory)
return AMF.Utp.Managed_Elements.Utp_Managed_Element_Access is
begin
return
AMF.Utp.Managed_Elements.Utp_Managed_Element_Access
(Self.Create
(AMF.CMOF.Classes.CMOF_Class_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Managed_Element))));
end Create_Managed_Element;
------------------------------
-- Create_Read_Timer_Action --
------------------------------
overriding function Create_Read_Timer_Action
(Self : not null access Utp_Factory)
return AMF.Utp.Read_Timer_Actions.Utp_Read_Timer_Action_Access is
begin
return
AMF.Utp.Read_Timer_Actions.Utp_Read_Timer_Action_Access
(Self.Create
(AMF.CMOF.Classes.CMOF_Class_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Read_Timer_Action))));
end Create_Read_Timer_Action;
----------------
-- Create_SUT --
----------------
overriding function Create_SUT
(Self : not null access Utp_Factory)
return AMF.Utp.SUTs.Utp_SUT_Access is
begin
return
AMF.Utp.SUTs.Utp_SUT_Access
(Self.Create
(AMF.CMOF.Classes.CMOF_Class_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.Utp_Metamodel.MC_Utp_SUT))));
end Create_SUT;
--------------------------------
-- Create_Set_Timezone_Action --
--------------------------------
overriding function Create_Set_Timezone_Action
(Self : not null access Utp_Factory)
return AMF.Utp.Set_Timezone_Actions.Utp_Set_Timezone_Action_Access is
begin
return
AMF.Utp.Set_Timezone_Actions.Utp_Set_Timezone_Action_Access
(Self.Create
(AMF.CMOF.Classes.CMOF_Class_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Set_Timezone_Action))));
end Create_Set_Timezone_Action;
-------------------------------
-- Create_Start_Timer_Action --
-------------------------------
overriding function Create_Start_Timer_Action
(Self : not null access Utp_Factory)
return AMF.Utp.Start_Timer_Actions.Utp_Start_Timer_Action_Access is
begin
return
AMF.Utp.Start_Timer_Actions.Utp_Start_Timer_Action_Access
(Self.Create
(AMF.CMOF.Classes.CMOF_Class_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Start_Timer_Action))));
end Create_Start_Timer_Action;
------------------------------
-- Create_Stop_Timer_Action --
------------------------------
overriding function Create_Stop_Timer_Action
(Self : not null access Utp_Factory)
return AMF.Utp.Stop_Timer_Actions.Utp_Stop_Timer_Action_Access is
begin
return
AMF.Utp.Stop_Timer_Actions.Utp_Stop_Timer_Action_Access
(Self.Create
(AMF.CMOF.Classes.CMOF_Class_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Stop_Timer_Action))));
end Create_Stop_Timer_Action;
----------------------
-- Create_Test_Case --
----------------------
overriding function Create_Test_Case
(Self : not null access Utp_Factory)
return AMF.Utp.Test_Cases.Utp_Test_Case_Access is
begin
return
AMF.Utp.Test_Cases.Utp_Test_Case_Access
(Self.Create
(AMF.CMOF.Classes.CMOF_Class_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Test_Case))));
end Create_Test_Case;
---------------------------
-- Create_Test_Component --
---------------------------
overriding function Create_Test_Component
(Self : not null access Utp_Factory)
return AMF.Utp.Test_Components.Utp_Test_Component_Access is
begin
return
AMF.Utp.Test_Components.Utp_Test_Component_Access
(Self.Create
(AMF.CMOF.Classes.CMOF_Class_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Test_Component))));
end Create_Test_Component;
-------------------------
-- Create_Test_Context --
-------------------------
overriding function Create_Test_Context
(Self : not null access Utp_Factory)
return AMF.Utp.Test_Contexts.Utp_Test_Context_Access is
begin
return
AMF.Utp.Test_Contexts.Utp_Test_Context_Access
(Self.Create
(AMF.CMOF.Classes.CMOF_Class_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Test_Context))));
end Create_Test_Context;
---------------------
-- Create_Test_Log --
---------------------
overriding function Create_Test_Log
(Self : not null access Utp_Factory)
return AMF.Utp.Test_Logs.Utp_Test_Log_Access is
begin
return
AMF.Utp.Test_Logs.Utp_Test_Log_Access
(Self.Create
(AMF.CMOF.Classes.CMOF_Class_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Test_Log))));
end Create_Test_Log;
---------------------------------
-- Create_Test_Log_Application --
---------------------------------
overriding function Create_Test_Log_Application
(Self : not null access Utp_Factory)
return AMF.Utp.Test_Log_Applications.Utp_Test_Log_Application_Access is
begin
return
AMF.Utp.Test_Log_Applications.Utp_Test_Log_Application_Access
(Self.Create
(AMF.CMOF.Classes.CMOF_Class_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Test_Log_Application))));
end Create_Test_Log_Application;
---------------------------
-- Create_Test_Objective --
---------------------------
overriding function Create_Test_Objective
(Self : not null access Utp_Factory)
return AMF.Utp.Test_Objectives.Utp_Test_Objective_Access is
begin
return
AMF.Utp.Test_Objectives.Utp_Test_Objective_Access
(Self.Create
(AMF.CMOF.Classes.CMOF_Class_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Test_Objective))));
end Create_Test_Objective;
-----------------------
-- Create_Test_Suite --
-----------------------
overriding function Create_Test_Suite
(Self : not null access Utp_Factory)
return AMF.Utp.Test_Suites.Utp_Test_Suite_Access is
begin
return
AMF.Utp.Test_Suites.Utp_Test_Suite_Access
(Self.Create
(AMF.CMOF.Classes.CMOF_Class_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Test_Suite))));
end Create_Test_Suite;
---------------------
-- Create_Time_Out --
---------------------
overriding function Create_Time_Out
(Self : not null access Utp_Factory)
return AMF.Utp.Time_Outs.Utp_Time_Out_Access is
begin
return
AMF.Utp.Time_Outs.Utp_Time_Out_Access
(Self.Create
(AMF.CMOF.Classes.CMOF_Class_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Time_Out))));
end Create_Time_Out;
----------------------------
-- Create_Time_Out_Action --
----------------------------
overriding function Create_Time_Out_Action
(Self : not null access Utp_Factory)
return AMF.Utp.Time_Out_Actions.Utp_Time_Out_Action_Access is
begin
return
AMF.Utp.Time_Out_Actions.Utp_Time_Out_Action_Access
(Self.Create
(AMF.CMOF.Classes.CMOF_Class_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Time_Out_Action))));
end Create_Time_Out_Action;
-----------------------------
-- Create_Time_Out_Message --
-----------------------------
overriding function Create_Time_Out_Message
(Self : not null access Utp_Factory)
return AMF.Utp.Time_Out_Messages.Utp_Time_Out_Message_Access is
begin
return
AMF.Utp.Time_Out_Messages.Utp_Time_Out_Message_Access
(Self.Create
(AMF.CMOF.Classes.CMOF_Class_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Time_Out_Message))));
end Create_Time_Out_Message;
---------------------------------
-- Create_Timer_Running_Action --
---------------------------------
overriding function Create_Timer_Running_Action
(Self : not null access Utp_Factory)
return AMF.Utp.Timer_Running_Actions.Utp_Timer_Running_Action_Access is
begin
return
AMF.Utp.Timer_Running_Actions.Utp_Timer_Running_Action_Access
(Self.Create
(AMF.CMOF.Classes.CMOF_Class_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Timer_Running_Action))));
end Create_Timer_Running_Action;
------------------------------
-- Create_Validation_Action --
------------------------------
overriding function Create_Validation_Action
(Self : not null access Utp_Factory)
return AMF.Utp.Validation_Actions.Utp_Validation_Action_Access is
begin
return
AMF.Utp.Validation_Actions.Utp_Validation_Action_Access
(Self.Create
(AMF.CMOF.Classes.CMOF_Class_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.Utp_Metamodel.MC_Utp_Validation_Action))));
end Create_Validation_Action;
end AMF.Internals.Factories.Utp_Factories;
|
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_21829_2021.asm | ljhsiun2/medusa | 9 | 18490 | <filename>Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_21829_2021.asm<gh_stars>1-10
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r14
push %r8
push %r9
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_UC_ht+0x1bb7d, %r14
nop
nop
xor $40682, %rdi
mov (%r14), %r8w
nop
cmp %r10, %r10
lea addresses_UC_ht+0x1e37d, %r9
nop
nop
nop
nop
nop
sub $25193, %rcx
vmovups (%r9), %ymm4
vextracti128 $1, %ymm4, %xmm4
vpextrq $0, %xmm4, %rdi
nop
nop
sub %r9, %r9
lea addresses_UC_ht+0x2cbd, %r14
nop
nop
xor %rbx, %rbx
movw $0x6162, (%r14)
nop
cmp %rcx, %rcx
lea addresses_A_ht+0x3575, %r14
nop
xor $52045, %r8
movl $0x61626364, (%r14)
dec %rbx
lea addresses_WC_ht+0x15a3d, %rsi
lea addresses_UC_ht+0xbd4d, %rdi
nop
nop
nop
nop
nop
cmp %r8, %r8
mov $39, %rcx
rep movsl
nop
nop
nop
nop
nop
and %rsi, %rsi
lea addresses_WC_ht+0xf141, %rbx
cmp %rcx, %rcx
mov (%rbx), %si
nop
nop
nop
nop
lfence
lea addresses_A_ht+0x1a1e0, %rcx
xor %r8, %r8
movb (%rcx), %r9b
nop
nop
mfence
lea addresses_D_ht+0xdcbd, %rsi
lea addresses_WT_ht+0x1603d, %rdi
nop
nop
nop
sub $41052, %r14
mov $56, %rcx
rep movsb
nop
nop
add %r10, %r10
lea addresses_WT_ht+0x97f9, %r14
nop
nop
nop
nop
nop
sub $44506, %rsi
vmovups (%r14), %ymm3
vextracti128 $0, %ymm3, %xmm3
vpextrq $1, %xmm3, %rdi
and $46175, %r8
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %r9
pop %r8
pop %r14
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r12
push %r9
push %rbx
push %rcx
// Faulty Load
lea addresses_WC+0x1b43d, %r9
nop
nop
sub %r12, %r12
mov (%r9), %ebx
lea oracles, %r11
and $0xff, %rbx
shlq $12, %rbx
mov (%r11,%rbx,1), %rbx
pop %rcx
pop %rbx
pop %r9
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_WC', 'AVXalign': False, 'size': 1, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'type': 'addresses_WC', 'AVXalign': False, 'size': 4, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 2, 'NT': False, 'same': True, 'congruent': 6}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 6}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 2, 'NT': False, 'same': True, 'congruent': 7}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 1}}
{'src': {'type': 'addresses_WC_ht', 'congruent': 7, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 2, 'same': False}}
{'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_D_ht', 'congruent': 7, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WT_ht', 'congruent': 10, 'same': False}}
{'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 1}, 'OP': 'LOAD'}
{'38': 21829}
38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38
*/
|
programs/oeis/188/A188072.asm | neoneye/loda | 22 | 173081 | ; A188072: Positions of 0 in A188071; complement of A188073.
; 1,2,4,5,8,9,12,13,15,16,19,20,23,24,27,28,30,31,34,35,38,39,42,43,45,46,49,50,53,54,56,57,60,61,64,65,68,69,71,72,75,76,79,80,83,84,86,87,90,91,94,95,98,99,101,102,105,106,109,110,112,113,116,117,120,121,124,125,127,128,131,132,135,136,139,140,142,143
mov $1,$0
mov $0,1
mov $2,$1
div $1,2
mul $1,-52
mov $3,5
mov $4,$1
add $4,6
sub $3,$4
div $3,-30
sub $0,$3
add $0,$2
|
Tools/Product.agda | loic-p/logrel-mltt | 0 | 4486 | -- Σ type (also used as existential) and
-- cartesian product (also used as conjunction).
{-# OPTIONS --without-K --safe #-}
module Tools.Product where
open import Agda.Primitive
infixr 4 _,_
infixr 2 _×_
-- Dependent pair type (aka dependent sum, Σ type).
record Σ {ℓ ℓ′ : Level} (A : Set ℓ) (B : A → Set ℓ′) : Set (ℓ ⊔ ℓ′) where
constructor _,_
field
proj₁ : A
proj₂ : B proj₁
open Σ public
record Σω₀ {ℓ} (A : Set ℓ) (B : A → Setω) : Setω where
constructor _,_
field
proj₁ : A
proj₂ : B proj₁
open Σω₀ public
record Σω₂ {ℓ} (A : Setω) (B : A → Set ℓ) : Setω where
constructor _,_
field
proj₁ : A
proj₂ : B proj₁
open Σω₂ public
record Σω₃ (A : Setω) (B : A → Setω) : Setω where
constructor _,_
field
proj₁ : A
proj₂ : B proj₁
open Σω₃ public
record Σω₄ (A : Setω₁) (B : A → Setω) : Setω₁ where
constructor _,_
field
proj₁ : A
proj₂ : B proj₁
open Σω₄ public
-- Existential quantification.
∃ : {ℓ ℓ′ : Level} → {A : Set ℓ} → (A → Set ℓ′) → Set (ℓ ⊔ ℓ′)
∃ = Σ _
∃₂ : {ℓ ℓ′ ℓ″ : Level} → {A : Set ℓ} {B : A → Set ℓ′}
(C : (x : A) → B x → Set ℓ″) → Set (ℓ ⊔ ℓ′ ⊔ ℓ″)
∃₂ C = ∃ λ a → ∃ λ b → C a b
∃ω₃ : {A : Setω} → (A → Setω) → Setω
∃ω₃ = Σω₃ _
∃ω₃² : {A : Setω} {B : A → Setω}
(C : (x : A) → B x → Setω) → Setω
∃ω₃² C = ∃ω₃ λ a → ∃ω₃ λ b → C a b
∃ω₄ : {A : Setω₁} → (A → Setω) → Setω₁
∃ω₄ = Σω₄ _
-- Cartesian product.
_×_ : {ℓ ℓ′ : Level} → (A : Set ℓ) → (B : Set ℓ′) → Set (ℓ ⊔ ℓ′)
A × B = Σ A (λ x → B)
_×ω₂_ : {ℓ : Level} → (A : Setω) → (B : Set ℓ) → Setω
A ×ω₂ B = Σω₂ A (λ x → B)
_×ω₃_ : (A : Setω) → (B : Setω) → Setω
A ×ω₃ B = Σω₃ A (λ x → B)
|
Transynther/x86/_processed/NONE/_zr_xt_/i7-8650U_0xd2_notsx.log_9905_1406.asm | ljhsiun2/medusa | 9 | 173826 | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r11
push %r13
push %r15
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_UC_ht+0x16b40, %rdx
clflush (%rdx)
nop
nop
nop
nop
xor $40086, %rdi
mov (%rdx), %si
nop
add %r10, %r10
lea addresses_WT_ht+0x1e5fc, %r11
nop
nop
add $38234, %r15
mov $0x6162636465666768, %r13
movq %r13, %xmm3
vmovups %ymm3, (%r11)
nop
nop
and $9920, %r10
lea addresses_WC_ht+0x1b78c, %rsi
lea addresses_D_ht+0x16914, %rdi
nop
nop
cmp $56602, %r13
mov $76, %rcx
rep movsq
nop
nop
nop
nop
nop
xor %r11, %r11
lea addresses_WC_ht+0x890c, %rsi
lea addresses_UC_ht+0xcf8c, %rdi
nop
nop
dec %r15
mov $87, %rcx
rep movsw
nop
nop
nop
nop
add $15415, %rdi
lea addresses_D_ht+0x225c, %r11
nop
nop
nop
cmp %r13, %r13
vmovups (%r11), %ymm1
vextracti128 $1, %ymm1, %xmm1
vpextrq $1, %xmm1, %rdi
xor %rdi, %rdi
lea addresses_UC_ht+0xe78c, %rsi
lea addresses_A_ht+0x2f8c, %rdi
nop
cmp %r11, %r11
mov $107, %rcx
rep movsb
nop
nop
sub $58810, %r15
lea addresses_normal_ht+0x1a78c, %rdx
nop
nop
sub $21239, %r11
mov (%rdx), %cx
nop
nop
nop
nop
nop
xor %rcx, %rcx
lea addresses_WT_ht+0xb8c8, %rsi
lea addresses_WC_ht+0x100ac, %rdi
clflush (%rsi)
nop
nop
and $61749, %r15
mov $50, %rcx
rep movsw
nop
inc %rsi
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %r15
pop %r13
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r12
push %r9
push %rbx
push %rdx
push %rsi
// Store
lea addresses_PSE+0x1978c, %r10
nop
and %rsi, %rsi
mov $0x5152535455565758, %r12
movq %r12, (%r10)
xor %r10, %r10
// Faulty Load
lea addresses_A+0x5f8c, %rsi
and %rdx, %rdx
movups (%rsi), %xmm7
vpextrq $0, %xmm7, %r9
lea oracles, %r10
and $0xff, %r9
shlq $12, %r9
mov (%r10,%r9,1), %r9
pop %rsi
pop %rdx
pop %rbx
pop %r9
pop %r12
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_A', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_PSE', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_A', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'size': 2, 'AVXalign': True, 'NT': False, 'congruent': 2, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 4, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 2, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 11, 'same': True}}
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 4, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 11, 'same': True}, 'dst': {'type': 'addresses_A_ht', 'congruent': 11, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 2, 'same': True}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 5, 'same': False}}
{'00': 1, '35': 9904}
00 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35
*/
|
oscomp/build/asm/sleep.asm | wei-huan/MyOS | 2 | 100471 | <gh_stars>1-10
/home/weihuan/Documents/testsuits-for-oskernel-preliminary/riscv-syscalls-testing/user/build/riscv64/sleep: file format elf64-littleriscv
Disassembly of section .text:
0000000000001000 <_start>:
.section .text.entry
.globl _start
_start:
mv a0, sp
1000: 850a mv a0,sp
tail __start_main
1002: a8f1 j 10de <__start_main>
0000000000001004 <test_sleep>:
* 测试通过时的输出:
* "sleep success."
* 测试失败时的输出:
* "sleep error."
*/
void test_sleep() {
1004: 1101 addi sp,sp,-32
TEST_START(__func__);
1006: 00001517 auipc a0,0x1
100a: f1250513 addi a0,a0,-238 # 1f18 <__clone+0x28>
void test_sleep() {
100e: ec06 sd ra,24(sp)
1010: e426 sd s1,8(sp)
1012: e822 sd s0,16(sp)
TEST_START(__func__);
1014: 33c000ef jal ra,1350 <puts>
1018: 00001517 auipc a0,0x1
101c: f9850513 addi a0,a0,-104 # 1fb0 <__func__.0>
1020: 330000ef jal ra,1350 <puts>
1024: 00001517 auipc a0,0x1
1028: f0c50513 addi a0,a0,-244 # 1f30 <__clone+0x40>
102c: 324000ef jal ra,1350 <puts>
int time1 = get_time();
1030: 515000ef jal ra,1d44 <get_time>
1034: 0005049b sext.w s1,a0
assert(time1 >= 0);
1038: 0804c463 bltz s1,10c0 <test_sleep+0xbc>
int ret = sleep(1);
103c: 4505 li a0,1
103e: 54d000ef jal ra,1d8a <sleep>
assert(ret == 0);
1042: ed21 bnez a0,109a <test_sleep+0x96>
int time2 = get_time();
1044: 501000ef jal ra,1d44 <get_time>
1048: 0005041b sext.w s0,a0
assert(time2 >= 0);
104c: 06044363 bltz s0,10b2 <test_sleep+0xae>
if(time2 - time1 >= 1){
1050: 9c05 subw s0,s0,s1
1052: 02805d63 blez s0,108c <test_sleep+0x88>
printf("sleep success.\n");
1056: 00001517 auipc a0,0x1
105a: f0a50513 addi a0,a0,-246 # 1f60 <__clone+0x70>
105e: 314000ef jal ra,1372 <printf>
}else{
printf("sleep error.\n");
}
TEST_END(__func__);
1062: 00001517 auipc a0,0x1
1066: f1e50513 addi a0,a0,-226 # 1f80 <__clone+0x90>
106a: 2e6000ef jal ra,1350 <puts>
106e: 00001517 auipc a0,0x1
1072: f4250513 addi a0,a0,-190 # 1fb0 <__func__.0>
1076: 2da000ef jal ra,1350 <puts>
}
107a: 6442 ld s0,16(sp)
107c: 60e2 ld ra,24(sp)
107e: 64a2 ld s1,8(sp)
TEST_END(__func__);
1080: 00001517 auipc a0,0x1
1084: eb050513 addi a0,a0,-336 # 1f30 <__clone+0x40>
}
1088: 6105 addi sp,sp,32
TEST_END(__func__);
108a: a4d9 j 1350 <puts>
printf("sleep error.\n");
108c: 00001517 auipc a0,0x1
1090: ee450513 addi a0,a0,-284 # 1f70 <__clone+0x80>
1094: 2de000ef jal ra,1372 <printf>
1098: b7e9 j 1062 <test_sleep+0x5e>
assert(ret == 0);
109a: 00001517 auipc a0,0x1
109e: ea650513 addi a0,a0,-346 # 1f40 <__clone+0x50>
10a2: 554000ef jal ra,15f6 <panic>
int time2 = get_time();
10a6: 49f000ef jal ra,1d44 <get_time>
10aa: 0005041b sext.w s0,a0
assert(time2 >= 0);
10ae: fa0451e3 bgez s0,1050 <test_sleep+0x4c>
10b2: 00001517 auipc a0,0x1
10b6: e8e50513 addi a0,a0,-370 # 1f40 <__clone+0x50>
10ba: 53c000ef jal ra,15f6 <panic>
10be: bf49 j 1050 <test_sleep+0x4c>
assert(time1 >= 0);
10c0: 00001517 auipc a0,0x1
10c4: e8050513 addi a0,a0,-384 # 1f40 <__clone+0x50>
10c8: 52e000ef jal ra,15f6 <panic>
10cc: bf85 j 103c <test_sleep+0x38>
00000000000010ce <main>:
int main(void) {
10ce: 1141 addi sp,sp,-16
10d0: e406 sd ra,8(sp)
test_sleep();
10d2: f33ff0ef jal ra,1004 <test_sleep>
return 0;
}
10d6: 60a2 ld ra,8(sp)
10d8: 4501 li a0,0
10da: 0141 addi sp,sp,16
10dc: 8082 ret
00000000000010de <__start_main>:
#include <unistd.h>
extern int main();
int __start_main(long *p)
{
10de: 85aa mv a1,a0
int argc = p[0];
char **argv = (void *)(p+1);
exit(main(argc, argv));
10e0: 4108 lw a0,0(a0)
{
10e2: 1141 addi sp,sp,-16
exit(main(argc, argv));
10e4: 05a1 addi a1,a1,8
{
10e6: e406 sd ra,8(sp)
exit(main(argc, argv));
10e8: fe7ff0ef jal ra,10ce <main>
10ec: 41d000ef jal ra,1d08 <exit>
return 0;
}
10f0: 60a2 ld ra,8(sp)
10f2: 4501 li a0,0
10f4: 0141 addi sp,sp,16
10f6: 8082 ret
00000000000010f8 <printint.constprop.0>:
write(f, s, l);
}
static char digits[] = "0123456789abcdef";
static void printint(int xx, int base, int sign)
10f8: 7179 addi sp,sp,-48
10fa: f406 sd ra,40(sp)
{
char buf[16 + 1];
int i;
uint x;
if (sign && (sign = xx < 0))
10fc: 12054b63 bltz a0,1232 <printint.constprop.0+0x13a>
buf[16] = 0;
i = 15;
do
{
buf[i--] = digits[x % base];
1100: 02b577bb remuw a5,a0,a1
1104: 00001617 auipc a2,0x1
1108: ebc60613 addi a2,a2,-324 # 1fc0 <digits>
buf[16] = 0;
110c: 00010c23 sb zero,24(sp)
buf[i--] = digits[x % base];
1110: 0005871b sext.w a4,a1
1114: 1782 slli a5,a5,0x20
1116: 9381 srli a5,a5,0x20
1118: 97b2 add a5,a5,a2
111a: 0007c783 lbu a5,0(a5)
} while ((x /= base) != 0);
111e: 02b5583b divuw a6,a0,a1
buf[i--] = digits[x % base];
1122: 00f10ba3 sb a5,23(sp)
} while ((x /= base) != 0);
1126: 1cb56363 bltu a0,a1,12ec <printint.constprop.0+0x1f4>
buf[i--] = digits[x % base];
112a: 45b9 li a1,14
112c: 02e877bb remuw a5,a6,a4
1130: 1782 slli a5,a5,0x20
1132: 9381 srli a5,a5,0x20
1134: 97b2 add a5,a5,a2
1136: 0007c783 lbu a5,0(a5)
} while ((x /= base) != 0);
113a: 02e856bb divuw a3,a6,a4
buf[i--] = digits[x % base];
113e: 00f10b23 sb a5,22(sp)
} while ((x /= base) != 0);
1142: 0ce86e63 bltu a6,a4,121e <printint.constprop.0+0x126>
buf[i--] = digits[x % base];
1146: 02e6f5bb remuw a1,a3,a4
} while ((x /= base) != 0);
114a: 02e6d7bb divuw a5,a3,a4
buf[i--] = digits[x % base];
114e: 1582 slli a1,a1,0x20
1150: 9181 srli a1,a1,0x20
1152: 95b2 add a1,a1,a2
1154: 0005c583 lbu a1,0(a1)
1158: 00b10aa3 sb a1,21(sp)
} while ((x /= base) != 0);
115c: 0007859b sext.w a1,a5
1160: 12e6ec63 bltu a3,a4,1298 <printint.constprop.0+0x1a0>
buf[i--] = digits[x % base];
1164: 02e7f6bb remuw a3,a5,a4
1168: 1682 slli a3,a3,0x20
116a: 9281 srli a3,a3,0x20
116c: 96b2 add a3,a3,a2
116e: 0006c683 lbu a3,0(a3)
} while ((x /= base) != 0);
1172: 02e7d83b divuw a6,a5,a4
buf[i--] = digits[x % base];
1176: 00d10a23 sb a3,20(sp)
} while ((x /= base) != 0);
117a: 12e5e863 bltu a1,a4,12aa <printint.constprop.0+0x1b2>
buf[i--] = digits[x % base];
117e: 02e876bb remuw a3,a6,a4
1182: 1682 slli a3,a3,0x20
1184: 9281 srli a3,a3,0x20
1186: 96b2 add a3,a3,a2
1188: 0006c683 lbu a3,0(a3)
} while ((x /= base) != 0);
118c: 02e855bb divuw a1,a6,a4
buf[i--] = digits[x % base];
1190: 00d109a3 sb a3,19(sp)
} while ((x /= base) != 0);
1194: 12e86463 bltu a6,a4,12bc <printint.constprop.0+0x1c4>
buf[i--] = digits[x % base];
1198: 02e5f6bb remuw a3,a1,a4
119c: 1682 slli a3,a3,0x20
119e: 9281 srli a3,a3,0x20
11a0: 96b2 add a3,a3,a2
11a2: 0006c683 lbu a3,0(a3)
} while ((x /= base) != 0);
11a6: 02e5d83b divuw a6,a1,a4
buf[i--] = digits[x % base];
11aa: 00d10923 sb a3,18(sp)
} while ((x /= base) != 0);
11ae: 0ce5ec63 bltu a1,a4,1286 <printint.constprop.0+0x18e>
buf[i--] = digits[x % base];
11b2: 02e876bb remuw a3,a6,a4
11b6: 1682 slli a3,a3,0x20
11b8: 9281 srli a3,a3,0x20
11ba: 96b2 add a3,a3,a2
11bc: 0006c683 lbu a3,0(a3)
} while ((x /= base) != 0);
11c0: 02e855bb divuw a1,a6,a4
buf[i--] = digits[x % base];
11c4: 00d108a3 sb a3,17(sp)
} while ((x /= base) != 0);
11c8: 10e86963 bltu a6,a4,12da <printint.constprop.0+0x1e2>
buf[i--] = digits[x % base];
11cc: 02e5f6bb remuw a3,a1,a4
11d0: 1682 slli a3,a3,0x20
11d2: 9281 srli a3,a3,0x20
11d4: 96b2 add a3,a3,a2
11d6: 0006c683 lbu a3,0(a3)
} while ((x /= base) != 0);
11da: 02e5d83b divuw a6,a1,a4
buf[i--] = digits[x % base];
11de: 00d10823 sb a3,16(sp)
} while ((x /= base) != 0);
11e2: 10e5e763 bltu a1,a4,12f0 <printint.constprop.0+0x1f8>
buf[i--] = digits[x % base];
11e6: 02e876bb remuw a3,a6,a4
11ea: 1682 slli a3,a3,0x20
11ec: 9281 srli a3,a3,0x20
11ee: 96b2 add a3,a3,a2
11f0: 0006c683 lbu a3,0(a3)
} while ((x /= base) != 0);
11f4: 02e857bb divuw a5,a6,a4
buf[i--] = digits[x % base];
11f8: 00d107a3 sb a3,15(sp)
} while ((x /= base) != 0);
11fc: 10e86363 bltu a6,a4,1302 <printint.constprop.0+0x20a>
buf[i--] = digits[x % base];
1200: 1782 slli a5,a5,0x20
1202: 9381 srli a5,a5,0x20
1204: 97b2 add a5,a5,a2
1206: 0007c783 lbu a5,0(a5)
120a: 4599 li a1,6
120c: 00f10723 sb a5,14(sp)
if (sign)
1210: 00055763 bgez a0,121e <printint.constprop.0+0x126>
buf[i--] = '-';
1214: 02d00793 li a5,45
1218: 00f106a3 sb a5,13(sp)
buf[i--] = digits[x % base];
121c: 4595 li a1,5
write(f, s, l);
121e: 003c addi a5,sp,8
1220: 4641 li a2,16
1222: 9e0d subw a2,a2,a1
1224: 4505 li a0,1
1226: 95be add a1,a1,a5
1228: 291000ef jal ra,1cb8 <write>
i++;
if (i < 0)
puts("printint error");
out(stdout, buf + i, 16 - i);
}
122c: 70a2 ld ra,40(sp)
122e: 6145 addi sp,sp,48
1230: 8082 ret
x = -xx;
1232: 40a0083b negw a6,a0
buf[i--] = digits[x % base];
1236: 02b877bb remuw a5,a6,a1
123a: 00001617 auipc a2,0x1
123e: d8660613 addi a2,a2,-634 # 1fc0 <digits>
buf[16] = 0;
1242: 00010c23 sb zero,24(sp)
buf[i--] = digits[x % base];
1246: 0005871b sext.w a4,a1
124a: 1782 slli a5,a5,0x20
124c: 9381 srli a5,a5,0x20
124e: 97b2 add a5,a5,a2
1250: 0007c783 lbu a5,0(a5)
} while ((x /= base) != 0);
1254: 02b858bb divuw a7,a6,a1
buf[i--] = digits[x % base];
1258: 00f10ba3 sb a5,23(sp)
} while ((x /= base) != 0);
125c: 06b86963 bltu a6,a1,12ce <printint.constprop.0+0x1d6>
buf[i--] = digits[x % base];
1260: 02e8f7bb remuw a5,a7,a4
1264: 1782 slli a5,a5,0x20
1266: 9381 srli a5,a5,0x20
1268: 97b2 add a5,a5,a2
126a: 0007c783 lbu a5,0(a5)
} while ((x /= base) != 0);
126e: 02e8d6bb divuw a3,a7,a4
buf[i--] = digits[x % base];
1272: 00f10b23 sb a5,22(sp)
} while ((x /= base) != 0);
1276: ece8f8e3 bgeu a7,a4,1146 <printint.constprop.0+0x4e>
buf[i--] = '-';
127a: 02d00793 li a5,45
127e: 00f10aa3 sb a5,21(sp)
buf[i--] = digits[x % base];
1282: 45b5 li a1,13
1284: bf69 j 121e <printint.constprop.0+0x126>
1286: 45a9 li a1,10
if (sign)
1288: f8055be3 bgez a0,121e <printint.constprop.0+0x126>
buf[i--] = '-';
128c: 02d00793 li a5,45
1290: 00f108a3 sb a5,17(sp)
buf[i--] = digits[x % base];
1294: 45a5 li a1,9
1296: b761 j 121e <printint.constprop.0+0x126>
1298: 45b5 li a1,13
if (sign)
129a: f80552e3 bgez a0,121e <printint.constprop.0+0x126>
buf[i--] = '-';
129e: 02d00793 li a5,45
12a2: 00f10a23 sb a5,20(sp)
buf[i--] = digits[x % base];
12a6: 45b1 li a1,12
12a8: bf9d j 121e <printint.constprop.0+0x126>
12aa: 45b1 li a1,12
if (sign)
12ac: f60559e3 bgez a0,121e <printint.constprop.0+0x126>
buf[i--] = '-';
12b0: 02d00793 li a5,45
12b4: 00f109a3 sb a5,19(sp)
buf[i--] = digits[x % base];
12b8: 45ad li a1,11
12ba: b795 j 121e <printint.constprop.0+0x126>
12bc: 45ad li a1,11
if (sign)
12be: f60550e3 bgez a0,121e <printint.constprop.0+0x126>
buf[i--] = '-';
12c2: 02d00793 li a5,45
12c6: 00f10923 sb a5,18(sp)
buf[i--] = digits[x % base];
12ca: 45a9 li a1,10
12cc: bf89 j 121e <printint.constprop.0+0x126>
buf[i--] = '-';
12ce: 02d00793 li a5,45
12d2: 00f10b23 sb a5,22(sp)
buf[i--] = digits[x % base];
12d6: 45b9 li a1,14
12d8: b799 j 121e <printint.constprop.0+0x126>
12da: 45a5 li a1,9
if (sign)
12dc: f40551e3 bgez a0,121e <printint.constprop.0+0x126>
buf[i--] = '-';
12e0: 02d00793 li a5,45
12e4: 00f10823 sb a5,16(sp)
buf[i--] = digits[x % base];
12e8: 45a1 li a1,8
12ea: bf15 j 121e <printint.constprop.0+0x126>
i = 15;
12ec: 45bd li a1,15
12ee: bf05 j 121e <printint.constprop.0+0x126>
buf[i--] = digits[x % base];
12f0: 45a1 li a1,8
if (sign)
12f2: f20556e3 bgez a0,121e <printint.constprop.0+0x126>
buf[i--] = '-';
12f6: 02d00793 li a5,45
12fa: 00f107a3 sb a5,15(sp)
buf[i--] = digits[x % base];
12fe: 459d li a1,7
1300: bf39 j 121e <printint.constprop.0+0x126>
1302: 459d li a1,7
if (sign)
1304: f0055de3 bgez a0,121e <printint.constprop.0+0x126>
buf[i--] = '-';
1308: 02d00793 li a5,45
130c: 00f10723 sb a5,14(sp)
buf[i--] = digits[x % base];
1310: 4599 li a1,6
1312: b731 j 121e <printint.constprop.0+0x126>
0000000000001314 <getchar>:
{
1314: 1101 addi sp,sp,-32
read(stdin, &byte, 1);
1316: 00f10593 addi a1,sp,15
131a: 4605 li a2,1
131c: 4501 li a0,0
{
131e: ec06 sd ra,24(sp)
char byte = 0;
1320: 000107a3 sb zero,15(sp)
read(stdin, &byte, 1);
1324: 18b000ef jal ra,1cae <read>
}
1328: 60e2 ld ra,24(sp)
132a: 00f14503 lbu a0,15(sp)
132e: 6105 addi sp,sp,32
1330: 8082 ret
0000000000001332 <putchar>:
{
1332: 1101 addi sp,sp,-32
1334: 87aa mv a5,a0
return write(stdout, &byte, 1);
1336: 00f10593 addi a1,sp,15
133a: 4605 li a2,1
133c: 4505 li a0,1
{
133e: ec06 sd ra,24(sp)
char byte = c;
1340: 00f107a3 sb a5,15(sp)
return write(stdout, &byte, 1);
1344: 175000ef jal ra,1cb8 <write>
}
1348: 60e2 ld ra,24(sp)
134a: 2501 sext.w a0,a0
134c: 6105 addi sp,sp,32
134e: 8082 ret
0000000000001350 <puts>:
{
1350: 1141 addi sp,sp,-16
1352: e406 sd ra,8(sp)
1354: e022 sd s0,0(sp)
1356: 842a mv s0,a0
r = -(write(stdout, s, strlen(s)) < 0);
1358: 57c000ef jal ra,18d4 <strlen>
135c: 862a mv a2,a0
135e: 85a2 mv a1,s0
1360: 4505 li a0,1
1362: 157000ef jal ra,1cb8 <write>
}
1366: 60a2 ld ra,8(sp)
1368: 6402 ld s0,0(sp)
r = -(write(stdout, s, strlen(s)) < 0);
136a: 957d srai a0,a0,0x3f
return r;
136c: 2501 sext.w a0,a0
}
136e: 0141 addi sp,sp,16
1370: 8082 ret
0000000000001372 <printf>:
out(stdout, buf, i);
}
// Print to the console. only understands %d, %x, %p, %s.
void printf(const char *fmt, ...)
{
1372: 7171 addi sp,sp,-176
1374: fc56 sd s5,56(sp)
1376: ed3e sd a5,152(sp)
buf[i++] = '0';
1378: 7ae1 lui s5,0xffff8
va_list ap;
int cnt = 0, l = 0;
char *a, *z, *s = (char *)fmt, str;
int f = stdout;
va_start(ap, fmt);
137a: 18bc addi a5,sp,120
{
137c: e8ca sd s2,80(sp)
137e: e4ce sd s3,72(sp)
1380: e0d2 sd s4,64(sp)
1382: f85a sd s6,48(sp)
1384: f486 sd ra,104(sp)
1386: f0a2 sd s0,96(sp)
1388: eca6 sd s1,88(sp)
138a: fcae sd a1,120(sp)
138c: e132 sd a2,128(sp)
138e: e536 sd a3,136(sp)
1390: e93a sd a4,144(sp)
1392: f142 sd a6,160(sp)
1394: f546 sd a7,168(sp)
va_start(ap, fmt);
1396: e03e sd a5,0(sp)
for (;;)
{
if (!*s)
break;
for (a = s; *s && *s != '%'; s++)
1398: 02500913 li s2,37
out(f, a, l);
if (l)
continue;
if (s[1] == 0)
break;
switch (s[1])
139c: 07300a13 li s4,115
case 'p':
printptr(va_arg(ap, uint64));
break;
case 's':
if ((a = va_arg(ap, char *)) == 0)
a = "(null)";
13a0: 00001b17 auipc s6,0x1
13a4: bf0b0b13 addi s6,s6,-1040 # 1f90 <__clone+0xa0>
buf[i++] = '0';
13a8: 830aca93 xori s5,s5,-2000
buf[i++] = digits[x >> (sizeof(uint64) * 8 - 4)];
13ac: 00001997 auipc s3,0x1
13b0: c1498993 addi s3,s3,-1004 # 1fc0 <digits>
if (!*s)
13b4: 00054783 lbu a5,0(a0)
13b8: 16078a63 beqz a5,152c <printf+0x1ba>
13bc: 862a mv a2,a0
for (a = s; *s && *s != '%'; s++)
13be: 19278163 beq a5,s2,1540 <printf+0x1ce>
13c2: 00164783 lbu a5,1(a2)
13c6: 0605 addi a2,a2,1
13c8: fbfd bnez a5,13be <printf+0x4c>
13ca: 84b2 mv s1,a2
l = z - a;
13cc: 40a6043b subw s0,a2,a0
write(f, s, l);
13d0: 85aa mv a1,a0
13d2: 8622 mv a2,s0
13d4: 4505 li a0,1
13d6: 0e3000ef jal ra,1cb8 <write>
if (l)
13da: 18041c63 bnez s0,1572 <printf+0x200>
if (s[1] == 0)
13de: 0014c783 lbu a5,1(s1)
13e2: 14078563 beqz a5,152c <printf+0x1ba>
switch (s[1])
13e6: 1d478063 beq a5,s4,15a6 <printf+0x234>
13ea: 18fa6663 bltu s4,a5,1576 <printf+0x204>
13ee: 06400713 li a4,100
13f2: 1ae78063 beq a5,a4,1592 <printf+0x220>
13f6: 07000713 li a4,112
13fa: 1ce79963 bne a5,a4,15cc <printf+0x25a>
printptr(va_arg(ap, uint64));
13fe: 6702 ld a4,0(sp)
buf[i++] = '0';
1400: 01511423 sh s5,8(sp)
write(f, s, l);
1404: 4649 li a2,18
printptr(va_arg(ap, uint64));
1406: 631c ld a5,0(a4)
1408: 0721 addi a4,a4,8
140a: e03a sd a4,0(sp)
for (j = 0; j < (sizeof(uint64) * 2); j++, x <<= 4)
140c: 00479293 slli t0,a5,0x4
1410: 00879f93 slli t6,a5,0x8
1414: 00c79f13 slli t5,a5,0xc
1418: 01079e93 slli t4,a5,0x10
141c: 01479e13 slli t3,a5,0x14
1420: 01879313 slli t1,a5,0x18
1424: 01c79893 slli a7,a5,0x1c
1428: 02479813 slli a6,a5,0x24
142c: 02879513 slli a0,a5,0x28
1430: 02c79593 slli a1,a5,0x2c
1434: 03079693 slli a3,a5,0x30
1438: 03479713 slli a4,a5,0x34
buf[i++] = digits[x >> (sizeof(uint64) * 8 - 4)];
143c: 03c7d413 srli s0,a5,0x3c
1440: 01c7d39b srliw t2,a5,0x1c
1444: 03c2d293 srli t0,t0,0x3c
1448: 03cfdf93 srli t6,t6,0x3c
144c: 03cf5f13 srli t5,t5,0x3c
1450: 03cede93 srli t4,t4,0x3c
1454: 03ce5e13 srli t3,t3,0x3c
1458: 03c35313 srli t1,t1,0x3c
145c: 03c8d893 srli a7,a7,0x3c
1460: 03c85813 srli a6,a6,0x3c
1464: 9171 srli a0,a0,0x3c
1466: 91f1 srli a1,a1,0x3c
1468: 92f1 srli a3,a3,0x3c
146a: 9371 srli a4,a4,0x3c
146c: 96ce add a3,a3,s3
146e: 974e add a4,a4,s3
1470: 944e add s0,s0,s3
1472: 92ce add t0,t0,s3
1474: 9fce add t6,t6,s3
1476: 9f4e add t5,t5,s3
1478: 9ece add t4,t4,s3
147a: 9e4e add t3,t3,s3
147c: 934e add t1,t1,s3
147e: 98ce add a7,a7,s3
1480: 93ce add t2,t2,s3
1482: 984e add a6,a6,s3
1484: 954e add a0,a0,s3
1486: 95ce add a1,a1,s3
1488: 0006c083 lbu ra,0(a3)
148c: 0002c283 lbu t0,0(t0)
1490: 00074683 lbu a3,0(a4)
1494: 000fcf83 lbu t6,0(t6)
1498: 000f4f03 lbu t5,0(t5)
149c: 000ece83 lbu t4,0(t4)
14a0: 000e4e03 lbu t3,0(t3)
14a4: 00034303 lbu t1,0(t1)
14a8: 0008c883 lbu a7,0(a7)
14ac: 0003c383 lbu t2,0(t2)
14b0: 00084803 lbu a6,0(a6)
14b4: 00054503 lbu a0,0(a0)
14b8: 0005c583 lbu a1,0(a1)
14bc: 00044403 lbu s0,0(s0)
for (j = 0; j < (sizeof(uint64) * 2); j++, x <<= 4)
14c0: 03879713 slli a4,a5,0x38
buf[i++] = digits[x >> (sizeof(uint64) * 8 - 4)];
14c4: 9371 srli a4,a4,0x3c
14c6: 8bbd andi a5,a5,15
14c8: 974e add a4,a4,s3
14ca: 97ce add a5,a5,s3
14cc: 005105a3 sb t0,11(sp)
14d0: 01f10623 sb t6,12(sp)
14d4: 01e106a3 sb t5,13(sp)
14d8: 01d10723 sb t4,14(sp)
14dc: 01c107a3 sb t3,15(sp)
14e0: 00610823 sb t1,16(sp)
14e4: 011108a3 sb a7,17(sp)
14e8: 00710923 sb t2,18(sp)
14ec: 010109a3 sb a6,19(sp)
14f0: 00a10a23 sb a0,20(sp)
14f4: 00b10aa3 sb a1,21(sp)
14f8: 00110b23 sb ra,22(sp)
14fc: 00d10ba3 sb a3,23(sp)
1500: 00810523 sb s0,10(sp)
1504: 00074703 lbu a4,0(a4)
1508: 0007c783 lbu a5,0(a5)
write(f, s, l);
150c: 002c addi a1,sp,8
150e: 4505 li a0,1
buf[i++] = digits[x >> (sizeof(uint64) * 8 - 4)];
1510: 00e10c23 sb a4,24(sp)
1514: 00f10ca3 sb a5,25(sp)
buf[i] = 0;
1518: 00010d23 sb zero,26(sp)
write(f, s, l);
151c: 79c000ef jal ra,1cb8 <write>
// Print unknown % sequence to draw attention.
putchar('%');
putchar(s[1]);
break;
}
s += 2;
1520: 00248513 addi a0,s1,2
if (!*s)
1524: 00054783 lbu a5,0(a0)
1528: e8079ae3 bnez a5,13bc <printf+0x4a>
}
va_end(ap);
}
152c: 70a6 ld ra,104(sp)
152e: 7406 ld s0,96(sp)
1530: 64e6 ld s1,88(sp)
1532: 6946 ld s2,80(sp)
1534: 69a6 ld s3,72(sp)
1536: 6a06 ld s4,64(sp)
1538: 7ae2 ld s5,56(sp)
153a: 7b42 ld s6,48(sp)
153c: 614d addi sp,sp,176
153e: 8082 ret
for (z = s; s[0] == '%' && s[1] == '%'; z++, s += 2)
1540: 00064783 lbu a5,0(a2)
1544: 84b2 mv s1,a2
1546: 01278963 beq a5,s2,1558 <printf+0x1e6>
154a: b549 j 13cc <printf+0x5a>
154c: 0024c783 lbu a5,2(s1)
1550: 0605 addi a2,a2,1
1552: 0489 addi s1,s1,2
1554: e7279ce3 bne a5,s2,13cc <printf+0x5a>
1558: 0014c783 lbu a5,1(s1)
155c: ff2788e3 beq a5,s2,154c <printf+0x1da>
l = z - a;
1560: 40a6043b subw s0,a2,a0
write(f, s, l);
1564: 85aa mv a1,a0
1566: 8622 mv a2,s0
1568: 4505 li a0,1
156a: 74e000ef jal ra,1cb8 <write>
if (l)
156e: e60408e3 beqz s0,13de <printf+0x6c>
1572: 8526 mv a0,s1
1574: b581 j 13b4 <printf+0x42>
switch (s[1])
1576: 07800713 li a4,120
157a: 04e79963 bne a5,a4,15cc <printf+0x25a>
printint(va_arg(ap, int), 16, 1);
157e: 6782 ld a5,0(sp)
1580: 45c1 li a1,16
1582: 4388 lw a0,0(a5)
1584: 07a1 addi a5,a5,8
1586: e03e sd a5,0(sp)
1588: b71ff0ef jal ra,10f8 <printint.constprop.0>
s += 2;
158c: 00248513 addi a0,s1,2
1590: bf51 j 1524 <printf+0x1b2>
printint(va_arg(ap, int), 10, 1);
1592: 6782 ld a5,0(sp)
1594: 45a9 li a1,10
1596: 4388 lw a0,0(a5)
1598: 07a1 addi a5,a5,8
159a: e03e sd a5,0(sp)
159c: b5dff0ef jal ra,10f8 <printint.constprop.0>
s += 2;
15a0: 00248513 addi a0,s1,2
15a4: b741 j 1524 <printf+0x1b2>
if ((a = va_arg(ap, char *)) == 0)
15a6: 6782 ld a5,0(sp)
15a8: 6380 ld s0,0(a5)
15aa: 07a1 addi a5,a5,8
15ac: e03e sd a5,0(sp)
15ae: c031 beqz s0,15f2 <printf+0x280>
l = strnlen(a, 200);
15b0: 0c800593 li a1,200
15b4: 8522 mv a0,s0
15b6: 40a000ef jal ra,19c0 <strnlen>
write(f, s, l);
15ba: 0005061b sext.w a2,a0
15be: 85a2 mv a1,s0
15c0: 4505 li a0,1
15c2: 6f6000ef jal ra,1cb8 <write>
s += 2;
15c6: 00248513 addi a0,s1,2
15ca: bfa9 j 1524 <printf+0x1b2>
return write(stdout, &byte, 1);
15cc: 4605 li a2,1
15ce: 002c addi a1,sp,8
15d0: 4505 li a0,1
char byte = c;
15d2: 01210423 sb s2,8(sp)
return write(stdout, &byte, 1);
15d6: 6e2000ef jal ra,1cb8 <write>
char byte = c;
15da: 0014c783 lbu a5,1(s1)
return write(stdout, &byte, 1);
15de: 4605 li a2,1
15e0: 002c addi a1,sp,8
15e2: 4505 li a0,1
char byte = c;
15e4: 00f10423 sb a5,8(sp)
return write(stdout, &byte, 1);
15e8: 6d0000ef jal ra,1cb8 <write>
s += 2;
15ec: 00248513 addi a0,s1,2
15f0: bf15 j 1524 <printf+0x1b2>
a = "(null)";
15f2: 845a mv s0,s6
15f4: bf75 j 15b0 <printf+0x23e>
00000000000015f6 <panic>:
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
void panic(char *m)
{
15f6: 1141 addi sp,sp,-16
15f8: e406 sd ra,8(sp)
puts(m);
15fa: d57ff0ef jal ra,1350 <puts>
exit(-100);
}
15fe: 60a2 ld ra,8(sp)
exit(-100);
1600: f9c00513 li a0,-100
}
1604: 0141 addi sp,sp,16
exit(-100);
1606: a709 j 1d08 <exit>
0000000000001608 <isspace>:
#define HIGHS (ONES * (UCHAR_MAX / 2 + 1))
#define HASZERO(x) (((x)-ONES) & ~(x)&HIGHS)
int isspace(int c)
{
return c == ' ' || (unsigned)c - '\t' < 5;
1608: 02000793 li a5,32
160c: 00f50663 beq a0,a5,1618 <isspace+0x10>
1610: 355d addiw a0,a0,-9
1612: 00553513 sltiu a0,a0,5
1616: 8082 ret
1618: 4505 li a0,1
}
161a: 8082 ret
000000000000161c <isdigit>:
int isdigit(int c)
{
return (unsigned)c - '0' < 10;
161c: fd05051b addiw a0,a0,-48
}
1620: 00a53513 sltiu a0,a0,10
1624: 8082 ret
0000000000001626 <atoi>:
return c == ' ' || (unsigned)c - '\t' < 5;
1626: 02000613 li a2,32
162a: 4591 li a1,4
int atoi(const char *s)
{
int n = 0, neg = 0;
while (isspace(*s))
162c: 00054703 lbu a4,0(a0)
return c == ' ' || (unsigned)c - '\t' < 5;
1630: ff77069b addiw a3,a4,-9
1634: 04c70d63 beq a4,a2,168e <atoi+0x68>
1638: 0007079b sext.w a5,a4
163c: 04d5f963 bgeu a1,a3,168e <atoi+0x68>
s++;
switch (*s)
1640: 02b00693 li a3,43
1644: 04d70a63 beq a4,a3,1698 <atoi+0x72>
1648: 02d00693 li a3,45
164c: 06d70463 beq a4,a3,16b4 <atoi+0x8e>
neg = 1;
case '+':
s++;
}
/* Compute n as a negative number to avoid overflow on INT_MIN */
while (isdigit(*s))
1650: fd07859b addiw a1,a5,-48
1654: 4625 li a2,9
1656: 873e mv a4,a5
1658: 86aa mv a3,a0
int n = 0, neg = 0;
165a: 4e01 li t3,0
while (isdigit(*s))
165c: 04b66a63 bltu a2,a1,16b0 <atoi+0x8a>
int n = 0, neg = 0;
1660: 4501 li a0,0
while (isdigit(*s))
1662: 4825 li a6,9
1664: 0016c603 lbu a2,1(a3)
n = 10 * n - (*s++ - '0');
1668: 0025179b slliw a5,a0,0x2
166c: 9d3d addw a0,a0,a5
166e: fd07031b addiw t1,a4,-48
1672: 0015189b slliw a7,a0,0x1
while (isdigit(*s))
1676: fd06059b addiw a1,a2,-48
n = 10 * n - (*s++ - '0');
167a: 0685 addi a3,a3,1
167c: 4068853b subw a0,a7,t1
while (isdigit(*s))
1680: 0006071b sext.w a4,a2
1684: feb870e3 bgeu a6,a1,1664 <atoi+0x3e>
return neg ? n : -n;
1688: 000e0563 beqz t3,1692 <atoi+0x6c>
}
168c: 8082 ret
s++;
168e: 0505 addi a0,a0,1
1690: bf71 j 162c <atoi+0x6>
return neg ? n : -n;
1692: 4113053b subw a0,t1,a7
1696: 8082 ret
while (isdigit(*s))
1698: 00154783 lbu a5,1(a0)
169c: 4625 li a2,9
s++;
169e: 00150693 addi a3,a0,1
while (isdigit(*s))
16a2: fd07859b addiw a1,a5,-48
16a6: 0007871b sext.w a4,a5
int n = 0, neg = 0;
16aa: 4e01 li t3,0
while (isdigit(*s))
16ac: fab67ae3 bgeu a2,a1,1660 <atoi+0x3a>
16b0: 4501 li a0,0
}
16b2: 8082 ret
while (isdigit(*s))
16b4: 00154783 lbu a5,1(a0)
16b8: 4625 li a2,9
s++;
16ba: 00150693 addi a3,a0,1
while (isdigit(*s))
16be: fd07859b addiw a1,a5,-48
16c2: 0007871b sext.w a4,a5
16c6: feb665e3 bltu a2,a1,16b0 <atoi+0x8a>
neg = 1;
16ca: 4e05 li t3,1
16cc: bf51 j 1660 <atoi+0x3a>
00000000000016ce <memset>:
void *memset(void *dest, int c, size_t n)
{
char *p = dest;
for (int i = 0; i < n; ++i, *(p++) = c)
16ce: 16060d63 beqz a2,1848 <memset+0x17a>
16d2: 40a007b3 neg a5,a0
16d6: 8b9d andi a5,a5,7
16d8: 00778713 addi a4,a5,7
16dc: 482d li a6,11
16de: 0ff5f593 zext.b a1,a1
16e2: fff60693 addi a3,a2,-1
16e6: 17076263 bltu a4,a6,184a <memset+0x17c>
16ea: 16e6ea63 bltu a3,a4,185e <memset+0x190>
16ee: 16078563 beqz a5,1858 <memset+0x18a>
16f2: 00b50023 sb a1,0(a0)
16f6: 4705 li a4,1
16f8: 00150e93 addi t4,a0,1
16fc: 14e78c63 beq a5,a4,1854 <memset+0x186>
1700: 00b500a3 sb a1,1(a0)
1704: 4709 li a4,2
1706: 00250e93 addi t4,a0,2
170a: 14e78d63 beq a5,a4,1864 <memset+0x196>
170e: 00b50123 sb a1,2(a0)
1712: 470d li a4,3
1714: 00350e93 addi t4,a0,3
1718: 12e78b63 beq a5,a4,184e <memset+0x180>
171c: 00b501a3 sb a1,3(a0)
1720: 4711 li a4,4
1722: 00450e93 addi t4,a0,4
1726: 14e78163 beq a5,a4,1868 <memset+0x19a>
172a: 00b50223 sb a1,4(a0)
172e: 4715 li a4,5
1730: 00550e93 addi t4,a0,5
1734: 12e78c63 beq a5,a4,186c <memset+0x19e>
1738: 00b502a3 sb a1,5(a0)
173c: 471d li a4,7
173e: 00650e93 addi t4,a0,6
1742: 12e79763 bne a5,a4,1870 <memset+0x1a2>
1746: 00750e93 addi t4,a0,7
174a: 00b50323 sb a1,6(a0)
174e: 4f1d li t5,7
1750: 00859713 slli a4,a1,0x8
1754: 8f4d or a4,a4,a1
1756: 01059e13 slli t3,a1,0x10
175a: 01c76e33 or t3,a4,t3
175e: 01859313 slli t1,a1,0x18
1762: 006e6333 or t1,t3,t1
1766: 02059893 slli a7,a1,0x20
176a: 011368b3 or a7,t1,a7
176e: 02859813 slli a6,a1,0x28
1772: 40f60333 sub t1,a2,a5
1776: 0108e833 or a6,a7,a6
177a: 03059693 slli a3,a1,0x30
177e: 00d866b3 or a3,a6,a3
1782: 03859713 slli a4,a1,0x38
1786: 97aa add a5,a5,a0
1788: ff837813 andi a6,t1,-8
178c: 8f55 or a4,a4,a3
178e: 00f806b3 add a3,a6,a5
1792: e398 sd a4,0(a5)
1794: 07a1 addi a5,a5,8
1796: fed79ee3 bne a5,a3,1792 <memset+0xc4>
179a: ff837693 andi a3,t1,-8
179e: 00de87b3 add a5,t4,a3
17a2: 01e6873b addw a4,a3,t5
17a6: 0ad30663 beq t1,a3,1852 <memset+0x184>
17aa: 00b78023 sb a1,0(a5)
17ae: 0017069b addiw a3,a4,1
17b2: 08c6fb63 bgeu a3,a2,1848 <memset+0x17a>
17b6: 00b780a3 sb a1,1(a5)
17ba: 0027069b addiw a3,a4,2
17be: 08c6f563 bgeu a3,a2,1848 <memset+0x17a>
17c2: 00b78123 sb a1,2(a5)
17c6: 0037069b addiw a3,a4,3
17ca: 06c6ff63 bgeu a3,a2,1848 <memset+0x17a>
17ce: 00b781a3 sb a1,3(a5)
17d2: 0047069b addiw a3,a4,4
17d6: 06c6f963 bgeu a3,a2,1848 <memset+0x17a>
17da: 00b78223 sb a1,4(a5)
17de: 0057069b addiw a3,a4,5
17e2: 06c6f363 bgeu a3,a2,1848 <memset+0x17a>
17e6: 00b782a3 sb a1,5(a5)
17ea: 0067069b addiw a3,a4,6
17ee: 04c6fd63 bgeu a3,a2,1848 <memset+0x17a>
17f2: 00b78323 sb a1,6(a5)
17f6: 0077069b addiw a3,a4,7
17fa: 04c6f763 bgeu a3,a2,1848 <memset+0x17a>
17fe: 00b783a3 sb a1,7(a5)
1802: 0087069b addiw a3,a4,8
1806: 04c6f163 bgeu a3,a2,1848 <memset+0x17a>
180a: 00b78423 sb a1,8(a5)
180e: 0097069b addiw a3,a4,9
1812: 02c6fb63 bgeu a3,a2,1848 <memset+0x17a>
1816: 00b784a3 sb a1,9(a5)
181a: 00a7069b addiw a3,a4,10
181e: 02c6f563 bgeu a3,a2,1848 <memset+0x17a>
1822: 00b78523 sb a1,10(a5)
1826: 00b7069b addiw a3,a4,11
182a: 00c6ff63 bgeu a3,a2,1848 <memset+0x17a>
182e: 00b785a3 sb a1,11(a5)
1832: 00c7069b addiw a3,a4,12
1836: 00c6f963 bgeu a3,a2,1848 <memset+0x17a>
183a: 00b78623 sb a1,12(a5)
183e: 2735 addiw a4,a4,13
1840: 00c77463 bgeu a4,a2,1848 <memset+0x17a>
1844: 00b786a3 sb a1,13(a5)
;
return dest;
}
1848: 8082 ret
184a: 472d li a4,11
184c: bd79 j 16ea <memset+0x1c>
for (int i = 0; i < n; ++i, *(p++) = c)
184e: 4f0d li t5,3
1850: b701 j 1750 <memset+0x82>
1852: 8082 ret
1854: 4f05 li t5,1
1856: bded j 1750 <memset+0x82>
1858: 8eaa mv t4,a0
185a: 4f01 li t5,0
185c: bdd5 j 1750 <memset+0x82>
185e: 87aa mv a5,a0
1860: 4701 li a4,0
1862: b7a1 j 17aa <memset+0xdc>
1864: 4f09 li t5,2
1866: b5ed j 1750 <memset+0x82>
1868: 4f11 li t5,4
186a: b5dd j 1750 <memset+0x82>
186c: 4f15 li t5,5
186e: b5cd j 1750 <memset+0x82>
1870: 4f19 li t5,6
1872: bdf9 j 1750 <memset+0x82>
0000000000001874 <strcmp>:
int strcmp(const char *l, const char *r)
{
for (; *l == *r && *l; l++, r++)
1874: 00054783 lbu a5,0(a0)
1878: 0005c703 lbu a4,0(a1)
187c: 00e79863 bne a5,a4,188c <strcmp+0x18>
1880: 0505 addi a0,a0,1
1882: 0585 addi a1,a1,1
1884: fbe5 bnez a5,1874 <strcmp>
1886: 4501 li a0,0
;
return *(unsigned char *)l - *(unsigned char *)r;
}
1888: 9d19 subw a0,a0,a4
188a: 8082 ret
return *(unsigned char *)l - *(unsigned char *)r;
188c: 0007851b sext.w a0,a5
1890: bfe5 j 1888 <strcmp+0x14>
0000000000001892 <strncmp>:
int strncmp(const char *_l, const char *_r, size_t n)
{
const unsigned char *l = (void *)_l, *r = (void *)_r;
if (!n--)
1892: ce05 beqz a2,18ca <strncmp+0x38>
return 0;
for (; *l && *r && n && *l == *r; l++, r++, n--)
1894: 00054703 lbu a4,0(a0)
1898: 0005c783 lbu a5,0(a1)
189c: cb0d beqz a4,18ce <strncmp+0x3c>
if (!n--)
189e: 167d addi a2,a2,-1
18a0: 00c506b3 add a3,a0,a2
18a4: a819 j 18ba <strncmp+0x28>
for (; *l && *r && n && *l == *r; l++, r++, n--)
18a6: 00a68e63 beq a3,a0,18c2 <strncmp+0x30>
18aa: 0505 addi a0,a0,1
18ac: 00e79b63 bne a5,a4,18c2 <strncmp+0x30>
18b0: 00054703 lbu a4,0(a0)
;
return *l - *r;
18b4: 0005c783 lbu a5,0(a1)
for (; *l && *r && n && *l == *r; l++, r++, n--)
18b8: cb19 beqz a4,18ce <strncmp+0x3c>
18ba: 0005c783 lbu a5,0(a1)
18be: 0585 addi a1,a1,1
18c0: f3fd bnez a5,18a6 <strncmp+0x14>
return *l - *r;
18c2: 0007051b sext.w a0,a4
18c6: 9d1d subw a0,a0,a5
18c8: 8082 ret
return 0;
18ca: 4501 li a0,0
}
18cc: 8082 ret
18ce: 4501 li a0,0
return *l - *r;
18d0: 9d1d subw a0,a0,a5
18d2: 8082 ret
00000000000018d4 <strlen>:
size_t strlen(const char *s)
{
const char *a = s;
typedef size_t __attribute__((__may_alias__)) word;
const word *w;
for (; (uintptr_t)s % SS; s++)
18d4: 00757793 andi a5,a0,7
18d8: cf89 beqz a5,18f2 <strlen+0x1e>
18da: 87aa mv a5,a0
18dc: a029 j 18e6 <strlen+0x12>
18de: 0785 addi a5,a5,1
18e0: 0077f713 andi a4,a5,7
18e4: cb01 beqz a4,18f4 <strlen+0x20>
if (!*s)
18e6: 0007c703 lbu a4,0(a5)
18ea: fb75 bnez a4,18de <strlen+0xa>
for (w = (const void *)s; !HASZERO(*w); w++)
;
s = (const void *)w;
for (; *s; s++)
;
return s - a;
18ec: 40a78533 sub a0,a5,a0
}
18f0: 8082 ret
for (; (uintptr_t)s % SS; s++)
18f2: 87aa mv a5,a0
for (w = (const void *)s; !HASZERO(*w); w++)
18f4: 6394 ld a3,0(a5)
18f6: 00000597 auipc a1,0x0
18fa: 6a25b583 ld a1,1698(a1) # 1f98 <__clone+0xa8>
18fe: 00000617 auipc a2,0x0
1902: 6a263603 ld a2,1698(a2) # 1fa0 <__clone+0xb0>
1906: a019 j 190c <strlen+0x38>
1908: 6794 ld a3,8(a5)
190a: 07a1 addi a5,a5,8
190c: 00b68733 add a4,a3,a1
1910: fff6c693 not a3,a3
1914: 8f75 and a4,a4,a3
1916: 8f71 and a4,a4,a2
1918: db65 beqz a4,1908 <strlen+0x34>
for (; *s; s++)
191a: 0007c703 lbu a4,0(a5)
191e: d779 beqz a4,18ec <strlen+0x18>
1920: 0017c703 lbu a4,1(a5)
1924: 0785 addi a5,a5,1
1926: d379 beqz a4,18ec <strlen+0x18>
1928: 0017c703 lbu a4,1(a5)
192c: 0785 addi a5,a5,1
192e: fb6d bnez a4,1920 <strlen+0x4c>
1930: bf75 j 18ec <strlen+0x18>
0000000000001932 <memchr>:
void *memchr(const void *src, int c, size_t n)
{
const unsigned char *s = src;
c = (unsigned char)c;
for (; ((uintptr_t)s & ALIGN) && n && *s != c; s++, n--)
1932: 00757713 andi a4,a0,7
{
1936: 87aa mv a5,a0
c = (unsigned char)c;
1938: 0ff5f593 zext.b a1,a1
for (; ((uintptr_t)s & ALIGN) && n && *s != c; s++, n--)
193c: cb19 beqz a4,1952 <memchr+0x20>
193e: ce25 beqz a2,19b6 <memchr+0x84>
1940: 0007c703 lbu a4,0(a5)
1944: 04b70e63 beq a4,a1,19a0 <memchr+0x6e>
1948: 0785 addi a5,a5,1
194a: 0077f713 andi a4,a5,7
194e: 167d addi a2,a2,-1
1950: f77d bnez a4,193e <memchr+0xc>
;
s = (const void *)w;
}
for (; n && *s != c; s++, n--)
;
return n ? (void *)s : 0;
1952: 4501 li a0,0
if (n && *s != c)
1954: c235 beqz a2,19b8 <memchr+0x86>
1956: 0007c703 lbu a4,0(a5)
195a: 04b70363 beq a4,a1,19a0 <memchr+0x6e>
size_t k = ONES * c;
195e: 00000517 auipc a0,0x0
1962: 64a53503 ld a0,1610(a0) # 1fa8 <__clone+0xb8>
for (w = (const void *)s; n >= SS && !HASZERO(*w ^ k); w++, n -= SS)
1966: 471d li a4,7
size_t k = ONES * c;
1968: 02a58533 mul a0,a1,a0
for (w = (const void *)s; n >= SS && !HASZERO(*w ^ k); w++, n -= SS)
196c: 02c77a63 bgeu a4,a2,19a0 <memchr+0x6e>
1970: 00000897 auipc a7,0x0
1974: 6288b883 ld a7,1576(a7) # 1f98 <__clone+0xa8>
1978: 00000817 auipc a6,0x0
197c: 62883803 ld a6,1576(a6) # 1fa0 <__clone+0xb0>
1980: 431d li t1,7
1982: a029 j 198c <memchr+0x5a>
1984: 1661 addi a2,a2,-8
1986: 07a1 addi a5,a5,8
1988: 02c37963 bgeu t1,a2,19ba <memchr+0x88>
198c: 6398 ld a4,0(a5)
198e: 8f29 xor a4,a4,a0
1990: 011706b3 add a3,a4,a7
1994: fff74713 not a4,a4
1998: 8f75 and a4,a4,a3
199a: 01077733 and a4,a4,a6
199e: d37d beqz a4,1984 <memchr+0x52>
19a0: 853e mv a0,a5
19a2: 97b2 add a5,a5,a2
19a4: a021 j 19ac <memchr+0x7a>
for (; n && *s != c; s++, n--)
19a6: 0505 addi a0,a0,1
19a8: 00f50763 beq a0,a5,19b6 <memchr+0x84>
19ac: 00054703 lbu a4,0(a0)
19b0: feb71be3 bne a4,a1,19a6 <memchr+0x74>
19b4: 8082 ret
return n ? (void *)s : 0;
19b6: 4501 li a0,0
}
19b8: 8082 ret
return n ? (void *)s : 0;
19ba: 4501 li a0,0
for (; n && *s != c; s++, n--)
19bc: f275 bnez a2,19a0 <memchr+0x6e>
}
19be: 8082 ret
00000000000019c0 <strnlen>:
size_t strnlen(const char *s, size_t n)
{
19c0: 1101 addi sp,sp,-32
19c2: e822 sd s0,16(sp)
const char *p = memchr(s, 0, n);
19c4: 862e mv a2,a1
{
19c6: 842e mv s0,a1
const char *p = memchr(s, 0, n);
19c8: 4581 li a1,0
{
19ca: e426 sd s1,8(sp)
19cc: ec06 sd ra,24(sp)
19ce: 84aa mv s1,a0
const char *p = memchr(s, 0, n);
19d0: f63ff0ef jal ra,1932 <memchr>
return p ? p - s : n;
19d4: c519 beqz a0,19e2 <strnlen+0x22>
}
19d6: 60e2 ld ra,24(sp)
19d8: 6442 ld s0,16(sp)
return p ? p - s : n;
19da: 8d05 sub a0,a0,s1
}
19dc: 64a2 ld s1,8(sp)
19de: 6105 addi sp,sp,32
19e0: 8082 ret
19e2: 60e2 ld ra,24(sp)
return p ? p - s : n;
19e4: 8522 mv a0,s0
}
19e6: 6442 ld s0,16(sp)
19e8: 64a2 ld s1,8(sp)
19ea: 6105 addi sp,sp,32
19ec: 8082 ret
00000000000019ee <strcpy>:
char *strcpy(char *restrict d, const char *s)
{
typedef size_t __attribute__((__may_alias__)) word;
word *wd;
const word *ws;
if ((uintptr_t)s % SS == (uintptr_t)d % SS)
19ee: 00b547b3 xor a5,a0,a1
19f2: 8b9d andi a5,a5,7
19f4: eb95 bnez a5,1a28 <strcpy+0x3a>
{
for (; (uintptr_t)s % SS; s++, d++)
19f6: 0075f793 andi a5,a1,7
19fa: e7b1 bnez a5,1a46 <strcpy+0x58>
if (!(*d = *s))
return d;
wd = (void *)d;
ws = (const void *)s;
for (; !HASZERO(*ws); *wd++ = *ws++)
19fc: 6198 ld a4,0(a1)
19fe: 00000617 auipc a2,0x0
1a02: 59a63603 ld a2,1434(a2) # 1f98 <__clone+0xa8>
1a06: 00000817 auipc a6,0x0
1a0a: 59a83803 ld a6,1434(a6) # 1fa0 <__clone+0xb0>
1a0e: a029 j 1a18 <strcpy+0x2a>
1a10: e118 sd a4,0(a0)
1a12: 6598 ld a4,8(a1)
1a14: 05a1 addi a1,a1,8
1a16: 0521 addi a0,a0,8
1a18: 00c707b3 add a5,a4,a2
1a1c: fff74693 not a3,a4
1a20: 8ff5 and a5,a5,a3
1a22: 0107f7b3 and a5,a5,a6
1a26: d7ed beqz a5,1a10 <strcpy+0x22>
;
d = (void *)wd;
s = (const void *)ws;
}
for (; (*d = *s); s++, d++)
1a28: 0005c783 lbu a5,0(a1)
1a2c: 00f50023 sb a5,0(a0)
1a30: c785 beqz a5,1a58 <strcpy+0x6a>
1a32: 0015c783 lbu a5,1(a1)
1a36: 0505 addi a0,a0,1
1a38: 0585 addi a1,a1,1
1a3a: 00f50023 sb a5,0(a0)
1a3e: fbf5 bnez a5,1a32 <strcpy+0x44>
;
return d;
}
1a40: 8082 ret
for (; (uintptr_t)s % SS; s++, d++)
1a42: 0505 addi a0,a0,1
1a44: df45 beqz a4,19fc <strcpy+0xe>
if (!(*d = *s))
1a46: 0005c783 lbu a5,0(a1)
for (; (uintptr_t)s % SS; s++, d++)
1a4a: 0585 addi a1,a1,1
1a4c: 0075f713 andi a4,a1,7
if (!(*d = *s))
1a50: 00f50023 sb a5,0(a0)
1a54: f7fd bnez a5,1a42 <strcpy+0x54>
}
1a56: 8082 ret
1a58: 8082 ret
0000000000001a5a <strncpy>:
char *strncpy(char *restrict d, const char *s, size_t n)
{
typedef size_t __attribute__((__may_alias__)) word;
word *wd;
const word *ws;
if (((uintptr_t)s & ALIGN) == ((uintptr_t)d & ALIGN))
1a5a: 00b547b3 xor a5,a0,a1
1a5e: 8b9d andi a5,a5,7
1a60: 1a079863 bnez a5,1c10 <strncpy+0x1b6>
{
for (; ((uintptr_t)s & ALIGN) && n && (*d = *s); n--, s++, d++)
1a64: 0075f793 andi a5,a1,7
1a68: 16078463 beqz a5,1bd0 <strncpy+0x176>
1a6c: ea01 bnez a2,1a7c <strncpy+0x22>
1a6e: a421 j 1c76 <strncpy+0x21c>
1a70: 167d addi a2,a2,-1
1a72: 0505 addi a0,a0,1
1a74: 14070e63 beqz a4,1bd0 <strncpy+0x176>
1a78: 1a060863 beqz a2,1c28 <strncpy+0x1ce>
1a7c: 0005c783 lbu a5,0(a1)
1a80: 0585 addi a1,a1,1
1a82: 0075f713 andi a4,a1,7
1a86: 00f50023 sb a5,0(a0)
1a8a: f3fd bnez a5,1a70 <strncpy+0x16>
1a8c: 4805 li a6,1
1a8e: 1a061863 bnez a2,1c3e <strncpy+0x1e4>
1a92: 40a007b3 neg a5,a0
1a96: 8b9d andi a5,a5,7
1a98: 4681 li a3,0
1a9a: 18061a63 bnez a2,1c2e <strncpy+0x1d4>
1a9e: 00778713 addi a4,a5,7
1aa2: 45ad li a1,11
1aa4: 18b76363 bltu a4,a1,1c2a <strncpy+0x1d0>
1aa8: 1ae6eb63 bltu a3,a4,1c5e <strncpy+0x204>
1aac: 1a078363 beqz a5,1c52 <strncpy+0x1f8>
for (int i = 0; i < n; ++i, *(p++) = c)
1ab0: 00050023 sb zero,0(a0)
1ab4: 4685 li a3,1
1ab6: 00150713 addi a4,a0,1
1aba: 18d78f63 beq a5,a3,1c58 <strncpy+0x1fe>
1abe: 000500a3 sb zero,1(a0)
1ac2: 4689 li a3,2
1ac4: 00250713 addi a4,a0,2
1ac8: 18d78e63 beq a5,a3,1c64 <strncpy+0x20a>
1acc: 00050123 sb zero,2(a0)
1ad0: 468d li a3,3
1ad2: 00350713 addi a4,a0,3
1ad6: 16d78c63 beq a5,a3,1c4e <strncpy+0x1f4>
1ada: 000501a3 sb zero,3(a0)
1ade: 4691 li a3,4
1ae0: 00450713 addi a4,a0,4
1ae4: 18d78263 beq a5,a3,1c68 <strncpy+0x20e>
1ae8: 00050223 sb zero,4(a0)
1aec: 4695 li a3,5
1aee: 00550713 addi a4,a0,5
1af2: 16d78d63 beq a5,a3,1c6c <strncpy+0x212>
1af6: 000502a3 sb zero,5(a0)
1afa: 469d li a3,7
1afc: 00650713 addi a4,a0,6
1b00: 16d79863 bne a5,a3,1c70 <strncpy+0x216>
1b04: 00750713 addi a4,a0,7
1b08: 00050323 sb zero,6(a0)
1b0c: 40f80833 sub a6,a6,a5
1b10: ff887593 andi a1,a6,-8
1b14: 97aa add a5,a5,a0
1b16: 95be add a1,a1,a5
1b18: 0007b023 sd zero,0(a5)
1b1c: 07a1 addi a5,a5,8
1b1e: feb79de3 bne a5,a1,1b18 <strncpy+0xbe>
1b22: ff887593 andi a1,a6,-8
1b26: 9ead addw a3,a3,a1
1b28: 00b707b3 add a5,a4,a1
1b2c: 12b80863 beq a6,a1,1c5c <strncpy+0x202>
1b30: 00078023 sb zero,0(a5)
1b34: 0016871b addiw a4,a3,1
1b38: 0ec77863 bgeu a4,a2,1c28 <strncpy+0x1ce>
1b3c: 000780a3 sb zero,1(a5)
1b40: 0026871b addiw a4,a3,2
1b44: 0ec77263 bgeu a4,a2,1c28 <strncpy+0x1ce>
1b48: 00078123 sb zero,2(a5)
1b4c: 0036871b addiw a4,a3,3
1b50: 0cc77c63 bgeu a4,a2,1c28 <strncpy+0x1ce>
1b54: 000781a3 sb zero,3(a5)
1b58: 0046871b addiw a4,a3,4
1b5c: 0cc77663 bgeu a4,a2,1c28 <strncpy+0x1ce>
1b60: 00078223 sb zero,4(a5)
1b64: 0056871b addiw a4,a3,5
1b68: 0cc77063 bgeu a4,a2,1c28 <strncpy+0x1ce>
1b6c: 000782a3 sb zero,5(a5)
1b70: 0066871b addiw a4,a3,6
1b74: 0ac77a63 bgeu a4,a2,1c28 <strncpy+0x1ce>
1b78: 00078323 sb zero,6(a5)
1b7c: 0076871b addiw a4,a3,7
1b80: 0ac77463 bgeu a4,a2,1c28 <strncpy+0x1ce>
1b84: 000783a3 sb zero,7(a5)
1b88: 0086871b addiw a4,a3,8
1b8c: 08c77e63 bgeu a4,a2,1c28 <strncpy+0x1ce>
1b90: 00078423 sb zero,8(a5)
1b94: 0096871b addiw a4,a3,9
1b98: 08c77863 bgeu a4,a2,1c28 <strncpy+0x1ce>
1b9c: 000784a3 sb zero,9(a5)
1ba0: 00a6871b addiw a4,a3,10
1ba4: 08c77263 bgeu a4,a2,1c28 <strncpy+0x1ce>
1ba8: 00078523 sb zero,10(a5)
1bac: 00b6871b addiw a4,a3,11
1bb0: 06c77c63 bgeu a4,a2,1c28 <strncpy+0x1ce>
1bb4: 000785a3 sb zero,11(a5)
1bb8: 00c6871b addiw a4,a3,12
1bbc: 06c77663 bgeu a4,a2,1c28 <strncpy+0x1ce>
1bc0: 00078623 sb zero,12(a5)
1bc4: 26b5 addiw a3,a3,13
1bc6: 06c6f163 bgeu a3,a2,1c28 <strncpy+0x1ce>
1bca: 000786a3 sb zero,13(a5)
1bce: 8082 ret
;
if (!n || !*s)
1bd0: c645 beqz a2,1c78 <strncpy+0x21e>
1bd2: 0005c783 lbu a5,0(a1)
1bd6: ea078be3 beqz a5,1a8c <strncpy+0x32>
goto tail;
wd = (void *)d;
ws = (const void *)s;
for (; n >= sizeof(size_t) && !HASZERO(*ws); n -= sizeof(size_t), ws++, wd++)
1bda: 479d li a5,7
1bdc: 02c7ff63 bgeu a5,a2,1c1a <strncpy+0x1c0>
1be0: 00000897 auipc a7,0x0
1be4: 3b88b883 ld a7,952(a7) # 1f98 <__clone+0xa8>
1be8: 00000817 auipc a6,0x0
1bec: 3b883803 ld a6,952(a6) # 1fa0 <__clone+0xb0>
1bf0: 431d li t1,7
1bf2: 6198 ld a4,0(a1)
1bf4: 011707b3 add a5,a4,a7
1bf8: fff74693 not a3,a4
1bfc: 8ff5 and a5,a5,a3
1bfe: 0107f7b3 and a5,a5,a6
1c02: ef81 bnez a5,1c1a <strncpy+0x1c0>
*wd = *ws;
1c04: e118 sd a4,0(a0)
for (; n >= sizeof(size_t) && !HASZERO(*ws); n -= sizeof(size_t), ws++, wd++)
1c06: 1661 addi a2,a2,-8
1c08: 05a1 addi a1,a1,8
1c0a: 0521 addi a0,a0,8
1c0c: fec363e3 bltu t1,a2,1bf2 <strncpy+0x198>
d = (void *)wd;
s = (const void *)ws;
}
for (; n && (*d = *s); n--, s++, d++)
1c10: e609 bnez a2,1c1a <strncpy+0x1c0>
1c12: a08d j 1c74 <strncpy+0x21a>
1c14: 167d addi a2,a2,-1
1c16: 0505 addi a0,a0,1
1c18: ca01 beqz a2,1c28 <strncpy+0x1ce>
1c1a: 0005c783 lbu a5,0(a1)
1c1e: 0585 addi a1,a1,1
1c20: 00f50023 sb a5,0(a0)
1c24: fbe5 bnez a5,1c14 <strncpy+0x1ba>
;
tail:
1c26: b59d j 1a8c <strncpy+0x32>
memset(d, 0, n);
return d;
}
1c28: 8082 ret
1c2a: 472d li a4,11
1c2c: bdb5 j 1aa8 <strncpy+0x4e>
1c2e: 00778713 addi a4,a5,7
1c32: 45ad li a1,11
1c34: fff60693 addi a3,a2,-1
1c38: e6b778e3 bgeu a4,a1,1aa8 <strncpy+0x4e>
1c3c: b7fd j 1c2a <strncpy+0x1d0>
1c3e: 40a007b3 neg a5,a0
1c42: 8832 mv a6,a2
1c44: 8b9d andi a5,a5,7
1c46: 4681 li a3,0
1c48: e4060be3 beqz a2,1a9e <strncpy+0x44>
1c4c: b7cd j 1c2e <strncpy+0x1d4>
for (int i = 0; i < n; ++i, *(p++) = c)
1c4e: 468d li a3,3
1c50: bd75 j 1b0c <strncpy+0xb2>
1c52: 872a mv a4,a0
1c54: 4681 li a3,0
1c56: bd5d j 1b0c <strncpy+0xb2>
1c58: 4685 li a3,1
1c5a: bd4d j 1b0c <strncpy+0xb2>
1c5c: 8082 ret
1c5e: 87aa mv a5,a0
1c60: 4681 li a3,0
1c62: b5f9 j 1b30 <strncpy+0xd6>
1c64: 4689 li a3,2
1c66: b55d j 1b0c <strncpy+0xb2>
1c68: 4691 li a3,4
1c6a: b54d j 1b0c <strncpy+0xb2>
1c6c: 4695 li a3,5
1c6e: bd79 j 1b0c <strncpy+0xb2>
1c70: 4699 li a3,6
1c72: bd69 j 1b0c <strncpy+0xb2>
1c74: 8082 ret
1c76: 8082 ret
1c78: 8082 ret
0000000000001c7a <open>:
#include <unistd.h>
#include "syscall.h"
int open(const char *path, int flags)
{
1c7a: 87aa mv a5,a0
1c7c: 862e mv a2,a1
__asm_syscall("r"(a7), "0"(a0), "r"(a1), "r"(a2))
}
static inline long __syscall4(long n, long a, long b, long c, long d)
{
register long a7 __asm__("a7") = n;
1c7e: 03800893 li a7,56
register long a0 __asm__("a0") = a;
1c82: f9c00513 li a0,-100
register long a1 __asm__("a1") = b;
1c86: 85be mv a1,a5
register long a2 __asm__("a2") = c;
register long a3 __asm__("a3") = d;
1c88: 4689 li a3,2
__asm_syscall("r"(a7), "0"(a0), "r"(a1), "r"(a2), "r"(a3))
1c8a: 00000073 ecall
return syscall(SYS_openat, AT_FDCWD, path, flags, O_RDWR);
}
1c8e: 2501 sext.w a0,a0
1c90: 8082 ret
0000000000001c92 <openat>:
register long a7 __asm__("a7") = n;
1c92: 03800893 li a7,56
register long a3 __asm__("a3") = d;
1c96: 18000693 li a3,384
__asm_syscall("r"(a7), "0"(a0), "r"(a1), "r"(a2), "r"(a3))
1c9a: 00000073 ecall
int openat(int dirfd,const char *path, int flags)
{
return syscall(SYS_openat, dirfd, path, flags, 0600);
}
1c9e: 2501 sext.w a0,a0
1ca0: 8082 ret
0000000000001ca2 <close>:
register long a7 __asm__("a7") = n;
1ca2: 03900893 li a7,57
__asm_syscall("r"(a7), "0"(a0))
1ca6: 00000073 ecall
int close(int fd)
{
return syscall(SYS_close, fd);
}
1caa: 2501 sext.w a0,a0
1cac: 8082 ret
0000000000001cae <read>:
register long a7 __asm__("a7") = n;
1cae: 03f00893 li a7,63
__asm_syscall("r"(a7), "0"(a0), "r"(a1), "r"(a2))
1cb2: 00000073 ecall
ssize_t read(int fd, void *buf, size_t len)
{
return syscall(SYS_read, fd, buf, len);
}
1cb6: 8082 ret
0000000000001cb8 <write>:
register long a7 __asm__("a7") = n;
1cb8: 04000893 li a7,64
__asm_syscall("r"(a7), "0"(a0), "r"(a1), "r"(a2))
1cbc: 00000073 ecall
ssize_t write(int fd, const void *buf, size_t len)
{
return syscall(SYS_write, fd, buf, len);
}
1cc0: 8082 ret
0000000000001cc2 <getpid>:
register long a7 __asm__("a7") = n;
1cc2: 0ac00893 li a7,172
__asm_syscall("r"(a7))
1cc6: 00000073 ecall
pid_t getpid(void)
{
return syscall(SYS_getpid);
}
1cca: 2501 sext.w a0,a0
1ccc: 8082 ret
0000000000001cce <getppid>:
register long a7 __asm__("a7") = n;
1cce: 0ad00893 li a7,173
__asm_syscall("r"(a7))
1cd2: 00000073 ecall
pid_t getppid(void)
{
return syscall(SYS_getppid);
}
1cd6: 2501 sext.w a0,a0
1cd8: 8082 ret
0000000000001cda <sched_yield>:
register long a7 __asm__("a7") = n;
1cda: 07c00893 li a7,124
__asm_syscall("r"(a7))
1cde: 00000073 ecall
int sched_yield(void)
{
return syscall(SYS_sched_yield);
}
1ce2: 2501 sext.w a0,a0
1ce4: 8082 ret
0000000000001ce6 <fork>:
register long a7 __asm__("a7") = n;
1ce6: 0dc00893 li a7,220
register long a0 __asm__("a0") = a;
1cea: 4545 li a0,17
register long a1 __asm__("a1") = b;
1cec: 4581 li a1,0
__asm_syscall("r"(a7), "0"(a0), "r"(a1))
1cee: 00000073 ecall
pid_t fork(void)
{
return syscall(SYS_clone, SIGCHLD, 0);
}
1cf2: 2501 sext.w a0,a0
1cf4: 8082 ret
0000000000001cf6 <clone>:
pid_t clone(int (*fn)(void *arg), void *arg, void *stack, size_t stack_size, unsigned long flags)
{
1cf6: 85b2 mv a1,a2
1cf8: 863a mv a2,a4
if (stack)
1cfa: c191 beqz a1,1cfe <clone+0x8>
stack += stack_size;
1cfc: 95b6 add a1,a1,a3
return __clone(fn, stack, flags, NULL, NULL, NULL);
1cfe: 4781 li a5,0
1d00: 4701 li a4,0
1d02: 4681 li a3,0
1d04: 2601 sext.w a2,a2
1d06: a2ed j 1ef0 <__clone>
0000000000001d08 <exit>:
register long a7 __asm__("a7") = n;
1d08: 05d00893 li a7,93
__asm_syscall("r"(a7), "0"(a0))
1d0c: 00000073 ecall
//return syscall(SYS_clone, fn, stack, flags, NULL, NULL, NULL);
}
void exit(int code)
{
syscall(SYS_exit, code);
}
1d10: 8082 ret
0000000000001d12 <waitpid>:
register long a7 __asm__("a7") = n;
1d12: 10400893 li a7,260
register long a3 __asm__("a3") = d;
1d16: 4681 li a3,0
__asm_syscall("r"(a7), "0"(a0), "r"(a1), "r"(a2), "r"(a3))
1d18: 00000073 ecall
int waitpid(int pid, int *code, int options)
{
return syscall(SYS_wait4, pid, code, options, 0);
}
1d1c: 2501 sext.w a0,a0
1d1e: 8082 ret
0000000000001d20 <exec>:
register long a7 __asm__("a7") = n;
1d20: 0dd00893 li a7,221
__asm_syscall("r"(a7), "0"(a0))
1d24: 00000073 ecall
int exec(char *name)
{
return syscall(SYS_execve, name);
}
1d28: 2501 sext.w a0,a0
1d2a: 8082 ret
0000000000001d2c <execve>:
register long a7 __asm__("a7") = n;
1d2c: 0dd00893 li a7,221
__asm_syscall("r"(a7), "0"(a0), "r"(a1), "r"(a2))
1d30: 00000073 ecall
int execve(const char *name, char *const argv[], char *const argp[])
{
return syscall(SYS_execve, name, argv, argp);
}
1d34: 2501 sext.w a0,a0
1d36: 8082 ret
0000000000001d38 <times>:
register long a7 __asm__("a7") = n;
1d38: 09900893 li a7,153
__asm_syscall("r"(a7), "0"(a0))
1d3c: 00000073 ecall
int times(void *mytimes)
{
return syscall(SYS_times, mytimes);
}
1d40: 2501 sext.w a0,a0
1d42: 8082 ret
0000000000001d44 <get_time>:
int64 get_time()
{
1d44: 1141 addi sp,sp,-16
register long a7 __asm__("a7") = n;
1d46: 0a900893 li a7,169
register long a0 __asm__("a0") = a;
1d4a: 850a mv a0,sp
register long a1 __asm__("a1") = b;
1d4c: 4581 li a1,0
__asm_syscall("r"(a7), "0"(a0), "r"(a1))
1d4e: 00000073 ecall
TimeVal time;
int err = sys_get_time(&time, 0);
if (err == 0)
1d52: 2501 sext.w a0,a0
1d54: ed09 bnez a0,1d6e <get_time+0x2a>
{
return ((time.sec & 0xffff) * 1000 + time.usec / 1000);
1d56: 67a2 ld a5,8(sp)
1d58: 3e800713 li a4,1000
1d5c: 00015503 lhu a0,0(sp)
1d60: 02e7d7b3 divu a5,a5,a4
1d64: 02e50533 mul a0,a0,a4
1d68: 953e add a0,a0,a5
}
else
{
return -1;
}
}
1d6a: 0141 addi sp,sp,16
1d6c: 8082 ret
return -1;
1d6e: 557d li a0,-1
1d70: bfed j 1d6a <get_time+0x26>
0000000000001d72 <sys_get_time>:
register long a7 __asm__("a7") = n;
1d72: 0a900893 li a7,169
__asm_syscall("r"(a7), "0"(a0), "r"(a1))
1d76: 00000073 ecall
int sys_get_time(TimeVal *ts, int tz)
{
return syscall(SYS_gettimeofday, ts, tz);
}
1d7a: 2501 sext.w a0,a0
1d7c: 8082 ret
0000000000001d7e <time>:
register long a7 __asm__("a7") = n;
1d7e: 42600893 li a7,1062
__asm_syscall("r"(a7), "0"(a0))
1d82: 00000073 ecall
int time(unsigned long *tloc)
{
return syscall(SYS_time, tloc);
}
1d86: 2501 sext.w a0,a0
1d88: 8082 ret
0000000000001d8a <sleep>:
int sleep(unsigned long long time)
{
1d8a: 1141 addi sp,sp,-16
TimeVal tv = {.sec = time, .usec = 0};
1d8c: e02a sd a0,0(sp)
register long a0 __asm__("a0") = a;
1d8e: 850a mv a0,sp
1d90: e402 sd zero,8(sp)
register long a7 __asm__("a7") = n;
1d92: 06500893 li a7,101
register long a1 __asm__("a1") = b;
1d96: 85aa mv a1,a0
__asm_syscall("r"(a7), "0"(a0), "r"(a1))
1d98: 00000073 ecall
if (syscall(SYS_nanosleep, &tv, &tv)) return tv.sec;
1d9c: e501 bnez a0,1da4 <sleep+0x1a>
return 0;
1d9e: 4501 li a0,0
}
1da0: 0141 addi sp,sp,16
1da2: 8082 ret
if (syscall(SYS_nanosleep, &tv, &tv)) return tv.sec;
1da4: 4502 lw a0,0(sp)
}
1da6: 0141 addi sp,sp,16
1da8: 8082 ret
0000000000001daa <set_priority>:
register long a7 __asm__("a7") = n;
1daa: 08c00893 li a7,140
__asm_syscall("r"(a7), "0"(a0))
1dae: 00000073 ecall
int set_priority(int prio)
{
return syscall(SYS_setpriority, prio);
}
1db2: 2501 sext.w a0,a0
1db4: 8082 ret
0000000000001db6 <mmap>:
__asm_syscall("r"(a7), "0"(a0), "r"(a1), "r"(a2), "r"(a3), "r"(a4))
}
static inline long __syscall6(long n, long a, long b, long c, long d, long e, long f)
{
register long a7 __asm__("a7") = n;
1db6: 0de00893 li a7,222
register long a1 __asm__("a1") = b;
register long a2 __asm__("a2") = c;
register long a3 __asm__("a3") = d;
register long a4 __asm__("a4") = e;
register long a5 __asm__("a5") = f;
__asm_syscall("r"(a7), "0"(a0), "r"(a1), "r"(a2), "r"(a3), "r"(a4), "r"(a5))
1dba: 00000073 ecall
void *mmap(void *start, size_t len, int prot, int flags, int fd, off_t off)
{
return syscall(SYS_mmap, start, len, prot, flags, fd, off);
}
1dbe: 8082 ret
0000000000001dc0 <munmap>:
register long a7 __asm__("a7") = n;
1dc0: 0d700893 li a7,215
__asm_syscall("r"(a7), "0"(a0), "r"(a1))
1dc4: 00000073 ecall
int munmap(void *start, size_t len)
{
return syscall(SYS_munmap, start, len);
}
1dc8: 2501 sext.w a0,a0
1dca: 8082 ret
0000000000001dcc <wait>:
int wait(int *code)
{
1dcc: 85aa mv a1,a0
register long a7 __asm__("a7") = n;
1dce: 10400893 li a7,260
register long a0 __asm__("a0") = a;
1dd2: 557d li a0,-1
register long a2 __asm__("a2") = c;
1dd4: 4601 li a2,0
register long a3 __asm__("a3") = d;
1dd6: 4681 li a3,0
__asm_syscall("r"(a7), "0"(a0), "r"(a1), "r"(a2), "r"(a3))
1dd8: 00000073 ecall
return waitpid((int)-1, code, 0);
}
1ddc: 2501 sext.w a0,a0
1dde: 8082 ret
0000000000001de0 <spawn>:
register long a7 __asm__("a7") = n;
1de0: 19000893 li a7,400
__asm_syscall("r"(a7), "0"(a0))
1de4: 00000073 ecall
int spawn(char *file)
{
return syscall(SYS_spawn, file);
}
1de8: 2501 sext.w a0,a0
1dea: 8082 ret
0000000000001dec <mailread>:
register long a7 __asm__("a7") = n;
1dec: 19100893 li a7,401
__asm_syscall("r"(a7), "0"(a0), "r"(a1))
1df0: 00000073 ecall
int mailread(void *buf, int len)
{
return syscall(SYS_mailread, buf, len);
}
1df4: 2501 sext.w a0,a0
1df6: 8082 ret
0000000000001df8 <mailwrite>:
register long a7 __asm__("a7") = n;
1df8: 19200893 li a7,402
__asm_syscall("r"(a7), "0"(a0), "r"(a1), "r"(a2))
1dfc: 00000073 ecall
int mailwrite(int pid, void *buf, int len)
{
return syscall(SYS_mailwrite, pid, buf, len);
}
1e00: 2501 sext.w a0,a0
1e02: 8082 ret
0000000000001e04 <fstat>:
register long a7 __asm__("a7") = n;
1e04: 05000893 li a7,80
__asm_syscall("r"(a7), "0"(a0), "r"(a1))
1e08: 00000073 ecall
int fstat(int fd, struct kstat *st)
{
return syscall(SYS_fstat, fd, st);
}
1e0c: 2501 sext.w a0,a0
1e0e: 8082 ret
0000000000001e10 <sys_linkat>:
register long a4 __asm__("a4") = e;
1e10: 1702 slli a4,a4,0x20
register long a7 __asm__("a7") = n;
1e12: 02500893 li a7,37
register long a4 __asm__("a4") = e;
1e16: 9301 srli a4,a4,0x20
__asm_syscall("r"(a7), "0"(a0), "r"(a1), "r"(a2), "r"(a3), "r"(a4))
1e18: 00000073 ecall
int sys_linkat(int olddirfd, char *oldpath, int newdirfd, char *newpath, unsigned int flags)
{
return syscall(SYS_linkat, olddirfd, oldpath, newdirfd, newpath, flags);
}
1e1c: 2501 sext.w a0,a0
1e1e: 8082 ret
0000000000001e20 <sys_unlinkat>:
register long a2 __asm__("a2") = c;
1e20: 1602 slli a2,a2,0x20
register long a7 __asm__("a7") = n;
1e22: 02300893 li a7,35
register long a2 __asm__("a2") = c;
1e26: 9201 srli a2,a2,0x20
__asm_syscall("r"(a7), "0"(a0), "r"(a1), "r"(a2))
1e28: 00000073 ecall
int sys_unlinkat(int dirfd, char *path, unsigned int flags)
{
return syscall(SYS_unlinkat, dirfd, path, flags);
}
1e2c: 2501 sext.w a0,a0
1e2e: 8082 ret
0000000000001e30 <link>:
int link(char *old_path, char *new_path)
{
1e30: 87aa mv a5,a0
1e32: 86ae mv a3,a1
register long a7 __asm__("a7") = n;
1e34: 02500893 li a7,37
register long a0 __asm__("a0") = a;
1e38: f9c00513 li a0,-100
register long a1 __asm__("a1") = b;
1e3c: 85be mv a1,a5
register long a2 __asm__("a2") = c;
1e3e: f9c00613 li a2,-100
register long a4 __asm__("a4") = e;
1e42: 4701 li a4,0
__asm_syscall("r"(a7), "0"(a0), "r"(a1), "r"(a2), "r"(a3), "r"(a4))
1e44: 00000073 ecall
return sys_linkat(AT_FDCWD, old_path, AT_FDCWD, new_path, 0);
}
1e48: 2501 sext.w a0,a0
1e4a: 8082 ret
0000000000001e4c <unlink>:
int unlink(char *path)
{
1e4c: 85aa mv a1,a0
register long a7 __asm__("a7") = n;
1e4e: 02300893 li a7,35
register long a0 __asm__("a0") = a;
1e52: f9c00513 li a0,-100
register long a2 __asm__("a2") = c;
1e56: 4601 li a2,0
__asm_syscall("r"(a7), "0"(a0), "r"(a1), "r"(a2))
1e58: 00000073 ecall
return sys_unlinkat(AT_FDCWD, path, 0);
}
1e5c: 2501 sext.w a0,a0
1e5e: 8082 ret
0000000000001e60 <uname>:
register long a7 __asm__("a7") = n;
1e60: 0a000893 li a7,160
__asm_syscall("r"(a7), "0"(a0))
1e64: 00000073 ecall
int uname(void *buf)
{
return syscall(SYS_uname, buf);
}
1e68: 2501 sext.w a0,a0
1e6a: 8082 ret
0000000000001e6c <brk>:
register long a7 __asm__("a7") = n;
1e6c: 0d600893 li a7,214
__asm_syscall("r"(a7), "0"(a0))
1e70: 00000073 ecall
int brk(void *addr)
{
return syscall(SYS_brk, addr);
}
1e74: 2501 sext.w a0,a0
1e76: 8082 ret
0000000000001e78 <getcwd>:
register long a7 __asm__("a7") = n;
1e78: 48c5 li a7,17
__asm_syscall("r"(a7), "0"(a0), "r"(a1))
1e7a: 00000073 ecall
char *getcwd(char *buf, size_t size){
return syscall(SYS_getcwd, buf, size);
}
1e7e: 8082 ret
0000000000001e80 <chdir>:
register long a7 __asm__("a7") = n;
1e80: 03100893 li a7,49
__asm_syscall("r"(a7), "0"(a0))
1e84: 00000073 ecall
int chdir(const char *path){
return syscall(SYS_chdir, path);
}
1e88: 2501 sext.w a0,a0
1e8a: 8082 ret
0000000000001e8c <mkdir>:
int mkdir(const char *path, mode_t mode){
1e8c: 862e mv a2,a1
1e8e: 87aa mv a5,a0
register long a2 __asm__("a2") = c;
1e90: 1602 slli a2,a2,0x20
register long a7 __asm__("a7") = n;
1e92: 02200893 li a7,34
register long a0 __asm__("a0") = a;
1e96: f9c00513 li a0,-100
register long a1 __asm__("a1") = b;
1e9a: 85be mv a1,a5
register long a2 __asm__("a2") = c;
1e9c: 9201 srli a2,a2,0x20
__asm_syscall("r"(a7), "0"(a0), "r"(a1), "r"(a2))
1e9e: 00000073 ecall
return syscall(SYS_mkdirat, AT_FDCWD, path, mode);
}
1ea2: 2501 sext.w a0,a0
1ea4: 8082 ret
0000000000001ea6 <getdents>:
register long a7 __asm__("a7") = n;
1ea6: 03d00893 li a7,61
__asm_syscall("r"(a7), "0"(a0), "r"(a1), "r"(a2))
1eaa: 00000073 ecall
int getdents(int fd, struct linux_dirent64 *dirp64, unsigned long len){
//return syscall(SYS_getdents64, fd, dirp64, len);
return syscall(SYS_getdents64, fd, dirp64, len);
}
1eae: 2501 sext.w a0,a0
1eb0: 8082 ret
0000000000001eb2 <pipe>:
register long a7 __asm__("a7") = n;
1eb2: 03b00893 li a7,59
register long a1 __asm__("a1") = b;
1eb6: 4581 li a1,0
__asm_syscall("r"(a7), "0"(a0), "r"(a1))
1eb8: 00000073 ecall
int pipe(int fd[2]){
return syscall(SYS_pipe2, fd, 0);
}
1ebc: 2501 sext.w a0,a0
1ebe: 8082 ret
0000000000001ec0 <dup>:
register long a7 __asm__("a7") = n;
1ec0: 48dd li a7,23
__asm_syscall("r"(a7), "0"(a0))
1ec2: 00000073 ecall
int dup(int fd){
return syscall(SYS_dup, fd);
}
1ec6: 2501 sext.w a0,a0
1ec8: 8082 ret
0000000000001eca <dup2>:
register long a7 __asm__("a7") = n;
1eca: 48e1 li a7,24
register long a2 __asm__("a2") = c;
1ecc: 4601 li a2,0
__asm_syscall("r"(a7), "0"(a0), "r"(a1), "r"(a2))
1ece: 00000073 ecall
int dup2(int old, int new){
return syscall(SYS_dup3, old, new, 0);
}
1ed2: 2501 sext.w a0,a0
1ed4: 8082 ret
0000000000001ed6 <mount>:
register long a7 __asm__("a7") = n;
1ed6: 02800893 li a7,40
__asm_syscall("r"(a7), "0"(a0), "r"(a1), "r"(a2), "r"(a3), "r"(a4))
1eda: 00000073 ecall
int mount(const char *special, const char *dir, const char *fstype, unsigned long flags, const void *data)
{
return syscall(SYS_mount, special, dir, fstype, flags, data);
}
1ede: 2501 sext.w a0,a0
1ee0: 8082 ret
0000000000001ee2 <umount>:
register long a7 __asm__("a7") = n;
1ee2: 02700893 li a7,39
register long a1 __asm__("a1") = b;
1ee6: 4581 li a1,0
__asm_syscall("r"(a7), "0"(a0), "r"(a1))
1ee8: 00000073 ecall
int umount(const char *special)
{
return syscall(SYS_umount2, special, 0);
}
1eec: 2501 sext.w a0,a0
1eee: 8082 ret
0000000000001ef0 <__clone>:
.global __clone
.type __clone, %function
__clone:
# Save func and arg to stack
addi a1, a1, -16
1ef0: 15c1 addi a1,a1,-16
sd a0, 0(a1)
1ef2: e188 sd a0,0(a1)
sd a3, 8(a1)
1ef4: e594 sd a3,8(a1)
# Call SYS_clone
mv a0, a2
1ef6: 8532 mv a0,a2
mv a2, a4
1ef8: 863a mv a2,a4
mv a3, a5
1efa: 86be mv a3,a5
mv a4, a6
1efc: 8742 mv a4,a6
li a7, 220 # SYS_clone
1efe: 0dc00893 li a7,220
ecall
1f02: 00000073 ecall
beqz a0, 1f
1f06: c111 beqz a0,1f0a <__clone+0x1a>
# Parent
ret
1f08: 8082 ret
# Child
1: ld a1, 0(sp)
1f0a: 6582 ld a1,0(sp)
ld a0, 8(sp)
1f0c: 6522 ld a0,8(sp)
jalr a1
1f0e: 9582 jalr a1
# Exit
li a7, 93 # SYS_exit
1f10: 05d00893 li a7,93
ecall
1f14: 00000073 ecall
|
tests/nonsmoke/functional/CompileTests/experimental_ada_tests/tests/entry_call.adb | ouankou/rose | 488 | 9494 | with Entry_Declaration;
procedure Entry_Call is
The_Task : Entry_Declaration.Task_With_Entry;
begin
The_Task.First_Entry;
end Entry_Call;
|
oeis/328/A328286.asm | neoneye/loda-programs | 11 | 243818 | ; A328286: Expansion of e.g.f. -log(1 - x - x^2/2).
; Submitted by <NAME>
; 1,2,5,21,114,780,6390,61110,667800,8210160,112152600,1685237400,27624920400,490572482400,9381882510000,192238348302000,4201639474032000,97572286427616000,2399151995223984000,62268748888378032000,1701213856860117600000
mov $2,$0
add $2,1
mov $4,$0
lpb $2
mov $0,$4
sub $2,1
sub $0,$2
sub $3,$1
mul $1,$0
mov $6,$0
mul $6,$3
mov $3,$5
sub $3,1
sub $3,$6
div $3,2
add $3,1
add $1,$3
lpe
mov $0,$1
|
iod/con2/sprite/cf3.asm | olifink/smsqe | 0 | 13998 | * Sprite cf3
*
* Mode 4
* +|----------+
* | gg ggg gg |
* |g g g g|
* |g g g|
* |g gg gg |
* |g g g|
* |g g g g|
* | gg g gg |
* +|----------+
*
section sprite
xdef sp_cf3
xref sp_zero
sp_cf3
dc.w $0100,$0000
dc.w 11,7,0,0
dc.l sc4_cf3-*
dc.l sp_zero-*
dc.l 0
sc4_cf3
dc.w $6e00,$c000
dc.w $8900,$2000
dc.w $8800,$2000
dc.w $8c00,$c000
dc.w $8800,$2000
dc.w $8900,$2000
dc.w $6800,$c000
*
end
|
Transynther/x86/_processed/P/_zr_/i3-7100_9_0x84_notsx.log_7170_329.asm | ljhsiun2/medusa | 9 | 85747 | <reponame>ljhsiun2/medusa<gh_stars>1-10
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r12
push %r13
push %r14
push %r8
push %rbp
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_WC_ht+0xff76, %r14
nop
nop
nop
and $8853, %r8
mov $0x6162636465666768, %r10
movq %r10, %xmm0
movups %xmm0, (%r14)
nop
nop
nop
nop
nop
cmp %r10, %r10
lea addresses_A_ht+0x11276, %rbp
nop
nop
nop
nop
nop
add $12282, %r13
movb (%rbp), %r14b
nop
nop
nop
inc %r8
lea addresses_A_ht+0x107b6, %r12
nop
nop
nop
nop
nop
xor $39702, %rbx
mov (%r12), %r13d
nop
cmp $44320, %rbx
lea addresses_WT_ht+0xb776, %rbp
nop
nop
nop
nop
nop
add $63053, %rbx
movl $0x61626364, (%rbp)
nop
nop
nop
nop
cmp %r10, %r10
lea addresses_normal_ht+0xbf56, %r14
xor %rbp, %rbp
mov $0x6162636465666768, %r10
movq %r10, %xmm4
and $0xffffffffffffffc0, %r14
movntdq %xmm4, (%r14)
nop
nop
nop
nop
sub %rbp, %rbp
lea addresses_normal_ht+0x1ce76, %rsi
lea addresses_UC_ht+0x16f76, %rdi
nop
nop
nop
nop
sub %r14, %r14
mov $45, %rcx
rep movsb
nop
nop
nop
nop
cmp %rcx, %rcx
lea addresses_normal_ht+0x14776, %rbp
nop
nop
nop
nop
nop
sub %r10, %r10
movups (%rbp), %xmm3
vpextrq $0, %xmm3, %rcx
nop
nop
nop
cmp %rbp, %rbp
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %r8
pop %r14
pop %r13
pop %r12
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r12
push %r14
push %r8
push %r9
push %rbp
push %rdi
// Store
lea addresses_A+0x5796, %r12
mfence
movb $0x51, (%r12)
xor $60689, %r8
// Load
lea addresses_normal+0xde1e, %r8
nop
sub $15613, %r9
mov (%r8), %r14d
nop
add $20282, %r9
// Faulty Load
mov $0xf76, %r8
nop
nop
nop
nop
xor $32792, %r9
mov (%r8), %r14
lea oracles, %r8
and $0xff, %r14
shlq $12, %r14
mov (%r8,%r14,1), %r14
pop %rdi
pop %rbp
pop %r9
pop %r8
pop %r14
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_P', 'same': False, 'size': 4, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_A', 'same': False, 'size': 1, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_normal', 'same': False, 'size': 4, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'type': 'addresses_P', 'same': True, 'size': 8, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'dst': {'type': 'addresses_WC_ht', 'same': False, 'size': 16, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_A_ht', 'same': False, 'size': 1, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_A_ht', 'same': False, 'size': 4, 'congruent': 5, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_WT_ht', 'same': False, 'size': 4, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_normal_ht', 'same': False, 'size': 16, 'congruent': 5, 'NT': True, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_normal_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 4, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_normal_ht', 'same': False, 'size': 16, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'00': 7170}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
|
non_regression/switch_x64_macosx_2.o.asm | LRGH/plasmasm | 1 | 171298 | <gh_stars>1-10
.macosx_version_min 10, 11
.section __TEXT,__text,regular,pure_instructions
.align 4, 0x90
.globl _PyToken_OneChar
_PyToken_OneChar:
pushq %rbp
movq %rsp, %rbp
movl %edi, -8(%rbp)
movl %edi, %eax
subl $93, %edi
movl %eax, -12(%rbp)
movl %edi, -16(%rbp)
jg L00000074
L00000014:
jmp L00000016
L00000016:
movl -12(%rbp), %eax
subl $57, %eax
movl %eax, -20(%rbp)
jg L00000048
L00000021:
jmp L00000023
L00000023:
movl -12(%rbp), %eax
subl $37, %eax
movl %eax, -24(%rbp)
je L000000FA
L00000032:
jmp L00000034
L00000034:
movl -12(%rbp), %eax
subl $46, %eax
movl %eax, -28(%rbp)
je L000000F1
L00000043:
jmp L00000139
L00000048:
movl -12(%rbp), %eax
addl $-58, %eax
movl %eax, %ecx
subl $6, %eax
movq %rcx, -40(%rbp)
movl %eax, -44(%rbp)
ja L00000139
L00000060:
leaq L00000148(%rip), %rax
movq -40(%rbp), %rcx
movslq (%rax,%rcx,4), %rdx
addq %rax, %rdx
jmp *%rdx
L00000074:
movl -12(%rbp), %eax
subl $95, %eax
movl %eax, -48(%rbp)
jg L00000095
L0000007F:
jmp L00000081
L00000081:
movl -12(%rbp), %eax
subl $94, %eax
movl %eax, -52(%rbp)
je L0000011E
L00000090:
jmp L00000139
L00000095:
movl -12(%rbp), %eax
subl $124, %eax
movl %eax, -56(%rbp)
jg L000000BC
L000000A0:
jmp L000000A2
L000000A2:
movl -12(%rbp), %eax
subl $96, %eax
movl %eax, -60(%rbp)
je L00000103
L000000AD:
jmp L000000AF
L000000AF:
movl -12(%rbp), %eax
subl $123, %eax
movl %eax, -64(%rbp)
je L0000010C
L000000BA:
jmp L00000139
L000000BC:
movl -12(%rbp), %eax
subl $125, %eax
movl %eax, -68(%rbp)
je L00000115
L000000C7:
jmp L000000C9
L000000C9:
movl -12(%rbp), %eax
subl $126, %eax
movl %eax, -72(%rbp)
je L00000127
L000000D4:
jmp L00000139
L000000D6:
movl $11, -4(%rbp)
jmp L00000140
L000000DF:
movl $21, -4(%rbp)
jmp L00000140
L000000E8:
movl $22, -4(%rbp)
jmp L00000140
L000000F1:
movl $23, -4(%rbp)
jmp L00000140
L000000FA:
movl $24, -4(%rbp)
jmp L00000140
L00000103:
movl $25, -4(%rbp)
jmp L00000140
L0000010C:
movl $26, -4(%rbp)
jmp L00000140
L00000115:
movl $27, -4(%rbp)
jmp L00000140
L0000011E:
movl $33, -4(%rbp)
jmp L00000140
L00000127:
movl $32, -4(%rbp)
jmp L00000140
L00000130:
movl $50, -4(%rbp)
jmp L00000140
L00000139:
movl $51, -4(%rbp)
L00000140:
movl -4(%rbp), %eax
popq %rbp
ret
L00000145:
.align 4, 0x90
# ----------------------
L00000148:
.long L000000D6-L00000148
.long L00000139-L00000148
.long L00000139-L00000148
.long L000000E8-L00000148
.long L000000DF-L00000148
.long L00000139-L00000148
.long L00000130-L00000148
# ----------------------
.align 4, 0x90
.globl _PyToken_TwoChars
_PyToken_TwoChars:
pushq %rbp
movq %rsp, %rbp
movl %edi, -8(%rbp)
movl %esi, -12(%rbp)
movl -8(%rbp), %esi
movl %esi, %edi
subl $60, %edi
movl %esi, -16(%rbp)
movl %edi, -20(%rbp)
jg L000001B8
L0000018A:
jmp L0000018C
L0000018C:
movl -16(%rbp), %eax
addl $-33, %eax
movl %eax, %ecx
subl $14, %eax
movq %rcx, -32(%rbp)
movl %eax, -36(%rbp)
ja L0000038A
L000001A4:
leaq L00000398(%rip), %rax
movq -32(%rbp), %rcx
movslq (%rax,%rcx,4), %rdx
addq %rax, %rdx
jmp *%rdx
L000001B8:
movl -16(%rbp), %eax
subl $93, %eax
movl %eax, -40(%rbp)
jg L000001E2
L000001C3:
jmp L000001C5
L000001C5:
movl -16(%rbp), %eax
subl $61, %eax
movl %eax, -44(%rbp)
je L00000207
L000001D0:
jmp L000001D2
L000001D2:
movl -16(%rbp), %eax
subl $62, %eax
movl %eax, -48(%rbp)
je L00000243
L000001DD:
jmp L0000038A
L000001E2:
movl -16(%rbp), %eax
subl $94, %eax
movl %eax, -52(%rbp)
je L00000372
L000001F1:
jmp L000001F3
L000001F3:
movl -16(%rbp), %eax
subl $124, %eax
movl %eax, -56(%rbp)
je L0000032A
L00000202:
jmp L0000038A
L00000207:
movl -12(%rbp), %eax
subl $61, %eax
movl %eax, -60(%rbp)
jne L00000220
L00000212:
jmp L00000214
L00000214:
movl $28, -4(%rbp)
jmp L00000391
L00000220:
jmp L0000038A
L00000225:
movl -12(%rbp), %eax
subl $61, %eax
movl %eax, -64(%rbp)
jne L0000023E
L00000230:
jmp L00000232
L00000232:
movl $29, -4(%rbp)
jmp L00000391
L0000023E:
jmp L0000038A
L00000243:
movl -12(%rbp), %eax
movl %eax, %ecx
subl $62, %ecx
movl %eax, -68(%rbp)
movl %ecx, -72(%rbp)
je L0000026E
L00000253:
jmp L00000255
L00000255:
movl -68(%rbp), %eax
subl $61, %eax
movl %eax, -76(%rbp)
jne L0000027A
L00000260:
jmp L00000262
L00000262:
movl $31, -4(%rbp)
jmp L00000391
L0000026E:
movl $35, -4(%rbp)
jmp L00000391
L0000027A:
jmp L0000038A
L0000027F:
movl -12(%rbp), %eax
subl $61, %eax
movl %eax, -80(%rbp)
jne L00000298
L0000028A:
jmp L0000028C
L0000028C:
movl $37, -4(%rbp)
jmp L00000391
L00000298:
jmp L0000038A
L0000029D:
movl -12(%rbp), %eax
subl $61, %eax
movl %eax, -84(%rbp)
jne L000002B6
L000002A8:
jmp L000002AA
L000002AA:
movl $38, -4(%rbp)
jmp L00000391
L000002B6:
jmp L0000038A
L000002BB:
movl -12(%rbp), %eax
movl %eax, %ecx
subl $61, %ecx
movl %eax, -88(%rbp)
movl %ecx, -92(%rbp)
je L000002E6
L000002CB:
jmp L000002CD
L000002CD:
movl -88(%rbp), %eax
subl $42, %eax
movl %eax, -96(%rbp)
jne L000002F2
L000002D8:
jmp L000002DA
L000002DA:
movl $36, -4(%rbp)
jmp L00000391
L000002E6:
movl $39, -4(%rbp)
jmp L00000391
L000002F2:
jmp L0000038A
L000002F7:
movl -12(%rbp), %eax
movl %eax, %ecx
subl $61, %ecx
movl %eax, -100(%rbp)
movl %ecx, -104(%rbp)
je L0000031F
L00000307:
jmp L00000309
L00000309:
movl -100(%rbp), %eax
subl $47, %eax
movl %eax, -108(%rbp)
jne L00000328
L00000314:
jmp L00000316
L00000316:
movl $48, -4(%rbp)
jmp L00000391
L0000031F:
movl $40, -4(%rbp)
jmp L00000391
L00000328:
jmp L0000038A
L0000032A:
movl -12(%rbp), %eax
subl $61, %eax
movl %eax, -112(%rbp)
jne L00000340
L00000335:
jmp L00000337
L00000337:
movl $43, -4(%rbp)
jmp L00000391
L00000340:
jmp L0000038A
L00000342:
movl -12(%rbp), %eax
subl $61, %eax
movl %eax, -116(%rbp)
jne L00000358
L0000034D:
jmp L0000034F
L0000034F:
movl $41, -4(%rbp)
jmp L00000391
L00000358:
jmp L0000038A
L0000035A:
movl -12(%rbp), %eax
subl $61, %eax
movl %eax, -120(%rbp)
jne L00000370
L00000365:
jmp L00000367
L00000367:
movl $42, -4(%rbp)
jmp L00000391
L00000370:
jmp L0000038A
L00000372:
movl -12(%rbp), %eax
subl $61, %eax
movl %eax, -124(%rbp)
jne L00000388
L0000037D:
jmp L0000037F
L0000037F:
movl $44, -4(%rbp)
jmp L00000391
L00000388:
jmp L0000038A
L0000038A:
movl $51, -4(%rbp)
L00000391:
movl -4(%rbp), %eax
popq %rbp
ret
L00000396:
.align 4, 0x90
# ----------------------
L00000398:
.long L00000225-L00000398
.long L0000038A-L00000398
.long L0000038A-L00000398
.long L0000038A-L00000398
.long L00000342-L00000398
.long L0000035A-L00000398
.long L0000038A-L00000398
.long L0000038A-L00000398
.long L0000038A-L00000398
.long L000002BB-L00000398
.long L0000027F-L00000398
.long L0000038A-L00000398
.long L0000029D-L00000398
.long L0000038A-L00000398
.long L000002F7-L00000398
# ----------------------
.align 4, 0x90
.globl _main
_main:
pushq %rbp
movq %rsp, %rbp
subq $32, %rsp
movl $0, -4(%rbp)
movl %edi, -8(%rbp)
movq %rsi, -16(%rbp)
movl -8(%rbp), %edi
call _PyToken_OneChar
L000003FE:
movl -8(%rbp), %edi
movl -8(%rbp), %esi
movl %eax, -20(%rbp)
call _PyToken_TwoChars
L0000040C:
movl -20(%rbp), %esi
addl %eax, %esi
movl %esi, %eax
addq $32, %rsp
popq %rbp
ret
# ----------------------
.subsections_via_symbols
|
data/pokemon/dex_entries/magneton.asm | AtmaBuster/pokeplat-gen2 | 6 | 178161 | db "MAGNET@" ; species name
db "When many"
next "MAGNETON gather"
next "together, the"
page "resulting magnetic"
next "storm disrupts"
next "radio waves.@"
|
test/Succeed/fol-theorems/DataConstructorsAxioms.agda | asr/apia | 10 | 8847 | <filename>test/Succeed/fol-theorems/DataConstructorsAxioms.agda
------------------------------------------------------------------------------
-- Testing the use of ATP axioms with data constructors
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-# OPTIONS --without-K #-}
module DataConstructorsAxioms where
postulate
D : Set
zero : D
succ : D → D
data N : D → Set where
zN : N zero
sN : ∀ {n} → N n → N (succ n)
{-# ATP axioms zN sN #-}
postulate 0-N : N zero
{-# ATP prove 0-N #-}
postulate 1-N : N (succ zero)
{-# ATP prove 1-N #-}
|
oeis/040/A040506.asm | neoneye/loda-programs | 11 | 10285 | <filename>oeis/040/A040506.asm
; A040506: Continued fraction for sqrt(530).
; Submitted by <NAME>
; 23,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46
min $0,1
add $0,1
mul $0,23
|
test/Succeed/UnquoteDef.agda | redfish64/autonomic-agda | 0 | 1260 |
module UnquoteDef where
open import Common.Reflection
open import Common.Prelude
module Target where
mutual
even : Nat → Bool
even zero = true
even (suc n) = odd n
odd : Nat → Bool
odd zero = false
odd (suc n) = even n
pattern `false = con (quote false) []
pattern `true = con (quote true) []
pattern `zero = con (quote zero) []
pattern `suc n = con (quote suc) (vArg n ∷ [])
pattern _`→_ a b = pi (vArg a) (abs "A" b)
pattern `Nat = def (quote Nat) []
pattern `Bool = def (quote Bool) []
`idType = `Nat `→ `Nat
-- Simple non-mutual case
`id : QName → FunDef
`id f = funDef `idType
( clause (vArg `zero ∷ []) `zero
∷ clause (vArg (`suc (var "n")) ∷ []) (`suc (def f (vArg (var 0 []) ∷ [])))
∷ [])
`idDef : QName → List Clause
`idDef f =
clause (vArg `zero ∷ []) `zero
∷ clause (vArg (`suc (var "n")) ∷ []) (`suc (def f (vArg (var 0 []) ∷ [])))
∷ []
-- id : Nat → Nat
-- unquoteDef id = `idDef id
-- Now for the mutal ones
`evenOdd : Term → QName → List Clause
`evenOdd base step =
clause (vArg `zero ∷ []) base
∷ clause (vArg (`suc (var "n")) ∷ []) (def step (vArg (var 0 []) ∷ []))
∷ []
_>>_ : TC ⊤ → TC ⊤ → TC ⊤
m >> m₁ = bindTC m λ _ → m₁
even odd : Nat → Bool
unquoteDef even odd =
defineFun even (`evenOdd `true odd) >>
defineFun odd (`evenOdd `false even)
|
boards/host/stm32gd-usart-peripheral.adb | ekoeppen/STM32_Generic_Ada_Drivers | 1 | 30758 | package body Console is
procedure Transmit (Data : in Byte) is
begin
null;
end Transmit;
end Console;
|
oeis/042/A042986.asm | neoneye/loda-programs | 11 | 172647 | <reponame>neoneye/loda-programs<gh_stars>10-100
; A042986: Primes congruent to {0, 1, 2, 3} mod 5.
; Submitted by <NAME>
; 2,3,5,7,11,13,17,23,31,37,41,43,47,53,61,67,71,73,83,97,101,103,107,113,127,131,137,151,157,163,167,173,181,191,193,197,211,223,227,233,241,251,257,263,271,277,281,283,293,307,311,313,317,331,337,347,353,367,373,383,397,401,421,431,433,443,457,461,463,467,487,491,503,521,523,541,547,557,563,571,577,587,593,601,607,613,617,631,641,643,647,653,661,673,677,683,691,701,727,733
mov $1,3
mov $2,332202
lpb $2
mov $3,$6
seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0.
sub $0,$3
add $1,5
mov $4,$0
max $4,0
cmp $4,$0
mul $2,$4
sub $2,18
add $5,$1
div $5,5
mov $6,$5
lpe
mov $0,$5
add $0,1
|
tests/mobs-test_data-tests-mobinventory_container-test_data-tests.ads | thindil/steamsky | 80 | 1811 | <reponame>thindil/steamsky<gh_stars>10-100
-- This package has been generated automatically by GNATtest.
-- Do not edit any part of it, see GNATtest documentation for more details.
-- begin read only
with Gnattest_Generated;
package Mobs.Test_Data.Tests.MobInventory_Container.Test_Data.Tests is
type Test is new GNATtest_Generated.GNATtest_Standard.Mobs.Test_Data.Tests
.MobInventory_Container
.Test_Data
.New_Test with
null record;
end Mobs.Test_Data.Tests.MobInventory_Container.Test_Data.Tests;
-- end read only
|
src/os-none/util-processes-os.ads | Letractively/ada-util | 0 | 21631 | <filename>src/os-none/util-processes-os.ads
-----------------------------------------------------------------------
-- util-processes-os -- Dummy system specific and low level operations
-- Copyright (C) 2011, 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.
-----------------------------------------------------------------------
private package Util.Processes.Os is
-- The directory separator.
Directory_Separator : constant Character := '/';
type System_Process is new Util.Processes.System_Process with null record;
-- Wait for the process to exit.
overriding
procedure Wait (Sys : in out System_Process;
Proc : in out Process'Class;
Timeout : in Duration);
-- Spawn a new process.
overriding
procedure Spawn (Sys : in out System_Process;
Proc : in out Process'Class;
Mode : in Pipe_Mode := NONE);
-- Append the argument to the process argument list.
overriding
procedure Append_Argument (Sys : in out System_Process;
Arg : in String);
-- Deletes the storage held by the system process.
overriding
procedure Finalize (Sys : in out System_Process);
end Util.Processes.Os;
|
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_6_1017.asm | ljhsiun2/medusa | 9 | 240999 | <reponame>ljhsiun2/medusa
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r12
push %r15
push %rax
push %rcx
push %rdi
push %rsi
lea addresses_A_ht+0xfb67, %rsi
lea addresses_normal_ht+0xb81f, %rdi
nop
nop
nop
nop
dec %rax
mov $35, %rcx
rep movsw
nop
xor $1386, %r10
lea addresses_UC_ht+0x19c7f, %r15
nop
nop
sub %rsi, %rsi
movb (%r15), %al
nop
nop
sub %r10, %r10
lea addresses_normal_ht+0x1401f, %r15
clflush (%r15)
nop
and $56034, %rcx
mov (%r15), %rax
nop
nop
nop
nop
xor $21025, %rax
lea addresses_D_ht+0x32f, %rsi
lea addresses_D_ht+0x801f, %rdi
nop
nop
dec %r10
mov $12, %rcx
rep movsq
nop
and %rdi, %rdi
lea addresses_WC_ht+0x1269f, %rdi
cmp %r12, %r12
mov $0x6162636465666768, %rcx
movq %rcx, (%rdi)
and %rsi, %rsi
lea addresses_normal_ht+0x1d13b, %r12
nop
nop
nop
nop
nop
cmp $23317, %r10
mov $0x6162636465666768, %rax
movq %rax, %xmm6
movups %xmm6, (%r12)
nop
xor $15515, %rsi
lea addresses_UC_ht+0x481f, %rax
nop
nop
nop
cmp $60665, %r12
and $0xffffffffffffffc0, %rax
movntdqa (%rax), %xmm3
vpextrq $0, %xmm3, %rcx
nop
nop
nop
cmp %rdi, %rdi
pop %rsi
pop %rdi
pop %rcx
pop %rax
pop %r15
pop %r12
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r12
push %r13
push %r14
push %r15
push %r8
push %rdi
// Store
lea addresses_WT+0xfecb, %r8
nop
nop
nop
nop
and $29922, %r13
mov $0x5152535455565758, %rdi
movq %rdi, (%r8)
nop
nop
nop
nop
sub %r11, %r11
// Store
lea addresses_UC+0xf81f, %r15
nop
nop
nop
nop
cmp $3821, %r12
mov $0x5152535455565758, %r8
movq %r8, %xmm6
movaps %xmm6, (%r15)
nop
nop
cmp %r12, %r12
// Faulty Load
lea addresses_PSE+0x1201f, %r11
clflush (%r11)
nop
xor $22989, %r14
movups (%r11), %xmm5
vpextrq $1, %xmm5, %rdi
lea oracles, %r13
and $0xff, %rdi
shlq $12, %rdi
mov (%r13,%rdi,1), %rdi
pop %rdi
pop %r8
pop %r15
pop %r14
pop %r13
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_PSE', 'congruent': 0}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_WT', 'congruent': 2}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': True, 'size': 16, 'type': 'addresses_UC', 'congruent': 11}, 'OP': 'STOR'}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_PSE', 'congruent': 0}}
<gen_prepare_buffer>
{'dst': {'same': True, 'congruent': 11, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 3, 'type': 'addresses_A_ht'}}
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_UC_ht', 'congruent': 5}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_normal_ht', 'congruent': 11}}
{'dst': {'same': False, 'congruent': 11, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'src': {'same': True, 'congruent': 3, 'type': 'addresses_D_ht'}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_WC_ht', 'congruent': 7}, 'OP': 'STOR'}
{'dst': {'same': True, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_normal_ht', 'congruent': 2}, 'OP': 'STOR'}
{'OP': 'LOAD', 'src': {'same': False, 'NT': True, 'AVXalign': False, 'size': 16, 'type': 'addresses_UC_ht', 'congruent': 10}}
{'33': 6}
33 33 33 33 33 33
*/
|
Contexts.agda | msullivan/godels-t | 4 | 3648 | <reponame>msullivan/godels-t<filename>Contexts.agda
module Contexts where
open import Prelude
open import T
open import SubstTheory
module Contexts where
infix 60 _e$_ _$e_
-- Has a hole of type (Γ ⊢ A), produces a term of type (Γ' ⊢ A')
data TCtx (Γ : Ctx) (A : TTp) : (Γ' : Ctx) → (A' : TTp) → Set where
∘ : TCtx Γ A Γ A
_e$_ : ∀{Γ' A' B} (e₁ : TExp Γ' (A' ⇒ B)) (C₂ : TCtx Γ A Γ' A') → TCtx Γ A Γ' B
_$e_ : ∀{Γ' A' B} (C₁ : TCtx Γ A Γ' (A' ⇒ B)) (e₂ : TExp Γ' A') → TCtx Γ A Γ' B
Λ : ∀{A₁ A₂ Γ'} (C : TCtx Γ A (A₁ :: Γ') A₂) → TCtx Γ A Γ' (A₁ ⇒ A₂)
suc : ∀{Γ'} (C : TCtx Γ A Γ' nat) → TCtx Γ A Γ' nat
rec1 : ∀{Γ' B} → (C : TCtx Γ A Γ' nat) → (e₀ : TExp Γ' B) → (es : TExp (B :: Γ') B) →
TCtx Γ A Γ' B
rec2 : ∀{Γ' B} → (e : TExp Γ' nat) → (C₀ : TCtx Γ A Γ' B) → (es : TExp (B :: Γ') B) →
TCtx Γ A Γ' B
rec3 : ∀{Γ' B} → (e : TExp Γ' nat) → (e₀ : TExp Γ' B) → (Cs : TCtx Γ A (B :: Γ') B) →
TCtx Γ A Γ' B
_<_> : ∀{Γ A Γ' A'} → TCtx Γ A Γ' A' → TExp Γ A → TExp Γ' A'
∘ < e' > = e'
(e₁ e$ C₂) < e' > = e₁ $ C₂ < e' >
(C₁ $e e₂) < e' > = C₁ < e' > $ e₂
Λ C < e' > = Λ (C < e' >)
suc C < e' > = suc (C < e' >)
rec1 C e₀ es < e' > = rec (C < e' >) e₀ es
rec2 e C₀ es < e' > = rec e (C₀ < e' >) es
rec3 e e₀ Cs < e' > = rec e e₀ (Cs < e' >)
infix 70 _<<_>> _<_>
_<<_>> : ∀{Γ A Γ' A' Γ'' A''} → TCtx Γ' A' Γ'' A'' → TCtx Γ A Γ' A' →
TCtx Γ A Γ'' A''
∘ << C' >> = C'
(e₁ e$ C₂) << C' >> = e₁ e$ C₂ << C' >>
(C₁ $e e₂) << C' >> = C₁ << C' >> $e e₂
Λ C << C' >> = Λ (C << C' >>)
suc C << C' >> = suc (C << C' >>)
rec1 C e₀ es << C' >> = rec1 (C << C' >>) e₀ es
rec2 e C₀ es << C' >> = rec2 e (C₀ << C' >>) es
rec3 e e₀ Cs << C' >> = rec3 e e₀ (Cs << C' >>)
-- I hate having to prove this sort of theorem.
composing-commutes : ∀{Γ A Γ' A' Γ'' A''} →
(C : TCtx Γ' A' Γ'' A'') →
(C' : TCtx Γ A Γ' A') →
(e : TExp Γ A) →
((C << C' >>) < e >) ≡ C < C' < e > >
composing-commutes ∘ C' e = Refl
composing-commutes (e₁ e$ C) C' e = resp (_$_ e₁) (composing-commutes C C' e)
composing-commutes (C $e e₂) C' e = resp (λ x → x $ e₂) (composing-commutes C C' e)
composing-commutes (Λ C) C' e = resp Λ (composing-commutes C C' e)
composing-commutes (suc C) C' e = resp suc (composing-commutes C C' e)
composing-commutes (rec1 C e₀ es) C' e = resp (λ x → rec x e₀ es) (composing-commutes C C' e)
composing-commutes (rec2 e' C es) C' e = resp (λ x → rec e' x es) (composing-commutes C C' e)
composing-commutes (rec3 e' e₀ C) C' e = resp (λ x → rec e' e₀ x) (composing-commutes C C' e)
-- If the hole is closed, then the rest needs to be too.
tctx-empty-thing : ∀{F : Set} {Γ A A' B} → TCtx [] A (B :: Γ) A' → F
tctx-empty-thing (e₁ e$ C) = tctx-empty-thing C
tctx-empty-thing (C $e e₂) = tctx-empty-thing C
tctx-empty-thing (Λ C) = tctx-empty-thing C
tctx-empty-thing (suc C) = tctx-empty-thing C
tctx-empty-thing (rec1 C e₀ es) = tctx-empty-thing C
tctx-empty-thing (rec2 e C es) = tctx-empty-thing C
tctx-empty-thing (rec3 e e₀ C) = tctx-empty-thing C
-- Very restricted function for weakening a program context where
-- the hole also occurs under no free variables.
weaken-closed-tctx : ∀{Γ A A'} → TCtx [] A [] A' → TCtx Γ A Γ A'
weaken-closed-tctx ∘ = ∘
weaken-closed-tctx (e₁ e$ C) = weaken-closed e₁ e$ weaken-closed-tctx C
weaken-closed-tctx (C $e e₂) = weaken-closed-tctx C $e weaken-closed e₂
weaken-closed-tctx (Λ C) = tctx-empty-thing C
weaken-closed-tctx (suc C) = suc (weaken-closed-tctx C)
weaken-closed-tctx (rec1 C e₀ es) =
rec1 (weaken-closed-tctx C) (weaken-closed e₀) (ren (wk closed-wkγ) es)
weaken-closed-tctx (rec2 e C es) =
rec2 (weaken-closed e) (weaken-closed-tctx C) (ren (wk closed-wkγ) es)
weaken-closed-tctx (rec3 e e₀ C) = tctx-empty-thing C
-- Substitution commutes with a closed context
subst-commutes-w-closed-tctx : ∀{Γ A A'} → (γ : TSubst Γ []) → (C : TCtx [] A [] A') → (e : TExp Γ A) →
C < ssubst γ e > ≡ ssubst γ ((weaken-closed-tctx C) < e >)
subst-commutes-w-closed-tctx γ ∘ e = Refl
subst-commutes-w-closed-tctx γ (e₁ e$ C) e =
resp2 _$_
(symm (closed-subst _ e₁) ≡≡ symm (subren γ closed-wkγ e₁))
(subst-commutes-w-closed-tctx γ C e)
subst-commutes-w-closed-tctx γ (C $e e₂) e =
resp2 _$_
(subst-commutes-w-closed-tctx γ C e)
(symm (closed-subst _ e₂) ≡≡ symm (subren γ closed-wkγ e₂))
subst-commutes-w-closed-tctx γ (Λ C) e = tctx-empty-thing C
subst-commutes-w-closed-tctx γ (suc C) e =
resp suc (subst-commutes-w-closed-tctx γ C e)
subst-commutes-w-closed-tctx γ (rec1 C e₀ es) e with subren (liftγ γ) (wk closed-wkγ) es
... | lol1 with subeq (liftwk γ closed-wkγ) es
... | lol2 with lift-closed-subst (γ o closed-wkγ) es
... | lol3 with symm lol3 ≡≡ symm lol2 ≡≡ symm lol1
... | lol = resp3 rec
(subst-commutes-w-closed-tctx γ C e)
(symm (closed-subst _ e₀) ≡≡ symm (subren γ closed-wkγ e₀))
lol
subst-commutes-w-closed-tctx γ (rec2 en C es) e with subren (liftγ γ) (wk closed-wkγ) es
... | lol1 with subeq (liftwk γ closed-wkγ) es
... | lol2 with lift-closed-subst (γ o closed-wkγ) es
... | lol3 with symm lol3 ≡≡ symm lol2 ≡≡ symm lol1
... | lol = resp3 rec
(symm (closed-subst _ en) ≡≡ symm (subren γ closed-wkγ en))
(subst-commutes-w-closed-tctx γ C e)
lol
subst-commutes-w-closed-tctx γ (rec3 e e₀ C) e₁ = tctx-empty-thing C
open Contexts public
|
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0xca_notsx.log_73_1071.asm | ljhsiun2/medusa | 9 | 102843 | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r13
push %r14
push %r9
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_WC_ht+0x1b39, %rbp
nop
nop
nop
cmp $41711, %r9
mov $0x6162636465666768, %r13
movq %r13, %xmm5
movups %xmm5, (%rbp)
nop
sub $49267, %r14
lea addresses_D_ht+0x1abfb, %rsi
lea addresses_WT_ht+0xa281, %rdi
nop
nop
nop
nop
nop
dec %r10
mov $80, %rcx
rep movsq
nop
nop
nop
nop
nop
cmp $29135, %rbp
lea addresses_normal_ht+0x2921, %r10
nop
nop
nop
nop
nop
xor $23540, %r9
movb $0x61, (%r10)
nop
nop
nop
cmp $10627, %rbp
lea addresses_WT_ht+0x17221, %rsi
nop
nop
nop
cmp %rcx, %rcx
movb (%rsi), %r13b
nop
nop
inc %r10
lea addresses_A_ht+0xa1bd, %r13
nop
nop
nop
nop
nop
and %rcx, %rcx
mov (%r13), %r14
nop
sub %rsi, %rsi
lea addresses_normal_ht+0xd28d, %r14
nop
nop
nop
nop
nop
inc %r10
mov $0x6162636465666768, %rcx
movq %rcx, (%r14)
nop
and %rbp, %rbp
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %r9
pop %r14
pop %r13
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r13
push %r9
push %rbx
push %rcx
push %rdx
// Store
mov $0x74021f0000000f01, %rbx
nop
cmp %r13, %r13
mov $0x5152535455565758, %rcx
movq %rcx, %xmm7
vmovups %ymm7, (%rbx)
nop
nop
nop
nop
cmp $8716, %r13
// Store
lea addresses_D+0x95f8, %rcx
xor $36871, %r13
mov $0x5152535455565758, %rbx
movq %rbx, %xmm2
movups %xmm2, (%rcx)
nop
nop
xor $17506, %rbx
// Store
lea addresses_US+0x3d21, %r9
nop
nop
nop
nop
nop
add $40938, %r10
movb $0x51, (%r9)
nop
nop
nop
add %r11, %r11
// Faulty Load
lea addresses_RW+0x6521, %rcx
clflush (%rcx)
nop
add $55408, %r11
mov (%rcx), %r9
lea oracles, %r13
and $0xff, %r9
shlq $12, %r9
mov (%r13,%r9,1), %r9
pop %rdx
pop %rcx
pop %rbx
pop %r9
pop %r13
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_RW', 'size': 1, 'AVXalign': False}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 5, 'NT': False, 'type': 'addresses_NC', 'size': 32, 'AVXalign': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_D', 'size': 16, 'AVXalign': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 11, 'NT': False, 'type': 'addresses_US', 'size': 1, 'AVXalign': False}}
[Faulty Load]
{'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_RW', 'size': 8, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 3, 'NT': False, 'type': 'addresses_WC_ht', 'size': 16, 'AVXalign': False}}
{'src': {'type': 'addresses_D_ht', 'congruent': 1, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WT_ht', 'congruent': 5, 'same': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 7, 'NT': False, 'type': 'addresses_normal_ht', 'size': 1, 'AVXalign': False}}
{'src': {'same': False, 'congruent': 8, 'NT': True, 'type': 'addresses_WT_ht', 'size': 1, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'same': False, 'congruent': 1, 'NT': False, 'type': 'addresses_A_ht', 'size': 8, 'AVXalign': False}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 1, 'NT': False, 'type': 'addresses_normal_ht', 'size': 8, 'AVXalign': False}}
{'32': 73}
32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
*/
|
Transynther/x86/_processed/NONE/_zr_/i7-8650U_0xd2.log_7062_187.asm | ljhsiun2/medusa | 9 | 27515 | <gh_stars>1-10
.global s_prepare_buffers
s_prepare_buffers:
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r12
push %rax
push %rbp
push %rbx
push %rcx
push %rdi
push %rsi
// Store
lea addresses_PSE+0x1ee6d, %rax
nop
nop
add %rbx, %rbx
movw $0x5152, (%rax)
inc %r12
// REPMOV
lea addresses_D+0x6aab, %rsi
lea addresses_normal+0x16ded, %rdi
nop
nop
inc %rbx
mov $9, %rcx
rep movsw
// Exception!!!
nop
mov (0), %r12
sub $56945, %rsi
// Faulty Load
lea addresses_WT+0x171ad, %rbx
nop
nop
xor %rcx, %rcx
movups (%rbx), %xmm5
vpextrq $0, %xmm5, %rsi
lea oracles, %rax
and $0xff, %rsi
shlq $12, %rsi
mov (%rax,%rsi,1), %rsi
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %rax
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_WT', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_PSE', 'size': 2, 'AVXalign': False, 'NT': True, 'congruent': 6, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_D', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_normal', 'congruent': 6, 'same': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_WT', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
<gen_prepare_buffer>
{'00': 7062}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
|
kernel.asm | inesane/Modified-xv6-OS | 0 | 101864 | <gh_stars>0
kernel: file format elf32-i386
Disassembly of section .text:
80100000 <multiboot_header>:
80100000: 02 b0 ad 1b 00 00 add 0x1bad(%eax),%dh
80100006: 00 00 add %al,(%eax)
80100008: fe 4f 52 decb 0x52(%edi)
8010000b: e4 .byte 0xe4
8010000c <entry>:
# Entering xv6 on boot processor, with paging off.
.globl entry
entry:
# Turn on page size extension for 4Mbyte pages
movl %cr4, %eax
8010000c: 0f 20 e0 mov %cr4,%eax
orl $(CR4_PSE), %eax
8010000f: 83 c8 10 or $0x10,%eax
movl %eax, %cr4
80100012: 0f 22 e0 mov %eax,%cr4
# Set page directory
movl $(V2P_WO(entrypgdir)), %eax
80100015: b8 00 a0 10 00 mov $0x10a000,%eax
movl %eax, %cr3
8010001a: 0f 22 d8 mov %eax,%cr3
# Turn on paging.
movl %cr0, %eax
8010001d: 0f 20 c0 mov %cr0,%eax
orl $(CR0_PG|CR0_WP), %eax
80100020: 0d 00 00 01 80 or $0x80010000,%eax
movl %eax, %cr0
80100025: 0f 22 c0 mov %eax,%cr0
# Set up the stack pointer.
movl $(stack + KSTACKSIZE), %esp
80100028: bc c0 c5 10 80 mov $0x8010c5c0,%esp
# Jump to main(), and switch to executing at
# high addresses. The indirect call is needed because
# the assembler produces a PC-relative instruction
# for a direct jump.
mov $main, %eax
8010002d: b8 40 30 10 80 mov $0x80103040,%eax
jmp *%eax
80100032: ff e0 jmp *%eax
80100034: 66 90 xchg %ax,%ax
80100036: 66 90 xchg %ax,%ax
80100038: 66 90 xchg %ax,%ax
8010003a: 66 90 xchg %ax,%ax
8010003c: 66 90 xchg %ax,%ax
8010003e: 66 90 xchg %ax,%ax
80100040 <binit>:
struct buf head;
} bcache;
void
binit(void)
{
80100040: f3 0f 1e fb endbr32
80100044: 55 push %ebp
80100045: 89 e5 mov %esp,%ebp
80100047: 53 push %ebx
//PAGEBREAK!
// Create linked list of buffers
bcache.head.prev = &bcache.head;
bcache.head.next = &bcache.head;
for(b = bcache.buf; b < bcache.buf+NBUF; b++){
80100048: bb f4 c5 10 80 mov $0x8010c5f4,%ebx
{
8010004d: 83 ec 0c sub $0xc,%esp
initlock(&bcache.lock, "bcache");
80100050: 68 e0 77 10 80 push $0x801077e0
80100055: 68 c0 c5 10 80 push $0x8010c5c0
8010005a: e8 b1 49 00 00 call 80104a10 <initlock>
bcache.head.next = &bcache.head;
8010005f: 83 c4 10 add $0x10,%esp
80100062: b8 bc 0c 11 80 mov $0x80110cbc,%eax
bcache.head.prev = &bcache.head;
80100067: c7 05 0c 0d 11 80 bc movl $0x80110cbc,0x80110d0c
8010006e: 0c 11 80
bcache.head.next = &bcache.head;
80100071: c7 05 10 0d 11 80 bc movl $0x80110cbc,0x80110d10
80100078: 0c 11 80
for(b = bcache.buf; b < bcache.buf+NBUF; b++){
8010007b: eb 05 jmp 80100082 <binit+0x42>
8010007d: 8d 76 00 lea 0x0(%esi),%esi
80100080: 89 d3 mov %edx,%ebx
b->next = bcache.head.next;
80100082: 89 43 54 mov %eax,0x54(%ebx)
b->prev = &bcache.head;
initsleeplock(&b->lock, "buffer");
80100085: 83 ec 08 sub $0x8,%esp
80100088: 8d 43 0c lea 0xc(%ebx),%eax
b->prev = &bcache.head;
8010008b: c7 43 50 bc 0c 11 80 movl $0x80110cbc,0x50(%ebx)
initsleeplock(&b->lock, "buffer");
80100092: 68 e7 77 10 80 push $0x801077e7
80100097: 50 push %eax
80100098: e8 33 48 00 00 call 801048d0 <initsleeplock>
bcache.head.next->prev = b;
8010009d: a1 10 0d 11 80 mov 0x80110d10,%eax
for(b = bcache.buf; b < bcache.buf+NBUF; b++){
801000a2: 8d 93 5c 02 00 00 lea 0x25c(%ebx),%edx
801000a8: 83 c4 10 add $0x10,%esp
bcache.head.next->prev = b;
801000ab: 89 58 50 mov %ebx,0x50(%eax)
bcache.head.next = b;
801000ae: 89 d8 mov %ebx,%eax
801000b0: 89 1d 10 0d 11 80 mov %ebx,0x80110d10
for(b = bcache.buf; b < bcache.buf+NBUF; b++){
801000b6: 81 fb 60 0a 11 80 cmp $0x80110a60,%ebx
801000bc: 75 c2 jne 80100080 <binit+0x40>
}
}
801000be: 8b 5d fc mov -0x4(%ebp),%ebx
801000c1: c9 leave
801000c2: c3 ret
801000c3: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801000ca: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801000d0 <bread>:
}
// Return a locked buf with the contents of the indicated block.
struct buf*
bread(uint dev, uint blockno)
{
801000d0: f3 0f 1e fb endbr32
801000d4: 55 push %ebp
801000d5: 89 e5 mov %esp,%ebp
801000d7: 57 push %edi
801000d8: 56 push %esi
801000d9: 53 push %ebx
801000da: 83 ec 18 sub $0x18,%esp
801000dd: 8b 7d 08 mov 0x8(%ebp),%edi
801000e0: 8b 75 0c mov 0xc(%ebp),%esi
acquire(&bcache.lock);
801000e3: 68 c0 c5 10 80 push $0x8010c5c0
801000e8: e8 a3 4a 00 00 call 80104b90 <acquire>
for(b = bcache.head.next; b != &bcache.head; b = b->next){
801000ed: 8b 1d 10 0d 11 80 mov 0x80110d10,%ebx
801000f3: 83 c4 10 add $0x10,%esp
801000f6: 81 fb bc 0c 11 80 cmp $0x80110cbc,%ebx
801000fc: 75 0d jne 8010010b <bread+0x3b>
801000fe: eb 20 jmp 80100120 <bread+0x50>
80100100: 8b 5b 54 mov 0x54(%ebx),%ebx
80100103: 81 fb bc 0c 11 80 cmp $0x80110cbc,%ebx
80100109: 74 15 je 80100120 <bread+0x50>
if(b->dev == dev && b->blockno == blockno){
8010010b: 3b 7b 04 cmp 0x4(%ebx),%edi
8010010e: 75 f0 jne 80100100 <bread+0x30>
80100110: 3b 73 08 cmp 0x8(%ebx),%esi
80100113: 75 eb jne 80100100 <bread+0x30>
b->refcnt++;
80100115: 83 43 4c 01 addl $0x1,0x4c(%ebx)
release(&bcache.lock);
80100119: eb 3f jmp 8010015a <bread+0x8a>
8010011b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
8010011f: 90 nop
for(b = bcache.head.prev; b != &bcache.head; b = b->prev){
80100120: 8b 1d 0c 0d 11 80 mov 0x80110d0c,%ebx
80100126: 81 fb bc 0c 11 80 cmp $0x80110cbc,%ebx
8010012c: 75 0d jne 8010013b <bread+0x6b>
8010012e: eb 70 jmp 801001a0 <bread+0xd0>
80100130: 8b 5b 50 mov 0x50(%ebx),%ebx
80100133: 81 fb bc 0c 11 80 cmp $0x80110cbc,%ebx
80100139: 74 65 je 801001a0 <bread+0xd0>
if(b->refcnt == 0 && (b->flags & B_DIRTY) == 0) {
8010013b: 8b 43 4c mov 0x4c(%ebx),%eax
8010013e: 85 c0 test %eax,%eax
80100140: 75 ee jne 80100130 <bread+0x60>
80100142: f6 03 04 testb $0x4,(%ebx)
80100145: 75 e9 jne 80100130 <bread+0x60>
b->dev = dev;
80100147: 89 7b 04 mov %edi,0x4(%ebx)
b->blockno = blockno;
8010014a: 89 73 08 mov %esi,0x8(%ebx)
b->flags = 0;
8010014d: c7 03 00 00 00 00 movl $0x0,(%ebx)
b->refcnt = 1;
80100153: c7 43 4c 01 00 00 00 movl $0x1,0x4c(%ebx)
release(&bcache.lock);
8010015a: 83 ec 0c sub $0xc,%esp
8010015d: 68 c0 c5 10 80 push $0x8010c5c0
80100162: e8 e9 4a 00 00 call 80104c50 <release>
acquiresleep(&b->lock);
80100167: 8d 43 0c lea 0xc(%ebx),%eax
8010016a: 89 04 24 mov %eax,(%esp)
8010016d: e8 9e 47 00 00 call 80104910 <acquiresleep>
return b;
80100172: 83 c4 10 add $0x10,%esp
struct buf *b;
b = bget(dev, blockno);
if((b->flags & B_VALID) == 0) {
80100175: f6 03 02 testb $0x2,(%ebx)
80100178: 74 0e je 80100188 <bread+0xb8>
iderw(b);
}
return b;
}
8010017a: 8d 65 f4 lea -0xc(%ebp),%esp
8010017d: 89 d8 mov %ebx,%eax
8010017f: 5b pop %ebx
80100180: 5e pop %esi
80100181: 5f pop %edi
80100182: 5d pop %ebp
80100183: c3 ret
80100184: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
iderw(b);
80100188: 83 ec 0c sub $0xc,%esp
8010018b: 53 push %ebx
8010018c: e8 ef 20 00 00 call 80102280 <iderw>
80100191: 83 c4 10 add $0x10,%esp
}
80100194: 8d 65 f4 lea -0xc(%ebp),%esp
80100197: 89 d8 mov %ebx,%eax
80100199: 5b pop %ebx
8010019a: 5e pop %esi
8010019b: 5f pop %edi
8010019c: 5d pop %ebp
8010019d: c3 ret
8010019e: 66 90 xchg %ax,%ax
panic("bget: no buffers");
801001a0: 83 ec 0c sub $0xc,%esp
801001a3: 68 ee 77 10 80 push $0x801077ee
801001a8: e8 e3 01 00 00 call 80100390 <panic>
801001ad: 8d 76 00 lea 0x0(%esi),%esi
801001b0 <bwrite>:
// Write b's contents to disk. Must be locked.
void
bwrite(struct buf *b)
{
801001b0: f3 0f 1e fb endbr32
801001b4: 55 push %ebp
801001b5: 89 e5 mov %esp,%ebp
801001b7: 53 push %ebx
801001b8: 83 ec 10 sub $0x10,%esp
801001bb: 8b 5d 08 mov 0x8(%ebp),%ebx
if(!holdingsleep(&b->lock))
801001be: 8d 43 0c lea 0xc(%ebx),%eax
801001c1: 50 push %eax
801001c2: e8 e9 47 00 00 call 801049b0 <holdingsleep>
801001c7: 83 c4 10 add $0x10,%esp
801001ca: 85 c0 test %eax,%eax
801001cc: 74 0f je 801001dd <bwrite+0x2d>
panic("bwrite");
b->flags |= B_DIRTY;
801001ce: 83 0b 04 orl $0x4,(%ebx)
iderw(b);
801001d1: 89 5d 08 mov %ebx,0x8(%ebp)
}
801001d4: 8b 5d fc mov -0x4(%ebp),%ebx
801001d7: c9 leave
iderw(b);
801001d8: e9 a3 20 00 00 jmp 80102280 <iderw>
panic("bwrite");
801001dd: 83 ec 0c sub $0xc,%esp
801001e0: 68 ff 77 10 80 push $0x801077ff
801001e5: e8 a6 01 00 00 call 80100390 <panic>
801001ea: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801001f0 <brelse>:
// Release a locked buffer.
// Move to the head of the MRU list.
void
brelse(struct buf *b)
{
801001f0: f3 0f 1e fb endbr32
801001f4: 55 push %ebp
801001f5: 89 e5 mov %esp,%ebp
801001f7: 56 push %esi
801001f8: 53 push %ebx
801001f9: 8b 5d 08 mov 0x8(%ebp),%ebx
if(!holdingsleep(&b->lock))
801001fc: 8d 73 0c lea 0xc(%ebx),%esi
801001ff: 83 ec 0c sub $0xc,%esp
80100202: 56 push %esi
80100203: e8 a8 47 00 00 call 801049b0 <holdingsleep>
80100208: 83 c4 10 add $0x10,%esp
8010020b: 85 c0 test %eax,%eax
8010020d: 74 66 je 80100275 <brelse+0x85>
panic("brelse");
releasesleep(&b->lock);
8010020f: 83 ec 0c sub $0xc,%esp
80100212: 56 push %esi
80100213: e8 58 47 00 00 call 80104970 <releasesleep>
acquire(&bcache.lock);
80100218: c7 04 24 c0 c5 10 80 movl $0x8010c5c0,(%esp)
8010021f: e8 6c 49 00 00 call 80104b90 <acquire>
b->refcnt--;
80100224: 8b 43 4c mov 0x4c(%ebx),%eax
if (b->refcnt == 0) {
80100227: 83 c4 10 add $0x10,%esp
b->refcnt--;
8010022a: 83 e8 01 sub $0x1,%eax
8010022d: 89 43 4c mov %eax,0x4c(%ebx)
if (b->refcnt == 0) {
80100230: 85 c0 test %eax,%eax
80100232: 75 2f jne 80100263 <brelse+0x73>
// no one is waiting for it.
b->next->prev = b->prev;
80100234: 8b 43 54 mov 0x54(%ebx),%eax
80100237: 8b 53 50 mov 0x50(%ebx),%edx
8010023a: 89 50 50 mov %edx,0x50(%eax)
b->prev->next = b->next;
8010023d: 8b 43 50 mov 0x50(%ebx),%eax
80100240: 8b 53 54 mov 0x54(%ebx),%edx
80100243: 89 50 54 mov %edx,0x54(%eax)
b->next = bcache.head.next;
80100246: a1 10 0d 11 80 mov 0x80110d10,%eax
b->prev = &bcache.head;
8010024b: c7 43 50 bc 0c 11 80 movl $0x80110cbc,0x50(%ebx)
b->next = bcache.head.next;
80100252: 89 43 54 mov %eax,0x54(%ebx)
bcache.head.next->prev = b;
80100255: a1 10 0d 11 80 mov 0x80110d10,%eax
8010025a: 89 58 50 mov %ebx,0x50(%eax)
bcache.head.next = b;
8010025d: 89 1d 10 0d 11 80 mov %ebx,0x80110d10
}
release(&bcache.lock);
80100263: c7 45 08 c0 c5 10 80 movl $0x8010c5c0,0x8(%ebp)
}
8010026a: 8d 65 f8 lea -0x8(%ebp),%esp
8010026d: 5b pop %ebx
8010026e: 5e pop %esi
8010026f: 5d pop %ebp
release(&bcache.lock);
80100270: e9 db 49 00 00 jmp 80104c50 <release>
panic("brelse");
80100275: 83 ec 0c sub $0xc,%esp
80100278: 68 06 78 10 80 push $0x80107806
8010027d: e8 0e 01 00 00 call 80100390 <panic>
80100282: 66 90 xchg %ax,%ax
80100284: 66 90 xchg %ax,%ax
80100286: 66 90 xchg %ax,%ax
80100288: 66 90 xchg %ax,%ax
8010028a: 66 90 xchg %ax,%ax
8010028c: 66 90 xchg %ax,%ax
8010028e: 66 90 xchg %ax,%ax
80100290 <consoleread>:
}
}
int
consoleread(struct inode *ip, char *dst, int n)
{
80100290: f3 0f 1e fb endbr32
80100294: 55 push %ebp
80100295: 89 e5 mov %esp,%ebp
80100297: 57 push %edi
80100298: 56 push %esi
80100299: 53 push %ebx
8010029a: 83 ec 18 sub $0x18,%esp
uint target;
int c;
iunlock(ip);
8010029d: ff 75 08 pushl 0x8(%ebp)
{
801002a0: 8b 5d 10 mov 0x10(%ebp),%ebx
target = n;
801002a3: 89 de mov %ebx,%esi
iunlock(ip);
801002a5: e8 96 15 00 00 call 80101840 <iunlock>
acquire(&cons.lock);
801002aa: c7 04 24 20 b5 10 80 movl $0x8010b520,(%esp)
801002b1: e8 da 48 00 00 call 80104b90 <acquire>
// caller gets a 0-byte result.
input.r--;
}
break;
}
*dst++ = c;
801002b6: 8b 7d 0c mov 0xc(%ebp),%edi
while(n > 0){
801002b9: 83 c4 10 add $0x10,%esp
*dst++ = c;
801002bc: 01 df add %ebx,%edi
while(n > 0){
801002be: 85 db test %ebx,%ebx
801002c0: 0f 8e 97 00 00 00 jle 8010035d <consoleread+0xcd>
while(input.r == input.w){
801002c6: a1 a0 0f 11 80 mov 0x80110fa0,%eax
801002cb: 3b 05 a4 0f 11 80 cmp 0x80110fa4,%eax
801002d1: 74 27 je 801002fa <consoleread+0x6a>
801002d3: eb 5b jmp 80100330 <consoleread+0xa0>
801002d5: 8d 76 00 lea 0x0(%esi),%esi
sleep(&input.r, &cons.lock);
801002d8: 83 ec 08 sub $0x8,%esp
801002db: 68 20 b5 10 80 push $0x8010b520
801002e0: 68 a0 0f 11 80 push $0x80110fa0
801002e5: e8 86 3e 00 00 call 80104170 <sleep>
while(input.r == input.w){
801002ea: a1 a0 0f 11 80 mov 0x80110fa0,%eax
801002ef: 83 c4 10 add $0x10,%esp
801002f2: 3b 05 a4 0f 11 80 cmp 0x80110fa4,%eax
801002f8: 75 36 jne 80100330 <consoleread+0xa0>
if(myproc()->killed){
801002fa: e8 61 37 00 00 call 80103a60 <myproc>
801002ff: 8b 48 24 mov 0x24(%eax),%ecx
80100302: 85 c9 test %ecx,%ecx
80100304: 74 d2 je 801002d8 <consoleread+0x48>
release(&cons.lock);
80100306: 83 ec 0c sub $0xc,%esp
80100309: 68 20 b5 10 80 push $0x8010b520
8010030e: e8 3d 49 00 00 call 80104c50 <release>
ilock(ip);
80100313: 5a pop %edx
80100314: ff 75 08 pushl 0x8(%ebp)
80100317: e8 44 14 00 00 call 80101760 <ilock>
return -1;
8010031c: 83 c4 10 add $0x10,%esp
}
release(&cons.lock);
ilock(ip);
return target - n;
}
8010031f: 8d 65 f4 lea -0xc(%ebp),%esp
return -1;
80100322: b8 ff ff ff ff mov $0xffffffff,%eax
}
80100327: 5b pop %ebx
80100328: 5e pop %esi
80100329: 5f pop %edi
8010032a: 5d pop %ebp
8010032b: c3 ret
8010032c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
c = input.buf[input.r++ % INPUT_BUF];
80100330: 8d 50 01 lea 0x1(%eax),%edx
80100333: 89 15 a0 0f 11 80 mov %edx,0x80110fa0
80100339: 89 c2 mov %eax,%edx
8010033b: 83 e2 7f and $0x7f,%edx
8010033e: 0f be 8a 20 0f 11 80 movsbl -0x7feef0e0(%edx),%ecx
if(c == C('D')){ // EOF
80100345: 80 f9 04 cmp $0x4,%cl
80100348: 74 38 je 80100382 <consoleread+0xf2>
*dst++ = c;
8010034a: 89 d8 mov %ebx,%eax
--n;
8010034c: 83 eb 01 sub $0x1,%ebx
*dst++ = c;
8010034f: f7 d8 neg %eax
80100351: 88 0c 07 mov %cl,(%edi,%eax,1)
if(c == '\n')
80100354: 83 f9 0a cmp $0xa,%ecx
80100357: 0f 85 61 ff ff ff jne 801002be <consoleread+0x2e>
release(&cons.lock);
8010035d: 83 ec 0c sub $0xc,%esp
80100360: 68 20 b5 10 80 push $0x8010b520
80100365: e8 e6 48 00 00 call 80104c50 <release>
ilock(ip);
8010036a: 58 pop %eax
8010036b: ff 75 08 pushl 0x8(%ebp)
8010036e: e8 ed 13 00 00 call 80101760 <ilock>
return target - n;
80100373: 89 f0 mov %esi,%eax
80100375: 83 c4 10 add $0x10,%esp
}
80100378: 8d 65 f4 lea -0xc(%ebp),%esp
return target - n;
8010037b: 29 d8 sub %ebx,%eax
}
8010037d: 5b pop %ebx
8010037e: 5e pop %esi
8010037f: 5f pop %edi
80100380: 5d pop %ebp
80100381: c3 ret
if(n < target){
80100382: 39 f3 cmp %esi,%ebx
80100384: 73 d7 jae 8010035d <consoleread+0xcd>
input.r--;
80100386: a3 a0 0f 11 80 mov %eax,0x80110fa0
8010038b: eb d0 jmp 8010035d <consoleread+0xcd>
8010038d: 8d 76 00 lea 0x0(%esi),%esi
80100390 <panic>:
{
80100390: f3 0f 1e fb endbr32
80100394: 55 push %ebp
80100395: 89 e5 mov %esp,%ebp
80100397: 56 push %esi
80100398: 53 push %ebx
80100399: 83 ec 30 sub $0x30,%esp
}
static inline void
cli(void)
{
asm volatile("cli");
8010039c: fa cli
cons.locking = 0;
8010039d: c7 05 54 b5 10 80 00 movl $0x0,0x8010b554
801003a4: 00 00 00
getcallerpcs(&s, pcs);
801003a7: 8d 5d d0 lea -0x30(%ebp),%ebx
801003aa: 8d 75 f8 lea -0x8(%ebp),%esi
cprintf("lapicid %d: panic: ", lapicid());
801003ad: e8 ee 24 00 00 call 801028a0 <lapicid>
801003b2: 83 ec 08 sub $0x8,%esp
801003b5: 50 push %eax
801003b6: 68 0d 78 10 80 push $0x8010780d
801003bb: e8 f0 02 00 00 call 801006b0 <cprintf>
cprintf(s);
801003c0: 58 pop %eax
801003c1: ff 75 08 pushl 0x8(%ebp)
801003c4: e8 e7 02 00 00 call 801006b0 <cprintf>
cprintf("\n");
801003c9: c7 04 24 63 82 10 80 movl $0x80108263,(%esp)
801003d0: e8 db 02 00 00 call 801006b0 <cprintf>
getcallerpcs(&s, pcs);
801003d5: 8d 45 08 lea 0x8(%ebp),%eax
801003d8: 5a pop %edx
801003d9: 59 pop %ecx
801003da: 53 push %ebx
801003db: 50 push %eax
801003dc: e8 4f 46 00 00 call 80104a30 <getcallerpcs>
for(i=0; i<10; i++)
801003e1: 83 c4 10 add $0x10,%esp
cprintf(" %p", pcs[i]);
801003e4: 83 ec 08 sub $0x8,%esp
801003e7: ff 33 pushl (%ebx)
801003e9: 83 c3 04 add $0x4,%ebx
801003ec: 68 21 78 10 80 push $0x80107821
801003f1: e8 ba 02 00 00 call 801006b0 <cprintf>
for(i=0; i<10; i++)
801003f6: 83 c4 10 add $0x10,%esp
801003f9: 39 f3 cmp %esi,%ebx
801003fb: 75 e7 jne 801003e4 <panic+0x54>
panicked = 1; // freeze other CPU
801003fd: c7 05 58 b5 10 80 01 movl $0x1,0x8010b558
80100404: 00 00 00
for(;;)
80100407: eb fe jmp 80100407 <panic+0x77>
80100409: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80100410 <consputc.part.0>:
consputc(int c)
80100410: 55 push %ebp
80100411: 89 e5 mov %esp,%ebp
80100413: 57 push %edi
80100414: 56 push %esi
80100415: 53 push %ebx
80100416: 89 c3 mov %eax,%ebx
80100418: 83 ec 1c sub $0x1c,%esp
if(c == BACKSPACE){
8010041b: 3d 00 01 00 00 cmp $0x100,%eax
80100420: 0f 84 ea 00 00 00 je 80100510 <consputc.part.0+0x100>
uartputc(c);
80100426: 83 ec 0c sub $0xc,%esp
80100429: 50 push %eax
8010042a: e8 a1 5f 00 00 call 801063d0 <uartputc>
8010042f: 83 c4 10 add $0x10,%esp
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80100432: bf d4 03 00 00 mov $0x3d4,%edi
80100437: b8 0e 00 00 00 mov $0xe,%eax
8010043c: 89 fa mov %edi,%edx
8010043e: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
8010043f: b9 d5 03 00 00 mov $0x3d5,%ecx
80100444: 89 ca mov %ecx,%edx
80100446: ec in (%dx),%al
pos = inb(CRTPORT+1) << 8;
80100447: 0f b6 c0 movzbl %al,%eax
asm volatile("out %0,%1" : : "a" (data), "d" (port));
8010044a: 89 fa mov %edi,%edx
8010044c: c1 e0 08 shl $0x8,%eax
8010044f: 89 c6 mov %eax,%esi
80100451: b8 0f 00 00 00 mov $0xf,%eax
80100456: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80100457: 89 ca mov %ecx,%edx
80100459: ec in (%dx),%al
pos |= inb(CRTPORT+1);
8010045a: 0f b6 c0 movzbl %al,%eax
8010045d: 09 f0 or %esi,%eax
if(c == '\n')
8010045f: 83 fb 0a cmp $0xa,%ebx
80100462: 0f 84 90 00 00 00 je 801004f8 <consputc.part.0+0xe8>
else if(c == BACKSPACE){
80100468: 81 fb 00 01 00 00 cmp $0x100,%ebx
8010046e: 74 70 je 801004e0 <consputc.part.0+0xd0>
crt[pos++] = (c&0xff) | 0x0700; // black on white
80100470: 0f b6 db movzbl %bl,%ebx
80100473: 8d 70 01 lea 0x1(%eax),%esi
80100476: 80 cf 07 or $0x7,%bh
80100479: 66 89 9c 00 00 80 0b mov %bx,-0x7ff48000(%eax,%eax,1)
80100480: 80
if(pos < 0 || pos > 25*80)
80100481: 81 fe d0 07 00 00 cmp $0x7d0,%esi
80100487: 0f 8f f9 00 00 00 jg 80100586 <consputc.part.0+0x176>
if((pos/80) >= 24){ // Scroll up.
8010048d: 81 fe 7f 07 00 00 cmp $0x77f,%esi
80100493: 0f 8f a7 00 00 00 jg 80100540 <consputc.part.0+0x130>
80100499: 89 f0 mov %esi,%eax
8010049b: 8d b4 36 00 80 0b 80 lea -0x7ff48000(%esi,%esi,1),%esi
801004a2: 88 45 e7 mov %al,-0x19(%ebp)
801004a5: 0f b6 fc movzbl %ah,%edi
asm volatile("out %0,%1" : : "a" (data), "d" (port));
801004a8: bb d4 03 00 00 mov $0x3d4,%ebx
801004ad: b8 0e 00 00 00 mov $0xe,%eax
801004b2: 89 da mov %ebx,%edx
801004b4: ee out %al,(%dx)
801004b5: b9 d5 03 00 00 mov $0x3d5,%ecx
801004ba: 89 f8 mov %edi,%eax
801004bc: 89 ca mov %ecx,%edx
801004be: ee out %al,(%dx)
801004bf: b8 0f 00 00 00 mov $0xf,%eax
801004c4: 89 da mov %ebx,%edx
801004c6: ee out %al,(%dx)
801004c7: 0f b6 45 e7 movzbl -0x19(%ebp),%eax
801004cb: 89 ca mov %ecx,%edx
801004cd: ee out %al,(%dx)
crt[pos] = ' ' | 0x0700;
801004ce: b8 20 07 00 00 mov $0x720,%eax
801004d3: 66 89 06 mov %ax,(%esi)
}
801004d6: 8d 65 f4 lea -0xc(%ebp),%esp
801004d9: 5b pop %ebx
801004da: 5e pop %esi
801004db: 5f pop %edi
801004dc: 5d pop %ebp
801004dd: c3 ret
801004de: 66 90 xchg %ax,%ax
if(pos > 0) --pos;
801004e0: 8d 70 ff lea -0x1(%eax),%esi
801004e3: 85 c0 test %eax,%eax
801004e5: 75 9a jne 80100481 <consputc.part.0+0x71>
801004e7: c6 45 e7 00 movb $0x0,-0x19(%ebp)
801004eb: be 00 80 0b 80 mov $0x800b8000,%esi
801004f0: 31 ff xor %edi,%edi
801004f2: eb b4 jmp 801004a8 <consputc.part.0+0x98>
801004f4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
pos += 80 - pos%80;
801004f8: ba cd cc cc cc mov $0xcccccccd,%edx
801004fd: f7 e2 mul %edx
801004ff: c1 ea 06 shr $0x6,%edx
80100502: 8d 04 92 lea (%edx,%edx,4),%eax
80100505: c1 e0 04 shl $0x4,%eax
80100508: 8d 70 50 lea 0x50(%eax),%esi
8010050b: e9 71 ff ff ff jmp 80100481 <consputc.part.0+0x71>
uartputc('\b'); uartputc(' '); uartputc('\b');
80100510: 83 ec 0c sub $0xc,%esp
80100513: 6a 08 push $0x8
80100515: e8 b6 5e 00 00 call 801063d0 <uartputc>
8010051a: c7 04 24 20 00 00 00 movl $0x20,(%esp)
80100521: e8 aa 5e 00 00 call 801063d0 <uartputc>
80100526: c7 04 24 08 00 00 00 movl $0x8,(%esp)
8010052d: e8 9e 5e 00 00 call 801063d0 <uartputc>
80100532: 83 c4 10 add $0x10,%esp
80100535: e9 f8 fe ff ff jmp 80100432 <consputc.part.0+0x22>
8010053a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
memmove(crt, crt+80, sizeof(crt[0])*23*80);
80100540: 83 ec 04 sub $0x4,%esp
pos -= 80;
80100543: 8d 5e b0 lea -0x50(%esi),%ebx
memset(crt+pos, 0, sizeof(crt[0])*(24*80 - pos));
80100546: 8d b4 36 60 7f 0b 80 lea -0x7ff480a0(%esi,%esi,1),%esi
8010054d: bf 07 00 00 00 mov $0x7,%edi
memmove(crt, crt+80, sizeof(crt[0])*23*80);
80100552: 68 60 0e 00 00 push $0xe60
80100557: 68 a0 80 0b 80 push $0x800b80a0
8010055c: 68 00 80 0b 80 push $0x800b8000
80100561: e8 da 47 00 00 call 80104d40 <memmove>
memset(crt+pos, 0, sizeof(crt[0])*(24*80 - pos));
80100566: b8 80 07 00 00 mov $0x780,%eax
8010056b: 83 c4 0c add $0xc,%esp
8010056e: 29 d8 sub %ebx,%eax
80100570: 01 c0 add %eax,%eax
80100572: 50 push %eax
80100573: 6a 00 push $0x0
80100575: 56 push %esi
80100576: e8 25 47 00 00 call 80104ca0 <memset>
8010057b: 88 5d e7 mov %bl,-0x19(%ebp)
8010057e: 83 c4 10 add $0x10,%esp
80100581: e9 22 ff ff ff jmp 801004a8 <consputc.part.0+0x98>
panic("pos under/overflow");
80100586: 83 ec 0c sub $0xc,%esp
80100589: 68 25 78 10 80 push $0x80107825
8010058e: e8 fd fd ff ff call 80100390 <panic>
80100593: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010059a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801005a0 <printint>:
{
801005a0: 55 push %ebp
801005a1: 89 e5 mov %esp,%ebp
801005a3: 57 push %edi
801005a4: 56 push %esi
801005a5: 53 push %ebx
801005a6: 83 ec 2c sub $0x2c,%esp
801005a9: 89 55 d4 mov %edx,-0x2c(%ebp)
if(sign && (sign = xx < 0))
801005ac: 85 c9 test %ecx,%ecx
801005ae: 74 04 je 801005b4 <printint+0x14>
801005b0: 85 c0 test %eax,%eax
801005b2: 78 6d js 80100621 <printint+0x81>
x = xx;
801005b4: 89 c1 mov %eax,%ecx
801005b6: 31 f6 xor %esi,%esi
i = 0;
801005b8: 89 75 cc mov %esi,-0x34(%ebp)
801005bb: 31 db xor %ebx,%ebx
801005bd: 8d 7d d7 lea -0x29(%ebp),%edi
buf[i++] = digits[x % base];
801005c0: 89 c8 mov %ecx,%eax
801005c2: 31 d2 xor %edx,%edx
801005c4: 89 ce mov %ecx,%esi
801005c6: f7 75 d4 divl -0x2c(%ebp)
801005c9: 0f b6 92 50 78 10 80 movzbl -0x7fef87b0(%edx),%edx
801005d0: 89 45 d0 mov %eax,-0x30(%ebp)
801005d3: 89 d8 mov %ebx,%eax
801005d5: 8d 5b 01 lea 0x1(%ebx),%ebx
}while((x /= base) != 0);
801005d8: 8b 4d d0 mov -0x30(%ebp),%ecx
801005db: 89 75 d0 mov %esi,-0x30(%ebp)
buf[i++] = digits[x % base];
801005de: 88 14 1f mov %dl,(%edi,%ebx,1)
}while((x /= base) != 0);
801005e1: 8b 75 d4 mov -0x2c(%ebp),%esi
801005e4: 39 75 d0 cmp %esi,-0x30(%ebp)
801005e7: 73 d7 jae 801005c0 <printint+0x20>
801005e9: 8b 75 cc mov -0x34(%ebp),%esi
if(sign)
801005ec: 85 f6 test %esi,%esi
801005ee: 74 0c je 801005fc <printint+0x5c>
buf[i++] = '-';
801005f0: c6 44 1d d8 2d movb $0x2d,-0x28(%ebp,%ebx,1)
buf[i++] = digits[x % base];
801005f5: 89 d8 mov %ebx,%eax
buf[i++] = '-';
801005f7: ba 2d 00 00 00 mov $0x2d,%edx
while(--i >= 0)
801005fc: 8d 5c 05 d7 lea -0x29(%ebp,%eax,1),%ebx
80100600: 0f be c2 movsbl %dl,%eax
if(panicked){
80100603: 8b 15 58 b5 10 80 mov 0x8010b558,%edx
80100609: 85 d2 test %edx,%edx
8010060b: 74 03 je 80100610 <printint+0x70>
asm volatile("cli");
8010060d: fa cli
for(;;)
8010060e: eb fe jmp 8010060e <printint+0x6e>
80100610: e8 fb fd ff ff call 80100410 <consputc.part.0>
while(--i >= 0)
80100615: 39 fb cmp %edi,%ebx
80100617: 74 10 je 80100629 <printint+0x89>
80100619: 0f be 03 movsbl (%ebx),%eax
8010061c: 83 eb 01 sub $0x1,%ebx
8010061f: eb e2 jmp 80100603 <printint+0x63>
x = -xx;
80100621: f7 d8 neg %eax
80100623: 89 ce mov %ecx,%esi
80100625: 89 c1 mov %eax,%ecx
80100627: eb 8f jmp 801005b8 <printint+0x18>
}
80100629: 83 c4 2c add $0x2c,%esp
8010062c: 5b pop %ebx
8010062d: 5e pop %esi
8010062e: 5f pop %edi
8010062f: 5d pop %ebp
80100630: c3 ret
80100631: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80100638: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010063f: 90 nop
80100640 <consolewrite>:
int
consolewrite(struct inode *ip, char *buf, int n)
{
80100640: f3 0f 1e fb endbr32
80100644: 55 push %ebp
80100645: 89 e5 mov %esp,%ebp
80100647: 57 push %edi
80100648: 56 push %esi
80100649: 53 push %ebx
8010064a: 83 ec 18 sub $0x18,%esp
int i;
iunlock(ip);
8010064d: ff 75 08 pushl 0x8(%ebp)
{
80100650: 8b 5d 10 mov 0x10(%ebp),%ebx
iunlock(ip);
80100653: e8 e8 11 00 00 call 80101840 <iunlock>
acquire(&cons.lock);
80100658: c7 04 24 20 b5 10 80 movl $0x8010b520,(%esp)
8010065f: e8 2c 45 00 00 call 80104b90 <acquire>
for(i = 0; i < n; i++)
80100664: 83 c4 10 add $0x10,%esp
80100667: 85 db test %ebx,%ebx
80100669: 7e 24 jle 8010068f <consolewrite+0x4f>
8010066b: 8b 7d 0c mov 0xc(%ebp),%edi
8010066e: 8d 34 1f lea (%edi,%ebx,1),%esi
if(panicked){
80100671: 8b 15 58 b5 10 80 mov 0x8010b558,%edx
80100677: 85 d2 test %edx,%edx
80100679: 74 05 je 80100680 <consolewrite+0x40>
8010067b: fa cli
for(;;)
8010067c: eb fe jmp 8010067c <consolewrite+0x3c>
8010067e: 66 90 xchg %ax,%ax
consputc(buf[i] & 0xff);
80100680: 0f b6 07 movzbl (%edi),%eax
80100683: 83 c7 01 add $0x1,%edi
80100686: e8 85 fd ff ff call 80100410 <consputc.part.0>
for(i = 0; i < n; i++)
8010068b: 39 fe cmp %edi,%esi
8010068d: 75 e2 jne 80100671 <consolewrite+0x31>
release(&cons.lock);
8010068f: 83 ec 0c sub $0xc,%esp
80100692: 68 20 b5 10 80 push $0x8010b520
80100697: e8 b4 45 00 00 call 80104c50 <release>
ilock(ip);
8010069c: 58 pop %eax
8010069d: ff 75 08 pushl 0x8(%ebp)
801006a0: e8 bb 10 00 00 call 80101760 <ilock>
return n;
}
801006a5: 8d 65 f4 lea -0xc(%ebp),%esp
801006a8: 89 d8 mov %ebx,%eax
801006aa: 5b pop %ebx
801006ab: 5e pop %esi
801006ac: 5f pop %edi
801006ad: 5d pop %ebp
801006ae: c3 ret
801006af: 90 nop
801006b0 <cprintf>:
{
801006b0: f3 0f 1e fb endbr32
801006b4: 55 push %ebp
801006b5: 89 e5 mov %esp,%ebp
801006b7: 57 push %edi
801006b8: 56 push %esi
801006b9: 53 push %ebx
801006ba: 83 ec 1c sub $0x1c,%esp
locking = cons.locking;
801006bd: a1 54 b5 10 80 mov 0x8010b554,%eax
801006c2: 89 45 e0 mov %eax,-0x20(%ebp)
if(locking)
801006c5: 85 c0 test %eax,%eax
801006c7: 0f 85 e8 00 00 00 jne 801007b5 <cprintf+0x105>
if (fmt == 0)
801006cd: 8b 45 08 mov 0x8(%ebp),%eax
801006d0: 89 45 e4 mov %eax,-0x1c(%ebp)
801006d3: 85 c0 test %eax,%eax
801006d5: 0f 84 5a 01 00 00 je 80100835 <cprintf+0x185>
for(i = 0; (c = fmt[i] & 0xff) != 0; i++){
801006db: 0f b6 00 movzbl (%eax),%eax
801006de: 85 c0 test %eax,%eax
801006e0: 74 36 je 80100718 <cprintf+0x68>
argp = (uint*)(void*)(&fmt + 1);
801006e2: 8d 5d 0c lea 0xc(%ebp),%ebx
for(i = 0; (c = fmt[i] & 0xff) != 0; i++){
801006e5: 31 f6 xor %esi,%esi
if(c != '%'){
801006e7: 83 f8 25 cmp $0x25,%eax
801006ea: 74 44 je 80100730 <cprintf+0x80>
if(panicked){
801006ec: 8b 0d 58 b5 10 80 mov 0x8010b558,%ecx
801006f2: 85 c9 test %ecx,%ecx
801006f4: 74 0f je 80100705 <cprintf+0x55>
801006f6: fa cli
for(;;)
801006f7: eb fe jmp 801006f7 <cprintf+0x47>
801006f9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80100700: b8 25 00 00 00 mov $0x25,%eax
80100705: e8 06 fd ff ff call 80100410 <consputc.part.0>
for(i = 0; (c = fmt[i] & 0xff) != 0; i++){
8010070a: 8b 45 e4 mov -0x1c(%ebp),%eax
8010070d: 83 c6 01 add $0x1,%esi
80100710: 0f b6 04 30 movzbl (%eax,%esi,1),%eax
80100714: 85 c0 test %eax,%eax
80100716: 75 cf jne 801006e7 <cprintf+0x37>
if(locking)
80100718: 8b 45 e0 mov -0x20(%ebp),%eax
8010071b: 85 c0 test %eax,%eax
8010071d: 0f 85 fd 00 00 00 jne 80100820 <cprintf+0x170>
}
80100723: 8d 65 f4 lea -0xc(%ebp),%esp
80100726: 5b pop %ebx
80100727: 5e pop %esi
80100728: 5f pop %edi
80100729: 5d pop %ebp
8010072a: c3 ret
8010072b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
8010072f: 90 nop
c = fmt[++i] & 0xff;
80100730: 8b 45 e4 mov -0x1c(%ebp),%eax
80100733: 83 c6 01 add $0x1,%esi
80100736: 0f b6 3c 30 movzbl (%eax,%esi,1),%edi
if(c == 0)
8010073a: 85 ff test %edi,%edi
8010073c: 74 da je 80100718 <cprintf+0x68>
switch(c){
8010073e: 83 ff 70 cmp $0x70,%edi
80100741: 74 5a je 8010079d <cprintf+0xed>
80100743: 7f 2a jg 8010076f <cprintf+0xbf>
80100745: 83 ff 25 cmp $0x25,%edi
80100748: 0f 84 92 00 00 00 je 801007e0 <cprintf+0x130>
8010074e: 83 ff 64 cmp $0x64,%edi
80100751: 0f 85 a1 00 00 00 jne 801007f8 <cprintf+0x148>
printint(*argp++, 10, 1);
80100757: 8b 03 mov (%ebx),%eax
80100759: 8d 7b 04 lea 0x4(%ebx),%edi
8010075c: b9 01 00 00 00 mov $0x1,%ecx
80100761: ba 0a 00 00 00 mov $0xa,%edx
80100766: 89 fb mov %edi,%ebx
80100768: e8 33 fe ff ff call 801005a0 <printint>
break;
8010076d: eb 9b jmp 8010070a <cprintf+0x5a>
switch(c){
8010076f: 83 ff 73 cmp $0x73,%edi
80100772: 75 24 jne 80100798 <cprintf+0xe8>
if((s = (char*)*argp++) == 0)
80100774: 8d 7b 04 lea 0x4(%ebx),%edi
80100777: 8b 1b mov (%ebx),%ebx
80100779: 85 db test %ebx,%ebx
8010077b: 75 55 jne 801007d2 <cprintf+0x122>
s = "(null)";
8010077d: bb 38 78 10 80 mov $0x80107838,%ebx
for(; *s; s++)
80100782: b8 28 00 00 00 mov $0x28,%eax
if(panicked){
80100787: 8b 15 58 b5 10 80 mov 0x8010b558,%edx
8010078d: 85 d2 test %edx,%edx
8010078f: 74 39 je 801007ca <cprintf+0x11a>
80100791: fa cli
for(;;)
80100792: eb fe jmp 80100792 <cprintf+0xe2>
80100794: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
switch(c){
80100798: 83 ff 78 cmp $0x78,%edi
8010079b: 75 5b jne 801007f8 <cprintf+0x148>
printint(*argp++, 16, 0);
8010079d: 8b 03 mov (%ebx),%eax
8010079f: 8d 7b 04 lea 0x4(%ebx),%edi
801007a2: 31 c9 xor %ecx,%ecx
801007a4: ba 10 00 00 00 mov $0x10,%edx
801007a9: 89 fb mov %edi,%ebx
801007ab: e8 f0 fd ff ff call 801005a0 <printint>
break;
801007b0: e9 55 ff ff ff jmp 8010070a <cprintf+0x5a>
acquire(&cons.lock);
801007b5: 83 ec 0c sub $0xc,%esp
801007b8: 68 20 b5 10 80 push $0x8010b520
801007bd: e8 ce 43 00 00 call 80104b90 <acquire>
801007c2: 83 c4 10 add $0x10,%esp
801007c5: e9 03 ff ff ff jmp 801006cd <cprintf+0x1d>
801007ca: e8 41 fc ff ff call 80100410 <consputc.part.0>
for(; *s; s++)
801007cf: 83 c3 01 add $0x1,%ebx
801007d2: 0f be 03 movsbl (%ebx),%eax
801007d5: 84 c0 test %al,%al
801007d7: 75 ae jne 80100787 <cprintf+0xd7>
if((s = (char*)*argp++) == 0)
801007d9: 89 fb mov %edi,%ebx
801007db: e9 2a ff ff ff jmp 8010070a <cprintf+0x5a>
if(panicked){
801007e0: 8b 3d 58 b5 10 80 mov 0x8010b558,%edi
801007e6: 85 ff test %edi,%edi
801007e8: 0f 84 12 ff ff ff je 80100700 <cprintf+0x50>
801007ee: fa cli
for(;;)
801007ef: eb fe jmp 801007ef <cprintf+0x13f>
801007f1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
if(panicked){
801007f8: 8b 0d 58 b5 10 80 mov 0x8010b558,%ecx
801007fe: 85 c9 test %ecx,%ecx
80100800: 74 06 je 80100808 <cprintf+0x158>
80100802: fa cli
for(;;)
80100803: eb fe jmp 80100803 <cprintf+0x153>
80100805: 8d 76 00 lea 0x0(%esi),%esi
80100808: b8 25 00 00 00 mov $0x25,%eax
8010080d: e8 fe fb ff ff call 80100410 <consputc.part.0>
if(panicked){
80100812: 8b 15 58 b5 10 80 mov 0x8010b558,%edx
80100818: 85 d2 test %edx,%edx
8010081a: 74 2c je 80100848 <cprintf+0x198>
8010081c: fa cli
for(;;)
8010081d: eb fe jmp 8010081d <cprintf+0x16d>
8010081f: 90 nop
release(&cons.lock);
80100820: 83 ec 0c sub $0xc,%esp
80100823: 68 20 b5 10 80 push $0x8010b520
80100828: e8 23 44 00 00 call 80104c50 <release>
8010082d: 83 c4 10 add $0x10,%esp
}
80100830: e9 ee fe ff ff jmp 80100723 <cprintf+0x73>
panic("null fmt");
80100835: 83 ec 0c sub $0xc,%esp
80100838: 68 3f 78 10 80 push $0x8010783f
8010083d: e8 4e fb ff ff call 80100390 <panic>
80100842: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80100848: 89 f8 mov %edi,%eax
8010084a: e8 c1 fb ff ff call 80100410 <consputc.part.0>
8010084f: e9 b6 fe ff ff jmp 8010070a <cprintf+0x5a>
80100854: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010085b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
8010085f: 90 nop
80100860 <consoleintr>:
{
80100860: f3 0f 1e fb endbr32
80100864: 55 push %ebp
80100865: 89 e5 mov %esp,%ebp
80100867: 57 push %edi
80100868: 56 push %esi
int c, doprocdump = 0;
80100869: 31 f6 xor %esi,%esi
{
8010086b: 53 push %ebx
8010086c: 83 ec 18 sub $0x18,%esp
8010086f: 8b 7d 08 mov 0x8(%ebp),%edi
acquire(&cons.lock);
80100872: 68 20 b5 10 80 push $0x8010b520
80100877: e8 14 43 00 00 call 80104b90 <acquire>
while((c = getc()) >= 0){
8010087c: 83 c4 10 add $0x10,%esp
8010087f: eb 17 jmp 80100898 <consoleintr+0x38>
switch(c){
80100881: 83 fb 08 cmp $0x8,%ebx
80100884: 0f 84 f6 00 00 00 je 80100980 <consoleintr+0x120>
8010088a: 83 fb 10 cmp $0x10,%ebx
8010088d: 0f 85 15 01 00 00 jne 801009a8 <consoleintr+0x148>
80100893: be 01 00 00 00 mov $0x1,%esi
while((c = getc()) >= 0){
80100898: ff d7 call *%edi
8010089a: 89 c3 mov %eax,%ebx
8010089c: 85 c0 test %eax,%eax
8010089e: 0f 88 23 01 00 00 js 801009c7 <consoleintr+0x167>
switch(c){
801008a4: 83 fb 15 cmp $0x15,%ebx
801008a7: 74 77 je 80100920 <consoleintr+0xc0>
801008a9: 7e d6 jle 80100881 <consoleintr+0x21>
801008ab: 83 fb 7f cmp $0x7f,%ebx
801008ae: 0f 84 cc 00 00 00 je 80100980 <consoleintr+0x120>
if(c != 0 && input.e-input.r < INPUT_BUF){
801008b4: a1 a8 0f 11 80 mov 0x80110fa8,%eax
801008b9: 89 c2 mov %eax,%edx
801008bb: 2b 15 a0 0f 11 80 sub 0x80110fa0,%edx
801008c1: 83 fa 7f cmp $0x7f,%edx
801008c4: 77 d2 ja 80100898 <consoleintr+0x38>
c = (c == '\r') ? '\n' : c;
801008c6: 8d 48 01 lea 0x1(%eax),%ecx
801008c9: 8b 15 58 b5 10 80 mov 0x8010b558,%edx
801008cf: 83 e0 7f and $0x7f,%eax
input.buf[input.e++ % INPUT_BUF] = c;
801008d2: 89 0d a8 0f 11 80 mov %ecx,0x80110fa8
c = (c == '\r') ? '\n' : c;
801008d8: 83 fb 0d cmp $0xd,%ebx
801008db: 0f 84 02 01 00 00 je 801009e3 <consoleintr+0x183>
input.buf[input.e++ % INPUT_BUF] = c;
801008e1: 88 98 20 0f 11 80 mov %bl,-0x7feef0e0(%eax)
if(panicked){
801008e7: 85 d2 test %edx,%edx
801008e9: 0f 85 ff 00 00 00 jne 801009ee <consoleintr+0x18e>
801008ef: 89 d8 mov %ebx,%eax
801008f1: e8 1a fb ff ff call 80100410 <consputc.part.0>
if(c == '\n' || c == C('D') || input.e == input.r+INPUT_BUF){
801008f6: 83 fb 0a cmp $0xa,%ebx
801008f9: 0f 84 0f 01 00 00 je 80100a0e <consoleintr+0x1ae>
801008ff: 83 fb 04 cmp $0x4,%ebx
80100902: 0f 84 06 01 00 00 je 80100a0e <consoleintr+0x1ae>
80100908: a1 a0 0f 11 80 mov 0x80110fa0,%eax
8010090d: 83 e8 80 sub $0xffffff80,%eax
80100910: 39 05 a8 0f 11 80 cmp %eax,0x80110fa8
80100916: 75 80 jne 80100898 <consoleintr+0x38>
80100918: e9 f6 00 00 00 jmp 80100a13 <consoleintr+0x1b3>
8010091d: 8d 76 00 lea 0x0(%esi),%esi
while(input.e != input.w &&
80100920: a1 a8 0f 11 80 mov 0x80110fa8,%eax
80100925: 39 05 a4 0f 11 80 cmp %eax,0x80110fa4
8010092b: 0f 84 67 ff ff ff je 80100898 <consoleintr+0x38>
input.buf[(input.e-1) % INPUT_BUF] != '\n'){
80100931: 83 e8 01 sub $0x1,%eax
80100934: 89 c2 mov %eax,%edx
80100936: 83 e2 7f and $0x7f,%edx
while(input.e != input.w &&
80100939: 80 ba 20 0f 11 80 0a cmpb $0xa,-0x7feef0e0(%edx)
80100940: 0f 84 52 ff ff ff je 80100898 <consoleintr+0x38>
if(panicked){
80100946: 8b 15 58 b5 10 80 mov 0x8010b558,%edx
input.e--;
8010094c: a3 a8 0f 11 80 mov %eax,0x80110fa8
if(panicked){
80100951: 85 d2 test %edx,%edx
80100953: 74 0b je 80100960 <consoleintr+0x100>
80100955: fa cli
for(;;)
80100956: eb fe jmp 80100956 <consoleintr+0xf6>
80100958: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010095f: 90 nop
80100960: b8 00 01 00 00 mov $0x100,%eax
80100965: e8 a6 fa ff ff call 80100410 <consputc.part.0>
while(input.e != input.w &&
8010096a: a1 a8 0f 11 80 mov 0x80110fa8,%eax
8010096f: 3b 05 a4 0f 11 80 cmp 0x80110fa4,%eax
80100975: 75 ba jne 80100931 <consoleintr+0xd1>
80100977: e9 1c ff ff ff jmp 80100898 <consoleintr+0x38>
8010097c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if(input.e != input.w){
80100980: a1 a8 0f 11 80 mov 0x80110fa8,%eax
80100985: 3b 05 a4 0f 11 80 cmp 0x80110fa4,%eax
8010098b: 0f 84 07 ff ff ff je 80100898 <consoleintr+0x38>
input.e--;
80100991: 83 e8 01 sub $0x1,%eax
80100994: a3 a8 0f 11 80 mov %eax,0x80110fa8
if(panicked){
80100999: a1 58 b5 10 80 mov 0x8010b558,%eax
8010099e: 85 c0 test %eax,%eax
801009a0: 74 16 je 801009b8 <consoleintr+0x158>
801009a2: fa cli
for(;;)
801009a3: eb fe jmp 801009a3 <consoleintr+0x143>
801009a5: 8d 76 00 lea 0x0(%esi),%esi
if(c != 0 && input.e-input.r < INPUT_BUF){
801009a8: 85 db test %ebx,%ebx
801009aa: 0f 84 e8 fe ff ff je 80100898 <consoleintr+0x38>
801009b0: e9 ff fe ff ff jmp 801008b4 <consoleintr+0x54>
801009b5: 8d 76 00 lea 0x0(%esi),%esi
801009b8: b8 00 01 00 00 mov $0x100,%eax
801009bd: e8 4e fa ff ff call 80100410 <consputc.part.0>
801009c2: e9 d1 fe ff ff jmp 80100898 <consoleintr+0x38>
release(&cons.lock);
801009c7: 83 ec 0c sub $0xc,%esp
801009ca: 68 20 b5 10 80 push $0x8010b520
801009cf: e8 7c 42 00 00 call 80104c50 <release>
if(doprocdump) {
801009d4: 83 c4 10 add $0x10,%esp
801009d7: 85 f6 test %esi,%esi
801009d9: 75 1d jne 801009f8 <consoleintr+0x198>
}
801009db: 8d 65 f4 lea -0xc(%ebp),%esp
801009de: 5b pop %ebx
801009df: 5e pop %esi
801009e0: 5f pop %edi
801009e1: 5d pop %ebp
801009e2: c3 ret
input.buf[input.e++ % INPUT_BUF] = c;
801009e3: c6 80 20 0f 11 80 0a movb $0xa,-0x7feef0e0(%eax)
if(panicked){
801009ea: 85 d2 test %edx,%edx
801009ec: 74 16 je 80100a04 <consoleintr+0x1a4>
801009ee: fa cli
for(;;)
801009ef: eb fe jmp 801009ef <consoleintr+0x18f>
801009f1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
}
801009f8: 8d 65 f4 lea -0xc(%ebp),%esp
801009fb: 5b pop %ebx
801009fc: 5e pop %esi
801009fd: 5f pop %edi
801009fe: 5d pop %ebp
procdump(); // now call procdump() wo. cons.lock held
801009ff: e9 4c 3b 00 00 jmp 80104550 <procdump>
80100a04: b8 0a 00 00 00 mov $0xa,%eax
80100a09: e8 02 fa ff ff call 80100410 <consputc.part.0>
if(c == '\n' || c == C('D') || input.e == input.r+INPUT_BUF){
80100a0e: a1 a8 0f 11 80 mov 0x80110fa8,%eax
wakeup(&input.r);
80100a13: 83 ec 0c sub $0xc,%esp
input.w = input.e;
80100a16: a3 a4 0f 11 80 mov %eax,0x80110fa4
wakeup(&input.r);
80100a1b: 68 a0 0f 11 80 push $0x80110fa0
80100a20: e8 5b 3a 00 00 call 80104480 <wakeup>
80100a25: 83 c4 10 add $0x10,%esp
80100a28: e9 6b fe ff ff jmp 80100898 <consoleintr+0x38>
80100a2d: 8d 76 00 lea 0x0(%esi),%esi
80100a30 <consoleinit>:
void
consoleinit(void)
{
80100a30: f3 0f 1e fb endbr32
80100a34: 55 push %ebp
80100a35: 89 e5 mov %esp,%ebp
80100a37: 83 ec 10 sub $0x10,%esp
initlock(&cons.lock, "console");
80100a3a: 68 48 78 10 80 push $0x80107848
80100a3f: 68 20 b5 10 80 push $0x8010b520
80100a44: e8 c7 3f 00 00 call 80104a10 <initlock>
devsw[CONSOLE].write = consolewrite;
devsw[CONSOLE].read = consoleread;
cons.locking = 1;
ioapicenable(IRQ_KBD, 0);
80100a49: 58 pop %eax
80100a4a: 5a pop %edx
80100a4b: 6a 00 push $0x0
80100a4d: 6a 01 push $0x1
devsw[CONSOLE].write = consolewrite;
80100a4f: c7 05 6c 19 11 80 40 movl $0x80100640,0x8011196c
80100a56: 06 10 80
devsw[CONSOLE].read = consoleread;
80100a59: c7 05 68 19 11 80 90 movl $0x80100290,0x80111968
80100a60: 02 10 80
cons.locking = 1;
80100a63: c7 05 54 b5 10 80 01 movl $0x1,0x8010b554
80100a6a: 00 00 00
ioapicenable(IRQ_KBD, 0);
80100a6d: e8 be 19 00 00 call 80102430 <ioapicenable>
}
80100a72: 83 c4 10 add $0x10,%esp
80100a75: c9 leave
80100a76: c3 ret
80100a77: 66 90 xchg %ax,%ax
80100a79: 66 90 xchg %ax,%ax
80100a7b: 66 90 xchg %ax,%ax
80100a7d: 66 90 xchg %ax,%ax
80100a7f: 90 nop
80100a80 <exec>:
#include "x86.h"
#include "elf.h"
int
exec(char *path, char **argv)
{
80100a80: f3 0f 1e fb endbr32
80100a84: 55 push %ebp
80100a85: 89 e5 mov %esp,%ebp
80100a87: 57 push %edi
80100a88: 56 push %esi
80100a89: 53 push %ebx
80100a8a: 81 ec 0c 01 00 00 sub $0x10c,%esp
uint argc, sz, sp, ustack[3+MAXARG+1];
struct elfhdr elf;
struct inode *ip;
struct proghdr ph;
pde_t *pgdir, *oldpgdir;
struct proc *curproc = myproc();
80100a90: e8 cb 2f 00 00 call 80103a60 <myproc>
80100a95: 89 85 ec fe ff ff mov %eax,-0x114(%ebp)
begin_op();
80100a9b: e8 90 22 00 00 call 80102d30 <begin_op>
if((ip = namei(path)) == 0){
80100aa0: 83 ec 0c sub $0xc,%esp
80100aa3: ff 75 08 pushl 0x8(%ebp)
80100aa6: e8 85 15 00 00 call 80102030 <namei>
80100aab: 83 c4 10 add $0x10,%esp
80100aae: 85 c0 test %eax,%eax
80100ab0: 0f 84 fe 02 00 00 je 80100db4 <exec+0x334>
end_op();
cprintf("exec: fail\n");
return -1;
}
ilock(ip);
80100ab6: 83 ec 0c sub $0xc,%esp
80100ab9: 89 c3 mov %eax,%ebx
80100abb: 50 push %eax
80100abc: e8 9f 0c 00 00 call 80101760 <ilock>
pgdir = 0;
// Check ELF header
if(readi(ip, (char*)&elf, 0, sizeof(elf)) != sizeof(elf))
80100ac1: 8d 85 24 ff ff ff lea -0xdc(%ebp),%eax
80100ac7: 6a 34 push $0x34
80100ac9: 6a 00 push $0x0
80100acb: 50 push %eax
80100acc: 53 push %ebx
80100acd: e8 8e 0f 00 00 call 80101a60 <readi>
80100ad2: 83 c4 20 add $0x20,%esp
80100ad5: 83 f8 34 cmp $0x34,%eax
80100ad8: 74 26 je 80100b00 <exec+0x80>
bad:
if(pgdir)
freevm(pgdir);
if(ip){
iunlockput(ip);
80100ada: 83 ec 0c sub $0xc,%esp
80100add: 53 push %ebx
80100ade: e8 1d 0f 00 00 call 80101a00 <iunlockput>
end_op();
80100ae3: e8 b8 22 00 00 call 80102da0 <end_op>
80100ae8: 83 c4 10 add $0x10,%esp
}
return -1;
80100aeb: b8 ff ff ff ff mov $0xffffffff,%eax
}
80100af0: 8d 65 f4 lea -0xc(%ebp),%esp
80100af3: 5b pop %ebx
80100af4: 5e pop %esi
80100af5: 5f pop %edi
80100af6: 5d pop %ebp
80100af7: c3 ret
80100af8: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80100aff: 90 nop
if(elf.magic != ELF_MAGIC)
80100b00: 81 bd 24 ff ff ff 7f cmpl $0x464c457f,-0xdc(%ebp)
80100b07: 45 4c 46
80100b0a: 75 ce jne 80100ada <exec+0x5a>
if((pgdir = setupkvm()) == 0)
80100b0c: e8 2f 6a 00 00 call 80107540 <setupkvm>
80100b11: 89 85 f4 fe ff ff mov %eax,-0x10c(%ebp)
80100b17: 85 c0 test %eax,%eax
80100b19: 74 bf je 80100ada <exec+0x5a>
for(i=0, off=elf.phoff; i<elf.phnum; i++, off+=sizeof(ph)){
80100b1b: 66 83 bd 50 ff ff ff cmpw $0x0,-0xb0(%ebp)
80100b22: 00
80100b23: 8b b5 40 ff ff ff mov -0xc0(%ebp),%esi
80100b29: 0f 84 a4 02 00 00 je 80100dd3 <exec+0x353>
sz = 0;
80100b2f: c7 85 f0 fe ff ff 00 movl $0x0,-0x110(%ebp)
80100b36: 00 00 00
for(i=0, off=elf.phoff; i<elf.phnum; i++, off+=sizeof(ph)){
80100b39: 31 ff xor %edi,%edi
80100b3b: e9 86 00 00 00 jmp 80100bc6 <exec+0x146>
if(ph.type != ELF_PROG_LOAD)
80100b40: 83 bd 04 ff ff ff 01 cmpl $0x1,-0xfc(%ebp)
80100b47: 75 6c jne 80100bb5 <exec+0x135>
if(ph.memsz < ph.filesz)
80100b49: 8b 85 18 ff ff ff mov -0xe8(%ebp),%eax
80100b4f: 3b 85 14 ff ff ff cmp -0xec(%ebp),%eax
80100b55: 0f 82 87 00 00 00 jb 80100be2 <exec+0x162>
if(ph.vaddr + ph.memsz < ph.vaddr)
80100b5b: 03 85 0c ff ff ff add -0xf4(%ebp),%eax
80100b61: 72 7f jb 80100be2 <exec+0x162>
if((sz = allocuvm(pgdir, sz, ph.vaddr + ph.memsz)) == 0)
80100b63: 83 ec 04 sub $0x4,%esp
80100b66: 50 push %eax
80100b67: ff b5 f0 fe ff ff pushl -0x110(%ebp)
80100b6d: ff b5 f4 fe ff ff pushl -0x10c(%ebp)
80100b73: e8 e8 67 00 00 call 80107360 <allocuvm>
80100b78: 83 c4 10 add $0x10,%esp
80100b7b: 89 85 f0 fe ff ff mov %eax,-0x110(%ebp)
80100b81: 85 c0 test %eax,%eax
80100b83: 74 5d je 80100be2 <exec+0x162>
if(ph.vaddr % PGSIZE != 0)
80100b85: 8b 85 0c ff ff ff mov -0xf4(%ebp),%eax
80100b8b: a9 ff 0f 00 00 test $0xfff,%eax
80100b90: 75 50 jne 80100be2 <exec+0x162>
if(loaduvm(pgdir, (char*)ph.vaddr, ip, ph.off, ph.filesz) < 0)
80100b92: 83 ec 0c sub $0xc,%esp
80100b95: ff b5 14 ff ff ff pushl -0xec(%ebp)
80100b9b: ff b5 08 ff ff ff pushl -0xf8(%ebp)
80100ba1: 53 push %ebx
80100ba2: 50 push %eax
80100ba3: ff b5 f4 fe ff ff pushl -0x10c(%ebp)
80100ba9: e8 e2 66 00 00 call 80107290 <loaduvm>
80100bae: 83 c4 20 add $0x20,%esp
80100bb1: 85 c0 test %eax,%eax
80100bb3: 78 2d js 80100be2 <exec+0x162>
for(i=0, off=elf.phoff; i<elf.phnum; i++, off+=sizeof(ph)){
80100bb5: 0f b7 85 50 ff ff ff movzwl -0xb0(%ebp),%eax
80100bbc: 83 c7 01 add $0x1,%edi
80100bbf: 83 c6 20 add $0x20,%esi
80100bc2: 39 f8 cmp %edi,%eax
80100bc4: 7e 3a jle 80100c00 <exec+0x180>
if(readi(ip, (char*)&ph, off, sizeof(ph)) != sizeof(ph))
80100bc6: 8d 85 04 ff ff ff lea -0xfc(%ebp),%eax
80100bcc: 6a 20 push $0x20
80100bce: 56 push %esi
80100bcf: 50 push %eax
80100bd0: 53 push %ebx
80100bd1: e8 8a 0e 00 00 call 80101a60 <readi>
80100bd6: 83 c4 10 add $0x10,%esp
80100bd9: 83 f8 20 cmp $0x20,%eax
80100bdc: 0f 84 5e ff ff ff je 80100b40 <exec+0xc0>
freevm(pgdir);
80100be2: 83 ec 0c sub $0xc,%esp
80100be5: ff b5 f4 fe ff ff pushl -0x10c(%ebp)
80100beb: e8 d0 68 00 00 call 801074c0 <freevm>
if(ip){
80100bf0: 83 c4 10 add $0x10,%esp
80100bf3: e9 e2 fe ff ff jmp 80100ada <exec+0x5a>
80100bf8: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80100bff: 90 nop
80100c00: 8b bd f0 fe ff ff mov -0x110(%ebp),%edi
80100c06: 81 c7 ff 0f 00 00 add $0xfff,%edi
80100c0c: 81 e7 00 f0 ff ff and $0xfffff000,%edi
80100c12: 8d b7 00 20 00 00 lea 0x2000(%edi),%esi
iunlockput(ip);
80100c18: 83 ec 0c sub $0xc,%esp
80100c1b: 53 push %ebx
80100c1c: e8 df 0d 00 00 call 80101a00 <iunlockput>
end_op();
80100c21: e8 7a 21 00 00 call 80102da0 <end_op>
if((sz = allocuvm(pgdir, sz, sz + 2*PGSIZE)) == 0)
80100c26: 83 c4 0c add $0xc,%esp
80100c29: 56 push %esi
80100c2a: 57 push %edi
80100c2b: 8b bd f4 fe ff ff mov -0x10c(%ebp),%edi
80100c31: 57 push %edi
80100c32: e8 29 67 00 00 call 80107360 <allocuvm>
80100c37: 83 c4 10 add $0x10,%esp
80100c3a: 89 c6 mov %eax,%esi
80100c3c: 85 c0 test %eax,%eax
80100c3e: 0f 84 94 00 00 00 je 80100cd8 <exec+0x258>
clearpteu(pgdir, (char*)(sz - 2*PGSIZE));
80100c44: 83 ec 08 sub $0x8,%esp
80100c47: 8d 80 00 e0 ff ff lea -0x2000(%eax),%eax
for(argc = 0; argv[argc]; argc++) {
80100c4d: 89 f3 mov %esi,%ebx
clearpteu(pgdir, (char*)(sz - 2*PGSIZE));
80100c4f: 50 push %eax
80100c50: 57 push %edi
for(argc = 0; argv[argc]; argc++) {
80100c51: 31 ff xor %edi,%edi
clearpteu(pgdir, (char*)(sz - 2*PGSIZE));
80100c53: e8 88 69 00 00 call 801075e0 <clearpteu>
for(argc = 0; argv[argc]; argc++) {
80100c58: 8b 45 0c mov 0xc(%ebp),%eax
80100c5b: 83 c4 10 add $0x10,%esp
80100c5e: 8d 95 58 ff ff ff lea -0xa8(%ebp),%edx
80100c64: 8b 00 mov (%eax),%eax
80100c66: 85 c0 test %eax,%eax
80100c68: 0f 84 8b 00 00 00 je 80100cf9 <exec+0x279>
80100c6e: 89 b5 f0 fe ff ff mov %esi,-0x110(%ebp)
80100c74: 8b b5 f4 fe ff ff mov -0x10c(%ebp),%esi
80100c7a: eb 23 jmp 80100c9f <exec+0x21f>
80100c7c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80100c80: 8b 45 0c mov 0xc(%ebp),%eax
ustack[3+argc] = sp;
80100c83: 89 9c bd 64 ff ff ff mov %ebx,-0x9c(%ebp,%edi,4)
for(argc = 0; argv[argc]; argc++) {
80100c8a: 83 c7 01 add $0x1,%edi
ustack[3+argc] = sp;
80100c8d: 8d 95 58 ff ff ff lea -0xa8(%ebp),%edx
for(argc = 0; argv[argc]; argc++) {
80100c93: 8b 04 b8 mov (%eax,%edi,4),%eax
80100c96: 85 c0 test %eax,%eax
80100c98: 74 59 je 80100cf3 <exec+0x273>
if(argc >= MAXARG)
80100c9a: 83 ff 20 cmp $0x20,%edi
80100c9d: 74 39 je 80100cd8 <exec+0x258>
sp = (sp - (strlen(argv[argc]) + 1)) & ~3;
80100c9f: 83 ec 0c sub $0xc,%esp
80100ca2: 50 push %eax
80100ca3: e8 f8 41 00 00 call 80104ea0 <strlen>
80100ca8: f7 d0 not %eax
80100caa: 01 c3 add %eax,%ebx
if(copyout(pgdir, sp, argv[argc], strlen(argv[argc]) + 1) < 0)
80100cac: 58 pop %eax
80100cad: 8b 45 0c mov 0xc(%ebp),%eax
sp = (sp - (strlen(argv[argc]) + 1)) & ~3;
80100cb0: 83 e3 fc and $0xfffffffc,%ebx
if(copyout(pgdir, sp, argv[argc], strlen(argv[argc]) + 1) < 0)
80100cb3: ff 34 b8 pushl (%eax,%edi,4)
80100cb6: e8 e5 41 00 00 call 80104ea0 <strlen>
80100cbb: 83 c0 01 add $0x1,%eax
80100cbe: 50 push %eax
80100cbf: 8b 45 0c mov 0xc(%ebp),%eax
80100cc2: ff 34 b8 pushl (%eax,%edi,4)
80100cc5: 53 push %ebx
80100cc6: 56 push %esi
80100cc7: e8 74 6a 00 00 call 80107740 <copyout>
80100ccc: 83 c4 20 add $0x20,%esp
80100ccf: 85 c0 test %eax,%eax
80100cd1: 79 ad jns 80100c80 <exec+0x200>
80100cd3: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80100cd7: 90 nop
freevm(pgdir);
80100cd8: 83 ec 0c sub $0xc,%esp
80100cdb: ff b5 f4 fe ff ff pushl -0x10c(%ebp)
80100ce1: e8 da 67 00 00 call 801074c0 <freevm>
80100ce6: 83 c4 10 add $0x10,%esp
return -1;
80100ce9: b8 ff ff ff ff mov $0xffffffff,%eax
80100cee: e9 fd fd ff ff jmp 80100af0 <exec+0x70>
80100cf3: 8b b5 f0 fe ff ff mov -0x110(%ebp),%esi
ustack[2] = sp - (argc+1)*4; // argv pointer
80100cf9: 8d 04 bd 04 00 00 00 lea 0x4(,%edi,4),%eax
80100d00: 89 d9 mov %ebx,%ecx
ustack[3+argc] = 0;
80100d02: c7 84 bd 64 ff ff ff movl $0x0,-0x9c(%ebp,%edi,4)
80100d09: 00 00 00 00
ustack[2] = sp - (argc+1)*4; // argv pointer
80100d0d: 29 c1 sub %eax,%ecx
sp -= (3+argc+1) * 4;
80100d0f: 83 c0 0c add $0xc,%eax
ustack[1] = argc;
80100d12: 89 bd 5c ff ff ff mov %edi,-0xa4(%ebp)
sp -= (3+argc+1) * 4;
80100d18: 29 c3 sub %eax,%ebx
if(copyout(pgdir, sp, ustack, (3+argc+1)*4) < 0)
80100d1a: 50 push %eax
80100d1b: 52 push %edx
80100d1c: 53 push %ebx
80100d1d: ff b5 f4 fe ff ff pushl -0x10c(%ebp)
ustack[0] = 0xffffffff; // fake return PC
80100d23: c7 85 58 ff ff ff ff movl $0xffffffff,-0xa8(%ebp)
80100d2a: ff ff ff
ustack[2] = sp - (argc+1)*4; // argv pointer
80100d2d: 89 8d 60 ff ff ff mov %ecx,-0xa0(%ebp)
if(copyout(pgdir, sp, ustack, (3+argc+1)*4) < 0)
80100d33: e8 08 6a 00 00 call 80107740 <copyout>
80100d38: 83 c4 10 add $0x10,%esp
80100d3b: 85 c0 test %eax,%eax
80100d3d: 78 99 js 80100cd8 <exec+0x258>
for(last=s=path; *s; s++)
80100d3f: 8b 45 08 mov 0x8(%ebp),%eax
80100d42: 8b 55 08 mov 0x8(%ebp),%edx
80100d45: 0f b6 00 movzbl (%eax),%eax
80100d48: 84 c0 test %al,%al
80100d4a: 74 13 je 80100d5f <exec+0x2df>
80100d4c: 89 d1 mov %edx,%ecx
80100d4e: 66 90 xchg %ax,%ax
if(*s == '/')
80100d50: 83 c1 01 add $0x1,%ecx
80100d53: 3c 2f cmp $0x2f,%al
for(last=s=path; *s; s++)
80100d55: 0f b6 01 movzbl (%ecx),%eax
if(*s == '/')
80100d58: 0f 44 d1 cmove %ecx,%edx
for(last=s=path; *s; s++)
80100d5b: 84 c0 test %al,%al
80100d5d: 75 f1 jne 80100d50 <exec+0x2d0>
safestrcpy(curproc->name, last, sizeof(curproc->name));
80100d5f: 8b bd ec fe ff ff mov -0x114(%ebp),%edi
80100d65: 83 ec 04 sub $0x4,%esp
80100d68: 6a 10 push $0x10
80100d6a: 89 f8 mov %edi,%eax
80100d6c: 52 push %edx
80100d6d: 83 c0 6c add $0x6c,%eax
80100d70: 50 push %eax
80100d71: e8 ea 40 00 00 call 80104e60 <safestrcpy>
curproc->pgdir = pgdir;
80100d76: 8b 8d f4 fe ff ff mov -0x10c(%ebp),%ecx
oldpgdir = curproc->pgdir;
80100d7c: 89 f8 mov %edi,%eax
80100d7e: 8b 7f 04 mov 0x4(%edi),%edi
curproc->sz = sz;
80100d81: 89 30 mov %esi,(%eax)
curproc->pgdir = pgdir;
80100d83: 89 48 04 mov %ecx,0x4(%eax)
curproc->tf->eip = elf.entry; // main
80100d86: 89 c1 mov %eax,%ecx
80100d88: 8b 95 3c ff ff ff mov -0xc4(%ebp),%edx
80100d8e: 8b 40 18 mov 0x18(%eax),%eax
80100d91: 89 50 38 mov %edx,0x38(%eax)
curproc->tf->esp = sp;
80100d94: 8b 41 18 mov 0x18(%ecx),%eax
80100d97: 89 58 44 mov %ebx,0x44(%eax)
switchuvm(curproc);
80100d9a: 89 0c 24 mov %ecx,(%esp)
80100d9d: e8 5e 63 00 00 call 80107100 <switchuvm>
freevm(oldpgdir);
80100da2: 89 3c 24 mov %edi,(%esp)
80100da5: e8 16 67 00 00 call 801074c0 <freevm>
return 0;
80100daa: 83 c4 10 add $0x10,%esp
80100dad: 31 c0 xor %eax,%eax
80100daf: e9 3c fd ff ff jmp 80100af0 <exec+0x70>
end_op();
80100db4: e8 e7 1f 00 00 call 80102da0 <end_op>
cprintf("exec: fail\n");
80100db9: 83 ec 0c sub $0xc,%esp
80100dbc: 68 61 78 10 80 push $0x80107861
80100dc1: e8 ea f8 ff ff call 801006b0 <cprintf>
return -1;
80100dc6: 83 c4 10 add $0x10,%esp
80100dc9: b8 ff ff ff ff mov $0xffffffff,%eax
80100dce: e9 1d fd ff ff jmp 80100af0 <exec+0x70>
for(i=0, off=elf.phoff; i<elf.phnum; i++, off+=sizeof(ph)){
80100dd3: 31 ff xor %edi,%edi
80100dd5: be 00 20 00 00 mov $0x2000,%esi
80100dda: e9 39 fe ff ff jmp 80100c18 <exec+0x198>
80100ddf: 90 nop
80100de0 <fileinit>:
struct file file[NFILE];
} ftable;
void
fileinit(void)
{
80100de0: f3 0f 1e fb endbr32
80100de4: 55 push %ebp
80100de5: 89 e5 mov %esp,%ebp
80100de7: 83 ec 10 sub $0x10,%esp
initlock(&ftable.lock, "ftable");
80100dea: 68 6d 78 10 80 push $0x8010786d
80100def: 68 c0 0f 11 80 push $0x80110fc0
80100df4: e8 17 3c 00 00 call 80104a10 <initlock>
}
80100df9: 83 c4 10 add $0x10,%esp
80100dfc: c9 leave
80100dfd: c3 ret
80100dfe: 66 90 xchg %ax,%ax
80100e00 <filealloc>:
// Allocate a file structure.
struct file*
filealloc(void)
{
80100e00: f3 0f 1e fb endbr32
80100e04: 55 push %ebp
80100e05: 89 e5 mov %esp,%ebp
80100e07: 53 push %ebx
struct file *f;
acquire(&ftable.lock);
for(f = ftable.file; f < ftable.file + NFILE; f++){
80100e08: bb f4 0f 11 80 mov $0x80110ff4,%ebx
{
80100e0d: 83 ec 10 sub $0x10,%esp
acquire(&ftable.lock);
80100e10: 68 c0 0f 11 80 push $0x80110fc0
80100e15: e8 76 3d 00 00 call 80104b90 <acquire>
80100e1a: 83 c4 10 add $0x10,%esp
80100e1d: eb 0c jmp 80100e2b <filealloc+0x2b>
80100e1f: 90 nop
for(f = ftable.file; f < ftable.file + NFILE; f++){
80100e20: 83 c3 18 add $0x18,%ebx
80100e23: 81 fb 54 19 11 80 cmp $0x80111954,%ebx
80100e29: 74 25 je 80100e50 <filealloc+0x50>
if(f->ref == 0){
80100e2b: 8b 43 04 mov 0x4(%ebx),%eax
80100e2e: 85 c0 test %eax,%eax
80100e30: 75 ee jne 80100e20 <filealloc+0x20>
f->ref = 1;
release(&ftable.lock);
80100e32: 83 ec 0c sub $0xc,%esp
f->ref = 1;
80100e35: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx)
release(&ftable.lock);
80100e3c: 68 c0 0f 11 80 push $0x80110fc0
80100e41: e8 0a 3e 00 00 call 80104c50 <release>
return f;
}
}
release(&ftable.lock);
return 0;
}
80100e46: 89 d8 mov %ebx,%eax
return f;
80100e48: 83 c4 10 add $0x10,%esp
}
80100e4b: 8b 5d fc mov -0x4(%ebp),%ebx
80100e4e: c9 leave
80100e4f: c3 ret
release(&ftable.lock);
80100e50: 83 ec 0c sub $0xc,%esp
return 0;
80100e53: 31 db xor %ebx,%ebx
release(&ftable.lock);
80100e55: 68 c0 0f 11 80 push $0x80110fc0
80100e5a: e8 f1 3d 00 00 call 80104c50 <release>
}
80100e5f: 89 d8 mov %ebx,%eax
return 0;
80100e61: 83 c4 10 add $0x10,%esp
}
80100e64: 8b 5d fc mov -0x4(%ebp),%ebx
80100e67: c9 leave
80100e68: c3 ret
80100e69: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80100e70 <filedup>:
// Increment ref count for file f.
struct file*
filedup(struct file *f)
{
80100e70: f3 0f 1e fb endbr32
80100e74: 55 push %ebp
80100e75: 89 e5 mov %esp,%ebp
80100e77: 53 push %ebx
80100e78: 83 ec 10 sub $0x10,%esp
80100e7b: 8b 5d 08 mov 0x8(%ebp),%ebx
acquire(&ftable.lock);
80100e7e: 68 c0 0f 11 80 push $0x80110fc0
80100e83: e8 08 3d 00 00 call 80104b90 <acquire>
if(f->ref < 1)
80100e88: 8b 43 04 mov 0x4(%ebx),%eax
80100e8b: 83 c4 10 add $0x10,%esp
80100e8e: 85 c0 test %eax,%eax
80100e90: 7e 1a jle 80100eac <filedup+0x3c>
panic("filedup");
f->ref++;
80100e92: 83 c0 01 add $0x1,%eax
release(&ftable.lock);
80100e95: 83 ec 0c sub $0xc,%esp
f->ref++;
80100e98: 89 43 04 mov %eax,0x4(%ebx)
release(&ftable.lock);
80100e9b: 68 c0 0f 11 80 push $0x80110fc0
80100ea0: e8 ab 3d 00 00 call 80104c50 <release>
return f;
}
80100ea5: 89 d8 mov %ebx,%eax
80100ea7: 8b 5d fc mov -0x4(%ebp),%ebx
80100eaa: c9 leave
80100eab: c3 ret
panic("filedup");
80100eac: 83 ec 0c sub $0xc,%esp
80100eaf: 68 74 78 10 80 push $0x80107874
80100eb4: e8 d7 f4 ff ff call 80100390 <panic>
80100eb9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80100ec0 <fileclose>:
// Close file f. (Decrement ref count, close when reaches 0.)
void
fileclose(struct file *f)
{
80100ec0: f3 0f 1e fb endbr32
80100ec4: 55 push %ebp
80100ec5: 89 e5 mov %esp,%ebp
80100ec7: 57 push %edi
80100ec8: 56 push %esi
80100ec9: 53 push %ebx
80100eca: 83 ec 28 sub $0x28,%esp
80100ecd: 8b 5d 08 mov 0x8(%ebp),%ebx
struct file ff;
acquire(&ftable.lock);
80100ed0: 68 c0 0f 11 80 push $0x80110fc0
80100ed5: e8 b6 3c 00 00 call 80104b90 <acquire>
if(f->ref < 1)
80100eda: 8b 53 04 mov 0x4(%ebx),%edx
80100edd: 83 c4 10 add $0x10,%esp
80100ee0: 85 d2 test %edx,%edx
80100ee2: 0f 8e a1 00 00 00 jle 80100f89 <fileclose+0xc9>
panic("fileclose");
if(--f->ref > 0){
80100ee8: 83 ea 01 sub $0x1,%edx
80100eeb: 89 53 04 mov %edx,0x4(%ebx)
80100eee: 75 40 jne 80100f30 <fileclose+0x70>
release(&ftable.lock);
return;
}
ff = *f;
80100ef0: 0f b6 43 09 movzbl 0x9(%ebx),%eax
f->ref = 0;
f->type = FD_NONE;
release(&ftable.lock);
80100ef4: 83 ec 0c sub $0xc,%esp
ff = *f;
80100ef7: 8b 3b mov (%ebx),%edi
f->type = FD_NONE;
80100ef9: c7 03 00 00 00 00 movl $0x0,(%ebx)
ff = *f;
80100eff: 8b 73 0c mov 0xc(%ebx),%esi
80100f02: 88 45 e7 mov %al,-0x19(%ebp)
80100f05: 8b 43 10 mov 0x10(%ebx),%eax
release(&ftable.lock);
80100f08: 68 c0 0f 11 80 push $0x80110fc0
ff = *f;
80100f0d: 89 45 e0 mov %eax,-0x20(%ebp)
release(&ftable.lock);
80100f10: e8 3b 3d 00 00 call 80104c50 <release>
if(ff.type == FD_PIPE)
80100f15: 83 c4 10 add $0x10,%esp
80100f18: 83 ff 01 cmp $0x1,%edi
80100f1b: 74 53 je 80100f70 <fileclose+0xb0>
pipeclose(ff.pipe, ff.writable);
else if(ff.type == FD_INODE){
80100f1d: 83 ff 02 cmp $0x2,%edi
80100f20: 74 26 je 80100f48 <fileclose+0x88>
begin_op();
iput(ff.ip);
end_op();
}
}
80100f22: 8d 65 f4 lea -0xc(%ebp),%esp
80100f25: 5b pop %ebx
80100f26: 5e pop %esi
80100f27: 5f pop %edi
80100f28: 5d pop %ebp
80100f29: c3 ret
80100f2a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
release(&ftable.lock);
80100f30: c7 45 08 c0 0f 11 80 movl $0x80110fc0,0x8(%ebp)
}
80100f37: 8d 65 f4 lea -0xc(%ebp),%esp
80100f3a: 5b pop %ebx
80100f3b: 5e pop %esi
80100f3c: 5f pop %edi
80100f3d: 5d pop %ebp
release(&ftable.lock);
80100f3e: e9 0d 3d 00 00 jmp 80104c50 <release>
80100f43: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80100f47: 90 nop
begin_op();
80100f48: e8 e3 1d 00 00 call 80102d30 <begin_op>
iput(ff.ip);
80100f4d: 83 ec 0c sub $0xc,%esp
80100f50: ff 75 e0 pushl -0x20(%ebp)
80100f53: e8 38 09 00 00 call 80101890 <iput>
end_op();
80100f58: 83 c4 10 add $0x10,%esp
}
80100f5b: 8d 65 f4 lea -0xc(%ebp),%esp
80100f5e: 5b pop %ebx
80100f5f: 5e pop %esi
80100f60: 5f pop %edi
80100f61: 5d pop %ebp
end_op();
80100f62: e9 39 1e 00 00 jmp 80102da0 <end_op>
80100f67: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80100f6e: 66 90 xchg %ax,%ax
pipeclose(ff.pipe, ff.writable);
80100f70: 0f be 5d e7 movsbl -0x19(%ebp),%ebx
80100f74: 83 ec 08 sub $0x8,%esp
80100f77: 53 push %ebx
80100f78: 56 push %esi
80100f79: e8 82 25 00 00 call 80103500 <pipeclose>
80100f7e: 83 c4 10 add $0x10,%esp
}
80100f81: 8d 65 f4 lea -0xc(%ebp),%esp
80100f84: 5b pop %ebx
80100f85: 5e pop %esi
80100f86: 5f pop %edi
80100f87: 5d pop %ebp
80100f88: c3 ret
panic("fileclose");
80100f89: 83 ec 0c sub $0xc,%esp
80100f8c: 68 7c 78 10 80 push $0x8010787c
80100f91: e8 fa f3 ff ff call 80100390 <panic>
80100f96: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80100f9d: 8d 76 00 lea 0x0(%esi),%esi
80100fa0 <filestat>:
// Get metadata about file f.
int
filestat(struct file *f, struct stat *st)
{
80100fa0: f3 0f 1e fb endbr32
80100fa4: 55 push %ebp
80100fa5: 89 e5 mov %esp,%ebp
80100fa7: 53 push %ebx
80100fa8: 83 ec 04 sub $0x4,%esp
80100fab: 8b 5d 08 mov 0x8(%ebp),%ebx
if(f->type == FD_INODE){
80100fae: 83 3b 02 cmpl $0x2,(%ebx)
80100fb1: 75 2d jne 80100fe0 <filestat+0x40>
ilock(f->ip);
80100fb3: 83 ec 0c sub $0xc,%esp
80100fb6: ff 73 10 pushl 0x10(%ebx)
80100fb9: e8 a2 07 00 00 call 80101760 <ilock>
stati(f->ip, st);
80100fbe: 58 pop %eax
80100fbf: 5a pop %edx
80100fc0: ff 75 0c pushl 0xc(%ebp)
80100fc3: ff 73 10 pushl 0x10(%ebx)
80100fc6: e8 65 0a 00 00 call 80101a30 <stati>
iunlock(f->ip);
80100fcb: 59 pop %ecx
80100fcc: ff 73 10 pushl 0x10(%ebx)
80100fcf: e8 6c 08 00 00 call 80101840 <iunlock>
return 0;
}
return -1;
}
80100fd4: 8b 5d fc mov -0x4(%ebp),%ebx
return 0;
80100fd7: 83 c4 10 add $0x10,%esp
80100fda: 31 c0 xor %eax,%eax
}
80100fdc: c9 leave
80100fdd: c3 ret
80100fde: 66 90 xchg %ax,%ax
80100fe0: 8b 5d fc mov -0x4(%ebp),%ebx
return -1;
80100fe3: b8 ff ff ff ff mov $0xffffffff,%eax
}
80100fe8: c9 leave
80100fe9: c3 ret
80100fea: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80100ff0 <fileread>:
// Read from file f.
int
fileread(struct file *f, char *addr, int n)
{
80100ff0: f3 0f 1e fb endbr32
80100ff4: 55 push %ebp
80100ff5: 89 e5 mov %esp,%ebp
80100ff7: 57 push %edi
80100ff8: 56 push %esi
80100ff9: 53 push %ebx
80100ffa: 83 ec 0c sub $0xc,%esp
80100ffd: 8b 5d 08 mov 0x8(%ebp),%ebx
80101000: 8b 75 0c mov 0xc(%ebp),%esi
80101003: 8b 7d 10 mov 0x10(%ebp),%edi
int r;
if(f->readable == 0)
80101006: 80 7b 08 00 cmpb $0x0,0x8(%ebx)
8010100a: 74 64 je 80101070 <fileread+0x80>
return -1;
if(f->type == FD_PIPE)
8010100c: 8b 03 mov (%ebx),%eax
8010100e: 83 f8 01 cmp $0x1,%eax
80101011: 74 45 je 80101058 <fileread+0x68>
return piperead(f->pipe, addr, n);
if(f->type == FD_INODE){
80101013: 83 f8 02 cmp $0x2,%eax
80101016: 75 5f jne 80101077 <fileread+0x87>
ilock(f->ip);
80101018: 83 ec 0c sub $0xc,%esp
8010101b: ff 73 10 pushl 0x10(%ebx)
8010101e: e8 3d 07 00 00 call 80101760 <ilock>
if((r = readi(f->ip, addr, f->off, n)) > 0)
80101023: 57 push %edi
80101024: ff 73 14 pushl 0x14(%ebx)
80101027: 56 push %esi
80101028: ff 73 10 pushl 0x10(%ebx)
8010102b: e8 30 0a 00 00 call 80101a60 <readi>
80101030: 83 c4 20 add $0x20,%esp
80101033: 89 c6 mov %eax,%esi
80101035: 85 c0 test %eax,%eax
80101037: 7e 03 jle 8010103c <fileread+0x4c>
f->off += r;
80101039: 01 43 14 add %eax,0x14(%ebx)
iunlock(f->ip);
8010103c: 83 ec 0c sub $0xc,%esp
8010103f: ff 73 10 pushl 0x10(%ebx)
80101042: e8 f9 07 00 00 call 80101840 <iunlock>
return r;
80101047: 83 c4 10 add $0x10,%esp
}
panic("fileread");
}
8010104a: 8d 65 f4 lea -0xc(%ebp),%esp
8010104d: 89 f0 mov %esi,%eax
8010104f: 5b pop %ebx
80101050: 5e pop %esi
80101051: 5f pop %edi
80101052: 5d pop %ebp
80101053: c3 ret
80101054: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
return piperead(f->pipe, addr, n);
80101058: 8b 43 0c mov 0xc(%ebx),%eax
8010105b: 89 45 08 mov %eax,0x8(%ebp)
}
8010105e: 8d 65 f4 lea -0xc(%ebp),%esp
80101061: 5b pop %ebx
80101062: 5e pop %esi
80101063: 5f pop %edi
80101064: 5d pop %ebp
return piperead(f->pipe, addr, n);
80101065: e9 36 26 00 00 jmp 801036a0 <piperead>
8010106a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
return -1;
80101070: be ff ff ff ff mov $0xffffffff,%esi
80101075: eb d3 jmp 8010104a <fileread+0x5a>
panic("fileread");
80101077: 83 ec 0c sub $0xc,%esp
8010107a: 68 86 78 10 80 push $0x80107886
8010107f: e8 0c f3 ff ff call 80100390 <panic>
80101084: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010108b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
8010108f: 90 nop
80101090 <filewrite>:
//PAGEBREAK!
// Write to file f.
int
filewrite(struct file *f, char *addr, int n)
{
80101090: f3 0f 1e fb endbr32
80101094: 55 push %ebp
80101095: 89 e5 mov %esp,%ebp
80101097: 57 push %edi
80101098: 56 push %esi
80101099: 53 push %ebx
8010109a: 83 ec 1c sub $0x1c,%esp
8010109d: 8b 45 0c mov 0xc(%ebp),%eax
801010a0: 8b 75 08 mov 0x8(%ebp),%esi
801010a3: 89 45 dc mov %eax,-0x24(%ebp)
801010a6: 8b 45 10 mov 0x10(%ebp),%eax
int r;
if(f->writable == 0)
801010a9: 80 7e 09 00 cmpb $0x0,0x9(%esi)
{
801010ad: 89 45 e4 mov %eax,-0x1c(%ebp)
if(f->writable == 0)
801010b0: 0f 84 c1 00 00 00 je 80101177 <filewrite+0xe7>
return -1;
if(f->type == FD_PIPE)
801010b6: 8b 06 mov (%esi),%eax
801010b8: 83 f8 01 cmp $0x1,%eax
801010bb: 0f 84 c3 00 00 00 je 80101184 <filewrite+0xf4>
return pipewrite(f->pipe, addr, n);
if(f->type == FD_INODE){
801010c1: 83 f8 02 cmp $0x2,%eax
801010c4: 0f 85 cc 00 00 00 jne 80101196 <filewrite+0x106>
// and 2 blocks of slop for non-aligned writes.
// this really belongs lower down, since writei()
// might be writing a device like the console.
int max = ((MAXOPBLOCKS-1-1-2) / 2) * 512;
int i = 0;
while(i < n){
801010ca: 8b 45 e4 mov -0x1c(%ebp),%eax
int i = 0;
801010cd: 31 ff xor %edi,%edi
while(i < n){
801010cf: 85 c0 test %eax,%eax
801010d1: 7f 34 jg 80101107 <filewrite+0x77>
801010d3: e9 98 00 00 00 jmp 80101170 <filewrite+0xe0>
801010d8: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801010df: 90 nop
n1 = max;
begin_op();
ilock(f->ip);
if ((r = writei(f->ip, addr + i, f->off, n1)) > 0)
f->off += r;
801010e0: 01 46 14 add %eax,0x14(%esi)
iunlock(f->ip);
801010e3: 83 ec 0c sub $0xc,%esp
801010e6: ff 76 10 pushl 0x10(%esi)
f->off += r;
801010e9: 89 45 e0 mov %eax,-0x20(%ebp)
iunlock(f->ip);
801010ec: e8 4f 07 00 00 call 80101840 <iunlock>
end_op();
801010f1: e8 aa 1c 00 00 call 80102da0 <end_op>
if(r < 0)
break;
if(r != n1)
801010f6: 8b 45 e0 mov -0x20(%ebp),%eax
801010f9: 83 c4 10 add $0x10,%esp
801010fc: 39 c3 cmp %eax,%ebx
801010fe: 75 60 jne 80101160 <filewrite+0xd0>
panic("short filewrite");
i += r;
80101100: 01 df add %ebx,%edi
while(i < n){
80101102: 39 7d e4 cmp %edi,-0x1c(%ebp)
80101105: 7e 69 jle 80101170 <filewrite+0xe0>
int n1 = n - i;
80101107: 8b 5d e4 mov -0x1c(%ebp),%ebx
8010110a: b8 00 06 00 00 mov $0x600,%eax
8010110f: 29 fb sub %edi,%ebx
if(n1 > max)
80101111: 81 fb 00 06 00 00 cmp $0x600,%ebx
80101117: 0f 4f d8 cmovg %eax,%ebx
begin_op();
8010111a: e8 11 1c 00 00 call 80102d30 <begin_op>
ilock(f->ip);
8010111f: 83 ec 0c sub $0xc,%esp
80101122: ff 76 10 pushl 0x10(%esi)
80101125: e8 36 06 00 00 call 80101760 <ilock>
if ((r = writei(f->ip, addr + i, f->off, n1)) > 0)
8010112a: 8b 45 dc mov -0x24(%ebp),%eax
8010112d: 53 push %ebx
8010112e: ff 76 14 pushl 0x14(%esi)
80101131: 01 f8 add %edi,%eax
80101133: 50 push %eax
80101134: ff 76 10 pushl 0x10(%esi)
80101137: e8 24 0a 00 00 call 80101b60 <writei>
8010113c: 83 c4 20 add $0x20,%esp
8010113f: 85 c0 test %eax,%eax
80101141: 7f 9d jg 801010e0 <filewrite+0x50>
iunlock(f->ip);
80101143: 83 ec 0c sub $0xc,%esp
80101146: ff 76 10 pushl 0x10(%esi)
80101149: 89 45 e4 mov %eax,-0x1c(%ebp)
8010114c: e8 ef 06 00 00 call 80101840 <iunlock>
end_op();
80101151: e8 4a 1c 00 00 call 80102da0 <end_op>
if(r < 0)
80101156: 8b 45 e4 mov -0x1c(%ebp),%eax
80101159: 83 c4 10 add $0x10,%esp
8010115c: 85 c0 test %eax,%eax
8010115e: 75 17 jne 80101177 <filewrite+0xe7>
panic("short filewrite");
80101160: 83 ec 0c sub $0xc,%esp
80101163: 68 8f 78 10 80 push $0x8010788f
80101168: e8 23 f2 ff ff call 80100390 <panic>
8010116d: 8d 76 00 lea 0x0(%esi),%esi
}
return i == n ? n : -1;
80101170: 89 f8 mov %edi,%eax
80101172: 3b 7d e4 cmp -0x1c(%ebp),%edi
80101175: 74 05 je 8010117c <filewrite+0xec>
80101177: b8 ff ff ff ff mov $0xffffffff,%eax
}
panic("filewrite");
}
8010117c: 8d 65 f4 lea -0xc(%ebp),%esp
8010117f: 5b pop %ebx
80101180: 5e pop %esi
80101181: 5f pop %edi
80101182: 5d pop %ebp
80101183: c3 ret
return pipewrite(f->pipe, addr, n);
80101184: 8b 46 0c mov 0xc(%esi),%eax
80101187: 89 45 08 mov %eax,0x8(%ebp)
}
8010118a: 8d 65 f4 lea -0xc(%ebp),%esp
8010118d: 5b pop %ebx
8010118e: 5e pop %esi
8010118f: 5f pop %edi
80101190: 5d pop %ebp
return pipewrite(f->pipe, addr, n);
80101191: e9 0a 24 00 00 jmp 801035a0 <pipewrite>
panic("filewrite");
80101196: 83 ec 0c sub $0xc,%esp
80101199: 68 95 78 10 80 push $0x80107895
8010119e: e8 ed f1 ff ff call 80100390 <panic>
801011a3: 66 90 xchg %ax,%ax
801011a5: 66 90 xchg %ax,%ax
801011a7: 66 90 xchg %ax,%ax
801011a9: 66 90 xchg %ax,%ax
801011ab: 66 90 xchg %ax,%ax
801011ad: 66 90 xchg %ax,%ax
801011af: 90 nop
801011b0 <bfree>:
}
// Free a disk block.
static void
bfree(int dev, uint b)
{
801011b0: 55 push %ebp
801011b1: 89 c1 mov %eax,%ecx
struct buf *bp;
int bi, m;
bp = bread(dev, BBLOCK(b, sb));
801011b3: 89 d0 mov %edx,%eax
801011b5: c1 e8 0c shr $0xc,%eax
801011b8: 03 05 d8 19 11 80 add 0x801119d8,%eax
{
801011be: 89 e5 mov %esp,%ebp
801011c0: 56 push %esi
801011c1: 53 push %ebx
801011c2: 89 d3 mov %edx,%ebx
bp = bread(dev, BBLOCK(b, sb));
801011c4: 83 ec 08 sub $0x8,%esp
801011c7: 50 push %eax
801011c8: 51 push %ecx
801011c9: e8 02 ef ff ff call 801000d0 <bread>
bi = b % BPB;
m = 1 << (bi % 8);
801011ce: 89 d9 mov %ebx,%ecx
if((bp->data[bi/8] & m) == 0)
801011d0: c1 fb 03 sar $0x3,%ebx
m = 1 << (bi % 8);
801011d3: ba 01 00 00 00 mov $0x1,%edx
801011d8: 83 e1 07 and $0x7,%ecx
if((bp->data[bi/8] & m) == 0)
801011db: 81 e3 ff 01 00 00 and $0x1ff,%ebx
801011e1: 83 c4 10 add $0x10,%esp
m = 1 << (bi % 8);
801011e4: d3 e2 shl %cl,%edx
if((bp->data[bi/8] & m) == 0)
801011e6: 0f b6 4c 18 5c movzbl 0x5c(%eax,%ebx,1),%ecx
801011eb: 85 d1 test %edx,%ecx
801011ed: 74 25 je 80101214 <bfree+0x64>
panic("freeing free block");
bp->data[bi/8] &= ~m;
801011ef: f7 d2 not %edx
log_write(bp);
801011f1: 83 ec 0c sub $0xc,%esp
801011f4: 89 c6 mov %eax,%esi
bp->data[bi/8] &= ~m;
801011f6: 21 ca and %ecx,%edx
801011f8: 88 54 18 5c mov %dl,0x5c(%eax,%ebx,1)
log_write(bp);
801011fc: 50 push %eax
801011fd: e8 0e 1d 00 00 call 80102f10 <log_write>
brelse(bp);
80101202: 89 34 24 mov %esi,(%esp)
80101205: e8 e6 ef ff ff call 801001f0 <brelse>
}
8010120a: 83 c4 10 add $0x10,%esp
8010120d: 8d 65 f8 lea -0x8(%ebp),%esp
80101210: 5b pop %ebx
80101211: 5e pop %esi
80101212: 5d pop %ebp
80101213: c3 ret
panic("freeing free block");
80101214: 83 ec 0c sub $0xc,%esp
80101217: 68 9f 78 10 80 push $0x8010789f
8010121c: e8 6f f1 ff ff call 80100390 <panic>
80101221: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80101228: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010122f: 90 nop
80101230 <balloc>:
{
80101230: 55 push %ebp
80101231: 89 e5 mov %esp,%ebp
80101233: 57 push %edi
80101234: 56 push %esi
80101235: 53 push %ebx
80101236: 83 ec 1c sub $0x1c,%esp
for(b = 0; b < sb.size; b += BPB){
80101239: 8b 0d c0 19 11 80 mov 0x801119c0,%ecx
{
8010123f: 89 45 d8 mov %eax,-0x28(%ebp)
for(b = 0; b < sb.size; b += BPB){
80101242: 85 c9 test %ecx,%ecx
80101244: 0f 84 87 00 00 00 je 801012d1 <balloc+0xa1>
8010124a: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp)
bp = bread(dev, BBLOCK(b, sb));
80101251: 8b 75 dc mov -0x24(%ebp),%esi
80101254: 83 ec 08 sub $0x8,%esp
80101257: 89 f0 mov %esi,%eax
80101259: c1 f8 0c sar $0xc,%eax
8010125c: 03 05 d8 19 11 80 add 0x801119d8,%eax
80101262: 50 push %eax
80101263: ff 75 d8 pushl -0x28(%ebp)
80101266: e8 65 ee ff ff call 801000d0 <bread>
8010126b: 83 c4 10 add $0x10,%esp
8010126e: 89 45 e4 mov %eax,-0x1c(%ebp)
for(bi = 0; bi < BPB && b + bi < sb.size; bi++){
80101271: a1 c0 19 11 80 mov 0x801119c0,%eax
80101276: 89 45 e0 mov %eax,-0x20(%ebp)
80101279: 31 c0 xor %eax,%eax
8010127b: eb 2f jmp 801012ac <balloc+0x7c>
8010127d: 8d 76 00 lea 0x0(%esi),%esi
m = 1 << (bi % 8);
80101280: 89 c1 mov %eax,%ecx
80101282: bb 01 00 00 00 mov $0x1,%ebx
if((bp->data[bi/8] & m) == 0){ // Is block free?
80101287: 8b 55 e4 mov -0x1c(%ebp),%edx
m = 1 << (bi % 8);
8010128a: 83 e1 07 and $0x7,%ecx
8010128d: d3 e3 shl %cl,%ebx
if((bp->data[bi/8] & m) == 0){ // Is block free?
8010128f: 89 c1 mov %eax,%ecx
80101291: c1 f9 03 sar $0x3,%ecx
80101294: 0f b6 7c 0a 5c movzbl 0x5c(%edx,%ecx,1),%edi
80101299: 89 fa mov %edi,%edx
8010129b: 85 df test %ebx,%edi
8010129d: 74 41 je 801012e0 <balloc+0xb0>
for(bi = 0; bi < BPB && b + bi < sb.size; bi++){
8010129f: 83 c0 01 add $0x1,%eax
801012a2: 83 c6 01 add $0x1,%esi
801012a5: 3d 00 10 00 00 cmp $0x1000,%eax
801012aa: 74 05 je 801012b1 <balloc+0x81>
801012ac: 39 75 e0 cmp %esi,-0x20(%ebp)
801012af: 77 cf ja 80101280 <balloc+0x50>
brelse(bp);
801012b1: 83 ec 0c sub $0xc,%esp
801012b4: ff 75 e4 pushl -0x1c(%ebp)
801012b7: e8 34 ef ff ff call 801001f0 <brelse>
for(b = 0; b < sb.size; b += BPB){
801012bc: 81 45 dc 00 10 00 00 addl $0x1000,-0x24(%ebp)
801012c3: 83 c4 10 add $0x10,%esp
801012c6: 8b 45 dc mov -0x24(%ebp),%eax
801012c9: 39 05 c0 19 11 80 cmp %eax,0x801119c0
801012cf: 77 80 ja 80101251 <balloc+0x21>
panic("balloc: out of blocks");
801012d1: 83 ec 0c sub $0xc,%esp
801012d4: 68 b2 78 10 80 push $0x801078b2
801012d9: e8 b2 f0 ff ff call 80100390 <panic>
801012de: 66 90 xchg %ax,%ax
bp->data[bi/8] |= m; // Mark block in use.
801012e0: 8b 7d e4 mov -0x1c(%ebp),%edi
log_write(bp);
801012e3: 83 ec 0c sub $0xc,%esp
bp->data[bi/8] |= m; // Mark block in use.
801012e6: 09 da or %ebx,%edx
801012e8: 88 54 0f 5c mov %dl,0x5c(%edi,%ecx,1)
log_write(bp);
801012ec: 57 push %edi
801012ed: e8 1e 1c 00 00 call 80102f10 <log_write>
brelse(bp);
801012f2: 89 3c 24 mov %edi,(%esp)
801012f5: e8 f6 ee ff ff call 801001f0 <brelse>
bp = bread(dev, bno);
801012fa: 58 pop %eax
801012fb: 5a pop %edx
801012fc: 56 push %esi
801012fd: ff 75 d8 pushl -0x28(%ebp)
80101300: e8 cb ed ff ff call 801000d0 <bread>
memset(bp->data, 0, BSIZE);
80101305: 83 c4 0c add $0xc,%esp
bp = bread(dev, bno);
80101308: 89 c3 mov %eax,%ebx
memset(bp->data, 0, BSIZE);
8010130a: 8d 40 5c lea 0x5c(%eax),%eax
8010130d: 68 00 02 00 00 push $0x200
80101312: 6a 00 push $0x0
80101314: 50 push %eax
80101315: e8 86 39 00 00 call 80104ca0 <memset>
log_write(bp);
8010131a: 89 1c 24 mov %ebx,(%esp)
8010131d: e8 ee 1b 00 00 call 80102f10 <log_write>
brelse(bp);
80101322: 89 1c 24 mov %ebx,(%esp)
80101325: e8 c6 ee ff ff call 801001f0 <brelse>
}
8010132a: 8d 65 f4 lea -0xc(%ebp),%esp
8010132d: 89 f0 mov %esi,%eax
8010132f: 5b pop %ebx
80101330: 5e pop %esi
80101331: 5f pop %edi
80101332: 5d pop %ebp
80101333: c3 ret
80101334: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010133b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
8010133f: 90 nop
80101340 <iget>:
// Find the inode with number inum on device dev
// and return the in-memory copy. Does not lock
// the inode and does not read it from disk.
static struct inode*
iget(uint dev, uint inum)
{
80101340: 55 push %ebp
80101341: 89 e5 mov %esp,%ebp
80101343: 57 push %edi
80101344: 89 c7 mov %eax,%edi
80101346: 56 push %esi
struct inode *ip, *empty;
acquire(&icache.lock);
// Is the inode already cached?
empty = 0;
80101347: 31 f6 xor %esi,%esi
{
80101349: 53 push %ebx
for(ip = &icache.inode[0]; ip < &icache.inode[NINODE]; ip++){
8010134a: bb 14 1a 11 80 mov $0x80111a14,%ebx
{
8010134f: 83 ec 28 sub $0x28,%esp
80101352: 89 55 e4 mov %edx,-0x1c(%ebp)
acquire(&icache.lock);
80101355: 68 e0 19 11 80 push $0x801119e0
8010135a: e8 31 38 00 00 call 80104b90 <acquire>
for(ip = &icache.inode[0]; ip < &icache.inode[NINODE]; ip++){
8010135f: 8b 55 e4 mov -0x1c(%ebp),%edx
acquire(&icache.lock);
80101362: 83 c4 10 add $0x10,%esp
80101365: eb 1b jmp 80101382 <iget+0x42>
80101367: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010136e: 66 90 xchg %ax,%ax
if(ip->ref > 0 && ip->dev == dev && ip->inum == inum){
80101370: 39 3b cmp %edi,(%ebx)
80101372: 74 6c je 801013e0 <iget+0xa0>
80101374: 81 c3 90 00 00 00 add $0x90,%ebx
for(ip = &icache.inode[0]; ip < &icache.inode[NINODE]; ip++){
8010137a: 81 fb 34 36 11 80 cmp $0x80113634,%ebx
80101380: 73 26 jae 801013a8 <iget+0x68>
if(ip->ref > 0 && ip->dev == dev && ip->inum == inum){
80101382: 8b 4b 08 mov 0x8(%ebx),%ecx
80101385: 85 c9 test %ecx,%ecx
80101387: 7f e7 jg 80101370 <iget+0x30>
ip->ref++;
release(&icache.lock);
return ip;
}
if(empty == 0 && ip->ref == 0) // Remember empty slot.
80101389: 85 f6 test %esi,%esi
8010138b: 75 e7 jne 80101374 <iget+0x34>
8010138d: 89 d8 mov %ebx,%eax
8010138f: 81 c3 90 00 00 00 add $0x90,%ebx
80101395: 85 c9 test %ecx,%ecx
80101397: 75 6e jne 80101407 <iget+0xc7>
80101399: 89 c6 mov %eax,%esi
for(ip = &icache.inode[0]; ip < &icache.inode[NINODE]; ip++){
8010139b: 81 fb 34 36 11 80 cmp $0x80113634,%ebx
801013a1: 72 df jb 80101382 <iget+0x42>
801013a3: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801013a7: 90 nop
empty = ip;
}
// Recycle an inode cache entry.
if(empty == 0)
801013a8: 85 f6 test %esi,%esi
801013aa: 74 73 je 8010141f <iget+0xdf>
ip = empty;
ip->dev = dev;
ip->inum = inum;
ip->ref = 1;
ip->valid = 0;
release(&icache.lock);
801013ac: 83 ec 0c sub $0xc,%esp
ip->dev = dev;
801013af: 89 3e mov %edi,(%esi)
ip->inum = inum;
801013b1: 89 56 04 mov %edx,0x4(%esi)
ip->ref = 1;
801013b4: c7 46 08 01 00 00 00 movl $0x1,0x8(%esi)
ip->valid = 0;
801013bb: c7 46 4c 00 00 00 00 movl $0x0,0x4c(%esi)
release(&icache.lock);
801013c2: 68 e0 19 11 80 push $0x801119e0
801013c7: e8 84 38 00 00 call 80104c50 <release>
return ip;
801013cc: 83 c4 10 add $0x10,%esp
}
801013cf: 8d 65 f4 lea -0xc(%ebp),%esp
801013d2: 89 f0 mov %esi,%eax
801013d4: 5b pop %ebx
801013d5: 5e pop %esi
801013d6: 5f pop %edi
801013d7: 5d pop %ebp
801013d8: c3 ret
801013d9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
if(ip->ref > 0 && ip->dev == dev && ip->inum == inum){
801013e0: 39 53 04 cmp %edx,0x4(%ebx)
801013e3: 75 8f jne 80101374 <iget+0x34>
release(&icache.lock);
801013e5: 83 ec 0c sub $0xc,%esp
ip->ref++;
801013e8: 83 c1 01 add $0x1,%ecx
return ip;
801013eb: 89 de mov %ebx,%esi
release(&icache.lock);
801013ed: 68 e0 19 11 80 push $0x801119e0
ip->ref++;
801013f2: 89 4b 08 mov %ecx,0x8(%ebx)
release(&icache.lock);
801013f5: e8 56 38 00 00 call 80104c50 <release>
return ip;
801013fa: 83 c4 10 add $0x10,%esp
}
801013fd: 8d 65 f4 lea -0xc(%ebp),%esp
80101400: 89 f0 mov %esi,%eax
80101402: 5b pop %ebx
80101403: 5e pop %esi
80101404: 5f pop %edi
80101405: 5d pop %ebp
80101406: c3 ret
for(ip = &icache.inode[0]; ip < &icache.inode[NINODE]; ip++){
80101407: 81 fb 34 36 11 80 cmp $0x80113634,%ebx
8010140d: 73 10 jae 8010141f <iget+0xdf>
if(ip->ref > 0 && ip->dev == dev && ip->inum == inum){
8010140f: 8b 4b 08 mov 0x8(%ebx),%ecx
80101412: 85 c9 test %ecx,%ecx
80101414: 0f 8f 56 ff ff ff jg 80101370 <iget+0x30>
8010141a: e9 6e ff ff ff jmp 8010138d <iget+0x4d>
panic("iget: no inodes");
8010141f: 83 ec 0c sub $0xc,%esp
80101422: 68 c8 78 10 80 push $0x801078c8
80101427: e8 64 ef ff ff call 80100390 <panic>
8010142c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80101430 <bmap>:
// Return the disk block address of the nth block in inode ip.
// If there is no such block, bmap allocates one.
static uint
bmap(struct inode *ip, uint bn)
{
80101430: 55 push %ebp
80101431: 89 e5 mov %esp,%ebp
80101433: 57 push %edi
80101434: 56 push %esi
80101435: 89 c6 mov %eax,%esi
80101437: 53 push %ebx
80101438: 83 ec 1c sub $0x1c,%esp
uint addr, *a;
struct buf *bp;
if(bn < NDIRECT){
8010143b: 83 fa 0b cmp $0xb,%edx
8010143e: 0f 86 84 00 00 00 jbe 801014c8 <bmap+0x98>
if((addr = ip->addrs[bn]) == 0)
ip->addrs[bn] = addr = balloc(ip->dev);
return addr;
}
bn -= NDIRECT;
80101444: 8d 5a f4 lea -0xc(%edx),%ebx
if(bn < NINDIRECT){
80101447: 83 fb 7f cmp $0x7f,%ebx
8010144a: 0f 87 98 00 00 00 ja 801014e8 <bmap+0xb8>
// Load indirect block, allocating if necessary.
if((addr = ip->addrs[NDIRECT]) == 0)
80101450: 8b 80 8c 00 00 00 mov 0x8c(%eax),%eax
80101456: 8b 16 mov (%esi),%edx
80101458: 85 c0 test %eax,%eax
8010145a: 74 54 je 801014b0 <bmap+0x80>
ip->addrs[NDIRECT] = addr = balloc(ip->dev);
bp = bread(ip->dev, addr);
8010145c: 83 ec 08 sub $0x8,%esp
8010145f: 50 push %eax
80101460: 52 push %edx
80101461: e8 6a ec ff ff call 801000d0 <bread>
a = (uint*)bp->data;
if((addr = a[bn]) == 0){
80101466: 83 c4 10 add $0x10,%esp
80101469: 8d 54 98 5c lea 0x5c(%eax,%ebx,4),%edx
bp = bread(ip->dev, addr);
8010146d: 89 c7 mov %eax,%edi
if((addr = a[bn]) == 0){
8010146f: 8b 1a mov (%edx),%ebx
80101471: 85 db test %ebx,%ebx
80101473: 74 1b je 80101490 <bmap+0x60>
a[bn] = addr = balloc(ip->dev);
log_write(bp);
}
brelse(bp);
80101475: 83 ec 0c sub $0xc,%esp
80101478: 57 push %edi
80101479: e8 72 ed ff ff call 801001f0 <brelse>
return addr;
8010147e: 83 c4 10 add $0x10,%esp
}
panic("bmap: out of range");
}
80101481: 8d 65 f4 lea -0xc(%ebp),%esp
80101484: 89 d8 mov %ebx,%eax
80101486: 5b pop %ebx
80101487: 5e pop %esi
80101488: 5f pop %edi
80101489: 5d pop %ebp
8010148a: c3 ret
8010148b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
8010148f: 90 nop
a[bn] = addr = balloc(ip->dev);
80101490: 8b 06 mov (%esi),%eax
80101492: 89 55 e4 mov %edx,-0x1c(%ebp)
80101495: e8 96 fd ff ff call 80101230 <balloc>
8010149a: 8b 55 e4 mov -0x1c(%ebp),%edx
log_write(bp);
8010149d: 83 ec 0c sub $0xc,%esp
a[bn] = addr = balloc(ip->dev);
801014a0: 89 c3 mov %eax,%ebx
801014a2: 89 02 mov %eax,(%edx)
log_write(bp);
801014a4: 57 push %edi
801014a5: e8 66 1a 00 00 call 80102f10 <log_write>
801014aa: 83 c4 10 add $0x10,%esp
801014ad: eb c6 jmp 80101475 <bmap+0x45>
801014af: 90 nop
ip->addrs[NDIRECT] = addr = balloc(ip->dev);
801014b0: 89 d0 mov %edx,%eax
801014b2: e8 79 fd ff ff call 80101230 <balloc>
801014b7: 8b 16 mov (%esi),%edx
801014b9: 89 86 8c 00 00 00 mov %eax,0x8c(%esi)
801014bf: eb 9b jmp 8010145c <bmap+0x2c>
801014c1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
if((addr = ip->addrs[bn]) == 0)
801014c8: 8d 3c 90 lea (%eax,%edx,4),%edi
801014cb: 8b 5f 5c mov 0x5c(%edi),%ebx
801014ce: 85 db test %ebx,%ebx
801014d0: 75 af jne 80101481 <bmap+0x51>
ip->addrs[bn] = addr = balloc(ip->dev);
801014d2: 8b 00 mov (%eax),%eax
801014d4: e8 57 fd ff ff call 80101230 <balloc>
801014d9: 89 47 5c mov %eax,0x5c(%edi)
801014dc: 89 c3 mov %eax,%ebx
}
801014de: 8d 65 f4 lea -0xc(%ebp),%esp
801014e1: 89 d8 mov %ebx,%eax
801014e3: 5b pop %ebx
801014e4: 5e pop %esi
801014e5: 5f pop %edi
801014e6: 5d pop %ebp
801014e7: c3 ret
panic("bmap: out of range");
801014e8: 83 ec 0c sub $0xc,%esp
801014eb: 68 d8 78 10 80 push $0x801078d8
801014f0: e8 9b ee ff ff call 80100390 <panic>
801014f5: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801014fc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80101500 <readsb>:
{
80101500: f3 0f 1e fb endbr32
80101504: 55 push %ebp
80101505: 89 e5 mov %esp,%ebp
80101507: 56 push %esi
80101508: 53 push %ebx
80101509: 8b 75 0c mov 0xc(%ebp),%esi
bp = bread(dev, 1);
8010150c: 83 ec 08 sub $0x8,%esp
8010150f: 6a 01 push $0x1
80101511: ff 75 08 pushl 0x8(%ebp)
80101514: e8 b7 eb ff ff call 801000d0 <bread>
memmove(sb, bp->data, sizeof(*sb));
80101519: 83 c4 0c add $0xc,%esp
bp = bread(dev, 1);
8010151c: 89 c3 mov %eax,%ebx
memmove(sb, bp->data, sizeof(*sb));
8010151e: 8d 40 5c lea 0x5c(%eax),%eax
80101521: 6a 1c push $0x1c
80101523: 50 push %eax
80101524: 56 push %esi
80101525: e8 16 38 00 00 call 80104d40 <memmove>
brelse(bp);
8010152a: 89 5d 08 mov %ebx,0x8(%ebp)
8010152d: 83 c4 10 add $0x10,%esp
}
80101530: 8d 65 f8 lea -0x8(%ebp),%esp
80101533: 5b pop %ebx
80101534: 5e pop %esi
80101535: 5d pop %ebp
brelse(bp);
80101536: e9 b5 ec ff ff jmp 801001f0 <brelse>
8010153b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
8010153f: 90 nop
80101540 <iinit>:
{
80101540: f3 0f 1e fb endbr32
80101544: 55 push %ebp
80101545: 89 e5 mov %esp,%ebp
80101547: 53 push %ebx
80101548: bb 20 1a 11 80 mov $0x80111a20,%ebx
8010154d: 83 ec 0c sub $0xc,%esp
initlock(&icache.lock, "icache");
80101550: 68 eb 78 10 80 push $0x801078eb
80101555: 68 e0 19 11 80 push $0x801119e0
8010155a: e8 b1 34 00 00 call 80104a10 <initlock>
for(i = 0; i < NINODE; i++) {
8010155f: 83 c4 10 add $0x10,%esp
80101562: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
initsleeplock(&icache.inode[i].lock, "inode");
80101568: 83 ec 08 sub $0x8,%esp
8010156b: 68 f2 78 10 80 push $0x801078f2
80101570: 53 push %ebx
80101571: 81 c3 90 00 00 00 add $0x90,%ebx
80101577: e8 54 33 00 00 call 801048d0 <initsleeplock>
for(i = 0; i < NINODE; i++) {
8010157c: 83 c4 10 add $0x10,%esp
8010157f: 81 fb 40 36 11 80 cmp $0x80113640,%ebx
80101585: 75 e1 jne 80101568 <iinit+0x28>
readsb(dev, &sb);
80101587: 83 ec 08 sub $0x8,%esp
8010158a: 68 c0 19 11 80 push $0x801119c0
8010158f: ff 75 08 pushl 0x8(%ebp)
80101592: e8 69 ff ff ff call 80101500 <readsb>
cprintf("sb: size %d nblocks %d ninodes %d nlog %d logstart %d\
80101597: ff 35 d8 19 11 80 pushl 0x801119d8
8010159d: ff 35 d4 19 11 80 pushl 0x801119d4
801015a3: ff 35 d0 19 11 80 pushl 0x801119d0
801015a9: ff 35 cc 19 11 80 pushl 0x801119cc
801015af: ff 35 c8 19 11 80 pushl 0x801119c8
801015b5: ff 35 c4 19 11 80 pushl 0x801119c4
801015bb: ff 35 c0 19 11 80 pushl 0x801119c0
801015c1: 68 58 79 10 80 push $0x80107958
801015c6: e8 e5 f0 ff ff call 801006b0 <cprintf>
}
801015cb: 8b 5d fc mov -0x4(%ebp),%ebx
801015ce: 83 c4 30 add $0x30,%esp
801015d1: c9 leave
801015d2: c3 ret
801015d3: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801015da: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801015e0 <ialloc>:
{
801015e0: f3 0f 1e fb endbr32
801015e4: 55 push %ebp
801015e5: 89 e5 mov %esp,%ebp
801015e7: 57 push %edi
801015e8: 56 push %esi
801015e9: 53 push %ebx
801015ea: 83 ec 1c sub $0x1c,%esp
801015ed: 8b 45 0c mov 0xc(%ebp),%eax
for(inum = 1; inum < sb.ninodes; inum++){
801015f0: 83 3d c8 19 11 80 01 cmpl $0x1,0x801119c8
{
801015f7: 8b 75 08 mov 0x8(%ebp),%esi
801015fa: 89 45 e4 mov %eax,-0x1c(%ebp)
for(inum = 1; inum < sb.ninodes; inum++){
801015fd: 0f 86 8d 00 00 00 jbe 80101690 <ialloc+0xb0>
80101603: bf 01 00 00 00 mov $0x1,%edi
80101608: eb 1d jmp 80101627 <ialloc+0x47>
8010160a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
brelse(bp);
80101610: 83 ec 0c sub $0xc,%esp
for(inum = 1; inum < sb.ninodes; inum++){
80101613: 83 c7 01 add $0x1,%edi
brelse(bp);
80101616: 53 push %ebx
80101617: e8 d4 eb ff ff call 801001f0 <brelse>
for(inum = 1; inum < sb.ninodes; inum++){
8010161c: 83 c4 10 add $0x10,%esp
8010161f: 3b 3d c8 19 11 80 cmp 0x801119c8,%edi
80101625: 73 69 jae 80101690 <ialloc+0xb0>
bp = bread(dev, IBLOCK(inum, sb));
80101627: 89 f8 mov %edi,%eax
80101629: 83 ec 08 sub $0x8,%esp
8010162c: c1 e8 03 shr $0x3,%eax
8010162f: 03 05 d4 19 11 80 add 0x801119d4,%eax
80101635: 50 push %eax
80101636: 56 push %esi
80101637: e8 94 ea ff ff call 801000d0 <bread>
if(dip->type == 0){ // a free inode
8010163c: 83 c4 10 add $0x10,%esp
bp = bread(dev, IBLOCK(inum, sb));
8010163f: 89 c3 mov %eax,%ebx
dip = (struct dinode*)bp->data + inum%IPB;
80101641: 89 f8 mov %edi,%eax
80101643: 83 e0 07 and $0x7,%eax
80101646: c1 e0 06 shl $0x6,%eax
80101649: 8d 4c 03 5c lea 0x5c(%ebx,%eax,1),%ecx
if(dip->type == 0){ // a free inode
8010164d: 66 83 39 00 cmpw $0x0,(%ecx)
80101651: 75 bd jne 80101610 <ialloc+0x30>
memset(dip, 0, sizeof(*dip));
80101653: 83 ec 04 sub $0x4,%esp
80101656: 89 4d e0 mov %ecx,-0x20(%ebp)
80101659: 6a 40 push $0x40
8010165b: 6a 00 push $0x0
8010165d: 51 push %ecx
8010165e: e8 3d 36 00 00 call 80104ca0 <memset>
dip->type = type;
80101663: 0f b7 45 e4 movzwl -0x1c(%ebp),%eax
80101667: 8b 4d e0 mov -0x20(%ebp),%ecx
8010166a: 66 89 01 mov %ax,(%ecx)
log_write(bp); // mark it allocated on the disk
8010166d: 89 1c 24 mov %ebx,(%esp)
80101670: e8 9b 18 00 00 call 80102f10 <log_write>
brelse(bp);
80101675: 89 1c 24 mov %ebx,(%esp)
80101678: e8 73 eb ff ff call 801001f0 <brelse>
return iget(dev, inum);
8010167d: 83 c4 10 add $0x10,%esp
}
80101680: 8d 65 f4 lea -0xc(%ebp),%esp
return iget(dev, inum);
80101683: 89 fa mov %edi,%edx
}
80101685: 5b pop %ebx
return iget(dev, inum);
80101686: 89 f0 mov %esi,%eax
}
80101688: 5e pop %esi
80101689: 5f pop %edi
8010168a: 5d pop %ebp
return iget(dev, inum);
8010168b: e9 b0 fc ff ff jmp 80101340 <iget>
panic("ialloc: no inodes");
80101690: 83 ec 0c sub $0xc,%esp
80101693: 68 f8 78 10 80 push $0x801078f8
80101698: e8 f3 ec ff ff call 80100390 <panic>
8010169d: 8d 76 00 lea 0x0(%esi),%esi
801016a0 <iupdate>:
{
801016a0: f3 0f 1e fb endbr32
801016a4: 55 push %ebp
801016a5: 89 e5 mov %esp,%ebp
801016a7: 56 push %esi
801016a8: 53 push %ebx
801016a9: 8b 5d 08 mov 0x8(%ebp),%ebx
bp = bread(ip->dev, IBLOCK(ip->inum, sb));
801016ac: 8b 43 04 mov 0x4(%ebx),%eax
memmove(dip->addrs, ip->addrs, sizeof(ip->addrs));
801016af: 83 c3 5c add $0x5c,%ebx
bp = bread(ip->dev, IBLOCK(ip->inum, sb));
801016b2: 83 ec 08 sub $0x8,%esp
801016b5: c1 e8 03 shr $0x3,%eax
801016b8: 03 05 d4 19 11 80 add 0x801119d4,%eax
801016be: 50 push %eax
801016bf: ff 73 a4 pushl -0x5c(%ebx)
801016c2: e8 09 ea ff ff call 801000d0 <bread>
dip->type = ip->type;
801016c7: 0f b7 53 f4 movzwl -0xc(%ebx),%edx
memmove(dip->addrs, ip->addrs, sizeof(ip->addrs));
801016cb: 83 c4 0c add $0xc,%esp
bp = bread(ip->dev, IBLOCK(ip->inum, sb));
801016ce: 89 c6 mov %eax,%esi
dip = (struct dinode*)bp->data + ip->inum%IPB;
801016d0: 8b 43 a8 mov -0x58(%ebx),%eax
801016d3: 83 e0 07 and $0x7,%eax
801016d6: c1 e0 06 shl $0x6,%eax
801016d9: 8d 44 06 5c lea 0x5c(%esi,%eax,1),%eax
dip->type = ip->type;
801016dd: 66 89 10 mov %dx,(%eax)
dip->major = ip->major;
801016e0: 0f b7 53 f6 movzwl -0xa(%ebx),%edx
memmove(dip->addrs, ip->addrs, sizeof(ip->addrs));
801016e4: 83 c0 0c add $0xc,%eax
dip->major = ip->major;
801016e7: 66 89 50 f6 mov %dx,-0xa(%eax)
dip->minor = ip->minor;
801016eb: 0f b7 53 f8 movzwl -0x8(%ebx),%edx
801016ef: 66 89 50 f8 mov %dx,-0x8(%eax)
dip->nlink = ip->nlink;
801016f3: 0f b7 53 fa movzwl -0x6(%ebx),%edx
801016f7: 66 89 50 fa mov %dx,-0x6(%eax)
dip->size = ip->size;
801016fb: 8b 53 fc mov -0x4(%ebx),%edx
801016fe: 89 50 fc mov %edx,-0x4(%eax)
memmove(dip->addrs, ip->addrs, sizeof(ip->addrs));
80101701: 6a 34 push $0x34
80101703: 53 push %ebx
80101704: 50 push %eax
80101705: e8 36 36 00 00 call 80104d40 <memmove>
log_write(bp);
8010170a: 89 34 24 mov %esi,(%esp)
8010170d: e8 fe 17 00 00 call 80102f10 <log_write>
brelse(bp);
80101712: 89 75 08 mov %esi,0x8(%ebp)
80101715: 83 c4 10 add $0x10,%esp
}
80101718: 8d 65 f8 lea -0x8(%ebp),%esp
8010171b: 5b pop %ebx
8010171c: 5e pop %esi
8010171d: 5d pop %ebp
brelse(bp);
8010171e: e9 cd ea ff ff jmp 801001f0 <brelse>
80101723: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010172a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80101730 <idup>:
{
80101730: f3 0f 1e fb endbr32
80101734: 55 push %ebp
80101735: 89 e5 mov %esp,%ebp
80101737: 53 push %ebx
80101738: 83 ec 10 sub $0x10,%esp
8010173b: 8b 5d 08 mov 0x8(%ebp),%ebx
acquire(&icache.lock);
8010173e: 68 e0 19 11 80 push $0x801119e0
80101743: e8 48 34 00 00 call 80104b90 <acquire>
ip->ref++;
80101748: 83 43 08 01 addl $0x1,0x8(%ebx)
release(&icache.lock);
8010174c: c7 04 24 e0 19 11 80 movl $0x801119e0,(%esp)
80101753: e8 f8 34 00 00 call 80104c50 <release>
}
80101758: 89 d8 mov %ebx,%eax
8010175a: 8b 5d fc mov -0x4(%ebp),%ebx
8010175d: c9 leave
8010175e: c3 ret
8010175f: 90 nop
80101760 <ilock>:
{
80101760: f3 0f 1e fb endbr32
80101764: 55 push %ebp
80101765: 89 e5 mov %esp,%ebp
80101767: 56 push %esi
80101768: 53 push %ebx
80101769: 8b 5d 08 mov 0x8(%ebp),%ebx
if(ip == 0 || ip->ref < 1)
8010176c: 85 db test %ebx,%ebx
8010176e: 0f 84 b3 00 00 00 je 80101827 <ilock+0xc7>
80101774: 8b 53 08 mov 0x8(%ebx),%edx
80101777: 85 d2 test %edx,%edx
80101779: 0f 8e a8 00 00 00 jle 80101827 <ilock+0xc7>
acquiresleep(&ip->lock);
8010177f: 83 ec 0c sub $0xc,%esp
80101782: 8d 43 0c lea 0xc(%ebx),%eax
80101785: 50 push %eax
80101786: e8 85 31 00 00 call 80104910 <acquiresleep>
if(ip->valid == 0){
8010178b: 8b 43 4c mov 0x4c(%ebx),%eax
8010178e: 83 c4 10 add $0x10,%esp
80101791: 85 c0 test %eax,%eax
80101793: 74 0b je 801017a0 <ilock+0x40>
}
80101795: 8d 65 f8 lea -0x8(%ebp),%esp
80101798: 5b pop %ebx
80101799: 5e pop %esi
8010179a: 5d pop %ebp
8010179b: c3 ret
8010179c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
bp = bread(ip->dev, IBLOCK(ip->inum, sb));
801017a0: 8b 43 04 mov 0x4(%ebx),%eax
801017a3: 83 ec 08 sub $0x8,%esp
801017a6: c1 e8 03 shr $0x3,%eax
801017a9: 03 05 d4 19 11 80 add 0x801119d4,%eax
801017af: 50 push %eax
801017b0: ff 33 pushl (%ebx)
801017b2: e8 19 e9 ff ff call 801000d0 <bread>
memmove(ip->addrs, dip->addrs, sizeof(ip->addrs));
801017b7: 83 c4 0c add $0xc,%esp
bp = bread(ip->dev, IBLOCK(ip->inum, sb));
801017ba: 89 c6 mov %eax,%esi
dip = (struct dinode*)bp->data + ip->inum%IPB;
801017bc: 8b 43 04 mov 0x4(%ebx),%eax
801017bf: 83 e0 07 and $0x7,%eax
801017c2: c1 e0 06 shl $0x6,%eax
801017c5: 8d 44 06 5c lea 0x5c(%esi,%eax,1),%eax
ip->type = dip->type;
801017c9: 0f b7 10 movzwl (%eax),%edx
memmove(ip->addrs, dip->addrs, sizeof(ip->addrs));
801017cc: 83 c0 0c add $0xc,%eax
ip->type = dip->type;
801017cf: 66 89 53 50 mov %dx,0x50(%ebx)
ip->major = dip->major;
801017d3: 0f b7 50 f6 movzwl -0xa(%eax),%edx
801017d7: 66 89 53 52 mov %dx,0x52(%ebx)
ip->minor = dip->minor;
801017db: 0f b7 50 f8 movzwl -0x8(%eax),%edx
801017df: 66 89 53 54 mov %dx,0x54(%ebx)
ip->nlink = dip->nlink;
801017e3: 0f b7 50 fa movzwl -0x6(%eax),%edx
801017e7: 66 89 53 56 mov %dx,0x56(%ebx)
ip->size = dip->size;
801017eb: 8b 50 fc mov -0x4(%eax),%edx
801017ee: 89 53 58 mov %edx,0x58(%ebx)
memmove(ip->addrs, dip->addrs, sizeof(ip->addrs));
801017f1: 6a 34 push $0x34
801017f3: 50 push %eax
801017f4: 8d 43 5c lea 0x5c(%ebx),%eax
801017f7: 50 push %eax
801017f8: e8 43 35 00 00 call 80104d40 <memmove>
brelse(bp);
801017fd: 89 34 24 mov %esi,(%esp)
80101800: e8 eb e9 ff ff call 801001f0 <brelse>
if(ip->type == 0)
80101805: 83 c4 10 add $0x10,%esp
80101808: 66 83 7b 50 00 cmpw $0x0,0x50(%ebx)
ip->valid = 1;
8010180d: c7 43 4c 01 00 00 00 movl $0x1,0x4c(%ebx)
if(ip->type == 0)
80101814: 0f 85 7b ff ff ff jne 80101795 <ilock+0x35>
panic("ilock: no type");
8010181a: 83 ec 0c sub $0xc,%esp
8010181d: 68 10 79 10 80 push $0x80107910
80101822: e8 69 eb ff ff call 80100390 <panic>
panic("ilock");
80101827: 83 ec 0c sub $0xc,%esp
8010182a: 68 0a 79 10 80 push $0x8010790a
8010182f: e8 5c eb ff ff call 80100390 <panic>
80101834: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010183b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
8010183f: 90 nop
80101840 <iunlock>:
{
80101840: f3 0f 1e fb endbr32
80101844: 55 push %ebp
80101845: 89 e5 mov %esp,%ebp
80101847: 56 push %esi
80101848: 53 push %ebx
80101849: 8b 5d 08 mov 0x8(%ebp),%ebx
if(ip == 0 || !holdingsleep(&ip->lock) || ip->ref < 1)
8010184c: 85 db test %ebx,%ebx
8010184e: 74 28 je 80101878 <iunlock+0x38>
80101850: 83 ec 0c sub $0xc,%esp
80101853: 8d 73 0c lea 0xc(%ebx),%esi
80101856: 56 push %esi
80101857: e8 54 31 00 00 call 801049b0 <holdingsleep>
8010185c: 83 c4 10 add $0x10,%esp
8010185f: 85 c0 test %eax,%eax
80101861: 74 15 je 80101878 <iunlock+0x38>
80101863: 8b 43 08 mov 0x8(%ebx),%eax
80101866: 85 c0 test %eax,%eax
80101868: 7e 0e jle 80101878 <iunlock+0x38>
releasesleep(&ip->lock);
8010186a: 89 75 08 mov %esi,0x8(%ebp)
}
8010186d: 8d 65 f8 lea -0x8(%ebp),%esp
80101870: 5b pop %ebx
80101871: 5e pop %esi
80101872: 5d pop %ebp
releasesleep(&ip->lock);
80101873: e9 f8 30 00 00 jmp 80104970 <releasesleep>
panic("iunlock");
80101878: 83 ec 0c sub $0xc,%esp
8010187b: 68 1f 79 10 80 push $0x8010791f
80101880: e8 0b eb ff ff call 80100390 <panic>
80101885: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010188c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80101890 <iput>:
{
80101890: f3 0f 1e fb endbr32
80101894: 55 push %ebp
80101895: 89 e5 mov %esp,%ebp
80101897: 57 push %edi
80101898: 56 push %esi
80101899: 53 push %ebx
8010189a: 83 ec 28 sub $0x28,%esp
8010189d: 8b 5d 08 mov 0x8(%ebp),%ebx
acquiresleep(&ip->lock);
801018a0: 8d 7b 0c lea 0xc(%ebx),%edi
801018a3: 57 push %edi
801018a4: e8 67 30 00 00 call 80104910 <acquiresleep>
if(ip->valid && ip->nlink == 0){
801018a9: 8b 53 4c mov 0x4c(%ebx),%edx
801018ac: 83 c4 10 add $0x10,%esp
801018af: 85 d2 test %edx,%edx
801018b1: 74 07 je 801018ba <iput+0x2a>
801018b3: 66 83 7b 56 00 cmpw $0x0,0x56(%ebx)
801018b8: 74 36 je 801018f0 <iput+0x60>
releasesleep(&ip->lock);
801018ba: 83 ec 0c sub $0xc,%esp
801018bd: 57 push %edi
801018be: e8 ad 30 00 00 call 80104970 <releasesleep>
acquire(&icache.lock);
801018c3: c7 04 24 e0 19 11 80 movl $0x801119e0,(%esp)
801018ca: e8 c1 32 00 00 call 80104b90 <acquire>
ip->ref--;
801018cf: 83 6b 08 01 subl $0x1,0x8(%ebx)
release(&icache.lock);
801018d3: 83 c4 10 add $0x10,%esp
801018d6: c7 45 08 e0 19 11 80 movl $0x801119e0,0x8(%ebp)
}
801018dd: 8d 65 f4 lea -0xc(%ebp),%esp
801018e0: 5b pop %ebx
801018e1: 5e pop %esi
801018e2: 5f pop %edi
801018e3: 5d pop %ebp
release(&icache.lock);
801018e4: e9 67 33 00 00 jmp 80104c50 <release>
801018e9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
acquire(&icache.lock);
801018f0: 83 ec 0c sub $0xc,%esp
801018f3: 68 e0 19 11 80 push $0x801119e0
801018f8: e8 93 32 00 00 call 80104b90 <acquire>
int r = ip->ref;
801018fd: 8b 73 08 mov 0x8(%ebx),%esi
release(&icache.lock);
80101900: c7 04 24 e0 19 11 80 movl $0x801119e0,(%esp)
80101907: e8 44 33 00 00 call 80104c50 <release>
if(r == 1){
8010190c: 83 c4 10 add $0x10,%esp
8010190f: 83 fe 01 cmp $0x1,%esi
80101912: 75 a6 jne 801018ba <iput+0x2a>
80101914: 8d 8b 8c 00 00 00 lea 0x8c(%ebx),%ecx
8010191a: 89 7d e4 mov %edi,-0x1c(%ebp)
8010191d: 8d 73 5c lea 0x5c(%ebx),%esi
80101920: 89 cf mov %ecx,%edi
80101922: eb 0b jmp 8010192f <iput+0x9f>
80101924: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
{
int i, j;
struct buf *bp;
uint *a;
for(i = 0; i < NDIRECT; i++){
80101928: 83 c6 04 add $0x4,%esi
8010192b: 39 fe cmp %edi,%esi
8010192d: 74 19 je 80101948 <iput+0xb8>
if(ip->addrs[i]){
8010192f: 8b 16 mov (%esi),%edx
80101931: 85 d2 test %edx,%edx
80101933: 74 f3 je 80101928 <iput+0x98>
bfree(ip->dev, ip->addrs[i]);
80101935: 8b 03 mov (%ebx),%eax
80101937: e8 74 f8 ff ff call 801011b0 <bfree>
ip->addrs[i] = 0;
8010193c: c7 06 00 00 00 00 movl $0x0,(%esi)
80101942: eb e4 jmp 80101928 <iput+0x98>
80101944: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
}
}
if(ip->addrs[NDIRECT]){
80101948: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax
8010194e: 8b 7d e4 mov -0x1c(%ebp),%edi
80101951: 85 c0 test %eax,%eax
80101953: 75 33 jne 80101988 <iput+0xf8>
bfree(ip->dev, ip->addrs[NDIRECT]);
ip->addrs[NDIRECT] = 0;
}
ip->size = 0;
iupdate(ip);
80101955: 83 ec 0c sub $0xc,%esp
ip->size = 0;
80101958: c7 43 58 00 00 00 00 movl $0x0,0x58(%ebx)
iupdate(ip);
8010195f: 53 push %ebx
80101960: e8 3b fd ff ff call 801016a0 <iupdate>
ip->type = 0;
80101965: 31 c0 xor %eax,%eax
80101967: 66 89 43 50 mov %ax,0x50(%ebx)
iupdate(ip);
8010196b: 89 1c 24 mov %ebx,(%esp)
8010196e: e8 2d fd ff ff call 801016a0 <iupdate>
ip->valid = 0;
80101973: c7 43 4c 00 00 00 00 movl $0x0,0x4c(%ebx)
8010197a: 83 c4 10 add $0x10,%esp
8010197d: e9 38 ff ff ff jmp 801018ba <iput+0x2a>
80101982: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
bp = bread(ip->dev, ip->addrs[NDIRECT]);
80101988: 83 ec 08 sub $0x8,%esp
8010198b: 50 push %eax
8010198c: ff 33 pushl (%ebx)
8010198e: e8 3d e7 ff ff call 801000d0 <bread>
80101993: 89 7d e0 mov %edi,-0x20(%ebp)
80101996: 83 c4 10 add $0x10,%esp
80101999: 8d 88 5c 02 00 00 lea 0x25c(%eax),%ecx
8010199f: 89 45 e4 mov %eax,-0x1c(%ebp)
for(j = 0; j < NINDIRECT; j++){
801019a2: 8d 70 5c lea 0x5c(%eax),%esi
801019a5: 89 cf mov %ecx,%edi
801019a7: eb 0e jmp 801019b7 <iput+0x127>
801019a9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801019b0: 83 c6 04 add $0x4,%esi
801019b3: 39 f7 cmp %esi,%edi
801019b5: 74 19 je 801019d0 <iput+0x140>
if(a[j])
801019b7: 8b 16 mov (%esi),%edx
801019b9: 85 d2 test %edx,%edx
801019bb: 74 f3 je 801019b0 <iput+0x120>
bfree(ip->dev, a[j]);
801019bd: 8b 03 mov (%ebx),%eax
801019bf: e8 ec f7 ff ff call 801011b0 <bfree>
801019c4: eb ea jmp 801019b0 <iput+0x120>
801019c6: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801019cd: 8d 76 00 lea 0x0(%esi),%esi
brelse(bp);
801019d0: 83 ec 0c sub $0xc,%esp
801019d3: ff 75 e4 pushl -0x1c(%ebp)
801019d6: 8b 7d e0 mov -0x20(%ebp),%edi
801019d9: e8 12 e8 ff ff call 801001f0 <brelse>
bfree(ip->dev, ip->addrs[NDIRECT]);
801019de: 8b 93 8c 00 00 00 mov 0x8c(%ebx),%edx
801019e4: 8b 03 mov (%ebx),%eax
801019e6: e8 c5 f7 ff ff call 801011b0 <bfree>
ip->addrs[NDIRECT] = 0;
801019eb: 83 c4 10 add $0x10,%esp
801019ee: c7 83 8c 00 00 00 00 movl $0x0,0x8c(%ebx)
801019f5: 00 00 00
801019f8: e9 58 ff ff ff jmp 80101955 <iput+0xc5>
801019fd: 8d 76 00 lea 0x0(%esi),%esi
80101a00 <iunlockput>:
{
80101a00: f3 0f 1e fb endbr32
80101a04: 55 push %ebp
80101a05: 89 e5 mov %esp,%ebp
80101a07: 53 push %ebx
80101a08: 83 ec 10 sub $0x10,%esp
80101a0b: 8b 5d 08 mov 0x8(%ebp),%ebx
iunlock(ip);
80101a0e: 53 push %ebx
80101a0f: e8 2c fe ff ff call 80101840 <iunlock>
iput(ip);
80101a14: 89 5d 08 mov %ebx,0x8(%ebp)
80101a17: 83 c4 10 add $0x10,%esp
}
80101a1a: 8b 5d fc mov -0x4(%ebp),%ebx
80101a1d: c9 leave
iput(ip);
80101a1e: e9 6d fe ff ff jmp 80101890 <iput>
80101a23: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80101a2a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80101a30 <stati>:
// Copy stat information from inode.
// Caller must hold ip->lock.
void
stati(struct inode *ip, struct stat *st)
{
80101a30: f3 0f 1e fb endbr32
80101a34: 55 push %ebp
80101a35: 89 e5 mov %esp,%ebp
80101a37: 8b 55 08 mov 0x8(%ebp),%edx
80101a3a: 8b 45 0c mov 0xc(%ebp),%eax
st->dev = ip->dev;
80101a3d: 8b 0a mov (%edx),%ecx
80101a3f: 89 48 04 mov %ecx,0x4(%eax)
st->ino = ip->inum;
80101a42: 8b 4a 04 mov 0x4(%edx),%ecx
80101a45: 89 48 08 mov %ecx,0x8(%eax)
st->type = ip->type;
80101a48: 0f b7 4a 50 movzwl 0x50(%edx),%ecx
80101a4c: 66 89 08 mov %cx,(%eax)
st->nlink = ip->nlink;
80101a4f: 0f b7 4a 56 movzwl 0x56(%edx),%ecx
80101a53: 66 89 48 0c mov %cx,0xc(%eax)
st->size = ip->size;
80101a57: 8b 52 58 mov 0x58(%edx),%edx
80101a5a: 89 50 10 mov %edx,0x10(%eax)
}
80101a5d: 5d pop %ebp
80101a5e: c3 ret
80101a5f: 90 nop
80101a60 <readi>:
//PAGEBREAK!
// Read data from inode.
// Caller must hold ip->lock.
int
readi(struct inode *ip, char *dst, uint off, uint n)
{
80101a60: f3 0f 1e fb endbr32
80101a64: 55 push %ebp
80101a65: 89 e5 mov %esp,%ebp
80101a67: 57 push %edi
80101a68: 56 push %esi
80101a69: 53 push %ebx
80101a6a: 83 ec 1c sub $0x1c,%esp
80101a6d: 8b 7d 0c mov 0xc(%ebp),%edi
80101a70: 8b 45 08 mov 0x8(%ebp),%eax
80101a73: 8b 75 10 mov 0x10(%ebp),%esi
80101a76: 89 7d e0 mov %edi,-0x20(%ebp)
80101a79: 8b 7d 14 mov 0x14(%ebp),%edi
uint tot, m;
struct buf *bp;
if(ip->type == T_DEV){
80101a7c: 66 83 78 50 03 cmpw $0x3,0x50(%eax)
{
80101a81: 89 45 d8 mov %eax,-0x28(%ebp)
80101a84: 89 7d e4 mov %edi,-0x1c(%ebp)
if(ip->type == T_DEV){
80101a87: 0f 84 a3 00 00 00 je 80101b30 <readi+0xd0>
if(ip->major < 0 || ip->major >= NDEV || !devsw[ip->major].read)
return -1;
return devsw[ip->major].read(ip, dst, n);
}
if(off > ip->size || off + n < off)
80101a8d: 8b 45 d8 mov -0x28(%ebp),%eax
80101a90: 8b 40 58 mov 0x58(%eax),%eax
80101a93: 39 c6 cmp %eax,%esi
80101a95: 0f 87 b6 00 00 00 ja 80101b51 <readi+0xf1>
80101a9b: 8b 5d e4 mov -0x1c(%ebp),%ebx
80101a9e: 31 c9 xor %ecx,%ecx
80101aa0: 89 da mov %ebx,%edx
80101aa2: 01 f2 add %esi,%edx
80101aa4: 0f 92 c1 setb %cl
80101aa7: 89 cf mov %ecx,%edi
80101aa9: 0f 82 a2 00 00 00 jb 80101b51 <readi+0xf1>
return -1;
if(off + n > ip->size)
n = ip->size - off;
80101aaf: 89 c1 mov %eax,%ecx
80101ab1: 29 f1 sub %esi,%ecx
80101ab3: 39 d0 cmp %edx,%eax
80101ab5: 0f 43 cb cmovae %ebx,%ecx
80101ab8: 89 4d e4 mov %ecx,-0x1c(%ebp)
for(tot=0; tot<n; tot+=m, off+=m, dst+=m){
80101abb: 85 c9 test %ecx,%ecx
80101abd: 74 63 je 80101b22 <readi+0xc2>
80101abf: 90 nop
bp = bread(ip->dev, bmap(ip, off/BSIZE));
80101ac0: 8b 5d d8 mov -0x28(%ebp),%ebx
80101ac3: 89 f2 mov %esi,%edx
80101ac5: c1 ea 09 shr $0x9,%edx
80101ac8: 89 d8 mov %ebx,%eax
80101aca: e8 61 f9 ff ff call 80101430 <bmap>
80101acf: 83 ec 08 sub $0x8,%esp
80101ad2: 50 push %eax
80101ad3: ff 33 pushl (%ebx)
80101ad5: e8 f6 e5 ff ff call 801000d0 <bread>
m = min(n - tot, BSIZE - off%BSIZE);
80101ada: 8b 5d e4 mov -0x1c(%ebp),%ebx
80101add: b9 00 02 00 00 mov $0x200,%ecx
80101ae2: 83 c4 0c add $0xc,%esp
bp = bread(ip->dev, bmap(ip, off/BSIZE));
80101ae5: 89 c2 mov %eax,%edx
m = min(n - tot, BSIZE - off%BSIZE);
80101ae7: 89 f0 mov %esi,%eax
80101ae9: 25 ff 01 00 00 and $0x1ff,%eax
80101aee: 29 fb sub %edi,%ebx
memmove(dst, bp->data + off%BSIZE, m);
80101af0: 89 55 dc mov %edx,-0x24(%ebp)
m = min(n - tot, BSIZE - off%BSIZE);
80101af3: 29 c1 sub %eax,%ecx
memmove(dst, bp->data + off%BSIZE, m);
80101af5: 8d 44 02 5c lea 0x5c(%edx,%eax,1),%eax
m = min(n - tot, BSIZE - off%BSIZE);
80101af9: 39 d9 cmp %ebx,%ecx
80101afb: 0f 46 d9 cmovbe %ecx,%ebx
memmove(dst, bp->data + off%BSIZE, m);
80101afe: 53 push %ebx
for(tot=0; tot<n; tot+=m, off+=m, dst+=m){
80101aff: 01 df add %ebx,%edi
80101b01: 01 de add %ebx,%esi
memmove(dst, bp->data + off%BSIZE, m);
80101b03: 50 push %eax
80101b04: ff 75 e0 pushl -0x20(%ebp)
80101b07: e8 34 32 00 00 call 80104d40 <memmove>
brelse(bp);
80101b0c: 8b 55 dc mov -0x24(%ebp),%edx
80101b0f: 89 14 24 mov %edx,(%esp)
80101b12: e8 d9 e6 ff ff call 801001f0 <brelse>
for(tot=0; tot<n; tot+=m, off+=m, dst+=m){
80101b17: 01 5d e0 add %ebx,-0x20(%ebp)
80101b1a: 83 c4 10 add $0x10,%esp
80101b1d: 39 7d e4 cmp %edi,-0x1c(%ebp)
80101b20: 77 9e ja 80101ac0 <readi+0x60>
}
return n;
80101b22: 8b 45 e4 mov -0x1c(%ebp),%eax
}
80101b25: 8d 65 f4 lea -0xc(%ebp),%esp
80101b28: 5b pop %ebx
80101b29: 5e pop %esi
80101b2a: 5f pop %edi
80101b2b: 5d pop %ebp
80101b2c: c3 ret
80101b2d: 8d 76 00 lea 0x0(%esi),%esi
if(ip->major < 0 || ip->major >= NDEV || !devsw[ip->major].read)
80101b30: 0f bf 40 52 movswl 0x52(%eax),%eax
80101b34: 66 83 f8 09 cmp $0x9,%ax
80101b38: 77 17 ja 80101b51 <readi+0xf1>
80101b3a: 8b 04 c5 60 19 11 80 mov -0x7feee6a0(,%eax,8),%eax
80101b41: 85 c0 test %eax,%eax
80101b43: 74 0c je 80101b51 <readi+0xf1>
return devsw[ip->major].read(ip, dst, n);
80101b45: 89 7d 10 mov %edi,0x10(%ebp)
}
80101b48: 8d 65 f4 lea -0xc(%ebp),%esp
80101b4b: 5b pop %ebx
80101b4c: 5e pop %esi
80101b4d: 5f pop %edi
80101b4e: 5d pop %ebp
return devsw[ip->major].read(ip, dst, n);
80101b4f: ff e0 jmp *%eax
return -1;
80101b51: b8 ff ff ff ff mov $0xffffffff,%eax
80101b56: eb cd jmp 80101b25 <readi+0xc5>
80101b58: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80101b5f: 90 nop
80101b60 <writei>:
// PAGEBREAK!
// Write data to inode.
// Caller must hold ip->lock.
int
writei(struct inode *ip, char *src, uint off, uint n)
{
80101b60: f3 0f 1e fb endbr32
80101b64: 55 push %ebp
80101b65: 89 e5 mov %esp,%ebp
80101b67: 57 push %edi
80101b68: 56 push %esi
80101b69: 53 push %ebx
80101b6a: 83 ec 1c sub $0x1c,%esp
80101b6d: 8b 45 08 mov 0x8(%ebp),%eax
80101b70: 8b 75 0c mov 0xc(%ebp),%esi
80101b73: 8b 7d 14 mov 0x14(%ebp),%edi
uint tot, m;
struct buf *bp;
if(ip->type == T_DEV){
80101b76: 66 83 78 50 03 cmpw $0x3,0x50(%eax)
{
80101b7b: 89 75 dc mov %esi,-0x24(%ebp)
80101b7e: 89 45 d8 mov %eax,-0x28(%ebp)
80101b81: 8b 75 10 mov 0x10(%ebp),%esi
80101b84: 89 7d e0 mov %edi,-0x20(%ebp)
if(ip->type == T_DEV){
80101b87: 0f 84 b3 00 00 00 je 80101c40 <writei+0xe0>
if(ip->major < 0 || ip->major >= NDEV || !devsw[ip->major].write)
return -1;
return devsw[ip->major].write(ip, src, n);
}
if(off > ip->size || off + n < off)
80101b8d: 8b 45 d8 mov -0x28(%ebp),%eax
80101b90: 39 70 58 cmp %esi,0x58(%eax)
80101b93: 0f 82 e3 00 00 00 jb 80101c7c <writei+0x11c>
return -1;
if(off + n > MAXFILE*BSIZE)
80101b99: 8b 7d e0 mov -0x20(%ebp),%edi
80101b9c: 89 f8 mov %edi,%eax
80101b9e: 01 f0 add %esi,%eax
80101ba0: 0f 82 d6 00 00 00 jb 80101c7c <writei+0x11c>
80101ba6: 3d 00 18 01 00 cmp $0x11800,%eax
80101bab: 0f 87 cb 00 00 00 ja 80101c7c <writei+0x11c>
return -1;
for(tot=0; tot<n; tot+=m, off+=m, src+=m){
80101bb1: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
80101bb8: 85 ff test %edi,%edi
80101bba: 74 75 je 80101c31 <writei+0xd1>
80101bbc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
bp = bread(ip->dev, bmap(ip, off/BSIZE));
80101bc0: 8b 7d d8 mov -0x28(%ebp),%edi
80101bc3: 89 f2 mov %esi,%edx
80101bc5: c1 ea 09 shr $0x9,%edx
80101bc8: 89 f8 mov %edi,%eax
80101bca: e8 61 f8 ff ff call 80101430 <bmap>
80101bcf: 83 ec 08 sub $0x8,%esp
80101bd2: 50 push %eax
80101bd3: ff 37 pushl (%edi)
80101bd5: e8 f6 e4 ff ff call 801000d0 <bread>
m = min(n - tot, BSIZE - off%BSIZE);
80101bda: b9 00 02 00 00 mov $0x200,%ecx
80101bdf: 8b 5d e0 mov -0x20(%ebp),%ebx
80101be2: 2b 5d e4 sub -0x1c(%ebp),%ebx
bp = bread(ip->dev, bmap(ip, off/BSIZE));
80101be5: 89 c7 mov %eax,%edi
m = min(n - tot, BSIZE - off%BSIZE);
80101be7: 89 f0 mov %esi,%eax
80101be9: 83 c4 0c add $0xc,%esp
80101bec: 25 ff 01 00 00 and $0x1ff,%eax
80101bf1: 29 c1 sub %eax,%ecx
memmove(bp->data + off%BSIZE, src, m);
80101bf3: 8d 44 07 5c lea 0x5c(%edi,%eax,1),%eax
m = min(n - tot, BSIZE - off%BSIZE);
80101bf7: 39 d9 cmp %ebx,%ecx
80101bf9: 0f 46 d9 cmovbe %ecx,%ebx
memmove(bp->data + off%BSIZE, src, m);
80101bfc: 53 push %ebx
for(tot=0; tot<n; tot+=m, off+=m, src+=m){
80101bfd: 01 de add %ebx,%esi
memmove(bp->data + off%BSIZE, src, m);
80101bff: ff 75 dc pushl -0x24(%ebp)
80101c02: 50 push %eax
80101c03: e8 38 31 00 00 call 80104d40 <memmove>
log_write(bp);
80101c08: 89 3c 24 mov %edi,(%esp)
80101c0b: e8 00 13 00 00 call 80102f10 <log_write>
brelse(bp);
80101c10: 89 3c 24 mov %edi,(%esp)
80101c13: e8 d8 e5 ff ff call 801001f0 <brelse>
for(tot=0; tot<n; tot+=m, off+=m, src+=m){
80101c18: 01 5d e4 add %ebx,-0x1c(%ebp)
80101c1b: 83 c4 10 add $0x10,%esp
80101c1e: 8b 45 e4 mov -0x1c(%ebp),%eax
80101c21: 01 5d dc add %ebx,-0x24(%ebp)
80101c24: 39 45 e0 cmp %eax,-0x20(%ebp)
80101c27: 77 97 ja 80101bc0 <writei+0x60>
}
if(n > 0 && off > ip->size){
80101c29: 8b 45 d8 mov -0x28(%ebp),%eax
80101c2c: 3b 70 58 cmp 0x58(%eax),%esi
80101c2f: 77 37 ja 80101c68 <writei+0x108>
ip->size = off;
iupdate(ip);
}
return n;
80101c31: 8b 45 e0 mov -0x20(%ebp),%eax
}
80101c34: 8d 65 f4 lea -0xc(%ebp),%esp
80101c37: 5b pop %ebx
80101c38: 5e pop %esi
80101c39: 5f pop %edi
80101c3a: 5d pop %ebp
80101c3b: c3 ret
80101c3c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if(ip->major < 0 || ip->major >= NDEV || !devsw[ip->major].write)
80101c40: 0f bf 40 52 movswl 0x52(%eax),%eax
80101c44: 66 83 f8 09 cmp $0x9,%ax
80101c48: 77 32 ja 80101c7c <writei+0x11c>
80101c4a: 8b 04 c5 64 19 11 80 mov -0x7feee69c(,%eax,8),%eax
80101c51: 85 c0 test %eax,%eax
80101c53: 74 27 je 80101c7c <writei+0x11c>
return devsw[ip->major].write(ip, src, n);
80101c55: 89 7d 10 mov %edi,0x10(%ebp)
}
80101c58: 8d 65 f4 lea -0xc(%ebp),%esp
80101c5b: 5b pop %ebx
80101c5c: 5e pop %esi
80101c5d: 5f pop %edi
80101c5e: 5d pop %ebp
return devsw[ip->major].write(ip, src, n);
80101c5f: ff e0 jmp *%eax
80101c61: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
ip->size = off;
80101c68: 8b 45 d8 mov -0x28(%ebp),%eax
iupdate(ip);
80101c6b: 83 ec 0c sub $0xc,%esp
ip->size = off;
80101c6e: 89 70 58 mov %esi,0x58(%eax)
iupdate(ip);
80101c71: 50 push %eax
80101c72: e8 29 fa ff ff call 801016a0 <iupdate>
80101c77: 83 c4 10 add $0x10,%esp
80101c7a: eb b5 jmp 80101c31 <writei+0xd1>
return -1;
80101c7c: b8 ff ff ff ff mov $0xffffffff,%eax
80101c81: eb b1 jmp 80101c34 <writei+0xd4>
80101c83: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80101c8a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80101c90 <namecmp>:
//PAGEBREAK!
// Directories
int
namecmp(const char *s, const char *t)
{
80101c90: f3 0f 1e fb endbr32
80101c94: 55 push %ebp
80101c95: 89 e5 mov %esp,%ebp
80101c97: 83 ec 0c sub $0xc,%esp
return strncmp(s, t, DIRSIZ);
80101c9a: 6a 0e push $0xe
80101c9c: ff 75 0c pushl 0xc(%ebp)
80101c9f: ff 75 08 pushl 0x8(%ebp)
80101ca2: e8 09 31 00 00 call 80104db0 <strncmp>
}
80101ca7: c9 leave
80101ca8: c3 ret
80101ca9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80101cb0 <dirlookup>:
// Look for a directory entry in a directory.
// If found, set *poff to byte offset of entry.
struct inode*
dirlookup(struct inode *dp, char *name, uint *poff)
{
80101cb0: f3 0f 1e fb endbr32
80101cb4: 55 push %ebp
80101cb5: 89 e5 mov %esp,%ebp
80101cb7: 57 push %edi
80101cb8: 56 push %esi
80101cb9: 53 push %ebx
80101cba: 83 ec 1c sub $0x1c,%esp
80101cbd: 8b 5d 08 mov 0x8(%ebp),%ebx
uint off, inum;
struct dirent de;
if(dp->type != T_DIR)
80101cc0: 66 83 7b 50 01 cmpw $0x1,0x50(%ebx)
80101cc5: 0f 85 89 00 00 00 jne 80101d54 <dirlookup+0xa4>
panic("dirlookup not DIR");
for(off = 0; off < dp->size; off += sizeof(de)){
80101ccb: 8b 53 58 mov 0x58(%ebx),%edx
80101cce: 31 ff xor %edi,%edi
80101cd0: 8d 75 d8 lea -0x28(%ebp),%esi
80101cd3: 85 d2 test %edx,%edx
80101cd5: 74 42 je 80101d19 <dirlookup+0x69>
80101cd7: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80101cde: 66 90 xchg %ax,%ax
if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
80101ce0: 6a 10 push $0x10
80101ce2: 57 push %edi
80101ce3: 56 push %esi
80101ce4: 53 push %ebx
80101ce5: e8 76 fd ff ff call 80101a60 <readi>
80101cea: 83 c4 10 add $0x10,%esp
80101ced: 83 f8 10 cmp $0x10,%eax
80101cf0: 75 55 jne 80101d47 <dirlookup+0x97>
panic("dirlookup read");
if(de.inum == 0)
80101cf2: 66 83 7d d8 00 cmpw $0x0,-0x28(%ebp)
80101cf7: 74 18 je 80101d11 <dirlookup+0x61>
return strncmp(s, t, DIRSIZ);
80101cf9: 83 ec 04 sub $0x4,%esp
80101cfc: 8d 45 da lea -0x26(%ebp),%eax
80101cff: 6a 0e push $0xe
80101d01: 50 push %eax
80101d02: ff 75 0c pushl 0xc(%ebp)
80101d05: e8 a6 30 00 00 call 80104db0 <strncmp>
continue;
if(namecmp(name, de.name) == 0){
80101d0a: 83 c4 10 add $0x10,%esp
80101d0d: 85 c0 test %eax,%eax
80101d0f: 74 17 je 80101d28 <dirlookup+0x78>
for(off = 0; off < dp->size; off += sizeof(de)){
80101d11: 83 c7 10 add $0x10,%edi
80101d14: 3b 7b 58 cmp 0x58(%ebx),%edi
80101d17: 72 c7 jb 80101ce0 <dirlookup+0x30>
return iget(dp->dev, inum);
}
}
return 0;
}
80101d19: 8d 65 f4 lea -0xc(%ebp),%esp
return 0;
80101d1c: 31 c0 xor %eax,%eax
}
80101d1e: 5b pop %ebx
80101d1f: 5e pop %esi
80101d20: 5f pop %edi
80101d21: 5d pop %ebp
80101d22: c3 ret
80101d23: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80101d27: 90 nop
if(poff)
80101d28: 8b 45 10 mov 0x10(%ebp),%eax
80101d2b: 85 c0 test %eax,%eax
80101d2d: 74 05 je 80101d34 <dirlookup+0x84>
*poff = off;
80101d2f: 8b 45 10 mov 0x10(%ebp),%eax
80101d32: 89 38 mov %edi,(%eax)
inum = de.inum;
80101d34: 0f b7 55 d8 movzwl -0x28(%ebp),%edx
return iget(dp->dev, inum);
80101d38: 8b 03 mov (%ebx),%eax
80101d3a: e8 01 f6 ff ff call 80101340 <iget>
}
80101d3f: 8d 65 f4 lea -0xc(%ebp),%esp
80101d42: 5b pop %ebx
80101d43: 5e pop %esi
80101d44: 5f pop %edi
80101d45: 5d pop %ebp
80101d46: c3 ret
panic("dirlookup read");
80101d47: 83 ec 0c sub $0xc,%esp
80101d4a: 68 39 79 10 80 push $0x80107939
80101d4f: e8 3c e6 ff ff call 80100390 <panic>
panic("dirlookup not DIR");
80101d54: 83 ec 0c sub $0xc,%esp
80101d57: 68 27 79 10 80 push $0x80107927
80101d5c: e8 2f e6 ff ff call 80100390 <panic>
80101d61: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80101d68: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80101d6f: 90 nop
80101d70 <namex>:
// If parent != 0, return the inode for the parent and copy the final
// path element into name, which must have room for DIRSIZ bytes.
// Must be called inside a transaction since it calls iput().
static struct inode*
namex(char *path, int nameiparent, char *name)
{
80101d70: 55 push %ebp
80101d71: 89 e5 mov %esp,%ebp
80101d73: 57 push %edi
80101d74: 56 push %esi
80101d75: 53 push %ebx
80101d76: 89 c3 mov %eax,%ebx
80101d78: 83 ec 1c sub $0x1c,%esp
struct inode *ip, *next;
if(*path == '/')
80101d7b: 80 38 2f cmpb $0x2f,(%eax)
{
80101d7e: 89 55 e0 mov %edx,-0x20(%ebp)
80101d81: 89 4d e4 mov %ecx,-0x1c(%ebp)
if(*path == '/')
80101d84: 0f 84 86 01 00 00 je 80101f10 <namex+0x1a0>
ip = iget(ROOTDEV, ROOTINO);
else
ip = idup(myproc()->cwd);
80101d8a: e8 d1 1c 00 00 call 80103a60 <myproc>
acquire(&icache.lock);
80101d8f: 83 ec 0c sub $0xc,%esp
80101d92: 89 df mov %ebx,%edi
ip = idup(myproc()->cwd);
80101d94: 8b 70 68 mov 0x68(%eax),%esi
acquire(&icache.lock);
80101d97: 68 e0 19 11 80 push $0x801119e0
80101d9c: e8 ef 2d 00 00 call 80104b90 <acquire>
ip->ref++;
80101da1: 83 46 08 01 addl $0x1,0x8(%esi)
release(&icache.lock);
80101da5: c7 04 24 e0 19 11 80 movl $0x801119e0,(%esp)
80101dac: e8 9f 2e 00 00 call 80104c50 <release>
80101db1: 83 c4 10 add $0x10,%esp
80101db4: eb 0d jmp 80101dc3 <namex+0x53>
80101db6: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80101dbd: 8d 76 00 lea 0x0(%esi),%esi
path++;
80101dc0: 83 c7 01 add $0x1,%edi
while(*path == '/')
80101dc3: 0f b6 07 movzbl (%edi),%eax
80101dc6: 3c 2f cmp $0x2f,%al
80101dc8: 74 f6 je 80101dc0 <namex+0x50>
if(*path == 0)
80101dca: 84 c0 test %al,%al
80101dcc: 0f 84 ee 00 00 00 je 80101ec0 <namex+0x150>
while(*path != '/' && *path != 0)
80101dd2: 0f b6 07 movzbl (%edi),%eax
80101dd5: 84 c0 test %al,%al
80101dd7: 0f 84 fb 00 00 00 je 80101ed8 <namex+0x168>
80101ddd: 89 fb mov %edi,%ebx
80101ddf: 3c 2f cmp $0x2f,%al
80101de1: 0f 84 f1 00 00 00 je 80101ed8 <namex+0x168>
80101de7: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80101dee: 66 90 xchg %ax,%ax
80101df0: 0f b6 43 01 movzbl 0x1(%ebx),%eax
path++;
80101df4: 83 c3 01 add $0x1,%ebx
while(*path != '/' && *path != 0)
80101df7: 3c 2f cmp $0x2f,%al
80101df9: 74 04 je 80101dff <namex+0x8f>
80101dfb: 84 c0 test %al,%al
80101dfd: 75 f1 jne 80101df0 <namex+0x80>
len = path - s;
80101dff: 89 d8 mov %ebx,%eax
80101e01: 29 f8 sub %edi,%eax
if(len >= DIRSIZ)
80101e03: 83 f8 0d cmp $0xd,%eax
80101e06: 0f 8e 84 00 00 00 jle 80101e90 <namex+0x120>
memmove(name, s, DIRSIZ);
80101e0c: 83 ec 04 sub $0x4,%esp
80101e0f: 6a 0e push $0xe
80101e11: 57 push %edi
path++;
80101e12: 89 df mov %ebx,%edi
memmove(name, s, DIRSIZ);
80101e14: ff 75 e4 pushl -0x1c(%ebp)
80101e17: e8 24 2f 00 00 call 80104d40 <memmove>
80101e1c: 83 c4 10 add $0x10,%esp
while(*path == '/')
80101e1f: 80 3b 2f cmpb $0x2f,(%ebx)
80101e22: 75 0c jne 80101e30 <namex+0xc0>
80101e24: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
path++;
80101e28: 83 c7 01 add $0x1,%edi
while(*path == '/')
80101e2b: 80 3f 2f cmpb $0x2f,(%edi)
80101e2e: 74 f8 je 80101e28 <namex+0xb8>
while((path = skipelem(path, name)) != 0){
ilock(ip);
80101e30: 83 ec 0c sub $0xc,%esp
80101e33: 56 push %esi
80101e34: e8 27 f9 ff ff call 80101760 <ilock>
if(ip->type != T_DIR){
80101e39: 83 c4 10 add $0x10,%esp
80101e3c: 66 83 7e 50 01 cmpw $0x1,0x50(%esi)
80101e41: 0f 85 a1 00 00 00 jne 80101ee8 <namex+0x178>
iunlockput(ip);
return 0;
}
if(nameiparent && *path == '\0'){
80101e47: 8b 55 e0 mov -0x20(%ebp),%edx
80101e4a: 85 d2 test %edx,%edx
80101e4c: 74 09 je 80101e57 <namex+0xe7>
80101e4e: 80 3f 00 cmpb $0x0,(%edi)
80101e51: 0f 84 d9 00 00 00 je 80101f30 <namex+0x1c0>
// Stop one level early.
iunlock(ip);
return ip;
}
if((next = dirlookup(ip, name, 0)) == 0){
80101e57: 83 ec 04 sub $0x4,%esp
80101e5a: 6a 00 push $0x0
80101e5c: ff 75 e4 pushl -0x1c(%ebp)
80101e5f: 56 push %esi
80101e60: e8 4b fe ff ff call 80101cb0 <dirlookup>
80101e65: 83 c4 10 add $0x10,%esp
80101e68: 89 c3 mov %eax,%ebx
80101e6a: 85 c0 test %eax,%eax
80101e6c: 74 7a je 80101ee8 <namex+0x178>
iunlock(ip);
80101e6e: 83 ec 0c sub $0xc,%esp
80101e71: 56 push %esi
80101e72: e8 c9 f9 ff ff call 80101840 <iunlock>
iput(ip);
80101e77: 89 34 24 mov %esi,(%esp)
80101e7a: 89 de mov %ebx,%esi
80101e7c: e8 0f fa ff ff call 80101890 <iput>
80101e81: 83 c4 10 add $0x10,%esp
80101e84: e9 3a ff ff ff jmp 80101dc3 <namex+0x53>
80101e89: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80101e90: 8b 55 e4 mov -0x1c(%ebp),%edx
80101e93: 8d 0c 02 lea (%edx,%eax,1),%ecx
80101e96: 89 4d dc mov %ecx,-0x24(%ebp)
memmove(name, s, len);
80101e99: 83 ec 04 sub $0x4,%esp
80101e9c: 50 push %eax
80101e9d: 57 push %edi
name[len] = 0;
80101e9e: 89 df mov %ebx,%edi
memmove(name, s, len);
80101ea0: ff 75 e4 pushl -0x1c(%ebp)
80101ea3: e8 98 2e 00 00 call 80104d40 <memmove>
name[len] = 0;
80101ea8: 8b 45 dc mov -0x24(%ebp),%eax
80101eab: 83 c4 10 add $0x10,%esp
80101eae: c6 00 00 movb $0x0,(%eax)
80101eb1: e9 69 ff ff ff jmp 80101e1f <namex+0xaf>
80101eb6: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80101ebd: 8d 76 00 lea 0x0(%esi),%esi
return 0;
}
iunlockput(ip);
ip = next;
}
if(nameiparent){
80101ec0: 8b 45 e0 mov -0x20(%ebp),%eax
80101ec3: 85 c0 test %eax,%eax
80101ec5: 0f 85 85 00 00 00 jne 80101f50 <namex+0x1e0>
iput(ip);
return 0;
}
return ip;
}
80101ecb: 8d 65 f4 lea -0xc(%ebp),%esp
80101ece: 89 f0 mov %esi,%eax
80101ed0: 5b pop %ebx
80101ed1: 5e pop %esi
80101ed2: 5f pop %edi
80101ed3: 5d pop %ebp
80101ed4: c3 ret
80101ed5: 8d 76 00 lea 0x0(%esi),%esi
while(*path != '/' && *path != 0)
80101ed8: 8b 45 e4 mov -0x1c(%ebp),%eax
80101edb: 89 fb mov %edi,%ebx
80101edd: 89 45 dc mov %eax,-0x24(%ebp)
80101ee0: 31 c0 xor %eax,%eax
80101ee2: eb b5 jmp 80101e99 <namex+0x129>
80101ee4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
iunlock(ip);
80101ee8: 83 ec 0c sub $0xc,%esp
80101eeb: 56 push %esi
80101eec: e8 4f f9 ff ff call 80101840 <iunlock>
iput(ip);
80101ef1: 89 34 24 mov %esi,(%esp)
return 0;
80101ef4: 31 f6 xor %esi,%esi
iput(ip);
80101ef6: e8 95 f9 ff ff call 80101890 <iput>
return 0;
80101efb: 83 c4 10 add $0x10,%esp
}
80101efe: 8d 65 f4 lea -0xc(%ebp),%esp
80101f01: 89 f0 mov %esi,%eax
80101f03: 5b pop %ebx
80101f04: 5e pop %esi
80101f05: 5f pop %edi
80101f06: 5d pop %ebp
80101f07: c3 ret
80101f08: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80101f0f: 90 nop
ip = iget(ROOTDEV, ROOTINO);
80101f10: ba 01 00 00 00 mov $0x1,%edx
80101f15: b8 01 00 00 00 mov $0x1,%eax
80101f1a: 89 df mov %ebx,%edi
80101f1c: e8 1f f4 ff ff call 80101340 <iget>
80101f21: 89 c6 mov %eax,%esi
80101f23: e9 9b fe ff ff jmp 80101dc3 <namex+0x53>
80101f28: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80101f2f: 90 nop
iunlock(ip);
80101f30: 83 ec 0c sub $0xc,%esp
80101f33: 56 push %esi
80101f34: e8 07 f9 ff ff call 80101840 <iunlock>
return ip;
80101f39: 83 c4 10 add $0x10,%esp
}
80101f3c: 8d 65 f4 lea -0xc(%ebp),%esp
80101f3f: 89 f0 mov %esi,%eax
80101f41: 5b pop %ebx
80101f42: 5e pop %esi
80101f43: 5f pop %edi
80101f44: 5d pop %ebp
80101f45: c3 ret
80101f46: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80101f4d: 8d 76 00 lea 0x0(%esi),%esi
iput(ip);
80101f50: 83 ec 0c sub $0xc,%esp
80101f53: 56 push %esi
return 0;
80101f54: 31 f6 xor %esi,%esi
iput(ip);
80101f56: e8 35 f9 ff ff call 80101890 <iput>
return 0;
80101f5b: 83 c4 10 add $0x10,%esp
80101f5e: e9 68 ff ff ff jmp 80101ecb <namex+0x15b>
80101f63: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80101f6a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80101f70 <dirlink>:
{
80101f70: f3 0f 1e fb endbr32
80101f74: 55 push %ebp
80101f75: 89 e5 mov %esp,%ebp
80101f77: 57 push %edi
80101f78: 56 push %esi
80101f79: 53 push %ebx
80101f7a: 83 ec 20 sub $0x20,%esp
80101f7d: 8b 5d 08 mov 0x8(%ebp),%ebx
if((ip = dirlookup(dp, name, 0)) != 0){
80101f80: 6a 00 push $0x0
80101f82: ff 75 0c pushl 0xc(%ebp)
80101f85: 53 push %ebx
80101f86: e8 25 fd ff ff call 80101cb0 <dirlookup>
80101f8b: 83 c4 10 add $0x10,%esp
80101f8e: 85 c0 test %eax,%eax
80101f90: 75 6b jne 80101ffd <dirlink+0x8d>
for(off = 0; off < dp->size; off += sizeof(de)){
80101f92: 8b 7b 58 mov 0x58(%ebx),%edi
80101f95: 8d 75 d8 lea -0x28(%ebp),%esi
80101f98: 85 ff test %edi,%edi
80101f9a: 74 2d je 80101fc9 <dirlink+0x59>
80101f9c: 31 ff xor %edi,%edi
80101f9e: 8d 75 d8 lea -0x28(%ebp),%esi
80101fa1: eb 0d jmp 80101fb0 <dirlink+0x40>
80101fa3: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80101fa7: 90 nop
80101fa8: 83 c7 10 add $0x10,%edi
80101fab: 3b 7b 58 cmp 0x58(%ebx),%edi
80101fae: 73 19 jae 80101fc9 <dirlink+0x59>
if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
80101fb0: 6a 10 push $0x10
80101fb2: 57 push %edi
80101fb3: 56 push %esi
80101fb4: 53 push %ebx
80101fb5: e8 a6 fa ff ff call 80101a60 <readi>
80101fba: 83 c4 10 add $0x10,%esp
80101fbd: 83 f8 10 cmp $0x10,%eax
80101fc0: 75 4e jne 80102010 <dirlink+0xa0>
if(de.inum == 0)
80101fc2: 66 83 7d d8 00 cmpw $0x0,-0x28(%ebp)
80101fc7: 75 df jne 80101fa8 <dirlink+0x38>
strncpy(de.name, name, DIRSIZ);
80101fc9: 83 ec 04 sub $0x4,%esp
80101fcc: 8d 45 da lea -0x26(%ebp),%eax
80101fcf: 6a 0e push $0xe
80101fd1: ff 75 0c pushl 0xc(%ebp)
80101fd4: 50 push %eax
80101fd5: e8 26 2e 00 00 call 80104e00 <strncpy>
if(writei(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
80101fda: 6a 10 push $0x10
de.inum = inum;
80101fdc: 8b 45 10 mov 0x10(%ebp),%eax
if(writei(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
80101fdf: 57 push %edi
80101fe0: 56 push %esi
80101fe1: 53 push %ebx
de.inum = inum;
80101fe2: 66 89 45 d8 mov %ax,-0x28(%ebp)
if(writei(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
80101fe6: e8 75 fb ff ff call 80101b60 <writei>
80101feb: 83 c4 20 add $0x20,%esp
80101fee: 83 f8 10 cmp $0x10,%eax
80101ff1: 75 2a jne 8010201d <dirlink+0xad>
return 0;
80101ff3: 31 c0 xor %eax,%eax
}
80101ff5: 8d 65 f4 lea -0xc(%ebp),%esp
80101ff8: 5b pop %ebx
80101ff9: 5e pop %esi
80101ffa: 5f pop %edi
80101ffb: 5d pop %ebp
80101ffc: c3 ret
iput(ip);
80101ffd: 83 ec 0c sub $0xc,%esp
80102000: 50 push %eax
80102001: e8 8a f8 ff ff call 80101890 <iput>
return -1;
80102006: 83 c4 10 add $0x10,%esp
80102009: b8 ff ff ff ff mov $0xffffffff,%eax
8010200e: eb e5 jmp 80101ff5 <dirlink+0x85>
panic("dirlink read");
80102010: 83 ec 0c sub $0xc,%esp
80102013: 68 48 79 10 80 push $0x80107948
80102018: e8 73 e3 ff ff call 80100390 <panic>
panic("dirlink");
8010201d: 83 ec 0c sub $0xc,%esp
80102020: 68 4a 80 10 80 push $0x8010804a
80102025: e8 66 e3 ff ff call 80100390 <panic>
8010202a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80102030 <namei>:
struct inode*
namei(char *path)
{
80102030: f3 0f 1e fb endbr32
80102034: 55 push %ebp
char name[DIRSIZ];
return namex(path, 0, name);
80102035: 31 d2 xor %edx,%edx
{
80102037: 89 e5 mov %esp,%ebp
80102039: 83 ec 18 sub $0x18,%esp
return namex(path, 0, name);
8010203c: 8b 45 08 mov 0x8(%ebp),%eax
8010203f: 8d 4d ea lea -0x16(%ebp),%ecx
80102042: e8 29 fd ff ff call 80101d70 <namex>
}
80102047: c9 leave
80102048: c3 ret
80102049: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80102050 <nameiparent>:
struct inode*
nameiparent(char *path, char *name)
{
80102050: f3 0f 1e fb endbr32
80102054: 55 push %ebp
return namex(path, 1, name);
80102055: ba 01 00 00 00 mov $0x1,%edx
{
8010205a: 89 e5 mov %esp,%ebp
return namex(path, 1, name);
8010205c: 8b 4d 0c mov 0xc(%ebp),%ecx
8010205f: 8b 45 08 mov 0x8(%ebp),%eax
}
80102062: 5d pop %ebp
return namex(path, 1, name);
80102063: e9 08 fd ff ff jmp 80101d70 <namex>
80102068: 66 90 xchg %ax,%ax
8010206a: 66 90 xchg %ax,%ax
8010206c: 66 90 xchg %ax,%ax
8010206e: 66 90 xchg %ax,%ax
80102070 <idestart>:
}
// Start the request for b. Caller must hold idelock.
static void
idestart(struct buf *b)
{
80102070: 55 push %ebp
80102071: 89 e5 mov %esp,%ebp
80102073: 57 push %edi
80102074: 56 push %esi
80102075: 53 push %ebx
80102076: 83 ec 0c sub $0xc,%esp
if(b == 0)
80102079: 85 c0 test %eax,%eax
8010207b: 0f 84 b4 00 00 00 je 80102135 <idestart+0xc5>
panic("idestart");
if(b->blockno >= FSSIZE)
80102081: 8b 70 08 mov 0x8(%eax),%esi
80102084: 89 c3 mov %eax,%ebx
80102086: 81 fe e7 03 00 00 cmp $0x3e7,%esi
8010208c: 0f 87 96 00 00 00 ja 80102128 <idestart+0xb8>
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102092: b9 f7 01 00 00 mov $0x1f7,%ecx
80102097: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010209e: 66 90 xchg %ax,%ax
801020a0: 89 ca mov %ecx,%edx
801020a2: ec in (%dx),%al
while(((r = inb(0x1f7)) & (IDE_BSY|IDE_DRDY)) != IDE_DRDY)
801020a3: 83 e0 c0 and $0xffffffc0,%eax
801020a6: 3c 40 cmp $0x40,%al
801020a8: 75 f6 jne 801020a0 <idestart+0x30>
asm volatile("out %0,%1" : : "a" (data), "d" (port));
801020aa: 31 ff xor %edi,%edi
801020ac: ba f6 03 00 00 mov $0x3f6,%edx
801020b1: 89 f8 mov %edi,%eax
801020b3: ee out %al,(%dx)
801020b4: b8 01 00 00 00 mov $0x1,%eax
801020b9: ba f2 01 00 00 mov $0x1f2,%edx
801020be: ee out %al,(%dx)
801020bf: ba f3 01 00 00 mov $0x1f3,%edx
801020c4: 89 f0 mov %esi,%eax
801020c6: ee out %al,(%dx)
idewait(0);
outb(0x3f6, 0); // generate interrupt
outb(0x1f2, sector_per_block); // number of sectors
outb(0x1f3, sector & 0xff);
outb(0x1f4, (sector >> 8) & 0xff);
801020c7: 89 f0 mov %esi,%eax
801020c9: ba f4 01 00 00 mov $0x1f4,%edx
801020ce: c1 f8 08 sar $0x8,%eax
801020d1: ee out %al,(%dx)
801020d2: ba f5 01 00 00 mov $0x1f5,%edx
801020d7: 89 f8 mov %edi,%eax
801020d9: ee out %al,(%dx)
outb(0x1f5, (sector >> 16) & 0xff);
outb(0x1f6, 0xe0 | ((b->dev&1)<<4) | ((sector>>24)&0x0f));
801020da: 0f b6 43 04 movzbl 0x4(%ebx),%eax
801020de: ba f6 01 00 00 mov $0x1f6,%edx
801020e3: c1 e0 04 shl $0x4,%eax
801020e6: 83 e0 10 and $0x10,%eax
801020e9: 83 c8 e0 or $0xffffffe0,%eax
801020ec: ee out %al,(%dx)
if(b->flags & B_DIRTY){
801020ed: f6 03 04 testb $0x4,(%ebx)
801020f0: 75 16 jne 80102108 <idestart+0x98>
801020f2: b8 20 00 00 00 mov $0x20,%eax
801020f7: 89 ca mov %ecx,%edx
801020f9: ee out %al,(%dx)
outb(0x1f7, write_cmd);
outsl(0x1f0, b->data, BSIZE/4);
} else {
outb(0x1f7, read_cmd);
}
}
801020fa: 8d 65 f4 lea -0xc(%ebp),%esp
801020fd: 5b pop %ebx
801020fe: 5e pop %esi
801020ff: 5f pop %edi
80102100: 5d pop %ebp
80102101: c3 ret
80102102: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80102108: b8 30 00 00 00 mov $0x30,%eax
8010210d: 89 ca mov %ecx,%edx
8010210f: ee out %al,(%dx)
asm volatile("cld; rep outsl" :
80102110: b9 80 00 00 00 mov $0x80,%ecx
outsl(0x1f0, b->data, BSIZE/4);
80102115: 8d 73 5c lea 0x5c(%ebx),%esi
80102118: ba f0 01 00 00 mov $0x1f0,%edx
8010211d: fc cld
8010211e: f3 6f rep outsl %ds:(%esi),(%dx)
}
80102120: 8d 65 f4 lea -0xc(%ebp),%esp
80102123: 5b pop %ebx
80102124: 5e pop %esi
80102125: 5f pop %edi
80102126: 5d pop %ebp
80102127: c3 ret
panic("incorrect blockno");
80102128: 83 ec 0c sub $0xc,%esp
8010212b: 68 b4 79 10 80 push $0x801079b4
80102130: e8 5b e2 ff ff call 80100390 <panic>
panic("idestart");
80102135: 83 ec 0c sub $0xc,%esp
80102138: 68 ab 79 10 80 push $0x801079ab
8010213d: e8 4e e2 ff ff call 80100390 <panic>
80102142: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80102149: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80102150 <ideinit>:
{
80102150: f3 0f 1e fb endbr32
80102154: 55 push %ebp
80102155: 89 e5 mov %esp,%ebp
80102157: 83 ec 10 sub $0x10,%esp
initlock(&idelock, "ide");
8010215a: 68 c6 79 10 80 push $0x801079c6
8010215f: 68 80 b5 10 80 push $0x8010b580
80102164: e8 a7 28 00 00 call 80104a10 <initlock>
ioapicenable(IRQ_IDE, ncpu - 1);
80102169: 58 pop %eax
8010216a: a1 00 3d 11 80 mov 0x80113d00,%eax
8010216f: 5a pop %edx
80102170: 83 e8 01 sub $0x1,%eax
80102173: 50 push %eax
80102174: 6a 0e push $0xe
80102176: e8 b5 02 00 00 call 80102430 <ioapicenable>
while(((r = inb(0x1f7)) & (IDE_BSY|IDE_DRDY)) != IDE_DRDY)
8010217b: 83 c4 10 add $0x10,%esp
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
8010217e: ba f7 01 00 00 mov $0x1f7,%edx
80102183: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80102187: 90 nop
80102188: ec in (%dx),%al
80102189: 83 e0 c0 and $0xffffffc0,%eax
8010218c: 3c 40 cmp $0x40,%al
8010218e: 75 f8 jne 80102188 <ideinit+0x38>
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80102190: b8 f0 ff ff ff mov $0xfffffff0,%eax
80102195: ba f6 01 00 00 mov $0x1f6,%edx
8010219a: ee out %al,(%dx)
8010219b: b9 e8 03 00 00 mov $0x3e8,%ecx
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
801021a0: ba f7 01 00 00 mov $0x1f7,%edx
801021a5: eb 0e jmp 801021b5 <ideinit+0x65>
801021a7: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801021ae: 66 90 xchg %ax,%ax
for(i=0; i<1000; i++){
801021b0: 83 e9 01 sub $0x1,%ecx
801021b3: 74 0f je 801021c4 <ideinit+0x74>
801021b5: ec in (%dx),%al
if(inb(0x1f7) != 0){
801021b6: 84 c0 test %al,%al
801021b8: 74 f6 je 801021b0 <ideinit+0x60>
havedisk1 = 1;
801021ba: c7 05 60 b5 10 80 01 movl $0x1,0x8010b560
801021c1: 00 00 00
asm volatile("out %0,%1" : : "a" (data), "d" (port));
801021c4: b8 e0 ff ff ff mov $0xffffffe0,%eax
801021c9: ba f6 01 00 00 mov $0x1f6,%edx
801021ce: ee out %al,(%dx)
}
801021cf: c9 leave
801021d0: c3 ret
801021d1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801021d8: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801021df: 90 nop
801021e0 <ideintr>:
// Interrupt handler.
void
ideintr(void)
{
801021e0: f3 0f 1e fb endbr32
801021e4: 55 push %ebp
801021e5: 89 e5 mov %esp,%ebp
801021e7: 57 push %edi
801021e8: 56 push %esi
801021e9: 53 push %ebx
801021ea: 83 ec 18 sub $0x18,%esp
struct buf *b;
// First queued buffer is the active request.
acquire(&idelock);
801021ed: 68 80 b5 10 80 push $0x8010b580
801021f2: e8 99 29 00 00 call 80104b90 <acquire>
if((b = idequeue) == 0){
801021f7: 8b 1d 64 b5 10 80 mov 0x8010b564,%ebx
801021fd: 83 c4 10 add $0x10,%esp
80102200: 85 db test %ebx,%ebx
80102202: 74 5f je 80102263 <ideintr+0x83>
release(&idelock);
return;
}
idequeue = b->qnext;
80102204: 8b 43 58 mov 0x58(%ebx),%eax
80102207: a3 64 b5 10 80 mov %eax,0x8010b564
// Read data if needed.
if(!(b->flags & B_DIRTY) && idewait(1) >= 0)
8010220c: 8b 33 mov (%ebx),%esi
8010220e: f7 c6 04 00 00 00 test $0x4,%esi
80102214: 75 2b jne 80102241 <ideintr+0x61>
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102216: ba f7 01 00 00 mov $0x1f7,%edx
8010221b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
8010221f: 90 nop
80102220: ec in (%dx),%al
while(((r = inb(0x1f7)) & (IDE_BSY|IDE_DRDY)) != IDE_DRDY)
80102221: 89 c1 mov %eax,%ecx
80102223: 83 e1 c0 and $0xffffffc0,%ecx
80102226: 80 f9 40 cmp $0x40,%cl
80102229: 75 f5 jne 80102220 <ideintr+0x40>
if(checkerr && (r & (IDE_DF|IDE_ERR)) != 0)
8010222b: a8 21 test $0x21,%al
8010222d: 75 12 jne 80102241 <ideintr+0x61>
insl(0x1f0, b->data, BSIZE/4);
8010222f: 8d 7b 5c lea 0x5c(%ebx),%edi
asm volatile("cld; rep insl" :
80102232: b9 80 00 00 00 mov $0x80,%ecx
80102237: ba f0 01 00 00 mov $0x1f0,%edx
8010223c: fc cld
8010223d: f3 6d rep insl (%dx),%es:(%edi)
8010223f: 8b 33 mov (%ebx),%esi
// Wake process waiting for this buf.
b->flags |= B_VALID;
b->flags &= ~B_DIRTY;
80102241: 83 e6 fb and $0xfffffffb,%esi
wakeup(b);
80102244: 83 ec 0c sub $0xc,%esp
b->flags &= ~B_DIRTY;
80102247: 83 ce 02 or $0x2,%esi
8010224a: 89 33 mov %esi,(%ebx)
wakeup(b);
8010224c: 53 push %ebx
8010224d: e8 2e 22 00 00 call 80104480 <wakeup>
// Start disk on next buf in queue.
if(idequeue != 0)
80102252: a1 64 b5 10 80 mov 0x8010b564,%eax
80102257: 83 c4 10 add $0x10,%esp
8010225a: 85 c0 test %eax,%eax
8010225c: 74 05 je 80102263 <ideintr+0x83>
idestart(idequeue);
8010225e: e8 0d fe ff ff call 80102070 <idestart>
release(&idelock);
80102263: 83 ec 0c sub $0xc,%esp
80102266: 68 80 b5 10 80 push $0x8010b580
8010226b: e8 e0 29 00 00 call 80104c50 <release>
release(&idelock);
}
80102270: 8d 65 f4 lea -0xc(%ebp),%esp
80102273: 5b pop %ebx
80102274: 5e pop %esi
80102275: 5f pop %edi
80102276: 5d pop %ebp
80102277: c3 ret
80102278: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010227f: 90 nop
80102280 <iderw>:
// Sync buf with disk.
// If B_DIRTY is set, write buf to disk, clear B_DIRTY, set B_VALID.
// Else if B_VALID is not set, read buf from disk, set B_VALID.
void
iderw(struct buf *b)
{
80102280: f3 0f 1e fb endbr32
80102284: 55 push %ebp
80102285: 89 e5 mov %esp,%ebp
80102287: 53 push %ebx
80102288: 83 ec 10 sub $0x10,%esp
8010228b: 8b 5d 08 mov 0x8(%ebp),%ebx
struct buf **pp;
if(!holdingsleep(&b->lock))
8010228e: 8d 43 0c lea 0xc(%ebx),%eax
80102291: 50 push %eax
80102292: e8 19 27 00 00 call 801049b0 <holdingsleep>
80102297: 83 c4 10 add $0x10,%esp
8010229a: 85 c0 test %eax,%eax
8010229c: 0f 84 cf 00 00 00 je 80102371 <iderw+0xf1>
panic("iderw: buf not locked");
if((b->flags & (B_VALID|B_DIRTY)) == B_VALID)
801022a2: 8b 03 mov (%ebx),%eax
801022a4: 83 e0 06 and $0x6,%eax
801022a7: 83 f8 02 cmp $0x2,%eax
801022aa: 0f 84 b4 00 00 00 je 80102364 <iderw+0xe4>
panic("iderw: nothing to do");
if(b->dev != 0 && !havedisk1)
801022b0: 8b 53 04 mov 0x4(%ebx),%edx
801022b3: 85 d2 test %edx,%edx
801022b5: 74 0d je 801022c4 <iderw+0x44>
801022b7: a1 60 b5 10 80 mov 0x8010b560,%eax
801022bc: 85 c0 test %eax,%eax
801022be: 0f 84 93 00 00 00 je 80102357 <iderw+0xd7>
panic("iderw: ide disk 1 not present");
acquire(&idelock); //DOC:acquire-lock
801022c4: 83 ec 0c sub $0xc,%esp
801022c7: 68 80 b5 10 80 push $0x8010b580
801022cc: e8 bf 28 00 00 call 80104b90 <acquire>
// Append b to idequeue.
b->qnext = 0;
for(pp=&idequeue; *pp; pp=&(*pp)->qnext) //DOC:insert-queue
801022d1: a1 64 b5 10 80 mov 0x8010b564,%eax
b->qnext = 0;
801022d6: c7 43 58 00 00 00 00 movl $0x0,0x58(%ebx)
for(pp=&idequeue; *pp; pp=&(*pp)->qnext) //DOC:insert-queue
801022dd: 83 c4 10 add $0x10,%esp
801022e0: 85 c0 test %eax,%eax
801022e2: 74 6c je 80102350 <iderw+0xd0>
801022e4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801022e8: 89 c2 mov %eax,%edx
801022ea: 8b 40 58 mov 0x58(%eax),%eax
801022ed: 85 c0 test %eax,%eax
801022ef: 75 f7 jne 801022e8 <iderw+0x68>
801022f1: 83 c2 58 add $0x58,%edx
;
*pp = b;
801022f4: 89 1a mov %ebx,(%edx)
// Start disk if necessary.
if(idequeue == b)
801022f6: 39 1d 64 b5 10 80 cmp %ebx,0x8010b564
801022fc: 74 42 je 80102340 <iderw+0xc0>
idestart(b);
// Wait for request to finish.
while((b->flags & (B_VALID|B_DIRTY)) != B_VALID){
801022fe: 8b 03 mov (%ebx),%eax
80102300: 83 e0 06 and $0x6,%eax
80102303: 83 f8 02 cmp $0x2,%eax
80102306: 74 23 je 8010232b <iderw+0xab>
80102308: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010230f: 90 nop
sleep(b, &idelock);
80102310: 83 ec 08 sub $0x8,%esp
80102313: 68 80 b5 10 80 push $0x8010b580
80102318: 53 push %ebx
80102319: e8 52 1e 00 00 call 80104170 <sleep>
while((b->flags & (B_VALID|B_DIRTY)) != B_VALID){
8010231e: 8b 03 mov (%ebx),%eax
80102320: 83 c4 10 add $0x10,%esp
80102323: 83 e0 06 and $0x6,%eax
80102326: 83 f8 02 cmp $0x2,%eax
80102329: 75 e5 jne 80102310 <iderw+0x90>
}
release(&idelock);
8010232b: c7 45 08 80 b5 10 80 movl $0x8010b580,0x8(%ebp)
}
80102332: 8b 5d fc mov -0x4(%ebp),%ebx
80102335: c9 leave
release(&idelock);
80102336: e9 15 29 00 00 jmp 80104c50 <release>
8010233b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
8010233f: 90 nop
idestart(b);
80102340: 89 d8 mov %ebx,%eax
80102342: e8 29 fd ff ff call 80102070 <idestart>
80102347: eb b5 jmp 801022fe <iderw+0x7e>
80102349: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
for(pp=&idequeue; *pp; pp=&(*pp)->qnext) //DOC:insert-queue
80102350: ba 64 b5 10 80 mov $0x8010b564,%edx
80102355: eb 9d jmp 801022f4 <iderw+0x74>
panic("iderw: ide disk 1 not present");
80102357: 83 ec 0c sub $0xc,%esp
8010235a: 68 f5 79 10 80 push $0x801079f5
8010235f: e8 2c e0 ff ff call 80100390 <panic>
panic("iderw: nothing to do");
80102364: 83 ec 0c sub $0xc,%esp
80102367: 68 e0 79 10 80 push $0x801079e0
8010236c: e8 1f e0 ff ff call 80100390 <panic>
panic("iderw: buf not locked");
80102371: 83 ec 0c sub $0xc,%esp
80102374: 68 ca 79 10 80 push $0x801079ca
80102379: e8 12 e0 ff ff call 80100390 <panic>
8010237e: 66 90 xchg %ax,%ax
80102380 <ioapicinit>:
ioapic->data = data;
}
void
ioapicinit(void)
{
80102380: f3 0f 1e fb endbr32
80102384: 55 push %ebp
int i, id, maxintr;
ioapic = (volatile struct ioapic*)IOAPIC;
80102385: c7 05 34 36 11 80 00 movl $0xfec00000,0x80113634
8010238c: 00 c0 fe
{
8010238f: 89 e5 mov %esp,%ebp
80102391: 56 push %esi
80102392: 53 push %ebx
ioapic->reg = reg;
80102393: c7 05 00 00 c0 fe 01 movl $0x1,0xfec00000
8010239a: 00 00 00
return ioapic->data;
8010239d: 8b 15 34 36 11 80 mov 0x80113634,%edx
801023a3: 8b 72 10 mov 0x10(%edx),%esi
ioapic->reg = reg;
801023a6: c7 02 00 00 00 00 movl $0x0,(%edx)
return ioapic->data;
801023ac: 8b 0d 34 36 11 80 mov 0x80113634,%ecx
maxintr = (ioapicread(REG_VER) >> 16) & 0xFF;
id = ioapicread(REG_ID) >> 24;
if(id != ioapicid)
801023b2: 0f b6 15 60 37 11 80 movzbl 0x80113760,%edx
maxintr = (ioapicread(REG_VER) >> 16) & 0xFF;
801023b9: c1 ee 10 shr $0x10,%esi
801023bc: 89 f0 mov %esi,%eax
801023be: 0f b6 f0 movzbl %al,%esi
return ioapic->data;
801023c1: 8b 41 10 mov 0x10(%ecx),%eax
id = ioapicread(REG_ID) >> 24;
801023c4: c1 e8 18 shr $0x18,%eax
if(id != ioapicid)
801023c7: 39 c2 cmp %eax,%edx
801023c9: 74 16 je 801023e1 <ioapicinit+0x61>
cprintf("ioapicinit: id isn't equal to ioapicid; not a MP\n");
801023cb: 83 ec 0c sub $0xc,%esp
801023ce: 68 14 7a 10 80 push $0x80107a14
801023d3: e8 d8 e2 ff ff call 801006b0 <cprintf>
801023d8: 8b 0d 34 36 11 80 mov 0x80113634,%ecx
801023de: 83 c4 10 add $0x10,%esp
801023e1: 83 c6 21 add $0x21,%esi
{
801023e4: ba 10 00 00 00 mov $0x10,%edx
801023e9: b8 20 00 00 00 mov $0x20,%eax
801023ee: 66 90 xchg %ax,%ax
ioapic->reg = reg;
801023f0: 89 11 mov %edx,(%ecx)
// Mark all interrupts edge-triggered, active high, disabled,
// and not routed to any CPUs.
for(i = 0; i <= maxintr; i++){
ioapicwrite(REG_TABLE+2*i, INT_DISABLED | (T_IRQ0 + i));
801023f2: 89 c3 mov %eax,%ebx
ioapic->data = data;
801023f4: 8b 0d 34 36 11 80 mov 0x80113634,%ecx
801023fa: 83 c0 01 add $0x1,%eax
ioapicwrite(REG_TABLE+2*i, INT_DISABLED | (T_IRQ0 + i));
801023fd: 81 cb 00 00 01 00 or $0x10000,%ebx
ioapic->data = data;
80102403: 89 59 10 mov %ebx,0x10(%ecx)
ioapic->reg = reg;
80102406: 8d 5a 01 lea 0x1(%edx),%ebx
80102409: 83 c2 02 add $0x2,%edx
8010240c: 89 19 mov %ebx,(%ecx)
ioapic->data = data;
8010240e: 8b 0d 34 36 11 80 mov 0x80113634,%ecx
80102414: c7 41 10 00 00 00 00 movl $0x0,0x10(%ecx)
for(i = 0; i <= maxintr; i++){
8010241b: 39 f0 cmp %esi,%eax
8010241d: 75 d1 jne 801023f0 <ioapicinit+0x70>
ioapicwrite(REG_TABLE+2*i+1, 0);
}
}
8010241f: 8d 65 f8 lea -0x8(%ebp),%esp
80102422: 5b pop %ebx
80102423: 5e pop %esi
80102424: 5d pop %ebp
80102425: c3 ret
80102426: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010242d: 8d 76 00 lea 0x0(%esi),%esi
80102430 <ioapicenable>:
void
ioapicenable(int irq, int cpunum)
{
80102430: f3 0f 1e fb endbr32
80102434: 55 push %ebp
ioapic->reg = reg;
80102435: 8b 0d 34 36 11 80 mov 0x80113634,%ecx
{
8010243b: 89 e5 mov %esp,%ebp
8010243d: 8b 45 08 mov 0x8(%ebp),%eax
// Mark interrupt edge-triggered, active high,
// enabled, and routed to the given cpunum,
// which happens to be that cpu's APIC ID.
ioapicwrite(REG_TABLE+2*irq, T_IRQ0 + irq);
80102440: 8d 50 20 lea 0x20(%eax),%edx
80102443: 8d 44 00 10 lea 0x10(%eax,%eax,1),%eax
ioapic->reg = reg;
80102447: 89 01 mov %eax,(%ecx)
ioapic->data = data;
80102449: 8b 0d 34 36 11 80 mov 0x80113634,%ecx
ioapicwrite(REG_TABLE+2*irq+1, cpunum << 24);
8010244f: 83 c0 01 add $0x1,%eax
ioapic->data = data;
80102452: 89 51 10 mov %edx,0x10(%ecx)
ioapicwrite(REG_TABLE+2*irq+1, cpunum << 24);
80102455: 8b 55 0c mov 0xc(%ebp),%edx
ioapic->reg = reg;
80102458: 89 01 mov %eax,(%ecx)
ioapic->data = data;
8010245a: a1 34 36 11 80 mov 0x80113634,%eax
ioapicwrite(REG_TABLE+2*irq+1, cpunum << 24);
8010245f: c1 e2 18 shl $0x18,%edx
ioapic->data = data;
80102462: 89 50 10 mov %edx,0x10(%eax)
}
80102465: 5d pop %ebp
80102466: c3 ret
80102467: 66 90 xchg %ax,%ax
80102469: 66 90 xchg %ax,%ax
8010246b: 66 90 xchg %ax,%ax
8010246d: 66 90 xchg %ax,%ax
8010246f: 90 nop
80102470 <kfree>:
// which normally should have been returned by a
// call to kalloc(). (The exception is when
// initializing the allocator; see kinit above.)
void
kfree(char *v)
{
80102470: f3 0f 1e fb endbr32
80102474: 55 push %ebp
80102475: 89 e5 mov %esp,%ebp
80102477: 53 push %ebx
80102478: 83 ec 04 sub $0x4,%esp
8010247b: 8b 5d 08 mov 0x8(%ebp),%ebx
struct run *r;
if((uint)v % PGSIZE || v < end || V2P(v) >= PHYSTOP)
8010247e: f7 c3 ff 0f 00 00 test $0xfff,%ebx
80102484: 75 7a jne 80102500 <kfree+0x90>
80102486: 81 fb a8 73 11 80 cmp $0x801173a8,%ebx
8010248c: 72 72 jb 80102500 <kfree+0x90>
8010248e: 8d 83 00 00 00 80 lea -0x80000000(%ebx),%eax
80102494: 3d ff ff ff 0d cmp $0xdffffff,%eax
80102499: 77 65 ja 80102500 <kfree+0x90>
panic("kfree");
// Fill with junk to catch dangling refs.
memset(v, 1, PGSIZE);
8010249b: 83 ec 04 sub $0x4,%esp
8010249e: 68 00 10 00 00 push $0x1000
801024a3: 6a 01 push $0x1
801024a5: 53 push %ebx
801024a6: e8 f5 27 00 00 call 80104ca0 <memset>
if(kmem.use_lock)
801024ab: 8b 15 74 36 11 80 mov 0x80113674,%edx
801024b1: 83 c4 10 add $0x10,%esp
801024b4: 85 d2 test %edx,%edx
801024b6: 75 20 jne 801024d8 <kfree+0x68>
acquire(&kmem.lock);
r = (struct run*)v;
r->next = kmem.freelist;
801024b8: a1 78 36 11 80 mov 0x80113678,%eax
801024bd: 89 03 mov %eax,(%ebx)
kmem.freelist = r;
if(kmem.use_lock)
801024bf: a1 74 36 11 80 mov 0x80113674,%eax
kmem.freelist = r;
801024c4: 89 1d 78 36 11 80 mov %ebx,0x80113678
if(kmem.use_lock)
801024ca: 85 c0 test %eax,%eax
801024cc: 75 22 jne 801024f0 <kfree+0x80>
release(&kmem.lock);
}
801024ce: 8b 5d fc mov -0x4(%ebp),%ebx
801024d1: c9 leave
801024d2: c3 ret
801024d3: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801024d7: 90 nop
acquire(&kmem.lock);
801024d8: 83 ec 0c sub $0xc,%esp
801024db: 68 40 36 11 80 push $0x80113640
801024e0: e8 ab 26 00 00 call 80104b90 <acquire>
801024e5: 83 c4 10 add $0x10,%esp
801024e8: eb ce jmp 801024b8 <kfree+0x48>
801024ea: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
release(&kmem.lock);
801024f0: c7 45 08 40 36 11 80 movl $0x80113640,0x8(%ebp)
}
801024f7: 8b 5d fc mov -0x4(%ebp),%ebx
801024fa: c9 leave
release(&kmem.lock);
801024fb: e9 50 27 00 00 jmp 80104c50 <release>
panic("kfree");
80102500: 83 ec 0c sub $0xc,%esp
80102503: 68 46 7a 10 80 push $0x80107a46
80102508: e8 83 de ff ff call 80100390 <panic>
8010250d: 8d 76 00 lea 0x0(%esi),%esi
80102510 <freerange>:
{
80102510: f3 0f 1e fb endbr32
80102514: 55 push %ebp
80102515: 89 e5 mov %esp,%ebp
80102517: 56 push %esi
p = (char*)PGROUNDUP((uint)vstart);
80102518: 8b 45 08 mov 0x8(%ebp),%eax
{
8010251b: 8b 75 0c mov 0xc(%ebp),%esi
8010251e: 53 push %ebx
p = (char*)PGROUNDUP((uint)vstart);
8010251f: 8d 98 ff 0f 00 00 lea 0xfff(%eax),%ebx
80102525: 81 e3 00 f0 ff ff and $0xfffff000,%ebx
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
8010252b: 81 c3 00 10 00 00 add $0x1000,%ebx
80102531: 39 de cmp %ebx,%esi
80102533: 72 1f jb 80102554 <freerange+0x44>
80102535: 8d 76 00 lea 0x0(%esi),%esi
kfree(p);
80102538: 83 ec 0c sub $0xc,%esp
8010253b: 8d 83 00 f0 ff ff lea -0x1000(%ebx),%eax
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
80102541: 81 c3 00 10 00 00 add $0x1000,%ebx
kfree(p);
80102547: 50 push %eax
80102548: e8 23 ff ff ff call 80102470 <kfree>
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
8010254d: 83 c4 10 add $0x10,%esp
80102550: 39 f3 cmp %esi,%ebx
80102552: 76 e4 jbe 80102538 <freerange+0x28>
}
80102554: 8d 65 f8 lea -0x8(%ebp),%esp
80102557: 5b pop %ebx
80102558: 5e pop %esi
80102559: 5d pop %ebp
8010255a: c3 ret
8010255b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
8010255f: 90 nop
80102560 <kinit1>:
{
80102560: f3 0f 1e fb endbr32
80102564: 55 push %ebp
80102565: 89 e5 mov %esp,%ebp
80102567: 56 push %esi
80102568: 53 push %ebx
80102569: 8b 75 0c mov 0xc(%ebp),%esi
initlock(&kmem.lock, "kmem");
8010256c: 83 ec 08 sub $0x8,%esp
8010256f: 68 4c 7a 10 80 push $0x80107a4c
80102574: 68 40 36 11 80 push $0x80113640
80102579: e8 92 24 00 00 call 80104a10 <initlock>
p = (char*)PGROUNDUP((uint)vstart);
8010257e: 8b 45 08 mov 0x8(%ebp),%eax
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
80102581: 83 c4 10 add $0x10,%esp
kmem.use_lock = 0;
80102584: c7 05 74 36 11 80 00 movl $0x0,0x80113674
8010258b: 00 00 00
p = (char*)PGROUNDUP((uint)vstart);
8010258e: 8d 98 ff 0f 00 00 lea 0xfff(%eax),%ebx
80102594: 81 e3 00 f0 ff ff and $0xfffff000,%ebx
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
8010259a: 81 c3 00 10 00 00 add $0x1000,%ebx
801025a0: 39 de cmp %ebx,%esi
801025a2: 72 20 jb 801025c4 <kinit1+0x64>
801025a4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
kfree(p);
801025a8: 83 ec 0c sub $0xc,%esp
801025ab: 8d 83 00 f0 ff ff lea -0x1000(%ebx),%eax
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
801025b1: 81 c3 00 10 00 00 add $0x1000,%ebx
kfree(p);
801025b7: 50 push %eax
801025b8: e8 b3 fe ff ff call 80102470 <kfree>
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
801025bd: 83 c4 10 add $0x10,%esp
801025c0: 39 de cmp %ebx,%esi
801025c2: 73 e4 jae 801025a8 <kinit1+0x48>
}
801025c4: 8d 65 f8 lea -0x8(%ebp),%esp
801025c7: 5b pop %ebx
801025c8: 5e pop %esi
801025c9: 5d pop %ebp
801025ca: c3 ret
801025cb: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801025cf: 90 nop
801025d0 <kinit2>:
{
801025d0: f3 0f 1e fb endbr32
801025d4: 55 push %ebp
801025d5: 89 e5 mov %esp,%ebp
801025d7: 56 push %esi
p = (char*)PGROUNDUP((uint)vstart);
801025d8: 8b 45 08 mov 0x8(%ebp),%eax
{
801025db: 8b 75 0c mov 0xc(%ebp),%esi
801025de: 53 push %ebx
p = (char*)PGROUNDUP((uint)vstart);
801025df: 8d 98 ff 0f 00 00 lea 0xfff(%eax),%ebx
801025e5: 81 e3 00 f0 ff ff and $0xfffff000,%ebx
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
801025eb: 81 c3 00 10 00 00 add $0x1000,%ebx
801025f1: 39 de cmp %ebx,%esi
801025f3: 72 1f jb 80102614 <kinit2+0x44>
801025f5: 8d 76 00 lea 0x0(%esi),%esi
kfree(p);
801025f8: 83 ec 0c sub $0xc,%esp
801025fb: 8d 83 00 f0 ff ff lea -0x1000(%ebx),%eax
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
80102601: 81 c3 00 10 00 00 add $0x1000,%ebx
kfree(p);
80102607: 50 push %eax
80102608: e8 63 fe ff ff call 80102470 <kfree>
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
8010260d: 83 c4 10 add $0x10,%esp
80102610: 39 de cmp %ebx,%esi
80102612: 73 e4 jae 801025f8 <kinit2+0x28>
kmem.use_lock = 1;
80102614: c7 05 74 36 11 80 01 movl $0x1,0x80113674
8010261b: 00 00 00
}
8010261e: 8d 65 f8 lea -0x8(%ebp),%esp
80102621: 5b pop %ebx
80102622: 5e pop %esi
80102623: 5d pop %ebp
80102624: c3 ret
80102625: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010262c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80102630 <kalloc>:
// Allocate one 4096-byte page of physical memory.
// Returns a pointer that the kernel can use.
// Returns 0 if the memory cannot be allocated.
char*
kalloc(void)
{
80102630: f3 0f 1e fb endbr32
struct run *r;
if(kmem.use_lock)
80102634: a1 74 36 11 80 mov 0x80113674,%eax
80102639: 85 c0 test %eax,%eax
8010263b: 75 1b jne 80102658 <kalloc+0x28>
acquire(&kmem.lock);
r = kmem.freelist;
8010263d: a1 78 36 11 80 mov 0x80113678,%eax
if(r)
80102642: 85 c0 test %eax,%eax
80102644: 74 0a je 80102650 <kalloc+0x20>
kmem.freelist = r->next;
80102646: 8b 10 mov (%eax),%edx
80102648: 89 15 78 36 11 80 mov %edx,0x80113678
if(kmem.use_lock)
8010264e: c3 ret
8010264f: 90 nop
release(&kmem.lock);
return (char*)r;
}
80102650: c3 ret
80102651: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
{
80102658: 55 push %ebp
80102659: 89 e5 mov %esp,%ebp
8010265b: 83 ec 24 sub $0x24,%esp
acquire(&kmem.lock);
8010265e: 68 40 36 11 80 push $0x80113640
80102663: e8 28 25 00 00 call 80104b90 <acquire>
r = kmem.freelist;
80102668: a1 78 36 11 80 mov 0x80113678,%eax
if(r)
8010266d: 8b 15 74 36 11 80 mov 0x80113674,%edx
80102673: 83 c4 10 add $0x10,%esp
80102676: 85 c0 test %eax,%eax
80102678: 74 08 je 80102682 <kalloc+0x52>
kmem.freelist = r->next;
8010267a: 8b 08 mov (%eax),%ecx
8010267c: 89 0d 78 36 11 80 mov %ecx,0x80113678
if(kmem.use_lock)
80102682: 85 d2 test %edx,%edx
80102684: 74 16 je 8010269c <kalloc+0x6c>
release(&kmem.lock);
80102686: 83 ec 0c sub $0xc,%esp
80102689: 89 45 f4 mov %eax,-0xc(%ebp)
8010268c: 68 40 36 11 80 push $0x80113640
80102691: e8 ba 25 00 00 call 80104c50 <release>
return (char*)r;
80102696: 8b 45 f4 mov -0xc(%ebp),%eax
release(&kmem.lock);
80102699: 83 c4 10 add $0x10,%esp
}
8010269c: c9 leave
8010269d: c3 ret
8010269e: 66 90 xchg %ax,%ax
801026a0 <kbdgetc>:
#include "defs.h"
#include "kbd.h"
int
kbdgetc(void)
{
801026a0: f3 0f 1e fb endbr32
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
801026a4: ba 64 00 00 00 mov $0x64,%edx
801026a9: ec in (%dx),%al
normalmap, shiftmap, ctlmap, ctlmap
};
uint st, data, c;
st = inb(KBSTATP);
if((st & KBS_DIB) == 0)
801026aa: a8 01 test $0x1,%al
801026ac: 0f 84 be 00 00 00 je 80102770 <kbdgetc+0xd0>
{
801026b2: 55 push %ebp
801026b3: ba 60 00 00 00 mov $0x60,%edx
801026b8: 89 e5 mov %esp,%ebp
801026ba: 53 push %ebx
801026bb: ec in (%dx),%al
return data;
801026bc: 8b 1d b4 b5 10 80 mov 0x8010b5b4,%ebx
return -1;
data = inb(KBDATAP);
801026c2: 0f b6 d0 movzbl %al,%edx
if(data == 0xE0){
801026c5: 3c e0 cmp $0xe0,%al
801026c7: 74 57 je 80102720 <kbdgetc+0x80>
shift |= E0ESC;
return 0;
} else if(data & 0x80){
801026c9: 89 d9 mov %ebx,%ecx
801026cb: 83 e1 40 and $0x40,%ecx
801026ce: 84 c0 test %al,%al
801026d0: 78 5e js 80102730 <kbdgetc+0x90>
// Key released
data = (shift & E0ESC ? data : data & 0x7F);
shift &= ~(shiftcode[data] | E0ESC);
return 0;
} else if(shift & E0ESC){
801026d2: 85 c9 test %ecx,%ecx
801026d4: 74 09 je 801026df <kbdgetc+0x3f>
// Last character was an E0 escape; or with 0x80
data |= 0x80;
801026d6: 83 c8 80 or $0xffffff80,%eax
shift &= ~E0ESC;
801026d9: 83 e3 bf and $0xffffffbf,%ebx
data |= 0x80;
801026dc: 0f b6 d0 movzbl %al,%edx
}
shift |= shiftcode[data];
801026df: 0f b6 8a 80 7b 10 80 movzbl -0x7fef8480(%edx),%ecx
shift ^= togglecode[data];
801026e6: 0f b6 82 80 7a 10 80 movzbl -0x7fef8580(%edx),%eax
shift |= shiftcode[data];
801026ed: 09 d9 or %ebx,%ecx
shift ^= togglecode[data];
801026ef: 31 c1 xor %eax,%ecx
c = charcode[shift & (CTL | SHIFT)][data];
801026f1: 89 c8 mov %ecx,%eax
shift ^= togglecode[data];
801026f3: 89 0d b4 b5 10 80 mov %ecx,0x8010b5b4
c = charcode[shift & (CTL | SHIFT)][data];
801026f9: 83 e0 03 and $0x3,%eax
if(shift & CAPSLOCK){
801026fc: 83 e1 08 and $0x8,%ecx
c = charcode[shift & (CTL | SHIFT)][data];
801026ff: 8b 04 85 60 7a 10 80 mov -0x7fef85a0(,%eax,4),%eax
80102706: 0f b6 04 10 movzbl (%eax,%edx,1),%eax
if(shift & CAPSLOCK){
8010270a: 74 0b je 80102717 <kbdgetc+0x77>
if('a' <= c && c <= 'z')
8010270c: 8d 50 9f lea -0x61(%eax),%edx
8010270f: 83 fa 19 cmp $0x19,%edx
80102712: 77 44 ja 80102758 <kbdgetc+0xb8>
c += 'A' - 'a';
80102714: 83 e8 20 sub $0x20,%eax
else if('A' <= c && c <= 'Z')
c += 'a' - 'A';
}
return c;
}
80102717: 5b pop %ebx
80102718: 5d pop %ebp
80102719: c3 ret
8010271a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
shift |= E0ESC;
80102720: 83 cb 40 or $0x40,%ebx
return 0;
80102723: 31 c0 xor %eax,%eax
shift |= E0ESC;
80102725: 89 1d b4 b5 10 80 mov %ebx,0x8010b5b4
}
8010272b: 5b pop %ebx
8010272c: 5d pop %ebp
8010272d: c3 ret
8010272e: 66 90 xchg %ax,%ax
data = (shift & E0ESC ? data : data & 0x7F);
80102730: 83 e0 7f and $0x7f,%eax
80102733: 85 c9 test %ecx,%ecx
80102735: 0f 44 d0 cmove %eax,%edx
return 0;
80102738: 31 c0 xor %eax,%eax
shift &= ~(shiftcode[data] | E0ESC);
8010273a: 0f b6 8a 80 7b 10 80 movzbl -0x7fef8480(%edx),%ecx
80102741: 83 c9 40 or $0x40,%ecx
80102744: 0f b6 c9 movzbl %cl,%ecx
80102747: f7 d1 not %ecx
80102749: 21 d9 and %ebx,%ecx
}
8010274b: 5b pop %ebx
8010274c: 5d pop %ebp
shift &= ~(shiftcode[data] | E0ESC);
8010274d: 89 0d b4 b5 10 80 mov %ecx,0x8010b5b4
}
80102753: c3 ret
80102754: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
else if('A' <= c && c <= 'Z')
80102758: 8d 48 bf lea -0x41(%eax),%ecx
c += 'a' - 'A';
8010275b: 8d 50 20 lea 0x20(%eax),%edx
}
8010275e: 5b pop %ebx
8010275f: 5d pop %ebp
c += 'a' - 'A';
80102760: 83 f9 1a cmp $0x1a,%ecx
80102763: 0f 42 c2 cmovb %edx,%eax
}
80102766: c3 ret
80102767: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010276e: 66 90 xchg %ax,%ax
return -1;
80102770: b8 ff ff ff ff mov $0xffffffff,%eax
}
80102775: c3 ret
80102776: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010277d: 8d 76 00 lea 0x0(%esi),%esi
80102780 <kbdintr>:
void
kbdintr(void)
{
80102780: f3 0f 1e fb endbr32
80102784: 55 push %ebp
80102785: 89 e5 mov %esp,%ebp
80102787: 83 ec 14 sub $0x14,%esp
consoleintr(kbdgetc);
8010278a: 68 a0 26 10 80 push $0x801026a0
8010278f: e8 cc e0 ff ff call 80100860 <consoleintr>
}
80102794: 83 c4 10 add $0x10,%esp
80102797: c9 leave
80102798: c3 ret
80102799: 66 90 xchg %ax,%ax
8010279b: 66 90 xchg %ax,%ax
8010279d: 66 90 xchg %ax,%ax
8010279f: 90 nop
801027a0 <lapicinit>:
lapic[ID]; // wait for write to finish, by reading
}
void
lapicinit(void)
{
801027a0: f3 0f 1e fb endbr32
if(!lapic)
801027a4: a1 7c 36 11 80 mov 0x8011367c,%eax
801027a9: 85 c0 test %eax,%eax
801027ab: 0f 84 c7 00 00 00 je 80102878 <lapicinit+0xd8>
lapic[index] = value;
801027b1: c7 80 f0 00 00 00 3f movl $0x13f,0xf0(%eax)
801027b8: 01 00 00
lapic[ID]; // wait for write to finish, by reading
801027bb: 8b 50 20 mov 0x20(%eax),%edx
lapic[index] = value;
801027be: c7 80 e0 03 00 00 0b movl $0xb,0x3e0(%eax)
801027c5: 00 00 00
lapic[ID]; // wait for write to finish, by reading
801027c8: 8b 50 20 mov 0x20(%eax),%edx
lapic[index] = value;
801027cb: c7 80 20 03 00 00 20 movl $0x20020,0x320(%eax)
801027d2: 00 02 00
lapic[ID]; // wait for write to finish, by reading
801027d5: 8b 50 20 mov 0x20(%eax),%edx
lapic[index] = value;
801027d8: c7 80 80 03 00 00 80 movl $0x989680,0x380(%eax)
801027df: 96 98 00
lapic[ID]; // wait for write to finish, by reading
801027e2: 8b 50 20 mov 0x20(%eax),%edx
lapic[index] = value;
801027e5: c7 80 50 03 00 00 00 movl $0x10000,0x350(%eax)
801027ec: 00 01 00
lapic[ID]; // wait for write to finish, by reading
801027ef: 8b 50 20 mov 0x20(%eax),%edx
lapic[index] = value;
801027f2: c7 80 60 03 00 00 00 movl $0x10000,0x360(%eax)
801027f9: 00 01 00
lapic[ID]; // wait for write to finish, by reading
801027fc: 8b 50 20 mov 0x20(%eax),%edx
lapicw(LINT0, MASKED);
lapicw(LINT1, MASKED);
// Disable performance counter overflow interrupts
// on machines that provide that interrupt entry.
if(((lapic[VER]>>16) & 0xFF) >= 4)
801027ff: 8b 50 30 mov 0x30(%eax),%edx
80102802: c1 ea 10 shr $0x10,%edx
80102805: 81 e2 fc 00 00 00 and $0xfc,%edx
8010280b: 75 73 jne 80102880 <lapicinit+0xe0>
lapic[index] = value;
8010280d: c7 80 70 03 00 00 33 movl $0x33,0x370(%eax)
80102814: 00 00 00
lapic[ID]; // wait for write to finish, by reading
80102817: 8b 50 20 mov 0x20(%eax),%edx
lapic[index] = value;
8010281a: c7 80 80 02 00 00 00 movl $0x0,0x280(%eax)
80102821: 00 00 00
lapic[ID]; // wait for write to finish, by reading
80102824: 8b 50 20 mov 0x20(%eax),%edx
lapic[index] = value;
80102827: c7 80 80 02 00 00 00 movl $0x0,0x280(%eax)
8010282e: 00 00 00
lapic[ID]; // wait for write to finish, by reading
80102831: 8b 50 20 mov 0x20(%eax),%edx
lapic[index] = value;
80102834: c7 80 b0 00 00 00 00 movl $0x0,0xb0(%eax)
8010283b: 00 00 00
lapic[ID]; // wait for write to finish, by reading
8010283e: 8b 50 20 mov 0x20(%eax),%edx
lapic[index] = value;
80102841: c7 80 10 03 00 00 00 movl $0x0,0x310(%eax)
80102848: 00 00 00
lapic[ID]; // wait for write to finish, by reading
8010284b: 8b 50 20 mov 0x20(%eax),%edx
lapic[index] = value;
8010284e: c7 80 00 03 00 00 00 movl $0x88500,0x300(%eax)
80102855: 85 08 00
lapic[ID]; // wait for write to finish, by reading
80102858: 8b 50 20 mov 0x20(%eax),%edx
8010285b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
8010285f: 90 nop
lapicw(EOI, 0);
// Send an Init Level De-Assert to synchronise arbitration ID's.
lapicw(ICRHI, 0);
lapicw(ICRLO, BCAST | INIT | LEVEL);
while(lapic[ICRLO] & DELIVS)
80102860: 8b 90 00 03 00 00 mov 0x300(%eax),%edx
80102866: 80 e6 10 and $0x10,%dh
80102869: 75 f5 jne 80102860 <lapicinit+0xc0>
lapic[index] = value;
8010286b: c7 80 80 00 00 00 00 movl $0x0,0x80(%eax)
80102872: 00 00 00
lapic[ID]; // wait for write to finish, by reading
80102875: 8b 40 20 mov 0x20(%eax),%eax
;
// Enable interrupts on the APIC (but not on the processor).
lapicw(TPR, 0);
}
80102878: c3 ret
80102879: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
lapic[index] = value;
80102880: c7 80 40 03 00 00 00 movl $0x10000,0x340(%eax)
80102887: 00 01 00
lapic[ID]; // wait for write to finish, by reading
8010288a: 8b 50 20 mov 0x20(%eax),%edx
}
8010288d: e9 7b ff ff ff jmp 8010280d <lapicinit+0x6d>
80102892: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80102899: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801028a0 <lapicid>:
int
lapicid(void)
{
801028a0: f3 0f 1e fb endbr32
if (!lapic)
801028a4: a1 7c 36 11 80 mov 0x8011367c,%eax
801028a9: 85 c0 test %eax,%eax
801028ab: 74 0b je 801028b8 <lapicid+0x18>
return 0;
return lapic[ID] >> 24;
801028ad: 8b 40 20 mov 0x20(%eax),%eax
801028b0: c1 e8 18 shr $0x18,%eax
801028b3: c3 ret
801028b4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
return 0;
801028b8: 31 c0 xor %eax,%eax
}
801028ba: c3 ret
801028bb: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801028bf: 90 nop
801028c0 <lapiceoi>:
// Acknowledge interrupt.
void
lapiceoi(void)
{
801028c0: f3 0f 1e fb endbr32
if(lapic)
801028c4: a1 7c 36 11 80 mov 0x8011367c,%eax
801028c9: 85 c0 test %eax,%eax
801028cb: 74 0d je 801028da <lapiceoi+0x1a>
lapic[index] = value;
801028cd: c7 80 b0 00 00 00 00 movl $0x0,0xb0(%eax)
801028d4: 00 00 00
lapic[ID]; // wait for write to finish, by reading
801028d7: 8b 40 20 mov 0x20(%eax),%eax
lapicw(EOI, 0);
}
801028da: c3 ret
801028db: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801028df: 90 nop
801028e0 <microdelay>:
// Spin for a given number of microseconds.
// On real hardware would want to tune this dynamically.
void
microdelay(int us)
{
801028e0: f3 0f 1e fb endbr32
}
801028e4: c3 ret
801028e5: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801028ec: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801028f0 <lapicstartap>:
// Start additional processor running entry code at addr.
// See Appendix B of MultiProcessor Specification.
void
lapicstartap(uchar apicid, uint addr)
{
801028f0: f3 0f 1e fb endbr32
801028f4: 55 push %ebp
asm volatile("out %0,%1" : : "a" (data), "d" (port));
801028f5: b8 0f 00 00 00 mov $0xf,%eax
801028fa: ba 70 00 00 00 mov $0x70,%edx
801028ff: 89 e5 mov %esp,%ebp
80102901: 53 push %ebx
80102902: 8b 4d 0c mov 0xc(%ebp),%ecx
80102905: 8b 5d 08 mov 0x8(%ebp),%ebx
80102908: ee out %al,(%dx)
80102909: b8 0a 00 00 00 mov $0xa,%eax
8010290e: ba 71 00 00 00 mov $0x71,%edx
80102913: ee out %al,(%dx)
// and the warm reset vector (DWORD based at 40:67) to point at
// the AP startup code prior to the [universal startup algorithm]."
outb(CMOS_PORT, 0xF); // offset 0xF is shutdown code
outb(CMOS_PORT+1, 0x0A);
wrv = (ushort*)P2V((0x40<<4 | 0x67)); // Warm reset vector
wrv[0] = 0;
80102914: 31 c0 xor %eax,%eax
wrv[1] = addr >> 4;
// "Universal startup algorithm."
// Send INIT (level-triggered) interrupt to reset other CPU.
lapicw(ICRHI, apicid<<24);
80102916: c1 e3 18 shl $0x18,%ebx
wrv[0] = 0;
80102919: 66 a3 67 04 00 80 mov %ax,0x80000467
wrv[1] = addr >> 4;
8010291f: 89 c8 mov %ecx,%eax
// when it is in the halted state due to an INIT. So the second
// should be ignored, but it is part of the official Intel algorithm.
// Bochs complains about the second one. Too bad for Bochs.
for(i = 0; i < 2; i++){
lapicw(ICRHI, apicid<<24);
lapicw(ICRLO, STARTUP | (addr>>12));
80102921: c1 e9 0c shr $0xc,%ecx
lapicw(ICRHI, apicid<<24);
80102924: 89 da mov %ebx,%edx
wrv[1] = addr >> 4;
80102926: c1 e8 04 shr $0x4,%eax
lapicw(ICRLO, STARTUP | (addr>>12));
80102929: 80 cd 06 or $0x6,%ch
wrv[1] = addr >> 4;
8010292c: 66 a3 69 04 00 80 mov %ax,0x80000469
lapic[index] = value;
80102932: a1 7c 36 11 80 mov 0x8011367c,%eax
80102937: 89 98 10 03 00 00 mov %ebx,0x310(%eax)
lapic[ID]; // wait for write to finish, by reading
8010293d: 8b 58 20 mov 0x20(%eax),%ebx
lapic[index] = value;
80102940: c7 80 00 03 00 00 00 movl $0xc500,0x300(%eax)
80102947: c5 00 00
lapic[ID]; // wait for write to finish, by reading
8010294a: 8b 58 20 mov 0x20(%eax),%ebx
lapic[index] = value;
8010294d: c7 80 00 03 00 00 00 movl $0x8500,0x300(%eax)
80102954: 85 00 00
lapic[ID]; // wait for write to finish, by reading
80102957: 8b 58 20 mov 0x20(%eax),%ebx
lapic[index] = value;
8010295a: 89 90 10 03 00 00 mov %edx,0x310(%eax)
lapic[ID]; // wait for write to finish, by reading
80102960: 8b 58 20 mov 0x20(%eax),%ebx
lapic[index] = value;
80102963: 89 88 00 03 00 00 mov %ecx,0x300(%eax)
lapic[ID]; // wait for write to finish, by reading
80102969: 8b 58 20 mov 0x20(%eax),%ebx
lapic[index] = value;
8010296c: 89 90 10 03 00 00 mov %edx,0x310(%eax)
lapic[ID]; // wait for write to finish, by reading
80102972: 8b 50 20 mov 0x20(%eax),%edx
lapic[index] = value;
80102975: 89 88 00 03 00 00 mov %ecx,0x300(%eax)
microdelay(200);
}
}
8010297b: 5b pop %ebx
lapic[ID]; // wait for write to finish, by reading
8010297c: 8b 40 20 mov 0x20(%eax),%eax
}
8010297f: 5d pop %ebp
80102980: c3 ret
80102981: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80102988: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010298f: 90 nop
80102990 <cmostime>:
}
// qemu seems to use 24-hour GWT and the values are BCD encoded
void
cmostime(struct rtcdate *r)
{
80102990: f3 0f 1e fb endbr32
80102994: 55 push %ebp
80102995: b8 0b 00 00 00 mov $0xb,%eax
8010299a: ba 70 00 00 00 mov $0x70,%edx
8010299f: 89 e5 mov %esp,%ebp
801029a1: 57 push %edi
801029a2: 56 push %esi
801029a3: 53 push %ebx
801029a4: 83 ec 4c sub $0x4c,%esp
801029a7: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
801029a8: ba 71 00 00 00 mov $0x71,%edx
801029ad: ec in (%dx),%al
struct rtcdate t1, t2;
int sb, bcd;
sb = cmos_read(CMOS_STATB);
bcd = (sb & (1 << 2)) == 0;
801029ae: 83 e0 04 and $0x4,%eax
asm volatile("out %0,%1" : : "a" (data), "d" (port));
801029b1: bb 70 00 00 00 mov $0x70,%ebx
801029b6: 88 45 b3 mov %al,-0x4d(%ebp)
801029b9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801029c0: 31 c0 xor %eax,%eax
801029c2: 89 da mov %ebx,%edx
801029c4: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
801029c5: b9 71 00 00 00 mov $0x71,%ecx
801029ca: 89 ca mov %ecx,%edx
801029cc: ec in (%dx),%al
801029cd: 88 45 b7 mov %al,-0x49(%ebp)
asm volatile("out %0,%1" : : "a" (data), "d" (port));
801029d0: 89 da mov %ebx,%edx
801029d2: b8 02 00 00 00 mov $0x2,%eax
801029d7: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
801029d8: 89 ca mov %ecx,%edx
801029da: ec in (%dx),%al
801029db: 88 45 b6 mov %al,-0x4a(%ebp)
asm volatile("out %0,%1" : : "a" (data), "d" (port));
801029de: 89 da mov %ebx,%edx
801029e0: b8 04 00 00 00 mov $0x4,%eax
801029e5: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
801029e6: 89 ca mov %ecx,%edx
801029e8: ec in (%dx),%al
801029e9: 88 45 b5 mov %al,-0x4b(%ebp)
asm volatile("out %0,%1" : : "a" (data), "d" (port));
801029ec: 89 da mov %ebx,%edx
801029ee: b8 07 00 00 00 mov $0x7,%eax
801029f3: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
801029f4: 89 ca mov %ecx,%edx
801029f6: ec in (%dx),%al
801029f7: 88 45 b4 mov %al,-0x4c(%ebp)
asm volatile("out %0,%1" : : "a" (data), "d" (port));
801029fa: 89 da mov %ebx,%edx
801029fc: b8 08 00 00 00 mov $0x8,%eax
80102a01: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102a02: 89 ca mov %ecx,%edx
80102a04: ec in (%dx),%al
80102a05: 89 c7 mov %eax,%edi
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80102a07: 89 da mov %ebx,%edx
80102a09: b8 09 00 00 00 mov $0x9,%eax
80102a0e: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102a0f: 89 ca mov %ecx,%edx
80102a11: ec in (%dx),%al
80102a12: 89 c6 mov %eax,%esi
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80102a14: 89 da mov %ebx,%edx
80102a16: b8 0a 00 00 00 mov $0xa,%eax
80102a1b: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102a1c: 89 ca mov %ecx,%edx
80102a1e: ec in (%dx),%al
// make sure CMOS doesn't modify time while we read it
for(;;) {
fill_rtcdate(&t1);
if(cmos_read(CMOS_STATA) & CMOS_UIP)
80102a1f: 84 c0 test %al,%al
80102a21: 78 9d js 801029c0 <cmostime+0x30>
return inb(CMOS_RETURN);
80102a23: 0f b6 45 b7 movzbl -0x49(%ebp),%eax
80102a27: 89 fa mov %edi,%edx
80102a29: 0f b6 fa movzbl %dl,%edi
80102a2c: 89 f2 mov %esi,%edx
80102a2e: 89 45 b8 mov %eax,-0x48(%ebp)
80102a31: 0f b6 45 b6 movzbl -0x4a(%ebp),%eax
80102a35: 0f b6 f2 movzbl %dl,%esi
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80102a38: 89 da mov %ebx,%edx
80102a3a: 89 7d c8 mov %edi,-0x38(%ebp)
80102a3d: 89 45 bc mov %eax,-0x44(%ebp)
80102a40: 0f b6 45 b5 movzbl -0x4b(%ebp),%eax
80102a44: 89 75 cc mov %esi,-0x34(%ebp)
80102a47: 89 45 c0 mov %eax,-0x40(%ebp)
80102a4a: 0f b6 45 b4 movzbl -0x4c(%ebp),%eax
80102a4e: 89 45 c4 mov %eax,-0x3c(%ebp)
80102a51: 31 c0 xor %eax,%eax
80102a53: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102a54: 89 ca mov %ecx,%edx
80102a56: ec in (%dx),%al
80102a57: 0f b6 c0 movzbl %al,%eax
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80102a5a: 89 da mov %ebx,%edx
80102a5c: 89 45 d0 mov %eax,-0x30(%ebp)
80102a5f: b8 02 00 00 00 mov $0x2,%eax
80102a64: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102a65: 89 ca mov %ecx,%edx
80102a67: ec in (%dx),%al
80102a68: 0f b6 c0 movzbl %al,%eax
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80102a6b: 89 da mov %ebx,%edx
80102a6d: 89 45 d4 mov %eax,-0x2c(%ebp)
80102a70: b8 04 00 00 00 mov $0x4,%eax
80102a75: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102a76: 89 ca mov %ecx,%edx
80102a78: ec in (%dx),%al
80102a79: 0f b6 c0 movzbl %al,%eax
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80102a7c: 89 da mov %ebx,%edx
80102a7e: 89 45 d8 mov %eax,-0x28(%ebp)
80102a81: b8 07 00 00 00 mov $0x7,%eax
80102a86: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102a87: 89 ca mov %ecx,%edx
80102a89: ec in (%dx),%al
80102a8a: 0f b6 c0 movzbl %al,%eax
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80102a8d: 89 da mov %ebx,%edx
80102a8f: 89 45 dc mov %eax,-0x24(%ebp)
80102a92: b8 08 00 00 00 mov $0x8,%eax
80102a97: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102a98: 89 ca mov %ecx,%edx
80102a9a: ec in (%dx),%al
80102a9b: 0f b6 c0 movzbl %al,%eax
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80102a9e: 89 da mov %ebx,%edx
80102aa0: 89 45 e0 mov %eax,-0x20(%ebp)
80102aa3: b8 09 00 00 00 mov $0x9,%eax
80102aa8: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102aa9: 89 ca mov %ecx,%edx
80102aab: ec in (%dx),%al
80102aac: 0f b6 c0 movzbl %al,%eax
continue;
fill_rtcdate(&t2);
if(memcmp(&t1, &t2, sizeof(t1)) == 0)
80102aaf: 83 ec 04 sub $0x4,%esp
return inb(CMOS_RETURN);
80102ab2: 89 45 e4 mov %eax,-0x1c(%ebp)
if(memcmp(&t1, &t2, sizeof(t1)) == 0)
80102ab5: 8d 45 d0 lea -0x30(%ebp),%eax
80102ab8: 6a 18 push $0x18
80102aba: 50 push %eax
80102abb: 8d 45 b8 lea -0x48(%ebp),%eax
80102abe: 50 push %eax
80102abf: e8 2c 22 00 00 call 80104cf0 <memcmp>
80102ac4: 83 c4 10 add $0x10,%esp
80102ac7: 85 c0 test %eax,%eax
80102ac9: 0f 85 f1 fe ff ff jne 801029c0 <cmostime+0x30>
break;
}
// convert
if(bcd) {
80102acf: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp)
80102ad3: 75 78 jne 80102b4d <cmostime+0x1bd>
#define CONV(x) (t1.x = ((t1.x >> 4) * 10) + (t1.x & 0xf))
CONV(second);
80102ad5: 8b 45 b8 mov -0x48(%ebp),%eax
80102ad8: 89 c2 mov %eax,%edx
80102ada: 83 e0 0f and $0xf,%eax
80102add: c1 ea 04 shr $0x4,%edx
80102ae0: 8d 14 92 lea (%edx,%edx,4),%edx
80102ae3: 8d 04 50 lea (%eax,%edx,2),%eax
80102ae6: 89 45 b8 mov %eax,-0x48(%ebp)
CONV(minute);
80102ae9: 8b 45 bc mov -0x44(%ebp),%eax
80102aec: 89 c2 mov %eax,%edx
80102aee: 83 e0 0f and $0xf,%eax
80102af1: c1 ea 04 shr $0x4,%edx
80102af4: 8d 14 92 lea (%edx,%edx,4),%edx
80102af7: 8d 04 50 lea (%eax,%edx,2),%eax
80102afa: 89 45 bc mov %eax,-0x44(%ebp)
CONV(hour );
80102afd: 8b 45 c0 mov -0x40(%ebp),%eax
80102b00: 89 c2 mov %eax,%edx
80102b02: 83 e0 0f and $0xf,%eax
80102b05: c1 ea 04 shr $0x4,%edx
80102b08: 8d 14 92 lea (%edx,%edx,4),%edx
80102b0b: 8d 04 50 lea (%eax,%edx,2),%eax
80102b0e: 89 45 c0 mov %eax,-0x40(%ebp)
CONV(day );
80102b11: 8b 45 c4 mov -0x3c(%ebp),%eax
80102b14: 89 c2 mov %eax,%edx
80102b16: 83 e0 0f and $0xf,%eax
80102b19: c1 ea 04 shr $0x4,%edx
80102b1c: 8d 14 92 lea (%edx,%edx,4),%edx
80102b1f: 8d 04 50 lea (%eax,%edx,2),%eax
80102b22: 89 45 c4 mov %eax,-0x3c(%ebp)
CONV(month );
80102b25: 8b 45 c8 mov -0x38(%ebp),%eax
80102b28: 89 c2 mov %eax,%edx
80102b2a: 83 e0 0f and $0xf,%eax
80102b2d: c1 ea 04 shr $0x4,%edx
80102b30: 8d 14 92 lea (%edx,%edx,4),%edx
80102b33: 8d 04 50 lea (%eax,%edx,2),%eax
80102b36: 89 45 c8 mov %eax,-0x38(%ebp)
CONV(year );
80102b39: 8b 45 cc mov -0x34(%ebp),%eax
80102b3c: 89 c2 mov %eax,%edx
80102b3e: 83 e0 0f and $0xf,%eax
80102b41: c1 ea 04 shr $0x4,%edx
80102b44: 8d 14 92 lea (%edx,%edx,4),%edx
80102b47: 8d 04 50 lea (%eax,%edx,2),%eax
80102b4a: 89 45 cc mov %eax,-0x34(%ebp)
#undef CONV
}
*r = t1;
80102b4d: 8b 75 08 mov 0x8(%ebp),%esi
80102b50: 8b 45 b8 mov -0x48(%ebp),%eax
80102b53: 89 06 mov %eax,(%esi)
80102b55: 8b 45 bc mov -0x44(%ebp),%eax
80102b58: 89 46 04 mov %eax,0x4(%esi)
80102b5b: 8b 45 c0 mov -0x40(%ebp),%eax
80102b5e: 89 46 08 mov %eax,0x8(%esi)
80102b61: 8b 45 c4 mov -0x3c(%ebp),%eax
80102b64: 89 46 0c mov %eax,0xc(%esi)
80102b67: 8b 45 c8 mov -0x38(%ebp),%eax
80102b6a: 89 46 10 mov %eax,0x10(%esi)
80102b6d: 8b 45 cc mov -0x34(%ebp),%eax
80102b70: 89 46 14 mov %eax,0x14(%esi)
r->year += 2000;
80102b73: 81 46 14 d0 07 00 00 addl $0x7d0,0x14(%esi)
}
80102b7a: 8d 65 f4 lea -0xc(%ebp),%esp
80102b7d: 5b pop %ebx
80102b7e: 5e pop %esi
80102b7f: 5f pop %edi
80102b80: 5d pop %ebp
80102b81: c3 ret
80102b82: 66 90 xchg %ax,%ax
80102b84: 66 90 xchg %ax,%ax
80102b86: 66 90 xchg %ax,%ax
80102b88: 66 90 xchg %ax,%ax
80102b8a: 66 90 xchg %ax,%ax
80102b8c: 66 90 xchg %ax,%ax
80102b8e: 66 90 xchg %ax,%ax
80102b90 <install_trans>:
static void
install_trans(void)
{
int tail;
for (tail = 0; tail < log.lh.n; tail++) {
80102b90: 8b 0d c8 36 11 80 mov 0x801136c8,%ecx
80102b96: 85 c9 test %ecx,%ecx
80102b98: 0f 8e 8a 00 00 00 jle 80102c28 <install_trans+0x98>
{
80102b9e: 55 push %ebp
80102b9f: 89 e5 mov %esp,%ebp
80102ba1: 57 push %edi
for (tail = 0; tail < log.lh.n; tail++) {
80102ba2: 31 ff xor %edi,%edi
{
80102ba4: 56 push %esi
80102ba5: 53 push %ebx
80102ba6: 83 ec 0c sub $0xc,%esp
80102ba9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
struct buf *lbuf = bread(log.dev, log.start+tail+1); // read log block
80102bb0: a1 b4 36 11 80 mov 0x801136b4,%eax
80102bb5: 83 ec 08 sub $0x8,%esp
80102bb8: 01 f8 add %edi,%eax
80102bba: 83 c0 01 add $0x1,%eax
80102bbd: 50 push %eax
80102bbe: ff 35 c4 36 11 80 pushl 0x801136c4
80102bc4: e8 07 d5 ff ff call 801000d0 <bread>
80102bc9: 89 c6 mov %eax,%esi
struct buf *dbuf = bread(log.dev, log.lh.block[tail]); // read dst
80102bcb: 58 pop %eax
80102bcc: 5a pop %edx
80102bcd: ff 34 bd cc 36 11 80 pushl -0x7feec934(,%edi,4)
80102bd4: ff 35 c4 36 11 80 pushl 0x801136c4
for (tail = 0; tail < log.lh.n; tail++) {
80102bda: 83 c7 01 add $0x1,%edi
struct buf *dbuf = bread(log.dev, log.lh.block[tail]); // read dst
80102bdd: e8 ee d4 ff ff call 801000d0 <bread>
memmove(dbuf->data, lbuf->data, BSIZE); // copy block to dst
80102be2: 83 c4 0c add $0xc,%esp
struct buf *dbuf = bread(log.dev, log.lh.block[tail]); // read dst
80102be5: 89 c3 mov %eax,%ebx
memmove(dbuf->data, lbuf->data, BSIZE); // copy block to dst
80102be7: 8d 46 5c lea 0x5c(%esi),%eax
80102bea: 68 00 02 00 00 push $0x200
80102bef: 50 push %eax
80102bf0: 8d 43 5c lea 0x5c(%ebx),%eax
80102bf3: 50 push %eax
80102bf4: e8 47 21 00 00 call 80104d40 <memmove>
bwrite(dbuf); // write dst to disk
80102bf9: 89 1c 24 mov %ebx,(%esp)
80102bfc: e8 af d5 ff ff call 801001b0 <bwrite>
brelse(lbuf);
80102c01: 89 34 24 mov %esi,(%esp)
80102c04: e8 e7 d5 ff ff call 801001f0 <brelse>
brelse(dbuf);
80102c09: 89 1c 24 mov %ebx,(%esp)
80102c0c: e8 df d5 ff ff call 801001f0 <brelse>
for (tail = 0; tail < log.lh.n; tail++) {
80102c11: 83 c4 10 add $0x10,%esp
80102c14: 39 3d c8 36 11 80 cmp %edi,0x801136c8
80102c1a: 7f 94 jg 80102bb0 <install_trans+0x20>
}
}
80102c1c: 8d 65 f4 lea -0xc(%ebp),%esp
80102c1f: 5b pop %ebx
80102c20: 5e pop %esi
80102c21: 5f pop %edi
80102c22: 5d pop %ebp
80102c23: c3 ret
80102c24: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80102c28: c3 ret
80102c29: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80102c30 <write_head>:
// Write in-memory log header to disk.
// This is the true point at which the
// current transaction commits.
static void
write_head(void)
{
80102c30: 55 push %ebp
80102c31: 89 e5 mov %esp,%ebp
80102c33: 53 push %ebx
80102c34: 83 ec 0c sub $0xc,%esp
struct buf *buf = bread(log.dev, log.start);
80102c37: ff 35 b4 36 11 80 pushl 0x801136b4
80102c3d: ff 35 c4 36 11 80 pushl 0x801136c4
80102c43: e8 88 d4 ff ff call 801000d0 <bread>
struct logheader *hb = (struct logheader *) (buf->data);
int i;
hb->n = log.lh.n;
for (i = 0; i < log.lh.n; i++) {
80102c48: 83 c4 10 add $0x10,%esp
struct buf *buf = bread(log.dev, log.start);
80102c4b: 89 c3 mov %eax,%ebx
hb->n = log.lh.n;
80102c4d: a1 c8 36 11 80 mov 0x801136c8,%eax
80102c52: 89 43 5c mov %eax,0x5c(%ebx)
for (i = 0; i < log.lh.n; i++) {
80102c55: 85 c0 test %eax,%eax
80102c57: 7e 19 jle 80102c72 <write_head+0x42>
80102c59: 31 d2 xor %edx,%edx
80102c5b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80102c5f: 90 nop
hb->block[i] = log.lh.block[i];
80102c60: 8b 0c 95 cc 36 11 80 mov -0x7feec934(,%edx,4),%ecx
80102c67: 89 4c 93 60 mov %ecx,0x60(%ebx,%edx,4)
for (i = 0; i < log.lh.n; i++) {
80102c6b: 83 c2 01 add $0x1,%edx
80102c6e: 39 d0 cmp %edx,%eax
80102c70: 75 ee jne 80102c60 <write_head+0x30>
}
bwrite(buf);
80102c72: 83 ec 0c sub $0xc,%esp
80102c75: 53 push %ebx
80102c76: e8 35 d5 ff ff call 801001b0 <bwrite>
brelse(buf);
80102c7b: 89 1c 24 mov %ebx,(%esp)
80102c7e: e8 6d d5 ff ff call 801001f0 <brelse>
}
80102c83: 8b 5d fc mov -0x4(%ebp),%ebx
80102c86: 83 c4 10 add $0x10,%esp
80102c89: c9 leave
80102c8a: c3 ret
80102c8b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80102c8f: 90 nop
80102c90 <initlog>:
{
80102c90: f3 0f 1e fb endbr32
80102c94: 55 push %ebp
80102c95: 89 e5 mov %esp,%ebp
80102c97: 53 push %ebx
80102c98: 83 ec 2c sub $0x2c,%esp
80102c9b: 8b 5d 08 mov 0x8(%ebp),%ebx
initlock(&log.lock, "log");
80102c9e: 68 80 7c 10 80 push $0x80107c80
80102ca3: 68 80 36 11 80 push $0x80113680
80102ca8: e8 63 1d 00 00 call 80104a10 <initlock>
readsb(dev, &sb);
80102cad: 58 pop %eax
80102cae: 8d 45 dc lea -0x24(%ebp),%eax
80102cb1: 5a pop %edx
80102cb2: 50 push %eax
80102cb3: 53 push %ebx
80102cb4: e8 47 e8 ff ff call 80101500 <readsb>
log.start = sb.logstart;
80102cb9: 8b 45 ec mov -0x14(%ebp),%eax
struct buf *buf = bread(log.dev, log.start);
80102cbc: 59 pop %ecx
log.dev = dev;
80102cbd: 89 1d c4 36 11 80 mov %ebx,0x801136c4
log.size = sb.nlog;
80102cc3: 8b 55 e8 mov -0x18(%ebp),%edx
log.start = sb.logstart;
80102cc6: a3 b4 36 11 80 mov %eax,0x801136b4
log.size = sb.nlog;
80102ccb: 89 15 b8 36 11 80 mov %edx,0x801136b8
struct buf *buf = bread(log.dev, log.start);
80102cd1: 5a pop %edx
80102cd2: 50 push %eax
80102cd3: 53 push %ebx
80102cd4: e8 f7 d3 ff ff call 801000d0 <bread>
for (i = 0; i < log.lh.n; i++) {
80102cd9: 83 c4 10 add $0x10,%esp
log.lh.n = lh->n;
80102cdc: 8b 48 5c mov 0x5c(%eax),%ecx
80102cdf: 89 0d c8 36 11 80 mov %ecx,0x801136c8
for (i = 0; i < log.lh.n; i++) {
80102ce5: 85 c9 test %ecx,%ecx
80102ce7: 7e 19 jle 80102d02 <initlog+0x72>
80102ce9: 31 d2 xor %edx,%edx
80102ceb: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80102cef: 90 nop
log.lh.block[i] = lh->block[i];
80102cf0: 8b 5c 90 60 mov 0x60(%eax,%edx,4),%ebx
80102cf4: 89 1c 95 cc 36 11 80 mov %ebx,-0x7feec934(,%edx,4)
for (i = 0; i < log.lh.n; i++) {
80102cfb: 83 c2 01 add $0x1,%edx
80102cfe: 39 d1 cmp %edx,%ecx
80102d00: 75 ee jne 80102cf0 <initlog+0x60>
brelse(buf);
80102d02: 83 ec 0c sub $0xc,%esp
80102d05: 50 push %eax
80102d06: e8 e5 d4 ff ff call 801001f0 <brelse>
static void
recover_from_log(void)
{
read_head();
install_trans(); // if committed, copy from log to disk
80102d0b: e8 80 fe ff ff call 80102b90 <install_trans>
log.lh.n = 0;
80102d10: c7 05 c8 36 11 80 00 movl $0x0,0x801136c8
80102d17: 00 00 00
write_head(); // clear the log
80102d1a: e8 11 ff ff ff call 80102c30 <write_head>
}
80102d1f: 8b 5d fc mov -0x4(%ebp),%ebx
80102d22: 83 c4 10 add $0x10,%esp
80102d25: c9 leave
80102d26: c3 ret
80102d27: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80102d2e: 66 90 xchg %ax,%ax
80102d30 <begin_op>:
}
// called at the start of each FS system call.
void
begin_op(void)
{
80102d30: f3 0f 1e fb endbr32
80102d34: 55 push %ebp
80102d35: 89 e5 mov %esp,%ebp
80102d37: 83 ec 14 sub $0x14,%esp
acquire(&log.lock);
80102d3a: 68 80 36 11 80 push $0x80113680
80102d3f: e8 4c 1e 00 00 call 80104b90 <acquire>
80102d44: 83 c4 10 add $0x10,%esp
80102d47: eb 1c jmp 80102d65 <begin_op+0x35>
80102d49: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
while(1){
if(log.committing){
sleep(&log, &log.lock);
80102d50: 83 ec 08 sub $0x8,%esp
80102d53: 68 80 36 11 80 push $0x80113680
80102d58: 68 80 36 11 80 push $0x80113680
80102d5d: e8 0e 14 00 00 call 80104170 <sleep>
80102d62: 83 c4 10 add $0x10,%esp
if(log.committing){
80102d65: a1 c0 36 11 80 mov 0x801136c0,%eax
80102d6a: 85 c0 test %eax,%eax
80102d6c: 75 e2 jne 80102d50 <begin_op+0x20>
} else if(log.lh.n + (log.outstanding+1)*MAXOPBLOCKS > LOGSIZE){
80102d6e: a1 bc 36 11 80 mov 0x801136bc,%eax
80102d73: 8b 15 c8 36 11 80 mov 0x801136c8,%edx
80102d79: 83 c0 01 add $0x1,%eax
80102d7c: 8d 0c 80 lea (%eax,%eax,4),%ecx
80102d7f: 8d 14 4a lea (%edx,%ecx,2),%edx
80102d82: 83 fa 1e cmp $0x1e,%edx
80102d85: 7f c9 jg 80102d50 <begin_op+0x20>
// this op might exhaust log space; wait for commit.
sleep(&log, &log.lock);
} else {
log.outstanding += 1;
release(&log.lock);
80102d87: 83 ec 0c sub $0xc,%esp
log.outstanding += 1;
80102d8a: a3 bc 36 11 80 mov %eax,0x801136bc
release(&log.lock);
80102d8f: 68 80 36 11 80 push $0x80113680
80102d94: e8 b7 1e 00 00 call 80104c50 <release>
break;
}
}
}
80102d99: 83 c4 10 add $0x10,%esp
80102d9c: c9 leave
80102d9d: c3 ret
80102d9e: 66 90 xchg %ax,%ax
80102da0 <end_op>:
// called at the end of each FS system call.
// commits if this was the last outstanding operation.
void
end_op(void)
{
80102da0: f3 0f 1e fb endbr32
80102da4: 55 push %ebp
80102da5: 89 e5 mov %esp,%ebp
80102da7: 57 push %edi
80102da8: 56 push %esi
80102da9: 53 push %ebx
80102daa: 83 ec 18 sub $0x18,%esp
int do_commit = 0;
acquire(&log.lock);
80102dad: 68 80 36 11 80 push $0x80113680
80102db2: e8 d9 1d 00 00 call 80104b90 <acquire>
log.outstanding -= 1;
80102db7: a1 bc 36 11 80 mov 0x801136bc,%eax
if(log.committing)
80102dbc: 8b 35 c0 36 11 80 mov 0x801136c0,%esi
80102dc2: 83 c4 10 add $0x10,%esp
log.outstanding -= 1;
80102dc5: 8d 58 ff lea -0x1(%eax),%ebx
80102dc8: 89 1d bc 36 11 80 mov %ebx,0x801136bc
if(log.committing)
80102dce: 85 f6 test %esi,%esi
80102dd0: 0f 85 1e 01 00 00 jne 80102ef4 <end_op+0x154>
panic("log.committing");
if(log.outstanding == 0){
80102dd6: 85 db test %ebx,%ebx
80102dd8: 0f 85 f2 00 00 00 jne 80102ed0 <end_op+0x130>
do_commit = 1;
log.committing = 1;
80102dde: c7 05 c0 36 11 80 01 movl $0x1,0x801136c0
80102de5: 00 00 00
// begin_op() may be waiting for log space,
// and decrementing log.outstanding has decreased
// the amount of reserved space.
wakeup(&log);
}
release(&log.lock);
80102de8: 83 ec 0c sub $0xc,%esp
80102deb: 68 80 36 11 80 push $0x80113680
80102df0: e8 5b 1e 00 00 call 80104c50 <release>
}
static void
commit()
{
if (log.lh.n > 0) {
80102df5: 8b 0d c8 36 11 80 mov 0x801136c8,%ecx
80102dfb: 83 c4 10 add $0x10,%esp
80102dfe: 85 c9 test %ecx,%ecx
80102e00: 7f 3e jg 80102e40 <end_op+0xa0>
acquire(&log.lock);
80102e02: 83 ec 0c sub $0xc,%esp
80102e05: 68 80 36 11 80 push $0x80113680
80102e0a: e8 81 1d 00 00 call 80104b90 <acquire>
wakeup(&log);
80102e0f: c7 04 24 80 36 11 80 movl $0x80113680,(%esp)
log.committing = 0;
80102e16: c7 05 c0 36 11 80 00 movl $0x0,0x801136c0
80102e1d: 00 00 00
wakeup(&log);
80102e20: e8 5b 16 00 00 call 80104480 <wakeup>
release(&log.lock);
80102e25: c7 04 24 80 36 11 80 movl $0x80113680,(%esp)
80102e2c: e8 1f 1e 00 00 call 80104c50 <release>
80102e31: 83 c4 10 add $0x10,%esp
}
80102e34: 8d 65 f4 lea -0xc(%ebp),%esp
80102e37: 5b pop %ebx
80102e38: 5e pop %esi
80102e39: 5f pop %edi
80102e3a: 5d pop %ebp
80102e3b: c3 ret
80102e3c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
struct buf *to = bread(log.dev, log.start+tail+1); // log block
80102e40: a1 b4 36 11 80 mov 0x801136b4,%eax
80102e45: 83 ec 08 sub $0x8,%esp
80102e48: 01 d8 add %ebx,%eax
80102e4a: 83 c0 01 add $0x1,%eax
80102e4d: 50 push %eax
80102e4e: ff 35 c4 36 11 80 pushl 0x801136c4
80102e54: e8 77 d2 ff ff call 801000d0 <bread>
80102e59: 89 c6 mov %eax,%esi
struct buf *from = bread(log.dev, log.lh.block[tail]); // cache block
80102e5b: 58 pop %eax
80102e5c: 5a pop %edx
80102e5d: ff 34 9d cc 36 11 80 pushl -0x7feec934(,%ebx,4)
80102e64: ff 35 c4 36 11 80 pushl 0x801136c4
for (tail = 0; tail < log.lh.n; tail++) {
80102e6a: 83 c3 01 add $0x1,%ebx
struct buf *from = bread(log.dev, log.lh.block[tail]); // cache block
80102e6d: e8 5e d2 ff ff call 801000d0 <bread>
memmove(to->data, from->data, BSIZE);
80102e72: 83 c4 0c add $0xc,%esp
struct buf *from = bread(log.dev, log.lh.block[tail]); // cache block
80102e75: 89 c7 mov %eax,%edi
memmove(to->data, from->data, BSIZE);
80102e77: 8d 40 5c lea 0x5c(%eax),%eax
80102e7a: 68 00 02 00 00 push $0x200
80102e7f: 50 push %eax
80102e80: 8d 46 5c lea 0x5c(%esi),%eax
80102e83: 50 push %eax
80102e84: e8 b7 1e 00 00 call 80104d40 <memmove>
bwrite(to); // write the log
80102e89: 89 34 24 mov %esi,(%esp)
80102e8c: e8 1f d3 ff ff call 801001b0 <bwrite>
brelse(from);
80102e91: 89 3c 24 mov %edi,(%esp)
80102e94: e8 57 d3 ff ff call 801001f0 <brelse>
brelse(to);
80102e99: 89 34 24 mov %esi,(%esp)
80102e9c: e8 4f d3 ff ff call 801001f0 <brelse>
for (tail = 0; tail < log.lh.n; tail++) {
80102ea1: 83 c4 10 add $0x10,%esp
80102ea4: 3b 1d c8 36 11 80 cmp 0x801136c8,%ebx
80102eaa: 7c 94 jl 80102e40 <end_op+0xa0>
write_log(); // Write modified blocks from cache to log
write_head(); // Write header to disk -- the real commit
80102eac: e8 7f fd ff ff call 80102c30 <write_head>
install_trans(); // Now install writes to home locations
80102eb1: e8 da fc ff ff call 80102b90 <install_trans>
log.lh.n = 0;
80102eb6: c7 05 c8 36 11 80 00 movl $0x0,0x801136c8
80102ebd: 00 00 00
write_head(); // Erase the transaction from the log
80102ec0: e8 6b fd ff ff call 80102c30 <write_head>
80102ec5: e9 38 ff ff ff jmp 80102e02 <end_op+0x62>
80102eca: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
wakeup(&log);
80102ed0: 83 ec 0c sub $0xc,%esp
80102ed3: 68 80 36 11 80 push $0x80113680
80102ed8: e8 a3 15 00 00 call 80104480 <wakeup>
release(&log.lock);
80102edd: c7 04 24 80 36 11 80 movl $0x80113680,(%esp)
80102ee4: e8 67 1d 00 00 call 80104c50 <release>
80102ee9: 83 c4 10 add $0x10,%esp
}
80102eec: 8d 65 f4 lea -0xc(%ebp),%esp
80102eef: 5b pop %ebx
80102ef0: 5e pop %esi
80102ef1: 5f pop %edi
80102ef2: 5d pop %ebp
80102ef3: c3 ret
panic("log.committing");
80102ef4: 83 ec 0c sub $0xc,%esp
80102ef7: 68 84 7c 10 80 push $0x80107c84
80102efc: e8 8f d4 ff ff call 80100390 <panic>
80102f01: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80102f08: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80102f0f: 90 nop
80102f10 <log_write>:
// modify bp->data[]
// log_write(bp)
// brelse(bp)
void
log_write(struct buf *b)
{
80102f10: f3 0f 1e fb endbr32
80102f14: 55 push %ebp
80102f15: 89 e5 mov %esp,%ebp
80102f17: 53 push %ebx
80102f18: 83 ec 04 sub $0x4,%esp
int i;
if (log.lh.n >= LOGSIZE || log.lh.n >= log.size - 1)
80102f1b: 8b 15 c8 36 11 80 mov 0x801136c8,%edx
{
80102f21: 8b 5d 08 mov 0x8(%ebp),%ebx
if (log.lh.n >= LOGSIZE || log.lh.n >= log.size - 1)
80102f24: 83 fa 1d cmp $0x1d,%edx
80102f27: 0f 8f 91 00 00 00 jg 80102fbe <log_write+0xae>
80102f2d: a1 b8 36 11 80 mov 0x801136b8,%eax
80102f32: 83 e8 01 sub $0x1,%eax
80102f35: 39 c2 cmp %eax,%edx
80102f37: 0f 8d 81 00 00 00 jge 80102fbe <log_write+0xae>
panic("too big a transaction");
if (log.outstanding < 1)
80102f3d: a1 bc 36 11 80 mov 0x801136bc,%eax
80102f42: 85 c0 test %eax,%eax
80102f44: 0f 8e 81 00 00 00 jle 80102fcb <log_write+0xbb>
panic("log_write outside of trans");
acquire(&log.lock);
80102f4a: 83 ec 0c sub $0xc,%esp
80102f4d: 68 80 36 11 80 push $0x80113680
80102f52: e8 39 1c 00 00 call 80104b90 <acquire>
for (i = 0; i < log.lh.n; i++) {
80102f57: 8b 15 c8 36 11 80 mov 0x801136c8,%edx
80102f5d: 83 c4 10 add $0x10,%esp
80102f60: 85 d2 test %edx,%edx
80102f62: 7e 4e jle 80102fb2 <log_write+0xa2>
if (log.lh.block[i] == b->blockno) // log absorbtion
80102f64: 8b 4b 08 mov 0x8(%ebx),%ecx
for (i = 0; i < log.lh.n; i++) {
80102f67: 31 c0 xor %eax,%eax
80102f69: eb 0c jmp 80102f77 <log_write+0x67>
80102f6b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80102f6f: 90 nop
80102f70: 83 c0 01 add $0x1,%eax
80102f73: 39 c2 cmp %eax,%edx
80102f75: 74 29 je 80102fa0 <log_write+0x90>
if (log.lh.block[i] == b->blockno) // log absorbtion
80102f77: 39 0c 85 cc 36 11 80 cmp %ecx,-0x7feec934(,%eax,4)
80102f7e: 75 f0 jne 80102f70 <log_write+0x60>
break;
}
log.lh.block[i] = b->blockno;
80102f80: 89 0c 85 cc 36 11 80 mov %ecx,-0x7feec934(,%eax,4)
if (i == log.lh.n)
log.lh.n++;
b->flags |= B_DIRTY; // prevent eviction
80102f87: 83 0b 04 orl $0x4,(%ebx)
release(&log.lock);
}
80102f8a: 8b 5d fc mov -0x4(%ebp),%ebx
release(&log.lock);
80102f8d: c7 45 08 80 36 11 80 movl $0x80113680,0x8(%ebp)
}
80102f94: c9 leave
release(&log.lock);
80102f95: e9 b6 1c 00 00 jmp 80104c50 <release>
80102f9a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
log.lh.block[i] = b->blockno;
80102fa0: 89 0c 95 cc 36 11 80 mov %ecx,-0x7feec934(,%edx,4)
log.lh.n++;
80102fa7: 83 c2 01 add $0x1,%edx
80102faa: 89 15 c8 36 11 80 mov %edx,0x801136c8
80102fb0: eb d5 jmp 80102f87 <log_write+0x77>
log.lh.block[i] = b->blockno;
80102fb2: 8b 43 08 mov 0x8(%ebx),%eax
80102fb5: a3 cc 36 11 80 mov %eax,0x801136cc
if (i == log.lh.n)
80102fba: 75 cb jne 80102f87 <log_write+0x77>
80102fbc: eb e9 jmp 80102fa7 <log_write+0x97>
panic("too big a transaction");
80102fbe: 83 ec 0c sub $0xc,%esp
80102fc1: 68 93 7c 10 80 push $0x80107c93
80102fc6: e8 c5 d3 ff ff call 80100390 <panic>
panic("log_write outside of trans");
80102fcb: 83 ec 0c sub $0xc,%esp
80102fce: 68 a9 7c 10 80 push $0x80107ca9
80102fd3: e8 b8 d3 ff ff call 80100390 <panic>
80102fd8: 66 90 xchg %ax,%ax
80102fda: 66 90 xchg %ax,%ax
80102fdc: 66 90 xchg %ax,%ax
80102fde: 66 90 xchg %ax,%ax
80102fe0 <mpmain>:
}
// Common CPU setup code.
static void
mpmain(void)
{
80102fe0: 55 push %ebp
80102fe1: 89 e5 mov %esp,%ebp
80102fe3: 53 push %ebx
80102fe4: 83 ec 04 sub $0x4,%esp
cprintf("cpu%d: starting %d\n", cpuid(), cpuid());
80102fe7: e8 54 0a 00 00 call 80103a40 <cpuid>
80102fec: 89 c3 mov %eax,%ebx
80102fee: e8 4d 0a 00 00 call 80103a40 <cpuid>
80102ff3: 83 ec 04 sub $0x4,%esp
80102ff6: 53 push %ebx
80102ff7: 50 push %eax
80102ff8: 68 c4 7c 10 80 push $0x80107cc4
80102ffd: e8 ae d6 ff ff call 801006b0 <cprintf>
idtinit(); // load idt register
80103002: e8 f9 2f 00 00 call 80106000 <idtinit>
xchg(&(mycpu()->started), 1); // tell startothers() we're up
80103007: e8 c4 09 00 00 call 801039d0 <mycpu>
8010300c: 89 c2 mov %eax,%edx
xchg(volatile uint *addr, uint newval)
{
uint result;
// The + in "+m" denotes a read-modify-write operand.
asm volatile("lock; xchgl %0, %1" :
8010300e: b8 01 00 00 00 mov $0x1,%eax
80103013: f0 87 82 a0 00 00 00 lock xchg %eax,0xa0(%edx)
scheduler(); // start running processes
8010301a: e8 a1 0d 00 00 call 80103dc0 <scheduler>
8010301f: 90 nop
80103020 <mpenter>:
{
80103020: f3 0f 1e fb endbr32
80103024: 55 push %ebp
80103025: 89 e5 mov %esp,%ebp
80103027: 83 ec 08 sub $0x8,%esp
switchkvm();
8010302a: e8 b1 40 00 00 call 801070e0 <switchkvm>
seginit();
8010302f: e8 1c 40 00 00 call 80107050 <seginit>
lapicinit();
80103034: e8 67 f7 ff ff call 801027a0 <lapicinit>
mpmain();
80103039: e8 a2 ff ff ff call 80102fe0 <mpmain>
8010303e: 66 90 xchg %ax,%ax
80103040 <main>:
{
80103040: f3 0f 1e fb endbr32
80103044: 8d 4c 24 04 lea 0x4(%esp),%ecx
80103048: 83 e4 f0 and $0xfffffff0,%esp
8010304b: ff 71 fc pushl -0x4(%ecx)
8010304e: 55 push %ebp
8010304f: 89 e5 mov %esp,%ebp
80103051: 53 push %ebx
80103052: 51 push %ecx
kinit1(end, P2V(4*1024*1024)); // phys page allocator
80103053: 83 ec 08 sub $0x8,%esp
80103056: 68 00 00 40 80 push $0x80400000
8010305b: 68 a8 73 11 80 push $0x801173a8
80103060: e8 fb f4 ff ff call 80102560 <kinit1>
kvmalloc(); // kernel page table
80103065: e8 56 45 00 00 call 801075c0 <kvmalloc>
mpinit(); // detect other processors
8010306a: e8 81 01 00 00 call 801031f0 <mpinit>
lapicinit(); // interrupt controller
8010306f: e8 2c f7 ff ff call 801027a0 <lapicinit>
seginit(); // segment descriptors
80103074: e8 d7 3f 00 00 call 80107050 <seginit>
picinit(); // disable pic
80103079: e8 52 03 00 00 call 801033d0 <picinit>
ioapicinit(); // another interrupt controller
8010307e: e8 fd f2 ff ff call 80102380 <ioapicinit>
consoleinit(); // console hardware
80103083: e8 a8 d9 ff ff call 80100a30 <consoleinit>
uartinit(); // serial port
80103088: e8 83 32 00 00 call 80106310 <uartinit>
pinit(); // process table
8010308d: e8 1e 09 00 00 call 801039b0 <pinit>
tvinit(); // trap vectors
80103092: e8 e9 2e 00 00 call 80105f80 <tvinit>
binit(); // buffer cache
80103097: e8 a4 cf ff ff call 80100040 <binit>
fileinit(); // file table
8010309c: e8 3f dd ff ff call 80100de0 <fileinit>
ideinit(); // disk
801030a1: e8 aa f0 ff ff call 80102150 <ideinit>
// Write entry code to unused memory at 0x7000.
// The linker has placed the image of entryother.S in
// _binary_entryother_start.
code = P2V(0x7000);
memmove(code, _binary_entryother_start, (uint)_binary_entryother_size);
801030a6: 83 c4 0c add $0xc,%esp
801030a9: 68 8a 00 00 00 push $0x8a
801030ae: 68 8c b4 10 80 push $0x8010b48c
801030b3: 68 00 70 00 80 push $0x80007000
801030b8: e8 83 1c 00 00 call 80104d40 <memmove>
for(c = cpus; c < cpus+ncpu; c++){
801030bd: 83 c4 10 add $0x10,%esp
801030c0: 69 05 00 3d 11 80 b0 imul $0xb0,0x80113d00,%eax
801030c7: 00 00 00
801030ca: 05 80 37 11 80 add $0x80113780,%eax
801030cf: 3d 80 37 11 80 cmp $0x80113780,%eax
801030d4: 76 7a jbe 80103150 <main+0x110>
801030d6: bb 80 37 11 80 mov $0x80113780,%ebx
801030db: eb 1c jmp 801030f9 <main+0xb9>
801030dd: 8d 76 00 lea 0x0(%esi),%esi
801030e0: 69 05 00 3d 11 80 b0 imul $0xb0,0x80113d00,%eax
801030e7: 00 00 00
801030ea: 81 c3 b0 00 00 00 add $0xb0,%ebx
801030f0: 05 80 37 11 80 add $0x80113780,%eax
801030f5: 39 c3 cmp %eax,%ebx
801030f7: 73 57 jae 80103150 <main+0x110>
if(c == mycpu()) // We've started already.
801030f9: e8 d2 08 00 00 call 801039d0 <mycpu>
801030fe: 39 c3 cmp %eax,%ebx
80103100: 74 de je 801030e0 <main+0xa0>
continue;
// Tell entryother.S what stack to use, where to enter, and what
// pgdir to use. We cannot use kpgdir yet, because the AP processor
// is running in low memory, so we use entrypgdir for the APs too.
stack = kalloc();
80103102: e8 29 f5 ff ff call 80102630 <kalloc>
*(void**)(code-4) = stack + KSTACKSIZE;
*(void(**)(void))(code-8) = mpenter;
*(int**)(code-12) = (void *) V2P(entrypgdir);
lapicstartap(c->apicid, V2P(code));
80103107: 83 ec 08 sub $0x8,%esp
*(void(**)(void))(code-8) = mpenter;
8010310a: c7 05 f8 6f 00 80 20 movl $0x80103020,0x80006ff8
80103111: 30 10 80
*(int**)(code-12) = (void *) V2P(entrypgdir);
80103114: c7 05 f4 6f 00 80 00 movl $0x10a000,0x80006ff4
8010311b: a0 10 00
*(void**)(code-4) = stack + KSTACKSIZE;
8010311e: 05 00 10 00 00 add $0x1000,%eax
80103123: a3 fc 6f 00 80 mov %eax,0x80006ffc
lapicstartap(c->apicid, V2P(code));
80103128: 0f b6 03 movzbl (%ebx),%eax
8010312b: 68 00 70 00 00 push $0x7000
80103130: 50 push %eax
80103131: e8 ba f7 ff ff call 801028f0 <lapicstartap>
// wait for cpu to finish mpmain()
while(c->started == 0)
80103136: 83 c4 10 add $0x10,%esp
80103139: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80103140: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax
80103146: 85 c0 test %eax,%eax
80103148: 74 f6 je 80103140 <main+0x100>
8010314a: eb 94 jmp 801030e0 <main+0xa0>
8010314c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
kinit2(P2V(4*1024*1024), P2V(PHYSTOP)); // must come after startothers()
80103150: 83 ec 08 sub $0x8,%esp
80103153: 68 00 00 00 8e push $0x8e000000
80103158: 68 00 00 40 80 push $0x80400000
8010315d: e8 6e f4 ff ff call 801025d0 <kinit2>
userinit(); // first user process
80103162: e8 29 09 00 00 call 80103a90 <userinit>
mpmain(); // finish this processor's setup
80103167: e8 74 fe ff ff call 80102fe0 <mpmain>
8010316c: 66 90 xchg %ax,%ax
8010316e: 66 90 xchg %ax,%ax
80103170 <mpsearch1>:
}
// Look for an MP structure in the len bytes at addr.
static struct mp*
mpsearch1(uint a, int len)
{
80103170: 55 push %ebp
80103171: 89 e5 mov %esp,%ebp
80103173: 57 push %edi
80103174: 56 push %esi
uchar *e, *p, *addr;
addr = P2V(a);
80103175: 8d b0 00 00 00 80 lea -0x80000000(%eax),%esi
{
8010317b: 53 push %ebx
e = addr+len;
8010317c: 8d 1c 16 lea (%esi,%edx,1),%ebx
{
8010317f: 83 ec 0c sub $0xc,%esp
for(p = addr; p < e; p += sizeof(struct mp))
80103182: 39 de cmp %ebx,%esi
80103184: 72 10 jb 80103196 <mpsearch1+0x26>
80103186: eb 50 jmp 801031d8 <mpsearch1+0x68>
80103188: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010318f: 90 nop
80103190: 89 fe mov %edi,%esi
80103192: 39 fb cmp %edi,%ebx
80103194: 76 42 jbe 801031d8 <mpsearch1+0x68>
if(memcmp(p, "_MP_", 4) == 0 && sum(p, sizeof(struct mp)) == 0)
80103196: 83 ec 04 sub $0x4,%esp
80103199: 8d 7e 10 lea 0x10(%esi),%edi
8010319c: 6a 04 push $0x4
8010319e: 68 d8 7c 10 80 push $0x80107cd8
801031a3: 56 push %esi
801031a4: e8 47 1b 00 00 call 80104cf0 <memcmp>
801031a9: 83 c4 10 add $0x10,%esp
801031ac: 85 c0 test %eax,%eax
801031ae: 75 e0 jne 80103190 <mpsearch1+0x20>
801031b0: 89 f2 mov %esi,%edx
801031b2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
sum += addr[i];
801031b8: 0f b6 0a movzbl (%edx),%ecx
801031bb: 83 c2 01 add $0x1,%edx
801031be: 01 c8 add %ecx,%eax
for(i=0; i<len; i++)
801031c0: 39 fa cmp %edi,%edx
801031c2: 75 f4 jne 801031b8 <mpsearch1+0x48>
if(memcmp(p, "_MP_", 4) == 0 && sum(p, sizeof(struct mp)) == 0)
801031c4: 84 c0 test %al,%al
801031c6: 75 c8 jne 80103190 <mpsearch1+0x20>
return (struct mp*)p;
return 0;
}
801031c8: 8d 65 f4 lea -0xc(%ebp),%esp
801031cb: 89 f0 mov %esi,%eax
801031cd: 5b pop %ebx
801031ce: 5e pop %esi
801031cf: 5f pop %edi
801031d0: 5d pop %ebp
801031d1: c3 ret
801031d2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801031d8: 8d 65 f4 lea -0xc(%ebp),%esp
return 0;
801031db: 31 f6 xor %esi,%esi
}
801031dd: 5b pop %ebx
801031de: 89 f0 mov %esi,%eax
801031e0: 5e pop %esi
801031e1: 5f pop %edi
801031e2: 5d pop %ebp
801031e3: c3 ret
801031e4: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801031eb: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801031ef: 90 nop
801031f0 <mpinit>:
return conf;
}
void
mpinit(void)
{
801031f0: f3 0f 1e fb endbr32
801031f4: 55 push %ebp
801031f5: 89 e5 mov %esp,%ebp
801031f7: 57 push %edi
801031f8: 56 push %esi
801031f9: 53 push %ebx
801031fa: 83 ec 1c sub $0x1c,%esp
if((p = ((bda[0x0F]<<8)| bda[0x0E]) << 4)){
801031fd: 0f b6 05 0f 04 00 80 movzbl 0x8000040f,%eax
80103204: 0f b6 15 0e 04 00 80 movzbl 0x8000040e,%edx
8010320b: c1 e0 08 shl $0x8,%eax
8010320e: 09 d0 or %edx,%eax
80103210: c1 e0 04 shl $0x4,%eax
80103213: 75 1b jne 80103230 <mpinit+0x40>
p = ((bda[0x14]<<8)|bda[0x13])*1024;
80103215: 0f b6 05 14 04 00 80 movzbl 0x80000414,%eax
8010321c: 0f b6 15 13 04 00 80 movzbl 0x80000413,%edx
80103223: c1 e0 08 shl $0x8,%eax
80103226: 09 d0 or %edx,%eax
80103228: c1 e0 0a shl $0xa,%eax
if((mp = mpsearch1(p-1024, 1024)))
8010322b: 2d 00 04 00 00 sub $0x400,%eax
if((mp = mpsearch1(p, 1024)))
80103230: ba 00 04 00 00 mov $0x400,%edx
80103235: e8 36 ff ff ff call 80103170 <mpsearch1>
8010323a: 89 c6 mov %eax,%esi
8010323c: 85 c0 test %eax,%eax
8010323e: 0f 84 4c 01 00 00 je 80103390 <mpinit+0x1a0>
if((mp = mpsearch()) == 0 || mp->physaddr == 0)
80103244: 8b 5e 04 mov 0x4(%esi),%ebx
80103247: 85 db test %ebx,%ebx
80103249: 0f 84 61 01 00 00 je 801033b0 <mpinit+0x1c0>
if(memcmp(conf, "PCMP", 4) != 0)
8010324f: 83 ec 04 sub $0x4,%esp
conf = (struct mpconf*) P2V((uint) mp->physaddr);
80103252: 8d 83 00 00 00 80 lea -0x80000000(%ebx),%eax
if(memcmp(conf, "PCMP", 4) != 0)
80103258: 6a 04 push $0x4
8010325a: 68 dd 7c 10 80 push $0x80107cdd
8010325f: 50 push %eax
conf = (struct mpconf*) P2V((uint) mp->physaddr);
80103260: 89 45 e4 mov %eax,-0x1c(%ebp)
if(memcmp(conf, "PCMP", 4) != 0)
80103263: e8 88 1a 00 00 call 80104cf0 <memcmp>
80103268: 83 c4 10 add $0x10,%esp
8010326b: 85 c0 test %eax,%eax
8010326d: 0f 85 3d 01 00 00 jne 801033b0 <mpinit+0x1c0>
if(conf->version != 1 && conf->version != 4)
80103273: 0f b6 83 06 00 00 80 movzbl -0x7ffffffa(%ebx),%eax
8010327a: 3c 01 cmp $0x1,%al
8010327c: 74 08 je 80103286 <mpinit+0x96>
8010327e: 3c 04 cmp $0x4,%al
80103280: 0f 85 2a 01 00 00 jne 801033b0 <mpinit+0x1c0>
if(sum((uchar*)conf, conf->length) != 0)
80103286: 0f b7 93 04 00 00 80 movzwl -0x7ffffffc(%ebx),%edx
for(i=0; i<len; i++)
8010328d: 66 85 d2 test %dx,%dx
80103290: 74 26 je 801032b8 <mpinit+0xc8>
80103292: 8d 3c 1a lea (%edx,%ebx,1),%edi
80103295: 89 d8 mov %ebx,%eax
sum = 0;
80103297: 31 d2 xor %edx,%edx
80103299: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
sum += addr[i];
801032a0: 0f b6 88 00 00 00 80 movzbl -0x80000000(%eax),%ecx
801032a7: 83 c0 01 add $0x1,%eax
801032aa: 01 ca add %ecx,%edx
for(i=0; i<len; i++)
801032ac: 39 f8 cmp %edi,%eax
801032ae: 75 f0 jne 801032a0 <mpinit+0xb0>
if(sum((uchar*)conf, conf->length) != 0)
801032b0: 84 d2 test %dl,%dl
801032b2: 0f 85 f8 00 00 00 jne 801033b0 <mpinit+0x1c0>
struct mpioapic *ioapic;
if((conf = mpconfig(&mp)) == 0)
panic("Expect to run on an SMP");
ismp = 1;
lapic = (uint*)conf->lapicaddr;
801032b8: 8b 83 24 00 00 80 mov -0x7fffffdc(%ebx),%eax
801032be: a3 7c 36 11 80 mov %eax,0x8011367c
for(p=(uchar*)(conf+1), e=(uchar*)conf+conf->length; p<e; ){
801032c3: 8d 83 2c 00 00 80 lea -0x7fffffd4(%ebx),%eax
801032c9: 0f b7 93 04 00 00 80 movzwl -0x7ffffffc(%ebx),%edx
ismp = 1;
801032d0: bb 01 00 00 00 mov $0x1,%ebx
for(p=(uchar*)(conf+1), e=(uchar*)conf+conf->length; p<e; ){
801032d5: 03 55 e4 add -0x1c(%ebp),%edx
801032d8: 89 5d e4 mov %ebx,-0x1c(%ebp)
801032db: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801032df: 90 nop
801032e0: 39 c2 cmp %eax,%edx
801032e2: 76 15 jbe 801032f9 <mpinit+0x109>
switch(*p){
801032e4: 0f b6 08 movzbl (%eax),%ecx
801032e7: 80 f9 02 cmp $0x2,%cl
801032ea: 74 5c je 80103348 <mpinit+0x158>
801032ec: 77 42 ja 80103330 <mpinit+0x140>
801032ee: 84 c9 test %cl,%cl
801032f0: 74 6e je 80103360 <mpinit+0x170>
p += sizeof(struct mpioapic);
continue;
case MPBUS:
case MPIOINTR:
case MPLINTR:
p += 8;
801032f2: 83 c0 08 add $0x8,%eax
for(p=(uchar*)(conf+1), e=(uchar*)conf+conf->length; p<e; ){
801032f5: 39 c2 cmp %eax,%edx
801032f7: 77 eb ja 801032e4 <mpinit+0xf4>
801032f9: 8b 5d e4 mov -0x1c(%ebp),%ebx
default:
ismp = 0;
break;
}
}
if(!ismp)
801032fc: 85 db test %ebx,%ebx
801032fe: 0f 84 b9 00 00 00 je 801033bd <mpinit+0x1cd>
panic("Didn't find a suitable machine");
if(mp->imcrp){
80103304: 80 7e 0c 00 cmpb $0x0,0xc(%esi)
80103308: 74 15 je 8010331f <mpinit+0x12f>
asm volatile("out %0,%1" : : "a" (data), "d" (port));
8010330a: b8 70 00 00 00 mov $0x70,%eax
8010330f: ba 22 00 00 00 mov $0x22,%edx
80103314: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80103315: ba 23 00 00 00 mov $0x23,%edx
8010331a: ec in (%dx),%al
// Bochs doesn't support IMCR, so this doesn't run on Bochs.
// But it would on real hardware.
outb(0x22, 0x70); // Select IMCR
outb(0x23, inb(0x23) | 1); // Mask external interrupts.
8010331b: 83 c8 01 or $0x1,%eax
asm volatile("out %0,%1" : : "a" (data), "d" (port));
8010331e: ee out %al,(%dx)
}
}
8010331f: 8d 65 f4 lea -0xc(%ebp),%esp
80103322: 5b pop %ebx
80103323: 5e pop %esi
80103324: 5f pop %edi
80103325: 5d pop %ebp
80103326: c3 ret
80103327: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010332e: 66 90 xchg %ax,%ax
switch(*p){
80103330: 83 e9 03 sub $0x3,%ecx
80103333: 80 f9 01 cmp $0x1,%cl
80103336: 76 ba jbe 801032f2 <mpinit+0x102>
80103338: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
8010333f: eb 9f jmp 801032e0 <mpinit+0xf0>
80103341: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
ioapicid = ioapic->apicno;
80103348: 0f b6 48 01 movzbl 0x1(%eax),%ecx
p += sizeof(struct mpioapic);
8010334c: 83 c0 08 add $0x8,%eax
ioapicid = ioapic->apicno;
8010334f: 88 0d 60 37 11 80 mov %cl,0x80113760
continue;
80103355: eb 89 jmp 801032e0 <mpinit+0xf0>
80103357: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010335e: 66 90 xchg %ax,%ax
if(ncpu < NCPU) {
80103360: 8b 0d 00 3d 11 80 mov 0x80113d00,%ecx
80103366: 83 f9 07 cmp $0x7,%ecx
80103369: 7f 19 jg 80103384 <mpinit+0x194>
cpus[ncpu].apicid = proc->apicid; // apicid may differ from ncpu
8010336b: 69 f9 b0 00 00 00 imul $0xb0,%ecx,%edi
80103371: 0f b6 58 01 movzbl 0x1(%eax),%ebx
ncpu++;
80103375: 83 c1 01 add $0x1,%ecx
80103378: 89 0d 00 3d 11 80 mov %ecx,0x80113d00
cpus[ncpu].apicid = proc->apicid; // apicid may differ from ncpu
8010337e: 88 9f 80 37 11 80 mov %bl,-0x7feec880(%edi)
p += sizeof(struct mpproc);
80103384: 83 c0 14 add $0x14,%eax
continue;
80103387: e9 54 ff ff ff jmp 801032e0 <mpinit+0xf0>
8010338c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
return mpsearch1(0xF0000, 0x10000);
80103390: ba 00 00 01 00 mov $0x10000,%edx
80103395: b8 00 00 0f 00 mov $0xf0000,%eax
8010339a: e8 d1 fd ff ff call 80103170 <mpsearch1>
8010339f: 89 c6 mov %eax,%esi
if((mp = mpsearch()) == 0 || mp->physaddr == 0)
801033a1: 85 c0 test %eax,%eax
801033a3: 0f 85 9b fe ff ff jne 80103244 <mpinit+0x54>
801033a9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
panic("Expect to run on an SMP");
801033b0: 83 ec 0c sub $0xc,%esp
801033b3: 68 e2 7c 10 80 push $0x80107ce2
801033b8: e8 d3 cf ff ff call 80100390 <panic>
panic("Didn't find a suitable machine");
801033bd: 83 ec 0c sub $0xc,%esp
801033c0: 68 fc 7c 10 80 push $0x80107cfc
801033c5: e8 c6 cf ff ff call 80100390 <panic>
801033ca: 66 90 xchg %ax,%ax
801033cc: 66 90 xchg %ax,%ax
801033ce: 66 90 xchg %ax,%ax
801033d0 <picinit>:
#define IO_PIC2 0xA0 // Slave (IRQs 8-15)
// Don't use the 8259A interrupt controllers. Xv6 assumes SMP hardware.
void
picinit(void)
{
801033d0: f3 0f 1e fb endbr32
801033d4: b8 ff ff ff ff mov $0xffffffff,%eax
801033d9: ba 21 00 00 00 mov $0x21,%edx
801033de: ee out %al,(%dx)
801033df: ba a1 00 00 00 mov $0xa1,%edx
801033e4: ee out %al,(%dx)
// mask all interrupts
outb(IO_PIC1+1, 0xFF);
outb(IO_PIC2+1, 0xFF);
}
801033e5: c3 ret
801033e6: 66 90 xchg %ax,%ax
801033e8: 66 90 xchg %ax,%ax
801033ea: 66 90 xchg %ax,%ax
801033ec: 66 90 xchg %ax,%ax
801033ee: 66 90 xchg %ax,%ax
801033f0 <pipealloc>:
int writeopen; // write fd is still open
};
int
pipealloc(struct file **f0, struct file **f1)
{
801033f0: f3 0f 1e fb endbr32
801033f4: 55 push %ebp
801033f5: 89 e5 mov %esp,%ebp
801033f7: 57 push %edi
801033f8: 56 push %esi
801033f9: 53 push %ebx
801033fa: 83 ec 0c sub $0xc,%esp
801033fd: 8b 5d 08 mov 0x8(%ebp),%ebx
80103400: 8b 75 0c mov 0xc(%ebp),%esi
struct pipe *p;
p = 0;
*f0 = *f1 = 0;
80103403: c7 06 00 00 00 00 movl $0x0,(%esi)
80103409: c7 03 00 00 00 00 movl $0x0,(%ebx)
if((*f0 = filealloc()) == 0 || (*f1 = filealloc()) == 0)
8010340f: e8 ec d9 ff ff call 80100e00 <filealloc>
80103414: 89 03 mov %eax,(%ebx)
80103416: 85 c0 test %eax,%eax
80103418: 0f 84 ac 00 00 00 je 801034ca <pipealloc+0xda>
8010341e: e8 dd d9 ff ff call 80100e00 <filealloc>
80103423: 89 06 mov %eax,(%esi)
80103425: 85 c0 test %eax,%eax
80103427: 0f 84 8b 00 00 00 je 801034b8 <pipealloc+0xc8>
goto bad;
if((p = (struct pipe*)kalloc()) == 0)
8010342d: e8 fe f1 ff ff call 80102630 <kalloc>
80103432: 89 c7 mov %eax,%edi
80103434: 85 c0 test %eax,%eax
80103436: 0f 84 b4 00 00 00 je 801034f0 <pipealloc+0x100>
goto bad;
p->readopen = 1;
8010343c: c7 80 3c 02 00 00 01 movl $0x1,0x23c(%eax)
80103443: 00 00 00
p->writeopen = 1;
p->nwrite = 0;
p->nread = 0;
initlock(&p->lock, "pipe");
80103446: 83 ec 08 sub $0x8,%esp
p->writeopen = 1;
80103449: c7 80 40 02 00 00 01 movl $0x1,0x240(%eax)
80103450: 00 00 00
p->nwrite = 0;
80103453: c7 80 38 02 00 00 00 movl $0x0,0x238(%eax)
8010345a: 00 00 00
p->nread = 0;
8010345d: c7 80 34 02 00 00 00 movl $0x0,0x234(%eax)
80103464: 00 00 00
initlock(&p->lock, "pipe");
80103467: 68 1b 7d 10 80 push $0x80107d1b
8010346c: 50 push %eax
8010346d: e8 9e 15 00 00 call 80104a10 <initlock>
(*f0)->type = FD_PIPE;
80103472: 8b 03 mov (%ebx),%eax
(*f0)->pipe = p;
(*f1)->type = FD_PIPE;
(*f1)->readable = 0;
(*f1)->writable = 1;
(*f1)->pipe = p;
return 0;
80103474: 83 c4 10 add $0x10,%esp
(*f0)->type = FD_PIPE;
80103477: c7 00 01 00 00 00 movl $0x1,(%eax)
(*f0)->readable = 1;
8010347d: 8b 03 mov (%ebx),%eax
8010347f: c6 40 08 01 movb $0x1,0x8(%eax)
(*f0)->writable = 0;
80103483: 8b 03 mov (%ebx),%eax
80103485: c6 40 09 00 movb $0x0,0x9(%eax)
(*f0)->pipe = p;
80103489: 8b 03 mov (%ebx),%eax
8010348b: 89 78 0c mov %edi,0xc(%eax)
(*f1)->type = FD_PIPE;
8010348e: 8b 06 mov (%esi),%eax
80103490: c7 00 01 00 00 00 movl $0x1,(%eax)
(*f1)->readable = 0;
80103496: 8b 06 mov (%esi),%eax
80103498: c6 40 08 00 movb $0x0,0x8(%eax)
(*f1)->writable = 1;
8010349c: 8b 06 mov (%esi),%eax
8010349e: c6 40 09 01 movb $0x1,0x9(%eax)
(*f1)->pipe = p;
801034a2: 8b 06 mov (%esi),%eax
801034a4: 89 78 0c mov %edi,0xc(%eax)
if(*f0)
fileclose(*f0);
if(*f1)
fileclose(*f1);
return -1;
}
801034a7: 8d 65 f4 lea -0xc(%ebp),%esp
return 0;
801034aa: 31 c0 xor %eax,%eax
}
801034ac: 5b pop %ebx
801034ad: 5e pop %esi
801034ae: 5f pop %edi
801034af: 5d pop %ebp
801034b0: c3 ret
801034b1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
if(*f0)
801034b8: 8b 03 mov (%ebx),%eax
801034ba: 85 c0 test %eax,%eax
801034bc: 74 1e je 801034dc <pipealloc+0xec>
fileclose(*f0);
801034be: 83 ec 0c sub $0xc,%esp
801034c1: 50 push %eax
801034c2: e8 f9 d9 ff ff call 80100ec0 <fileclose>
801034c7: 83 c4 10 add $0x10,%esp
if(*f1)
801034ca: 8b 06 mov (%esi),%eax
801034cc: 85 c0 test %eax,%eax
801034ce: 74 0c je 801034dc <pipealloc+0xec>
fileclose(*f1);
801034d0: 83 ec 0c sub $0xc,%esp
801034d3: 50 push %eax
801034d4: e8 e7 d9 ff ff call 80100ec0 <fileclose>
801034d9: 83 c4 10 add $0x10,%esp
}
801034dc: 8d 65 f4 lea -0xc(%ebp),%esp
return -1;
801034df: b8 ff ff ff ff mov $0xffffffff,%eax
}
801034e4: 5b pop %ebx
801034e5: 5e pop %esi
801034e6: 5f pop %edi
801034e7: 5d pop %ebp
801034e8: c3 ret
801034e9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
if(*f0)
801034f0: 8b 03 mov (%ebx),%eax
801034f2: 85 c0 test %eax,%eax
801034f4: 75 c8 jne 801034be <pipealloc+0xce>
801034f6: eb d2 jmp 801034ca <pipealloc+0xda>
801034f8: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801034ff: 90 nop
80103500 <pipeclose>:
void
pipeclose(struct pipe *p, int writable)
{
80103500: f3 0f 1e fb endbr32
80103504: 55 push %ebp
80103505: 89 e5 mov %esp,%ebp
80103507: 56 push %esi
80103508: 53 push %ebx
80103509: 8b 5d 08 mov 0x8(%ebp),%ebx
8010350c: 8b 75 0c mov 0xc(%ebp),%esi
acquire(&p->lock);
8010350f: 83 ec 0c sub $0xc,%esp
80103512: 53 push %ebx
80103513: e8 78 16 00 00 call 80104b90 <acquire>
if(writable){
80103518: 83 c4 10 add $0x10,%esp
8010351b: 85 f6 test %esi,%esi
8010351d: 74 41 je 80103560 <pipeclose+0x60>
p->writeopen = 0;
wakeup(&p->nread);
8010351f: 83 ec 0c sub $0xc,%esp
80103522: 8d 83 34 02 00 00 lea 0x234(%ebx),%eax
p->writeopen = 0;
80103528: c7 83 40 02 00 00 00 movl $0x0,0x240(%ebx)
8010352f: 00 00 00
wakeup(&p->nread);
80103532: 50 push %eax
80103533: e8 48 0f 00 00 call 80104480 <wakeup>
80103538: 83 c4 10 add $0x10,%esp
} else {
p->readopen = 0;
wakeup(&p->nwrite);
}
if(p->readopen == 0 && p->writeopen == 0){
8010353b: 8b 93 3c 02 00 00 mov 0x23c(%ebx),%edx
80103541: 85 d2 test %edx,%edx
80103543: 75 0a jne 8010354f <pipeclose+0x4f>
80103545: 8b 83 40 02 00 00 mov 0x240(%ebx),%eax
8010354b: 85 c0 test %eax,%eax
8010354d: 74 31 je 80103580 <pipeclose+0x80>
release(&p->lock);
kfree((char*)p);
} else
release(&p->lock);
8010354f: 89 5d 08 mov %ebx,0x8(%ebp)
}
80103552: 8d 65 f8 lea -0x8(%ebp),%esp
80103555: 5b pop %ebx
80103556: 5e pop %esi
80103557: 5d pop %ebp
release(&p->lock);
80103558: e9 f3 16 00 00 jmp 80104c50 <release>
8010355d: 8d 76 00 lea 0x0(%esi),%esi
wakeup(&p->nwrite);
80103560: 83 ec 0c sub $0xc,%esp
80103563: 8d 83 38 02 00 00 lea 0x238(%ebx),%eax
p->readopen = 0;
80103569: c7 83 3c 02 00 00 00 movl $0x0,0x23c(%ebx)
80103570: 00 00 00
wakeup(&p->nwrite);
80103573: 50 push %eax
80103574: e8 07 0f 00 00 call 80104480 <wakeup>
80103579: 83 c4 10 add $0x10,%esp
8010357c: eb bd jmp 8010353b <pipeclose+0x3b>
8010357e: 66 90 xchg %ax,%ax
release(&p->lock);
80103580: 83 ec 0c sub $0xc,%esp
80103583: 53 push %ebx
80103584: e8 c7 16 00 00 call 80104c50 <release>
kfree((char*)p);
80103589: 89 5d 08 mov %ebx,0x8(%ebp)
8010358c: 83 c4 10 add $0x10,%esp
}
8010358f: 8d 65 f8 lea -0x8(%ebp),%esp
80103592: 5b pop %ebx
80103593: 5e pop %esi
80103594: 5d pop %ebp
kfree((char*)p);
80103595: e9 d6 ee ff ff jmp 80102470 <kfree>
8010359a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801035a0 <pipewrite>:
//PAGEBREAK: 40
int
pipewrite(struct pipe *p, char *addr, int n)
{
801035a0: f3 0f 1e fb endbr32
801035a4: 55 push %ebp
801035a5: 89 e5 mov %esp,%ebp
801035a7: 57 push %edi
801035a8: 56 push %esi
801035a9: 53 push %ebx
801035aa: 83 ec 28 sub $0x28,%esp
801035ad: 8b 5d 08 mov 0x8(%ebp),%ebx
int i;
acquire(&p->lock);
801035b0: 53 push %ebx
801035b1: e8 da 15 00 00 call 80104b90 <acquire>
for(i = 0; i < n; i++){
801035b6: 8b 45 10 mov 0x10(%ebp),%eax
801035b9: 83 c4 10 add $0x10,%esp
801035bc: 85 c0 test %eax,%eax
801035be: 0f 8e bc 00 00 00 jle 80103680 <pipewrite+0xe0>
801035c4: 8b 45 0c mov 0xc(%ebp),%eax
801035c7: 8b 8b 38 02 00 00 mov 0x238(%ebx),%ecx
while(p->nwrite == p->nread + PIPESIZE){ //DOC: pipewrite-full
if(p->readopen == 0 || myproc()->killed){
release(&p->lock);
return -1;
}
wakeup(&p->nread);
801035cd: 8d bb 34 02 00 00 lea 0x234(%ebx),%edi
801035d3: 89 45 e4 mov %eax,-0x1c(%ebp)
801035d6: 03 45 10 add 0x10(%ebp),%eax
801035d9: 89 45 e0 mov %eax,-0x20(%ebp)
while(p->nwrite == p->nread + PIPESIZE){ //DOC: pipewrite-full
801035dc: 8b 83 34 02 00 00 mov 0x234(%ebx),%eax
sleep(&p->nwrite, &p->lock); //DOC: pipewrite-sleep
801035e2: 8d b3 38 02 00 00 lea 0x238(%ebx),%esi
while(p->nwrite == p->nread + PIPESIZE){ //DOC: pipewrite-full
801035e8: 89 ca mov %ecx,%edx
801035ea: 05 00 02 00 00 add $0x200,%eax
801035ef: 39 c1 cmp %eax,%ecx
801035f1: 74 3b je 8010362e <pipewrite+0x8e>
801035f3: eb 63 jmp 80103658 <pipewrite+0xb8>
801035f5: 8d 76 00 lea 0x0(%esi),%esi
if(p->readopen == 0 || myproc()->killed){
801035f8: e8 63 04 00 00 call 80103a60 <myproc>
801035fd: 8b 48 24 mov 0x24(%eax),%ecx
80103600: 85 c9 test %ecx,%ecx
80103602: 75 34 jne 80103638 <pipewrite+0x98>
wakeup(&p->nread);
80103604: 83 ec 0c sub $0xc,%esp
80103607: 57 push %edi
80103608: e8 73 0e 00 00 call 80104480 <wakeup>
sleep(&p->nwrite, &p->lock); //DOC: pipewrite-sleep
8010360d: 58 pop %eax
8010360e: 5a pop %edx
8010360f: 53 push %ebx
80103610: 56 push %esi
80103611: e8 5a 0b 00 00 call 80104170 <sleep>
while(p->nwrite == p->nread + PIPESIZE){ //DOC: pipewrite-full
80103616: 8b 83 34 02 00 00 mov 0x234(%ebx),%eax
8010361c: 8b 93 38 02 00 00 mov 0x238(%ebx),%edx
80103622: 83 c4 10 add $0x10,%esp
80103625: 05 00 02 00 00 add $0x200,%eax
8010362a: 39 c2 cmp %eax,%edx
8010362c: 75 2a jne 80103658 <pipewrite+0xb8>
if(p->readopen == 0 || myproc()->killed){
8010362e: 8b 83 3c 02 00 00 mov 0x23c(%ebx),%eax
80103634: 85 c0 test %eax,%eax
80103636: 75 c0 jne 801035f8 <pipewrite+0x58>
release(&p->lock);
80103638: 83 ec 0c sub $0xc,%esp
8010363b: 53 push %ebx
8010363c: e8 0f 16 00 00 call 80104c50 <release>
return -1;
80103641: 83 c4 10 add $0x10,%esp
80103644: b8 ff ff ff ff mov $0xffffffff,%eax
p->data[p->nwrite++ % PIPESIZE] = addr[i];
}
wakeup(&p->nread); //DOC: pipewrite-wakeup1
release(&p->lock);
return n;
}
80103649: 8d 65 f4 lea -0xc(%ebp),%esp
8010364c: 5b pop %ebx
8010364d: 5e pop %esi
8010364e: 5f pop %edi
8010364f: 5d pop %ebp
80103650: c3 ret
80103651: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
p->data[p->nwrite++ % PIPESIZE] = addr[i];
80103658: 8b 75 e4 mov -0x1c(%ebp),%esi
8010365b: 8d 4a 01 lea 0x1(%edx),%ecx
8010365e: 81 e2 ff 01 00 00 and $0x1ff,%edx
80103664: 89 8b 38 02 00 00 mov %ecx,0x238(%ebx)
8010366a: 0f b6 06 movzbl (%esi),%eax
8010366d: 83 c6 01 add $0x1,%esi
80103670: 89 75 e4 mov %esi,-0x1c(%ebp)
80103673: 88 44 13 34 mov %al,0x34(%ebx,%edx,1)
for(i = 0; i < n; i++){
80103677: 3b 75 e0 cmp -0x20(%ebp),%esi
8010367a: 0f 85 5c ff ff ff jne 801035dc <pipewrite+0x3c>
wakeup(&p->nread); //DOC: pipewrite-wakeup1
80103680: 83 ec 0c sub $0xc,%esp
80103683: 8d 83 34 02 00 00 lea 0x234(%ebx),%eax
80103689: 50 push %eax
8010368a: e8 f1 0d 00 00 call 80104480 <wakeup>
release(&p->lock);
8010368f: 89 1c 24 mov %ebx,(%esp)
80103692: e8 b9 15 00 00 call 80104c50 <release>
return n;
80103697: 8b 45 10 mov 0x10(%ebp),%eax
8010369a: 83 c4 10 add $0x10,%esp
8010369d: eb aa jmp 80103649 <pipewrite+0xa9>
8010369f: 90 nop
801036a0 <piperead>:
int
piperead(struct pipe *p, char *addr, int n)
{
801036a0: f3 0f 1e fb endbr32
801036a4: 55 push %ebp
801036a5: 89 e5 mov %esp,%ebp
801036a7: 57 push %edi
801036a8: 56 push %esi
801036a9: 53 push %ebx
801036aa: 83 ec 18 sub $0x18,%esp
801036ad: 8b 75 08 mov 0x8(%ebp),%esi
801036b0: 8b 7d 0c mov 0xc(%ebp),%edi
int i;
acquire(&p->lock);
801036b3: 56 push %esi
801036b4: 8d 9e 34 02 00 00 lea 0x234(%esi),%ebx
801036ba: e8 d1 14 00 00 call 80104b90 <acquire>
while(p->nread == p->nwrite && p->writeopen){ //DOC: pipe-empty
801036bf: 8b 86 34 02 00 00 mov 0x234(%esi),%eax
801036c5: 83 c4 10 add $0x10,%esp
801036c8: 39 86 38 02 00 00 cmp %eax,0x238(%esi)
801036ce: 74 33 je 80103703 <piperead+0x63>
801036d0: eb 3b jmp 8010370d <piperead+0x6d>
801036d2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
if(myproc()->killed){
801036d8: e8 83 03 00 00 call 80103a60 <myproc>
801036dd: 8b 48 24 mov 0x24(%eax),%ecx
801036e0: 85 c9 test %ecx,%ecx
801036e2: 0f 85 88 00 00 00 jne 80103770 <piperead+0xd0>
release(&p->lock);
return -1;
}
sleep(&p->nread, &p->lock); //DOC: piperead-sleep
801036e8: 83 ec 08 sub $0x8,%esp
801036eb: 56 push %esi
801036ec: 53 push %ebx
801036ed: e8 7e 0a 00 00 call 80104170 <sleep>
while(p->nread == p->nwrite && p->writeopen){ //DOC: pipe-empty
801036f2: 8b 86 38 02 00 00 mov 0x238(%esi),%eax
801036f8: 83 c4 10 add $0x10,%esp
801036fb: 39 86 34 02 00 00 cmp %eax,0x234(%esi)
80103701: 75 0a jne 8010370d <piperead+0x6d>
80103703: 8b 86 40 02 00 00 mov 0x240(%esi),%eax
80103709: 85 c0 test %eax,%eax
8010370b: 75 cb jne 801036d8 <piperead+0x38>
}
for(i = 0; i < n; i++){ //DOC: piperead-copy
8010370d: 8b 55 10 mov 0x10(%ebp),%edx
80103710: 31 db xor %ebx,%ebx
80103712: 85 d2 test %edx,%edx
80103714: 7f 28 jg 8010373e <piperead+0x9e>
80103716: eb 34 jmp 8010374c <piperead+0xac>
80103718: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010371f: 90 nop
if(p->nread == p->nwrite)
break;
addr[i] = p->data[p->nread++ % PIPESIZE];
80103720: 8d 48 01 lea 0x1(%eax),%ecx
80103723: 25 ff 01 00 00 and $0x1ff,%eax
80103728: 89 8e 34 02 00 00 mov %ecx,0x234(%esi)
8010372e: 0f b6 44 06 34 movzbl 0x34(%esi,%eax,1),%eax
80103733: 88 04 1f mov %al,(%edi,%ebx,1)
for(i = 0; i < n; i++){ //DOC: piperead-copy
80103736: 83 c3 01 add $0x1,%ebx
80103739: 39 5d 10 cmp %ebx,0x10(%ebp)
8010373c: 74 0e je 8010374c <piperead+0xac>
if(p->nread == p->nwrite)
8010373e: 8b 86 34 02 00 00 mov 0x234(%esi),%eax
80103744: 3b 86 38 02 00 00 cmp 0x238(%esi),%eax
8010374a: 75 d4 jne 80103720 <piperead+0x80>
}
wakeup(&p->nwrite); //DOC: piperead-wakeup
8010374c: 83 ec 0c sub $0xc,%esp
8010374f: 8d 86 38 02 00 00 lea 0x238(%esi),%eax
80103755: 50 push %eax
80103756: e8 25 0d 00 00 call 80104480 <wakeup>
release(&p->lock);
8010375b: 89 34 24 mov %esi,(%esp)
8010375e: e8 ed 14 00 00 call 80104c50 <release>
return i;
80103763: 83 c4 10 add $0x10,%esp
}
80103766: 8d 65 f4 lea -0xc(%ebp),%esp
80103769: 89 d8 mov %ebx,%eax
8010376b: 5b pop %ebx
8010376c: 5e pop %esi
8010376d: 5f pop %edi
8010376e: 5d pop %ebp
8010376f: c3 ret
release(&p->lock);
80103770: 83 ec 0c sub $0xc,%esp
return -1;
80103773: bb ff ff ff ff mov $0xffffffff,%ebx
release(&p->lock);
80103778: 56 push %esi
80103779: e8 d2 14 00 00 call 80104c50 <release>
return -1;
8010377e: 83 c4 10 add $0x10,%esp
}
80103781: 8d 65 f4 lea -0xc(%ebp),%esp
80103784: 89 d8 mov %ebx,%eax
80103786: 5b pop %ebx
80103787: 5e pop %esi
80103788: 5f pop %edi
80103789: 5d pop %ebp
8010378a: c3 ret
8010378b: 66 90 xchg %ax,%ax
8010378d: 66 90 xchg %ax,%ax
8010378f: 90 nop
80103790 <wakeup1>:
//PAGEBREAK!
// Wake up all processes sleeping on chan.
// The ptable lock must be held.
static void
wakeup1(void *chan)
{
80103790: 55 push %ebp
struct proc *p;
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
80103791: ba 54 3d 11 80 mov $0x80113d54,%edx
{
80103796: 89 e5 mov %esp,%ebp
80103798: 53 push %ebx
{
if(p->state == SLEEPING && p->chan == chan)
{
p->state = RUNNABLE;
p->total_stime += ticks - p->last_stime;
80103799: 8b 1d a0 73 11 80 mov 0x801173a0,%ebx
8010379f: eb 15 jmp 801037b6 <wakeup1+0x26>
801037a1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
801037a8: 81 c2 b8 00 00 00 add $0xb8,%edx
801037ae: 81 fa 54 6b 11 80 cmp $0x80116b54,%edx
801037b4: 74 38 je 801037ee <wakeup1+0x5e>
if(p->state == SLEEPING && p->chan == chan)
801037b6: 83 7a 0c 02 cmpl $0x2,0xc(%edx)
801037ba: 75 ec jne 801037a8 <wakeup1+0x18>
801037bc: 39 42 20 cmp %eax,0x20(%edx)
801037bf: 75 e7 jne 801037a8 <wakeup1+0x18>
p->total_stime += ticks - p->last_stime;
801037c1: 8b 8a 88 00 00 00 mov 0x88(%edx),%ecx
p->state = RUNNABLE;
801037c7: c7 42 0c 03 00 00 00 movl $0x3,0xc(%edx)
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
801037ce: 81 c2 b8 00 00 00 add $0xb8,%edx
p->cpu_ticks=0;
801037d4: c7 42 f8 00 00 00 00 movl $0x0,-0x8(%edx)
p->total_stime += ticks - p->last_stime;
801037db: 01 d9 add %ebx,%ecx
801037dd: 2b 4a d4 sub -0x2c(%edx),%ecx
p->recent_insert=ticks;
801037e0: 89 5a f4 mov %ebx,-0xc(%edx)
p->total_stime += ticks - p->last_stime;
801037e3: 89 4a d0 mov %ecx,-0x30(%edx)
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
801037e6: 81 fa 54 6b 11 80 cmp $0x80116b54,%edx
801037ec: 75 c8 jne 801037b6 <wakeup1+0x26>
}
}
}
801037ee: 5b pop %ebx
801037ef: 5d pop %ebp
801037f0: c3 ret
801037f1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801037f8: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801037ff: 90 nop
80103800 <allocproc>:
{
80103800: 55 push %ebp
80103801: 89 e5 mov %esp,%ebp
80103803: 53 push %ebx
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
80103804: bb 54 3d 11 80 mov $0x80113d54,%ebx
{
80103809: 83 ec 10 sub $0x10,%esp
acquire(&ptable.lock);
8010380c: 68 20 3d 11 80 push $0x80113d20
80103811: e8 7a 13 00 00 call 80104b90 <acquire>
80103816: 83 c4 10 add $0x10,%esp
80103819: eb 17 jmp 80103832 <allocproc+0x32>
8010381b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
8010381f: 90 nop
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
80103820: 81 c3 b8 00 00 00 add $0xb8,%ebx
80103826: 81 fb 54 6b 11 80 cmp $0x80116b54,%ebx
8010382c: 0f 84 fe 00 00 00 je 80103930 <allocproc+0x130>
if(p->state == UNUSED)
80103832: 8b 43 0c mov 0xc(%ebx),%eax
80103835: 85 c0 test %eax,%eax
80103837: 75 e7 jne 80103820 <allocproc+0x20>
p->pid = nextpid++;
80103839: 8b 15 04 b0 10 80 mov 0x8010b004,%edx
p->ctime = ticks;
8010383f: a1 a0 73 11 80 mov 0x801173a0,%eax
release(&ptable.lock);
80103844: 83 ec 0c sub $0xc,%esp
p->state = EMBRYO;
80103847: c7 43 0c 01 00 00 00 movl $0x1,0xc(%ebx)
p->rtime = 0;
8010384e: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx)
80103855: 00 00 00
p->ctime = ticks;
80103858: 89 43 7c mov %eax,0x7c(%ebx)
p->pid = nextpid++;
8010385b: 8d 4a 01 lea 0x1(%edx),%ecx
8010385e: 89 53 10 mov %edx,0x10(%ebx)
p->recent_insert=ticks;
80103861: 89 83 ac 00 00 00 mov %eax,0xac(%ebx)
p->total_stime = 0;
80103867: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx)
8010386e: 00 00 00
p->last_stime = 0;
80103871: c7 83 8c 00 00 00 00 movl $0x0,0x8c(%ebx)
80103878: 00 00 00
p->priority=60;
8010387b: c7 83 90 00 00 00 3c movl $0x3c,0x90(%ebx)
80103882: 00 00 00
p->cpu_ticks=0;
80103885: c7 83 b0 00 00 00 00 movl $0x0,0xb0(%ebx)
8010388c: 00 00 00
p->curr_queue=0;
8010388f: c7 83 a8 00 00 00 00 movl $0x0,0xa8(%ebx)
80103896: 00 00 00
p->n_run=0;
80103899: c7 83 b4 00 00 00 00 movl $0x0,0xb4(%ebx)
801038a0: 00 00 00
p->queues[i]=0;
801038a3: c7 83 94 00 00 00 00 movl $0x0,0x94(%ebx)
801038aa: 00 00 00
801038ad: c7 83 98 00 00 00 00 movl $0x0,0x98(%ebx)
801038b4: 00 00 00
801038b7: c7 83 9c 00 00 00 00 movl $0x0,0x9c(%ebx)
801038be: 00 00 00
801038c1: c7 83 a0 00 00 00 00 movl $0x0,0xa0(%ebx)
801038c8: 00 00 00
801038cb: c7 83 a4 00 00 00 00 movl $0x0,0xa4(%ebx)
801038d2: 00 00 00
release(&ptable.lock);
801038d5: 68 20 3d 11 80 push $0x80113d20
p->pid = nextpid++;
801038da: 89 0d 04 b0 10 80 mov %ecx,0x8010b004
release(&ptable.lock);
801038e0: e8 6b 13 00 00 call 80104c50 <release>
if((p->kstack = kalloc()) == 0){
801038e5: e8 46 ed ff ff call 80102630 <kalloc>
801038ea: 83 c4 10 add $0x10,%esp
801038ed: 89 43 08 mov %eax,0x8(%ebx)
801038f0: 85 c0 test %eax,%eax
801038f2: 74 55 je 80103949 <allocproc+0x149>
sp -= sizeof *p->tf;
801038f4: 8d 90 b4 0f 00 00 lea 0xfb4(%eax),%edx
memset(p->context, 0, sizeof *p->context);
801038fa: 83 ec 04 sub $0x4,%esp
sp -= sizeof *p->context;
801038fd: 05 9c 0f 00 00 add $0xf9c,%eax
sp -= sizeof *p->tf;
80103902: 89 53 18 mov %edx,0x18(%ebx)
*(uint*)sp = (uint)trapret;
80103905: c7 40 14 71 5f 10 80 movl $0x80105f71,0x14(%eax)
p->context = (struct context*)sp;
8010390c: 89 43 1c mov %eax,0x1c(%ebx)
memset(p->context, 0, sizeof *p->context);
8010390f: 6a 14 push $0x14
80103911: 6a 00 push $0x0
80103913: 50 push %eax
80103914: e8 87 13 00 00 call 80104ca0 <memset>
p->context->eip = (uint)forkret;
80103919: 8b 43 1c mov 0x1c(%ebx),%eax
return p;
8010391c: 83 c4 10 add $0x10,%esp
p->context->eip = (uint)forkret;
8010391f: c7 40 10 60 39 10 80 movl $0x80103960,0x10(%eax)
}
80103926: 89 d8 mov %ebx,%eax
80103928: 8b 5d fc mov -0x4(%ebp),%ebx
8010392b: c9 leave
8010392c: c3 ret
8010392d: 8d 76 00 lea 0x0(%esi),%esi
release(&ptable.lock);
80103930: 83 ec 0c sub $0xc,%esp
return 0;
80103933: 31 db xor %ebx,%ebx
release(&ptable.lock);
80103935: 68 20 3d 11 80 push $0x80113d20
8010393a: e8 11 13 00 00 call 80104c50 <release>
}
8010393f: 89 d8 mov %ebx,%eax
return 0;
80103941: 83 c4 10 add $0x10,%esp
}
80103944: 8b 5d fc mov -0x4(%ebp),%ebx
80103947: c9 leave
80103948: c3 ret
p->state = UNUSED;
80103949: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
return 0;
80103950: 31 db xor %ebx,%ebx
}
80103952: 89 d8 mov %ebx,%eax
80103954: 8b 5d fc mov -0x4(%ebp),%ebx
80103957: c9 leave
80103958: c3 ret
80103959: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80103960 <forkret>:
{
80103960: f3 0f 1e fb endbr32
80103964: 55 push %ebp
80103965: 89 e5 mov %esp,%ebp
80103967: 83 ec 14 sub $0x14,%esp
release(&ptable.lock);
8010396a: 68 20 3d 11 80 push $0x80113d20
8010396f: e8 dc 12 00 00 call 80104c50 <release>
if (first) {
80103974: a1 00 b0 10 80 mov 0x8010b000,%eax
80103979: 83 c4 10 add $0x10,%esp
8010397c: 85 c0 test %eax,%eax
8010397e: 75 08 jne 80103988 <forkret+0x28>
}
80103980: c9 leave
80103981: c3 ret
80103982: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
first = 0;
80103988: c7 05 00 b0 10 80 00 movl $0x0,0x8010b000
8010398f: 00 00 00
iinit(ROOTDEV);
80103992: 83 ec 0c sub $0xc,%esp
80103995: 6a 01 push $0x1
80103997: e8 a4 db ff ff call 80101540 <iinit>
initlog(ROOTDEV);
8010399c: c7 04 24 01 00 00 00 movl $0x1,(%esp)
801039a3: e8 e8 f2 ff ff call 80102c90 <initlog>
}
801039a8: 83 c4 10 add $0x10,%esp
801039ab: c9 leave
801039ac: c3 ret
801039ad: 8d 76 00 lea 0x0(%esi),%esi
801039b0 <pinit>:
{
801039b0: f3 0f 1e fb endbr32
801039b4: 55 push %ebp
801039b5: 89 e5 mov %esp,%ebp
801039b7: 83 ec 10 sub $0x10,%esp
initlock(&ptable.lock, "ptable");
801039ba: 68 20 7d 10 80 push $0x80107d20
801039bf: 68 20 3d 11 80 push $0x80113d20
801039c4: e8 47 10 00 00 call 80104a10 <initlock>
}
801039c9: 83 c4 10 add $0x10,%esp
801039cc: c9 leave
801039cd: c3 ret
801039ce: 66 90 xchg %ax,%ax
801039d0 <mycpu>:
{
801039d0: f3 0f 1e fb endbr32
801039d4: 55 push %ebp
801039d5: 89 e5 mov %esp,%ebp
801039d7: 56 push %esi
801039d8: 53 push %ebx
asm volatile("pushfl; popl %0" : "=r" (eflags));
801039d9: 9c pushf
801039da: 58 pop %eax
if(readeflags()&FL_IF)
801039db: f6 c4 02 test $0x2,%ah
801039de: 75 4a jne 80103a2a <mycpu+0x5a>
apicid = lapicid();
801039e0: e8 bb ee ff ff call 801028a0 <lapicid>
for (i = 0; i < ncpu; ++i) {
801039e5: 8b 35 00 3d 11 80 mov 0x80113d00,%esi
apicid = lapicid();
801039eb: 89 c3 mov %eax,%ebx
for (i = 0; i < ncpu; ++i) {
801039ed: 85 f6 test %esi,%esi
801039ef: 7e 2c jle 80103a1d <mycpu+0x4d>
801039f1: 31 d2 xor %edx,%edx
801039f3: eb 0a jmp 801039ff <mycpu+0x2f>
801039f5: 8d 76 00 lea 0x0(%esi),%esi
801039f8: 83 c2 01 add $0x1,%edx
801039fb: 39 f2 cmp %esi,%edx
801039fd: 74 1e je 80103a1d <mycpu+0x4d>
if (cpus[i].apicid == apicid)
801039ff: 69 ca b0 00 00 00 imul $0xb0,%edx,%ecx
80103a05: 0f b6 81 80 37 11 80 movzbl -0x7feec880(%ecx),%eax
80103a0c: 39 d8 cmp %ebx,%eax
80103a0e: 75 e8 jne 801039f8 <mycpu+0x28>
}
80103a10: 8d 65 f8 lea -0x8(%ebp),%esp
return &cpus[i];
80103a13: 8d 81 80 37 11 80 lea -0x7feec880(%ecx),%eax
}
80103a19: 5b pop %ebx
80103a1a: 5e pop %esi
80103a1b: 5d pop %ebp
80103a1c: c3 ret
panic("unknown apicid\n");
80103a1d: 83 ec 0c sub $0xc,%esp
80103a20: 68 27 7d 10 80 push $0x80107d27
80103a25: e8 66 c9 ff ff call 80100390 <panic>
panic("mycpu called with interrupts enabled\n");
80103a2a: 83 ec 0c sub $0xc,%esp
80103a2d: 68 04 7e 10 80 push $0x80107e04
80103a32: e8 59 c9 ff ff call 80100390 <panic>
80103a37: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80103a3e: 66 90 xchg %ax,%ax
80103a40 <cpuid>:
cpuid() {
80103a40: f3 0f 1e fb endbr32
80103a44: 55 push %ebp
80103a45: 89 e5 mov %esp,%ebp
80103a47: 83 ec 08 sub $0x8,%esp
return mycpu()-cpus;
80103a4a: e8 81 ff ff ff call 801039d0 <mycpu>
}
80103a4f: c9 leave
return mycpu()-cpus;
80103a50: 2d 80 37 11 80 sub $0x80113780,%eax
80103a55: c1 f8 04 sar $0x4,%eax
80103a58: 69 c0 a3 8b 2e ba imul $0xba2e8ba3,%eax,%eax
}
80103a5e: c3 ret
80103a5f: 90 nop
80103a60 <myproc>:
myproc(void) {
80103a60: f3 0f 1e fb endbr32
80103a64: 55 push %ebp
80103a65: 89 e5 mov %esp,%ebp
80103a67: 53 push %ebx
80103a68: 83 ec 04 sub $0x4,%esp
pushcli();
80103a6b: e8 20 10 00 00 call 80104a90 <pushcli>
c = mycpu();
80103a70: e8 5b ff ff ff call 801039d0 <mycpu>
p = c->proc;
80103a75: 8b 98 ac 00 00 00 mov 0xac(%eax),%ebx
popcli();
80103a7b: e8 60 10 00 00 call 80104ae0 <popcli>
}
80103a80: 83 c4 04 add $0x4,%esp
80103a83: 89 d8 mov %ebx,%eax
80103a85: 5b pop %ebx
80103a86: 5d pop %ebp
80103a87: c3 ret
80103a88: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80103a8f: 90 nop
80103a90 <userinit>:
{
80103a90: f3 0f 1e fb endbr32
80103a94: 55 push %ebp
80103a95: 89 e5 mov %esp,%ebp
80103a97: 53 push %ebx
80103a98: 83 ec 04 sub $0x4,%esp
p = allocproc();
80103a9b: e8 60 fd ff ff call 80103800 <allocproc>
80103aa0: 89 c3 mov %eax,%ebx
initproc = p;
80103aa2: a3 b8 b5 10 80 mov %eax,0x8010b5b8
if((p->pgdir = setupkvm()) == 0)
80103aa7: e8 94 3a 00 00 call 80107540 <setupkvm>
80103aac: 89 43 04 mov %eax,0x4(%ebx)
80103aaf: 85 c0 test %eax,%eax
80103ab1: 0f 84 bd 00 00 00 je 80103b74 <userinit+0xe4>
inituvm(p->pgdir, _binary_initcode_start, (int)_binary_initcode_size);
80103ab7: 83 ec 04 sub $0x4,%esp
80103aba: 68 2c 00 00 00 push $0x2c
80103abf: 68 60 b4 10 80 push $0x8010b460
80103ac4: 50 push %eax
80103ac5: e8 46 37 00 00 call 80107210 <inituvm>
memset(p->tf, 0, sizeof(*p->tf));
80103aca: 83 c4 0c add $0xc,%esp
p->sz = PGSIZE;
80103acd: c7 03 00 10 00 00 movl $0x1000,(%ebx)
memset(p->tf, 0, sizeof(*p->tf));
80103ad3: 6a 4c push $0x4c
80103ad5: 6a 00 push $0x0
80103ad7: ff 73 18 pushl 0x18(%ebx)
80103ada: e8 c1 11 00 00 call 80104ca0 <memset>
p->tf->cs = (SEG_UCODE << 3) | DPL_USER;
80103adf: 8b 43 18 mov 0x18(%ebx),%eax
80103ae2: ba 1b 00 00 00 mov $0x1b,%edx
safestrcpy(p->name, "initcode", sizeof(p->name));
80103ae7: 83 c4 0c add $0xc,%esp
p->tf->ds = (SEG_UDATA << 3) | DPL_USER;
80103aea: b9 23 00 00 00 mov $0x23,%ecx
p->tf->cs = (SEG_UCODE << 3) | DPL_USER;
80103aef: 66 89 50 3c mov %dx,0x3c(%eax)
p->tf->ds = (SEG_UDATA << 3) | DPL_USER;
80103af3: 8b 43 18 mov 0x18(%ebx),%eax
80103af6: 66 89 48 2c mov %cx,0x2c(%eax)
p->tf->es = p->tf->ds;
80103afa: 8b 43 18 mov 0x18(%ebx),%eax
80103afd: 0f b7 50 2c movzwl 0x2c(%eax),%edx
80103b01: 66 89 50 28 mov %dx,0x28(%eax)
p->tf->ss = p->tf->ds;
80103b05: 8b 43 18 mov 0x18(%ebx),%eax
80103b08: 0f b7 50 2c movzwl 0x2c(%eax),%edx
80103b0c: 66 89 50 48 mov %dx,0x48(%eax)
p->tf->eflags = FL_IF;
80103b10: 8b 43 18 mov 0x18(%ebx),%eax
80103b13: c7 40 40 00 02 00 00 movl $0x200,0x40(%eax)
p->tf->esp = PGSIZE;
80103b1a: 8b 43 18 mov 0x18(%ebx),%eax
80103b1d: c7 40 44 00 10 00 00 movl $0x1000,0x44(%eax)
p->tf->eip = 0; // beginning of initcode.S
80103b24: 8b 43 18 mov 0x18(%ebx),%eax
80103b27: c7 40 38 00 00 00 00 movl $0x0,0x38(%eax)
safestrcpy(p->name, "initcode", sizeof(p->name));
80103b2e: 8d 43 6c lea 0x6c(%ebx),%eax
80103b31: 6a 10 push $0x10
80103b33: 68 50 7d 10 80 push $0x80107d50
80103b38: 50 push %eax
80103b39: e8 22 13 00 00 call 80104e60 <safestrcpy>
p->cwd = namei("/");
80103b3e: c7 04 24 59 7d 10 80 movl $0x80107d59,(%esp)
80103b45: e8 e6 e4 ff ff call 80102030 <namei>
80103b4a: 89 43 68 mov %eax,0x68(%ebx)
acquire(&ptable.lock);
80103b4d: c7 04 24 20 3d 11 80 movl $0x80113d20,(%esp)
80103b54: e8 37 10 00 00 call 80104b90 <acquire>
p->state = RUNNABLE;
80103b59: c7 43 0c 03 00 00 00 movl $0x3,0xc(%ebx)
release(&ptable.lock);
80103b60: c7 04 24 20 3d 11 80 movl $0x80113d20,(%esp)
80103b67: e8 e4 10 00 00 call 80104c50 <release>
}
80103b6c: 8b 5d fc mov -0x4(%ebp),%ebx
80103b6f: 83 c4 10 add $0x10,%esp
80103b72: c9 leave
80103b73: c3 ret
panic("userinit: out of memory?");
80103b74: 83 ec 0c sub $0xc,%esp
80103b77: 68 37 7d 10 80 push $0x80107d37
80103b7c: e8 0f c8 ff ff call 80100390 <panic>
80103b81: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80103b88: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80103b8f: 90 nop
80103b90 <growproc>:
{
80103b90: f3 0f 1e fb endbr32
80103b94: 55 push %ebp
80103b95: 89 e5 mov %esp,%ebp
80103b97: 56 push %esi
80103b98: 53 push %ebx
80103b99: 8b 75 08 mov 0x8(%ebp),%esi
pushcli();
80103b9c: e8 ef 0e 00 00 call 80104a90 <pushcli>
c = mycpu();
80103ba1: e8 2a fe ff ff call 801039d0 <mycpu>
p = c->proc;
80103ba6: 8b 98 ac 00 00 00 mov 0xac(%eax),%ebx
popcli();
80103bac: e8 2f 0f 00 00 call 80104ae0 <popcli>
sz = curproc->sz;
80103bb1: 8b 03 mov (%ebx),%eax
if(n > 0){
80103bb3: 85 f6 test %esi,%esi
80103bb5: 7f 19 jg 80103bd0 <growproc+0x40>
} else if(n < 0){
80103bb7: 75 37 jne 80103bf0 <growproc+0x60>
switchuvm(curproc);
80103bb9: 83 ec 0c sub $0xc,%esp
curproc->sz = sz;
80103bbc: 89 03 mov %eax,(%ebx)
switchuvm(curproc);
80103bbe: 53 push %ebx
80103bbf: e8 3c 35 00 00 call 80107100 <switchuvm>
return 0;
80103bc4: 83 c4 10 add $0x10,%esp
80103bc7: 31 c0 xor %eax,%eax
}
80103bc9: 8d 65 f8 lea -0x8(%ebp),%esp
80103bcc: 5b pop %ebx
80103bcd: 5e pop %esi
80103bce: 5d pop %ebp
80103bcf: c3 ret
if((sz = allocuvm(curproc->pgdir, sz, sz + n)) == 0)
80103bd0: 83 ec 04 sub $0x4,%esp
80103bd3: 01 c6 add %eax,%esi
80103bd5: 56 push %esi
80103bd6: 50 push %eax
80103bd7: ff 73 04 pushl 0x4(%ebx)
80103bda: e8 81 37 00 00 call 80107360 <allocuvm>
80103bdf: 83 c4 10 add $0x10,%esp
80103be2: 85 c0 test %eax,%eax
80103be4: 75 d3 jne 80103bb9 <growproc+0x29>
return -1;
80103be6: b8 ff ff ff ff mov $0xffffffff,%eax
80103beb: eb dc jmp 80103bc9 <growproc+0x39>
80103bed: 8d 76 00 lea 0x0(%esi),%esi
if((sz = deallocuvm(curproc->pgdir, sz, sz + n)) == 0)
80103bf0: 83 ec 04 sub $0x4,%esp
80103bf3: 01 c6 add %eax,%esi
80103bf5: 56 push %esi
80103bf6: 50 push %eax
80103bf7: ff 73 04 pushl 0x4(%ebx)
80103bfa: e8 91 38 00 00 call 80107490 <deallocuvm>
80103bff: 83 c4 10 add $0x10,%esp
80103c02: 85 c0 test %eax,%eax
80103c04: 75 b3 jne 80103bb9 <growproc+0x29>
80103c06: eb de jmp 80103be6 <growproc+0x56>
80103c08: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80103c0f: 90 nop
80103c10 <fork>:
{
80103c10: f3 0f 1e fb endbr32
80103c14: 55 push %ebp
80103c15: 89 e5 mov %esp,%ebp
80103c17: 57 push %edi
80103c18: 56 push %esi
80103c19: 53 push %ebx
80103c1a: 83 ec 1c sub $0x1c,%esp
pushcli();
80103c1d: e8 6e 0e 00 00 call 80104a90 <pushcli>
c = mycpu();
80103c22: e8 a9 fd ff ff call 801039d0 <mycpu>
p = c->proc;
80103c27: 8b 98 ac 00 00 00 mov 0xac(%eax),%ebx
popcli();
80103c2d: e8 ae 0e 00 00 call 80104ae0 <popcli>
if((np = allocproc()) == 0){
80103c32: e8 c9 fb ff ff call 80103800 <allocproc>
80103c37: 89 45 e4 mov %eax,-0x1c(%ebp)
80103c3a: 85 c0 test %eax,%eax
80103c3c: 0f 84 bb 00 00 00 je 80103cfd <fork+0xed>
if((np->pgdir = copyuvm(curproc->pgdir, curproc->sz)) == 0){
80103c42: 83 ec 08 sub $0x8,%esp
80103c45: ff 33 pushl (%ebx)
80103c47: 89 c7 mov %eax,%edi
80103c49: ff 73 04 pushl 0x4(%ebx)
80103c4c: e8 bf 39 00 00 call 80107610 <copyuvm>
80103c51: 83 c4 10 add $0x10,%esp
80103c54: 89 47 04 mov %eax,0x4(%edi)
80103c57: 85 c0 test %eax,%eax
80103c59: 0f 84 a5 00 00 00 je 80103d04 <fork+0xf4>
np->sz = curproc->sz;
80103c5f: 8b 03 mov (%ebx),%eax
80103c61: 8b 4d e4 mov -0x1c(%ebp),%ecx
80103c64: 89 01 mov %eax,(%ecx)
*np->tf = *curproc->tf;
80103c66: 8b 79 18 mov 0x18(%ecx),%edi
np->parent = curproc;
80103c69: 89 c8 mov %ecx,%eax
80103c6b: 89 59 14 mov %ebx,0x14(%ecx)
*np->tf = *curproc->tf;
80103c6e: b9 13 00 00 00 mov $0x13,%ecx
80103c73: 8b 73 18 mov 0x18(%ebx),%esi
80103c76: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
for(i = 0; i < NOFILE; i++)
80103c78: 31 f6 xor %esi,%esi
np->tf->eax = 0;
80103c7a: 8b 40 18 mov 0x18(%eax),%eax
80103c7d: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax)
for(i = 0; i < NOFILE; i++)
80103c84: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if(curproc->ofile[i])
80103c88: 8b 44 b3 28 mov 0x28(%ebx,%esi,4),%eax
80103c8c: 85 c0 test %eax,%eax
80103c8e: 74 13 je 80103ca3 <fork+0x93>
np->ofile[i] = filedup(curproc->ofile[i]);
80103c90: 83 ec 0c sub $0xc,%esp
80103c93: 50 push %eax
80103c94: e8 d7 d1 ff ff call 80100e70 <filedup>
80103c99: 8b 55 e4 mov -0x1c(%ebp),%edx
80103c9c: 83 c4 10 add $0x10,%esp
80103c9f: 89 44 b2 28 mov %eax,0x28(%edx,%esi,4)
for(i = 0; i < NOFILE; i++)
80103ca3: 83 c6 01 add $0x1,%esi
80103ca6: 83 fe 10 cmp $0x10,%esi
80103ca9: 75 dd jne 80103c88 <fork+0x78>
np->cwd = idup(curproc->cwd);
80103cab: 83 ec 0c sub $0xc,%esp
80103cae: ff 73 68 pushl 0x68(%ebx)
safestrcpy(np->name, curproc->name, sizeof(curproc->name));
80103cb1: 83 c3 6c add $0x6c,%ebx
np->cwd = idup(curproc->cwd);
80103cb4: e8 77 da ff ff call 80101730 <idup>
80103cb9: 8b 7d e4 mov -0x1c(%ebp),%edi
safestrcpy(np->name, curproc->name, sizeof(curproc->name));
80103cbc: 83 c4 0c add $0xc,%esp
np->cwd = idup(curproc->cwd);
80103cbf: 89 47 68 mov %eax,0x68(%edi)
safestrcpy(np->name, curproc->name, sizeof(curproc->name));
80103cc2: 8d 47 6c lea 0x6c(%edi),%eax
80103cc5: 6a 10 push $0x10
80103cc7: 53 push %ebx
80103cc8: 50 push %eax
80103cc9: e8 92 11 00 00 call 80104e60 <safestrcpy>
pid = np->pid;
80103cce: 8b 5f 10 mov 0x10(%edi),%ebx
acquire(&ptable.lock);
80103cd1: c7 04 24 20 3d 11 80 movl $0x80113d20,(%esp)
80103cd8: e8 b3 0e 00 00 call 80104b90 <acquire>
np->state = RUNNABLE;
80103cdd: c7 47 0c 03 00 00 00 movl $0x3,0xc(%edi)
release(&ptable.lock);
80103ce4: c7 04 24 20 3d 11 80 movl $0x80113d20,(%esp)
80103ceb: e8 60 0f 00 00 call 80104c50 <release>
return pid;
80103cf0: 83 c4 10 add $0x10,%esp
}
80103cf3: 8d 65 f4 lea -0xc(%ebp),%esp
80103cf6: 89 d8 mov %ebx,%eax
80103cf8: 5b pop %ebx
80103cf9: 5e pop %esi
80103cfa: 5f pop %edi
80103cfb: 5d pop %ebp
80103cfc: c3 ret
return -1;
80103cfd: bb ff ff ff ff mov $0xffffffff,%ebx
80103d02: eb ef jmp 80103cf3 <fork+0xe3>
kfree(np->kstack);
80103d04: 8b 5d e4 mov -0x1c(%ebp),%ebx
80103d07: 83 ec 0c sub $0xc,%esp
80103d0a: ff 73 08 pushl 0x8(%ebx)
80103d0d: e8 5e e7 ff ff call 80102470 <kfree>
np->kstack = 0;
80103d12: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
return -1;
80103d19: 83 c4 10 add $0x10,%esp
np->state = UNUSED;
80103d1c: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
return -1;
80103d23: bb ff ff ff ff mov $0xffffffff,%ebx
80103d28: eb c9 jmp 80103cf3 <fork+0xe3>
80103d2a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80103d30 <aging>:
{
80103d30: f3 0f 1e fb endbr32
80103d34: 55 push %ebp
for(p=ptable.proc;p<&ptable.proc[NPROC];p++)
80103d35: b8 54 3d 11 80 mov $0x80113d54,%eax
{
80103d3a: 89 e5 mov %esp,%ebp
80103d3c: 53 push %ebx
80103d3d: 83 ec 20 sub $0x20,%esp
wait_time_limit[i]=limit;
80103d40: c7 45 e8 32 00 00 00 movl $0x32,-0x18(%ebp)
if(ticks - p->recent_insert > wait_time_limit[p->curr_queue] && p->cpu_ticks == 0 && p->curr_queue != 0)
80103d47: 8b 1d a0 73 11 80 mov 0x801173a0,%ebx
wait_time_limit[i]=limit;
80103d4d: c7 45 ec 32 00 00 00 movl $0x32,-0x14(%ebp)
80103d54: c7 45 f0 32 00 00 00 movl $0x32,-0x10(%ebp)
80103d5b: c7 45 f4 32 00 00 00 movl $0x32,-0xc(%ebp)
80103d62: c7 45 f8 32 00 00 00 movl $0x32,-0x8(%ebp)
for(p=ptable.proc;p<&ptable.proc[NPROC];p++)
80103d69: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
if(ticks - p->recent_insert > wait_time_limit[p->curr_queue] && p->cpu_ticks == 0 && p->curr_queue != 0)
80103d70: 8b 90 a8 00 00 00 mov 0xa8(%eax),%edx
80103d76: 89 d9 mov %ebx,%ecx
80103d78: 2b 88 ac 00 00 00 sub 0xac(%eax),%ecx
80103d7e: 3b 4c 95 e8 cmp -0x18(%ebp,%edx,4),%ecx
80103d82: 76 1c jbe 80103da0 <aging+0x70>
80103d84: 8b 88 b0 00 00 00 mov 0xb0(%eax),%ecx
80103d8a: 85 c9 test %ecx,%ecx
80103d8c: 75 12 jne 80103da0 <aging+0x70>
80103d8e: 85 d2 test %edx,%edx
80103d90: 74 0e je 80103da0 <aging+0x70>
p->curr_queue--;
80103d92: 83 ea 01 sub $0x1,%edx
80103d95: 89 90 a8 00 00 00 mov %edx,0xa8(%eax)
80103d9b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80103d9f: 90 nop
for(p=ptable.proc;p<&ptable.proc[NPROC];p++)
80103da0: 05 b8 00 00 00 add $0xb8,%eax
80103da5: 3d 54 6b 11 80 cmp $0x80116b54,%eax
80103daa: 75 c4 jne 80103d70 <aging+0x40>
}
80103dac: 83 c4 20 add $0x20,%esp
80103daf: 5b pop %ebx
80103db0: 5d pop %ebp
80103db1: c3 ret
80103db2: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80103db9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80103dc0 <scheduler>:
{
80103dc0: f3 0f 1e fb endbr32
80103dc4: 55 push %ebp
80103dc5: 89 e5 mov %esp,%ebp
80103dc7: 57 push %edi
80103dc8: 56 push %esi
80103dc9: 53 push %ebx
80103dca: 83 ec 0c sub $0xc,%esp
struct cpu *c = mycpu();
80103dcd: e8 fe fb ff ff call 801039d0 <mycpu>
c->proc = 0;
80103dd2: c7 80 ac 00 00 00 00 movl $0x0,0xac(%eax)
80103dd9: 00 00 00
struct cpu *c = mycpu();
80103ddc: 89 c6 mov %eax,%esi
c->proc = 0;
80103dde: 8d 78 04 lea 0x4(%eax),%edi
80103de1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
asm volatile("sti");
80103de8: fb sti
acquire(&ptable.lock);
80103de9: 83 ec 0c sub $0xc,%esp
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80103dec: bb 54 3d 11 80 mov $0x80113d54,%ebx
acquire(&ptable.lock);
80103df1: 68 20 3d 11 80 push $0x80113d20
80103df6: e8 95 0d 00 00 call 80104b90 <acquire>
80103dfb: 83 c4 10 add $0x10,%esp
80103dfe: eb 0e jmp 80103e0e <scheduler+0x4e>
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80103e00: 81 c3 b8 00 00 00 add $0xb8,%ebx
80103e06: 81 fb 54 6b 11 80 cmp $0x80116b54,%ebx
80103e0c: 74 73 je 80103e81 <scheduler+0xc1>
if(p->state != RUNNABLE)
80103e0e: 83 7b 0c 03 cmpl $0x3,0xc(%ebx)
80103e12: 75 ec jne 80103e00 <scheduler+0x40>
switchuvm(p);
80103e14: 83 ec 0c sub $0xc,%esp
c->proc = p;
80103e17: 89 9e ac 00 00 00 mov %ebx,0xac(%esi)
switchuvm(p);
80103e1d: 53 push %ebx
80103e1e: e8 dd 32 00 00 call 80107100 <switchuvm>
if(p->cpu_ticks==0)
80103e23: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax
p->state = RUNNING;
80103e29: c7 43 0c 04 00 00 00 movl $0x4,0xc(%ebx)
if(p->cpu_ticks==0)
80103e30: 83 c4 10 add $0x10,%esp
80103e33: 85 c0 test %eax,%eax
80103e35: 75 07 jne 80103e3e <scheduler+0x7e>
p->n_run++;
80103e37: 83 83 b4 00 00 00 01 addl $0x1,0xb4(%ebx)
p->queues[p->curr_queue] += 1;
80103e3e: 8b 93 a8 00 00 00 mov 0xa8(%ebx),%edx
swtch(&(c->scheduler), p->context);
80103e44: 83 ec 08 sub $0x8,%esp
p->cpu_ticks++;
80103e47: 83 c0 01 add $0x1,%eax
p->queues[p->curr_queue] += 1;
80103e4a: 83 84 93 94 00 00 00 addl $0x1,0x94(%ebx,%edx,4)
80103e51: 01
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80103e52: 81 c3 b8 00 00 00 add $0xb8,%ebx
swtch(&(c->scheduler), p->context);
80103e58: ff b3 64 ff ff ff pushl -0x9c(%ebx)
80103e5e: 57 push %edi
p->cpu_ticks++;
80103e5f: 89 43 f8 mov %eax,-0x8(%ebx)
swtch(&(c->scheduler), p->context);
80103e62: e8 5c 10 00 00 call 80104ec3 <swtch>
switchkvm();
80103e67: e8 74 32 00 00 call 801070e0 <switchkvm>
c->proc = 0;
80103e6c: 83 c4 10 add $0x10,%esp
80103e6f: c7 86 ac 00 00 00 00 movl $0x0,0xac(%esi)
80103e76: 00 00 00
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80103e79: 81 fb 54 6b 11 80 cmp $0x80116b54,%ebx
80103e7f: 75 8d jne 80103e0e <scheduler+0x4e>
release(&ptable.lock);
80103e81: 83 ec 0c sub $0xc,%esp
80103e84: 68 20 3d 11 80 push $0x80113d20
80103e89: e8 c2 0d 00 00 call 80104c50 <release>
sti();
80103e8e: 83 c4 10 add $0x10,%esp
80103e91: e9 52 ff ff ff jmp 80103de8 <scheduler+0x28>
80103e96: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80103e9d: 8d 76 00 lea 0x0(%esi),%esi
80103ea0 <sched>:
{
80103ea0: f3 0f 1e fb endbr32
80103ea4: 55 push %ebp
80103ea5: 89 e5 mov %esp,%ebp
80103ea7: 56 push %esi
80103ea8: 53 push %ebx
pushcli();
80103ea9: e8 e2 0b 00 00 call 80104a90 <pushcli>
c = mycpu();
80103eae: e8 1d fb ff ff call 801039d0 <mycpu>
p = c->proc;
80103eb3: 8b 98 ac 00 00 00 mov 0xac(%eax),%ebx
popcli();
80103eb9: e8 22 0c 00 00 call 80104ae0 <popcli>
if(!holding(&ptable.lock))
80103ebe: 83 ec 0c sub $0xc,%esp
80103ec1: 68 20 3d 11 80 push $0x80113d20
80103ec6: e8 75 0c 00 00 call 80104b40 <holding>
80103ecb: 83 c4 10 add $0x10,%esp
80103ece: 85 c0 test %eax,%eax
80103ed0: 74 4f je 80103f21 <sched+0x81>
if(mycpu()->ncli != 1)
80103ed2: e8 f9 fa ff ff call 801039d0 <mycpu>
80103ed7: 83 b8 a4 00 00 00 01 cmpl $0x1,0xa4(%eax)
80103ede: 75 68 jne 80103f48 <sched+0xa8>
if(p->state == RUNNING)
80103ee0: 83 7b 0c 04 cmpl $0x4,0xc(%ebx)
80103ee4: 74 55 je 80103f3b <sched+0x9b>
asm volatile("pushfl; popl %0" : "=r" (eflags));
80103ee6: 9c pushf
80103ee7: 58 pop %eax
if(readeflags()&FL_IF)
80103ee8: f6 c4 02 test $0x2,%ah
80103eeb: 75 41 jne 80103f2e <sched+0x8e>
intena = mycpu()->intena;
80103eed: e8 de fa ff ff call 801039d0 <mycpu>
swtch(&p->context, mycpu()->scheduler);
80103ef2: 83 c3 1c add $0x1c,%ebx
intena = mycpu()->intena;
80103ef5: 8b b0 a8 00 00 00 mov 0xa8(%eax),%esi
swtch(&p->context, mycpu()->scheduler);
80103efb: e8 d0 fa ff ff call 801039d0 <mycpu>
80103f00: 83 ec 08 sub $0x8,%esp
80103f03: ff 70 04 pushl 0x4(%eax)
80103f06: 53 push %ebx
80103f07: e8 b7 0f 00 00 call 80104ec3 <swtch>
mycpu()->intena = intena;
80103f0c: e8 bf fa ff ff call 801039d0 <mycpu>
}
80103f11: 83 c4 10 add $0x10,%esp
mycpu()->intena = intena;
80103f14: 89 b0 a8 00 00 00 mov %esi,0xa8(%eax)
}
80103f1a: 8d 65 f8 lea -0x8(%ebp),%esp
80103f1d: 5b pop %ebx
80103f1e: 5e pop %esi
80103f1f: 5d pop %ebp
80103f20: c3 ret
panic("sched ptable.lock");
80103f21: 83 ec 0c sub $0xc,%esp
80103f24: 68 5b 7d 10 80 push $0x80107d5b
80103f29: e8 62 c4 ff ff call 80100390 <panic>
panic("sched interruptible");
80103f2e: 83 ec 0c sub $0xc,%esp
80103f31: 68 87 7d 10 80 push $0x80107d87
80103f36: e8 55 c4 ff ff call 80100390 <panic>
panic("sched running");
80103f3b: 83 ec 0c sub $0xc,%esp
80103f3e: 68 79 7d 10 80 push $0x80107d79
80103f43: e8 48 c4 ff ff call 80100390 <panic>
panic("sched locks");
80103f48: 83 ec 0c sub $0xc,%esp
80103f4b: 68 6d 7d 10 80 push $0x80107d6d
80103f50: e8 3b c4 ff ff call 80100390 <panic>
80103f55: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80103f5c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80103f60 <exit>:
{
80103f60: f3 0f 1e fb endbr32
80103f64: 55 push %ebp
80103f65: 89 e5 mov %esp,%ebp
80103f67: 57 push %edi
80103f68: 56 push %esi
80103f69: 53 push %ebx
80103f6a: 83 ec 0c sub $0xc,%esp
pushcli();
80103f6d: e8 1e 0b 00 00 call 80104a90 <pushcli>
c = mycpu();
80103f72: e8 59 fa ff ff call 801039d0 <mycpu>
p = c->proc;
80103f77: 8b b0 ac 00 00 00 mov 0xac(%eax),%esi
popcli();
80103f7d: e8 5e 0b 00 00 call 80104ae0 <popcli>
if(curproc == initproc)
80103f82: 8d 5e 28 lea 0x28(%esi),%ebx
80103f85: 8d 7e 68 lea 0x68(%esi),%edi
80103f88: 39 35 b8 b5 10 80 cmp %esi,0x8010b5b8
80103f8e: 0f 84 c0 00 00 00 je 80104054 <exit+0xf4>
80103f94: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if(curproc->ofile[fd]){
80103f98: 8b 03 mov (%ebx),%eax
80103f9a: 85 c0 test %eax,%eax
80103f9c: 74 12 je 80103fb0 <exit+0x50>
fileclose(curproc->ofile[fd]);
80103f9e: 83 ec 0c sub $0xc,%esp
80103fa1: 50 push %eax
80103fa2: e8 19 cf ff ff call 80100ec0 <fileclose>
curproc->ofile[fd] = 0;
80103fa7: c7 03 00 00 00 00 movl $0x0,(%ebx)
80103fad: 83 c4 10 add $0x10,%esp
for(fd = 0; fd < NOFILE; fd++){
80103fb0: 83 c3 04 add $0x4,%ebx
80103fb3: 39 fb cmp %edi,%ebx
80103fb5: 75 e1 jne 80103f98 <exit+0x38>
begin_op();
80103fb7: e8 74 ed ff ff call 80102d30 <begin_op>
iput(curproc->cwd);
80103fbc: 83 ec 0c sub $0xc,%esp
80103fbf: ff 76 68 pushl 0x68(%esi)
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80103fc2: bb 54 3d 11 80 mov $0x80113d54,%ebx
iput(curproc->cwd);
80103fc7: e8 c4 d8 ff ff call 80101890 <iput>
end_op();
80103fcc: e8 cf ed ff ff call 80102da0 <end_op>
curproc->cwd = 0;
80103fd1: c7 46 68 00 00 00 00 movl $0x0,0x68(%esi)
acquire(&ptable.lock);
80103fd8: c7 04 24 20 3d 11 80 movl $0x80113d20,(%esp)
80103fdf: e8 ac 0b 00 00 call 80104b90 <acquire>
wakeup1(curproc->parent);
80103fe4: 8b 46 14 mov 0x14(%esi),%eax
80103fe7: e8 a4 f7 ff ff call 80103790 <wakeup1>
80103fec: 83 c4 10 add $0x10,%esp
80103fef: eb 15 jmp 80104006 <exit+0xa6>
80103ff1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80103ff8: 81 c3 b8 00 00 00 add $0xb8,%ebx
80103ffe: 81 fb 54 6b 11 80 cmp $0x80116b54,%ebx
80104004: 74 2a je 80104030 <exit+0xd0>
if(p->parent == curproc){
80104006: 39 73 14 cmp %esi,0x14(%ebx)
80104009: 75 ed jne 80103ff8 <exit+0x98>
p->parent = initproc;
8010400b: a1 b8 b5 10 80 mov 0x8010b5b8,%eax
if(p->state == ZOMBIE)
80104010: 83 7b 0c 05 cmpl $0x5,0xc(%ebx)
p->parent = initproc;
80104014: 89 43 14 mov %eax,0x14(%ebx)
if(p->state == ZOMBIE)
80104017: 75 df jne 80103ff8 <exit+0x98>
wakeup1(initproc);
80104019: e8 72 f7 ff ff call 80103790 <wakeup1>
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
8010401e: 81 c3 b8 00 00 00 add $0xb8,%ebx
80104024: 81 fb 54 6b 11 80 cmp $0x80116b54,%ebx
8010402a: 75 da jne 80104006 <exit+0xa6>
8010402c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
curproc->etime = ticks;
80104030: a1 a0 73 11 80 mov 0x801173a0,%eax
curproc->state = ZOMBIE;
80104035: c7 46 0c 05 00 00 00 movl $0x5,0xc(%esi)
curproc->etime = ticks;
8010403c: 89 86 80 00 00 00 mov %eax,0x80(%esi)
sched();
80104042: e8 59 fe ff ff call 80103ea0 <sched>
panic("zombie exit");
80104047: 83 ec 0c sub $0xc,%esp
8010404a: 68 a8 7d 10 80 push $0x80107da8
8010404f: e8 3c c3 ff ff call 80100390 <panic>
panic("init exiting");
80104054: 83 ec 0c sub $0xc,%esp
80104057: 68 9b 7d 10 80 push $0x80107d9b
8010405c: e8 2f c3 ff ff call 80100390 <panic>
80104061: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104068: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010406f: 90 nop
80104070 <update>:
{
80104070: f3 0f 1e fb endbr32
80104074: 55 push %ebp
80104075: 89 e5 mov %esp,%ebp
80104077: 56 push %esi
80104078: 53 push %ebx
acquire(&ptable.lock);
80104079: 83 ec 0c sub $0xc,%esp
8010407c: 68 20 3d 11 80 push $0x80113d20
80104081: e8 0a 0b 00 00 call 80104b90 <acquire>
p->recent_insert=ticks;
80104086: 8b 35 a0 73 11 80 mov 0x801173a0,%esi
8010408c: 83 c4 10 add $0x10,%esp
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
8010408f: b8 54 3d 11 80 mov $0x80113d54,%eax
80104094: eb 16 jmp 801040ac <update+0x3c>
80104096: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010409d: 8d 76 00 lea 0x0(%esi),%esi
801040a0: 05 b8 00 00 00 add $0xb8,%eax
801040a5: 3d 54 6b 11 80 cmp $0x80116b54,%eax
801040aa: 74 4e je 801040fa <update+0x8a>
if(p->state==RUNNING)
801040ac: 83 78 0c 04 cmpl $0x4,0xc(%eax)
801040b0: 75 ee jne 801040a0 <update+0x30>
for(int j=0;j<p->curr_queue;j++)
801040b2: 8b 98 a8 00 00 00 mov 0xa8(%eax),%ebx
p->rtime++;
801040b8: 83 80 84 00 00 00 01 addl $0x1,0x84(%eax)
for(int j=0;j<p->curr_queue;j++)
801040bf: 85 db test %ebx,%ebx
801040c1: 7e 55 jle 80104118 <update+0xa8>
801040c3: 31 d2 xor %edx,%edx
int i=1;
801040c5: b9 01 00 00 00 mov $0x1,%ecx
801040ca: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
for(int j=0;j<p->curr_queue;j++)
801040d0: 83 c2 01 add $0x1,%edx
i=i*2;
801040d3: 01 c9 add %ecx,%ecx
for(int j=0;j<p->curr_queue;j++)
801040d5: 39 d3 cmp %edx,%ebx
801040d7: 75 f7 jne 801040d0 <update+0x60>
if(p->cpu_ticks>=i)
801040d9: 39 88 b0 00 00 00 cmp %ecx,0xb0(%eax)
801040df: 7c bf jl 801040a0 <update+0x30>
p->recent_insert=ticks;
801040e1: 89 b0 ac 00 00 00 mov %esi,0xac(%eax)
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
801040e7: 05 b8 00 00 00 add $0xb8,%eax
p->cpu_ticks=0;
801040ec: c7 40 f8 00 00 00 00 movl $0x0,-0x8(%eax)
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
801040f3: 3d 54 6b 11 80 cmp $0x80116b54,%eax
801040f8: 75 b2 jne 801040ac <update+0x3c>
release(&ptable.lock);
801040fa: 83 ec 0c sub $0xc,%esp
801040fd: 68 20 3d 11 80 push $0x80113d20
80104102: e8 49 0b 00 00 call 80104c50 <release>
}
80104107: 83 c4 10 add $0x10,%esp
8010410a: 8d 65 f8 lea -0x8(%ebp),%esp
8010410d: 5b pop %ebx
8010410e: 5e pop %esi
8010410f: 5d pop %ebp
80104110: c3 ret
80104111: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
int i=1;
80104118: b9 01 00 00 00 mov $0x1,%ecx
8010411d: eb ba jmp 801040d9 <update+0x69>
8010411f: 90 nop
80104120 <yield>:
{
80104120: f3 0f 1e fb endbr32
80104124: 55 push %ebp
80104125: 89 e5 mov %esp,%ebp
80104127: 53 push %ebx
80104128: 83 ec 10 sub $0x10,%esp
acquire(&ptable.lock); //DOC: yieldlock
8010412b: 68 20 3d 11 80 push $0x80113d20
80104130: e8 5b 0a 00 00 call 80104b90 <acquire>
pushcli();
80104135: e8 56 09 00 00 call 80104a90 <pushcli>
c = mycpu();
8010413a: e8 91 f8 ff ff call 801039d0 <mycpu>
p = c->proc;
8010413f: 8b 98 ac 00 00 00 mov 0xac(%eax),%ebx
popcli();
80104145: e8 96 09 00 00 call 80104ae0 <popcli>
myproc()->state = RUNNABLE;
8010414a: c7 43 0c 03 00 00 00 movl $0x3,0xc(%ebx)
sched();
80104151: e8 4a fd ff ff call 80103ea0 <sched>
release(&ptable.lock);
80104156: c7 04 24 20 3d 11 80 movl $0x80113d20,(%esp)
8010415d: e8 ee 0a 00 00 call 80104c50 <release>
}
80104162: 8b 5d fc mov -0x4(%ebp),%ebx
80104165: 83 c4 10 add $0x10,%esp
80104168: c9 leave
80104169: c3 ret
8010416a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80104170 <sleep>:
{
80104170: f3 0f 1e fb endbr32
80104174: 55 push %ebp
80104175: 89 e5 mov %esp,%ebp
80104177: 57 push %edi
80104178: 56 push %esi
80104179: 53 push %ebx
8010417a: 83 ec 0c sub $0xc,%esp
8010417d: 8b 7d 08 mov 0x8(%ebp),%edi
80104180: 8b 75 0c mov 0xc(%ebp),%esi
pushcli();
80104183: e8 08 09 00 00 call 80104a90 <pushcli>
c = mycpu();
80104188: e8 43 f8 ff ff call 801039d0 <mycpu>
p = c->proc;
8010418d: 8b 98 ac 00 00 00 mov 0xac(%eax),%ebx
popcli();
80104193: e8 48 09 00 00 call 80104ae0 <popcli>
if(p == 0)
80104198: 85 db test %ebx,%ebx
8010419a: 0f 84 9e 00 00 00 je 8010423e <sleep+0xce>
if(lk == 0)
801041a0: 85 f6 test %esi,%esi
801041a2: 0f 84 89 00 00 00 je 80104231 <sleep+0xc1>
if(lk != &ptable.lock){ //DOC: sleeplock0
801041a8: 81 fe 20 3d 11 80 cmp $0x80113d20,%esi
801041ae: 74 58 je 80104208 <sleep+0x98>
acquire(&ptable.lock); //DOC: sleeplock1
801041b0: 83 ec 0c sub $0xc,%esp
801041b3: 68 20 3d 11 80 push $0x80113d20
801041b8: e8 d3 09 00 00 call 80104b90 <acquire>
release(lk);
801041bd: 89 34 24 mov %esi,(%esp)
801041c0: e8 8b 0a 00 00 call 80104c50 <release>
p->last_stime=ticks;
801041c5: a1 a0 73 11 80 mov 0x801173a0,%eax
p->chan = chan;
801041ca: 89 7b 20 mov %edi,0x20(%ebx)
p->state = SLEEPING;
801041cd: c7 43 0c 02 00 00 00 movl $0x2,0xc(%ebx)
p->last_stime=ticks;
801041d4: 89 83 8c 00 00 00 mov %eax,0x8c(%ebx)
sched();
801041da: e8 c1 fc ff ff call 80103ea0 <sched>
p->chan = 0;
801041df: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx)
release(&ptable.lock);
801041e6: c7 04 24 20 3d 11 80 movl $0x80113d20,(%esp)
801041ed: e8 5e 0a 00 00 call 80104c50 <release>
acquire(lk);
801041f2: 89 75 08 mov %esi,0x8(%ebp)
801041f5: 83 c4 10 add $0x10,%esp
}
801041f8: 8d 65 f4 lea -0xc(%ebp),%esp
801041fb: 5b pop %ebx
801041fc: 5e pop %esi
801041fd: 5f pop %edi
801041fe: 5d pop %ebp
acquire(lk);
801041ff: e9 8c 09 00 00 jmp 80104b90 <acquire>
80104204: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
p->last_stime=ticks;
80104208: a1 a0 73 11 80 mov 0x801173a0,%eax
p->chan = chan;
8010420d: 89 7b 20 mov %edi,0x20(%ebx)
p->state = SLEEPING;
80104210: c7 43 0c 02 00 00 00 movl $0x2,0xc(%ebx)
p->last_stime=ticks;
80104217: 89 83 8c 00 00 00 mov %eax,0x8c(%ebx)
sched();
8010421d: e8 7e fc ff ff call 80103ea0 <sched>
p->chan = 0;
80104222: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx)
}
80104229: 8d 65 f4 lea -0xc(%ebp),%esp
8010422c: 5b pop %ebx
8010422d: 5e pop %esi
8010422e: 5f pop %edi
8010422f: 5d pop %ebp
80104230: c3 ret
panic("sleep without lk");
80104231: 83 ec 0c sub $0xc,%esp
80104234: 68 ba 7d 10 80 push $0x80107dba
80104239: e8 52 c1 ff ff call 80100390 <panic>
panic("sleep");
8010423e: 83 ec 0c sub $0xc,%esp
80104241: 68 b4 7d 10 80 push $0x80107db4
80104246: e8 45 c1 ff ff call 80100390 <panic>
8010424b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
8010424f: 90 nop
80104250 <wait>:
{
80104250: f3 0f 1e fb endbr32
80104254: 55 push %ebp
80104255: 89 e5 mov %esp,%ebp
80104257: 56 push %esi
80104258: 53 push %ebx
pushcli();
80104259: e8 32 08 00 00 call 80104a90 <pushcli>
c = mycpu();
8010425e: e8 6d f7 ff ff call 801039d0 <mycpu>
p = c->proc;
80104263: 8b b0 ac 00 00 00 mov 0xac(%eax),%esi
popcli();
80104269: e8 72 08 00 00 call 80104ae0 <popcli>
acquire(&ptable.lock);
8010426e: 83 ec 0c sub $0xc,%esp
80104271: 68 20 3d 11 80 push $0x80113d20
80104276: e8 15 09 00 00 call 80104b90 <acquire>
8010427b: 83 c4 10 add $0x10,%esp
havekids = 0;
8010427e: 31 c0 xor %eax,%eax
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80104280: bb 54 3d 11 80 mov $0x80113d54,%ebx
80104285: eb 17 jmp 8010429e <wait+0x4e>
80104287: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010428e: 66 90 xchg %ax,%ax
80104290: 81 c3 b8 00 00 00 add $0xb8,%ebx
80104296: 81 fb 54 6b 11 80 cmp $0x80116b54,%ebx
8010429c: 74 1e je 801042bc <wait+0x6c>
if(p->parent != curproc)
8010429e: 39 73 14 cmp %esi,0x14(%ebx)
801042a1: 75 ed jne 80104290 <wait+0x40>
if(p->state == ZOMBIE){
801042a3: 83 7b 0c 05 cmpl $0x5,0xc(%ebx)
801042a7: 74 37 je 801042e0 <wait+0x90>
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
801042a9: 81 c3 b8 00 00 00 add $0xb8,%ebx
havekids = 1;
801042af: b8 01 00 00 00 mov $0x1,%eax
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
801042b4: 81 fb 54 6b 11 80 cmp $0x80116b54,%ebx
801042ba: 75 e2 jne 8010429e <wait+0x4e>
if(!havekids || curproc->killed){
801042bc: 85 c0 test %eax,%eax
801042be: 74 76 je 80104336 <wait+0xe6>
801042c0: 8b 46 24 mov 0x24(%esi),%eax
801042c3: 85 c0 test %eax,%eax
801042c5: 75 6f jne 80104336 <wait+0xe6>
sleep(curproc, &ptable.lock); //DOC: wait-sleep
801042c7: 83 ec 08 sub $0x8,%esp
801042ca: 68 20 3d 11 80 push $0x80113d20
801042cf: 56 push %esi
801042d0: e8 9b fe ff ff call 80104170 <sleep>
havekids = 0;
801042d5: 83 c4 10 add $0x10,%esp
801042d8: eb a4 jmp 8010427e <wait+0x2e>
801042da: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
kfree(p->kstack);
801042e0: 83 ec 0c sub $0xc,%esp
801042e3: ff 73 08 pushl 0x8(%ebx)
pid = p->pid;
801042e6: 8b 73 10 mov 0x10(%ebx),%esi
kfree(p->kstack);
801042e9: e8 82 e1 ff ff call 80102470 <kfree>
freevm(p->pgdir);
801042ee: 5a pop %edx
801042ef: ff 73 04 pushl 0x4(%ebx)
p->kstack = 0;
801042f2: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
freevm(p->pgdir);
801042f9: e8 c2 31 00 00 call 801074c0 <freevm>
release(&ptable.lock);
801042fe: c7 04 24 20 3d 11 80 movl $0x80113d20,(%esp)
p->pid = 0;
80104305: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx)
p->parent = 0;
8010430c: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx)
p->name[0] = 0;
80104313: c6 43 6c 00 movb $0x0,0x6c(%ebx)
p->killed = 0;
80104317: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
p->state = UNUSED;
8010431e: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
release(&ptable.lock);
80104325: e8 26 09 00 00 call 80104c50 <release>
return pid;
8010432a: 83 c4 10 add $0x10,%esp
}
8010432d: 8d 65 f8 lea -0x8(%ebp),%esp
80104330: 89 f0 mov %esi,%eax
80104332: 5b pop %ebx
80104333: 5e pop %esi
80104334: 5d pop %ebp
80104335: c3 ret
release(&ptable.lock);
80104336: 83 ec 0c sub $0xc,%esp
return -1;
80104339: be ff ff ff ff mov $0xffffffff,%esi
release(&ptable.lock);
8010433e: 68 20 3d 11 80 push $0x80113d20
80104343: e8 08 09 00 00 call 80104c50 <release>
return -1;
80104348: 83 c4 10 add $0x10,%esp
8010434b: eb e0 jmp 8010432d <wait+0xdd>
8010434d: 8d 76 00 lea 0x0(%esi),%esi
80104350 <waitx>:
{
80104350: f3 0f 1e fb endbr32
80104354: 55 push %ebp
80104355: 89 e5 mov %esp,%ebp
80104357: 56 push %esi
80104358: 53 push %ebx
pushcli();
80104359: e8 32 07 00 00 call 80104a90 <pushcli>
c = mycpu();
8010435e: e8 6d f6 ff ff call 801039d0 <mycpu>
p = c->proc;
80104363: 8b b0 ac 00 00 00 mov 0xac(%eax),%esi
popcli();
80104369: e8 72 07 00 00 call 80104ae0 <popcli>
acquire(&ptable.lock);
8010436e: 83 ec 0c sub $0xc,%esp
80104371: 68 20 3d 11 80 push $0x80113d20
80104376: e8 15 08 00 00 call 80104b90 <acquire>
8010437b: 83 c4 10 add $0x10,%esp
havekids = 0;
8010437e: 31 c0 xor %eax,%eax
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80104380: bb 54 3d 11 80 mov $0x80113d54,%ebx
80104385: eb 17 jmp 8010439e <waitx+0x4e>
80104387: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010438e: 66 90 xchg %ax,%ax
80104390: 81 c3 b8 00 00 00 add $0xb8,%ebx
80104396: 81 fb 54 6b 11 80 cmp $0x80116b54,%ebx
8010439c: 74 1e je 801043bc <waitx+0x6c>
if(p->parent != curproc)
8010439e: 39 73 14 cmp %esi,0x14(%ebx)
801043a1: 75 ed jne 80104390 <waitx+0x40>
if(p->state == ZOMBIE){
801043a3: 83 7b 0c 05 cmpl $0x5,0xc(%ebx)
801043a7: 74 3f je 801043e8 <waitx+0x98>
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
801043a9: 81 c3 b8 00 00 00 add $0xb8,%ebx
havekids = 1;
801043af: b8 01 00 00 00 mov $0x1,%eax
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
801043b4: 81 fb 54 6b 11 80 cmp $0x80116b54,%ebx
801043ba: 75 e2 jne 8010439e <waitx+0x4e>
if(!havekids || curproc->killed){
801043bc: 85 c0 test %eax,%eax
801043be: 0f 84 a1 00 00 00 je 80104465 <waitx+0x115>
801043c4: 8b 46 24 mov 0x24(%esi),%eax
801043c7: 85 c0 test %eax,%eax
801043c9: 0f 85 96 00 00 00 jne 80104465 <waitx+0x115>
sleep(curproc, &ptable.lock); //DOC: wait-sleep
801043cf: 83 ec 08 sub $0x8,%esp
801043d2: 68 20 3d 11 80 push $0x80113d20
801043d7: 56 push %esi
801043d8: e8 93 fd ff ff call 80104170 <sleep>
havekids = 0;
801043dd: 83 c4 10 add $0x10,%esp
801043e0: eb 9c jmp 8010437e <waitx+0x2e>
801043e2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
kfree(p->kstack);
801043e8: 83 ec 0c sub $0xc,%esp
801043eb: ff 73 08 pushl 0x8(%ebx)
pid = p->pid;
801043ee: 8b 73 10 mov 0x10(%ebx),%esi
kfree(p->kstack);
801043f1: e8 7a e0 ff ff call 80102470 <kfree>
freevm(p->pgdir);
801043f6: 5a pop %edx
801043f7: ff 73 04 pushl 0x4(%ebx)
p->kstack = 0;
801043fa: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
freevm(p->pgdir);
80104401: e8 ba 30 00 00 call 801074c0 <freevm>
*wtime = p->etime - (p->ctime + p->rtime + p->total_stime); // Waiting_time = End_time - Creation_time - Run_time
80104406: 8b 8b 80 00 00 00 mov 0x80(%ebx),%ecx
8010440c: 8b 55 08 mov 0x8(%ebp),%edx
p->pid = 0;
8010440f: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx)
*wtime = p->etime - (p->ctime + p->rtime + p->total_stime); // Waiting_time = End_time - Creation_time - Run_time
80104416: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax
8010441c: 03 43 7c add 0x7c(%ebx),%eax
p->parent = 0;
8010441f: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx)
*wtime = p->etime - (p->ctime + p->rtime + p->total_stime); // Waiting_time = End_time - Creation_time - Run_time
80104426: 03 83 88 00 00 00 add 0x88(%ebx),%eax
p->name[0] = 0;
8010442c: c6 43 6c 00 movb $0x0,0x6c(%ebx)
*wtime = p->etime - (p->ctime + p->rtime + p->total_stime); // Waiting_time = End_time - Creation_time - Run_time
80104430: 29 c1 sub %eax,%ecx
p->killed = 0;
80104432: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
*rtime = p->rtime; // Run time
80104439: 8b 45 0c mov 0xc(%ebp),%eax
p->state = UNUSED;
8010443c: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
*wtime = p->etime - (p->ctime + p->rtime + p->total_stime); // Waiting_time = End_time - Creation_time - Run_time
80104443: 89 0a mov %ecx,(%edx)
*rtime = p->rtime; // Run time
80104445: 8b 93 84 00 00 00 mov 0x84(%ebx),%edx
8010444b: 89 10 mov %edx,(%eax)
release(&ptable.lock);
8010444d: c7 04 24 20 3d 11 80 movl $0x80113d20,(%esp)
80104454: e8 f7 07 00 00 call 80104c50 <release>
return pid;
80104459: 83 c4 10 add $0x10,%esp
}
8010445c: 8d 65 f8 lea -0x8(%ebp),%esp
8010445f: 89 f0 mov %esi,%eax
80104461: 5b pop %ebx
80104462: 5e pop %esi
80104463: 5d pop %ebp
80104464: c3 ret
release(&ptable.lock);
80104465: 83 ec 0c sub $0xc,%esp
return -1;
80104468: be ff ff ff ff mov $0xffffffff,%esi
release(&ptable.lock);
8010446d: 68 20 3d 11 80 push $0x80113d20
80104472: e8 d9 07 00 00 call 80104c50 <release>
return -1;
80104477: 83 c4 10 add $0x10,%esp
8010447a: eb e0 jmp 8010445c <waitx+0x10c>
8010447c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104480 <wakeup>:
// Wake up all processes sleeping on chan.
void
wakeup(void *chan)
{
80104480: f3 0f 1e fb endbr32
80104484: 55 push %ebp
80104485: 89 e5 mov %esp,%ebp
80104487: 53 push %ebx
80104488: 83 ec 10 sub $0x10,%esp
8010448b: 8b 5d 08 mov 0x8(%ebp),%ebx
acquire(&ptable.lock);
8010448e: 68 20 3d 11 80 push $0x80113d20
80104493: e8 f8 06 00 00 call 80104b90 <acquire>
wakeup1(chan);
80104498: 89 d8 mov %ebx,%eax
8010449a: e8 f1 f2 ff ff call 80103790 <wakeup1>
release(&ptable.lock);
8010449f: c7 45 08 20 3d 11 80 movl $0x80113d20,0x8(%ebp)
}
801044a6: 8b 5d fc mov -0x4(%ebp),%ebx
release(&ptable.lock);
801044a9: 83 c4 10 add $0x10,%esp
}
801044ac: c9 leave
release(&ptable.lock);
801044ad: e9 9e 07 00 00 jmp 80104c50 <release>
801044b2: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801044b9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801044c0 <kill>:
// Kill the process with the given pid.
// Process won't exit until it returns
// to user space (see trap in trap.c).
int
kill(int pid)
{
801044c0: f3 0f 1e fb endbr32
801044c4: 55 push %ebp
801044c5: 89 e5 mov %esp,%ebp
801044c7: 53 push %ebx
801044c8: 83 ec 10 sub $0x10,%esp
801044cb: 8b 5d 08 mov 0x8(%ebp),%ebx
struct proc *p;
acquire(&ptable.lock);
801044ce: 68 20 3d 11 80 push $0x80113d20
801044d3: e8 b8 06 00 00 call 80104b90 <acquire>
801044d8: 83 c4 10 add $0x10,%esp
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
801044db: b8 54 3d 11 80 mov $0x80113d54,%eax
801044e0: eb 12 jmp 801044f4 <kill+0x34>
801044e2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801044e8: 05 b8 00 00 00 add $0xb8,%eax
801044ed: 3d 54 6b 11 80 cmp $0x80116b54,%eax
801044f2: 74 34 je 80104528 <kill+0x68>
if(p->pid == pid){
801044f4: 39 58 10 cmp %ebx,0x10(%eax)
801044f7: 75 ef jne 801044e8 <kill+0x28>
p->killed = 1;
// Wake process from sleep if necessary.
if(p->state == SLEEPING)
801044f9: 83 78 0c 02 cmpl $0x2,0xc(%eax)
p->killed = 1;
801044fd: c7 40 24 01 00 00 00 movl $0x1,0x24(%eax)
if(p->state == SLEEPING)
80104504: 75 07 jne 8010450d <kill+0x4d>
p->state = RUNNABLE;
80104506: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax)
release(&ptable.lock);
8010450d: 83 ec 0c sub $0xc,%esp
80104510: 68 20 3d 11 80 push $0x80113d20
80104515: e8 36 07 00 00 call 80104c50 <release>
return 0;
}
}
release(&ptable.lock);
return -1;
}
8010451a: 8b 5d fc mov -0x4(%ebp),%ebx
return 0;
8010451d: 83 c4 10 add $0x10,%esp
80104520: 31 c0 xor %eax,%eax
}
80104522: c9 leave
80104523: c3 ret
80104524: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
release(&ptable.lock);
80104528: 83 ec 0c sub $0xc,%esp
8010452b: 68 20 3d 11 80 push $0x80113d20
80104530: e8 1b 07 00 00 call 80104c50 <release>
}
80104535: 8b 5d fc mov -0x4(%ebp),%ebx
return -1;
80104538: 83 c4 10 add $0x10,%esp
8010453b: b8 ff ff ff ff mov $0xffffffff,%eax
}
80104540: c9 leave
80104541: c3 ret
80104542: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104549: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104550 <procdump>:
// Print a process listing to console. For debugging.
// Runs when user types ^P on console.
// No lock to avoid wedging a stuck machine further.
void
procdump(void)
{
80104550: f3 0f 1e fb endbr32
80104554: 55 push %ebp
80104555: 89 e5 mov %esp,%ebp
80104557: 57 push %edi
80104558: 56 push %esi
80104559: 8d 75 e8 lea -0x18(%ebp),%esi
8010455c: 53 push %ebx
8010455d: bb c0 3d 11 80 mov $0x80113dc0,%ebx
80104562: 83 ec 3c sub $0x3c,%esp
80104565: eb 2b jmp 80104592 <procdump+0x42>
80104567: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010456e: 66 90 xchg %ax,%ax
if(p->state == SLEEPING){
getcallerpcs((uint*)p->context->ebp+2, pc);
for(i=0; i<10 && pc[i] != 0; i++)
cprintf(" %p", pc[i]);
}
cprintf("\n");
80104570: 83 ec 0c sub $0xc,%esp
80104573: 68 63 82 10 80 push $0x80108263
80104578: e8 33 c1 ff ff call 801006b0 <cprintf>
8010457d: 83 c4 10 add $0x10,%esp
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80104580: 81 c3 b8 00 00 00 add $0xb8,%ebx
80104586: 81 fb c0 6b 11 80 cmp $0x80116bc0,%ebx
8010458c: 0f 84 8e 00 00 00 je 80104620 <procdump+0xd0>
if(p->state == UNUSED)
80104592: 8b 43 a0 mov -0x60(%ebx),%eax
80104595: 85 c0 test %eax,%eax
80104597: 74 e7 je 80104580 <procdump+0x30>
state = "???";
80104599: ba cb 7d 10 80 mov $0x80107dcb,%edx
if(p->state >= 0 && p->state < NELEM(states) && states[p->state])
8010459e: 83 f8 05 cmp $0x5,%eax
801045a1: 77 11 ja 801045b4 <procdump+0x64>
801045a3: 8b 14 85 48 7f 10 80 mov -0x7fef80b8(,%eax,4),%edx
state = "???";
801045aa: b8 cb 7d 10 80 mov $0x80107dcb,%eax
801045af: 85 d2 test %edx,%edx
801045b1: 0f 44 d0 cmove %eax,%edx
cprintf("%d %s %s", p->pid, state, p->name);
801045b4: 53 push %ebx
801045b5: 52 push %edx
801045b6: ff 73 a4 pushl -0x5c(%ebx)
801045b9: 68 cf 7d 10 80 push $0x80107dcf
801045be: e8 ed c0 ff ff call 801006b0 <cprintf>
if(p->state == SLEEPING){
801045c3: 83 c4 10 add $0x10,%esp
801045c6: 83 7b a0 02 cmpl $0x2,-0x60(%ebx)
801045ca: 75 a4 jne 80104570 <procdump+0x20>
getcallerpcs((uint*)p->context->ebp+2, pc);
801045cc: 83 ec 08 sub $0x8,%esp
801045cf: 8d 45 c0 lea -0x40(%ebp),%eax
801045d2: 8d 7d c0 lea -0x40(%ebp),%edi
801045d5: 50 push %eax
801045d6: 8b 43 b0 mov -0x50(%ebx),%eax
801045d9: 8b 40 0c mov 0xc(%eax),%eax
801045dc: 83 c0 08 add $0x8,%eax
801045df: 50 push %eax
801045e0: e8 4b 04 00 00 call 80104a30 <getcallerpcs>
for(i=0; i<10 && pc[i] != 0; i++)
801045e5: 83 c4 10 add $0x10,%esp
801045e8: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801045ef: 90 nop
801045f0: 8b 17 mov (%edi),%edx
801045f2: 85 d2 test %edx,%edx
801045f4: 0f 84 76 ff ff ff je 80104570 <procdump+0x20>
cprintf(" %p", pc[i]);
801045fa: 83 ec 08 sub $0x8,%esp
801045fd: 83 c7 04 add $0x4,%edi
80104600: 52 push %edx
80104601: 68 21 78 10 80 push $0x80107821
80104606: e8 a5 c0 ff ff call 801006b0 <cprintf>
for(i=0; i<10 && pc[i] != 0; i++)
8010460b: 83 c4 10 add $0x10,%esp
8010460e: 39 fe cmp %edi,%esi
80104610: 75 de jne 801045f0 <procdump+0xa0>
80104612: e9 59 ff ff ff jmp 80104570 <procdump+0x20>
80104617: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010461e: 66 90 xchg %ax,%ax
}
}
80104620: 8d 65 f4 lea -0xc(%ebp),%esp
80104623: 5b pop %ebx
80104624: 5e pop %esi
80104625: 5f pop %edi
80104626: 5d pop %ebp
80104627: c3 ret
80104628: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010462f: 90 nop
80104630 <set_priority>:
int set_priority(int new_priority, int pid)
{
80104630: f3 0f 1e fb endbr32
80104634: 55 push %ebp
80104635: 89 e5 mov %esp,%ebp
80104637: 56 push %esi
80104638: 8b 75 08 mov 0x8(%ebp),%esi
8010463b: 53 push %ebx
8010463c: 8b 5d 0c mov 0xc(%ebp),%ebx
struct proc *p;
if(new_priority < 0 || new_priority > 100)
8010463f: 83 fe 64 cmp $0x64,%esi
80104642: 77 4c ja 80104690 <set_priority+0x60>
return -1;
else
{
acquire(&ptable.lock);
80104644: 83 ec 0c sub $0xc,%esp
80104647: 68 20 3d 11 80 push $0x80113d20
8010464c: e8 3f 05 00 00 call 80104b90 <acquire>
80104651: 83 c4 10 add $0x10,%esp
for(p=ptable.proc;p<&ptable.proc[NPROC];p++)
80104654: b8 54 3d 11 80 mov $0x80113d54,%eax
80104659: eb 11 jmp 8010466c <set_priority+0x3c>
8010465b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
8010465f: 90 nop
80104660: 05 b8 00 00 00 add $0xb8,%eax
80104665: 3d 54 6b 11 80 cmp $0x80116b54,%eax
8010466a: 74 0b je 80104677 <set_priority+0x47>
{
if(p->pid==pid)
8010466c: 39 58 10 cmp %ebx,0x10(%eax)
8010466f: 75 ef jne 80104660 <set_priority+0x30>
{
// cprintf("Priority of %d changed to %d\n", p->pid, new_priority);
p->priority=new_priority;
80104671: 89 b0 90 00 00 00 mov %esi,0x90(%eax)
break;
}
}
release(&ptable.lock);
80104677: 83 ec 0c sub $0xc,%esp
8010467a: 68 20 3d 11 80 push $0x80113d20
8010467f: e8 cc 05 00 00 call 80104c50 <release>
return 0;
80104684: 83 c4 10 add $0x10,%esp
80104687: 31 c0 xor %eax,%eax
}
}
80104689: 8d 65 f8 lea -0x8(%ebp),%esp
8010468c: 5b pop %ebx
8010468d: 5e pop %esi
8010468e: 5d pop %ebp
8010468f: c3 ret
return -1;
80104690: b8 ff ff ff ff mov $0xffffffff,%eax
80104695: eb f2 jmp 80104689 <set_priority+0x59>
80104697: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010469e: 66 90 xchg %ax,%ax
801046a0 <ps>:
int ps(void)
{
801046a0: f3 0f 1e fb endbr32
801046a4: 55 push %ebp
801046a5: 89 e5 mov %esp,%ebp
801046a7: 53 push %ebx
struct proc *p;
cprintf("PID\tPriority\tState\t\tr_time\tw_time\tn_run\tcur_q\tq0\tq1\tq2\tq3\tq4\n");
acquire(&ptable.lock);
for(p=ptable.proc;p<&ptable.proc[NPROC];p++)
801046a8: bb 54 3d 11 80 mov $0x80113d54,%ebx
{
801046ad: 83 ec 10 sub $0x10,%esp
cprintf("PID\tPriority\tState\t\tr_time\tw_time\tn_run\tcur_q\tq0\tq1\tq2\tq3\tq4\n");
801046b0: 68 2c 7e 10 80 push $0x80107e2c
801046b5: e8 f6 bf ff ff call 801006b0 <cprintf>
acquire(&ptable.lock);
801046ba: c7 04 24 20 3d 11 80 movl $0x80113d20,(%esp)
801046c1: e8 ca 04 00 00 call 80104b90 <acquire>
801046c6: 83 c4 10 add $0x10,%esp
801046c9: eb 3b jmp 80104706 <ps+0x66>
801046cb: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801046cf: 90 nop
{
if(p->state == EMBRYO)
{
cprintf("%d\t%d\t\tEMBRYO\t\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\n", p->pid, p->priority,p->rtime, ticks - p->recent_insert, p->n_run, p->curr_queue, p->queues[0], p->queues[1], p->queues[2], p->queues[3], p->queues[4]);
}
if(p->state == SLEEPING)
801046d0: 83 f8 02 cmp $0x2,%eax
801046d3: 0f 84 93 00 00 00 je 8010476c <ps+0xcc>
{
cprintf("%d\t%d\t\tSLEEPING\t%d\t0\t%d\t%d\t%d\t%d\t%d\t%d\t%d\n", p->pid, p->priority,p->rtime, p->n_run, p->curr_queue, p->queues[0], p->queues[1], p->queues[2], p->queues[3], p->queues[4]);
}
if(p->state == RUNNABLE)
801046d9: 83 f8 03 cmp $0x3,%eax
801046dc: 0f 84 df 00 00 00 je 801047c1 <ps+0x121>
{
cprintf("%d\t%d\t\tRUNNABLE\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\n", p->pid, p->priority,p->rtime, ticks - p->recent_insert, p->n_run, p->curr_queue, p->queues[0], p->queues[1], p->queues[2], p->queues[3], p->queues[4]);
}
if(p->state == RUNNING)
801046e2: 83 f8 04 cmp $0x4,%eax
801046e5: 0f 84 34 01 00 00 je 8010481f <ps+0x17f>
{
cprintf("%d\t%d\t\tRUNNING\t\t%d\t0\t%d\t%d\t%d\t%d\t%d\t%d\t%d\n", p->pid, p->priority,p->rtime, p->n_run, p->curr_queue, p->queues[0], p->queues[1], p->queues[2], p->queues[3], p->queues[4]);
}
if(p->state == ZOMBIE)
801046eb: 83 f8 05 cmp $0x5,%eax
801046ee: 0f 84 80 01 00 00 je 80104874 <ps+0x1d4>
for(p=ptable.proc;p<&ptable.proc[NPROC];p++)
801046f4: 81 c3 b8 00 00 00 add $0xb8,%ebx
801046fa: 81 fb 54 6b 11 80 cmp $0x80116b54,%ebx
80104700: 0f 84 b4 01 00 00 je 801048ba <ps+0x21a>
if(p->state == EMBRYO)
80104706: 8b 43 0c mov 0xc(%ebx),%eax
80104709: 83 f8 01 cmp $0x1,%eax
8010470c: 75 c2 jne 801046d0 <ps+0x30>
cprintf("%d\t%d\t\tEMBRYO\t\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\n", p->pid, p->priority,p->rtime, ticks - p->recent_insert, p->n_run, p->curr_queue, p->queues[0], p->queues[1], p->queues[2], p->queues[3], p->queues[4]);
8010470e: a1 a0 73 11 80 mov 0x801173a0,%eax
80104713: 2b 83 ac 00 00 00 sub 0xac(%ebx),%eax
80104719: ff b3 a4 00 00 00 pushl 0xa4(%ebx)
8010471f: ff b3 a0 00 00 00 pushl 0xa0(%ebx)
80104725: ff b3 9c 00 00 00 pushl 0x9c(%ebx)
8010472b: ff b3 98 00 00 00 pushl 0x98(%ebx)
80104731: ff b3 94 00 00 00 pushl 0x94(%ebx)
80104737: ff b3 a8 00 00 00 pushl 0xa8(%ebx)
8010473d: ff b3 b4 00 00 00 pushl 0xb4(%ebx)
80104743: 50 push %eax
80104744: ff b3 84 00 00 00 pushl 0x84(%ebx)
8010474a: ff b3 90 00 00 00 pushl 0x90(%ebx)
80104750: ff 73 10 pushl 0x10(%ebx)
80104753: 68 6c 7e 10 80 push $0x80107e6c
80104758: e8 53 bf ff ff call 801006b0 <cprintf>
8010475d: 8b 43 0c mov 0xc(%ebx),%eax
80104760: 83 c4 30 add $0x30,%esp
if(p->state == SLEEPING)
80104763: 83 f8 02 cmp $0x2,%eax
80104766: 0f 85 6d ff ff ff jne 801046d9 <ps+0x39>
cprintf("%d\t%d\t\tSLEEPING\t%d\t0\t%d\t%d\t%d\t%d\t%d\t%d\t%d\n", p->pid, p->priority,p->rtime, p->n_run, p->curr_queue, p->queues[0], p->queues[1], p->queues[2], p->queues[3], p->queues[4]);
8010476c: 83 ec 04 sub $0x4,%esp
8010476f: ff b3 a4 00 00 00 pushl 0xa4(%ebx)
80104775: ff b3 a0 00 00 00 pushl 0xa0(%ebx)
8010477b: ff b3 9c 00 00 00 pushl 0x9c(%ebx)
80104781: ff b3 98 00 00 00 pushl 0x98(%ebx)
80104787: ff b3 94 00 00 00 pushl 0x94(%ebx)
8010478d: ff b3 a8 00 00 00 pushl 0xa8(%ebx)
80104793: ff b3 b4 00 00 00 pushl 0xb4(%ebx)
80104799: ff b3 84 00 00 00 pushl 0x84(%ebx)
8010479f: ff b3 90 00 00 00 pushl 0x90(%ebx)
801047a5: ff 73 10 pushl 0x10(%ebx)
801047a8: 68 98 7e 10 80 push $0x80107e98
801047ad: e8 fe be ff ff call 801006b0 <cprintf>
801047b2: 8b 43 0c mov 0xc(%ebx),%eax
801047b5: 83 c4 30 add $0x30,%esp
if(p->state == RUNNABLE)
801047b8: 83 f8 03 cmp $0x3,%eax
801047bb: 0f 85 21 ff ff ff jne 801046e2 <ps+0x42>
cprintf("%d\t%d\t\tRUNNABLE\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\n", p->pid, p->priority,p->rtime, ticks - p->recent_insert, p->n_run, p->curr_queue, p->queues[0], p->queues[1], p->queues[2], p->queues[3], p->queues[4]);
801047c1: a1 a0 73 11 80 mov 0x801173a0,%eax
801047c6: 2b 83 ac 00 00 00 sub 0xac(%ebx),%eax
801047cc: ff b3 a4 00 00 00 pushl 0xa4(%ebx)
801047d2: ff b3 a0 00 00 00 pushl 0xa0(%ebx)
801047d8: ff b3 9c 00 00 00 pushl 0x9c(%ebx)
801047de: ff b3 98 00 00 00 pushl 0x98(%ebx)
801047e4: ff b3 94 00 00 00 pushl 0x94(%ebx)
801047ea: ff b3 a8 00 00 00 pushl 0xa8(%ebx)
801047f0: ff b3 b4 00 00 00 pushl 0xb4(%ebx)
801047f6: 50 push %eax
801047f7: ff b3 84 00 00 00 pushl 0x84(%ebx)
801047fd: ff b3 90 00 00 00 pushl 0x90(%ebx)
80104803: ff 73 10 pushl 0x10(%ebx)
80104806: 68 c4 7e 10 80 push $0x80107ec4
8010480b: e8 a0 be ff ff call 801006b0 <cprintf>
80104810: 8b 43 0c mov 0xc(%ebx),%eax
80104813: 83 c4 30 add $0x30,%esp
if(p->state == RUNNING)
80104816: 83 f8 04 cmp $0x4,%eax
80104819: 0f 85 cc fe ff ff jne 801046eb <ps+0x4b>
cprintf("%d\t%d\t\tRUNNING\t\t%d\t0\t%d\t%d\t%d\t%d\t%d\t%d\t%d\n", p->pid, p->priority,p->rtime, p->n_run, p->curr_queue, p->queues[0], p->queues[1], p->queues[2], p->queues[3], p->queues[4]);
8010481f: 83 ec 04 sub $0x4,%esp
80104822: ff b3 a4 00 00 00 pushl 0xa4(%ebx)
80104828: ff b3 a0 00 00 00 pushl 0xa0(%ebx)
8010482e: ff b3 9c 00 00 00 pushl 0x9c(%ebx)
80104834: ff b3 98 00 00 00 pushl 0x98(%ebx)
8010483a: ff b3 94 00 00 00 pushl 0x94(%ebx)
80104840: ff b3 a8 00 00 00 pushl 0xa8(%ebx)
80104846: ff b3 b4 00 00 00 pushl 0xb4(%ebx)
8010484c: ff b3 84 00 00 00 pushl 0x84(%ebx)
80104852: ff b3 90 00 00 00 pushl 0x90(%ebx)
80104858: ff 73 10 pushl 0x10(%ebx)
8010485b: 68 f0 7e 10 80 push $0x80107ef0
80104860: e8 4b be ff ff call 801006b0 <cprintf>
80104865: 8b 43 0c mov 0xc(%ebx),%eax
80104868: 83 c4 30 add $0x30,%esp
if(p->state == ZOMBIE)
8010486b: 83 f8 05 cmp $0x5,%eax
8010486e: 0f 85 80 fe ff ff jne 801046f4 <ps+0x54>
{
cprintf("%d\t%d\t\tZOMBIE\t\t%d\t0\t%d\t%d\t%d\t%d\t%d\t%d\t%d\n", p->pid, p->priority,p->rtime, p->n_run, p->curr_queue, p->queues[0], p->queues[1], p->queues[2], p->queues[3], p->queues[4]);
80104874: 83 ec 04 sub $0x4,%esp
80104877: ff b3 a4 00 00 00 pushl 0xa4(%ebx)
for(p=ptable.proc;p<&ptable.proc[NPROC];p++)
8010487d: 81 c3 b8 00 00 00 add $0xb8,%ebx
cprintf("%d\t%d\t\tZOMBIE\t\t%d\t0\t%d\t%d\t%d\t%d\t%d\t%d\t%d\n", p->pid, p->priority,p->rtime, p->n_run, p->curr_queue, p->queues[0], p->queues[1], p->queues[2], p->queues[3], p->queues[4]);
80104883: ff 73 e8 pushl -0x18(%ebx)
80104886: ff 73 e4 pushl -0x1c(%ebx)
80104889: ff 73 e0 pushl -0x20(%ebx)
8010488c: ff 73 dc pushl -0x24(%ebx)
8010488f: ff 73 f0 pushl -0x10(%ebx)
80104892: ff 73 fc pushl -0x4(%ebx)
80104895: ff 73 cc pushl -0x34(%ebx)
80104898: ff 73 d8 pushl -0x28(%ebx)
8010489b: ff b3 58 ff ff ff pushl -0xa8(%ebx)
801048a1: 68 1c 7f 10 80 push $0x80107f1c
801048a6: e8 05 be ff ff call 801006b0 <cprintf>
801048ab: 83 c4 30 add $0x30,%esp
for(p=ptable.proc;p<&ptable.proc[NPROC];p++)
801048ae: 81 fb 54 6b 11 80 cmp $0x80116b54,%ebx
801048b4: 0f 85 4c fe ff ff jne 80104706 <ps+0x66>
}
}
release(&ptable.lock);
801048ba: 83 ec 0c sub $0xc,%esp
801048bd: 68 20 3d 11 80 push $0x80113d20
801048c2: e8 89 03 00 00 call 80104c50 <release>
return 0;
801048c7: 8b 5d fc mov -0x4(%ebp),%ebx
801048ca: 31 c0 xor %eax,%eax
801048cc: c9 leave
801048cd: c3 ret
801048ce: 66 90 xchg %ax,%ax
801048d0 <initsleeplock>:
#include "spinlock.h"
#include "sleeplock.h"
void
initsleeplock(struct sleeplock *lk, char *name)
{
801048d0: f3 0f 1e fb endbr32
801048d4: 55 push %ebp
801048d5: 89 e5 mov %esp,%ebp
801048d7: 53 push %ebx
801048d8: 83 ec 0c sub $0xc,%esp
801048db: 8b 5d 08 mov 0x8(%ebp),%ebx
initlock(&lk->lk, "sleep lock");
801048de: 68 60 7f 10 80 push $0x80107f60
801048e3: 8d 43 04 lea 0x4(%ebx),%eax
801048e6: 50 push %eax
801048e7: e8 24 01 00 00 call 80104a10 <initlock>
lk->name = name;
801048ec: 8b 45 0c mov 0xc(%ebp),%eax
lk->locked = 0;
801048ef: c7 03 00 00 00 00 movl $0x0,(%ebx)
lk->pid = 0;
}
801048f5: 83 c4 10 add $0x10,%esp
lk->pid = 0;
801048f8: c7 43 3c 00 00 00 00 movl $0x0,0x3c(%ebx)
lk->name = name;
801048ff: 89 43 38 mov %eax,0x38(%ebx)
}
80104902: 8b 5d fc mov -0x4(%ebp),%ebx
80104905: c9 leave
80104906: c3 ret
80104907: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010490e: 66 90 xchg %ax,%ax
80104910 <acquiresleep>:
void
acquiresleep(struct sleeplock *lk)
{
80104910: f3 0f 1e fb endbr32
80104914: 55 push %ebp
80104915: 89 e5 mov %esp,%ebp
80104917: 56 push %esi
80104918: 53 push %ebx
80104919: 8b 5d 08 mov 0x8(%ebp),%ebx
acquire(&lk->lk);
8010491c: 8d 73 04 lea 0x4(%ebx),%esi
8010491f: 83 ec 0c sub $0xc,%esp
80104922: 56 push %esi
80104923: e8 68 02 00 00 call 80104b90 <acquire>
while (lk->locked) {
80104928: 8b 13 mov (%ebx),%edx
8010492a: 83 c4 10 add $0x10,%esp
8010492d: 85 d2 test %edx,%edx
8010492f: 74 1a je 8010494b <acquiresleep+0x3b>
80104931: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
sleep(lk, &lk->lk);
80104938: 83 ec 08 sub $0x8,%esp
8010493b: 56 push %esi
8010493c: 53 push %ebx
8010493d: e8 2e f8 ff ff call 80104170 <sleep>
while (lk->locked) {
80104942: 8b 03 mov (%ebx),%eax
80104944: 83 c4 10 add $0x10,%esp
80104947: 85 c0 test %eax,%eax
80104949: 75 ed jne 80104938 <acquiresleep+0x28>
}
lk->locked = 1;
8010494b: c7 03 01 00 00 00 movl $0x1,(%ebx)
lk->pid = myproc()->pid;
80104951: e8 0a f1 ff ff call 80103a60 <myproc>
80104956: 8b 40 10 mov 0x10(%eax),%eax
80104959: 89 43 3c mov %eax,0x3c(%ebx)
release(&lk->lk);
8010495c: 89 75 08 mov %esi,0x8(%ebp)
}
8010495f: 8d 65 f8 lea -0x8(%ebp),%esp
80104962: 5b pop %ebx
80104963: 5e pop %esi
80104964: 5d pop %ebp
release(&lk->lk);
80104965: e9 e6 02 00 00 jmp 80104c50 <release>
8010496a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80104970 <releasesleep>:
void
releasesleep(struct sleeplock *lk)
{
80104970: f3 0f 1e fb endbr32
80104974: 55 push %ebp
80104975: 89 e5 mov %esp,%ebp
80104977: 56 push %esi
80104978: 53 push %ebx
80104979: 8b 5d 08 mov 0x8(%ebp),%ebx
acquire(&lk->lk);
8010497c: 8d 73 04 lea 0x4(%ebx),%esi
8010497f: 83 ec 0c sub $0xc,%esp
80104982: 56 push %esi
80104983: e8 08 02 00 00 call 80104b90 <acquire>
lk->locked = 0;
80104988: c7 03 00 00 00 00 movl $0x0,(%ebx)
lk->pid = 0;
8010498e: c7 43 3c 00 00 00 00 movl $0x0,0x3c(%ebx)
wakeup(lk);
80104995: 89 1c 24 mov %ebx,(%esp)
80104998: e8 e3 fa ff ff call 80104480 <wakeup>
release(&lk->lk);
8010499d: 89 75 08 mov %esi,0x8(%ebp)
801049a0: 83 c4 10 add $0x10,%esp
}
801049a3: 8d 65 f8 lea -0x8(%ebp),%esp
801049a6: 5b pop %ebx
801049a7: 5e pop %esi
801049a8: 5d pop %ebp
release(&lk->lk);
801049a9: e9 a2 02 00 00 jmp 80104c50 <release>
801049ae: 66 90 xchg %ax,%ax
801049b0 <holdingsleep>:
int
holdingsleep(struct sleeplock *lk)
{
801049b0: f3 0f 1e fb endbr32
801049b4: 55 push %ebp
801049b5: 89 e5 mov %esp,%ebp
801049b7: 57 push %edi
801049b8: 31 ff xor %edi,%edi
801049ba: 56 push %esi
801049bb: 53 push %ebx
801049bc: 83 ec 18 sub $0x18,%esp
801049bf: 8b 5d 08 mov 0x8(%ebp),%ebx
int r;
acquire(&lk->lk);
801049c2: 8d 73 04 lea 0x4(%ebx),%esi
801049c5: 56 push %esi
801049c6: e8 c5 01 00 00 call 80104b90 <acquire>
r = lk->locked && (lk->pid == myproc()->pid);
801049cb: 8b 03 mov (%ebx),%eax
801049cd: 83 c4 10 add $0x10,%esp
801049d0: 85 c0 test %eax,%eax
801049d2: 75 1c jne 801049f0 <holdingsleep+0x40>
release(&lk->lk);
801049d4: 83 ec 0c sub $0xc,%esp
801049d7: 56 push %esi
801049d8: e8 73 02 00 00 call 80104c50 <release>
return r;
}
801049dd: 8d 65 f4 lea -0xc(%ebp),%esp
801049e0: 89 f8 mov %edi,%eax
801049e2: 5b pop %ebx
801049e3: 5e pop %esi
801049e4: 5f pop %edi
801049e5: 5d pop %ebp
801049e6: c3 ret
801049e7: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801049ee: 66 90 xchg %ax,%ax
r = lk->locked && (lk->pid == myproc()->pid);
801049f0: 8b 5b 3c mov 0x3c(%ebx),%ebx
801049f3: e8 68 f0 ff ff call 80103a60 <myproc>
801049f8: 39 58 10 cmp %ebx,0x10(%eax)
801049fb: 0f 94 c0 sete %al
801049fe: 0f b6 c0 movzbl %al,%eax
80104a01: 89 c7 mov %eax,%edi
80104a03: eb cf jmp 801049d4 <holdingsleep+0x24>
80104a05: 66 90 xchg %ax,%ax
80104a07: 66 90 xchg %ax,%ax
80104a09: 66 90 xchg %ax,%ax
80104a0b: 66 90 xchg %ax,%ax
80104a0d: 66 90 xchg %ax,%ax
80104a0f: 90 nop
80104a10 <initlock>:
#include "proc.h"
#include "spinlock.h"
void
initlock(struct spinlock *lk, char *name)
{
80104a10: f3 0f 1e fb endbr32
80104a14: 55 push %ebp
80104a15: 89 e5 mov %esp,%ebp
80104a17: 8b 45 08 mov 0x8(%ebp),%eax
lk->name = name;
80104a1a: 8b 55 0c mov 0xc(%ebp),%edx
lk->locked = 0;
80104a1d: c7 00 00 00 00 00 movl $0x0,(%eax)
lk->name = name;
80104a23: 89 50 04 mov %edx,0x4(%eax)
lk->cpu = 0;
80104a26: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
}
80104a2d: 5d pop %ebp
80104a2e: c3 ret
80104a2f: 90 nop
80104a30 <getcallerpcs>:
}
// Record the current call stack in pcs[] by following the %ebp chain.
void
getcallerpcs(void *v, uint pcs[])
{
80104a30: f3 0f 1e fb endbr32
80104a34: 55 push %ebp
uint *ebp;
int i;
ebp = (uint*)v - 2;
for(i = 0; i < 10; i++){
80104a35: 31 d2 xor %edx,%edx
{
80104a37: 89 e5 mov %esp,%ebp
80104a39: 53 push %ebx
ebp = (uint*)v - 2;
80104a3a: 8b 45 08 mov 0x8(%ebp),%eax
{
80104a3d: 8b 4d 0c mov 0xc(%ebp),%ecx
ebp = (uint*)v - 2;
80104a40: 83 e8 08 sub $0x8,%eax
for(i = 0; i < 10; i++){
80104a43: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104a47: 90 nop
if(ebp == 0 || ebp < (uint*)KERNBASE || ebp == (uint*)0xffffffff)
80104a48: 8d 98 00 00 00 80 lea -0x80000000(%eax),%ebx
80104a4e: 81 fb fe ff ff 7f cmp $0x7ffffffe,%ebx
80104a54: 77 1a ja 80104a70 <getcallerpcs+0x40>
break;
pcs[i] = ebp[1]; // saved %eip
80104a56: 8b 58 04 mov 0x4(%eax),%ebx
80104a59: 89 1c 91 mov %ebx,(%ecx,%edx,4)
for(i = 0; i < 10; i++){
80104a5c: 83 c2 01 add $0x1,%edx
ebp = (uint*)ebp[0]; // saved %ebp
80104a5f: 8b 00 mov (%eax),%eax
for(i = 0; i < 10; i++){
80104a61: 83 fa 0a cmp $0xa,%edx
80104a64: 75 e2 jne 80104a48 <getcallerpcs+0x18>
}
for(; i < 10; i++)
pcs[i] = 0;
}
80104a66: 5b pop %ebx
80104a67: 5d pop %ebp
80104a68: c3 ret
80104a69: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
for(; i < 10; i++)
80104a70: 8d 04 91 lea (%ecx,%edx,4),%eax
80104a73: 8d 51 28 lea 0x28(%ecx),%edx
80104a76: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104a7d: 8d 76 00 lea 0x0(%esi),%esi
pcs[i] = 0;
80104a80: c7 00 00 00 00 00 movl $0x0,(%eax)
for(; i < 10; i++)
80104a86: 83 c0 04 add $0x4,%eax
80104a89: 39 d0 cmp %edx,%eax
80104a8b: 75 f3 jne 80104a80 <getcallerpcs+0x50>
}
80104a8d: 5b pop %ebx
80104a8e: 5d pop %ebp
80104a8f: c3 ret
80104a90 <pushcli>:
// it takes two popcli to undo two pushcli. Also, if interrupts
// are off, then pushcli, popcli leaves them off.
void
pushcli(void)
{
80104a90: f3 0f 1e fb endbr32
80104a94: 55 push %ebp
80104a95: 89 e5 mov %esp,%ebp
80104a97: 53 push %ebx
80104a98: 83 ec 04 sub $0x4,%esp
80104a9b: 9c pushf
80104a9c: 5b pop %ebx
asm volatile("cli");
80104a9d: fa cli
int eflags;
eflags = readeflags();
cli();
if(mycpu()->ncli == 0)
80104a9e: e8 2d ef ff ff call 801039d0 <mycpu>
80104aa3: 8b 80 a4 00 00 00 mov 0xa4(%eax),%eax
80104aa9: 85 c0 test %eax,%eax
80104aab: 74 13 je 80104ac0 <pushcli+0x30>
mycpu()->intena = eflags & FL_IF;
mycpu()->ncli += 1;
80104aad: e8 1e ef ff ff call 801039d0 <mycpu>
80104ab2: 83 80 a4 00 00 00 01 addl $0x1,0xa4(%eax)
}
80104ab9: 83 c4 04 add $0x4,%esp
80104abc: 5b pop %ebx
80104abd: 5d pop %ebp
80104abe: c3 ret
80104abf: 90 nop
mycpu()->intena = eflags & FL_IF;
80104ac0: e8 0b ef ff ff call 801039d0 <mycpu>
80104ac5: 81 e3 00 02 00 00 and $0x200,%ebx
80104acb: 89 98 a8 00 00 00 mov %ebx,0xa8(%eax)
80104ad1: eb da jmp 80104aad <pushcli+0x1d>
80104ad3: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104ada: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80104ae0 <popcli>:
void
popcli(void)
{
80104ae0: f3 0f 1e fb endbr32
80104ae4: 55 push %ebp
80104ae5: 89 e5 mov %esp,%ebp
80104ae7: 83 ec 08 sub $0x8,%esp
asm volatile("pushfl; popl %0" : "=r" (eflags));
80104aea: 9c pushf
80104aeb: 58 pop %eax
if(readeflags()&FL_IF)
80104aec: f6 c4 02 test $0x2,%ah
80104aef: 75 31 jne 80104b22 <popcli+0x42>
panic("popcli - interruptible");
if(--mycpu()->ncli < 0)
80104af1: e8 da ee ff ff call 801039d0 <mycpu>
80104af6: 83 a8 a4 00 00 00 01 subl $0x1,0xa4(%eax)
80104afd: 78 30 js 80104b2f <popcli+0x4f>
panic("popcli");
if(mycpu()->ncli == 0 && mycpu()->intena)
80104aff: e8 cc ee ff ff call 801039d0 <mycpu>
80104b04: 8b 90 a4 00 00 00 mov 0xa4(%eax),%edx
80104b0a: 85 d2 test %edx,%edx
80104b0c: 74 02 je 80104b10 <popcli+0x30>
sti();
}
80104b0e: c9 leave
80104b0f: c3 ret
if(mycpu()->ncli == 0 && mycpu()->intena)
80104b10: e8 bb ee ff ff call 801039d0 <mycpu>
80104b15: 8b 80 a8 00 00 00 mov 0xa8(%eax),%eax
80104b1b: 85 c0 test %eax,%eax
80104b1d: 74 ef je 80104b0e <popcli+0x2e>
asm volatile("sti");
80104b1f: fb sti
}
80104b20: c9 leave
80104b21: c3 ret
panic("popcli - interruptible");
80104b22: 83 ec 0c sub $0xc,%esp
80104b25: 68 6b 7f 10 80 push $0x80107f6b
80104b2a: e8 61 b8 ff ff call 80100390 <panic>
panic("popcli");
80104b2f: 83 ec 0c sub $0xc,%esp
80104b32: 68 82 7f 10 80 push $0x80107f82
80104b37: e8 54 b8 ff ff call 80100390 <panic>
80104b3c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104b40 <holding>:
{
80104b40: f3 0f 1e fb endbr32
80104b44: 55 push %ebp
80104b45: 89 e5 mov %esp,%ebp
80104b47: 56 push %esi
80104b48: 53 push %ebx
80104b49: 8b 75 08 mov 0x8(%ebp),%esi
80104b4c: 31 db xor %ebx,%ebx
pushcli();
80104b4e: e8 3d ff ff ff call 80104a90 <pushcli>
r = lock->locked && lock->cpu == mycpu();
80104b53: 8b 06 mov (%esi),%eax
80104b55: 85 c0 test %eax,%eax
80104b57: 75 0f jne 80104b68 <holding+0x28>
popcli();
80104b59: e8 82 ff ff ff call 80104ae0 <popcli>
}
80104b5e: 89 d8 mov %ebx,%eax
80104b60: 5b pop %ebx
80104b61: 5e pop %esi
80104b62: 5d pop %ebp
80104b63: c3 ret
80104b64: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
r = lock->locked && lock->cpu == mycpu();
80104b68: 8b 5e 08 mov 0x8(%esi),%ebx
80104b6b: e8 60 ee ff ff call 801039d0 <mycpu>
80104b70: 39 c3 cmp %eax,%ebx
80104b72: 0f 94 c3 sete %bl
popcli();
80104b75: e8 66 ff ff ff call 80104ae0 <popcli>
r = lock->locked && lock->cpu == mycpu();
80104b7a: 0f b6 db movzbl %bl,%ebx
}
80104b7d: 89 d8 mov %ebx,%eax
80104b7f: 5b pop %ebx
80104b80: 5e pop %esi
80104b81: 5d pop %ebp
80104b82: c3 ret
80104b83: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104b8a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80104b90 <acquire>:
{
80104b90: f3 0f 1e fb endbr32
80104b94: 55 push %ebp
80104b95: 89 e5 mov %esp,%ebp
80104b97: 56 push %esi
80104b98: 53 push %ebx
pushcli(); // disable interrupts to avoid deadlock.
80104b99: e8 f2 fe ff ff call 80104a90 <pushcli>
if(holding(lk))
80104b9e: 8b 5d 08 mov 0x8(%ebp),%ebx
80104ba1: 83 ec 0c sub $0xc,%esp
80104ba4: 53 push %ebx
80104ba5: e8 96 ff ff ff call 80104b40 <holding>
80104baa: 83 c4 10 add $0x10,%esp
80104bad: 85 c0 test %eax,%eax
80104baf: 0f 85 7f 00 00 00 jne 80104c34 <acquire+0xa4>
80104bb5: 89 c6 mov %eax,%esi
asm volatile("lock; xchgl %0, %1" :
80104bb7: ba 01 00 00 00 mov $0x1,%edx
80104bbc: eb 05 jmp 80104bc3 <acquire+0x33>
80104bbe: 66 90 xchg %ax,%ax
80104bc0: 8b 5d 08 mov 0x8(%ebp),%ebx
80104bc3: 89 d0 mov %edx,%eax
80104bc5: f0 87 03 lock xchg %eax,(%ebx)
while(xchg(&lk->locked, 1) != 0)
80104bc8: 85 c0 test %eax,%eax
80104bca: 75 f4 jne 80104bc0 <acquire+0x30>
__sync_synchronize();
80104bcc: f0 83 0c 24 00 lock orl $0x0,(%esp)
lk->cpu = mycpu();
80104bd1: 8b 5d 08 mov 0x8(%ebp),%ebx
80104bd4: e8 f7 ed ff ff call 801039d0 <mycpu>
80104bd9: 89 43 08 mov %eax,0x8(%ebx)
ebp = (uint*)v - 2;
80104bdc: 89 e8 mov %ebp,%eax
80104bde: 66 90 xchg %ax,%ax
if(ebp == 0 || ebp < (uint*)KERNBASE || ebp == (uint*)0xffffffff)
80104be0: 8d 90 00 00 00 80 lea -0x80000000(%eax),%edx
80104be6: 81 fa fe ff ff 7f cmp $0x7ffffffe,%edx
80104bec: 77 22 ja 80104c10 <acquire+0x80>
pcs[i] = ebp[1]; // saved %eip
80104bee: 8b 50 04 mov 0x4(%eax),%edx
80104bf1: 89 54 b3 0c mov %edx,0xc(%ebx,%esi,4)
for(i = 0; i < 10; i++){
80104bf5: 83 c6 01 add $0x1,%esi
ebp = (uint*)ebp[0]; // saved %ebp
80104bf8: 8b 00 mov (%eax),%eax
for(i = 0; i < 10; i++){
80104bfa: 83 fe 0a cmp $0xa,%esi
80104bfd: 75 e1 jne 80104be0 <acquire+0x50>
}
80104bff: 8d 65 f8 lea -0x8(%ebp),%esp
80104c02: 5b pop %ebx
80104c03: 5e pop %esi
80104c04: 5d pop %ebp
80104c05: c3 ret
80104c06: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104c0d: 8d 76 00 lea 0x0(%esi),%esi
for(; i < 10; i++)
80104c10: 8d 44 b3 0c lea 0xc(%ebx,%esi,4),%eax
80104c14: 83 c3 34 add $0x34,%ebx
80104c17: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104c1e: 66 90 xchg %ax,%ax
pcs[i] = 0;
80104c20: c7 00 00 00 00 00 movl $0x0,(%eax)
for(; i < 10; i++)
80104c26: 83 c0 04 add $0x4,%eax
80104c29: 39 d8 cmp %ebx,%eax
80104c2b: 75 f3 jne 80104c20 <acquire+0x90>
}
80104c2d: 8d 65 f8 lea -0x8(%ebp),%esp
80104c30: 5b pop %ebx
80104c31: 5e pop %esi
80104c32: 5d pop %ebp
80104c33: c3 ret
panic("acquire");
80104c34: 83 ec 0c sub $0xc,%esp
80104c37: 68 89 7f 10 80 push $0x80107f89
80104c3c: e8 4f b7 ff ff call 80100390 <panic>
80104c41: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104c48: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104c4f: 90 nop
80104c50 <release>:
{
80104c50: f3 0f 1e fb endbr32
80104c54: 55 push %ebp
80104c55: 89 e5 mov %esp,%ebp
80104c57: 53 push %ebx
80104c58: 83 ec 10 sub $0x10,%esp
80104c5b: 8b 5d 08 mov 0x8(%ebp),%ebx
if(!holding(lk))
80104c5e: 53 push %ebx
80104c5f: e8 dc fe ff ff call 80104b40 <holding>
80104c64: 83 c4 10 add $0x10,%esp
80104c67: 85 c0 test %eax,%eax
80104c69: 74 22 je 80104c8d <release+0x3d>
lk->pcs[0] = 0;
80104c6b: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
lk->cpu = 0;
80104c72: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
__sync_synchronize();
80104c79: f0 83 0c 24 00 lock orl $0x0,(%esp)
asm volatile("movl $0, %0" : "+m" (lk->locked) : );
80104c7e: c7 03 00 00 00 00 movl $0x0,(%ebx)
}
80104c84: 8b 5d fc mov -0x4(%ebp),%ebx
80104c87: c9 leave
popcli();
80104c88: e9 53 fe ff ff jmp 80104ae0 <popcli>
panic("release");
80104c8d: 83 ec 0c sub $0xc,%esp
80104c90: 68 91 7f 10 80 push $0x80107f91
80104c95: e8 f6 b6 ff ff call 80100390 <panic>
80104c9a: 66 90 xchg %ax,%ax
80104c9c: 66 90 xchg %ax,%ax
80104c9e: 66 90 xchg %ax,%ax
80104ca0 <memset>:
#include "types.h"
#include "x86.h"
void*
memset(void *dst, int c, uint n)
{
80104ca0: f3 0f 1e fb endbr32
80104ca4: 55 push %ebp
80104ca5: 89 e5 mov %esp,%ebp
80104ca7: 57 push %edi
80104ca8: 8b 55 08 mov 0x8(%ebp),%edx
80104cab: 8b 4d 10 mov 0x10(%ebp),%ecx
80104cae: 53 push %ebx
80104caf: 8b 45 0c mov 0xc(%ebp),%eax
if ((int)dst%4 == 0 && n%4 == 0){
80104cb2: 89 d7 mov %edx,%edi
80104cb4: 09 cf or %ecx,%edi
80104cb6: 83 e7 03 and $0x3,%edi
80104cb9: 75 25 jne 80104ce0 <memset+0x40>
c &= 0xFF;
80104cbb: 0f b6 f8 movzbl %al,%edi
stosl(dst, (c<<24)|(c<<16)|(c<<8)|c, n/4);
80104cbe: c1 e0 18 shl $0x18,%eax
80104cc1: 89 fb mov %edi,%ebx
80104cc3: c1 e9 02 shr $0x2,%ecx
80104cc6: c1 e3 10 shl $0x10,%ebx
80104cc9: 09 d8 or %ebx,%eax
80104ccb: 09 f8 or %edi,%eax
80104ccd: c1 e7 08 shl $0x8,%edi
80104cd0: 09 f8 or %edi,%eax
asm volatile("cld; rep stosl" :
80104cd2: 89 d7 mov %edx,%edi
80104cd4: fc cld
80104cd5: f3 ab rep stos %eax,%es:(%edi)
} else
stosb(dst, c, n);
return dst;
}
80104cd7: 5b pop %ebx
80104cd8: 89 d0 mov %edx,%eax
80104cda: 5f pop %edi
80104cdb: 5d pop %ebp
80104cdc: c3 ret
80104cdd: 8d 76 00 lea 0x0(%esi),%esi
asm volatile("cld; rep stosb" :
80104ce0: 89 d7 mov %edx,%edi
80104ce2: fc cld
80104ce3: f3 aa rep stos %al,%es:(%edi)
80104ce5: 5b pop %ebx
80104ce6: 89 d0 mov %edx,%eax
80104ce8: 5f pop %edi
80104ce9: 5d pop %ebp
80104cea: c3 ret
80104ceb: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104cef: 90 nop
80104cf0 <memcmp>:
int
memcmp(const void *v1, const void *v2, uint n)
{
80104cf0: f3 0f 1e fb endbr32
80104cf4: 55 push %ebp
80104cf5: 89 e5 mov %esp,%ebp
80104cf7: 56 push %esi
80104cf8: 8b 75 10 mov 0x10(%ebp),%esi
80104cfb: 8b 55 08 mov 0x8(%ebp),%edx
80104cfe: 53 push %ebx
80104cff: 8b 45 0c mov 0xc(%ebp),%eax
const uchar *s1, *s2;
s1 = v1;
s2 = v2;
while(n-- > 0){
80104d02: 85 f6 test %esi,%esi
80104d04: 74 2a je 80104d30 <memcmp+0x40>
80104d06: 01 c6 add %eax,%esi
80104d08: eb 10 jmp 80104d1a <memcmp+0x2a>
80104d0a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
if(*s1 != *s2)
return *s1 - *s2;
s1++, s2++;
80104d10: 83 c0 01 add $0x1,%eax
80104d13: 83 c2 01 add $0x1,%edx
while(n-- > 0){
80104d16: 39 f0 cmp %esi,%eax
80104d18: 74 16 je 80104d30 <memcmp+0x40>
if(*s1 != *s2)
80104d1a: 0f b6 0a movzbl (%edx),%ecx
80104d1d: 0f b6 18 movzbl (%eax),%ebx
80104d20: 38 d9 cmp %bl,%cl
80104d22: 74 ec je 80104d10 <memcmp+0x20>
return *s1 - *s2;
80104d24: 0f b6 c1 movzbl %cl,%eax
80104d27: 29 d8 sub %ebx,%eax
}
return 0;
}
80104d29: 5b pop %ebx
80104d2a: 5e pop %esi
80104d2b: 5d pop %ebp
80104d2c: c3 ret
80104d2d: 8d 76 00 lea 0x0(%esi),%esi
80104d30: 5b pop %ebx
return 0;
80104d31: 31 c0 xor %eax,%eax
}
80104d33: 5e pop %esi
80104d34: 5d pop %ebp
80104d35: c3 ret
80104d36: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104d3d: 8d 76 00 lea 0x0(%esi),%esi
80104d40 <memmove>:
void*
memmove(void *dst, const void *src, uint n)
{
80104d40: f3 0f 1e fb endbr32
80104d44: 55 push %ebp
80104d45: 89 e5 mov %esp,%ebp
80104d47: 57 push %edi
80104d48: 8b 55 08 mov 0x8(%ebp),%edx
80104d4b: 8b 4d 10 mov 0x10(%ebp),%ecx
80104d4e: 56 push %esi
80104d4f: 8b 75 0c mov 0xc(%ebp),%esi
const char *s;
char *d;
s = src;
d = dst;
if(s < d && s + n > d){
80104d52: 39 d6 cmp %edx,%esi
80104d54: 73 2a jae 80104d80 <memmove+0x40>
80104d56: 8d 3c 0e lea (%esi,%ecx,1),%edi
80104d59: 39 fa cmp %edi,%edx
80104d5b: 73 23 jae 80104d80 <memmove+0x40>
80104d5d: 8d 41 ff lea -0x1(%ecx),%eax
s += n;
d += n;
while(n-- > 0)
80104d60: 85 c9 test %ecx,%ecx
80104d62: 74 13 je 80104d77 <memmove+0x37>
80104d64: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
*--d = *--s;
80104d68: 0f b6 0c 06 movzbl (%esi,%eax,1),%ecx
80104d6c: 88 0c 02 mov %cl,(%edx,%eax,1)
while(n-- > 0)
80104d6f: 83 e8 01 sub $0x1,%eax
80104d72: 83 f8 ff cmp $0xffffffff,%eax
80104d75: 75 f1 jne 80104d68 <memmove+0x28>
} else
while(n-- > 0)
*d++ = *s++;
return dst;
}
80104d77: 5e pop %esi
80104d78: 89 d0 mov %edx,%eax
80104d7a: 5f pop %edi
80104d7b: 5d pop %ebp
80104d7c: c3 ret
80104d7d: 8d 76 00 lea 0x0(%esi),%esi
while(n-- > 0)
80104d80: 8d 04 0e lea (%esi,%ecx,1),%eax
80104d83: 89 d7 mov %edx,%edi
80104d85: 85 c9 test %ecx,%ecx
80104d87: 74 ee je 80104d77 <memmove+0x37>
80104d89: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
*d++ = *s++;
80104d90: a4 movsb %ds:(%esi),%es:(%edi)
while(n-- > 0)
80104d91: 39 f0 cmp %esi,%eax
80104d93: 75 fb jne 80104d90 <memmove+0x50>
}
80104d95: 5e pop %esi
80104d96: 89 d0 mov %edx,%eax
80104d98: 5f pop %edi
80104d99: 5d pop %ebp
80104d9a: c3 ret
80104d9b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104d9f: 90 nop
80104da0 <memcpy>:
// memcpy exists to placate GCC. Use memmove.
void*
memcpy(void *dst, const void *src, uint n)
{
80104da0: f3 0f 1e fb endbr32
return memmove(dst, src, n);
80104da4: eb 9a jmp 80104d40 <memmove>
80104da6: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104dad: 8d 76 00 lea 0x0(%esi),%esi
80104db0 <strncmp>:
}
int
strncmp(const char *p, const char *q, uint n)
{
80104db0: f3 0f 1e fb endbr32
80104db4: 55 push %ebp
80104db5: 89 e5 mov %esp,%ebp
80104db7: 56 push %esi
80104db8: 8b 75 10 mov 0x10(%ebp),%esi
80104dbb: 8b 4d 08 mov 0x8(%ebp),%ecx
80104dbe: 53 push %ebx
80104dbf: 8b 45 0c mov 0xc(%ebp),%eax
while(n > 0 && *p && *p == *q)
80104dc2: 85 f6 test %esi,%esi
80104dc4: 74 32 je 80104df8 <strncmp+0x48>
80104dc6: 01 c6 add %eax,%esi
80104dc8: eb 14 jmp 80104dde <strncmp+0x2e>
80104dca: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80104dd0: 38 da cmp %bl,%dl
80104dd2: 75 14 jne 80104de8 <strncmp+0x38>
n--, p++, q++;
80104dd4: 83 c0 01 add $0x1,%eax
80104dd7: 83 c1 01 add $0x1,%ecx
while(n > 0 && *p && *p == *q)
80104dda: 39 f0 cmp %esi,%eax
80104ddc: 74 1a je 80104df8 <strncmp+0x48>
80104dde: 0f b6 11 movzbl (%ecx),%edx
80104de1: 0f b6 18 movzbl (%eax),%ebx
80104de4: 84 d2 test %dl,%dl
80104de6: 75 e8 jne 80104dd0 <strncmp+0x20>
if(n == 0)
return 0;
return (uchar)*p - (uchar)*q;
80104de8: 0f b6 c2 movzbl %dl,%eax
80104deb: 29 d8 sub %ebx,%eax
}
80104ded: 5b pop %ebx
80104dee: 5e pop %esi
80104def: 5d pop %ebp
80104df0: c3 ret
80104df1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104df8: 5b pop %ebx
return 0;
80104df9: 31 c0 xor %eax,%eax
}
80104dfb: 5e pop %esi
80104dfc: 5d pop %ebp
80104dfd: c3 ret
80104dfe: 66 90 xchg %ax,%ax
80104e00 <strncpy>:
char*
strncpy(char *s, const char *t, int n)
{
80104e00: f3 0f 1e fb endbr32
80104e04: 55 push %ebp
80104e05: 89 e5 mov %esp,%ebp
80104e07: 57 push %edi
80104e08: 56 push %esi
80104e09: 8b 75 08 mov 0x8(%ebp),%esi
80104e0c: 53 push %ebx
80104e0d: 8b 45 10 mov 0x10(%ebp),%eax
char *os;
os = s;
while(n-- > 0 && (*s++ = *t++) != 0)
80104e10: 89 f2 mov %esi,%edx
80104e12: eb 1b jmp 80104e2f <strncpy+0x2f>
80104e14: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104e18: 83 45 0c 01 addl $0x1,0xc(%ebp)
80104e1c: 8b 7d 0c mov 0xc(%ebp),%edi
80104e1f: 83 c2 01 add $0x1,%edx
80104e22: 0f b6 7f ff movzbl -0x1(%edi),%edi
80104e26: 89 f9 mov %edi,%ecx
80104e28: 88 4a ff mov %cl,-0x1(%edx)
80104e2b: 84 c9 test %cl,%cl
80104e2d: 74 09 je 80104e38 <strncpy+0x38>
80104e2f: 89 c3 mov %eax,%ebx
80104e31: 83 e8 01 sub $0x1,%eax
80104e34: 85 db test %ebx,%ebx
80104e36: 7f e0 jg 80104e18 <strncpy+0x18>
;
while(n-- > 0)
80104e38: 89 d1 mov %edx,%ecx
80104e3a: 85 c0 test %eax,%eax
80104e3c: 7e 15 jle 80104e53 <strncpy+0x53>
80104e3e: 66 90 xchg %ax,%ax
*s++ = 0;
80104e40: 83 c1 01 add $0x1,%ecx
80104e43: c6 41 ff 00 movb $0x0,-0x1(%ecx)
while(n-- > 0)
80104e47: 89 c8 mov %ecx,%eax
80104e49: f7 d0 not %eax
80104e4b: 01 d0 add %edx,%eax
80104e4d: 01 d8 add %ebx,%eax
80104e4f: 85 c0 test %eax,%eax
80104e51: 7f ed jg 80104e40 <strncpy+0x40>
return os;
}
80104e53: 5b pop %ebx
80104e54: 89 f0 mov %esi,%eax
80104e56: 5e pop %esi
80104e57: 5f pop %edi
80104e58: 5d pop %ebp
80104e59: c3 ret
80104e5a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80104e60 <safestrcpy>:
// Like strncpy but guaranteed to NUL-terminate.
char*
safestrcpy(char *s, const char *t, int n)
{
80104e60: f3 0f 1e fb endbr32
80104e64: 55 push %ebp
80104e65: 89 e5 mov %esp,%ebp
80104e67: 56 push %esi
80104e68: 8b 55 10 mov 0x10(%ebp),%edx
80104e6b: 8b 75 08 mov 0x8(%ebp),%esi
80104e6e: 53 push %ebx
80104e6f: 8b 45 0c mov 0xc(%ebp),%eax
char *os;
os = s;
if(n <= 0)
80104e72: 85 d2 test %edx,%edx
80104e74: 7e 21 jle 80104e97 <safestrcpy+0x37>
80104e76: 8d 5c 10 ff lea -0x1(%eax,%edx,1),%ebx
80104e7a: 89 f2 mov %esi,%edx
80104e7c: eb 12 jmp 80104e90 <safestrcpy+0x30>
80104e7e: 66 90 xchg %ax,%ax
return os;
while(--n > 0 && (*s++ = *t++) != 0)
80104e80: 0f b6 08 movzbl (%eax),%ecx
80104e83: 83 c0 01 add $0x1,%eax
80104e86: 83 c2 01 add $0x1,%edx
80104e89: 88 4a ff mov %cl,-0x1(%edx)
80104e8c: 84 c9 test %cl,%cl
80104e8e: 74 04 je 80104e94 <safestrcpy+0x34>
80104e90: 39 d8 cmp %ebx,%eax
80104e92: 75 ec jne 80104e80 <safestrcpy+0x20>
;
*s = 0;
80104e94: c6 02 00 movb $0x0,(%edx)
return os;
}
80104e97: 89 f0 mov %esi,%eax
80104e99: 5b pop %ebx
80104e9a: 5e pop %esi
80104e9b: 5d pop %ebp
80104e9c: c3 ret
80104e9d: 8d 76 00 lea 0x0(%esi),%esi
80104ea0 <strlen>:
int
strlen(const char *s)
{
80104ea0: f3 0f 1e fb endbr32
80104ea4: 55 push %ebp
int n;
for(n = 0; s[n]; n++)
80104ea5: 31 c0 xor %eax,%eax
{
80104ea7: 89 e5 mov %esp,%ebp
80104ea9: 8b 55 08 mov 0x8(%ebp),%edx
for(n = 0; s[n]; n++)
80104eac: 80 3a 00 cmpb $0x0,(%edx)
80104eaf: 74 10 je 80104ec1 <strlen+0x21>
80104eb1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104eb8: 83 c0 01 add $0x1,%eax
80104ebb: 80 3c 02 00 cmpb $0x0,(%edx,%eax,1)
80104ebf: 75 f7 jne 80104eb8 <strlen+0x18>
;
return n;
}
80104ec1: 5d pop %ebp
80104ec2: c3 ret
80104ec3 <swtch>:
# a struct context, and save its address in *old.
# Switch stacks to new and pop previously-saved registers.
.globl swtch
swtch:
movl 4(%esp), %eax
80104ec3: 8b 44 24 04 mov 0x4(%esp),%eax
movl 8(%esp), %edx
80104ec7: 8b 54 24 08 mov 0x8(%esp),%edx
# Save old callee-saved registers
pushl %ebp
80104ecb: 55 push %ebp
pushl %ebx
80104ecc: 53 push %ebx
pushl %esi
80104ecd: 56 push %esi
pushl %edi
80104ece: 57 push %edi
# Switch stacks
movl %esp, (%eax)
80104ecf: 89 20 mov %esp,(%eax)
movl %edx, %esp
80104ed1: 89 d4 mov %edx,%esp
# Load new callee-saved registers
popl %edi
80104ed3: 5f pop %edi
popl %esi
80104ed4: 5e pop %esi
popl %ebx
80104ed5: 5b pop %ebx
popl %ebp
80104ed6: 5d pop %ebp
ret
80104ed7: c3 ret
80104ed8: 66 90 xchg %ax,%ax
80104eda: 66 90 xchg %ax,%ax
80104edc: 66 90 xchg %ax,%ax
80104ede: 66 90 xchg %ax,%ax
80104ee0 <fetchint>:
// to a saved program counter, and then the first argument.
// Fetch the int at addr from the current process.
int
fetchint(uint addr, int *ip)
{
80104ee0: f3 0f 1e fb endbr32
80104ee4: 55 push %ebp
80104ee5: 89 e5 mov %esp,%ebp
80104ee7: 53 push %ebx
80104ee8: 83 ec 04 sub $0x4,%esp
80104eeb: 8b 5d 08 mov 0x8(%ebp),%ebx
struct proc *curproc = myproc();
80104eee: e8 6d eb ff ff call 80103a60 <myproc>
if(addr >= curproc->sz || addr+4 > curproc->sz)
80104ef3: 8b 00 mov (%eax),%eax
80104ef5: 39 d8 cmp %ebx,%eax
80104ef7: 76 17 jbe 80104f10 <fetchint+0x30>
80104ef9: 8d 53 04 lea 0x4(%ebx),%edx
80104efc: 39 d0 cmp %edx,%eax
80104efe: 72 10 jb 80104f10 <fetchint+0x30>
return -1;
*ip = *(int*)(addr);
80104f00: 8b 45 0c mov 0xc(%ebp),%eax
80104f03: 8b 13 mov (%ebx),%edx
80104f05: 89 10 mov %edx,(%eax)
return 0;
80104f07: 31 c0 xor %eax,%eax
}
80104f09: 83 c4 04 add $0x4,%esp
80104f0c: 5b pop %ebx
80104f0d: 5d pop %ebp
80104f0e: c3 ret
80104f0f: 90 nop
return -1;
80104f10: b8 ff ff ff ff mov $0xffffffff,%eax
80104f15: eb f2 jmp 80104f09 <fetchint+0x29>
80104f17: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104f1e: 66 90 xchg %ax,%ax
80104f20 <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)
{
80104f20: f3 0f 1e fb endbr32
80104f24: 55 push %ebp
80104f25: 89 e5 mov %esp,%ebp
80104f27: 53 push %ebx
80104f28: 83 ec 04 sub $0x4,%esp
80104f2b: 8b 5d 08 mov 0x8(%ebp),%ebx
char *s, *ep;
struct proc *curproc = myproc();
80104f2e: e8 2d eb ff ff call 80103a60 <myproc>
if(addr >= curproc->sz)
80104f33: 39 18 cmp %ebx,(%eax)
80104f35: 76 31 jbe 80104f68 <fetchstr+0x48>
return -1;
*pp = (char*)addr;
80104f37: 8b 55 0c mov 0xc(%ebp),%edx
80104f3a: 89 1a mov %ebx,(%edx)
ep = (char*)curproc->sz;
80104f3c: 8b 10 mov (%eax),%edx
for(s = *pp; s < ep; s++){
80104f3e: 39 d3 cmp %edx,%ebx
80104f40: 73 26 jae 80104f68 <fetchstr+0x48>
80104f42: 89 d8 mov %ebx,%eax
80104f44: eb 11 jmp 80104f57 <fetchstr+0x37>
80104f46: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104f4d: 8d 76 00 lea 0x0(%esi),%esi
80104f50: 83 c0 01 add $0x1,%eax
80104f53: 39 c2 cmp %eax,%edx
80104f55: 76 11 jbe 80104f68 <fetchstr+0x48>
if(*s == 0)
80104f57: 80 38 00 cmpb $0x0,(%eax)
80104f5a: 75 f4 jne 80104f50 <fetchstr+0x30>
return s - *pp;
}
return -1;
}
80104f5c: 83 c4 04 add $0x4,%esp
return s - *pp;
80104f5f: 29 d8 sub %ebx,%eax
}
80104f61: 5b pop %ebx
80104f62: 5d pop %ebp
80104f63: c3 ret
80104f64: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104f68: 83 c4 04 add $0x4,%esp
return -1;
80104f6b: b8 ff ff ff ff mov $0xffffffff,%eax
}
80104f70: 5b pop %ebx
80104f71: 5d pop %ebp
80104f72: c3 ret
80104f73: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104f7a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80104f80 <argint>:
// Fetch the nth 32-bit system call argument.
int
argint(int n, int *ip)
{
80104f80: f3 0f 1e fb endbr32
80104f84: 55 push %ebp
80104f85: 89 e5 mov %esp,%ebp
80104f87: 56 push %esi
80104f88: 53 push %ebx
return fetchint((myproc()->tf->esp) + 4 + 4*n, ip);
80104f89: e8 d2 ea ff ff call 80103a60 <myproc>
80104f8e: 8b 55 08 mov 0x8(%ebp),%edx
80104f91: 8b 40 18 mov 0x18(%eax),%eax
80104f94: 8b 40 44 mov 0x44(%eax),%eax
80104f97: 8d 1c 90 lea (%eax,%edx,4),%ebx
struct proc *curproc = myproc();
80104f9a: e8 c1 ea ff ff call 80103a60 <myproc>
return fetchint((myproc()->tf->esp) + 4 + 4*n, ip);
80104f9f: 8d 73 04 lea 0x4(%ebx),%esi
if(addr >= curproc->sz || addr+4 > curproc->sz)
80104fa2: 8b 00 mov (%eax),%eax
80104fa4: 39 c6 cmp %eax,%esi
80104fa6: 73 18 jae 80104fc0 <argint+0x40>
80104fa8: 8d 53 08 lea 0x8(%ebx),%edx
80104fab: 39 d0 cmp %edx,%eax
80104fad: 72 11 jb 80104fc0 <argint+0x40>
*ip = *(int*)(addr);
80104faf: 8b 45 0c mov 0xc(%ebp),%eax
80104fb2: 8b 53 04 mov 0x4(%ebx),%edx
80104fb5: 89 10 mov %edx,(%eax)
return 0;
80104fb7: 31 c0 xor %eax,%eax
}
80104fb9: 5b pop %ebx
80104fba: 5e pop %esi
80104fbb: 5d pop %ebp
80104fbc: c3 ret
80104fbd: 8d 76 00 lea 0x0(%esi),%esi
return -1;
80104fc0: b8 ff ff ff ff mov $0xffffffff,%eax
return fetchint((myproc()->tf->esp) + 4 + 4*n, ip);
80104fc5: eb f2 jmp 80104fb9 <argint+0x39>
80104fc7: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104fce: 66 90 xchg %ax,%ax
80104fd0 <argptr>:
// Fetch the nth word-sized system call argument as a pointer
// to a block of memory of size bytes. Check that the pointer
// lies within the process address space.
int
argptr(int n, char **pp, int size)
{
80104fd0: f3 0f 1e fb endbr32
80104fd4: 55 push %ebp
80104fd5: 89 e5 mov %esp,%ebp
80104fd7: 56 push %esi
80104fd8: 53 push %ebx
80104fd9: 83 ec 10 sub $0x10,%esp
80104fdc: 8b 5d 10 mov 0x10(%ebp),%ebx
int i;
struct proc *curproc = myproc();
80104fdf: e8 7c ea ff ff call 80103a60 <myproc>
if(argint(n, &i) < 0)
80104fe4: 83 ec 08 sub $0x8,%esp
struct proc *curproc = myproc();
80104fe7: 89 c6 mov %eax,%esi
if(argint(n, &i) < 0)
80104fe9: 8d 45 f4 lea -0xc(%ebp),%eax
80104fec: 50 push %eax
80104fed: ff 75 08 pushl 0x8(%ebp)
80104ff0: e8 8b ff ff ff call 80104f80 <argint>
return -1;
if(size < 0 || (uint)i >= curproc->sz || (uint)i+size > curproc->sz)
80104ff5: 83 c4 10 add $0x10,%esp
80104ff8: 85 c0 test %eax,%eax
80104ffa: 78 24 js 80105020 <argptr+0x50>
80104ffc: 85 db test %ebx,%ebx
80104ffe: 78 20 js 80105020 <argptr+0x50>
80105000: 8b 16 mov (%esi),%edx
80105002: 8b 45 f4 mov -0xc(%ebp),%eax
80105005: 39 c2 cmp %eax,%edx
80105007: 76 17 jbe 80105020 <argptr+0x50>
80105009: 01 c3 add %eax,%ebx
8010500b: 39 da cmp %ebx,%edx
8010500d: 72 11 jb 80105020 <argptr+0x50>
return -1;
*pp = (char*)i;
8010500f: 8b 55 0c mov 0xc(%ebp),%edx
80105012: 89 02 mov %eax,(%edx)
return 0;
80105014: 31 c0 xor %eax,%eax
}
80105016: 8d 65 f8 lea -0x8(%ebp),%esp
80105019: 5b pop %ebx
8010501a: 5e pop %esi
8010501b: 5d pop %ebp
8010501c: c3 ret
8010501d: 8d 76 00 lea 0x0(%esi),%esi
return -1;
80105020: b8 ff ff ff ff mov $0xffffffff,%eax
80105025: eb ef jmp 80105016 <argptr+0x46>
80105027: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010502e: 66 90 xchg %ax,%ax
80105030 <argstr>:
// Check that the pointer is valid and the string is nul-terminated.
// (There is no shared writable memory, so the string can't change
// between this check and being used by the kernel.)
int
argstr(int n, char **pp)
{
80105030: f3 0f 1e fb endbr32
80105034: 55 push %ebp
80105035: 89 e5 mov %esp,%ebp
80105037: 83 ec 20 sub $0x20,%esp
int addr;
if(argint(n, &addr) < 0)
8010503a: 8d 45 f4 lea -0xc(%ebp),%eax
8010503d: 50 push %eax
8010503e: ff 75 08 pushl 0x8(%ebp)
80105041: e8 3a ff ff ff call 80104f80 <argint>
80105046: 83 c4 10 add $0x10,%esp
80105049: 85 c0 test %eax,%eax
8010504b: 78 13 js 80105060 <argstr+0x30>
return -1;
return fetchstr(addr, pp);
8010504d: 83 ec 08 sub $0x8,%esp
80105050: ff 75 0c pushl 0xc(%ebp)
80105053: ff 75 f4 pushl -0xc(%ebp)
80105056: e8 c5 fe ff ff call 80104f20 <fetchstr>
8010505b: 83 c4 10 add $0x10,%esp
}
8010505e: c9 leave
8010505f: c3 ret
80105060: c9 leave
return -1;
80105061: b8 ff ff ff ff mov $0xffffffff,%eax
}
80105066: c3 ret
80105067: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010506e: 66 90 xchg %ax,%ax
80105070 <syscall>:
[SYS_ps] sys_ps,
};
void
syscall(void)
{
80105070: f3 0f 1e fb endbr32
80105074: 55 push %ebp
80105075: 89 e5 mov %esp,%ebp
80105077: 53 push %ebx
80105078: 83 ec 04 sub $0x4,%esp
int num;
struct proc *curproc = myproc();
8010507b: e8 e0 e9 ff ff call 80103a60 <myproc>
80105080: 89 c3 mov %eax,%ebx
num = curproc->tf->eax;
80105082: 8b 40 18 mov 0x18(%eax),%eax
80105085: 8b 40 1c mov 0x1c(%eax),%eax
if(num > 0 && num < NELEM(syscalls) && syscalls[num]) {
80105088: 8d 50 ff lea -0x1(%eax),%edx
8010508b: 83 fa 17 cmp $0x17,%edx
8010508e: 77 20 ja 801050b0 <syscall+0x40>
80105090: 8b 14 85 c0 7f 10 80 mov -0x7fef8040(,%eax,4),%edx
80105097: 85 d2 test %edx,%edx
80105099: 74 15 je 801050b0 <syscall+0x40>
curproc->tf->eax = syscalls[num]();
8010509b: ff d2 call *%edx
8010509d: 89 c2 mov %eax,%edx
8010509f: 8b 43 18 mov 0x18(%ebx),%eax
801050a2: 89 50 1c mov %edx,0x1c(%eax)
} else {
cprintf("%d %s: unknown sys call %d\n",
curproc->pid, curproc->name, num);
curproc->tf->eax = -1;
}
}
801050a5: 8b 5d fc mov -0x4(%ebp),%ebx
801050a8: c9 leave
801050a9: c3 ret
801050aa: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
cprintf("%d %s: unknown sys call %d\n",
801050b0: 50 push %eax
curproc->pid, curproc->name, num);
801050b1: 8d 43 6c lea 0x6c(%ebx),%eax
cprintf("%d %s: unknown sys call %d\n",
801050b4: 50 push %eax
801050b5: ff 73 10 pushl 0x10(%ebx)
801050b8: 68 99 7f 10 80 push $0x80107f99
801050bd: e8 ee b5 ff ff call 801006b0 <cprintf>
curproc->tf->eax = -1;
801050c2: 8b 43 18 mov 0x18(%ebx),%eax
801050c5: 83 c4 10 add $0x10,%esp
801050c8: c7 40 1c ff ff ff ff movl $0xffffffff,0x1c(%eax)
}
801050cf: 8b 5d fc mov -0x4(%ebp),%ebx
801050d2: c9 leave
801050d3: c3 ret
801050d4: 66 90 xchg %ax,%ax
801050d6: 66 90 xchg %ax,%ax
801050d8: 66 90 xchg %ax,%ax
801050da: 66 90 xchg %ax,%ax
801050dc: 66 90 xchg %ax,%ax
801050de: 66 90 xchg %ax,%ax
801050e0 <create>:
return -1;
}
static struct inode*
create(char *path, short type, short major, short minor)
{
801050e0: 55 push %ebp
801050e1: 89 e5 mov %esp,%ebp
801050e3: 57 push %edi
801050e4: 56 push %esi
struct inode *ip, *dp;
char name[DIRSIZ];
if((dp = nameiparent(path, name)) == 0)
801050e5: 8d 7d da lea -0x26(%ebp),%edi
{
801050e8: 53 push %ebx
801050e9: 83 ec 34 sub $0x34,%esp
801050ec: 89 4d d0 mov %ecx,-0x30(%ebp)
801050ef: 8b 4d 08 mov 0x8(%ebp),%ecx
if((dp = nameiparent(path, name)) == 0)
801050f2: 57 push %edi
801050f3: 50 push %eax
{
801050f4: 89 55 d4 mov %edx,-0x2c(%ebp)
801050f7: 89 4d cc mov %ecx,-0x34(%ebp)
if((dp = nameiparent(path, name)) == 0)
801050fa: e8 51 cf ff ff call 80102050 <nameiparent>
801050ff: 83 c4 10 add $0x10,%esp
80105102: 85 c0 test %eax,%eax
80105104: 0f 84 46 01 00 00 je 80105250 <create+0x170>
return 0;
ilock(dp);
8010510a: 83 ec 0c sub $0xc,%esp
8010510d: 89 c3 mov %eax,%ebx
8010510f: 50 push %eax
80105110: e8 4b c6 ff ff call 80101760 <ilock>
if((ip = dirlookup(dp, name, 0)) != 0){
80105115: 83 c4 0c add $0xc,%esp
80105118: 6a 00 push $0x0
8010511a: 57 push %edi
8010511b: 53 push %ebx
8010511c: e8 8f cb ff ff call 80101cb0 <dirlookup>
80105121: 83 c4 10 add $0x10,%esp
80105124: 89 c6 mov %eax,%esi
80105126: 85 c0 test %eax,%eax
80105128: 74 56 je 80105180 <create+0xa0>
iunlockput(dp);
8010512a: 83 ec 0c sub $0xc,%esp
8010512d: 53 push %ebx
8010512e: e8 cd c8 ff ff call 80101a00 <iunlockput>
ilock(ip);
80105133: 89 34 24 mov %esi,(%esp)
80105136: e8 25 c6 ff ff call 80101760 <ilock>
if(type == T_FILE && ip->type == T_FILE)
8010513b: 83 c4 10 add $0x10,%esp
8010513e: 66 83 7d d4 02 cmpw $0x2,-0x2c(%ebp)
80105143: 75 1b jne 80105160 <create+0x80>
80105145: 66 83 7e 50 02 cmpw $0x2,0x50(%esi)
8010514a: 75 14 jne 80105160 <create+0x80>
panic("create: dirlink");
iunlockput(dp);
return ip;
}
8010514c: 8d 65 f4 lea -0xc(%ebp),%esp
8010514f: 89 f0 mov %esi,%eax
80105151: 5b pop %ebx
80105152: 5e pop %esi
80105153: 5f pop %edi
80105154: 5d pop %ebp
80105155: c3 ret
80105156: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010515d: 8d 76 00 lea 0x0(%esi),%esi
iunlockput(ip);
80105160: 83 ec 0c sub $0xc,%esp
80105163: 56 push %esi
return 0;
80105164: 31 f6 xor %esi,%esi
iunlockput(ip);
80105166: e8 95 c8 ff ff call 80101a00 <iunlockput>
return 0;
8010516b: 83 c4 10 add $0x10,%esp
}
8010516e: 8d 65 f4 lea -0xc(%ebp),%esp
80105171: 89 f0 mov %esi,%eax
80105173: 5b pop %ebx
80105174: 5e pop %esi
80105175: 5f pop %edi
80105176: 5d pop %ebp
80105177: c3 ret
80105178: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010517f: 90 nop
if((ip = ialloc(dp->dev, type)) == 0)
80105180: 0f bf 45 d4 movswl -0x2c(%ebp),%eax
80105184: 83 ec 08 sub $0x8,%esp
80105187: 50 push %eax
80105188: ff 33 pushl (%ebx)
8010518a: e8 51 c4 ff ff call 801015e0 <ialloc>
8010518f: 83 c4 10 add $0x10,%esp
80105192: 89 c6 mov %eax,%esi
80105194: 85 c0 test %eax,%eax
80105196: 0f 84 cd 00 00 00 je 80105269 <create+0x189>
ilock(ip);
8010519c: 83 ec 0c sub $0xc,%esp
8010519f: 50 push %eax
801051a0: e8 bb c5 ff ff call 80101760 <ilock>
ip->major = major;
801051a5: 0f b7 45 d0 movzwl -0x30(%ebp),%eax
801051a9: 66 89 46 52 mov %ax,0x52(%esi)
ip->minor = minor;
801051ad: 0f b7 45 cc movzwl -0x34(%ebp),%eax
801051b1: 66 89 46 54 mov %ax,0x54(%esi)
ip->nlink = 1;
801051b5: b8 01 00 00 00 mov $0x1,%eax
801051ba: 66 89 46 56 mov %ax,0x56(%esi)
iupdate(ip);
801051be: 89 34 24 mov %esi,(%esp)
801051c1: e8 da c4 ff ff call 801016a0 <iupdate>
if(type == T_DIR){ // Create . and .. entries.
801051c6: 83 c4 10 add $0x10,%esp
801051c9: 66 83 7d d4 01 cmpw $0x1,-0x2c(%ebp)
801051ce: 74 30 je 80105200 <create+0x120>
if(dirlink(dp, name, ip->inum) < 0)
801051d0: 83 ec 04 sub $0x4,%esp
801051d3: ff 76 04 pushl 0x4(%esi)
801051d6: 57 push %edi
801051d7: 53 push %ebx
801051d8: e8 93 cd ff ff call 80101f70 <dirlink>
801051dd: 83 c4 10 add $0x10,%esp
801051e0: 85 c0 test %eax,%eax
801051e2: 78 78 js 8010525c <create+0x17c>
iunlockput(dp);
801051e4: 83 ec 0c sub $0xc,%esp
801051e7: 53 push %ebx
801051e8: e8 13 c8 ff ff call 80101a00 <iunlockput>
return ip;
801051ed: 83 c4 10 add $0x10,%esp
}
801051f0: 8d 65 f4 lea -0xc(%ebp),%esp
801051f3: 89 f0 mov %esi,%eax
801051f5: 5b pop %ebx
801051f6: 5e pop %esi
801051f7: 5f pop %edi
801051f8: 5d pop %ebp
801051f9: c3 ret
801051fa: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
iupdate(dp);
80105200: 83 ec 0c sub $0xc,%esp
dp->nlink++; // for ".."
80105203: 66 83 43 56 01 addw $0x1,0x56(%ebx)
iupdate(dp);
80105208: 53 push %ebx
80105209: e8 92 c4 ff ff call 801016a0 <iupdate>
if(dirlink(ip, ".", ip->inum) < 0 || dirlink(ip, "..", dp->inum) < 0)
8010520e: 83 c4 0c add $0xc,%esp
80105211: ff 76 04 pushl 0x4(%esi)
80105214: 68 40 80 10 80 push $0x80108040
80105219: 56 push %esi
8010521a: e8 51 cd ff ff call 80101f70 <dirlink>
8010521f: 83 c4 10 add $0x10,%esp
80105222: 85 c0 test %eax,%eax
80105224: 78 18 js 8010523e <create+0x15e>
80105226: 83 ec 04 sub $0x4,%esp
80105229: ff 73 04 pushl 0x4(%ebx)
8010522c: 68 3f 80 10 80 push $0x8010803f
80105231: 56 push %esi
80105232: e8 39 cd ff ff call 80101f70 <dirlink>
80105237: 83 c4 10 add $0x10,%esp
8010523a: 85 c0 test %eax,%eax
8010523c: 79 92 jns 801051d0 <create+0xf0>
panic("create dots");
8010523e: 83 ec 0c sub $0xc,%esp
80105241: 68 33 80 10 80 push $0x80108033
80105246: e8 45 b1 ff ff call 80100390 <panic>
8010524b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
8010524f: 90 nop
}
80105250: 8d 65 f4 lea -0xc(%ebp),%esp
return 0;
80105253: 31 f6 xor %esi,%esi
}
80105255: 5b pop %ebx
80105256: 89 f0 mov %esi,%eax
80105258: 5e pop %esi
80105259: 5f pop %edi
8010525a: 5d pop %ebp
8010525b: c3 ret
panic("create: dirlink");
8010525c: 83 ec 0c sub $0xc,%esp
8010525f: 68 42 80 10 80 push $0x80108042
80105264: e8 27 b1 ff ff call 80100390 <panic>
panic("create: ialloc");
80105269: 83 ec 0c sub $0xc,%esp
8010526c: 68 24 80 10 80 push $0x80108024
80105271: e8 1a b1 ff ff call 80100390 <panic>
80105276: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010527d: 8d 76 00 lea 0x0(%esi),%esi
80105280 <argfd.constprop.0>:
argfd(int n, int *pfd, struct file **pf)
80105280: 55 push %ebp
80105281: 89 e5 mov %esp,%ebp
80105283: 56 push %esi
80105284: 89 d6 mov %edx,%esi
80105286: 53 push %ebx
80105287: 89 c3 mov %eax,%ebx
if(argint(n, &fd) < 0)
80105289: 8d 45 f4 lea -0xc(%ebp),%eax
argfd(int n, int *pfd, struct file **pf)
8010528c: 83 ec 18 sub $0x18,%esp
if(argint(n, &fd) < 0)
8010528f: 50 push %eax
80105290: 6a 00 push $0x0
80105292: e8 e9 fc ff ff call 80104f80 <argint>
80105297: 83 c4 10 add $0x10,%esp
8010529a: 85 c0 test %eax,%eax
8010529c: 78 2a js 801052c8 <argfd.constprop.0+0x48>
if(fd < 0 || fd >= NOFILE || (f=myproc()->ofile[fd]) == 0)
8010529e: 83 7d f4 0f cmpl $0xf,-0xc(%ebp)
801052a2: 77 24 ja 801052c8 <argfd.constprop.0+0x48>
801052a4: e8 b7 e7 ff ff call 80103a60 <myproc>
801052a9: 8b 55 f4 mov -0xc(%ebp),%edx
801052ac: 8b 44 90 28 mov 0x28(%eax,%edx,4),%eax
801052b0: 85 c0 test %eax,%eax
801052b2: 74 14 je 801052c8 <argfd.constprop.0+0x48>
if(pfd)
801052b4: 85 db test %ebx,%ebx
801052b6: 74 02 je 801052ba <argfd.constprop.0+0x3a>
*pfd = fd;
801052b8: 89 13 mov %edx,(%ebx)
*pf = f;
801052ba: 89 06 mov %eax,(%esi)
return 0;
801052bc: 31 c0 xor %eax,%eax
}
801052be: 8d 65 f8 lea -0x8(%ebp),%esp
801052c1: 5b pop %ebx
801052c2: 5e pop %esi
801052c3: 5d pop %ebp
801052c4: c3 ret
801052c5: 8d 76 00 lea 0x0(%esi),%esi
return -1;
801052c8: b8 ff ff ff ff mov $0xffffffff,%eax
801052cd: eb ef jmp 801052be <argfd.constprop.0+0x3e>
801052cf: 90 nop
801052d0 <sys_dup>:
{
801052d0: f3 0f 1e fb endbr32
801052d4: 55 push %ebp
if(argfd(0, 0, &f) < 0)
801052d5: 31 c0 xor %eax,%eax
{
801052d7: 89 e5 mov %esp,%ebp
801052d9: 56 push %esi
801052da: 53 push %ebx
if(argfd(0, 0, &f) < 0)
801052db: 8d 55 f4 lea -0xc(%ebp),%edx
{
801052de: 83 ec 10 sub $0x10,%esp
if(argfd(0, 0, &f) < 0)
801052e1: e8 9a ff ff ff call 80105280 <argfd.constprop.0>
801052e6: 85 c0 test %eax,%eax
801052e8: 78 1e js 80105308 <sys_dup+0x38>
if((fd=fdalloc(f)) < 0)
801052ea: 8b 75 f4 mov -0xc(%ebp),%esi
for(fd = 0; fd < NOFILE; fd++){
801052ed: 31 db xor %ebx,%ebx
struct proc *curproc = myproc();
801052ef: e8 6c e7 ff ff call 80103a60 <myproc>
for(fd = 0; fd < NOFILE; fd++){
801052f4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if(curproc->ofile[fd] == 0){
801052f8: 8b 54 98 28 mov 0x28(%eax,%ebx,4),%edx
801052fc: 85 d2 test %edx,%edx
801052fe: 74 20 je 80105320 <sys_dup+0x50>
for(fd = 0; fd < NOFILE; fd++){
80105300: 83 c3 01 add $0x1,%ebx
80105303: 83 fb 10 cmp $0x10,%ebx
80105306: 75 f0 jne 801052f8 <sys_dup+0x28>
}
80105308: 8d 65 f8 lea -0x8(%ebp),%esp
return -1;
8010530b: bb ff ff ff ff mov $0xffffffff,%ebx
}
80105310: 89 d8 mov %ebx,%eax
80105312: 5b pop %ebx
80105313: 5e pop %esi
80105314: 5d pop %ebp
80105315: c3 ret
80105316: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010531d: 8d 76 00 lea 0x0(%esi),%esi
curproc->ofile[fd] = f;
80105320: 89 74 98 28 mov %esi,0x28(%eax,%ebx,4)
filedup(f);
80105324: 83 ec 0c sub $0xc,%esp
80105327: ff 75 f4 pushl -0xc(%ebp)
8010532a: e8 41 bb ff ff call 80100e70 <filedup>
return fd;
8010532f: 83 c4 10 add $0x10,%esp
}
80105332: 8d 65 f8 lea -0x8(%ebp),%esp
80105335: 89 d8 mov %ebx,%eax
80105337: 5b pop %ebx
80105338: 5e pop %esi
80105339: 5d pop %ebp
8010533a: c3 ret
8010533b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
8010533f: 90 nop
80105340 <sys_read>:
{
80105340: f3 0f 1e fb endbr32
80105344: 55 push %ebp
if(argfd(0, 0, &f) < 0 || argint(2, &n) < 0 || argptr(1, &p, n) < 0)
80105345: 31 c0 xor %eax,%eax
{
80105347: 89 e5 mov %esp,%ebp
80105349: 83 ec 18 sub $0x18,%esp
if(argfd(0, 0, &f) < 0 || argint(2, &n) < 0 || argptr(1, &p, n) < 0)
8010534c: 8d 55 ec lea -0x14(%ebp),%edx
8010534f: e8 2c ff ff ff call 80105280 <argfd.constprop.0>
80105354: 85 c0 test %eax,%eax
80105356: 78 48 js 801053a0 <sys_read+0x60>
80105358: 83 ec 08 sub $0x8,%esp
8010535b: 8d 45 f0 lea -0x10(%ebp),%eax
8010535e: 50 push %eax
8010535f: 6a 02 push $0x2
80105361: e8 1a fc ff ff call 80104f80 <argint>
80105366: 83 c4 10 add $0x10,%esp
80105369: 85 c0 test %eax,%eax
8010536b: 78 33 js 801053a0 <sys_read+0x60>
8010536d: 83 ec 04 sub $0x4,%esp
80105370: 8d 45 f4 lea -0xc(%ebp),%eax
80105373: ff 75 f0 pushl -0x10(%ebp)
80105376: 50 push %eax
80105377: 6a 01 push $0x1
80105379: e8 52 fc ff ff call 80104fd0 <argptr>
8010537e: 83 c4 10 add $0x10,%esp
80105381: 85 c0 test %eax,%eax
80105383: 78 1b js 801053a0 <sys_read+0x60>
return fileread(f, p, n);
80105385: 83 ec 04 sub $0x4,%esp
80105388: ff 75 f0 pushl -0x10(%ebp)
8010538b: ff 75 f4 pushl -0xc(%ebp)
8010538e: ff 75 ec pushl -0x14(%ebp)
80105391: e8 5a bc ff ff call 80100ff0 <fileread>
80105396: 83 c4 10 add $0x10,%esp
}
80105399: c9 leave
8010539a: c3 ret
8010539b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
8010539f: 90 nop
801053a0: c9 leave
return -1;
801053a1: b8 ff ff ff ff mov $0xffffffff,%eax
}
801053a6: c3 ret
801053a7: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801053ae: 66 90 xchg %ax,%ax
801053b0 <sys_write>:
{
801053b0: f3 0f 1e fb endbr32
801053b4: 55 push %ebp
if(argfd(0, 0, &f) < 0 || argint(2, &n) < 0 || argptr(1, &p, n) < 0)
801053b5: 31 c0 xor %eax,%eax
{
801053b7: 89 e5 mov %esp,%ebp
801053b9: 83 ec 18 sub $0x18,%esp
if(argfd(0, 0, &f) < 0 || argint(2, &n) < 0 || argptr(1, &p, n) < 0)
801053bc: 8d 55 ec lea -0x14(%ebp),%edx
801053bf: e8 bc fe ff ff call 80105280 <argfd.constprop.0>
801053c4: 85 c0 test %eax,%eax
801053c6: 78 48 js 80105410 <sys_write+0x60>
801053c8: 83 ec 08 sub $0x8,%esp
801053cb: 8d 45 f0 lea -0x10(%ebp),%eax
801053ce: 50 push %eax
801053cf: 6a 02 push $0x2
801053d1: e8 aa fb ff ff call 80104f80 <argint>
801053d6: 83 c4 10 add $0x10,%esp
801053d9: 85 c0 test %eax,%eax
801053db: 78 33 js 80105410 <sys_write+0x60>
801053dd: 83 ec 04 sub $0x4,%esp
801053e0: 8d 45 f4 lea -0xc(%ebp),%eax
801053e3: ff 75 f0 pushl -0x10(%ebp)
801053e6: 50 push %eax
801053e7: 6a 01 push $0x1
801053e9: e8 e2 fb ff ff call 80104fd0 <argptr>
801053ee: 83 c4 10 add $0x10,%esp
801053f1: 85 c0 test %eax,%eax
801053f3: 78 1b js 80105410 <sys_write+0x60>
return filewrite(f, p, n);
801053f5: 83 ec 04 sub $0x4,%esp
801053f8: ff 75 f0 pushl -0x10(%ebp)
801053fb: ff 75 f4 pushl -0xc(%ebp)
801053fe: ff 75 ec pushl -0x14(%ebp)
80105401: e8 8a bc ff ff call 80101090 <filewrite>
80105406: 83 c4 10 add $0x10,%esp
}
80105409: c9 leave
8010540a: c3 ret
8010540b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
8010540f: 90 nop
80105410: c9 leave
return -1;
80105411: b8 ff ff ff ff mov $0xffffffff,%eax
}
80105416: c3 ret
80105417: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010541e: 66 90 xchg %ax,%ax
80105420 <sys_close>:
{
80105420: f3 0f 1e fb endbr32
80105424: 55 push %ebp
80105425: 89 e5 mov %esp,%ebp
80105427: 83 ec 18 sub $0x18,%esp
if(argfd(0, &fd, &f) < 0)
8010542a: 8d 55 f4 lea -0xc(%ebp),%edx
8010542d: 8d 45 f0 lea -0x10(%ebp),%eax
80105430: e8 4b fe ff ff call 80105280 <argfd.constprop.0>
80105435: 85 c0 test %eax,%eax
80105437: 78 27 js 80105460 <sys_close+0x40>
myproc()->ofile[fd] = 0;
80105439: e8 22 e6 ff ff call 80103a60 <myproc>
8010543e: 8b 55 f0 mov -0x10(%ebp),%edx
fileclose(f);
80105441: 83 ec 0c sub $0xc,%esp
myproc()->ofile[fd] = 0;
80105444: c7 44 90 28 00 00 00 movl $0x0,0x28(%eax,%edx,4)
8010544b: 00
fileclose(f);
8010544c: ff 75 f4 pushl -0xc(%ebp)
8010544f: e8 6c ba ff ff call 80100ec0 <fileclose>
return 0;
80105454: 83 c4 10 add $0x10,%esp
80105457: 31 c0 xor %eax,%eax
}
80105459: c9 leave
8010545a: c3 ret
8010545b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
8010545f: 90 nop
80105460: c9 leave
return -1;
80105461: b8 ff ff ff ff mov $0xffffffff,%eax
}
80105466: c3 ret
80105467: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010546e: 66 90 xchg %ax,%ax
80105470 <sys_fstat>:
{
80105470: f3 0f 1e fb endbr32
80105474: 55 push %ebp
if(argfd(0, 0, &f) < 0 || argptr(1, (void*)&st, sizeof(*st)) < 0)
80105475: 31 c0 xor %eax,%eax
{
80105477: 89 e5 mov %esp,%ebp
80105479: 83 ec 18 sub $0x18,%esp
if(argfd(0, 0, &f) < 0 || argptr(1, (void*)&st, sizeof(*st)) < 0)
8010547c: 8d 55 f0 lea -0x10(%ebp),%edx
8010547f: e8 fc fd ff ff call 80105280 <argfd.constprop.0>
80105484: 85 c0 test %eax,%eax
80105486: 78 30 js 801054b8 <sys_fstat+0x48>
80105488: 83 ec 04 sub $0x4,%esp
8010548b: 8d 45 f4 lea -0xc(%ebp),%eax
8010548e: 6a 14 push $0x14
80105490: 50 push %eax
80105491: 6a 01 push $0x1
80105493: e8 38 fb ff ff call 80104fd0 <argptr>
80105498: 83 c4 10 add $0x10,%esp
8010549b: 85 c0 test %eax,%eax
8010549d: 78 19 js 801054b8 <sys_fstat+0x48>
return filestat(f, st);
8010549f: 83 ec 08 sub $0x8,%esp
801054a2: ff 75 f4 pushl -0xc(%ebp)
801054a5: ff 75 f0 pushl -0x10(%ebp)
801054a8: e8 f3 ba ff ff call 80100fa0 <filestat>
801054ad: 83 c4 10 add $0x10,%esp
}
801054b0: c9 leave
801054b1: c3 ret
801054b2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801054b8: c9 leave
return -1;
801054b9: b8 ff ff ff ff mov $0xffffffff,%eax
}
801054be: c3 ret
801054bf: 90 nop
801054c0 <sys_link>:
{
801054c0: f3 0f 1e fb endbr32
801054c4: 55 push %ebp
801054c5: 89 e5 mov %esp,%ebp
801054c7: 57 push %edi
801054c8: 56 push %esi
if(argstr(0, &old) < 0 || argstr(1, &new) < 0)
801054c9: 8d 45 d4 lea -0x2c(%ebp),%eax
{
801054cc: 53 push %ebx
801054cd: 83 ec 34 sub $0x34,%esp
if(argstr(0, &old) < 0 || argstr(1, &new) < 0)
801054d0: 50 push %eax
801054d1: 6a 00 push $0x0
801054d3: e8 58 fb ff ff call 80105030 <argstr>
801054d8: 83 c4 10 add $0x10,%esp
801054db: 85 c0 test %eax,%eax
801054dd: 0f 88 ff 00 00 00 js 801055e2 <sys_link+0x122>
801054e3: 83 ec 08 sub $0x8,%esp
801054e6: 8d 45 d0 lea -0x30(%ebp),%eax
801054e9: 50 push %eax
801054ea: 6a 01 push $0x1
801054ec: e8 3f fb ff ff call 80105030 <argstr>
801054f1: 83 c4 10 add $0x10,%esp
801054f4: 85 c0 test %eax,%eax
801054f6: 0f 88 e6 00 00 00 js 801055e2 <sys_link+0x122>
begin_op();
801054fc: e8 2f d8 ff ff call 80102d30 <begin_op>
if((ip = namei(old)) == 0){
80105501: 83 ec 0c sub $0xc,%esp
80105504: ff 75 d4 pushl -0x2c(%ebp)
80105507: e8 24 cb ff ff call 80102030 <namei>
8010550c: 83 c4 10 add $0x10,%esp
8010550f: 89 c3 mov %eax,%ebx
80105511: 85 c0 test %eax,%eax
80105513: 0f 84 e8 00 00 00 je 80105601 <sys_link+0x141>
ilock(ip);
80105519: 83 ec 0c sub $0xc,%esp
8010551c: 50 push %eax
8010551d: e8 3e c2 ff ff call 80101760 <ilock>
if(ip->type == T_DIR){
80105522: 83 c4 10 add $0x10,%esp
80105525: 66 83 7b 50 01 cmpw $0x1,0x50(%ebx)
8010552a: 0f 84 b9 00 00 00 je 801055e9 <sys_link+0x129>
iupdate(ip);
80105530: 83 ec 0c sub $0xc,%esp
ip->nlink++;
80105533: 66 83 43 56 01 addw $0x1,0x56(%ebx)
if((dp = nameiparent(new, name)) == 0)
80105538: 8d 7d da lea -0x26(%ebp),%edi
iupdate(ip);
8010553b: 53 push %ebx
8010553c: e8 5f c1 ff ff call 801016a0 <iupdate>
iunlock(ip);
80105541: 89 1c 24 mov %ebx,(%esp)
80105544: e8 f7 c2 ff ff call 80101840 <iunlock>
if((dp = nameiparent(new, name)) == 0)
80105549: 58 pop %eax
8010554a: 5a pop %edx
8010554b: 57 push %edi
8010554c: ff 75 d0 pushl -0x30(%ebp)
8010554f: e8 fc ca ff ff call 80102050 <nameiparent>
80105554: 83 c4 10 add $0x10,%esp
80105557: 89 c6 mov %eax,%esi
80105559: 85 c0 test %eax,%eax
8010555b: 74 5f je 801055bc <sys_link+0xfc>
ilock(dp);
8010555d: 83 ec 0c sub $0xc,%esp
80105560: 50 push %eax
80105561: e8 fa c1 ff ff call 80101760 <ilock>
if(dp->dev != ip->dev || dirlink(dp, name, ip->inum) < 0){
80105566: 8b 03 mov (%ebx),%eax
80105568: 83 c4 10 add $0x10,%esp
8010556b: 39 06 cmp %eax,(%esi)
8010556d: 75 41 jne 801055b0 <sys_link+0xf0>
8010556f: 83 ec 04 sub $0x4,%esp
80105572: ff 73 04 pushl 0x4(%ebx)
80105575: 57 push %edi
80105576: 56 push %esi
80105577: e8 f4 c9 ff ff call 80101f70 <dirlink>
8010557c: 83 c4 10 add $0x10,%esp
8010557f: 85 c0 test %eax,%eax
80105581: 78 2d js 801055b0 <sys_link+0xf0>
iunlockput(dp);
80105583: 83 ec 0c sub $0xc,%esp
80105586: 56 push %esi
80105587: e8 74 c4 ff ff call 80101a00 <iunlockput>
iput(ip);
8010558c: 89 1c 24 mov %ebx,(%esp)
8010558f: e8 fc c2 ff ff call 80101890 <iput>
end_op();
80105594: e8 07 d8 ff ff call 80102da0 <end_op>
return 0;
80105599: 83 c4 10 add $0x10,%esp
8010559c: 31 c0 xor %eax,%eax
}
8010559e: 8d 65 f4 lea -0xc(%ebp),%esp
801055a1: 5b pop %ebx
801055a2: 5e pop %esi
801055a3: 5f pop %edi
801055a4: 5d pop %ebp
801055a5: c3 ret
801055a6: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801055ad: 8d 76 00 lea 0x0(%esi),%esi
iunlockput(dp);
801055b0: 83 ec 0c sub $0xc,%esp
801055b3: 56 push %esi
801055b4: e8 47 c4 ff ff call 80101a00 <iunlockput>
goto bad;
801055b9: 83 c4 10 add $0x10,%esp
ilock(ip);
801055bc: 83 ec 0c sub $0xc,%esp
801055bf: 53 push %ebx
801055c0: e8 9b c1 ff ff call 80101760 <ilock>
ip->nlink--;
801055c5: 66 83 6b 56 01 subw $0x1,0x56(%ebx)
iupdate(ip);
801055ca: 89 1c 24 mov %ebx,(%esp)
801055cd: e8 ce c0 ff ff call 801016a0 <iupdate>
iunlockput(ip);
801055d2: 89 1c 24 mov %ebx,(%esp)
801055d5: e8 26 c4 ff ff call 80101a00 <iunlockput>
end_op();
801055da: e8 c1 d7 ff ff call 80102da0 <end_op>
return -1;
801055df: 83 c4 10 add $0x10,%esp
801055e2: b8 ff ff ff ff mov $0xffffffff,%eax
801055e7: eb b5 jmp 8010559e <sys_link+0xde>
iunlockput(ip);
801055e9: 83 ec 0c sub $0xc,%esp
801055ec: 53 push %ebx
801055ed: e8 0e c4 ff ff call 80101a00 <iunlockput>
end_op();
801055f2: e8 a9 d7 ff ff call 80102da0 <end_op>
return -1;
801055f7: 83 c4 10 add $0x10,%esp
801055fa: b8 ff ff ff ff mov $0xffffffff,%eax
801055ff: eb 9d jmp 8010559e <sys_link+0xde>
end_op();
80105601: e8 9a d7 ff ff call 80102da0 <end_op>
return -1;
80105606: b8 ff ff ff ff mov $0xffffffff,%eax
8010560b: eb 91 jmp 8010559e <sys_link+0xde>
8010560d: 8d 76 00 lea 0x0(%esi),%esi
80105610 <sys_unlink>:
{
80105610: f3 0f 1e fb endbr32
80105614: 55 push %ebp
80105615: 89 e5 mov %esp,%ebp
80105617: 57 push %edi
80105618: 56 push %esi
if(argstr(0, &path) < 0)
80105619: 8d 45 c0 lea -0x40(%ebp),%eax
{
8010561c: 53 push %ebx
8010561d: 83 ec 54 sub $0x54,%esp
if(argstr(0, &path) < 0)
80105620: 50 push %eax
80105621: 6a 00 push $0x0
80105623: e8 08 fa ff ff call 80105030 <argstr>
80105628: 83 c4 10 add $0x10,%esp
8010562b: 85 c0 test %eax,%eax
8010562d: 0f 88 7d 01 00 00 js 801057b0 <sys_unlink+0x1a0>
begin_op();
80105633: e8 f8 d6 ff ff call 80102d30 <begin_op>
if((dp = nameiparent(path, name)) == 0){
80105638: 8d 5d ca lea -0x36(%ebp),%ebx
8010563b: 83 ec 08 sub $0x8,%esp
8010563e: 53 push %ebx
8010563f: ff 75 c0 pushl -0x40(%ebp)
80105642: e8 09 ca ff ff call 80102050 <nameiparent>
80105647: 83 c4 10 add $0x10,%esp
8010564a: 89 c6 mov %eax,%esi
8010564c: 85 c0 test %eax,%eax
8010564e: 0f 84 66 01 00 00 je 801057ba <sys_unlink+0x1aa>
ilock(dp);
80105654: 83 ec 0c sub $0xc,%esp
80105657: 50 push %eax
80105658: e8 03 c1 ff ff call 80101760 <ilock>
if(namecmp(name, ".") == 0 || namecmp(name, "..") == 0)
8010565d: 58 pop %eax
8010565e: 5a pop %edx
8010565f: 68 40 80 10 80 push $0x80108040
80105664: 53 push %ebx
80105665: e8 26 c6 ff ff call 80101c90 <namecmp>
8010566a: 83 c4 10 add $0x10,%esp
8010566d: 85 c0 test %eax,%eax
8010566f: 0f 84 03 01 00 00 je 80105778 <sys_unlink+0x168>
80105675: 83 ec 08 sub $0x8,%esp
80105678: 68 3f 80 10 80 push $0x8010803f
8010567d: 53 push %ebx
8010567e: e8 0d c6 ff ff call 80101c90 <namecmp>
80105683: 83 c4 10 add $0x10,%esp
80105686: 85 c0 test %eax,%eax
80105688: 0f 84 ea 00 00 00 je 80105778 <sys_unlink+0x168>
if((ip = dirlookup(dp, name, &off)) == 0)
8010568e: 83 ec 04 sub $0x4,%esp
80105691: 8d 45 c4 lea -0x3c(%ebp),%eax
80105694: 50 push %eax
80105695: 53 push %ebx
80105696: 56 push %esi
80105697: e8 14 c6 ff ff call 80101cb0 <dirlookup>
8010569c: 83 c4 10 add $0x10,%esp
8010569f: 89 c3 mov %eax,%ebx
801056a1: 85 c0 test %eax,%eax
801056a3: 0f 84 cf 00 00 00 je 80105778 <sys_unlink+0x168>
ilock(ip);
801056a9: 83 ec 0c sub $0xc,%esp
801056ac: 50 push %eax
801056ad: e8 ae c0 ff ff call 80101760 <ilock>
if(ip->nlink < 1)
801056b2: 83 c4 10 add $0x10,%esp
801056b5: 66 83 7b 56 00 cmpw $0x0,0x56(%ebx)
801056ba: 0f 8e 23 01 00 00 jle 801057e3 <sys_unlink+0x1d3>
if(ip->type == T_DIR && !isdirempty(ip)){
801056c0: 66 83 7b 50 01 cmpw $0x1,0x50(%ebx)
801056c5: 8d 7d d8 lea -0x28(%ebp),%edi
801056c8: 74 66 je 80105730 <sys_unlink+0x120>
memset(&de, 0, sizeof(de));
801056ca: 83 ec 04 sub $0x4,%esp
801056cd: 6a 10 push $0x10
801056cf: 6a 00 push $0x0
801056d1: 57 push %edi
801056d2: e8 c9 f5 ff ff call 80104ca0 <memset>
if(writei(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
801056d7: 6a 10 push $0x10
801056d9: ff 75 c4 pushl -0x3c(%ebp)
801056dc: 57 push %edi
801056dd: 56 push %esi
801056de: e8 7d c4 ff ff call 80101b60 <writei>
801056e3: 83 c4 20 add $0x20,%esp
801056e6: 83 f8 10 cmp $0x10,%eax
801056e9: 0f 85 e7 00 00 00 jne 801057d6 <sys_unlink+0x1c6>
if(ip->type == T_DIR){
801056ef: 66 83 7b 50 01 cmpw $0x1,0x50(%ebx)
801056f4: 0f 84 96 00 00 00 je 80105790 <sys_unlink+0x180>
iunlockput(dp);
801056fa: 83 ec 0c sub $0xc,%esp
801056fd: 56 push %esi
801056fe: e8 fd c2 ff ff call 80101a00 <iunlockput>
ip->nlink--;
80105703: 66 83 6b 56 01 subw $0x1,0x56(%ebx)
iupdate(ip);
80105708: 89 1c 24 mov %ebx,(%esp)
8010570b: e8 90 bf ff ff call 801016a0 <iupdate>
iunlockput(ip);
80105710: 89 1c 24 mov %ebx,(%esp)
80105713: e8 e8 c2 ff ff call 80101a00 <iunlockput>
end_op();
80105718: e8 83 d6 ff ff call 80102da0 <end_op>
return 0;
8010571d: 83 c4 10 add $0x10,%esp
80105720: 31 c0 xor %eax,%eax
}
80105722: 8d 65 f4 lea -0xc(%ebp),%esp
80105725: 5b pop %ebx
80105726: 5e pop %esi
80105727: 5f pop %edi
80105728: 5d pop %ebp
80105729: c3 ret
8010572a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
for(off=2*sizeof(de); off<dp->size; off+=sizeof(de)){
80105730: 83 7b 58 20 cmpl $0x20,0x58(%ebx)
80105734: 76 94 jbe 801056ca <sys_unlink+0xba>
80105736: ba 20 00 00 00 mov $0x20,%edx
8010573b: eb 0b jmp 80105748 <sys_unlink+0x138>
8010573d: 8d 76 00 lea 0x0(%esi),%esi
80105740: 83 c2 10 add $0x10,%edx
80105743: 39 53 58 cmp %edx,0x58(%ebx)
80105746: 76 82 jbe 801056ca <sys_unlink+0xba>
if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
80105748: 6a 10 push $0x10
8010574a: 52 push %edx
8010574b: 57 push %edi
8010574c: 53 push %ebx
8010574d: 89 55 b4 mov %edx,-0x4c(%ebp)
80105750: e8 0b c3 ff ff call 80101a60 <readi>
80105755: 83 c4 10 add $0x10,%esp
80105758: 8b 55 b4 mov -0x4c(%ebp),%edx
8010575b: 83 f8 10 cmp $0x10,%eax
8010575e: 75 69 jne 801057c9 <sys_unlink+0x1b9>
if(de.inum != 0)
80105760: 66 83 7d d8 00 cmpw $0x0,-0x28(%ebp)
80105765: 74 d9 je 80105740 <sys_unlink+0x130>
iunlockput(ip);
80105767: 83 ec 0c sub $0xc,%esp
8010576a: 53 push %ebx
8010576b: e8 90 c2 ff ff call 80101a00 <iunlockput>
goto bad;
80105770: 83 c4 10 add $0x10,%esp
80105773: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80105777: 90 nop
iunlockput(dp);
80105778: 83 ec 0c sub $0xc,%esp
8010577b: 56 push %esi
8010577c: e8 7f c2 ff ff call 80101a00 <iunlockput>
end_op();
80105781: e8 1a d6 ff ff call 80102da0 <end_op>
return -1;
80105786: 83 c4 10 add $0x10,%esp
80105789: b8 ff ff ff ff mov $0xffffffff,%eax
8010578e: eb 92 jmp 80105722 <sys_unlink+0x112>
iupdate(dp);
80105790: 83 ec 0c sub $0xc,%esp
dp->nlink--;
80105793: 66 83 6e 56 01 subw $0x1,0x56(%esi)
iupdate(dp);
80105798: 56 push %esi
80105799: e8 02 bf ff ff call 801016a0 <iupdate>
8010579e: 83 c4 10 add $0x10,%esp
801057a1: e9 54 ff ff ff jmp 801056fa <sys_unlink+0xea>
801057a6: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801057ad: 8d 76 00 lea 0x0(%esi),%esi
return -1;
801057b0: b8 ff ff ff ff mov $0xffffffff,%eax
801057b5: e9 68 ff ff ff jmp 80105722 <sys_unlink+0x112>
end_op();
801057ba: e8 e1 d5 ff ff call 80102da0 <end_op>
return -1;
801057bf: b8 ff ff ff ff mov $0xffffffff,%eax
801057c4: e9 59 ff ff ff jmp 80105722 <sys_unlink+0x112>
panic("isdirempty: readi");
801057c9: 83 ec 0c sub $0xc,%esp
801057cc: 68 64 80 10 80 push $0x80108064
801057d1: e8 ba ab ff ff call 80100390 <panic>
panic("unlink: writei");
801057d6: 83 ec 0c sub $0xc,%esp
801057d9: 68 76 80 10 80 push $0x80108076
801057de: e8 ad ab ff ff call 80100390 <panic>
panic("unlink: nlink < 1");
801057e3: 83 ec 0c sub $0xc,%esp
801057e6: 68 52 80 10 80 push $0x80108052
801057eb: e8 a0 ab ff ff call 80100390 <panic>
801057f0 <sys_open>:
int
sys_open(void)
{
801057f0: f3 0f 1e fb endbr32
801057f4: 55 push %ebp
801057f5: 89 e5 mov %esp,%ebp
801057f7: 57 push %edi
801057f8: 56 push %esi
char *path;
int fd, omode;
struct file *f;
struct inode *ip;
if(argstr(0, &path) < 0 || argint(1, &omode) < 0)
801057f9: 8d 45 e0 lea -0x20(%ebp),%eax
{
801057fc: 53 push %ebx
801057fd: 83 ec 24 sub $0x24,%esp
if(argstr(0, &path) < 0 || argint(1, &omode) < 0)
80105800: 50 push %eax
80105801: 6a 00 push $0x0
80105803: e8 28 f8 ff ff call 80105030 <argstr>
80105808: 83 c4 10 add $0x10,%esp
8010580b: 85 c0 test %eax,%eax
8010580d: 0f 88 8a 00 00 00 js 8010589d <sys_open+0xad>
80105813: 83 ec 08 sub $0x8,%esp
80105816: 8d 45 e4 lea -0x1c(%ebp),%eax
80105819: 50 push %eax
8010581a: 6a 01 push $0x1
8010581c: e8 5f f7 ff ff call 80104f80 <argint>
80105821: 83 c4 10 add $0x10,%esp
80105824: 85 c0 test %eax,%eax
80105826: 78 75 js 8010589d <sys_open+0xad>
return -1;
begin_op();
80105828: e8 03 d5 ff ff call 80102d30 <begin_op>
if(omode & O_CREATE){
8010582d: f6 45 e5 02 testb $0x2,-0x1b(%ebp)
80105831: 75 75 jne 801058a8 <sys_open+0xb8>
if(ip == 0){
end_op();
return -1;
}
} else {
if((ip = namei(path)) == 0){
80105833: 83 ec 0c sub $0xc,%esp
80105836: ff 75 e0 pushl -0x20(%ebp)
80105839: e8 f2 c7 ff ff call 80102030 <namei>
8010583e: 83 c4 10 add $0x10,%esp
80105841: 89 c6 mov %eax,%esi
80105843: 85 c0 test %eax,%eax
80105845: 74 7e je 801058c5 <sys_open+0xd5>
end_op();
return -1;
}
ilock(ip);
80105847: 83 ec 0c sub $0xc,%esp
8010584a: 50 push %eax
8010584b: e8 10 bf ff ff call 80101760 <ilock>
if(ip->type == T_DIR && omode != O_RDONLY){
80105850: 83 c4 10 add $0x10,%esp
80105853: 66 83 7e 50 01 cmpw $0x1,0x50(%esi)
80105858: 0f 84 c2 00 00 00 je 80105920 <sys_open+0x130>
end_op();
return -1;
}
}
if((f = filealloc()) == 0 || (fd = fdalloc(f)) < 0){
8010585e: e8 9d b5 ff ff call 80100e00 <filealloc>
80105863: 89 c7 mov %eax,%edi
80105865: 85 c0 test %eax,%eax
80105867: 74 23 je 8010588c <sys_open+0x9c>
struct proc *curproc = myproc();
80105869: e8 f2 e1 ff ff call 80103a60 <myproc>
for(fd = 0; fd < NOFILE; fd++){
8010586e: 31 db xor %ebx,%ebx
if(curproc->ofile[fd] == 0){
80105870: 8b 54 98 28 mov 0x28(%eax,%ebx,4),%edx
80105874: 85 d2 test %edx,%edx
80105876: 74 60 je 801058d8 <sys_open+0xe8>
for(fd = 0; fd < NOFILE; fd++){
80105878: 83 c3 01 add $0x1,%ebx
8010587b: 83 fb 10 cmp $0x10,%ebx
8010587e: 75 f0 jne 80105870 <sys_open+0x80>
if(f)
fileclose(f);
80105880: 83 ec 0c sub $0xc,%esp
80105883: 57 push %edi
80105884: e8 37 b6 ff ff call 80100ec0 <fileclose>
80105889: 83 c4 10 add $0x10,%esp
iunlockput(ip);
8010588c: 83 ec 0c sub $0xc,%esp
8010588f: 56 push %esi
80105890: e8 6b c1 ff ff call 80101a00 <iunlockput>
end_op();
80105895: e8 06 d5 ff ff call 80102da0 <end_op>
return -1;
8010589a: 83 c4 10 add $0x10,%esp
8010589d: bb ff ff ff ff mov $0xffffffff,%ebx
801058a2: eb 6d jmp 80105911 <sys_open+0x121>
801058a4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
ip = create(path, T_FILE, 0, 0);
801058a8: 83 ec 0c sub $0xc,%esp
801058ab: 8b 45 e0 mov -0x20(%ebp),%eax
801058ae: 31 c9 xor %ecx,%ecx
801058b0: ba 02 00 00 00 mov $0x2,%edx
801058b5: 6a 00 push $0x0
801058b7: e8 24 f8 ff ff call 801050e0 <create>
if(ip == 0){
801058bc: 83 c4 10 add $0x10,%esp
ip = create(path, T_FILE, 0, 0);
801058bf: 89 c6 mov %eax,%esi
if(ip == 0){
801058c1: 85 c0 test %eax,%eax
801058c3: 75 99 jne 8010585e <sys_open+0x6e>
end_op();
801058c5: e8 d6 d4 ff ff call 80102da0 <end_op>
return -1;
801058ca: bb ff ff ff ff mov $0xffffffff,%ebx
801058cf: eb 40 jmp 80105911 <sys_open+0x121>
801058d1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
}
iunlock(ip);
801058d8: 83 ec 0c sub $0xc,%esp
curproc->ofile[fd] = f;
801058db: 89 7c 98 28 mov %edi,0x28(%eax,%ebx,4)
iunlock(ip);
801058df: 56 push %esi
801058e0: e8 5b bf ff ff call 80101840 <iunlock>
end_op();
801058e5: e8 b6 d4 ff ff call 80102da0 <end_op>
f->type = FD_INODE;
801058ea: c7 07 02 00 00 00 movl $0x2,(%edi)
f->ip = ip;
f->off = 0;
f->readable = !(omode & O_WRONLY);
801058f0: 8b 55 e4 mov -0x1c(%ebp),%edx
f->writable = (omode & O_WRONLY) || (omode & O_RDWR);
801058f3: 83 c4 10 add $0x10,%esp
f->ip = ip;
801058f6: 89 77 10 mov %esi,0x10(%edi)
f->readable = !(omode & O_WRONLY);
801058f9: 89 d0 mov %edx,%eax
f->off = 0;
801058fb: c7 47 14 00 00 00 00 movl $0x0,0x14(%edi)
f->readable = !(omode & O_WRONLY);
80105902: f7 d0 not %eax
80105904: 83 e0 01 and $0x1,%eax
f->writable = (omode & O_WRONLY) || (omode & O_RDWR);
80105907: 83 e2 03 and $0x3,%edx
f->readable = !(omode & O_WRONLY);
8010590a: 88 47 08 mov %al,0x8(%edi)
f->writable = (omode & O_WRONLY) || (omode & O_RDWR);
8010590d: 0f 95 47 09 setne 0x9(%edi)
return fd;
}
80105911: 8d 65 f4 lea -0xc(%ebp),%esp
80105914: 89 d8 mov %ebx,%eax
80105916: 5b pop %ebx
80105917: 5e pop %esi
80105918: 5f pop %edi
80105919: 5d pop %ebp
8010591a: c3 ret
8010591b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
8010591f: 90 nop
if(ip->type == T_DIR && omode != O_RDONLY){
80105920: 8b 4d e4 mov -0x1c(%ebp),%ecx
80105923: 85 c9 test %ecx,%ecx
80105925: 0f 84 33 ff ff ff je 8010585e <sys_open+0x6e>
8010592b: e9 5c ff ff ff jmp 8010588c <sys_open+0x9c>
80105930 <sys_mkdir>:
int
sys_mkdir(void)
{
80105930: f3 0f 1e fb endbr32
80105934: 55 push %ebp
80105935: 89 e5 mov %esp,%ebp
80105937: 83 ec 18 sub $0x18,%esp
char *path;
struct inode *ip;
begin_op();
8010593a: e8 f1 d3 ff ff call 80102d30 <begin_op>
if(argstr(0, &path) < 0 || (ip = create(path, T_DIR, 0, 0)) == 0){
8010593f: 83 ec 08 sub $0x8,%esp
80105942: 8d 45 f4 lea -0xc(%ebp),%eax
80105945: 50 push %eax
80105946: 6a 00 push $0x0
80105948: e8 e3 f6 ff ff call 80105030 <argstr>
8010594d: 83 c4 10 add $0x10,%esp
80105950: 85 c0 test %eax,%eax
80105952: 78 34 js 80105988 <sys_mkdir+0x58>
80105954: 83 ec 0c sub $0xc,%esp
80105957: 8b 45 f4 mov -0xc(%ebp),%eax
8010595a: 31 c9 xor %ecx,%ecx
8010595c: ba 01 00 00 00 mov $0x1,%edx
80105961: 6a 00 push $0x0
80105963: e8 78 f7 ff ff call 801050e0 <create>
80105968: 83 c4 10 add $0x10,%esp
8010596b: 85 c0 test %eax,%eax
8010596d: 74 19 je 80105988 <sys_mkdir+0x58>
end_op();
return -1;
}
iunlockput(ip);
8010596f: 83 ec 0c sub $0xc,%esp
80105972: 50 push %eax
80105973: e8 88 c0 ff ff call 80101a00 <iunlockput>
end_op();
80105978: e8 23 d4 ff ff call 80102da0 <end_op>
return 0;
8010597d: 83 c4 10 add $0x10,%esp
80105980: 31 c0 xor %eax,%eax
}
80105982: c9 leave
80105983: c3 ret
80105984: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
end_op();
80105988: e8 13 d4 ff ff call 80102da0 <end_op>
return -1;
8010598d: b8 ff ff ff ff mov $0xffffffff,%eax
}
80105992: c9 leave
80105993: c3 ret
80105994: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010599b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
8010599f: 90 nop
801059a0 <sys_mknod>:
int
sys_mknod(void)
{
801059a0: f3 0f 1e fb endbr32
801059a4: 55 push %ebp
801059a5: 89 e5 mov %esp,%ebp
801059a7: 83 ec 18 sub $0x18,%esp
struct inode *ip;
char *path;
int major, minor;
begin_op();
801059aa: e8 81 d3 ff ff call 80102d30 <begin_op>
if((argstr(0, &path)) < 0 ||
801059af: 83 ec 08 sub $0x8,%esp
801059b2: 8d 45 ec lea -0x14(%ebp),%eax
801059b5: 50 push %eax
801059b6: 6a 00 push $0x0
801059b8: e8 73 f6 ff ff call 80105030 <argstr>
801059bd: 83 c4 10 add $0x10,%esp
801059c0: 85 c0 test %eax,%eax
801059c2: 78 64 js 80105a28 <sys_mknod+0x88>
argint(1, &major) < 0 ||
801059c4: 83 ec 08 sub $0x8,%esp
801059c7: 8d 45 f0 lea -0x10(%ebp),%eax
801059ca: 50 push %eax
801059cb: 6a 01 push $0x1
801059cd: e8 ae f5 ff ff call 80104f80 <argint>
if((argstr(0, &path)) < 0 ||
801059d2: 83 c4 10 add $0x10,%esp
801059d5: 85 c0 test %eax,%eax
801059d7: 78 4f js 80105a28 <sys_mknod+0x88>
argint(2, &minor) < 0 ||
801059d9: 83 ec 08 sub $0x8,%esp
801059dc: 8d 45 f4 lea -0xc(%ebp),%eax
801059df: 50 push %eax
801059e0: 6a 02 push $0x2
801059e2: e8 99 f5 ff ff call 80104f80 <argint>
argint(1, &major) < 0 ||
801059e7: 83 c4 10 add $0x10,%esp
801059ea: 85 c0 test %eax,%eax
801059ec: 78 3a js 80105a28 <sys_mknod+0x88>
(ip = create(path, T_DEV, major, minor)) == 0){
801059ee: 0f bf 45 f4 movswl -0xc(%ebp),%eax
801059f2: 83 ec 0c sub $0xc,%esp
801059f5: 0f bf 4d f0 movswl -0x10(%ebp),%ecx
801059f9: ba 03 00 00 00 mov $0x3,%edx
801059fe: 50 push %eax
801059ff: 8b 45 ec mov -0x14(%ebp),%eax
80105a02: e8 d9 f6 ff ff call 801050e0 <create>
argint(2, &minor) < 0 ||
80105a07: 83 c4 10 add $0x10,%esp
80105a0a: 85 c0 test %eax,%eax
80105a0c: 74 1a je 80105a28 <sys_mknod+0x88>
end_op();
return -1;
}
iunlockput(ip);
80105a0e: 83 ec 0c sub $0xc,%esp
80105a11: 50 push %eax
80105a12: e8 e9 bf ff ff call 80101a00 <iunlockput>
end_op();
80105a17: e8 84 d3 ff ff call 80102da0 <end_op>
return 0;
80105a1c: 83 c4 10 add $0x10,%esp
80105a1f: 31 c0 xor %eax,%eax
}
80105a21: c9 leave
80105a22: c3 ret
80105a23: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80105a27: 90 nop
end_op();
80105a28: e8 73 d3 ff ff call 80102da0 <end_op>
return -1;
80105a2d: b8 ff ff ff ff mov $0xffffffff,%eax
}
80105a32: c9 leave
80105a33: c3 ret
80105a34: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80105a3b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80105a3f: 90 nop
80105a40 <sys_chdir>:
int
sys_chdir(void)
{
80105a40: f3 0f 1e fb endbr32
80105a44: 55 push %ebp
80105a45: 89 e5 mov %esp,%ebp
80105a47: 56 push %esi
80105a48: 53 push %ebx
80105a49: 83 ec 10 sub $0x10,%esp
char *path;
struct inode *ip;
struct proc *curproc = myproc();
80105a4c: e8 0f e0 ff ff call 80103a60 <myproc>
80105a51: 89 c6 mov %eax,%esi
begin_op();
80105a53: e8 d8 d2 ff ff call 80102d30 <begin_op>
if(argstr(0, &path) < 0 || (ip = namei(path)) == 0){
80105a58: 83 ec 08 sub $0x8,%esp
80105a5b: 8d 45 f4 lea -0xc(%ebp),%eax
80105a5e: 50 push %eax
80105a5f: 6a 00 push $0x0
80105a61: e8 ca f5 ff ff call 80105030 <argstr>
80105a66: 83 c4 10 add $0x10,%esp
80105a69: 85 c0 test %eax,%eax
80105a6b: 78 73 js 80105ae0 <sys_chdir+0xa0>
80105a6d: 83 ec 0c sub $0xc,%esp
80105a70: ff 75 f4 pushl -0xc(%ebp)
80105a73: e8 b8 c5 ff ff call 80102030 <namei>
80105a78: 83 c4 10 add $0x10,%esp
80105a7b: 89 c3 mov %eax,%ebx
80105a7d: 85 c0 test %eax,%eax
80105a7f: 74 5f je 80105ae0 <sys_chdir+0xa0>
end_op();
return -1;
}
ilock(ip);
80105a81: 83 ec 0c sub $0xc,%esp
80105a84: 50 push %eax
80105a85: e8 d6 bc ff ff call 80101760 <ilock>
if(ip->type != T_DIR){
80105a8a: 83 c4 10 add $0x10,%esp
80105a8d: 66 83 7b 50 01 cmpw $0x1,0x50(%ebx)
80105a92: 75 2c jne 80105ac0 <sys_chdir+0x80>
iunlockput(ip);
end_op();
return -1;
}
iunlock(ip);
80105a94: 83 ec 0c sub $0xc,%esp
80105a97: 53 push %ebx
80105a98: e8 a3 bd ff ff call 80101840 <iunlock>
iput(curproc->cwd);
80105a9d: 58 pop %eax
80105a9e: ff 76 68 pushl 0x68(%esi)
80105aa1: e8 ea bd ff ff call 80101890 <iput>
end_op();
80105aa6: e8 f5 d2 ff ff call 80102da0 <end_op>
curproc->cwd = ip;
80105aab: 89 5e 68 mov %ebx,0x68(%esi)
return 0;
80105aae: 83 c4 10 add $0x10,%esp
80105ab1: 31 c0 xor %eax,%eax
}
80105ab3: 8d 65 f8 lea -0x8(%ebp),%esp
80105ab6: 5b pop %ebx
80105ab7: 5e pop %esi
80105ab8: 5d pop %ebp
80105ab9: c3 ret
80105aba: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
iunlockput(ip);
80105ac0: 83 ec 0c sub $0xc,%esp
80105ac3: 53 push %ebx
80105ac4: e8 37 bf ff ff call 80101a00 <iunlockput>
end_op();
80105ac9: e8 d2 d2 ff ff call 80102da0 <end_op>
return -1;
80105ace: 83 c4 10 add $0x10,%esp
80105ad1: b8 ff ff ff ff mov $0xffffffff,%eax
80105ad6: eb db jmp 80105ab3 <sys_chdir+0x73>
80105ad8: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80105adf: 90 nop
end_op();
80105ae0: e8 bb d2 ff ff call 80102da0 <end_op>
return -1;
80105ae5: b8 ff ff ff ff mov $0xffffffff,%eax
80105aea: eb c7 jmp 80105ab3 <sys_chdir+0x73>
80105aec: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80105af0 <sys_exec>:
int
sys_exec(void)
{
80105af0: f3 0f 1e fb endbr32
80105af4: 55 push %ebp
80105af5: 89 e5 mov %esp,%ebp
80105af7: 57 push %edi
80105af8: 56 push %esi
char *path, *argv[MAXARG];
int i;
uint uargv, uarg;
if(argstr(0, &path) < 0 || argint(1, (int*)&uargv) < 0){
80105af9: 8d 85 5c ff ff ff lea -0xa4(%ebp),%eax
{
80105aff: 53 push %ebx
80105b00: 81 ec a4 00 00 00 sub $0xa4,%esp
if(argstr(0, &path) < 0 || argint(1, (int*)&uargv) < 0){
80105b06: 50 push %eax
80105b07: 6a 00 push $0x0
80105b09: e8 22 f5 ff ff call 80105030 <argstr>
80105b0e: 83 c4 10 add $0x10,%esp
80105b11: 85 c0 test %eax,%eax
80105b13: 0f 88 8b 00 00 00 js 80105ba4 <sys_exec+0xb4>
80105b19: 83 ec 08 sub $0x8,%esp
80105b1c: 8d 85 60 ff ff ff lea -0xa0(%ebp),%eax
80105b22: 50 push %eax
80105b23: 6a 01 push $0x1
80105b25: e8 56 f4 ff ff call 80104f80 <argint>
80105b2a: 83 c4 10 add $0x10,%esp
80105b2d: 85 c0 test %eax,%eax
80105b2f: 78 73 js 80105ba4 <sys_exec+0xb4>
return -1;
}
memset(argv, 0, sizeof(argv));
80105b31: 83 ec 04 sub $0x4,%esp
80105b34: 8d 85 68 ff ff ff lea -0x98(%ebp),%eax
for(i=0;; i++){
80105b3a: 31 db xor %ebx,%ebx
memset(argv, 0, sizeof(argv));
80105b3c: 68 80 00 00 00 push $0x80
80105b41: 8d bd 64 ff ff ff lea -0x9c(%ebp),%edi
80105b47: 6a 00 push $0x0
80105b49: 50 push %eax
80105b4a: e8 51 f1 ff ff call 80104ca0 <memset>
80105b4f: 83 c4 10 add $0x10,%esp
80105b52: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
if(i >= NELEM(argv))
return -1;
if(fetchint(uargv+4*i, (int*)&uarg) < 0)
80105b58: 8b 85 60 ff ff ff mov -0xa0(%ebp),%eax
80105b5e: 8d 34 9d 00 00 00 00 lea 0x0(,%ebx,4),%esi
80105b65: 83 ec 08 sub $0x8,%esp
80105b68: 57 push %edi
80105b69: 01 f0 add %esi,%eax
80105b6b: 50 push %eax
80105b6c: e8 6f f3 ff ff call 80104ee0 <fetchint>
80105b71: 83 c4 10 add $0x10,%esp
80105b74: 85 c0 test %eax,%eax
80105b76: 78 2c js 80105ba4 <sys_exec+0xb4>
return -1;
if(uarg == 0){
80105b78: 8b 85 64 ff ff ff mov -0x9c(%ebp),%eax
80105b7e: 85 c0 test %eax,%eax
80105b80: 74 36 je 80105bb8 <sys_exec+0xc8>
argv[i] = 0;
break;
}
if(fetchstr(uarg, &argv[i]) < 0)
80105b82: 8d 8d 68 ff ff ff lea -0x98(%ebp),%ecx
80105b88: 83 ec 08 sub $0x8,%esp
80105b8b: 8d 14 31 lea (%ecx,%esi,1),%edx
80105b8e: 52 push %edx
80105b8f: 50 push %eax
80105b90: e8 8b f3 ff ff call 80104f20 <fetchstr>
80105b95: 83 c4 10 add $0x10,%esp
80105b98: 85 c0 test %eax,%eax
80105b9a: 78 08 js 80105ba4 <sys_exec+0xb4>
for(i=0;; i++){
80105b9c: 83 c3 01 add $0x1,%ebx
if(i >= NELEM(argv))
80105b9f: 83 fb 20 cmp $0x20,%ebx
80105ba2: 75 b4 jne 80105b58 <sys_exec+0x68>
return -1;
}
return exec(path, argv);
}
80105ba4: 8d 65 f4 lea -0xc(%ebp),%esp
return -1;
80105ba7: b8 ff ff ff ff mov $0xffffffff,%eax
}
80105bac: 5b pop %ebx
80105bad: 5e pop %esi
80105bae: 5f pop %edi
80105baf: 5d pop %ebp
80105bb0: c3 ret
80105bb1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
return exec(path, argv);
80105bb8: 83 ec 08 sub $0x8,%esp
80105bbb: 8d 85 68 ff ff ff lea -0x98(%ebp),%eax
argv[i] = 0;
80105bc1: c7 84 9d 68 ff ff ff movl $0x0,-0x98(%ebp,%ebx,4)
80105bc8: 00 00 00 00
return exec(path, argv);
80105bcc: 50 push %eax
80105bcd: ff b5 5c ff ff ff pushl -0xa4(%ebp)
80105bd3: e8 a8 ae ff ff call 80100a80 <exec>
80105bd8: 83 c4 10 add $0x10,%esp
}
80105bdb: 8d 65 f4 lea -0xc(%ebp),%esp
80105bde: 5b pop %ebx
80105bdf: 5e pop %esi
80105be0: 5f pop %edi
80105be1: 5d pop %ebp
80105be2: c3 ret
80105be3: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80105bea: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80105bf0 <sys_pipe>:
int
sys_pipe(void)
{
80105bf0: f3 0f 1e fb endbr32
80105bf4: 55 push %ebp
80105bf5: 89 e5 mov %esp,%ebp
80105bf7: 57 push %edi
80105bf8: 56 push %esi
int *fd;
struct file *rf, *wf;
int fd0, fd1;
if(argptr(0, (void*)&fd, 2*sizeof(fd[0])) < 0)
80105bf9: 8d 45 dc lea -0x24(%ebp),%eax
{
80105bfc: 53 push %ebx
80105bfd: 83 ec 20 sub $0x20,%esp
if(argptr(0, (void*)&fd, 2*sizeof(fd[0])) < 0)
80105c00: 6a 08 push $0x8
80105c02: 50 push %eax
80105c03: 6a 00 push $0x0
80105c05: e8 c6 f3 ff ff call 80104fd0 <argptr>
80105c0a: 83 c4 10 add $0x10,%esp
80105c0d: 85 c0 test %eax,%eax
80105c0f: 78 4e js 80105c5f <sys_pipe+0x6f>
return -1;
if(pipealloc(&rf, &wf) < 0)
80105c11: 83 ec 08 sub $0x8,%esp
80105c14: 8d 45 e4 lea -0x1c(%ebp),%eax
80105c17: 50 push %eax
80105c18: 8d 45 e0 lea -0x20(%ebp),%eax
80105c1b: 50 push %eax
80105c1c: e8 cf d7 ff ff call 801033f0 <pipealloc>
80105c21: 83 c4 10 add $0x10,%esp
80105c24: 85 c0 test %eax,%eax
80105c26: 78 37 js 80105c5f <sys_pipe+0x6f>
return -1;
fd0 = -1;
if((fd0 = fdalloc(rf)) < 0 || (fd1 = fdalloc(wf)) < 0){
80105c28: 8b 7d e0 mov -0x20(%ebp),%edi
for(fd = 0; fd < NOFILE; fd++){
80105c2b: 31 db xor %ebx,%ebx
struct proc *curproc = myproc();
80105c2d: e8 2e de ff ff call 80103a60 <myproc>
for(fd = 0; fd < NOFILE; fd++){
80105c32: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
if(curproc->ofile[fd] == 0){
80105c38: 8b 74 98 28 mov 0x28(%eax,%ebx,4),%esi
80105c3c: 85 f6 test %esi,%esi
80105c3e: 74 30 je 80105c70 <sys_pipe+0x80>
for(fd = 0; fd < NOFILE; fd++){
80105c40: 83 c3 01 add $0x1,%ebx
80105c43: 83 fb 10 cmp $0x10,%ebx
80105c46: 75 f0 jne 80105c38 <sys_pipe+0x48>
if(fd0 >= 0)
myproc()->ofile[fd0] = 0;
fileclose(rf);
80105c48: 83 ec 0c sub $0xc,%esp
80105c4b: ff 75 e0 pushl -0x20(%ebp)
80105c4e: e8 6d b2 ff ff call 80100ec0 <fileclose>
fileclose(wf);
80105c53: 58 pop %eax
80105c54: ff 75 e4 pushl -0x1c(%ebp)
80105c57: e8 64 b2 ff ff call 80100ec0 <fileclose>
return -1;
80105c5c: 83 c4 10 add $0x10,%esp
80105c5f: b8 ff ff ff ff mov $0xffffffff,%eax
80105c64: eb 5b jmp 80105cc1 <sys_pipe+0xd1>
80105c66: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80105c6d: 8d 76 00 lea 0x0(%esi),%esi
curproc->ofile[fd] = f;
80105c70: 8d 73 08 lea 0x8(%ebx),%esi
80105c73: 89 7c b0 08 mov %edi,0x8(%eax,%esi,4)
if((fd0 = fdalloc(rf)) < 0 || (fd1 = fdalloc(wf)) < 0){
80105c77: 8b 7d e4 mov -0x1c(%ebp),%edi
struct proc *curproc = myproc();
80105c7a: e8 e1 dd ff ff call 80103a60 <myproc>
for(fd = 0; fd < NOFILE; fd++){
80105c7f: 31 d2 xor %edx,%edx
80105c81: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
if(curproc->ofile[fd] == 0){
80105c88: 8b 4c 90 28 mov 0x28(%eax,%edx,4),%ecx
80105c8c: 85 c9 test %ecx,%ecx
80105c8e: 74 20 je 80105cb0 <sys_pipe+0xc0>
for(fd = 0; fd < NOFILE; fd++){
80105c90: 83 c2 01 add $0x1,%edx
80105c93: 83 fa 10 cmp $0x10,%edx
80105c96: 75 f0 jne 80105c88 <sys_pipe+0x98>
myproc()->ofile[fd0] = 0;
80105c98: e8 c3 dd ff ff call 80103a60 <myproc>
80105c9d: c7 44 b0 08 00 00 00 movl $0x0,0x8(%eax,%esi,4)
80105ca4: 00
80105ca5: eb a1 jmp 80105c48 <sys_pipe+0x58>
80105ca7: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80105cae: 66 90 xchg %ax,%ax
curproc->ofile[fd] = f;
80105cb0: 89 7c 90 28 mov %edi,0x28(%eax,%edx,4)
}
fd[0] = fd0;
80105cb4: 8b 45 dc mov -0x24(%ebp),%eax
80105cb7: 89 18 mov %ebx,(%eax)
fd[1] = fd1;
80105cb9: 8b 45 dc mov -0x24(%ebp),%eax
80105cbc: 89 50 04 mov %edx,0x4(%eax)
return 0;
80105cbf: 31 c0 xor %eax,%eax
}
80105cc1: 8d 65 f4 lea -0xc(%ebp),%esp
80105cc4: 5b pop %ebx
80105cc5: 5e pop %esi
80105cc6: 5f pop %edi
80105cc7: 5d pop %ebp
80105cc8: c3 ret
80105cc9: 66 90 xchg %ax,%ax
80105ccb: 66 90 xchg %ax,%ax
80105ccd: 66 90 xchg %ax,%ax
80105ccf: 90 nop
80105cd0 <sys_fork>:
#include "mmu.h"
#include "proc.h"
int
sys_fork(void)
{
80105cd0: f3 0f 1e fb endbr32
return fork();
80105cd4: e9 37 df ff ff jmp 80103c10 <fork>
80105cd9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80105ce0 <sys_exit>:
}
int
sys_exit(void)
{
80105ce0: f3 0f 1e fb endbr32
80105ce4: 55 push %ebp
80105ce5: 89 e5 mov %esp,%ebp
80105ce7: 83 ec 08 sub $0x8,%esp
exit();
80105cea: e8 71 e2 ff ff call 80103f60 <exit>
return 0; // not reached
}
80105cef: 31 c0 xor %eax,%eax
80105cf1: c9 leave
80105cf2: c3 ret
80105cf3: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80105cfa: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80105d00 <sys_wait>:
int
sys_wait(void)
{
80105d00: f3 0f 1e fb endbr32
return wait();
80105d04: e9 47 e5 ff ff jmp 80104250 <wait>
80105d09: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80105d10 <sys_kill>:
}
int
sys_kill(void)
{
80105d10: f3 0f 1e fb endbr32
80105d14: 55 push %ebp
80105d15: 89 e5 mov %esp,%ebp
80105d17: 83 ec 20 sub $0x20,%esp
int pid;
if(argint(0, &pid) < 0)
80105d1a: 8d 45 f4 lea -0xc(%ebp),%eax
80105d1d: 50 push %eax
80105d1e: 6a 00 push $0x0
80105d20: e8 5b f2 ff ff call 80104f80 <argint>
80105d25: 83 c4 10 add $0x10,%esp
80105d28: 85 c0 test %eax,%eax
80105d2a: 78 14 js 80105d40 <sys_kill+0x30>
return -1;
return kill(pid);
80105d2c: 83 ec 0c sub $0xc,%esp
80105d2f: ff 75 f4 pushl -0xc(%ebp)
80105d32: e8 89 e7 ff ff call 801044c0 <kill>
80105d37: 83 c4 10 add $0x10,%esp
}
80105d3a: c9 leave
80105d3b: c3 ret
80105d3c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80105d40: c9 leave
return -1;
80105d41: b8 ff ff ff ff mov $0xffffffff,%eax
}
80105d46: c3 ret
80105d47: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80105d4e: 66 90 xchg %ax,%ax
80105d50 <sys_getpid>:
int
sys_getpid(void)
{
80105d50: f3 0f 1e fb endbr32
80105d54: 55 push %ebp
80105d55: 89 e5 mov %esp,%ebp
80105d57: 83 ec 08 sub $0x8,%esp
return myproc()->pid;
80105d5a: e8 01 dd ff ff call 80103a60 <myproc>
80105d5f: 8b 40 10 mov 0x10(%eax),%eax
}
80105d62: c9 leave
80105d63: c3 ret
80105d64: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80105d6b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80105d6f: 90 nop
80105d70 <sys_sbrk>:
int
sys_sbrk(void)
{
80105d70: f3 0f 1e fb endbr32
80105d74: 55 push %ebp
80105d75: 89 e5 mov %esp,%ebp
80105d77: 53 push %ebx
int addr;
int n;
if(argint(0, &n) < 0)
80105d78: 8d 45 f4 lea -0xc(%ebp),%eax
{
80105d7b: 83 ec 1c sub $0x1c,%esp
if(argint(0, &n) < 0)
80105d7e: 50 push %eax
80105d7f: 6a 00 push $0x0
80105d81: e8 fa f1 ff ff call 80104f80 <argint>
80105d86: 83 c4 10 add $0x10,%esp
80105d89: 85 c0 test %eax,%eax
80105d8b: 78 23 js 80105db0 <sys_sbrk+0x40>
return -1;
addr = myproc()->sz;
80105d8d: e8 ce dc ff ff call 80103a60 <myproc>
if(growproc(n) < 0)
80105d92: 83 ec 0c sub $0xc,%esp
addr = myproc()->sz;
80105d95: 8b 18 mov (%eax),%ebx
if(growproc(n) < 0)
80105d97: ff 75 f4 pushl -0xc(%ebp)
80105d9a: e8 f1 dd ff ff call 80103b90 <growproc>
80105d9f: 83 c4 10 add $0x10,%esp
80105da2: 85 c0 test %eax,%eax
80105da4: 78 0a js 80105db0 <sys_sbrk+0x40>
return -1;
return addr;
}
80105da6: 89 d8 mov %ebx,%eax
80105da8: 8b 5d fc mov -0x4(%ebp),%ebx
80105dab: c9 leave
80105dac: c3 ret
80105dad: 8d 76 00 lea 0x0(%esi),%esi
return -1;
80105db0: bb ff ff ff ff mov $0xffffffff,%ebx
80105db5: eb ef jmp 80105da6 <sys_sbrk+0x36>
80105db7: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80105dbe: 66 90 xchg %ax,%ax
80105dc0 <sys_sleep>:
int
sys_sleep(void)
{
80105dc0: f3 0f 1e fb endbr32
80105dc4: 55 push %ebp
80105dc5: 89 e5 mov %esp,%ebp
80105dc7: 53 push %ebx
int n;
uint ticks0;
if(argint(0, &n) < 0)
80105dc8: 8d 45 f4 lea -0xc(%ebp),%eax
{
80105dcb: 83 ec 1c sub $0x1c,%esp
if(argint(0, &n) < 0)
80105dce: 50 push %eax
80105dcf: 6a 00 push $0x0
80105dd1: e8 aa f1 ff ff call 80104f80 <argint>
80105dd6: 83 c4 10 add $0x10,%esp
80105dd9: 85 c0 test %eax,%eax
80105ddb: 0f 88 86 00 00 00 js 80105e67 <sys_sleep+0xa7>
return -1;
acquire(&tickslock);
80105de1: 83 ec 0c sub $0xc,%esp
80105de4: 68 60 6b 11 80 push $0x80116b60
80105de9: e8 a2 ed ff ff call 80104b90 <acquire>
ticks0 = ticks;
while(ticks - ticks0 < n){
80105dee: 8b 55 f4 mov -0xc(%ebp),%edx
ticks0 = ticks;
80105df1: 8b 1d a0 73 11 80 mov 0x801173a0,%ebx
while(ticks - ticks0 < n){
80105df7: 83 c4 10 add $0x10,%esp
80105dfa: 85 d2 test %edx,%edx
80105dfc: 75 23 jne 80105e21 <sys_sleep+0x61>
80105dfe: eb 50 jmp 80105e50 <sys_sleep+0x90>
if(myproc()->killed){
release(&tickslock);
return -1;
}
sleep(&ticks, &tickslock);
80105e00: 83 ec 08 sub $0x8,%esp
80105e03: 68 60 6b 11 80 push $0x80116b60
80105e08: 68 a0 73 11 80 push $0x801173a0
80105e0d: e8 5e e3 ff ff call 80104170 <sleep>
while(ticks - ticks0 < n){
80105e12: a1 a0 73 11 80 mov 0x801173a0,%eax
80105e17: 83 c4 10 add $0x10,%esp
80105e1a: 29 d8 sub %ebx,%eax
80105e1c: 3b 45 f4 cmp -0xc(%ebp),%eax
80105e1f: 73 2f jae 80105e50 <sys_sleep+0x90>
if(myproc()->killed){
80105e21: e8 3a dc ff ff call 80103a60 <myproc>
80105e26: 8b 40 24 mov 0x24(%eax),%eax
80105e29: 85 c0 test %eax,%eax
80105e2b: 74 d3 je 80105e00 <sys_sleep+0x40>
release(&tickslock);
80105e2d: 83 ec 0c sub $0xc,%esp
80105e30: 68 60 6b 11 80 push $0x80116b60
80105e35: e8 16 ee ff ff call 80104c50 <release>
}
release(&tickslock);
return 0;
}
80105e3a: 8b 5d fc mov -0x4(%ebp),%ebx
return -1;
80105e3d: 83 c4 10 add $0x10,%esp
80105e40: b8 ff ff ff ff mov $0xffffffff,%eax
}
80105e45: c9 leave
80105e46: c3 ret
80105e47: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80105e4e: 66 90 xchg %ax,%ax
release(&tickslock);
80105e50: 83 ec 0c sub $0xc,%esp
80105e53: 68 60 6b 11 80 push $0x80116b60
80105e58: e8 f3 ed ff ff call 80104c50 <release>
return 0;
80105e5d: 83 c4 10 add $0x10,%esp
80105e60: 31 c0 xor %eax,%eax
}
80105e62: 8b 5d fc mov -0x4(%ebp),%ebx
80105e65: c9 leave
80105e66: c3 ret
return -1;
80105e67: b8 ff ff ff ff mov $0xffffffff,%eax
80105e6c: eb f4 jmp 80105e62 <sys_sleep+0xa2>
80105e6e: 66 90 xchg %ax,%ax
80105e70 <sys_uptime>:
// return how many clock tick interrupts have occurred
// since start.
int
sys_uptime(void)
{
80105e70: f3 0f 1e fb endbr32
80105e74: 55 push %ebp
80105e75: 89 e5 mov %esp,%ebp
80105e77: 53 push %ebx
80105e78: 83 ec 10 sub $0x10,%esp
uint xticks;
acquire(&tickslock);
80105e7b: 68 60 6b 11 80 push $0x80116b60
80105e80: e8 0b ed ff ff call 80104b90 <acquire>
xticks = ticks;
80105e85: 8b 1d a0 73 11 80 mov 0x801173a0,%ebx
release(&tickslock);
80105e8b: c7 04 24 60 6b 11 80 movl $0x80116b60,(%esp)
80105e92: e8 b9 ed ff ff call 80104c50 <release>
return xticks;
}
80105e97: 89 d8 mov %ebx,%eax
80105e99: 8b 5d fc mov -0x4(%ebp),%ebx
80105e9c: c9 leave
80105e9d: c3 ret
80105e9e: 66 90 xchg %ax,%ax
80105ea0 <sys_waitx>:
int sys_waitx(void) // waitx system call
{
80105ea0: f3 0f 1e fb endbr32
80105ea4: 55 push %ebp
80105ea5: 89 e5 mov %esp,%ebp
80105ea7: 83 ec 1c sub $0x1c,%esp
int *wtime;
int *rtime;
if(argptr(0, (char**)&wtime, sizeof(int)) < 0)
80105eaa: 8d 45 f0 lea -0x10(%ebp),%eax
80105ead: 6a 04 push $0x4
80105eaf: 50 push %eax
80105eb0: 6a 00 push $0x0
80105eb2: e8 19 f1 ff ff call 80104fd0 <argptr>
80105eb7: 83 c4 10 add $0x10,%esp
80105eba: 85 c0 test %eax,%eax
80105ebc: 78 32 js 80105ef0 <sys_waitx+0x50>
{
return -1;
}
if(argptr(1, (char**)&rtime, sizeof(int)) < 0)
80105ebe: 83 ec 04 sub $0x4,%esp
80105ec1: 8d 45 f4 lea -0xc(%ebp),%eax
80105ec4: 6a 04 push $0x4
80105ec6: 50 push %eax
80105ec7: 6a 01 push $0x1
80105ec9: e8 02 f1 ff ff call 80104fd0 <argptr>
80105ece: 83 c4 10 add $0x10,%esp
80105ed1: 85 c0 test %eax,%eax
80105ed3: 78 1b js 80105ef0 <sys_waitx+0x50>
{
return -1;
}
return waitx(wtime, rtime);
80105ed5: 83 ec 08 sub $0x8,%esp
80105ed8: ff 75 f4 pushl -0xc(%ebp)
80105edb: ff 75 f0 pushl -0x10(%ebp)
80105ede: e8 6d e4 ff ff call 80104350 <waitx>
80105ee3: 83 c4 10 add $0x10,%esp
}
80105ee6: c9 leave
80105ee7: c3 ret
80105ee8: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80105eef: 90 nop
80105ef0: c9 leave
return -1;
80105ef1: b8 ff ff ff ff mov $0xffffffff,%eax
}
80105ef6: c3 ret
80105ef7: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80105efe: 66 90 xchg %ax,%ax
80105f00 <sys_set_priority>:
int sys_set_priority(void) // set_priority system call
{
80105f00: f3 0f 1e fb endbr32
80105f04: 55 push %ebp
80105f05: 89 e5 mov %esp,%ebp
80105f07: 83 ec 20 sub $0x20,%esp
int new_priority;
int pid;
if(argint(0, &new_priority)<0)
80105f0a: 8d 45 f0 lea -0x10(%ebp),%eax
80105f0d: 50 push %eax
80105f0e: 6a 00 push $0x0
80105f10: e8 6b f0 ff ff call 80104f80 <argint>
80105f15: 83 c4 10 add $0x10,%esp
80105f18: 85 c0 test %eax,%eax
80105f1a: 78 2c js 80105f48 <sys_set_priority+0x48>
{
return -1;
}
if(argint(1, &pid)<0)
80105f1c: 83 ec 08 sub $0x8,%esp
80105f1f: 8d 45 f4 lea -0xc(%ebp),%eax
80105f22: 50 push %eax
80105f23: 6a 01 push $0x1
80105f25: e8 56 f0 ff ff call 80104f80 <argint>
80105f2a: 83 c4 10 add $0x10,%esp
80105f2d: 85 c0 test %eax,%eax
80105f2f: 78 17 js 80105f48 <sys_set_priority+0x48>
{
return -1;
}
return set_priority(new_priority, pid);
80105f31: 83 ec 08 sub $0x8,%esp
80105f34: ff 75 f4 pushl -0xc(%ebp)
80105f37: ff 75 f0 pushl -0x10(%ebp)
80105f3a: e8 f1 e6 ff ff call 80104630 <set_priority>
80105f3f: 83 c4 10 add $0x10,%esp
}
80105f42: c9 leave
80105f43: c3 ret
80105f44: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80105f48: c9 leave
return -1;
80105f49: b8 ff ff ff ff mov $0xffffffff,%eax
}
80105f4e: c3 ret
80105f4f: 90 nop
80105f50 <sys_ps>:
int sys_ps(void)
{
80105f50: f3 0f 1e fb endbr32
return ps();
80105f54: e9 47 e7 ff ff jmp 801046a0 <ps>
80105f59 <alltraps>:
# vectors.S sends all traps here.
.globl alltraps
alltraps:
# Build trap frame.
pushl %ds
80105f59: 1e push %ds
pushl %es
80105f5a: 06 push %es
pushl %fs
80105f5b: 0f a0 push %fs
pushl %gs
80105f5d: 0f a8 push %gs
pushal
80105f5f: 60 pusha
# Set up data segments.
movw $(SEG_KDATA<<3), %ax
80105f60: 66 b8 10 00 mov $0x10,%ax
movw %ax, %ds
80105f64: 8e d8 mov %eax,%ds
movw %ax, %es
80105f66: 8e c0 mov %eax,%es
# Call trap(tf), where tf=%esp
pushl %esp
80105f68: 54 push %esp
call trap
80105f69: e8 c2 00 00 00 call 80106030 <trap>
addl $4, %esp
80105f6e: 83 c4 04 add $0x4,%esp
80105f71 <trapret>:
# Return falls through to trapret...
.globl trapret
trapret:
popal
80105f71: 61 popa
popl %gs
80105f72: 0f a9 pop %gs
popl %fs
80105f74: 0f a1 pop %fs
popl %es
80105f76: 07 pop %es
popl %ds
80105f77: 1f pop %ds
addl $0x8, %esp # trapno and errcode
80105f78: 83 c4 08 add $0x8,%esp
iret
80105f7b: cf iret
80105f7c: 66 90 xchg %ax,%ax
80105f7e: 66 90 xchg %ax,%ax
80105f80 <tvinit>:
struct spinlock tickslock;
uint ticks;
void
tvinit(void)
{
80105f80: f3 0f 1e fb endbr32
80105f84: 55 push %ebp
int i;
for(i = 0; i < 256; i++)
80105f85: 31 c0 xor %eax,%eax
{
80105f87: 89 e5 mov %esp,%ebp
80105f89: 83 ec 08 sub $0x8,%esp
80105f8c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
SETGATE(idt[i], 0, SEG_KCODE<<3, vectors[i], 0);
80105f90: 8b 14 85 08 b0 10 80 mov -0x7fef4ff8(,%eax,4),%edx
80105f97: c7 04 c5 a2 6b 11 80 movl $0x8e000008,-0x7fee945e(,%eax,8)
80105f9e: 08 00 00 8e
80105fa2: 66 89 14 c5 a0 6b 11 mov %dx,-0x7fee9460(,%eax,8)
80105fa9: 80
80105faa: c1 ea 10 shr $0x10,%edx
80105fad: 66 89 14 c5 a6 6b 11 mov %dx,-0x7fee945a(,%eax,8)
80105fb4: 80
for(i = 0; i < 256; i++)
80105fb5: 83 c0 01 add $0x1,%eax
80105fb8: 3d 00 01 00 00 cmp $0x100,%eax
80105fbd: 75 d1 jne 80105f90 <tvinit+0x10>
SETGATE(idt[T_SYSCALL], 1, SEG_KCODE<<3, vectors[T_SYSCALL], DPL_USER);
initlock(&tickslock, "time");
80105fbf: 83 ec 08 sub $0x8,%esp
SETGATE(idt[T_SYSCALL], 1, SEG_KCODE<<3, vectors[T_SYSCALL], DPL_USER);
80105fc2: a1 08 b1 10 80 mov 0x8010b108,%eax
80105fc7: c7 05 a2 6d 11 80 08 movl $0xef000008,0x80116da2
80105fce: 00 00 ef
initlock(&tickslock, "time");
80105fd1: 68 85 80 10 80 push $0x80108085
80105fd6: 68 60 6b 11 80 push $0x80116b60
SETGATE(idt[T_SYSCALL], 1, SEG_KCODE<<3, vectors[T_SYSCALL], DPL_USER);
80105fdb: 66 a3 a0 6d 11 80 mov %ax,0x80116da0
80105fe1: c1 e8 10 shr $0x10,%eax
80105fe4: 66 a3 a6 6d 11 80 mov %ax,0x80116da6
initlock(&tickslock, "time");
80105fea: e8 21 ea ff ff call 80104a10 <initlock>
}
80105fef: 83 c4 10 add $0x10,%esp
80105ff2: c9 leave
80105ff3: c3 ret
80105ff4: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80105ffb: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80105fff: 90 nop
80106000 <idtinit>:
void
idtinit(void)
{
80106000: f3 0f 1e fb endbr32
80106004: 55 push %ebp
pd[0] = size-1;
80106005: b8 ff 07 00 00 mov $0x7ff,%eax
8010600a: 89 e5 mov %esp,%ebp
8010600c: 83 ec 10 sub $0x10,%esp
8010600f: 66 89 45 fa mov %ax,-0x6(%ebp)
pd[1] = (uint)p;
80106013: b8 a0 6b 11 80 mov $0x80116ba0,%eax
80106018: 66 89 45 fc mov %ax,-0x4(%ebp)
pd[2] = (uint)p >> 16;
8010601c: c1 e8 10 shr $0x10,%eax
8010601f: 66 89 45 fe mov %ax,-0x2(%ebp)
asm volatile("lidt (%0)" : : "r" (pd));
80106023: 8d 45 fa lea -0x6(%ebp),%eax
80106026: 0f 01 18 lidtl (%eax)
lidt(idt, sizeof(idt));
}
80106029: c9 leave
8010602a: c3 ret
8010602b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
8010602f: 90 nop
80106030 <trap>:
//PAGEBREAK: 41
void
trap(struct trapframe *tf)
{
80106030: f3 0f 1e fb endbr32
80106034: 55 push %ebp
80106035: 89 e5 mov %esp,%ebp
80106037: 57 push %edi
80106038: 56 push %esi
80106039: 53 push %ebx
8010603a: 83 ec 1c sub $0x1c,%esp
8010603d: 8b 5d 08 mov 0x8(%ebp),%ebx
if(tf->trapno == T_SYSCALL){
80106040: 8b 43 30 mov 0x30(%ebx),%eax
80106043: 83 f8 40 cmp $0x40,%eax
80106046: 0f 84 c4 01 00 00 je 80106210 <trap+0x1e0>
if(myproc()->killed)
exit();
return;
}
switch(tf->trapno){
8010604c: 83 e8 20 sub $0x20,%eax
8010604f: 83 f8 1f cmp $0x1f,%eax
80106052: 77 08 ja 8010605c <trap+0x2c>
80106054: 3e ff 24 85 2c 81 10 notrack jmp *-0x7fef7ed4(,%eax,4)
8010605b: 80
lapiceoi();
break;
//PAGEBREAK: 13
default:
if(myproc() == 0 || (tf->cs&3) == 0){
8010605c: e8 ff d9 ff ff call 80103a60 <myproc>
80106061: 8b 7b 38 mov 0x38(%ebx),%edi
80106064: 85 c0 test %eax,%eax
80106066: 0f 84 f3 01 00 00 je 8010625f <trap+0x22f>
8010606c: f6 43 3c 03 testb $0x3,0x3c(%ebx)
80106070: 0f 84 e9 01 00 00 je 8010625f <trap+0x22f>
static inline uint
rcr2(void)
{
uint val;
asm volatile("movl %%cr2,%0" : "=r" (val));
80106076: 0f 20 d1 mov %cr2,%ecx
80106079: 89 4d d8 mov %ecx,-0x28(%ebp)
cprintf("unexpected trap %d from cpu %d eip %x (cr2=0x%x)\n",
tf->trapno, cpuid(), tf->eip, rcr2());
panic("trap");
}
// In user space, assume process misbehaved.
cprintf("pid %d %s: trap %d err %d on cpu %d "
8010607c: e8 bf d9 ff ff call 80103a40 <cpuid>
80106081: 8b 73 30 mov 0x30(%ebx),%esi
80106084: 89 45 dc mov %eax,-0x24(%ebp)
80106087: 8b 43 34 mov 0x34(%ebx),%eax
8010608a: 89 45 e4 mov %eax,-0x1c(%ebp)
"eip 0x%x addr 0x%x--kill proc\n",
myproc()->pid, myproc()->name, tf->trapno,
8010608d: e8 ce d9 ff ff call 80103a60 <myproc>
80106092: 89 45 e0 mov %eax,-0x20(%ebp)
80106095: e8 c6 d9 ff ff call 80103a60 <myproc>
cprintf("pid %d %s: trap %d err %d on cpu %d "
8010609a: 8b 4d d8 mov -0x28(%ebp),%ecx
8010609d: 8b 55 dc mov -0x24(%ebp),%edx
801060a0: 51 push %ecx
801060a1: 57 push %edi
801060a2: 52 push %edx
801060a3: ff 75 e4 pushl -0x1c(%ebp)
801060a6: 56 push %esi
myproc()->pid, myproc()->name, tf->trapno,
801060a7: 8b 75 e0 mov -0x20(%ebp),%esi
801060aa: 83 c6 6c add $0x6c,%esi
cprintf("pid %d %s: trap %d err %d on cpu %d "
801060ad: 56 push %esi
801060ae: ff 70 10 pushl 0x10(%eax)
801060b1: 68 e8 80 10 80 push $0x801080e8
801060b6: e8 f5 a5 ff ff call 801006b0 <cprintf>
tf->err, cpuid(), tf->eip, rcr2());
myproc()->killed = 1;
801060bb: 83 c4 20 add $0x20,%esp
801060be: e8 9d d9 ff ff call 80103a60 <myproc>
801060c3: c7 40 24 01 00 00 00 movl $0x1,0x24(%eax)
}
// Force process exit if it has been killed and is in user space.
// (If it is still executing in the kernel, let it keep running
// until it gets to the regular system call return.)
if(myproc() && myproc()->killed && (tf->cs&3) == DPL_USER)
801060ca: e8 91 d9 ff ff call 80103a60 <myproc>
801060cf: 85 c0 test %eax,%eax
801060d1: 74 1d je 801060f0 <trap+0xc0>
801060d3: e8 88 d9 ff ff call 80103a60 <myproc>
801060d8: 8b 50 24 mov 0x24(%eax),%edx
801060db: 85 d2 test %edx,%edx
801060dd: 74 11 je 801060f0 <trap+0xc0>
801060df: 0f b7 43 3c movzwl 0x3c(%ebx),%eax
801060e3: 83 e0 03 and $0x3,%eax
801060e6: 66 83 f8 03 cmp $0x3,%ax
801060ea: 0f 84 58 01 00 00 je 80106248 <trap+0x218>
exit();
// Force process to give up CPU on clock tick.
// If interrupts were on while locks held, would need to check nlock.
if(myproc() && myproc()->state == RUNNING &&
801060f0: e8 6b d9 ff ff call 80103a60 <myproc>
801060f5: 85 c0 test %eax,%eax
801060f7: 74 0f je 80106108 <trap+0xd8>
801060f9: e8 62 d9 ff ff call 80103a60 <myproc>
801060fe: 83 78 0c 04 cmpl $0x4,0xc(%eax)
80106102: 0f 84 f0 00 00 00 je 801061f8 <trap+0x1c8>
#ifndef FCFS
yield();
#endif
// Check if the process has been killed since we yielded
if(myproc() && myproc()->killed && (tf->cs&3) == DPL_USER)
80106108: e8 53 d9 ff ff call 80103a60 <myproc>
8010610d: 85 c0 test %eax,%eax
8010610f: 74 1d je 8010612e <trap+0xfe>
80106111: e8 4a d9 ff ff call 80103a60 <myproc>
80106116: 8b 40 24 mov 0x24(%eax),%eax
80106119: 85 c0 test %eax,%eax
8010611b: 74 11 je 8010612e <trap+0xfe>
8010611d: 0f b7 43 3c movzwl 0x3c(%ebx),%eax
80106121: 83 e0 03 and $0x3,%eax
80106124: 66 83 f8 03 cmp $0x3,%ax
80106128: 0f 84 0b 01 00 00 je 80106239 <trap+0x209>
exit();
8010612e: 8d 65 f4 lea -0xc(%ebp),%esp
80106131: 5b pop %ebx
80106132: 5e pop %esi
80106133: 5f pop %edi
80106134: 5d pop %ebp
80106135: c3 ret
ideintr();
80106136: e8 a5 c0 ff ff call 801021e0 <ideintr>
lapiceoi();
8010613b: e8 80 c7 ff ff call 801028c0 <lapiceoi>
if(myproc() && myproc()->killed && (tf->cs&3) == DPL_USER)
80106140: e8 1b d9 ff ff call 80103a60 <myproc>
80106145: 85 c0 test %eax,%eax
80106147: 75 8a jne 801060d3 <trap+0xa3>
80106149: eb a5 jmp 801060f0 <trap+0xc0>
if(cpuid() == 0){
8010614b: e8 f0 d8 ff ff call 80103a40 <cpuid>
80106150: 85 c0 test %eax,%eax
80106152: 75 e7 jne 8010613b <trap+0x10b>
acquire(&tickslock);
80106154: 83 ec 0c sub $0xc,%esp
80106157: 68 60 6b 11 80 push $0x80116b60
8010615c: e8 2f ea ff ff call 80104b90 <acquire>
ticks++;
80106161: 83 05 a0 73 11 80 01 addl $0x1,0x801173a0
update();
80106168: e8 03 df ff ff call 80104070 <update>
wakeup(&ticks);
8010616d: c7 04 24 a0 73 11 80 movl $0x801173a0,(%esp)
80106174: e8 07 e3 ff ff call 80104480 <wakeup>
release(&tickslock);
80106179: c7 04 24 60 6b 11 80 movl $0x80116b60,(%esp)
80106180: e8 cb ea ff ff call 80104c50 <release>
80106185: 83 c4 10 add $0x10,%esp
lapiceoi();
80106188: eb b1 jmp 8010613b <trap+0x10b>
kbdintr();
8010618a: e8 f1 c5 ff ff call 80102780 <kbdintr>
lapiceoi();
8010618f: e8 2c c7 ff ff call 801028c0 <lapiceoi>
if(myproc() && myproc()->killed && (tf->cs&3) == DPL_USER)
80106194: e8 c7 d8 ff ff call 80103a60 <myproc>
80106199: 85 c0 test %eax,%eax
8010619b: 0f 85 32 ff ff ff jne 801060d3 <trap+0xa3>
801061a1: e9 4a ff ff ff jmp 801060f0 <trap+0xc0>
uartintr();
801061a6: e8 55 02 00 00 call 80106400 <uartintr>
lapiceoi();
801061ab: e8 10 c7 ff ff call 801028c0 <lapiceoi>
if(myproc() && myproc()->killed && (tf->cs&3) == DPL_USER)
801061b0: e8 ab d8 ff ff call 80103a60 <myproc>
801061b5: 85 c0 test %eax,%eax
801061b7: 0f 85 16 ff ff ff jne 801060d3 <trap+0xa3>
801061bd: e9 2e ff ff ff jmp 801060f0 <trap+0xc0>
cprintf("cpu%d: spurious interrupt at %x:%x\n",
801061c2: 8b 7b 38 mov 0x38(%ebx),%edi
801061c5: 0f b7 73 3c movzwl 0x3c(%ebx),%esi
801061c9: e8 72 d8 ff ff call 80103a40 <cpuid>
801061ce: 57 push %edi
801061cf: 56 push %esi
801061d0: 50 push %eax
801061d1: 68 90 80 10 80 push $0x80108090
801061d6: e8 d5 a4 ff ff call 801006b0 <cprintf>
lapiceoi();
801061db: e8 e0 c6 ff ff call 801028c0 <lapiceoi>
break;
801061e0: 83 c4 10 add $0x10,%esp
if(myproc() && myproc()->killed && (tf->cs&3) == DPL_USER)
801061e3: e8 78 d8 ff ff call 80103a60 <myproc>
801061e8: 85 c0 test %eax,%eax
801061ea: 0f 85 e3 fe ff ff jne 801060d3 <trap+0xa3>
801061f0: e9 fb fe ff ff jmp 801060f0 <trap+0xc0>
801061f5: 8d 76 00 lea 0x0(%esi),%esi
if(myproc() && myproc()->state == RUNNING &&
801061f8: 83 7b 30 20 cmpl $0x20,0x30(%ebx)
801061fc: 0f 85 06 ff ff ff jne 80106108 <trap+0xd8>
yield();
80106202: e8 19 df ff ff call 80104120 <yield>
80106207: e9 fc fe ff ff jmp 80106108 <trap+0xd8>
8010620c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if(myproc()->killed)
80106210: e8 4b d8 ff ff call 80103a60 <myproc>
80106215: 8b 70 24 mov 0x24(%eax),%esi
80106218: 85 f6 test %esi,%esi
8010621a: 75 3c jne 80106258 <trap+0x228>
myproc()->tf = tf;
8010621c: e8 3f d8 ff ff call 80103a60 <myproc>
80106221: 89 58 18 mov %ebx,0x18(%eax)
syscall();
80106224: e8 47 ee ff ff call 80105070 <syscall>
if(myproc()->killed)
80106229: e8 32 d8 ff ff call 80103a60 <myproc>
8010622e: 8b 48 24 mov 0x24(%eax),%ecx
80106231: 85 c9 test %ecx,%ecx
80106233: 0f 84 f5 fe ff ff je 8010612e <trap+0xfe>
80106239: 8d 65 f4 lea -0xc(%ebp),%esp
8010623c: 5b pop %ebx
8010623d: 5e pop %esi
8010623e: 5f pop %edi
8010623f: 5d pop %ebp
exit();
80106240: e9 1b dd ff ff jmp 80103f60 <exit>
80106245: 8d 76 00 lea 0x0(%esi),%esi
exit();
80106248: e8 13 dd ff ff call 80103f60 <exit>
8010624d: e9 9e fe ff ff jmp 801060f0 <trap+0xc0>
80106252: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
exit();
80106258: e8 03 dd ff ff call 80103f60 <exit>
8010625d: eb bd jmp 8010621c <trap+0x1ec>
8010625f: 0f 20 d6 mov %cr2,%esi
cprintf("unexpected trap %d from cpu %d eip %x (cr2=0x%x)\n",
80106262: e8 d9 d7 ff ff call 80103a40 <cpuid>
80106267: 83 ec 0c sub $0xc,%esp
8010626a: 56 push %esi
8010626b: 57 push %edi
8010626c: 50 push %eax
8010626d: ff 73 30 pushl 0x30(%ebx)
80106270: 68 b4 80 10 80 push $0x801080b4
80106275: e8 36 a4 ff ff call 801006b0 <cprintf>
panic("trap");
8010627a: 83 c4 14 add $0x14,%esp
8010627d: 68 8a 80 10 80 push $0x8010808a
80106282: e8 09 a1 ff ff call 80100390 <panic>
80106287: 66 90 xchg %ax,%ax
80106289: 66 90 xchg %ax,%ax
8010628b: 66 90 xchg %ax,%ax
8010628d: 66 90 xchg %ax,%ax
8010628f: 90 nop
80106290 <uartgetc>:
outb(COM1+0, c);
}
static int
uartgetc(void)
{
80106290: f3 0f 1e fb endbr32
if(!uart)
80106294: a1 bc b5 10 80 mov 0x8010b5bc,%eax
80106299: 85 c0 test %eax,%eax
8010629b: 74 1b je 801062b8 <uartgetc+0x28>
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
8010629d: ba fd 03 00 00 mov $0x3fd,%edx
801062a2: ec in (%dx),%al
return -1;
if(!(inb(COM1+5) & 0x01))
801062a3: a8 01 test $0x1,%al
801062a5: 74 11 je 801062b8 <uartgetc+0x28>
801062a7: ba f8 03 00 00 mov $0x3f8,%edx
801062ac: ec in (%dx),%al
return -1;
return inb(COM1+0);
801062ad: 0f b6 c0 movzbl %al,%eax
801062b0: c3 ret
801062b1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
return -1;
801062b8: b8 ff ff ff ff mov $0xffffffff,%eax
}
801062bd: c3 ret
801062be: 66 90 xchg %ax,%ax
801062c0 <uartputc.part.0>:
uartputc(int c)
801062c0: 55 push %ebp
801062c1: 89 e5 mov %esp,%ebp
801062c3: 57 push %edi
801062c4: 89 c7 mov %eax,%edi
801062c6: 56 push %esi
801062c7: be fd 03 00 00 mov $0x3fd,%esi
801062cc: 53 push %ebx
801062cd: bb 80 00 00 00 mov $0x80,%ebx
801062d2: 83 ec 0c sub $0xc,%esp
801062d5: eb 1b jmp 801062f2 <uartputc.part.0+0x32>
801062d7: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801062de: 66 90 xchg %ax,%ax
microdelay(10);
801062e0: 83 ec 0c sub $0xc,%esp
801062e3: 6a 0a push $0xa
801062e5: e8 f6 c5 ff ff call 801028e0 <microdelay>
for(i = 0; i < 128 && !(inb(COM1+5) & 0x20); i++)
801062ea: 83 c4 10 add $0x10,%esp
801062ed: 83 eb 01 sub $0x1,%ebx
801062f0: 74 07 je 801062f9 <uartputc.part.0+0x39>
801062f2: 89 f2 mov %esi,%edx
801062f4: ec in (%dx),%al
801062f5: a8 20 test $0x20,%al
801062f7: 74 e7 je 801062e0 <uartputc.part.0+0x20>
asm volatile("out %0,%1" : : "a" (data), "d" (port));
801062f9: ba f8 03 00 00 mov $0x3f8,%edx
801062fe: 89 f8 mov %edi,%eax
80106300: ee out %al,(%dx)
}
80106301: 8d 65 f4 lea -0xc(%ebp),%esp
80106304: 5b pop %ebx
80106305: 5e pop %esi
80106306: 5f pop %edi
80106307: 5d pop %ebp
80106308: c3 ret
80106309: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80106310 <uartinit>:
{
80106310: f3 0f 1e fb endbr32
80106314: 55 push %ebp
80106315: 31 c9 xor %ecx,%ecx
80106317: 89 c8 mov %ecx,%eax
80106319: 89 e5 mov %esp,%ebp
8010631b: 57 push %edi
8010631c: 56 push %esi
8010631d: 53 push %ebx
8010631e: bb fa 03 00 00 mov $0x3fa,%ebx
80106323: 89 da mov %ebx,%edx
80106325: 83 ec 0c sub $0xc,%esp
80106328: ee out %al,(%dx)
80106329: bf fb 03 00 00 mov $0x3fb,%edi
8010632e: b8 80 ff ff ff mov $0xffffff80,%eax
80106333: 89 fa mov %edi,%edx
80106335: ee out %al,(%dx)
80106336: b8 0c 00 00 00 mov $0xc,%eax
8010633b: ba f8 03 00 00 mov $0x3f8,%edx
80106340: ee out %al,(%dx)
80106341: be f9 03 00 00 mov $0x3f9,%esi
80106346: 89 c8 mov %ecx,%eax
80106348: 89 f2 mov %esi,%edx
8010634a: ee out %al,(%dx)
8010634b: b8 03 00 00 00 mov $0x3,%eax
80106350: 89 fa mov %edi,%edx
80106352: ee out %al,(%dx)
80106353: ba fc 03 00 00 mov $0x3fc,%edx
80106358: 89 c8 mov %ecx,%eax
8010635a: ee out %al,(%dx)
8010635b: b8 01 00 00 00 mov $0x1,%eax
80106360: 89 f2 mov %esi,%edx
80106362: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80106363: ba fd 03 00 00 mov $0x3fd,%edx
80106368: ec in (%dx),%al
if(inb(COM1+5) == 0xFF)
80106369: 3c ff cmp $0xff,%al
8010636b: 74 52 je 801063bf <uartinit+0xaf>
uart = 1;
8010636d: c7 05 bc b5 10 80 01 movl $0x1,0x8010b5bc
80106374: 00 00 00
80106377: 89 da mov %ebx,%edx
80106379: ec in (%dx),%al
8010637a: ba f8 03 00 00 mov $0x3f8,%edx
8010637f: ec in (%dx),%al
ioapicenable(IRQ_COM1, 0);
80106380: 83 ec 08 sub $0x8,%esp
80106383: be 76 00 00 00 mov $0x76,%esi
for(p="xv6...\n"; *p; p++)
80106388: bb ac 81 10 80 mov $0x801081ac,%ebx
ioapicenable(IRQ_COM1, 0);
8010638d: 6a 00 push $0x0
8010638f: 6a 04 push $0x4
80106391: e8 9a c0 ff ff call 80102430 <ioapicenable>
80106396: 83 c4 10 add $0x10,%esp
for(p="xv6...\n"; *p; p++)
80106399: b8 78 00 00 00 mov $0x78,%eax
8010639e: eb 04 jmp 801063a4 <uartinit+0x94>
801063a0: 0f b6 73 01 movzbl 0x1(%ebx),%esi
if(!uart)
801063a4: 8b 15 bc b5 10 80 mov 0x8010b5bc,%edx
801063aa: 85 d2 test %edx,%edx
801063ac: 74 08 je 801063b6 <uartinit+0xa6>
uartputc(*p);
801063ae: 0f be c0 movsbl %al,%eax
801063b1: e8 0a ff ff ff call 801062c0 <uartputc.part.0>
for(p="xv6...\n"; *p; p++)
801063b6: 89 f0 mov %esi,%eax
801063b8: 83 c3 01 add $0x1,%ebx
801063bb: 84 c0 test %al,%al
801063bd: 75 e1 jne 801063a0 <uartinit+0x90>
}
801063bf: 8d 65 f4 lea -0xc(%ebp),%esp
801063c2: 5b pop %ebx
801063c3: 5e pop %esi
801063c4: 5f pop %edi
801063c5: 5d pop %ebp
801063c6: c3 ret
801063c7: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801063ce: 66 90 xchg %ax,%ax
801063d0 <uartputc>:
{
801063d0: f3 0f 1e fb endbr32
801063d4: 55 push %ebp
if(!uart)
801063d5: 8b 15 bc b5 10 80 mov 0x8010b5bc,%edx
{
801063db: 89 e5 mov %esp,%ebp
801063dd: 8b 45 08 mov 0x8(%ebp),%eax
if(!uart)
801063e0: 85 d2 test %edx,%edx
801063e2: 74 0c je 801063f0 <uartputc+0x20>
}
801063e4: 5d pop %ebp
801063e5: e9 d6 fe ff ff jmp 801062c0 <uartputc.part.0>
801063ea: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801063f0: 5d pop %ebp
801063f1: c3 ret
801063f2: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801063f9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80106400 <uartintr>:
void
uartintr(void)
{
80106400: f3 0f 1e fb endbr32
80106404: 55 push %ebp
80106405: 89 e5 mov %esp,%ebp
80106407: 83 ec 14 sub $0x14,%esp
consoleintr(uartgetc);
8010640a: 68 90 62 10 80 push $0x80106290
8010640f: e8 4c a4 ff ff call 80100860 <consoleintr>
}
80106414: 83 c4 10 add $0x10,%esp
80106417: c9 leave
80106418: c3 ret
80106419 <vector0>:
# generated by vectors.pl - do not edit
# handlers
.globl alltraps
.globl vector0
vector0:
pushl $0
80106419: 6a 00 push $0x0
pushl $0
8010641b: 6a 00 push $0x0
jmp alltraps
8010641d: e9 37 fb ff ff jmp 80105f59 <alltraps>
80106422 <vector1>:
.globl vector1
vector1:
pushl $0
80106422: 6a 00 push $0x0
pushl $1
80106424: 6a 01 push $0x1
jmp alltraps
80106426: e9 2e fb ff ff jmp 80105f59 <alltraps>
8010642b <vector2>:
.globl vector2
vector2:
pushl $0
8010642b: 6a 00 push $0x0
pushl $2
8010642d: 6a 02 push $0x2
jmp alltraps
8010642f: e9 25 fb ff ff jmp 80105f59 <alltraps>
80106434 <vector3>:
.globl vector3
vector3:
pushl $0
80106434: 6a 00 push $0x0
pushl $3
80106436: 6a 03 push $0x3
jmp alltraps
80106438: e9 1c fb ff ff jmp 80105f59 <alltraps>
8010643d <vector4>:
.globl vector4
vector4:
pushl $0
8010643d: 6a 00 push $0x0
pushl $4
8010643f: 6a 04 push $0x4
jmp alltraps
80106441: e9 13 fb ff ff jmp 80105f59 <alltraps>
80106446 <vector5>:
.globl vector5
vector5:
pushl $0
80106446: 6a 00 push $0x0
pushl $5
80106448: 6a 05 push $0x5
jmp alltraps
8010644a: e9 0a fb ff ff jmp 80105f59 <alltraps>
8010644f <vector6>:
.globl vector6
vector6:
pushl $0
8010644f: 6a 00 push $0x0
pushl $6
80106451: 6a 06 push $0x6
jmp alltraps
80106453: e9 01 fb ff ff jmp 80105f59 <alltraps>
80106458 <vector7>:
.globl vector7
vector7:
pushl $0
80106458: 6a 00 push $0x0
pushl $7
8010645a: 6a 07 push $0x7
jmp alltraps
8010645c: e9 f8 fa ff ff jmp 80105f59 <alltraps>
80106461 <vector8>:
.globl vector8
vector8:
pushl $8
80106461: 6a 08 push $0x8
jmp alltraps
80106463: e9 f1 fa ff ff jmp 80105f59 <alltraps>
80106468 <vector9>:
.globl vector9
vector9:
pushl $0
80106468: 6a 00 push $0x0
pushl $9
8010646a: 6a 09 push $0x9
jmp alltraps
8010646c: e9 e8 fa ff ff jmp 80105f59 <alltraps>
80106471 <vector10>:
.globl vector10
vector10:
pushl $10
80106471: 6a 0a push $0xa
jmp alltraps
80106473: e9 e1 fa ff ff jmp 80105f59 <alltraps>
80106478 <vector11>:
.globl vector11
vector11:
pushl $11
80106478: 6a 0b push $0xb
jmp alltraps
8010647a: e9 da fa ff ff jmp 80105f59 <alltraps>
8010647f <vector12>:
.globl vector12
vector12:
pushl $12
8010647f: 6a 0c push $0xc
jmp alltraps
80106481: e9 d3 fa ff ff jmp 80105f59 <alltraps>
80106486 <vector13>:
.globl vector13
vector13:
pushl $13
80106486: 6a 0d push $0xd
jmp alltraps
80106488: e9 cc fa ff ff jmp 80105f59 <alltraps>
8010648d <vector14>:
.globl vector14
vector14:
pushl $14
8010648d: 6a 0e push $0xe
jmp alltraps
8010648f: e9 c5 fa ff ff jmp 80105f59 <alltraps>
80106494 <vector15>:
.globl vector15
vector15:
pushl $0
80106494: 6a 00 push $0x0
pushl $15
80106496: 6a 0f push $0xf
jmp alltraps
80106498: e9 bc fa ff ff jmp 80105f59 <alltraps>
8010649d <vector16>:
.globl vector16
vector16:
pushl $0
8010649d: 6a 00 push $0x0
pushl $16
8010649f: 6a 10 push $0x10
jmp alltraps
801064a1: e9 b3 fa ff ff jmp 80105f59 <alltraps>
801064a6 <vector17>:
.globl vector17
vector17:
pushl $17
801064a6: 6a 11 push $0x11
jmp alltraps
801064a8: e9 ac fa ff ff jmp 80105f59 <alltraps>
801064ad <vector18>:
.globl vector18
vector18:
pushl $0
801064ad: 6a 00 push $0x0
pushl $18
801064af: 6a 12 push $0x12
jmp alltraps
801064b1: e9 a3 fa ff ff jmp 80105f59 <alltraps>
801064b6 <vector19>:
.globl vector19
vector19:
pushl $0
801064b6: 6a 00 push $0x0
pushl $19
801064b8: 6a 13 push $0x13
jmp alltraps
801064ba: e9 9a fa ff ff jmp 80105f59 <alltraps>
801064bf <vector20>:
.globl vector20
vector20:
pushl $0
801064bf: 6a 00 push $0x0
pushl $20
801064c1: 6a 14 push $0x14
jmp alltraps
801064c3: e9 91 fa ff ff jmp 80105f59 <alltraps>
801064c8 <vector21>:
.globl vector21
vector21:
pushl $0
801064c8: 6a 00 push $0x0
pushl $21
801064ca: 6a 15 push $0x15
jmp alltraps
801064cc: e9 88 fa ff ff jmp 80105f59 <alltraps>
801064d1 <vector22>:
.globl vector22
vector22:
pushl $0
801064d1: 6a 00 push $0x0
pushl $22
801064d3: 6a 16 push $0x16
jmp alltraps
801064d5: e9 7f fa ff ff jmp 80105f59 <alltraps>
801064da <vector23>:
.globl vector23
vector23:
pushl $0
801064da: 6a 00 push $0x0
pushl $23
801064dc: 6a 17 push $0x17
jmp alltraps
801064de: e9 76 fa ff ff jmp 80105f59 <alltraps>
801064e3 <vector24>:
.globl vector24
vector24:
pushl $0
801064e3: 6a 00 push $0x0
pushl $24
801064e5: 6a 18 push $0x18
jmp alltraps
801064e7: e9 6d fa ff ff jmp 80105f59 <alltraps>
801064ec <vector25>:
.globl vector25
vector25:
pushl $0
801064ec: 6a 00 push $0x0
pushl $25
801064ee: 6a 19 push $0x19
jmp alltraps
801064f0: e9 64 fa ff ff jmp 80105f59 <alltraps>
801064f5 <vector26>:
.globl vector26
vector26:
pushl $0
801064f5: 6a 00 push $0x0
pushl $26
801064f7: 6a 1a push $0x1a
jmp alltraps
801064f9: e9 5b fa ff ff jmp 80105f59 <alltraps>
801064fe <vector27>:
.globl vector27
vector27:
pushl $0
801064fe: 6a 00 push $0x0
pushl $27
80106500: 6a 1b push $0x1b
jmp alltraps
80106502: e9 52 fa ff ff jmp 80105f59 <alltraps>
80106507 <vector28>:
.globl vector28
vector28:
pushl $0
80106507: 6a 00 push $0x0
pushl $28
80106509: 6a 1c push $0x1c
jmp alltraps
8010650b: e9 49 fa ff ff jmp 80105f59 <alltraps>
80106510 <vector29>:
.globl vector29
vector29:
pushl $0
80106510: 6a 00 push $0x0
pushl $29
80106512: 6a 1d push $0x1d
jmp alltraps
80106514: e9 40 fa ff ff jmp 80105f59 <alltraps>
80106519 <vector30>:
.globl vector30
vector30:
pushl $0
80106519: 6a 00 push $0x0
pushl $30
8010651b: 6a 1e push $0x1e
jmp alltraps
8010651d: e9 37 fa ff ff jmp 80105f59 <alltraps>
80106522 <vector31>:
.globl vector31
vector31:
pushl $0
80106522: 6a 00 push $0x0
pushl $31
80106524: 6a 1f push $0x1f
jmp alltraps
80106526: e9 2e fa ff ff jmp 80105f59 <alltraps>
8010652b <vector32>:
.globl vector32
vector32:
pushl $0
8010652b: 6a 00 push $0x0
pushl $32
8010652d: 6a 20 push $0x20
jmp alltraps
8010652f: e9 25 fa ff ff jmp 80105f59 <alltraps>
80106534 <vector33>:
.globl vector33
vector33:
pushl $0
80106534: 6a 00 push $0x0
pushl $33
80106536: 6a 21 push $0x21
jmp alltraps
80106538: e9 1c fa ff ff jmp 80105f59 <alltraps>
8010653d <vector34>:
.globl vector34
vector34:
pushl $0
8010653d: 6a 00 push $0x0
pushl $34
8010653f: 6a 22 push $0x22
jmp alltraps
80106541: e9 13 fa ff ff jmp 80105f59 <alltraps>
80106546 <vector35>:
.globl vector35
vector35:
pushl $0
80106546: 6a 00 push $0x0
pushl $35
80106548: 6a 23 push $0x23
jmp alltraps
8010654a: e9 0a fa ff ff jmp 80105f59 <alltraps>
8010654f <vector36>:
.globl vector36
vector36:
pushl $0
8010654f: 6a 00 push $0x0
pushl $36
80106551: 6a 24 push $0x24
jmp alltraps
80106553: e9 01 fa ff ff jmp 80105f59 <alltraps>
80106558 <vector37>:
.globl vector37
vector37:
pushl $0
80106558: 6a 00 push $0x0
pushl $37
8010655a: 6a 25 push $0x25
jmp alltraps
8010655c: e9 f8 f9 ff ff jmp 80105f59 <alltraps>
80106561 <vector38>:
.globl vector38
vector38:
pushl $0
80106561: 6a 00 push $0x0
pushl $38
80106563: 6a 26 push $0x26
jmp alltraps
80106565: e9 ef f9 ff ff jmp 80105f59 <alltraps>
8010656a <vector39>:
.globl vector39
vector39:
pushl $0
8010656a: 6a 00 push $0x0
pushl $39
8010656c: 6a 27 push $0x27
jmp alltraps
8010656e: e9 e6 f9 ff ff jmp 80105f59 <alltraps>
80106573 <vector40>:
.globl vector40
vector40:
pushl $0
80106573: 6a 00 push $0x0
pushl $40
80106575: 6a 28 push $0x28
jmp alltraps
80106577: e9 dd f9 ff ff jmp 80105f59 <alltraps>
8010657c <vector41>:
.globl vector41
vector41:
pushl $0
8010657c: 6a 00 push $0x0
pushl $41
8010657e: 6a 29 push $0x29
jmp alltraps
80106580: e9 d4 f9 ff ff jmp 80105f59 <alltraps>
80106585 <vector42>:
.globl vector42
vector42:
pushl $0
80106585: 6a 00 push $0x0
pushl $42
80106587: 6a 2a push $0x2a
jmp alltraps
80106589: e9 cb f9 ff ff jmp 80105f59 <alltraps>
8010658e <vector43>:
.globl vector43
vector43:
pushl $0
8010658e: 6a 00 push $0x0
pushl $43
80106590: 6a 2b push $0x2b
jmp alltraps
80106592: e9 c2 f9 ff ff jmp 80105f59 <alltraps>
80106597 <vector44>:
.globl vector44
vector44:
pushl $0
80106597: 6a 00 push $0x0
pushl $44
80106599: 6a 2c push $0x2c
jmp alltraps
8010659b: e9 b9 f9 ff ff jmp 80105f59 <alltraps>
801065a0 <vector45>:
.globl vector45
vector45:
pushl $0
801065a0: 6a 00 push $0x0
pushl $45
801065a2: 6a 2d push $0x2d
jmp alltraps
801065a4: e9 b0 f9 ff ff jmp 80105f59 <alltraps>
801065a9 <vector46>:
.globl vector46
vector46:
pushl $0
801065a9: 6a 00 push $0x0
pushl $46
801065ab: 6a 2e push $0x2e
jmp alltraps
801065ad: e9 a7 f9 ff ff jmp 80105f59 <alltraps>
801065b2 <vector47>:
.globl vector47
vector47:
pushl $0
801065b2: 6a 00 push $0x0
pushl $47
801065b4: 6a 2f push $0x2f
jmp alltraps
801065b6: e9 9e f9 ff ff jmp 80105f59 <alltraps>
801065bb <vector48>:
.globl vector48
vector48:
pushl $0
801065bb: 6a 00 push $0x0
pushl $48
801065bd: 6a 30 push $0x30
jmp alltraps
801065bf: e9 95 f9 ff ff jmp 80105f59 <alltraps>
801065c4 <vector49>:
.globl vector49
vector49:
pushl $0
801065c4: 6a 00 push $0x0
pushl $49
801065c6: 6a 31 push $0x31
jmp alltraps
801065c8: e9 8c f9 ff ff jmp 80105f59 <alltraps>
801065cd <vector50>:
.globl vector50
vector50:
pushl $0
801065cd: 6a 00 push $0x0
pushl $50
801065cf: 6a 32 push $0x32
jmp alltraps
801065d1: e9 83 f9 ff ff jmp 80105f59 <alltraps>
801065d6 <vector51>:
.globl vector51
vector51:
pushl $0
801065d6: 6a 00 push $0x0
pushl $51
801065d8: 6a 33 push $0x33
jmp alltraps
801065da: e9 7a f9 ff ff jmp 80105f59 <alltraps>
801065df <vector52>:
.globl vector52
vector52:
pushl $0
801065df: 6a 00 push $0x0
pushl $52
801065e1: 6a 34 push $0x34
jmp alltraps
801065e3: e9 71 f9 ff ff jmp 80105f59 <alltraps>
801065e8 <vector53>:
.globl vector53
vector53:
pushl $0
801065e8: 6a 00 push $0x0
pushl $53
801065ea: 6a 35 push $0x35
jmp alltraps
801065ec: e9 68 f9 ff ff jmp 80105f59 <alltraps>
801065f1 <vector54>:
.globl vector54
vector54:
pushl $0
801065f1: 6a 00 push $0x0
pushl $54
801065f3: 6a 36 push $0x36
jmp alltraps
801065f5: e9 5f f9 ff ff jmp 80105f59 <alltraps>
801065fa <vector55>:
.globl vector55
vector55:
pushl $0
801065fa: 6a 00 push $0x0
pushl $55
801065fc: 6a 37 push $0x37
jmp alltraps
801065fe: e9 56 f9 ff ff jmp 80105f59 <alltraps>
80106603 <vector56>:
.globl vector56
vector56:
pushl $0
80106603: 6a 00 push $0x0
pushl $56
80106605: 6a 38 push $0x38
jmp alltraps
80106607: e9 4d f9 ff ff jmp 80105f59 <alltraps>
8010660c <vector57>:
.globl vector57
vector57:
pushl $0
8010660c: 6a 00 push $0x0
pushl $57
8010660e: 6a 39 push $0x39
jmp alltraps
80106610: e9 44 f9 ff ff jmp 80105f59 <alltraps>
80106615 <vector58>:
.globl vector58
vector58:
pushl $0
80106615: 6a 00 push $0x0
pushl $58
80106617: 6a 3a push $0x3a
jmp alltraps
80106619: e9 3b f9 ff ff jmp 80105f59 <alltraps>
8010661e <vector59>:
.globl vector59
vector59:
pushl $0
8010661e: 6a 00 push $0x0
pushl $59
80106620: 6a 3b push $0x3b
jmp alltraps
80106622: e9 32 f9 ff ff jmp 80105f59 <alltraps>
80106627 <vector60>:
.globl vector60
vector60:
pushl $0
80106627: 6a 00 push $0x0
pushl $60
80106629: 6a 3c push $0x3c
jmp alltraps
8010662b: e9 29 f9 ff ff jmp 80105f59 <alltraps>
80106630 <vector61>:
.globl vector61
vector61:
pushl $0
80106630: 6a 00 push $0x0
pushl $61
80106632: 6a 3d push $0x3d
jmp alltraps
80106634: e9 20 f9 ff ff jmp 80105f59 <alltraps>
80106639 <vector62>:
.globl vector62
vector62:
pushl $0
80106639: 6a 00 push $0x0
pushl $62
8010663b: 6a 3e push $0x3e
jmp alltraps
8010663d: e9 17 f9 ff ff jmp 80105f59 <alltraps>
80106642 <vector63>:
.globl vector63
vector63:
pushl $0
80106642: 6a 00 push $0x0
pushl $63
80106644: 6a 3f push $0x3f
jmp alltraps
80106646: e9 0e f9 ff ff jmp 80105f59 <alltraps>
8010664b <vector64>:
.globl vector64
vector64:
pushl $0
8010664b: 6a 00 push $0x0
pushl $64
8010664d: 6a 40 push $0x40
jmp alltraps
8010664f: e9 05 f9 ff ff jmp 80105f59 <alltraps>
80106654 <vector65>:
.globl vector65
vector65:
pushl $0
80106654: 6a 00 push $0x0
pushl $65
80106656: 6a 41 push $0x41
jmp alltraps
80106658: e9 fc f8 ff ff jmp 80105f59 <alltraps>
8010665d <vector66>:
.globl vector66
vector66:
pushl $0
8010665d: 6a 00 push $0x0
pushl $66
8010665f: 6a 42 push $0x42
jmp alltraps
80106661: e9 f3 f8 ff ff jmp 80105f59 <alltraps>
80106666 <vector67>:
.globl vector67
vector67:
pushl $0
80106666: 6a 00 push $0x0
pushl $67
80106668: 6a 43 push $0x43
jmp alltraps
8010666a: e9 ea f8 ff ff jmp 80105f59 <alltraps>
8010666f <vector68>:
.globl vector68
vector68:
pushl $0
8010666f: 6a 00 push $0x0
pushl $68
80106671: 6a 44 push $0x44
jmp alltraps
80106673: e9 e1 f8 ff ff jmp 80105f59 <alltraps>
80106678 <vector69>:
.globl vector69
vector69:
pushl $0
80106678: 6a 00 push $0x0
pushl $69
8010667a: 6a 45 push $0x45
jmp alltraps
8010667c: e9 d8 f8 ff ff jmp 80105f59 <alltraps>
80106681 <vector70>:
.globl vector70
vector70:
pushl $0
80106681: 6a 00 push $0x0
pushl $70
80106683: 6a 46 push $0x46
jmp alltraps
80106685: e9 cf f8 ff ff jmp 80105f59 <alltraps>
8010668a <vector71>:
.globl vector71
vector71:
pushl $0
8010668a: 6a 00 push $0x0
pushl $71
8010668c: 6a 47 push $0x47
jmp alltraps
8010668e: e9 c6 f8 ff ff jmp 80105f59 <alltraps>
80106693 <vector72>:
.globl vector72
vector72:
pushl $0
80106693: 6a 00 push $0x0
pushl $72
80106695: 6a 48 push $0x48
jmp alltraps
80106697: e9 bd f8 ff ff jmp 80105f59 <alltraps>
8010669c <vector73>:
.globl vector73
vector73:
pushl $0
8010669c: 6a 00 push $0x0
pushl $73
8010669e: 6a 49 push $0x49
jmp alltraps
801066a0: e9 b4 f8 ff ff jmp 80105f59 <alltraps>
801066a5 <vector74>:
.globl vector74
vector74:
pushl $0
801066a5: 6a 00 push $0x0
pushl $74
801066a7: 6a 4a push $0x4a
jmp alltraps
801066a9: e9 ab f8 ff ff jmp 80105f59 <alltraps>
801066ae <vector75>:
.globl vector75
vector75:
pushl $0
801066ae: 6a 00 push $0x0
pushl $75
801066b0: 6a 4b push $0x4b
jmp alltraps
801066b2: e9 a2 f8 ff ff jmp 80105f59 <alltraps>
801066b7 <vector76>:
.globl vector76
vector76:
pushl $0
801066b7: 6a 00 push $0x0
pushl $76
801066b9: 6a 4c push $0x4c
jmp alltraps
801066bb: e9 99 f8 ff ff jmp 80105f59 <alltraps>
801066c0 <vector77>:
.globl vector77
vector77:
pushl $0
801066c0: 6a 00 push $0x0
pushl $77
801066c2: 6a 4d push $0x4d
jmp alltraps
801066c4: e9 90 f8 ff ff jmp 80105f59 <alltraps>
801066c9 <vector78>:
.globl vector78
vector78:
pushl $0
801066c9: 6a 00 push $0x0
pushl $78
801066cb: 6a 4e push $0x4e
jmp alltraps
801066cd: e9 87 f8 ff ff jmp 80105f59 <alltraps>
801066d2 <vector79>:
.globl vector79
vector79:
pushl $0
801066d2: 6a 00 push $0x0
pushl $79
801066d4: 6a 4f push $0x4f
jmp alltraps
801066d6: e9 7e f8 ff ff jmp 80105f59 <alltraps>
801066db <vector80>:
.globl vector80
vector80:
pushl $0
801066db: 6a 00 push $0x0
pushl $80
801066dd: 6a 50 push $0x50
jmp alltraps
801066df: e9 75 f8 ff ff jmp 80105f59 <alltraps>
801066e4 <vector81>:
.globl vector81
vector81:
pushl $0
801066e4: 6a 00 push $0x0
pushl $81
801066e6: 6a 51 push $0x51
jmp alltraps
801066e8: e9 6c f8 ff ff jmp 80105f59 <alltraps>
801066ed <vector82>:
.globl vector82
vector82:
pushl $0
801066ed: 6a 00 push $0x0
pushl $82
801066ef: 6a 52 push $0x52
jmp alltraps
801066f1: e9 63 f8 ff ff jmp 80105f59 <alltraps>
801066f6 <vector83>:
.globl vector83
vector83:
pushl $0
801066f6: 6a 00 push $0x0
pushl $83
801066f8: 6a 53 push $0x53
jmp alltraps
801066fa: e9 5a f8 ff ff jmp 80105f59 <alltraps>
801066ff <vector84>:
.globl vector84
vector84:
pushl $0
801066ff: 6a 00 push $0x0
pushl $84
80106701: 6a 54 push $0x54
jmp alltraps
80106703: e9 51 f8 ff ff jmp 80105f59 <alltraps>
80106708 <vector85>:
.globl vector85
vector85:
pushl $0
80106708: 6a 00 push $0x0
pushl $85
8010670a: 6a 55 push $0x55
jmp alltraps
8010670c: e9 48 f8 ff ff jmp 80105f59 <alltraps>
80106711 <vector86>:
.globl vector86
vector86:
pushl $0
80106711: 6a 00 push $0x0
pushl $86
80106713: 6a 56 push $0x56
jmp alltraps
80106715: e9 3f f8 ff ff jmp 80105f59 <alltraps>
8010671a <vector87>:
.globl vector87
vector87:
pushl $0
8010671a: 6a 00 push $0x0
pushl $87
8010671c: 6a 57 push $0x57
jmp alltraps
8010671e: e9 36 f8 ff ff jmp 80105f59 <alltraps>
80106723 <vector88>:
.globl vector88
vector88:
pushl $0
80106723: 6a 00 push $0x0
pushl $88
80106725: 6a 58 push $0x58
jmp alltraps
80106727: e9 2d f8 ff ff jmp 80105f59 <alltraps>
8010672c <vector89>:
.globl vector89
vector89:
pushl $0
8010672c: 6a 00 push $0x0
pushl $89
8010672e: 6a 59 push $0x59
jmp alltraps
80106730: e9 24 f8 ff ff jmp 80105f59 <alltraps>
80106735 <vector90>:
.globl vector90
vector90:
pushl $0
80106735: 6a 00 push $0x0
pushl $90
80106737: 6a 5a push $0x5a
jmp alltraps
80106739: e9 1b f8 ff ff jmp 80105f59 <alltraps>
8010673e <vector91>:
.globl vector91
vector91:
pushl $0
8010673e: 6a 00 push $0x0
pushl $91
80106740: 6a 5b push $0x5b
jmp alltraps
80106742: e9 12 f8 ff ff jmp 80105f59 <alltraps>
80106747 <vector92>:
.globl vector92
vector92:
pushl $0
80106747: 6a 00 push $0x0
pushl $92
80106749: 6a 5c push $0x5c
jmp alltraps
8010674b: e9 09 f8 ff ff jmp 80105f59 <alltraps>
80106750 <vector93>:
.globl vector93
vector93:
pushl $0
80106750: 6a 00 push $0x0
pushl $93
80106752: 6a 5d push $0x5d
jmp alltraps
80106754: e9 00 f8 ff ff jmp 80105f59 <alltraps>
80106759 <vector94>:
.globl vector94
vector94:
pushl $0
80106759: 6a 00 push $0x0
pushl $94
8010675b: 6a 5e push $0x5e
jmp alltraps
8010675d: e9 f7 f7 ff ff jmp 80105f59 <alltraps>
80106762 <vector95>:
.globl vector95
vector95:
pushl $0
80106762: 6a 00 push $0x0
pushl $95
80106764: 6a 5f push $0x5f
jmp alltraps
80106766: e9 ee f7 ff ff jmp 80105f59 <alltraps>
8010676b <vector96>:
.globl vector96
vector96:
pushl $0
8010676b: 6a 00 push $0x0
pushl $96
8010676d: 6a 60 push $0x60
jmp alltraps
8010676f: e9 e5 f7 ff ff jmp 80105f59 <alltraps>
80106774 <vector97>:
.globl vector97
vector97:
pushl $0
80106774: 6a 00 push $0x0
pushl $97
80106776: 6a 61 push $0x61
jmp alltraps
80106778: e9 dc f7 ff ff jmp 80105f59 <alltraps>
8010677d <vector98>:
.globl vector98
vector98:
pushl $0
8010677d: 6a 00 push $0x0
pushl $98
8010677f: 6a 62 push $0x62
jmp alltraps
80106781: e9 d3 f7 ff ff jmp 80105f59 <alltraps>
80106786 <vector99>:
.globl vector99
vector99:
pushl $0
80106786: 6a 00 push $0x0
pushl $99
80106788: 6a 63 push $0x63
jmp alltraps
8010678a: e9 ca f7 ff ff jmp 80105f59 <alltraps>
8010678f <vector100>:
.globl vector100
vector100:
pushl $0
8010678f: 6a 00 push $0x0
pushl $100
80106791: 6a 64 push $0x64
jmp alltraps
80106793: e9 c1 f7 ff ff jmp 80105f59 <alltraps>
80106798 <vector101>:
.globl vector101
vector101:
pushl $0
80106798: 6a 00 push $0x0
pushl $101
8010679a: 6a 65 push $0x65
jmp alltraps
8010679c: e9 b8 f7 ff ff jmp 80105f59 <alltraps>
801067a1 <vector102>:
.globl vector102
vector102:
pushl $0
801067a1: 6a 00 push $0x0
pushl $102
801067a3: 6a 66 push $0x66
jmp alltraps
801067a5: e9 af f7 ff ff jmp 80105f59 <alltraps>
801067aa <vector103>:
.globl vector103
vector103:
pushl $0
801067aa: 6a 00 push $0x0
pushl $103
801067ac: 6a 67 push $0x67
jmp alltraps
801067ae: e9 a6 f7 ff ff jmp 80105f59 <alltraps>
801067b3 <vector104>:
.globl vector104
vector104:
pushl $0
801067b3: 6a 00 push $0x0
pushl $104
801067b5: 6a 68 push $0x68
jmp alltraps
801067b7: e9 9d f7 ff ff jmp 80105f59 <alltraps>
801067bc <vector105>:
.globl vector105
vector105:
pushl $0
801067bc: 6a 00 push $0x0
pushl $105
801067be: 6a 69 push $0x69
jmp alltraps
801067c0: e9 94 f7 ff ff jmp 80105f59 <alltraps>
801067c5 <vector106>:
.globl vector106
vector106:
pushl $0
801067c5: 6a 00 push $0x0
pushl $106
801067c7: 6a 6a push $0x6a
jmp alltraps
801067c9: e9 8b f7 ff ff jmp 80105f59 <alltraps>
801067ce <vector107>:
.globl vector107
vector107:
pushl $0
801067ce: 6a 00 push $0x0
pushl $107
801067d0: 6a 6b push $0x6b
jmp alltraps
801067d2: e9 82 f7 ff ff jmp 80105f59 <alltraps>
801067d7 <vector108>:
.globl vector108
vector108:
pushl $0
801067d7: 6a 00 push $0x0
pushl $108
801067d9: 6a 6c push $0x6c
jmp alltraps
801067db: e9 79 f7 ff ff jmp 80105f59 <alltraps>
801067e0 <vector109>:
.globl vector109
vector109:
pushl $0
801067e0: 6a 00 push $0x0
pushl $109
801067e2: 6a 6d push $0x6d
jmp alltraps
801067e4: e9 70 f7 ff ff jmp 80105f59 <alltraps>
801067e9 <vector110>:
.globl vector110
vector110:
pushl $0
801067e9: 6a 00 push $0x0
pushl $110
801067eb: 6a 6e push $0x6e
jmp alltraps
801067ed: e9 67 f7 ff ff jmp 80105f59 <alltraps>
801067f2 <vector111>:
.globl vector111
vector111:
pushl $0
801067f2: 6a 00 push $0x0
pushl $111
801067f4: 6a 6f push $0x6f
jmp alltraps
801067f6: e9 5e f7 ff ff jmp 80105f59 <alltraps>
801067fb <vector112>:
.globl vector112
vector112:
pushl $0
801067fb: 6a 00 push $0x0
pushl $112
801067fd: 6a 70 push $0x70
jmp alltraps
801067ff: e9 55 f7 ff ff jmp 80105f59 <alltraps>
80106804 <vector113>:
.globl vector113
vector113:
pushl $0
80106804: 6a 00 push $0x0
pushl $113
80106806: 6a 71 push $0x71
jmp alltraps
80106808: e9 4c f7 ff ff jmp 80105f59 <alltraps>
8010680d <vector114>:
.globl vector114
vector114:
pushl $0
8010680d: 6a 00 push $0x0
pushl $114
8010680f: 6a 72 push $0x72
jmp alltraps
80106811: e9 43 f7 ff ff jmp 80105f59 <alltraps>
80106816 <vector115>:
.globl vector115
vector115:
pushl $0
80106816: 6a 00 push $0x0
pushl $115
80106818: 6a 73 push $0x73
jmp alltraps
8010681a: e9 3a f7 ff ff jmp 80105f59 <alltraps>
8010681f <vector116>:
.globl vector116
vector116:
pushl $0
8010681f: 6a 00 push $0x0
pushl $116
80106821: 6a 74 push $0x74
jmp alltraps
80106823: e9 31 f7 ff ff jmp 80105f59 <alltraps>
80106828 <vector117>:
.globl vector117
vector117:
pushl $0
80106828: 6a 00 push $0x0
pushl $117
8010682a: 6a 75 push $0x75
jmp alltraps
8010682c: e9 28 f7 ff ff jmp 80105f59 <alltraps>
80106831 <vector118>:
.globl vector118
vector118:
pushl $0
80106831: 6a 00 push $0x0
pushl $118
80106833: 6a 76 push $0x76
jmp alltraps
80106835: e9 1f f7 ff ff jmp 80105f59 <alltraps>
8010683a <vector119>:
.globl vector119
vector119:
pushl $0
8010683a: 6a 00 push $0x0
pushl $119
8010683c: 6a 77 push $0x77
jmp alltraps
8010683e: e9 16 f7 ff ff jmp 80105f59 <alltraps>
80106843 <vector120>:
.globl vector120
vector120:
pushl $0
80106843: 6a 00 push $0x0
pushl $120
80106845: 6a 78 push $0x78
jmp alltraps
80106847: e9 0d f7 ff ff jmp 80105f59 <alltraps>
8010684c <vector121>:
.globl vector121
vector121:
pushl $0
8010684c: 6a 00 push $0x0
pushl $121
8010684e: 6a 79 push $0x79
jmp alltraps
80106850: e9 04 f7 ff ff jmp 80105f59 <alltraps>
80106855 <vector122>:
.globl vector122
vector122:
pushl $0
80106855: 6a 00 push $0x0
pushl $122
80106857: 6a 7a push $0x7a
jmp alltraps
80106859: e9 fb f6 ff ff jmp 80105f59 <alltraps>
8010685e <vector123>:
.globl vector123
vector123:
pushl $0
8010685e: 6a 00 push $0x0
pushl $123
80106860: 6a 7b push $0x7b
jmp alltraps
80106862: e9 f2 f6 ff ff jmp 80105f59 <alltraps>
80106867 <vector124>:
.globl vector124
vector124:
pushl $0
80106867: 6a 00 push $0x0
pushl $124
80106869: 6a 7c push $0x7c
jmp alltraps
8010686b: e9 e9 f6 ff ff jmp 80105f59 <alltraps>
80106870 <vector125>:
.globl vector125
vector125:
pushl $0
80106870: 6a 00 push $0x0
pushl $125
80106872: 6a 7d push $0x7d
jmp alltraps
80106874: e9 e0 f6 ff ff jmp 80105f59 <alltraps>
80106879 <vector126>:
.globl vector126
vector126:
pushl $0
80106879: 6a 00 push $0x0
pushl $126
8010687b: 6a 7e push $0x7e
jmp alltraps
8010687d: e9 d7 f6 ff ff jmp 80105f59 <alltraps>
80106882 <vector127>:
.globl vector127
vector127:
pushl $0
80106882: 6a 00 push $0x0
pushl $127
80106884: 6a 7f push $0x7f
jmp alltraps
80106886: e9 ce f6 ff ff jmp 80105f59 <alltraps>
8010688b <vector128>:
.globl vector128
vector128:
pushl $0
8010688b: 6a 00 push $0x0
pushl $128
8010688d: 68 80 00 00 00 push $0x80
jmp alltraps
80106892: e9 c2 f6 ff ff jmp 80105f59 <alltraps>
80106897 <vector129>:
.globl vector129
vector129:
pushl $0
80106897: 6a 00 push $0x0
pushl $129
80106899: 68 81 00 00 00 push $0x81
jmp alltraps
8010689e: e9 b6 f6 ff ff jmp 80105f59 <alltraps>
801068a3 <vector130>:
.globl vector130
vector130:
pushl $0
801068a3: 6a 00 push $0x0
pushl $130
801068a5: 68 82 00 00 00 push $0x82
jmp alltraps
801068aa: e9 aa f6 ff ff jmp 80105f59 <alltraps>
801068af <vector131>:
.globl vector131
vector131:
pushl $0
801068af: 6a 00 push $0x0
pushl $131
801068b1: 68 83 00 00 00 push $0x83
jmp alltraps
801068b6: e9 9e f6 ff ff jmp 80105f59 <alltraps>
801068bb <vector132>:
.globl vector132
vector132:
pushl $0
801068bb: 6a 00 push $0x0
pushl $132
801068bd: 68 84 00 00 00 push $0x84
jmp alltraps
801068c2: e9 92 f6 ff ff jmp 80105f59 <alltraps>
801068c7 <vector133>:
.globl vector133
vector133:
pushl $0
801068c7: 6a 00 push $0x0
pushl $133
801068c9: 68 85 00 00 00 push $0x85
jmp alltraps
801068ce: e9 86 f6 ff ff jmp 80105f59 <alltraps>
801068d3 <vector134>:
.globl vector134
vector134:
pushl $0
801068d3: 6a 00 push $0x0
pushl $134
801068d5: 68 86 00 00 00 push $0x86
jmp alltraps
801068da: e9 7a f6 ff ff jmp 80105f59 <alltraps>
801068df <vector135>:
.globl vector135
vector135:
pushl $0
801068df: 6a 00 push $0x0
pushl $135
801068e1: 68 87 00 00 00 push $0x87
jmp alltraps
801068e6: e9 6e f6 ff ff jmp 80105f59 <alltraps>
801068eb <vector136>:
.globl vector136
vector136:
pushl $0
801068eb: 6a 00 push $0x0
pushl $136
801068ed: 68 88 00 00 00 push $0x88
jmp alltraps
801068f2: e9 62 f6 ff ff jmp 80105f59 <alltraps>
801068f7 <vector137>:
.globl vector137
vector137:
pushl $0
801068f7: 6a 00 push $0x0
pushl $137
801068f9: 68 89 00 00 00 push $0x89
jmp alltraps
801068fe: e9 56 f6 ff ff jmp 80105f59 <alltraps>
80106903 <vector138>:
.globl vector138
vector138:
pushl $0
80106903: 6a 00 push $0x0
pushl $138
80106905: 68 8a 00 00 00 push $0x8a
jmp alltraps
8010690a: e9 4a f6 ff ff jmp 80105f59 <alltraps>
8010690f <vector139>:
.globl vector139
vector139:
pushl $0
8010690f: 6a 00 push $0x0
pushl $139
80106911: 68 8b 00 00 00 push $0x8b
jmp alltraps
80106916: e9 3e f6 ff ff jmp 80105f59 <alltraps>
8010691b <vector140>:
.globl vector140
vector140:
pushl $0
8010691b: 6a 00 push $0x0
pushl $140
8010691d: 68 8c 00 00 00 push $0x8c
jmp alltraps
80106922: e9 32 f6 ff ff jmp 80105f59 <alltraps>
80106927 <vector141>:
.globl vector141
vector141:
pushl $0
80106927: 6a 00 push $0x0
pushl $141
80106929: 68 8d 00 00 00 push $0x8d
jmp alltraps
8010692e: e9 26 f6 ff ff jmp 80105f59 <alltraps>
80106933 <vector142>:
.globl vector142
vector142:
pushl $0
80106933: 6a 00 push $0x0
pushl $142
80106935: 68 8e 00 00 00 push $0x8e
jmp alltraps
8010693a: e9 1a f6 ff ff jmp 80105f59 <alltraps>
8010693f <vector143>:
.globl vector143
vector143:
pushl $0
8010693f: 6a 00 push $0x0
pushl $143
80106941: 68 8f 00 00 00 push $0x8f
jmp alltraps
80106946: e9 0e f6 ff ff jmp 80105f59 <alltraps>
8010694b <vector144>:
.globl vector144
vector144:
pushl $0
8010694b: 6a 00 push $0x0
pushl $144
8010694d: 68 90 00 00 00 push $0x90
jmp alltraps
80106952: e9 02 f6 ff ff jmp 80105f59 <alltraps>
80106957 <vector145>:
.globl vector145
vector145:
pushl $0
80106957: 6a 00 push $0x0
pushl $145
80106959: 68 91 00 00 00 push $0x91
jmp alltraps
8010695e: e9 f6 f5 ff ff jmp 80105f59 <alltraps>
80106963 <vector146>:
.globl vector146
vector146:
pushl $0
80106963: 6a 00 push $0x0
pushl $146
80106965: 68 92 00 00 00 push $0x92
jmp alltraps
8010696a: e9 ea f5 ff ff jmp 80105f59 <alltraps>
8010696f <vector147>:
.globl vector147
vector147:
pushl $0
8010696f: 6a 00 push $0x0
pushl $147
80106971: 68 93 00 00 00 push $0x93
jmp alltraps
80106976: e9 de f5 ff ff jmp 80105f59 <alltraps>
8010697b <vector148>:
.globl vector148
vector148:
pushl $0
8010697b: 6a 00 push $0x0
pushl $148
8010697d: 68 94 00 00 00 push $0x94
jmp alltraps
80106982: e9 d2 f5 ff ff jmp 80105f59 <alltraps>
80106987 <vector149>:
.globl vector149
vector149:
pushl $0
80106987: 6a 00 push $0x0
pushl $149
80106989: 68 95 00 00 00 push $0x95
jmp alltraps
8010698e: e9 c6 f5 ff ff jmp 80105f59 <alltraps>
80106993 <vector150>:
.globl vector150
vector150:
pushl $0
80106993: 6a 00 push $0x0
pushl $150
80106995: 68 96 00 00 00 push $0x96
jmp alltraps
8010699a: e9 ba f5 ff ff jmp 80105f59 <alltraps>
8010699f <vector151>:
.globl vector151
vector151:
pushl $0
8010699f: 6a 00 push $0x0
pushl $151
801069a1: 68 97 00 00 00 push $0x97
jmp alltraps
801069a6: e9 ae f5 ff ff jmp 80105f59 <alltraps>
801069ab <vector152>:
.globl vector152
vector152:
pushl $0
801069ab: 6a 00 push $0x0
pushl $152
801069ad: 68 98 00 00 00 push $0x98
jmp alltraps
801069b2: e9 a2 f5 ff ff jmp 80105f59 <alltraps>
801069b7 <vector153>:
.globl vector153
vector153:
pushl $0
801069b7: 6a 00 push $0x0
pushl $153
801069b9: 68 99 00 00 00 push $0x99
jmp alltraps
801069be: e9 96 f5 ff ff jmp 80105f59 <alltraps>
801069c3 <vector154>:
.globl vector154
vector154:
pushl $0
801069c3: 6a 00 push $0x0
pushl $154
801069c5: 68 9a 00 00 00 push $0x9a
jmp alltraps
801069ca: e9 8a f5 ff ff jmp 80105f59 <alltraps>
801069cf <vector155>:
.globl vector155
vector155:
pushl $0
801069cf: 6a 00 push $0x0
pushl $155
801069d1: 68 9b 00 00 00 push $0x9b
jmp alltraps
801069d6: e9 7e f5 ff ff jmp 80105f59 <alltraps>
801069db <vector156>:
.globl vector156
vector156:
pushl $0
801069db: 6a 00 push $0x0
pushl $156
801069dd: 68 9c 00 00 00 push $0x9c
jmp alltraps
801069e2: e9 72 f5 ff ff jmp 80105f59 <alltraps>
801069e7 <vector157>:
.globl vector157
vector157:
pushl $0
801069e7: 6a 00 push $0x0
pushl $157
801069e9: 68 9d 00 00 00 push $0x9d
jmp alltraps
801069ee: e9 66 f5 ff ff jmp 80105f59 <alltraps>
801069f3 <vector158>:
.globl vector158
vector158:
pushl $0
801069f3: 6a 00 push $0x0
pushl $158
801069f5: 68 9e 00 00 00 push $0x9e
jmp alltraps
801069fa: e9 5a f5 ff ff jmp 80105f59 <alltraps>
801069ff <vector159>:
.globl vector159
vector159:
pushl $0
801069ff: 6a 00 push $0x0
pushl $159
80106a01: 68 9f 00 00 00 push $0x9f
jmp alltraps
80106a06: e9 4e f5 ff ff jmp 80105f59 <alltraps>
80106a0b <vector160>:
.globl vector160
vector160:
pushl $0
80106a0b: 6a 00 push $0x0
pushl $160
80106a0d: 68 a0 00 00 00 push $0xa0
jmp alltraps
80106a12: e9 42 f5 ff ff jmp 80105f59 <alltraps>
80106a17 <vector161>:
.globl vector161
vector161:
pushl $0
80106a17: 6a 00 push $0x0
pushl $161
80106a19: 68 a1 00 00 00 push $0xa1
jmp alltraps
80106a1e: e9 36 f5 ff ff jmp 80105f59 <alltraps>
80106a23 <vector162>:
.globl vector162
vector162:
pushl $0
80106a23: 6a 00 push $0x0
pushl $162
80106a25: 68 a2 00 00 00 push $0xa2
jmp alltraps
80106a2a: e9 2a f5 ff ff jmp 80105f59 <alltraps>
80106a2f <vector163>:
.globl vector163
vector163:
pushl $0
80106a2f: 6a 00 push $0x0
pushl $163
80106a31: 68 a3 00 00 00 push $0xa3
jmp alltraps
80106a36: e9 1e f5 ff ff jmp 80105f59 <alltraps>
80106a3b <vector164>:
.globl vector164
vector164:
pushl $0
80106a3b: 6a 00 push $0x0
pushl $164
80106a3d: 68 a4 00 00 00 push $0xa4
jmp alltraps
80106a42: e9 12 f5 ff ff jmp 80105f59 <alltraps>
80106a47 <vector165>:
.globl vector165
vector165:
pushl $0
80106a47: 6a 00 push $0x0
pushl $165
80106a49: 68 a5 00 00 00 push $0xa5
jmp alltraps
80106a4e: e9 06 f5 ff ff jmp 80105f59 <alltraps>
80106a53 <vector166>:
.globl vector166
vector166:
pushl $0
80106a53: 6a 00 push $0x0
pushl $166
80106a55: 68 a6 00 00 00 push $0xa6
jmp alltraps
80106a5a: e9 fa f4 ff ff jmp 80105f59 <alltraps>
80106a5f <vector167>:
.globl vector167
vector167:
pushl $0
80106a5f: 6a 00 push $0x0
pushl $167
80106a61: 68 a7 00 00 00 push $0xa7
jmp alltraps
80106a66: e9 ee f4 ff ff jmp 80105f59 <alltraps>
80106a6b <vector168>:
.globl vector168
vector168:
pushl $0
80106a6b: 6a 00 push $0x0
pushl $168
80106a6d: 68 a8 00 00 00 push $0xa8
jmp alltraps
80106a72: e9 e2 f4 ff ff jmp 80105f59 <alltraps>
80106a77 <vector169>:
.globl vector169
vector169:
pushl $0
80106a77: 6a 00 push $0x0
pushl $169
80106a79: 68 a9 00 00 00 push $0xa9
jmp alltraps
80106a7e: e9 d6 f4 ff ff jmp 80105f59 <alltraps>
80106a83 <vector170>:
.globl vector170
vector170:
pushl $0
80106a83: 6a 00 push $0x0
pushl $170
80106a85: 68 aa 00 00 00 push $0xaa
jmp alltraps
80106a8a: e9 ca f4 ff ff jmp 80105f59 <alltraps>
80106a8f <vector171>:
.globl vector171
vector171:
pushl $0
80106a8f: 6a 00 push $0x0
pushl $171
80106a91: 68 ab 00 00 00 push $0xab
jmp alltraps
80106a96: e9 be f4 ff ff jmp 80105f59 <alltraps>
80106a9b <vector172>:
.globl vector172
vector172:
pushl $0
80106a9b: 6a 00 push $0x0
pushl $172
80106a9d: 68 ac 00 00 00 push $0xac
jmp alltraps
80106aa2: e9 b2 f4 ff ff jmp 80105f59 <alltraps>
80106aa7 <vector173>:
.globl vector173
vector173:
pushl $0
80106aa7: 6a 00 push $0x0
pushl $173
80106aa9: 68 ad 00 00 00 push $0xad
jmp alltraps
80106aae: e9 a6 f4 ff ff jmp 80105f59 <alltraps>
80106ab3 <vector174>:
.globl vector174
vector174:
pushl $0
80106ab3: 6a 00 push $0x0
pushl $174
80106ab5: 68 ae 00 00 00 push $0xae
jmp alltraps
80106aba: e9 9a f4 ff ff jmp 80105f59 <alltraps>
80106abf <vector175>:
.globl vector175
vector175:
pushl $0
80106abf: 6a 00 push $0x0
pushl $175
80106ac1: 68 af 00 00 00 push $0xaf
jmp alltraps
80106ac6: e9 8e f4 ff ff jmp 80105f59 <alltraps>
80106acb <vector176>:
.globl vector176
vector176:
pushl $0
80106acb: 6a 00 push $0x0
pushl $176
80106acd: 68 b0 00 00 00 push $0xb0
jmp alltraps
80106ad2: e9 82 f4 ff ff jmp 80105f59 <alltraps>
80106ad7 <vector177>:
.globl vector177
vector177:
pushl $0
80106ad7: 6a 00 push $0x0
pushl $177
80106ad9: 68 b1 00 00 00 push $0xb1
jmp alltraps
80106ade: e9 76 f4 ff ff jmp 80105f59 <alltraps>
80106ae3 <vector178>:
.globl vector178
vector178:
pushl $0
80106ae3: 6a 00 push $0x0
pushl $178
80106ae5: 68 b2 00 00 00 push $0xb2
jmp alltraps
80106aea: e9 6a f4 ff ff jmp 80105f59 <alltraps>
80106aef <vector179>:
.globl vector179
vector179:
pushl $0
80106aef: 6a 00 push $0x0
pushl $179
80106af1: 68 b3 00 00 00 push $0xb3
jmp alltraps
80106af6: e9 5e f4 ff ff jmp 80105f59 <alltraps>
80106afb <vector180>:
.globl vector180
vector180:
pushl $0
80106afb: 6a 00 push $0x0
pushl $180
80106afd: 68 b4 00 00 00 push $0xb4
jmp alltraps
80106b02: e9 52 f4 ff ff jmp 80105f59 <alltraps>
80106b07 <vector181>:
.globl vector181
vector181:
pushl $0
80106b07: 6a 00 push $0x0
pushl $181
80106b09: 68 b5 00 00 00 push $0xb5
jmp alltraps
80106b0e: e9 46 f4 ff ff jmp 80105f59 <alltraps>
80106b13 <vector182>:
.globl vector182
vector182:
pushl $0
80106b13: 6a 00 push $0x0
pushl $182
80106b15: 68 b6 00 00 00 push $0xb6
jmp alltraps
80106b1a: e9 3a f4 ff ff jmp 80105f59 <alltraps>
80106b1f <vector183>:
.globl vector183
vector183:
pushl $0
80106b1f: 6a 00 push $0x0
pushl $183
80106b21: 68 b7 00 00 00 push $0xb7
jmp alltraps
80106b26: e9 2e f4 ff ff jmp 80105f59 <alltraps>
80106b2b <vector184>:
.globl vector184
vector184:
pushl $0
80106b2b: 6a 00 push $0x0
pushl $184
80106b2d: 68 b8 00 00 00 push $0xb8
jmp alltraps
80106b32: e9 22 f4 ff ff jmp 80105f59 <alltraps>
80106b37 <vector185>:
.globl vector185
vector185:
pushl $0
80106b37: 6a 00 push $0x0
pushl $185
80106b39: 68 b9 00 00 00 push $0xb9
jmp alltraps
80106b3e: e9 16 f4 ff ff jmp 80105f59 <alltraps>
80106b43 <vector186>:
.globl vector186
vector186:
pushl $0
80106b43: 6a 00 push $0x0
pushl $186
80106b45: 68 ba 00 00 00 push $0xba
jmp alltraps
80106b4a: e9 0a f4 ff ff jmp 80105f59 <alltraps>
80106b4f <vector187>:
.globl vector187
vector187:
pushl $0
80106b4f: 6a 00 push $0x0
pushl $187
80106b51: 68 bb 00 00 00 push $0xbb
jmp alltraps
80106b56: e9 fe f3 ff ff jmp 80105f59 <alltraps>
80106b5b <vector188>:
.globl vector188
vector188:
pushl $0
80106b5b: 6a 00 push $0x0
pushl $188
80106b5d: 68 bc 00 00 00 push $0xbc
jmp alltraps
80106b62: e9 f2 f3 ff ff jmp 80105f59 <alltraps>
80106b67 <vector189>:
.globl vector189
vector189:
pushl $0
80106b67: 6a 00 push $0x0
pushl $189
80106b69: 68 bd 00 00 00 push $0xbd
jmp alltraps
80106b6e: e9 e6 f3 ff ff jmp 80105f59 <alltraps>
80106b73 <vector190>:
.globl vector190
vector190:
pushl $0
80106b73: 6a 00 push $0x0
pushl $190
80106b75: 68 be 00 00 00 push $0xbe
jmp alltraps
80106b7a: e9 da f3 ff ff jmp 80105f59 <alltraps>
80106b7f <vector191>:
.globl vector191
vector191:
pushl $0
80106b7f: 6a 00 push $0x0
pushl $191
80106b81: 68 bf 00 00 00 push $0xbf
jmp alltraps
80106b86: e9 ce f3 ff ff jmp 80105f59 <alltraps>
80106b8b <vector192>:
.globl vector192
vector192:
pushl $0
80106b8b: 6a 00 push $0x0
pushl $192
80106b8d: 68 c0 00 00 00 push $0xc0
jmp alltraps
80106b92: e9 c2 f3 ff ff jmp 80105f59 <alltraps>
80106b97 <vector193>:
.globl vector193
vector193:
pushl $0
80106b97: 6a 00 push $0x0
pushl $193
80106b99: 68 c1 00 00 00 push $0xc1
jmp alltraps
80106b9e: e9 b6 f3 ff ff jmp 80105f59 <alltraps>
80106ba3 <vector194>:
.globl vector194
vector194:
pushl $0
80106ba3: 6a 00 push $0x0
pushl $194
80106ba5: 68 c2 00 00 00 push $0xc2
jmp alltraps
80106baa: e9 aa f3 ff ff jmp 80105f59 <alltraps>
80106baf <vector195>:
.globl vector195
vector195:
pushl $0
80106baf: 6a 00 push $0x0
pushl $195
80106bb1: 68 c3 00 00 00 push $0xc3
jmp alltraps
80106bb6: e9 9e f3 ff ff jmp 80105f59 <alltraps>
80106bbb <vector196>:
.globl vector196
vector196:
pushl $0
80106bbb: 6a 00 push $0x0
pushl $196
80106bbd: 68 c4 00 00 00 push $0xc4
jmp alltraps
80106bc2: e9 92 f3 ff ff jmp 80105f59 <alltraps>
80106bc7 <vector197>:
.globl vector197
vector197:
pushl $0
80106bc7: 6a 00 push $0x0
pushl $197
80106bc9: 68 c5 00 00 00 push $0xc5
jmp alltraps
80106bce: e9 86 f3 ff ff jmp 80105f59 <alltraps>
80106bd3 <vector198>:
.globl vector198
vector198:
pushl $0
80106bd3: 6a 00 push $0x0
pushl $198
80106bd5: 68 c6 00 00 00 push $0xc6
jmp alltraps
80106bda: e9 7a f3 ff ff jmp 80105f59 <alltraps>
80106bdf <vector199>:
.globl vector199
vector199:
pushl $0
80106bdf: 6a 00 push $0x0
pushl $199
80106be1: 68 c7 00 00 00 push $0xc7
jmp alltraps
80106be6: e9 6e f3 ff ff jmp 80105f59 <alltraps>
80106beb <vector200>:
.globl vector200
vector200:
pushl $0
80106beb: 6a 00 push $0x0
pushl $200
80106bed: 68 c8 00 00 00 push $0xc8
jmp alltraps
80106bf2: e9 62 f3 ff ff jmp 80105f59 <alltraps>
80106bf7 <vector201>:
.globl vector201
vector201:
pushl $0
80106bf7: 6a 00 push $0x0
pushl $201
80106bf9: 68 c9 00 00 00 push $0xc9
jmp alltraps
80106bfe: e9 56 f3 ff ff jmp 80105f59 <alltraps>
80106c03 <vector202>:
.globl vector202
vector202:
pushl $0
80106c03: 6a 00 push $0x0
pushl $202
80106c05: 68 ca 00 00 00 push $0xca
jmp alltraps
80106c0a: e9 4a f3 ff ff jmp 80105f59 <alltraps>
80106c0f <vector203>:
.globl vector203
vector203:
pushl $0
80106c0f: 6a 00 push $0x0
pushl $203
80106c11: 68 cb 00 00 00 push $0xcb
jmp alltraps
80106c16: e9 3e f3 ff ff jmp 80105f59 <alltraps>
80106c1b <vector204>:
.globl vector204
vector204:
pushl $0
80106c1b: 6a 00 push $0x0
pushl $204
80106c1d: 68 cc 00 00 00 push $0xcc
jmp alltraps
80106c22: e9 32 f3 ff ff jmp 80105f59 <alltraps>
80106c27 <vector205>:
.globl vector205
vector205:
pushl $0
80106c27: 6a 00 push $0x0
pushl $205
80106c29: 68 cd 00 00 00 push $0xcd
jmp alltraps
80106c2e: e9 26 f3 ff ff jmp 80105f59 <alltraps>
80106c33 <vector206>:
.globl vector206
vector206:
pushl $0
80106c33: 6a 00 push $0x0
pushl $206
80106c35: 68 ce 00 00 00 push $0xce
jmp alltraps
80106c3a: e9 1a f3 ff ff jmp 80105f59 <alltraps>
80106c3f <vector207>:
.globl vector207
vector207:
pushl $0
80106c3f: 6a 00 push $0x0
pushl $207
80106c41: 68 cf 00 00 00 push $0xcf
jmp alltraps
80106c46: e9 0e f3 ff ff jmp 80105f59 <alltraps>
80106c4b <vector208>:
.globl vector208
vector208:
pushl $0
80106c4b: 6a 00 push $0x0
pushl $208
80106c4d: 68 d0 00 00 00 push $0xd0
jmp alltraps
80106c52: e9 02 f3 ff ff jmp 80105f59 <alltraps>
80106c57 <vector209>:
.globl vector209
vector209:
pushl $0
80106c57: 6a 00 push $0x0
pushl $209
80106c59: 68 d1 00 00 00 push $0xd1
jmp alltraps
80106c5e: e9 f6 f2 ff ff jmp 80105f59 <alltraps>
80106c63 <vector210>:
.globl vector210
vector210:
pushl $0
80106c63: 6a 00 push $0x0
pushl $210
80106c65: 68 d2 00 00 00 push $0xd2
jmp alltraps
80106c6a: e9 ea f2 ff ff jmp 80105f59 <alltraps>
80106c6f <vector211>:
.globl vector211
vector211:
pushl $0
80106c6f: 6a 00 push $0x0
pushl $211
80106c71: 68 d3 00 00 00 push $0xd3
jmp alltraps
80106c76: e9 de f2 ff ff jmp 80105f59 <alltraps>
80106c7b <vector212>:
.globl vector212
vector212:
pushl $0
80106c7b: 6a 00 push $0x0
pushl $212
80106c7d: 68 d4 00 00 00 push $0xd4
jmp alltraps
80106c82: e9 d2 f2 ff ff jmp 80105f59 <alltraps>
80106c87 <vector213>:
.globl vector213
vector213:
pushl $0
80106c87: 6a 00 push $0x0
pushl $213
80106c89: 68 d5 00 00 00 push $0xd5
jmp alltraps
80106c8e: e9 c6 f2 ff ff jmp 80105f59 <alltraps>
80106c93 <vector214>:
.globl vector214
vector214:
pushl $0
80106c93: 6a 00 push $0x0
pushl $214
80106c95: 68 d6 00 00 00 push $0xd6
jmp alltraps
80106c9a: e9 ba f2 ff ff jmp 80105f59 <alltraps>
80106c9f <vector215>:
.globl vector215
vector215:
pushl $0
80106c9f: 6a 00 push $0x0
pushl $215
80106ca1: 68 d7 00 00 00 push $0xd7
jmp alltraps
80106ca6: e9 ae f2 ff ff jmp 80105f59 <alltraps>
80106cab <vector216>:
.globl vector216
vector216:
pushl $0
80106cab: 6a 00 push $0x0
pushl $216
80106cad: 68 d8 00 00 00 push $0xd8
jmp alltraps
80106cb2: e9 a2 f2 ff ff jmp 80105f59 <alltraps>
80106cb7 <vector217>:
.globl vector217
vector217:
pushl $0
80106cb7: 6a 00 push $0x0
pushl $217
80106cb9: 68 d9 00 00 00 push $0xd9
jmp alltraps
80106cbe: e9 96 f2 ff ff jmp 80105f59 <alltraps>
80106cc3 <vector218>:
.globl vector218
vector218:
pushl $0
80106cc3: 6a 00 push $0x0
pushl $218
80106cc5: 68 da 00 00 00 push $0xda
jmp alltraps
80106cca: e9 8a f2 ff ff jmp 80105f59 <alltraps>
80106ccf <vector219>:
.globl vector219
vector219:
pushl $0
80106ccf: 6a 00 push $0x0
pushl $219
80106cd1: 68 db 00 00 00 push $0xdb
jmp alltraps
80106cd6: e9 7e f2 ff ff jmp 80105f59 <alltraps>
80106cdb <vector220>:
.globl vector220
vector220:
pushl $0
80106cdb: 6a 00 push $0x0
pushl $220
80106cdd: 68 dc 00 00 00 push $0xdc
jmp alltraps
80106ce2: e9 72 f2 ff ff jmp 80105f59 <alltraps>
80106ce7 <vector221>:
.globl vector221
vector221:
pushl $0
80106ce7: 6a 00 push $0x0
pushl $221
80106ce9: 68 dd 00 00 00 push $0xdd
jmp alltraps
80106cee: e9 66 f2 ff ff jmp 80105f59 <alltraps>
80106cf3 <vector222>:
.globl vector222
vector222:
pushl $0
80106cf3: 6a 00 push $0x0
pushl $222
80106cf5: 68 de 00 00 00 push $0xde
jmp alltraps
80106cfa: e9 5a f2 ff ff jmp 80105f59 <alltraps>
80106cff <vector223>:
.globl vector223
vector223:
pushl $0
80106cff: 6a 00 push $0x0
pushl $223
80106d01: 68 df 00 00 00 push $0xdf
jmp alltraps
80106d06: e9 4e f2 ff ff jmp 80105f59 <alltraps>
80106d0b <vector224>:
.globl vector224
vector224:
pushl $0
80106d0b: 6a 00 push $0x0
pushl $224
80106d0d: 68 e0 00 00 00 push $0xe0
jmp alltraps
80106d12: e9 42 f2 ff ff jmp 80105f59 <alltraps>
80106d17 <vector225>:
.globl vector225
vector225:
pushl $0
80106d17: 6a 00 push $0x0
pushl $225
80106d19: 68 e1 00 00 00 push $0xe1
jmp alltraps
80106d1e: e9 36 f2 ff ff jmp 80105f59 <alltraps>
80106d23 <vector226>:
.globl vector226
vector226:
pushl $0
80106d23: 6a 00 push $0x0
pushl $226
80106d25: 68 e2 00 00 00 push $0xe2
jmp alltraps
80106d2a: e9 2a f2 ff ff jmp 80105f59 <alltraps>
80106d2f <vector227>:
.globl vector227
vector227:
pushl $0
80106d2f: 6a 00 push $0x0
pushl $227
80106d31: 68 e3 00 00 00 push $0xe3
jmp alltraps
80106d36: e9 1e f2 ff ff jmp 80105f59 <alltraps>
80106d3b <vector228>:
.globl vector228
vector228:
pushl $0
80106d3b: 6a 00 push $0x0
pushl $228
80106d3d: 68 e4 00 00 00 push $0xe4
jmp alltraps
80106d42: e9 12 f2 ff ff jmp 80105f59 <alltraps>
80106d47 <vector229>:
.globl vector229
vector229:
pushl $0
80106d47: 6a 00 push $0x0
pushl $229
80106d49: 68 e5 00 00 00 push $0xe5
jmp alltraps
80106d4e: e9 06 f2 ff ff jmp 80105f59 <alltraps>
80106d53 <vector230>:
.globl vector230
vector230:
pushl $0
80106d53: 6a 00 push $0x0
pushl $230
80106d55: 68 e6 00 00 00 push $0xe6
jmp alltraps
80106d5a: e9 fa f1 ff ff jmp 80105f59 <alltraps>
80106d5f <vector231>:
.globl vector231
vector231:
pushl $0
80106d5f: 6a 00 push $0x0
pushl $231
80106d61: 68 e7 00 00 00 push $0xe7
jmp alltraps
80106d66: e9 ee f1 ff ff jmp 80105f59 <alltraps>
80106d6b <vector232>:
.globl vector232
vector232:
pushl $0
80106d6b: 6a 00 push $0x0
pushl $232
80106d6d: 68 e8 00 00 00 push $0xe8
jmp alltraps
80106d72: e9 e2 f1 ff ff jmp 80105f59 <alltraps>
80106d77 <vector233>:
.globl vector233
vector233:
pushl $0
80106d77: 6a 00 push $0x0
pushl $233
80106d79: 68 e9 00 00 00 push $0xe9
jmp alltraps
80106d7e: e9 d6 f1 ff ff jmp 80105f59 <alltraps>
80106d83 <vector234>:
.globl vector234
vector234:
pushl $0
80106d83: 6a 00 push $0x0
pushl $234
80106d85: 68 ea 00 00 00 push $0xea
jmp alltraps
80106d8a: e9 ca f1 ff ff jmp 80105f59 <alltraps>
80106d8f <vector235>:
.globl vector235
vector235:
pushl $0
80106d8f: 6a 00 push $0x0
pushl $235
80106d91: 68 eb 00 00 00 push $0xeb
jmp alltraps
80106d96: e9 be f1 ff ff jmp 80105f59 <alltraps>
80106d9b <vector236>:
.globl vector236
vector236:
pushl $0
80106d9b: 6a 00 push $0x0
pushl $236
80106d9d: 68 ec 00 00 00 push $0xec
jmp alltraps
80106da2: e9 b2 f1 ff ff jmp 80105f59 <alltraps>
80106da7 <vector237>:
.globl vector237
vector237:
pushl $0
80106da7: 6a 00 push $0x0
pushl $237
80106da9: 68 ed 00 00 00 push $0xed
jmp alltraps
80106dae: e9 a6 f1 ff ff jmp 80105f59 <alltraps>
80106db3 <vector238>:
.globl vector238
vector238:
pushl $0
80106db3: 6a 00 push $0x0
pushl $238
80106db5: 68 ee 00 00 00 push $0xee
jmp alltraps
80106dba: e9 9a f1 ff ff jmp 80105f59 <alltraps>
80106dbf <vector239>:
.globl vector239
vector239:
pushl $0
80106dbf: 6a 00 push $0x0
pushl $239
80106dc1: 68 ef 00 00 00 push $0xef
jmp alltraps
80106dc6: e9 8e f1 ff ff jmp 80105f59 <alltraps>
80106dcb <vector240>:
.globl vector240
vector240:
pushl $0
80106dcb: 6a 00 push $0x0
pushl $240
80106dcd: 68 f0 00 00 00 push $0xf0
jmp alltraps
80106dd2: e9 82 f1 ff ff jmp 80105f59 <alltraps>
80106dd7 <vector241>:
.globl vector241
vector241:
pushl $0
80106dd7: 6a 00 push $0x0
pushl $241
80106dd9: 68 f1 00 00 00 push $0xf1
jmp alltraps
80106dde: e9 76 f1 ff ff jmp 80105f59 <alltraps>
80106de3 <vector242>:
.globl vector242
vector242:
pushl $0
80106de3: 6a 00 push $0x0
pushl $242
80106de5: 68 f2 00 00 00 push $0xf2
jmp alltraps
80106dea: e9 6a f1 ff ff jmp 80105f59 <alltraps>
80106def <vector243>:
.globl vector243
vector243:
pushl $0
80106def: 6a 00 push $0x0
pushl $243
80106df1: 68 f3 00 00 00 push $0xf3
jmp alltraps
80106df6: e9 5e f1 ff ff jmp 80105f59 <alltraps>
80106dfb <vector244>:
.globl vector244
vector244:
pushl $0
80106dfb: 6a 00 push $0x0
pushl $244
80106dfd: 68 f4 00 00 00 push $0xf4
jmp alltraps
80106e02: e9 52 f1 ff ff jmp 80105f59 <alltraps>
80106e07 <vector245>:
.globl vector245
vector245:
pushl $0
80106e07: 6a 00 push $0x0
pushl $245
80106e09: 68 f5 00 00 00 push $0xf5
jmp alltraps
80106e0e: e9 46 f1 ff ff jmp 80105f59 <alltraps>
80106e13 <vector246>:
.globl vector246
vector246:
pushl $0
80106e13: 6a 00 push $0x0
pushl $246
80106e15: 68 f6 00 00 00 push $0xf6
jmp alltraps
80106e1a: e9 3a f1 ff ff jmp 80105f59 <alltraps>
80106e1f <vector247>:
.globl vector247
vector247:
pushl $0
80106e1f: 6a 00 push $0x0
pushl $247
80106e21: 68 f7 00 00 00 push $0xf7
jmp alltraps
80106e26: e9 2e f1 ff ff jmp 80105f59 <alltraps>
80106e2b <vector248>:
.globl vector248
vector248:
pushl $0
80106e2b: 6a 00 push $0x0
pushl $248
80106e2d: 68 f8 00 00 00 push $0xf8
jmp alltraps
80106e32: e9 22 f1 ff ff jmp 80105f59 <alltraps>
80106e37 <vector249>:
.globl vector249
vector249:
pushl $0
80106e37: 6a 00 push $0x0
pushl $249
80106e39: 68 f9 00 00 00 push $0xf9
jmp alltraps
80106e3e: e9 16 f1 ff ff jmp 80105f59 <alltraps>
80106e43 <vector250>:
.globl vector250
vector250:
pushl $0
80106e43: 6a 00 push $0x0
pushl $250
80106e45: 68 fa 00 00 00 push $0xfa
jmp alltraps
80106e4a: e9 0a f1 ff ff jmp 80105f59 <alltraps>
80106e4f <vector251>:
.globl vector251
vector251:
pushl $0
80106e4f: 6a 00 push $0x0
pushl $251
80106e51: 68 fb 00 00 00 push $0xfb
jmp alltraps
80106e56: e9 fe f0 ff ff jmp 80105f59 <alltraps>
80106e5b <vector252>:
.globl vector252
vector252:
pushl $0
80106e5b: 6a 00 push $0x0
pushl $252
80106e5d: 68 fc 00 00 00 push $0xfc
jmp alltraps
80106e62: e9 f2 f0 ff ff jmp 80105f59 <alltraps>
80106e67 <vector253>:
.globl vector253
vector253:
pushl $0
80106e67: 6a 00 push $0x0
pushl $253
80106e69: 68 fd 00 00 00 push $0xfd
jmp alltraps
80106e6e: e9 e6 f0 ff ff jmp 80105f59 <alltraps>
80106e73 <vector254>:
.globl vector254
vector254:
pushl $0
80106e73: 6a 00 push $0x0
pushl $254
80106e75: 68 fe 00 00 00 push $0xfe
jmp alltraps
80106e7a: e9 da f0 ff ff jmp 80105f59 <alltraps>
80106e7f <vector255>:
.globl vector255
vector255:
pushl $0
80106e7f: 6a 00 push $0x0
pushl $255
80106e81: 68 ff 00 00 00 push $0xff
jmp alltraps
80106e86: e9 ce f0 ff ff jmp 80105f59 <alltraps>
80106e8b: 66 90 xchg %ax,%ax
80106e8d: 66 90 xchg %ax,%ax
80106e8f: 90 nop
80106e90 <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)
{
80106e90: 55 push %ebp
80106e91: 89 e5 mov %esp,%ebp
80106e93: 57 push %edi
80106e94: 56 push %esi
80106e95: 89 d6 mov %edx,%esi
pde_t *pde;
pte_t *pgtab;
pde = &pgdir[PDX(va)];
80106e97: c1 ea 16 shr $0x16,%edx
{
80106e9a: 53 push %ebx
pde = &pgdir[PDX(va)];
80106e9b: 8d 3c 90 lea (%eax,%edx,4),%edi
{
80106e9e: 83 ec 0c sub $0xc,%esp
if(*pde & PTE_P){
80106ea1: 8b 1f mov (%edi),%ebx
80106ea3: f6 c3 01 test $0x1,%bl
80106ea6: 74 28 je 80106ed0 <walkpgdir+0x40>
pgtab = (pte_t*)P2V(PTE_ADDR(*pde));
80106ea8: 81 e3 00 f0 ff ff and $0xfffff000,%ebx
80106eae: 81 c3 00 00 00 80 add $0x80000000,%ebx
// The permissions here are overly generous, but they can
// be further restricted by the permissions in the page table
// entries, if necessary.
*pde = V2P(pgtab) | PTE_P | PTE_W | PTE_U;
}
return &pgtab[PTX(va)];
80106eb4: 89 f0 mov %esi,%eax
}
80106eb6: 8d 65 f4 lea -0xc(%ebp),%esp
return &pgtab[PTX(va)];
80106eb9: c1 e8 0a shr $0xa,%eax
80106ebc: 25 fc 0f 00 00 and $0xffc,%eax
80106ec1: 01 d8 add %ebx,%eax
}
80106ec3: 5b pop %ebx
80106ec4: 5e pop %esi
80106ec5: 5f pop %edi
80106ec6: 5d pop %ebp
80106ec7: c3 ret
80106ec8: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80106ecf: 90 nop
if(!alloc || (pgtab = (pte_t*)kalloc()) == 0)
80106ed0: 85 c9 test %ecx,%ecx
80106ed2: 74 2c je 80106f00 <walkpgdir+0x70>
80106ed4: e8 57 b7 ff ff call 80102630 <kalloc>
80106ed9: 89 c3 mov %eax,%ebx
80106edb: 85 c0 test %eax,%eax
80106edd: 74 21 je 80106f00 <walkpgdir+0x70>
memset(pgtab, 0, PGSIZE);
80106edf: 83 ec 04 sub $0x4,%esp
80106ee2: 68 00 10 00 00 push $0x1000
80106ee7: 6a 00 push $0x0
80106ee9: 50 push %eax
80106eea: e8 b1 dd ff ff call 80104ca0 <memset>
*pde = V2P(pgtab) | PTE_P | PTE_W | PTE_U;
80106eef: 8d 83 00 00 00 80 lea -0x80000000(%ebx),%eax
80106ef5: 83 c4 10 add $0x10,%esp
80106ef8: 83 c8 07 or $0x7,%eax
80106efb: 89 07 mov %eax,(%edi)
80106efd: eb b5 jmp 80106eb4 <walkpgdir+0x24>
80106eff: 90 nop
}
80106f00: 8d 65 f4 lea -0xc(%ebp),%esp
return 0;
80106f03: 31 c0 xor %eax,%eax
}
80106f05: 5b pop %ebx
80106f06: 5e pop %esi
80106f07: 5f pop %edi
80106f08: 5d pop %ebp
80106f09: c3 ret
80106f0a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80106f10 <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)
{
80106f10: 55 push %ebp
80106f11: 89 e5 mov %esp,%ebp
80106f13: 57 push %edi
80106f14: 89 c7 mov %eax,%edi
char *a, *last;
pte_t *pte;
a = (char*)PGROUNDDOWN((uint)va);
last = (char*)PGROUNDDOWN(((uint)va) + size - 1);
80106f16: 8d 44 0a ff lea -0x1(%edx,%ecx,1),%eax
{
80106f1a: 56 push %esi
last = (char*)PGROUNDDOWN(((uint)va) + size - 1);
80106f1b: 25 00 f0 ff ff and $0xfffff000,%eax
a = (char*)PGROUNDDOWN((uint)va);
80106f20: 89 d6 mov %edx,%esi
{
80106f22: 53 push %ebx
a = (char*)PGROUNDDOWN((uint)va);
80106f23: 81 e6 00 f0 ff ff and $0xfffff000,%esi
{
80106f29: 83 ec 1c sub $0x1c,%esp
last = (char*)PGROUNDDOWN(((uint)va) + size - 1);
80106f2c: 89 45 e0 mov %eax,-0x20(%ebp)
80106f2f: 8b 45 08 mov 0x8(%ebp),%eax
80106f32: 29 f0 sub %esi,%eax
80106f34: 89 45 e4 mov %eax,-0x1c(%ebp)
80106f37: eb 1f jmp 80106f58 <mappages+0x48>
80106f39: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
for(;;){
if((pte = walkpgdir(pgdir, a, 1)) == 0)
return -1;
if(*pte & PTE_P)
80106f40: f6 00 01 testb $0x1,(%eax)
80106f43: 75 45 jne 80106f8a <mappages+0x7a>
panic("remap");
*pte = pa | perm | PTE_P;
80106f45: 0b 5d 0c or 0xc(%ebp),%ebx
80106f48: 83 cb 01 or $0x1,%ebx
80106f4b: 89 18 mov %ebx,(%eax)
if(a == last)
80106f4d: 3b 75 e0 cmp -0x20(%ebp),%esi
80106f50: 74 2e je 80106f80 <mappages+0x70>
break;
a += PGSIZE;
80106f52: 81 c6 00 10 00 00 add $0x1000,%esi
for(;;){
80106f58: 8b 45 e4 mov -0x1c(%ebp),%eax
if((pte = walkpgdir(pgdir, a, 1)) == 0)
80106f5b: b9 01 00 00 00 mov $0x1,%ecx
80106f60: 89 f2 mov %esi,%edx
80106f62: 8d 1c 06 lea (%esi,%eax,1),%ebx
80106f65: 89 f8 mov %edi,%eax
80106f67: e8 24 ff ff ff call 80106e90 <walkpgdir>
80106f6c: 85 c0 test %eax,%eax
80106f6e: 75 d0 jne 80106f40 <mappages+0x30>
pa += PGSIZE;
}
return 0;
}
80106f70: 8d 65 f4 lea -0xc(%ebp),%esp
return -1;
80106f73: b8 ff ff ff ff mov $0xffffffff,%eax
}
80106f78: 5b pop %ebx
80106f79: 5e pop %esi
80106f7a: 5f pop %edi
80106f7b: 5d pop %ebp
80106f7c: c3 ret
80106f7d: 8d 76 00 lea 0x0(%esi),%esi
80106f80: 8d 65 f4 lea -0xc(%ebp),%esp
return 0;
80106f83: 31 c0 xor %eax,%eax
}
80106f85: 5b pop %ebx
80106f86: 5e pop %esi
80106f87: 5f pop %edi
80106f88: 5d pop %ebp
80106f89: c3 ret
panic("remap");
80106f8a: 83 ec 0c sub $0xc,%esp
80106f8d: 68 b4 81 10 80 push $0x801081b4
80106f92: e8 f9 93 ff ff call 80100390 <panic>
80106f97: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80106f9e: 66 90 xchg %ax,%ax
80106fa0 <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)
80106fa0: 55 push %ebp
80106fa1: 89 e5 mov %esp,%ebp
80106fa3: 57 push %edi
80106fa4: 56 push %esi
80106fa5: 89 c6 mov %eax,%esi
80106fa7: 53 push %ebx
80106fa8: 89 d3 mov %edx,%ebx
uint a, pa;
if(newsz >= oldsz)
return oldsz;
a = PGROUNDUP(newsz);
80106faa: 8d 91 ff 0f 00 00 lea 0xfff(%ecx),%edx
80106fb0: 81 e2 00 f0 ff ff and $0xfffff000,%edx
deallocuvm(pde_t *pgdir, uint oldsz, uint newsz)
80106fb6: 83 ec 1c sub $0x1c,%esp
80106fb9: 89 4d e0 mov %ecx,-0x20(%ebp)
for(; a < oldsz; a += PGSIZE){
80106fbc: 39 da cmp %ebx,%edx
80106fbe: 73 5b jae 8010701b <deallocuvm.part.0+0x7b>
80106fc0: 89 5d e4 mov %ebx,-0x1c(%ebp)
80106fc3: 89 d7 mov %edx,%edi
80106fc5: eb 14 jmp 80106fdb <deallocuvm.part.0+0x3b>
80106fc7: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80106fce: 66 90 xchg %ax,%ax
80106fd0: 81 c7 00 10 00 00 add $0x1000,%edi
80106fd6: 39 7d e4 cmp %edi,-0x1c(%ebp)
80106fd9: 76 40 jbe 8010701b <deallocuvm.part.0+0x7b>
pte = walkpgdir(pgdir, (char*)a, 0);
80106fdb: 31 c9 xor %ecx,%ecx
80106fdd: 89 fa mov %edi,%edx
80106fdf: 89 f0 mov %esi,%eax
80106fe1: e8 aa fe ff ff call 80106e90 <walkpgdir>
80106fe6: 89 c3 mov %eax,%ebx
if(!pte)
80106fe8: 85 c0 test %eax,%eax
80106fea: 74 44 je 80107030 <deallocuvm.part.0+0x90>
a = PGADDR(PDX(a) + 1, 0, 0) - PGSIZE;
else if((*pte & PTE_P) != 0){
80106fec: 8b 00 mov (%eax),%eax
80106fee: a8 01 test $0x1,%al
80106ff0: 74 de je 80106fd0 <deallocuvm.part.0+0x30>
pa = PTE_ADDR(*pte);
if(pa == 0)
80106ff2: 25 00 f0 ff ff and $0xfffff000,%eax
80106ff7: 74 47 je 80107040 <deallocuvm.part.0+0xa0>
panic("kfree");
char *v = P2V(pa);
kfree(v);
80106ff9: 83 ec 0c sub $0xc,%esp
char *v = P2V(pa);
80106ffc: 05 00 00 00 80 add $0x80000000,%eax
80107001: 81 c7 00 10 00 00 add $0x1000,%edi
kfree(v);
80107007: 50 push %eax
80107008: e8 63 b4 ff ff call 80102470 <kfree>
*pte = 0;
8010700d: c7 03 00 00 00 00 movl $0x0,(%ebx)
80107013: 83 c4 10 add $0x10,%esp
for(; a < oldsz; a += PGSIZE){
80107016: 39 7d e4 cmp %edi,-0x1c(%ebp)
80107019: 77 c0 ja 80106fdb <deallocuvm.part.0+0x3b>
}
}
return newsz;
}
8010701b: 8b 45 e0 mov -0x20(%ebp),%eax
8010701e: 8d 65 f4 lea -0xc(%ebp),%esp
80107021: 5b pop %ebx
80107022: 5e pop %esi
80107023: 5f pop %edi
80107024: 5d pop %ebp
80107025: c3 ret
80107026: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010702d: 8d 76 00 lea 0x0(%esi),%esi
a = PGADDR(PDX(a) + 1, 0, 0) - PGSIZE;
80107030: 89 fa mov %edi,%edx
80107032: 81 e2 00 00 c0 ff and $0xffc00000,%edx
80107038: 8d ba 00 00 40 00 lea 0x400000(%edx),%edi
8010703e: eb 96 jmp 80106fd6 <deallocuvm.part.0+0x36>
panic("kfree");
80107040: 83 ec 0c sub $0xc,%esp
80107043: 68 46 7a 10 80 push $0x80107a46
80107048: e8 43 93 ff ff call 80100390 <panic>
8010704d: 8d 76 00 lea 0x0(%esi),%esi
80107050 <seginit>:
{
80107050: f3 0f 1e fb endbr32
80107054: 55 push %ebp
80107055: 89 e5 mov %esp,%ebp
80107057: 83 ec 18 sub $0x18,%esp
c = &cpus[cpuid()];
8010705a: e8 e1 c9 ff ff call 80103a40 <cpuid>
pd[0] = size-1;
8010705f: ba 2f 00 00 00 mov $0x2f,%edx
80107064: 69 c0 b0 00 00 00 imul $0xb0,%eax,%eax
8010706a: 66 89 55 f2 mov %dx,-0xe(%ebp)
c->gdt[SEG_KCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, 0);
8010706e: c7 80 f8 37 11 80 ff movl $0xffff,-0x7feec808(%eax)
80107075: ff 00 00
80107078: c7 80 fc 37 11 80 00 movl $0xcf9a00,-0x7feec804(%eax)
8010707f: 9a cf 00
c->gdt[SEG_KDATA] = SEG(STA_W, 0, 0xffffffff, 0);
80107082: c7 80 00 38 11 80 ff movl $0xffff,-0x7feec800(%eax)
80107089: ff 00 00
8010708c: c7 80 04 38 11 80 00 movl $0xcf9200,-0x7feec7fc(%eax)
80107093: 92 cf 00
c->gdt[SEG_UCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, DPL_USER);
80107096: c7 80 08 38 11 80 ff movl $0xffff,-0x7feec7f8(%eax)
8010709d: ff 00 00
801070a0: c7 80 0c 38 11 80 00 movl $0xcffa00,-0x7feec7f4(%eax)
801070a7: fa cf 00
c->gdt[SEG_UDATA] = SEG(STA_W, 0, 0xffffffff, DPL_USER);
801070aa: c7 80 10 38 11 80 ff movl $0xffff,-0x7feec7f0(%eax)
801070b1: ff 00 00
801070b4: c7 80 14 38 11 80 00 movl $0xcff200,-0x7feec7ec(%eax)
801070bb: f2 cf 00
lgdt(c->gdt, sizeof(c->gdt));
801070be: 05 f0 37 11 80 add $0x801137f0,%eax
pd[1] = (uint)p;
801070c3: 66 89 45 f4 mov %ax,-0xc(%ebp)
pd[2] = (uint)p >> 16;
801070c7: c1 e8 10 shr $0x10,%eax
801070ca: 66 89 45 f6 mov %ax,-0xa(%ebp)
asm volatile("lgdt (%0)" : : "r" (pd));
801070ce: 8d 45 f2 lea -0xe(%ebp),%eax
801070d1: 0f 01 10 lgdtl (%eax)
}
801070d4: c9 leave
801070d5: c3 ret
801070d6: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801070dd: 8d 76 00 lea 0x0(%esi),%esi
801070e0 <switchkvm>:
{
801070e0: f3 0f 1e fb endbr32
lcr3(V2P(kpgdir)); // switch to the kernel page table
801070e4: a1 a4 73 11 80 mov 0x801173a4,%eax
801070e9: 05 00 00 00 80 add $0x80000000,%eax
}
static inline void
lcr3(uint val)
{
asm volatile("movl %0,%%cr3" : : "r" (val));
801070ee: 0f 22 d8 mov %eax,%cr3
}
801070f1: c3 ret
801070f2: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801070f9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80107100 <switchuvm>:
{
80107100: f3 0f 1e fb endbr32
80107104: 55 push %ebp
80107105: 89 e5 mov %esp,%ebp
80107107: 57 push %edi
80107108: 56 push %esi
80107109: 53 push %ebx
8010710a: 83 ec 1c sub $0x1c,%esp
8010710d: 8b 75 08 mov 0x8(%ebp),%esi
if(p == 0)
80107110: 85 f6 test %esi,%esi
80107112: 0f 84 cb 00 00 00 je 801071e3 <switchuvm+0xe3>
if(p->kstack == 0)
80107118: 8b 46 08 mov 0x8(%esi),%eax
8010711b: 85 c0 test %eax,%eax
8010711d: 0f 84 da 00 00 00 je 801071fd <switchuvm+0xfd>
if(p->pgdir == 0)
80107123: 8b 46 04 mov 0x4(%esi),%eax
80107126: 85 c0 test %eax,%eax
80107128: 0f 84 c2 00 00 00 je 801071f0 <switchuvm+0xf0>
pushcli();
8010712e: e8 5d d9 ff ff call 80104a90 <pushcli>
mycpu()->gdt[SEG_TSS] = SEG16(STS_T32A, &mycpu()->ts,
80107133: e8 98 c8 ff ff call 801039d0 <mycpu>
80107138: 89 c3 mov %eax,%ebx
8010713a: e8 91 c8 ff ff call 801039d0 <mycpu>
8010713f: 89 c7 mov %eax,%edi
80107141: e8 8a c8 ff ff call 801039d0 <mycpu>
80107146: 83 c7 08 add $0x8,%edi
80107149: 89 45 e4 mov %eax,-0x1c(%ebp)
8010714c: e8 7f c8 ff ff call 801039d0 <mycpu>
80107151: 8b 4d e4 mov -0x1c(%ebp),%ecx
80107154: ba 67 00 00 00 mov $0x67,%edx
80107159: 66 89 bb 9a 00 00 00 mov %di,0x9a(%ebx)
80107160: 83 c0 08 add $0x8,%eax
80107163: 66 89 93 98 00 00 00 mov %dx,0x98(%ebx)
mycpu()->ts.iomb = (ushort) 0xFFFF;
8010716a: bf ff ff ff ff mov $0xffffffff,%edi
mycpu()->gdt[SEG_TSS] = SEG16(STS_T32A, &mycpu()->ts,
8010716f: 83 c1 08 add $0x8,%ecx
80107172: c1 e8 18 shr $0x18,%eax
80107175: c1 e9 10 shr $0x10,%ecx
80107178: 88 83 9f 00 00 00 mov %al,0x9f(%ebx)
8010717e: 88 8b 9c 00 00 00 mov %cl,0x9c(%ebx)
80107184: b9 99 40 00 00 mov $0x4099,%ecx
80107189: 66 89 8b 9d 00 00 00 mov %cx,0x9d(%ebx)
mycpu()->ts.ss0 = SEG_KDATA << 3;
80107190: bb 10 00 00 00 mov $0x10,%ebx
mycpu()->gdt[SEG_TSS].s = 0;
80107195: e8 36 c8 ff ff call 801039d0 <mycpu>
8010719a: 80 a0 9d 00 00 00 ef andb $0xef,0x9d(%eax)
mycpu()->ts.ss0 = SEG_KDATA << 3;
801071a1: e8 2a c8 ff ff call 801039d0 <mycpu>
801071a6: 66 89 58 10 mov %bx,0x10(%eax)
mycpu()->ts.esp0 = (uint)p->kstack + KSTACKSIZE;
801071aa: 8b 5e 08 mov 0x8(%esi),%ebx
801071ad: 81 c3 00 10 00 00 add $0x1000,%ebx
801071b3: e8 18 c8 ff ff call 801039d0 <mycpu>
801071b8: 89 58 0c mov %ebx,0xc(%eax)
mycpu()->ts.iomb = (ushort) 0xFFFF;
801071bb: e8 10 c8 ff ff call 801039d0 <mycpu>
801071c0: 66 89 78 6e mov %di,0x6e(%eax)
asm volatile("ltr %0" : : "r" (sel));
801071c4: b8 28 00 00 00 mov $0x28,%eax
801071c9: 0f 00 d8 ltr %ax
lcr3(V2P(p->pgdir)); // switch to process's address space
801071cc: 8b 46 04 mov 0x4(%esi),%eax
801071cf: 05 00 00 00 80 add $0x80000000,%eax
asm volatile("movl %0,%%cr3" : : "r" (val));
801071d4: 0f 22 d8 mov %eax,%cr3
}
801071d7: 8d 65 f4 lea -0xc(%ebp),%esp
801071da: 5b pop %ebx
801071db: 5e pop %esi
801071dc: 5f pop %edi
801071dd: 5d pop %ebp
popcli();
801071de: e9 fd d8 ff ff jmp 80104ae0 <popcli>
panic("switchuvm: no process");
801071e3: 83 ec 0c sub $0xc,%esp
801071e6: 68 ba 81 10 80 push $0x801081ba
801071eb: e8 a0 91 ff ff call 80100390 <panic>
panic("switchuvm: no pgdir");
801071f0: 83 ec 0c sub $0xc,%esp
801071f3: 68 e5 81 10 80 push $0x801081e5
801071f8: e8 93 91 ff ff call 80100390 <panic>
panic("switchuvm: no kstack");
801071fd: 83 ec 0c sub $0xc,%esp
80107200: 68 d0 81 10 80 push $0x801081d0
80107205: e8 86 91 ff ff call 80100390 <panic>
8010720a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80107210 <inituvm>:
{
80107210: f3 0f 1e fb endbr32
80107214: 55 push %ebp
80107215: 89 e5 mov %esp,%ebp
80107217: 57 push %edi
80107218: 56 push %esi
80107219: 53 push %ebx
8010721a: 83 ec 1c sub $0x1c,%esp
8010721d: 8b 45 0c mov 0xc(%ebp),%eax
80107220: 8b 75 10 mov 0x10(%ebp),%esi
80107223: 8b 7d 08 mov 0x8(%ebp),%edi
80107226: 89 45 e4 mov %eax,-0x1c(%ebp)
if(sz >= PGSIZE)
80107229: 81 fe ff 0f 00 00 cmp $0xfff,%esi
8010722f: 77 4b ja 8010727c <inituvm+0x6c>
mem = kalloc();
80107231: e8 fa b3 ff ff call 80102630 <kalloc>
memset(mem, 0, PGSIZE);
80107236: 83 ec 04 sub $0x4,%esp
80107239: 68 00 10 00 00 push $0x1000
mem = kalloc();
8010723e: 89 c3 mov %eax,%ebx
memset(mem, 0, PGSIZE);
80107240: 6a 00 push $0x0
80107242: 50 push %eax
80107243: e8 58 da ff ff call 80104ca0 <memset>
mappages(pgdir, 0, PGSIZE, V2P(mem), PTE_W|PTE_U);
80107248: 58 pop %eax
80107249: 8d 83 00 00 00 80 lea -0x80000000(%ebx),%eax
8010724f: 5a pop %edx
80107250: 6a 06 push $0x6
80107252: b9 00 10 00 00 mov $0x1000,%ecx
80107257: 31 d2 xor %edx,%edx
80107259: 50 push %eax
8010725a: 89 f8 mov %edi,%eax
8010725c: e8 af fc ff ff call 80106f10 <mappages>
memmove(mem, init, sz);
80107261: 8b 45 e4 mov -0x1c(%ebp),%eax
80107264: 89 75 10 mov %esi,0x10(%ebp)
80107267: 83 c4 10 add $0x10,%esp
8010726a: 89 5d 08 mov %ebx,0x8(%ebp)
8010726d: 89 45 0c mov %eax,0xc(%ebp)
}
80107270: 8d 65 f4 lea -0xc(%ebp),%esp
80107273: 5b pop %ebx
80107274: 5e pop %esi
80107275: 5f pop %edi
80107276: 5d pop %ebp
memmove(mem, init, sz);
80107277: e9 c4 da ff ff jmp 80104d40 <memmove>
panic("inituvm: more than a page");
8010727c: 83 ec 0c sub $0xc,%esp
8010727f: 68 f9 81 10 80 push $0x801081f9
80107284: e8 07 91 ff ff call 80100390 <panic>
80107289: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80107290 <loaduvm>:
{
80107290: f3 0f 1e fb endbr32
80107294: 55 push %ebp
80107295: 89 e5 mov %esp,%ebp
80107297: 57 push %edi
80107298: 56 push %esi
80107299: 53 push %ebx
8010729a: 83 ec 1c sub $0x1c,%esp
8010729d: 8b 45 0c mov 0xc(%ebp),%eax
801072a0: 8b 75 18 mov 0x18(%ebp),%esi
if((uint) addr % PGSIZE != 0)
801072a3: a9 ff 0f 00 00 test $0xfff,%eax
801072a8: 0f 85 99 00 00 00 jne 80107347 <loaduvm+0xb7>
for(i = 0; i < sz; i += PGSIZE){
801072ae: 01 f0 add %esi,%eax
801072b0: 89 f3 mov %esi,%ebx
801072b2: 89 45 e4 mov %eax,-0x1c(%ebp)
if(readi(ip, P2V(pa), offset+i, n) != n)
801072b5: 8b 45 14 mov 0x14(%ebp),%eax
801072b8: 01 f0 add %esi,%eax
801072ba: 89 45 e0 mov %eax,-0x20(%ebp)
for(i = 0; i < sz; i += PGSIZE){
801072bd: 85 f6 test %esi,%esi
801072bf: 75 15 jne 801072d6 <loaduvm+0x46>
801072c1: eb 6d jmp 80107330 <loaduvm+0xa0>
801072c3: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801072c7: 90 nop
801072c8: 81 eb 00 10 00 00 sub $0x1000,%ebx
801072ce: 89 f0 mov %esi,%eax
801072d0: 29 d8 sub %ebx,%eax
801072d2: 39 c6 cmp %eax,%esi
801072d4: 76 5a jbe 80107330 <loaduvm+0xa0>
if((pte = walkpgdir(pgdir, addr+i, 0)) == 0)
801072d6: 8b 55 e4 mov -0x1c(%ebp),%edx
801072d9: 8b 45 08 mov 0x8(%ebp),%eax
801072dc: 31 c9 xor %ecx,%ecx
801072de: 29 da sub %ebx,%edx
801072e0: e8 ab fb ff ff call 80106e90 <walkpgdir>
801072e5: 85 c0 test %eax,%eax
801072e7: 74 51 je 8010733a <loaduvm+0xaa>
pa = PTE_ADDR(*pte);
801072e9: 8b 00 mov (%eax),%eax
if(readi(ip, P2V(pa), offset+i, n) != n)
801072eb: 8b 4d e0 mov -0x20(%ebp),%ecx
if(sz - i < PGSIZE)
801072ee: bf 00 10 00 00 mov $0x1000,%edi
pa = PTE_ADDR(*pte);
801072f3: 25 00 f0 ff ff and $0xfffff000,%eax
if(sz - i < PGSIZE)
801072f8: 81 fb ff 0f 00 00 cmp $0xfff,%ebx
801072fe: 0f 46 fb cmovbe %ebx,%edi
if(readi(ip, P2V(pa), offset+i, n) != n)
80107301: 29 d9 sub %ebx,%ecx
80107303: 05 00 00 00 80 add $0x80000000,%eax
80107308: 57 push %edi
80107309: 51 push %ecx
8010730a: 50 push %eax
8010730b: ff 75 10 pushl 0x10(%ebp)
8010730e: e8 4d a7 ff ff call 80101a60 <readi>
80107313: 83 c4 10 add $0x10,%esp
80107316: 39 f8 cmp %edi,%eax
80107318: 74 ae je 801072c8 <loaduvm+0x38>
}
8010731a: 8d 65 f4 lea -0xc(%ebp),%esp
return -1;
8010731d: b8 ff ff ff ff mov $0xffffffff,%eax
}
80107322: 5b pop %ebx
80107323: 5e pop %esi
80107324: 5f pop %edi
80107325: 5d pop %ebp
80107326: c3 ret
80107327: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010732e: 66 90 xchg %ax,%ax
80107330: 8d 65 f4 lea -0xc(%ebp),%esp
return 0;
80107333: 31 c0 xor %eax,%eax
}
80107335: 5b pop %ebx
80107336: 5e pop %esi
80107337: 5f pop %edi
80107338: 5d pop %ebp
80107339: c3 ret
panic("loaduvm: address should exist");
8010733a: 83 ec 0c sub $0xc,%esp
8010733d: 68 13 82 10 80 push $0x80108213
80107342: e8 49 90 ff ff call 80100390 <panic>
panic("loaduvm: addr must be page aligned");
80107347: 83 ec 0c sub $0xc,%esp
8010734a: 68 b4 82 10 80 push $0x801082b4
8010734f: e8 3c 90 ff ff call 80100390 <panic>
80107354: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010735b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
8010735f: 90 nop
80107360 <allocuvm>:
{
80107360: f3 0f 1e fb endbr32
80107364: 55 push %ebp
80107365: 89 e5 mov %esp,%ebp
80107367: 57 push %edi
80107368: 56 push %esi
80107369: 53 push %ebx
8010736a: 83 ec 1c sub $0x1c,%esp
if(newsz >= KERNBASE)
8010736d: 8b 45 10 mov 0x10(%ebp),%eax
{
80107370: 8b 7d 08 mov 0x8(%ebp),%edi
if(newsz >= KERNBASE)
80107373: 89 45 e4 mov %eax,-0x1c(%ebp)
80107376: 85 c0 test %eax,%eax
80107378: 0f 88 b2 00 00 00 js 80107430 <allocuvm+0xd0>
if(newsz < oldsz)
8010737e: 3b 45 0c cmp 0xc(%ebp),%eax
return oldsz;
80107381: 8b 45 0c mov 0xc(%ebp),%eax
if(newsz < oldsz)
80107384: 0f 82 96 00 00 00 jb 80107420 <allocuvm+0xc0>
a = PGROUNDUP(oldsz);
8010738a: 8d b0 ff 0f 00 00 lea 0xfff(%eax),%esi
80107390: 81 e6 00 f0 ff ff and $0xfffff000,%esi
for(; a < newsz; a += PGSIZE){
80107396: 39 75 10 cmp %esi,0x10(%ebp)
80107399: 77 40 ja 801073db <allocuvm+0x7b>
8010739b: e9 83 00 00 00 jmp 80107423 <allocuvm+0xc3>
memset(mem, 0, PGSIZE);
801073a0: 83 ec 04 sub $0x4,%esp
801073a3: 68 00 10 00 00 push $0x1000
801073a8: 6a 00 push $0x0
801073aa: 50 push %eax
801073ab: e8 f0 d8 ff ff call 80104ca0 <memset>
if(mappages(pgdir, (char*)a, PGSIZE, V2P(mem), PTE_W|PTE_U) < 0){
801073b0: 58 pop %eax
801073b1: 8d 83 00 00 00 80 lea -0x80000000(%ebx),%eax
801073b7: 5a pop %edx
801073b8: 6a 06 push $0x6
801073ba: b9 00 10 00 00 mov $0x1000,%ecx
801073bf: 89 f2 mov %esi,%edx
801073c1: 50 push %eax
801073c2: 89 f8 mov %edi,%eax
801073c4: e8 47 fb ff ff call 80106f10 <mappages>
801073c9: 83 c4 10 add $0x10,%esp
801073cc: 85 c0 test %eax,%eax
801073ce: 78 78 js 80107448 <allocuvm+0xe8>
for(; a < newsz; a += PGSIZE){
801073d0: 81 c6 00 10 00 00 add $0x1000,%esi
801073d6: 39 75 10 cmp %esi,0x10(%ebp)
801073d9: 76 48 jbe 80107423 <allocuvm+0xc3>
mem = kalloc();
801073db: e8 50 b2 ff ff call 80102630 <kalloc>
801073e0: 89 c3 mov %eax,%ebx
if(mem == 0){
801073e2: 85 c0 test %eax,%eax
801073e4: 75 ba jne 801073a0 <allocuvm+0x40>
cprintf("allocuvm out of memory\n");
801073e6: 83 ec 0c sub $0xc,%esp
801073e9: 68 31 82 10 80 push $0x80108231
801073ee: e8 bd 92 ff ff call 801006b0 <cprintf>
if(newsz >= oldsz)
801073f3: 8b 45 0c mov 0xc(%ebp),%eax
801073f6: 83 c4 10 add $0x10,%esp
801073f9: 39 45 10 cmp %eax,0x10(%ebp)
801073fc: 74 32 je 80107430 <allocuvm+0xd0>
801073fe: 8b 55 10 mov 0x10(%ebp),%edx
80107401: 89 c1 mov %eax,%ecx
80107403: 89 f8 mov %edi,%eax
80107405: e8 96 fb ff ff call 80106fa0 <deallocuvm.part.0>
return 0;
8010740a: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
}
80107411: 8b 45 e4 mov -0x1c(%ebp),%eax
80107414: 8d 65 f4 lea -0xc(%ebp),%esp
80107417: 5b pop %ebx
80107418: 5e pop %esi
80107419: 5f pop %edi
8010741a: 5d pop %ebp
8010741b: c3 ret
8010741c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
return oldsz;
80107420: 89 45 e4 mov %eax,-0x1c(%ebp)
}
80107423: 8b 45 e4 mov -0x1c(%ebp),%eax
80107426: 8d 65 f4 lea -0xc(%ebp),%esp
80107429: 5b pop %ebx
8010742a: 5e pop %esi
8010742b: 5f pop %edi
8010742c: 5d pop %ebp
8010742d: c3 ret
8010742e: 66 90 xchg %ax,%ax
return 0;
80107430: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
}
80107437: 8b 45 e4 mov -0x1c(%ebp),%eax
8010743a: 8d 65 f4 lea -0xc(%ebp),%esp
8010743d: 5b pop %ebx
8010743e: 5e pop %esi
8010743f: 5f pop %edi
80107440: 5d pop %ebp
80107441: c3 ret
80107442: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
cprintf("allocuvm out of memory (2)\n");
80107448: 83 ec 0c sub $0xc,%esp
8010744b: 68 49 82 10 80 push $0x80108249
80107450: e8 5b 92 ff ff call 801006b0 <cprintf>
if(newsz >= oldsz)
80107455: 8b 45 0c mov 0xc(%ebp),%eax
80107458: 83 c4 10 add $0x10,%esp
8010745b: 39 45 10 cmp %eax,0x10(%ebp)
8010745e: 74 0c je 8010746c <allocuvm+0x10c>
80107460: 8b 55 10 mov 0x10(%ebp),%edx
80107463: 89 c1 mov %eax,%ecx
80107465: 89 f8 mov %edi,%eax
80107467: e8 34 fb ff ff call 80106fa0 <deallocuvm.part.0>
kfree(mem);
8010746c: 83 ec 0c sub $0xc,%esp
8010746f: 53 push %ebx
80107470: e8 fb af ff ff call 80102470 <kfree>
return 0;
80107475: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
8010747c: 83 c4 10 add $0x10,%esp
}
8010747f: 8b 45 e4 mov -0x1c(%ebp),%eax
80107482: 8d 65 f4 lea -0xc(%ebp),%esp
80107485: 5b pop %ebx
80107486: 5e pop %esi
80107487: 5f pop %edi
80107488: 5d pop %ebp
80107489: c3 ret
8010748a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80107490 <deallocuvm>:
{
80107490: f3 0f 1e fb endbr32
80107494: 55 push %ebp
80107495: 89 e5 mov %esp,%ebp
80107497: 8b 55 0c mov 0xc(%ebp),%edx
8010749a: 8b 4d 10 mov 0x10(%ebp),%ecx
8010749d: 8b 45 08 mov 0x8(%ebp),%eax
if(newsz >= oldsz)
801074a0: 39 d1 cmp %edx,%ecx
801074a2: 73 0c jae 801074b0 <deallocuvm+0x20>
}
801074a4: 5d pop %ebp
801074a5: e9 f6 fa ff ff jmp 80106fa0 <deallocuvm.part.0>
801074aa: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801074b0: 89 d0 mov %edx,%eax
801074b2: 5d pop %ebp
801074b3: c3 ret
801074b4: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801074bb: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801074bf: 90 nop
801074c0 <freevm>:
// Free a page table and all the physical memory pages
// in the user part.
void
freevm(pde_t *pgdir)
{
801074c0: f3 0f 1e fb endbr32
801074c4: 55 push %ebp
801074c5: 89 e5 mov %esp,%ebp
801074c7: 57 push %edi
801074c8: 56 push %esi
801074c9: 53 push %ebx
801074ca: 83 ec 0c sub $0xc,%esp
801074cd: 8b 75 08 mov 0x8(%ebp),%esi
uint i;
if(pgdir == 0)
801074d0: 85 f6 test %esi,%esi
801074d2: 74 55 je 80107529 <freevm+0x69>
if(newsz >= oldsz)
801074d4: 31 c9 xor %ecx,%ecx
801074d6: ba 00 00 00 80 mov $0x80000000,%edx
801074db: 89 f0 mov %esi,%eax
801074dd: 89 f3 mov %esi,%ebx
801074df: e8 bc fa ff ff call 80106fa0 <deallocuvm.part.0>
panic("freevm: no pgdir");
deallocuvm(pgdir, KERNBASE, 0);
for(i = 0; i < NPDENTRIES; i++){
801074e4: 8d be 00 10 00 00 lea 0x1000(%esi),%edi
801074ea: eb 0b jmp 801074f7 <freevm+0x37>
801074ec: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801074f0: 83 c3 04 add $0x4,%ebx
801074f3: 39 df cmp %ebx,%edi
801074f5: 74 23 je 8010751a <freevm+0x5a>
if(pgdir[i] & PTE_P){
801074f7: 8b 03 mov (%ebx),%eax
801074f9: a8 01 test $0x1,%al
801074fb: 74 f3 je 801074f0 <freevm+0x30>
char * v = P2V(PTE_ADDR(pgdir[i]));
801074fd: 25 00 f0 ff ff and $0xfffff000,%eax
kfree(v);
80107502: 83 ec 0c sub $0xc,%esp
80107505: 83 c3 04 add $0x4,%ebx
char * v = P2V(PTE_ADDR(pgdir[i]));
80107508: 05 00 00 00 80 add $0x80000000,%eax
kfree(v);
8010750d: 50 push %eax
8010750e: e8 5d af ff ff call 80102470 <kfree>
80107513: 83 c4 10 add $0x10,%esp
for(i = 0; i < NPDENTRIES; i++){
80107516: 39 df cmp %ebx,%edi
80107518: 75 dd jne 801074f7 <freevm+0x37>
}
}
kfree((char*)pgdir);
8010751a: 89 75 08 mov %esi,0x8(%ebp)
}
8010751d: 8d 65 f4 lea -0xc(%ebp),%esp
80107520: 5b pop %ebx
80107521: 5e pop %esi
80107522: 5f pop %edi
80107523: 5d pop %ebp
kfree((char*)pgdir);
80107524: e9 47 af ff ff jmp 80102470 <kfree>
panic("freevm: no pgdir");
80107529: 83 ec 0c sub $0xc,%esp
8010752c: 68 65 82 10 80 push $0x80108265
80107531: e8 5a 8e ff ff call 80100390 <panic>
80107536: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010753d: 8d 76 00 lea 0x0(%esi),%esi
80107540 <setupkvm>:
{
80107540: f3 0f 1e fb endbr32
80107544: 55 push %ebp
80107545: 89 e5 mov %esp,%ebp
80107547: 56 push %esi
80107548: 53 push %ebx
if((pgdir = (pde_t*)kalloc()) == 0)
80107549: e8 e2 b0 ff ff call 80102630 <kalloc>
8010754e: 89 c6 mov %eax,%esi
80107550: 85 c0 test %eax,%eax
80107552: 74 42 je 80107596 <setupkvm+0x56>
memset(pgdir, 0, PGSIZE);
80107554: 83 ec 04 sub $0x4,%esp
for(k = kmap; k < &kmap[NELEM(kmap)]; k++)
80107557: bb 20 b4 10 80 mov $0x8010b420,%ebx
memset(pgdir, 0, PGSIZE);
8010755c: 68 00 10 00 00 push $0x1000
80107561: 6a 00 push $0x0
80107563: 50 push %eax
80107564: e8 37 d7 ff ff call 80104ca0 <memset>
80107569: 83 c4 10 add $0x10,%esp
(uint)k->phys_start, k->perm) < 0) {
8010756c: 8b 43 04 mov 0x4(%ebx),%eax
if(mappages(pgdir, k->virt, k->phys_end - k->phys_start,
8010756f: 83 ec 08 sub $0x8,%esp
80107572: 8b 4b 08 mov 0x8(%ebx),%ecx
80107575: ff 73 0c pushl 0xc(%ebx)
80107578: 8b 13 mov (%ebx),%edx
8010757a: 50 push %eax
8010757b: 29 c1 sub %eax,%ecx
8010757d: 89 f0 mov %esi,%eax
8010757f: e8 8c f9 ff ff call 80106f10 <mappages>
80107584: 83 c4 10 add $0x10,%esp
80107587: 85 c0 test %eax,%eax
80107589: 78 15 js 801075a0 <setupkvm+0x60>
for(k = kmap; k < &kmap[NELEM(kmap)]; k++)
8010758b: 83 c3 10 add $0x10,%ebx
8010758e: 81 fb 60 b4 10 80 cmp $0x8010b460,%ebx
80107594: 75 d6 jne 8010756c <setupkvm+0x2c>
}
80107596: 8d 65 f8 lea -0x8(%ebp),%esp
80107599: 89 f0 mov %esi,%eax
8010759b: 5b pop %ebx
8010759c: 5e pop %esi
8010759d: 5d pop %ebp
8010759e: c3 ret
8010759f: 90 nop
freevm(pgdir);
801075a0: 83 ec 0c sub $0xc,%esp
801075a3: 56 push %esi
return 0;
801075a4: 31 f6 xor %esi,%esi
freevm(pgdir);
801075a6: e8 15 ff ff ff call 801074c0 <freevm>
return 0;
801075ab: 83 c4 10 add $0x10,%esp
}
801075ae: 8d 65 f8 lea -0x8(%ebp),%esp
801075b1: 89 f0 mov %esi,%eax
801075b3: 5b pop %ebx
801075b4: 5e pop %esi
801075b5: 5d pop %ebp
801075b6: c3 ret
801075b7: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801075be: 66 90 xchg %ax,%ax
801075c0 <kvmalloc>:
{
801075c0: f3 0f 1e fb endbr32
801075c4: 55 push %ebp
801075c5: 89 e5 mov %esp,%ebp
801075c7: 83 ec 08 sub $0x8,%esp
kpgdir = setupkvm();
801075ca: e8 71 ff ff ff call 80107540 <setupkvm>
801075cf: a3 a4 73 11 80 mov %eax,0x801173a4
lcr3(V2P(kpgdir)); // switch to the kernel page table
801075d4: 05 00 00 00 80 add $0x80000000,%eax
801075d9: 0f 22 d8 mov %eax,%cr3
}
801075dc: c9 leave
801075dd: c3 ret
801075de: 66 90 xchg %ax,%ax
801075e0 <clearpteu>:
// Clear PTE_U on a page. Used to create an inaccessible
// page beneath the user stack.
void
clearpteu(pde_t *pgdir, char *uva)
{
801075e0: f3 0f 1e fb endbr32
801075e4: 55 push %ebp
pte_t *pte;
pte = walkpgdir(pgdir, uva, 0);
801075e5: 31 c9 xor %ecx,%ecx
{
801075e7: 89 e5 mov %esp,%ebp
801075e9: 83 ec 08 sub $0x8,%esp
pte = walkpgdir(pgdir, uva, 0);
801075ec: 8b 55 0c mov 0xc(%ebp),%edx
801075ef: 8b 45 08 mov 0x8(%ebp),%eax
801075f2: e8 99 f8 ff ff call 80106e90 <walkpgdir>
if(pte == 0)
801075f7: 85 c0 test %eax,%eax
801075f9: 74 05 je 80107600 <clearpteu+0x20>
panic("clearpteu");
*pte &= ~PTE_U;
801075fb: 83 20 fb andl $0xfffffffb,(%eax)
}
801075fe: c9 leave
801075ff: c3 ret
panic("clearpteu");
80107600: 83 ec 0c sub $0xc,%esp
80107603: 68 76 82 10 80 push $0x80108276
80107608: e8 83 8d ff ff call 80100390 <panic>
8010760d: 8d 76 00 lea 0x0(%esi),%esi
80107610 <copyuvm>:
// Given a parent process's page table, create a copy
// of it for a child.
pde_t*
copyuvm(pde_t *pgdir, uint sz)
{
80107610: f3 0f 1e fb endbr32
80107614: 55 push %ebp
80107615: 89 e5 mov %esp,%ebp
80107617: 57 push %edi
80107618: 56 push %esi
80107619: 53 push %ebx
8010761a: 83 ec 1c sub $0x1c,%esp
pde_t *d;
pte_t *pte;
uint pa, i, flags;
char *mem;
if((d = setupkvm()) == 0)
8010761d: e8 1e ff ff ff call 80107540 <setupkvm>
80107622: 89 45 e0 mov %eax,-0x20(%ebp)
80107625: 85 c0 test %eax,%eax
80107627: 0f 84 9b 00 00 00 je 801076c8 <copyuvm+0xb8>
return 0;
for(i = 0; i < sz; i += PGSIZE){
8010762d: 8b 4d 0c mov 0xc(%ebp),%ecx
80107630: 85 c9 test %ecx,%ecx
80107632: 0f 84 90 00 00 00 je 801076c8 <copyuvm+0xb8>
80107638: 31 f6 xor %esi,%esi
8010763a: eb 46 jmp 80107682 <copyuvm+0x72>
8010763c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
panic("copyuvm: page not present");
pa = PTE_ADDR(*pte);
flags = PTE_FLAGS(*pte);
if((mem = kalloc()) == 0)
goto bad;
memmove(mem, (char*)P2V(pa), PGSIZE);
80107640: 83 ec 04 sub $0x4,%esp
80107643: 81 c7 00 00 00 80 add $0x80000000,%edi
80107649: 68 00 10 00 00 push $0x1000
8010764e: 57 push %edi
8010764f: 50 push %eax
80107650: e8 eb d6 ff ff call 80104d40 <memmove>
if(mappages(d, (void*)i, PGSIZE, V2P(mem), flags) < 0) {
80107655: 58 pop %eax
80107656: 8d 83 00 00 00 80 lea -0x80000000(%ebx),%eax
8010765c: 5a pop %edx
8010765d: ff 75 e4 pushl -0x1c(%ebp)
80107660: b9 00 10 00 00 mov $0x1000,%ecx
80107665: 89 f2 mov %esi,%edx
80107667: 50 push %eax
80107668: 8b 45 e0 mov -0x20(%ebp),%eax
8010766b: e8 a0 f8 ff ff call 80106f10 <mappages>
80107670: 83 c4 10 add $0x10,%esp
80107673: 85 c0 test %eax,%eax
80107675: 78 61 js 801076d8 <copyuvm+0xc8>
for(i = 0; i < sz; i += PGSIZE){
80107677: 81 c6 00 10 00 00 add $0x1000,%esi
8010767d: 39 75 0c cmp %esi,0xc(%ebp)
80107680: 76 46 jbe 801076c8 <copyuvm+0xb8>
if((pte = walkpgdir(pgdir, (void *) i, 0)) == 0)
80107682: 8b 45 08 mov 0x8(%ebp),%eax
80107685: 31 c9 xor %ecx,%ecx
80107687: 89 f2 mov %esi,%edx
80107689: e8 02 f8 ff ff call 80106e90 <walkpgdir>
8010768e: 85 c0 test %eax,%eax
80107690: 74 61 je 801076f3 <copyuvm+0xe3>
if(!(*pte & PTE_P))
80107692: 8b 00 mov (%eax),%eax
80107694: a8 01 test $0x1,%al
80107696: 74 4e je 801076e6 <copyuvm+0xd6>
pa = PTE_ADDR(*pte);
80107698: 89 c7 mov %eax,%edi
flags = PTE_FLAGS(*pte);
8010769a: 25 ff 0f 00 00 and $0xfff,%eax
8010769f: 89 45 e4 mov %eax,-0x1c(%ebp)
pa = PTE_ADDR(*pte);
801076a2: 81 e7 00 f0 ff ff and $0xfffff000,%edi
if((mem = kalloc()) == 0)
801076a8: e8 83 af ff ff call 80102630 <kalloc>
801076ad: 89 c3 mov %eax,%ebx
801076af: 85 c0 test %eax,%eax
801076b1: 75 8d jne 80107640 <copyuvm+0x30>
}
}
return d;
bad:
freevm(d);
801076b3: 83 ec 0c sub $0xc,%esp
801076b6: ff 75 e0 pushl -0x20(%ebp)
801076b9: e8 02 fe ff ff call 801074c0 <freevm>
return 0;
801076be: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
801076c5: 83 c4 10 add $0x10,%esp
}
801076c8: 8b 45 e0 mov -0x20(%ebp),%eax
801076cb: 8d 65 f4 lea -0xc(%ebp),%esp
801076ce: 5b pop %ebx
801076cf: 5e pop %esi
801076d0: 5f pop %edi
801076d1: 5d pop %ebp
801076d2: c3 ret
801076d3: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801076d7: 90 nop
kfree(mem);
801076d8: 83 ec 0c sub $0xc,%esp
801076db: 53 push %ebx
801076dc: e8 8f ad ff ff call 80102470 <kfree>
goto bad;
801076e1: 83 c4 10 add $0x10,%esp
801076e4: eb cd jmp 801076b3 <copyuvm+0xa3>
panic("copyuvm: page not present");
801076e6: 83 ec 0c sub $0xc,%esp
801076e9: 68 9a 82 10 80 push $0x8010829a
801076ee: e8 9d 8c ff ff call 80100390 <panic>
panic("copyuvm: pte should exist");
801076f3: 83 ec 0c sub $0xc,%esp
801076f6: 68 80 82 10 80 push $0x80108280
801076fb: e8 90 8c ff ff call 80100390 <panic>
80107700 <uva2ka>:
//PAGEBREAK!
// Map user virtual address to kernel address.
char*
uva2ka(pde_t *pgdir, char *uva)
{
80107700: f3 0f 1e fb endbr32
80107704: 55 push %ebp
pte_t *pte;
pte = walkpgdir(pgdir, uva, 0);
80107705: 31 c9 xor %ecx,%ecx
{
80107707: 89 e5 mov %esp,%ebp
80107709: 83 ec 08 sub $0x8,%esp
pte = walkpgdir(pgdir, uva, 0);
8010770c: 8b 55 0c mov 0xc(%ebp),%edx
8010770f: 8b 45 08 mov 0x8(%ebp),%eax
80107712: e8 79 f7 ff ff call 80106e90 <walkpgdir>
if((*pte & PTE_P) == 0)
80107717: 8b 00 mov (%eax),%eax
return 0;
if((*pte & PTE_U) == 0)
return 0;
return (char*)P2V(PTE_ADDR(*pte));
}
80107719: c9 leave
if((*pte & PTE_U) == 0)
8010771a: 89 c2 mov %eax,%edx
return (char*)P2V(PTE_ADDR(*pte));
8010771c: 25 00 f0 ff ff and $0xfffff000,%eax
if((*pte & PTE_U) == 0)
80107721: 83 e2 05 and $0x5,%edx
return (char*)P2V(PTE_ADDR(*pte));
80107724: 05 00 00 00 80 add $0x80000000,%eax
80107729: 83 fa 05 cmp $0x5,%edx
8010772c: ba 00 00 00 00 mov $0x0,%edx
80107731: 0f 45 c2 cmovne %edx,%eax
}
80107734: c3 ret
80107735: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8010773c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80107740 <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)
{
80107740: f3 0f 1e fb endbr32
80107744: 55 push %ebp
80107745: 89 e5 mov %esp,%ebp
80107747: 57 push %edi
80107748: 56 push %esi
80107749: 53 push %ebx
8010774a: 83 ec 0c sub $0xc,%esp
8010774d: 8b 75 14 mov 0x14(%ebp),%esi
80107750: 8b 55 0c mov 0xc(%ebp),%edx
char *buf, *pa0;
uint n, va0;
buf = (char*)p;
while(len > 0){
80107753: 85 f6 test %esi,%esi
80107755: 75 3c jne 80107793 <copyout+0x53>
80107757: eb 67 jmp 801077c0 <copyout+0x80>
80107759: 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);
80107760: 8b 55 0c mov 0xc(%ebp),%edx
80107763: 89 fb mov %edi,%ebx
80107765: 29 d3 sub %edx,%ebx
80107767: 81 c3 00 10 00 00 add $0x1000,%ebx
if(n > len)
8010776d: 39 f3 cmp %esi,%ebx
8010776f: 0f 47 de cmova %esi,%ebx
n = len;
memmove(pa0 + (va - va0), buf, n);
80107772: 29 fa sub %edi,%edx
80107774: 83 ec 04 sub $0x4,%esp
80107777: 01 c2 add %eax,%edx
80107779: 53 push %ebx
8010777a: ff 75 10 pushl 0x10(%ebp)
8010777d: 52 push %edx
8010777e: e8 bd d5 ff ff call 80104d40 <memmove>
len -= n;
buf += n;
80107783: 01 5d 10 add %ebx,0x10(%ebp)
va = va0 + PGSIZE;
80107786: 8d 97 00 10 00 00 lea 0x1000(%edi),%edx
while(len > 0){
8010778c: 83 c4 10 add $0x10,%esp
8010778f: 29 de sub %ebx,%esi
80107791: 74 2d je 801077c0 <copyout+0x80>
va0 = (uint)PGROUNDDOWN(va);
80107793: 89 d7 mov %edx,%edi
pa0 = uva2ka(pgdir, (char*)va0);
80107795: 83 ec 08 sub $0x8,%esp
va0 = (uint)PGROUNDDOWN(va);
80107798: 89 55 0c mov %edx,0xc(%ebp)
8010779b: 81 e7 00 f0 ff ff and $0xfffff000,%edi
pa0 = uva2ka(pgdir, (char*)va0);
801077a1: 57 push %edi
801077a2: ff 75 08 pushl 0x8(%ebp)
801077a5: e8 56 ff ff ff call 80107700 <uva2ka>
if(pa0 == 0)
801077aa: 83 c4 10 add $0x10,%esp
801077ad: 85 c0 test %eax,%eax
801077af: 75 af jne 80107760 <copyout+0x20>
}
return 0;
}
801077b1: 8d 65 f4 lea -0xc(%ebp),%esp
return -1;
801077b4: b8 ff ff ff ff mov $0xffffffff,%eax
}
801077b9: 5b pop %ebx
801077ba: 5e pop %esi
801077bb: 5f pop %edi
801077bc: 5d pop %ebp
801077bd: c3 ret
801077be: 66 90 xchg %ax,%ax
801077c0: 8d 65 f4 lea -0xc(%ebp),%esp
return 0;
801077c3: 31 c0 xor %eax,%eax
}
801077c5: 5b pop %ebx
801077c6: 5e pop %esi
801077c7: 5f pop %edi
801077c8: 5d pop %ebp
801077c9: c3 ret
|
Cubical/Algebra/CommRing/Instances/Polynomials/UnivariatePolyHIT.agda | thomas-lamiaux/cubical | 0 | 3268 | {-# OPTIONS --safe --experimental-lossy-unification #-}
module Cubical.Algebra.CommRing.Instances.Polynomials.UnivariatePolyHIT where
open import Cubical.Foundations.Prelude
open import Cubical.Data.Empty as ⊥
open import Cubical.Data.Nat hiding (_·_) renaming (_+_ to _+n_)
open import Cubical.Data.Nat.Order
open import Cubical.Data.Sigma
open import Cubical.Algebra.Monoid
open import Cubical.Algebra.Monoid.Instances.Nat
open import Cubical.Algebra.Ring
open import Cubical.Algebra.CommRing
open import Cubical.Algebra.GradedRing.DirectSumHIT
private variable
ℓ : Level
open GradedRing-⊕HIT-index
open GradedRing-⊕HIT-⋆
open ExtensionCommRing
module _
(ACommRing@(A , Astr) : CommRing ℓ)
where
open CommRingStr Astr
open RingTheory (CommRing→Ring ACommRing)
UnivariatePolyHIT-CommRing : CommRing ℓ
UnivariatePolyHIT-CommRing = ⊕HITgradedRing-CommRing
NatMonoid
(λ _ → A)
(λ _ → snd (Ring→AbGroup (CommRing→Ring ACommRing)))
1r _·_ 0LeftAnnihilates 0RightAnnihilates
(λ a b c → ΣPathP ((+-assoc _ _ _) , (·Assoc _ _ _)))
(λ a → ΣPathP ((+-zero _) , (·IdR _)))
(λ a → ΣPathP (refl , (·IdL _)))
·DistR+
·DistL+
λ x y → ΣPathP ((+-comm _ _) , (·Comm _ _))
nUnivariatePolyHIT : (A' : CommRing ℓ) → (n : ℕ) → CommRing ℓ
nUnivariatePolyHIT A' zero = A'
nUnivariatePolyHIT A' (suc n) = UnivariatePolyHIT-CommRing (nUnivariatePolyHIT A' n)
|
Task/Strip-control-codes-and-extended-characters-from-a-string/Ada/strip-control-codes-and-extended-characters-from-a-string.ada | LaudateCorpus1/RosettaCodeData | 1 | 26349 | with Ada.Text_IO;
procedure Strip_ASCII is
Full: String := 'a' & Character'Val(11) & 'b' & Character'Val(166) &
'c' & Character'Val(127) & Character'Val(203) &
Character'Val(202) & "de";
-- 5 ordinary characters ('a' .. 'e')
-- 2 control characters (11, 127); note that 11 is the "vertical tab"
-- 3 extended characters (166, 203, 202)
function Filter(S: String;
From: Character := ' ';
To: Character := Character'Val(126);
Above: Character := Character'Val(127)) return String is
begin
if S'Length = 0 then
return "";
elsif (S(S'First) >= From and then S(S'First) <= To) or else S(S'First) > Above then
return S(S'First) & Filter(S(S'First+1 .. S'Last), From, To, Above);
else
return Filter(S(S'First+1 .. S'Last), From, To, Above);
end if;
end Filter;
procedure Put_Line(Text, S: String) is
begin
Ada.Text_IO.Put_Line(Text & " """ & S & """, Length:" & Integer'Image(S'Length));
end Put_Line;
begin
Put_Line("The full string :", Full);
Put_Line("No Control Chars:", Filter(Full)); -- default values for From, To, and Above
Put_Line("Neither_Extended:", Filter(Full, Above => Character'Last)); -- defaults for From and To
end Strip_ASCII;
|
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_698.asm | ljhsiun2/medusa | 9 | 175983 | <gh_stars>1-10
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r11
push %r14
push %r15
push %r8
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_D_ht+0x1b3a9, %r8
nop
nop
nop
cmp $46377, %r15
vmovups (%r8), %ymm3
vextracti128 $1, %ymm3, %xmm3
vpextrq $1, %xmm3, %r11
nop
nop
nop
add %r14, %r14
lea addresses_normal_ht+0x17d59, %rcx
nop
nop
sub %rdx, %rdx
movb (%rcx), %r10b
nop
nop
nop
nop
dec %rcx
lea addresses_normal_ht+0x104b9, %rsi
lea addresses_D_ht+0xd5d9, %rdi
nop
nop
nop
nop
and $3104, %rdx
mov $91, %rcx
rep movsb
cmp $50689, %r8
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %r8
pop %r15
pop %r14
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r14
push %r8
push %r9
push %rax
push %rcx
push %rdx
push %rsi
// Load
lea addresses_RW+0x1d159, %rdx
nop
nop
xor $44597, %r14
vmovups (%rdx), %ymm3
vextracti128 $0, %ymm3, %xmm3
vpextrq $1, %xmm3, %rax
nop
sub %r14, %r14
// Store
lea addresses_normal+0x18b91, %r8
nop
add $19005, %rsi
movb $0x51, (%r8)
add $60629, %r14
// Load
lea addresses_A+0x14359, %rcx
nop
xor %r9, %r9
movups (%rcx), %xmm3
vpextrq $1, %xmm3, %r8
nop
nop
nop
nop
add $64232, %rdx
// Load
lea addresses_WT+0x9b79, %rsi
nop
xor $45927, %r8
mov (%rsi), %ax
nop
nop
dec %rdx
// Faulty Load
lea addresses_normal+0xf159, %r14
nop
nop
nop
nop
nop
xor $54856, %rax
mov (%r14), %cx
lea oracles, %rsi
and $0xff, %rcx
shlq $12, %rcx
mov (%rsi,%rcx,1), %rcx
pop %rsi
pop %rdx
pop %rcx
pop %rax
pop %r9
pop %r8
pop %r14
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0, 'same': False, 'type': 'addresses_normal'}, 'OP': 'LOAD'}
{'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 10, 'same': False, 'type': 'addresses_RW'}, 'OP': 'LOAD'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 2, 'same': False, 'type': 'addresses_normal'}, 'OP': 'STOR'}
{'src': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 7, 'same': False, 'type': 'addresses_A'}, 'OP': 'LOAD'}
{'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 5, 'same': False, 'type': 'addresses_WT'}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0, 'same': True, 'type': 'addresses_normal'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 4, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'}
{'src': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 10, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 5, 'same': False, 'type': 'addresses_normal_ht'}, 'dst': {'congruent': 7, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'REPM'}
{'34': 21829}
34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34
*/
|
src/tilda/grammar/TildaComposition.g4 | generaldevelopers/Tilda | 0 | 7305 | /* ===========================================================================
* Copyright (C) 2016 CapsicoHealth Inc.
*
* 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.
*/
grammar TildaComposition;
where
: expr EOF
;
expr
: bool_expr
| expr_sub
;
expr_sub
: '(' expr ')'
;
bool_expr
: l_expr=bool_expr op=bool_op r_expr=bool_expr
| bool_expr_sub
| parameter
;
bool_op
: K_AND K_NOT?
| K_OR K_NOT?
;
bool_expr_sub
: '(' bool_expr ')'
;
parameter
: IDENTIFIER
;
K_AND : A N D;
K_NOT : N O T;
K_OR : O R;
IDENTIFIER
: [a-zA-Z_] [a-zA-Z_0-9]*
;
SPACES
: [ \u000B\t\r\n] -> channel(HIDDEN)
;
UNEXPECTED_CHAR
: .
;
fragment DIGIT : [0-9];
fragment A : [aA];
fragment B : [bB];
fragment C : [cC];
fragment D : [dD];
fragment E : [eE];
fragment F : [fF];
fragment G : [gG];
fragment H : [hH];
fragment I : [iI];
fragment J : [jJ];
fragment K : [kK];
fragment L : [lL];
fragment M : [mM];
fragment N : [nN];
fragment O : [oO];
fragment P : [pP];
fragment Q : [qQ];
fragment R : [rR];
fragment S : [sS];
fragment T : [tT];
fragment U : [uU];
fragment V : [vV];
fragment W : [wW];
fragment X : [xX];
fragment Y : [yY];
fragment Z : [zZ];
|
Transynther/x86/_processed/NC/_zr_/i7-7700_9_0xca_notsx.log_21829_128.asm | ljhsiun2/medusa | 9 | 20674 | <reponame>ljhsiun2/medusa
.global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r12
push %r14
push %r15
push %r9
push %rcx
push %rdi
push %rsi
lea addresses_UC_ht+0x1747d, %rsi
lea addresses_D_ht+0x1b47d, %rdi
nop
inc %r9
mov $115, %rcx
rep movsl
nop
nop
nop
nop
nop
add %r9, %r9
lea addresses_UC_ht+0x1a43d, %r11
nop
nop
nop
nop
nop
cmp $64433, %rsi
and $0xffffffffffffffc0, %r11
vmovntdqa (%r11), %ymm6
vextracti128 $1, %ymm6, %xmm6
vpextrq $1, %xmm6, %r15
nop
nop
nop
nop
sub %r11, %r11
lea addresses_D_ht+0x197d, %rsi
lea addresses_WC_ht+0x90fd, %rdi
nop
nop
nop
sub $4031, %r14
mov $62, %rcx
rep movsq
nop
nop
nop
nop
cmp %rdi, %rdi
lea addresses_normal_ht+0x8a51, %r14
nop
nop
nop
and $48376, %rdi
movw $0x6162, (%r14)
nop
nop
nop
nop
add $46882, %rcx
lea addresses_D_ht+0x129fd, %rsi
lea addresses_A_ht+0x18f9d, %rdi
nop
dec %r12
mov $39, %rcx
rep movsl
nop
nop
nop
add %r12, %r12
lea addresses_A_ht+0x10aa9, %rsi
nop
xor $54040, %rdi
mov $0x6162636465666768, %r12
movq %r12, %xmm4
vmovups %ymm4, (%rsi)
nop
nop
nop
nop
and %rsi, %rsi
lea addresses_A_ht+0xcf5d, %rsi
lea addresses_WT_ht+0xe93d, %rdi
clflush (%rsi)
nop
nop
nop
cmp $35524, %r15
mov $51, %rcx
rep movsw
nop
add %r12, %r12
lea addresses_D_ht+0xdabd, %r9
clflush (%r9)
nop
nop
nop
add %r11, %r11
mov (%r9), %r12w
add %r12, %r12
lea addresses_WT_ht+0x16d3d, %r11
nop
nop
nop
nop
nop
sub %rdi, %rdi
mov $0x6162636465666768, %rcx
movq %rcx, %xmm4
movups %xmm4, (%r11)
dec %r11
lea addresses_A_ht+0xf17d, %rsi
lea addresses_normal_ht+0x1077d, %rdi
nop
nop
xor $49042, %r15
mov $52, %rcx
rep movsb
nop
dec %r14
lea addresses_D_ht+0x1e91d, %rcx
nop
and $63349, %rsi
mov (%rcx), %r11w
nop
nop
nop
nop
and $26035, %r11
lea addresses_WT_ht+0x1a77, %rsi
lea addresses_WT_ht+0xc17d, %rdi
nop
nop
nop
nop
nop
inc %r15
mov $102, %rcx
rep movsq
nop
nop
nop
nop
nop
inc %rdi
lea addresses_D_ht+0x18042, %rdi
nop
add $30092, %r15
mov $0x6162636465666768, %r12
movq %r12, %xmm0
movups %xmm0, (%rdi)
nop
xor $35014, %r15
pop %rsi
pop %rdi
pop %rcx
pop %r9
pop %r15
pop %r14
pop %r12
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r15
push %r9
push %rdx
push %rsi
// Faulty Load
mov $0x5f5a80000000d7d, %rsi
nop
nop
nop
nop
add %r9, %r9
movups (%rsi), %xmm2
vpextrq $0, %xmm2, %r15
lea oracles, %rsi
and $0xff, %r15
shlq $12, %r15
mov (%rsi,%r15,1), %r15
pop %rsi
pop %rdx
pop %r9
pop %r15
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0, 'same': False, 'type': 'addresses_NC'}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0, 'same': True, 'type': 'addresses_NC'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'congruent': 8, 'same': False, 'type': 'addresses_UC_ht'}, 'dst': {'congruent': 8, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'REPM'}
{'src': {'NT': True, 'AVXalign': False, 'size': 32, 'congruent': 4, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 8, 'same': False, 'type': 'addresses_D_ht'}, 'dst': {'congruent': 6, 'same': True, 'type': 'addresses_WC_ht'}, 'OP': 'REPM'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 2, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'STOR'}
{'src': {'congruent': 7, 'same': False, 'type': 'addresses_D_ht'}, 'dst': {'congruent': 1, 'same': True, 'type': 'addresses_A_ht'}, 'OP': 'REPM'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0, 'same': True, 'type': 'addresses_A_ht'}, 'OP': 'STOR'}
{'src': {'congruent': 4, 'same': False, 'type': 'addresses_A_ht'}, 'dst': {'congruent': 6, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'REPM'}
{'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 6, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 5, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'STOR'}
{'src': {'congruent': 10, 'same': False, 'type': 'addresses_A_ht'}, 'dst': {'congruent': 9, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'REPM'}
{'src': {'NT': True, 'AVXalign': False, 'size': 2, 'congruent': 4, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 0, 'same': False, 'type': 'addresses_WT_ht'}, 'dst': {'congruent': 10, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'REPM'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'STOR'}
{'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/clic-subcommand.adb | reznikmm/clic | 0 | 13899 | <reponame>reznikmm/clic
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
package body CLIC.Subcommand is
-------------------
-- Define_Switch --
-------------------
procedure Define_Switch
(Config : in out Switches_Configuration;
Switch : String := "";
Long_Switch : String := "";
Help : String := "";
Section : String := "";
Argument : String := "ARG")
is
begin
GNAT.Command_Line.Define_Switch (Config.GNAT_Cfg,
Switch => Switch,
Long_Switch => Long_Switch,
Help => Help,
Section => Section,
Argument => Argument);
Add (Config.Info, Switch, Long_Switch, Help, Argument);
end Define_Switch;
-------------------
-- Define_Switch --
-------------------
procedure Define_Switch
(Config : in out Switches_Configuration;
Output : access Boolean;
Switch : String := "";
Long_Switch : String := "";
Help : String := "";
Section : String := "";
Value : Boolean := True)
is
begin
GNAT.Command_Line.Define_Switch (Config.GNAT_Cfg,
Output => Output,
Switch => Switch,
Long_Switch => Long_Switch,
Help => Help,
Section => Section,
Value => Value);
Add (Config.Info, Switch, Long_Switch, Help, "");
end Define_Switch;
-------------------
-- Define_Switch --
-------------------
procedure Define_Switch
(Config : in out Switches_Configuration;
Output : access Integer;
Switch : String := "";
Long_Switch : String := "";
Help : String := "";
Section : String := "";
Initial : Integer := 0;
Default : Integer := 1;
Argument : String := "ARG")
is
begin
GNAT.Command_Line.Define_Switch (Config.GNAT_Cfg,
Switch => Switch,
Output => Output,
Long_Switch => Long_Switch,
Help => Help,
Section => Section,
Initial => Initial,
Default => Default,
Argument => Argument);
Add (Config.Info, Switch, Long_Switch, Help, Argument);
end Define_Switch;
-------------------
-- Define_Switch --
-------------------
procedure Define_Switch
(Config : in out Switches_Configuration;
Output : access GNAT.Strings.String_Access;
Switch : String := "";
Long_Switch : String := "";
Help : String := "";
Section : String := "";
Argument : String := "ARG")
is
begin
GNAT.Command_Line.Define_Switch (Config.GNAT_Cfg,
Output => Output,
Switch => Switch,
Long_Switch => Long_Switch,
Help => Help,
Section => Section,
Argument => Argument);
Add (Config.Info, Switch, Long_Switch, Help, Argument);
end Define_Switch;
-------------------
-- Define_Switch --
-------------------
procedure Define_Switch
(Config : in out Switches_Configuration;
Callback : not null GNAT.Command_Line.Value_Callback;
Switch : String := "";
Long_Switch : String := "";
Help : String := "";
Section : String := "";
Argument : String := "ARG")
is
begin
GNAT.Command_Line.Define_Switch (Config.GNAT_Cfg,
Callback => Callback,
Switch => Switch,
Long_Switch => Long_Switch,
Help => Help,
Section => Section,
Argument => Argument);
Add (Config.Info, Switch, Long_Switch, Help, Argument);
end Define_Switch;
---------
-- Add --
---------
procedure Add (Vect : in out Switch_Info_Vectors.Vector;
Switch, Long_Switch, Help, Argument : String)
is
begin
Vect.Append (Switch_Info'(To_Unbounded_String (Switch),
To_Unbounded_String (Long_Switch),
To_Unbounded_String (Help),
To_Unbounded_String (Argument)));
end Add;
--------------------------
-- Verify_No_Duplicates --
--------------------------
function Verify_No_Duplicates (A, B : Switches_Configuration)
return Boolean
is
Seen : AAA.Strings.Set;
-- We track already set switches in this set; any re-appearance is
-- reported.
------------
-- Insert --
------------
function Insert (Switch : String) return Boolean is
-- Return True if OK; False otherwise.
begin
if Seen.Contains (Switch) then
return False;
else
Seen.Insert (Switch);
return True;
end if;
end Insert;
------------
-- Insert --
------------
function Insert (Switch, Long_Switch : String) return Boolean is
begin
-- Short version
if Switch /= "" and then
not Insert (Switch)
then
return False;
end if;
-- Long version
if Long_Switch /= "" and then
not Insert (Long_Switch)
then
return False;
end if;
return True;
end Insert;
begin
for Elt of A.Info loop
if not Insert (To_String (Elt.Switch), To_String (Elt.Long_Switch))
then
return False;
end if;
end loop;
for Elt of B.Info loop
if not Insert (To_String (Elt.Switch), To_String (Elt.Long_Switch))
then
return False;
end if;
end loop;
-- No duplication detected
return True;
end Verify_No_Duplicates;
end CLIC.Subcommand;
|
org.alloytools.alloy.extra/extra/models/book/appendixA/properties.als | Kaixi26/org.alloytools.alloy | 527 | 777 | <reponame>Kaixi26/org.alloytools.alloy
module appendixA/properties
pred show {
some r: univ->univ {
some r -- nonempty
r.r in r -- transitive
no iden & r -- irreflexive
~r in r -- symmetric
~r.r in iden -- functional
r.~r in iden -- injective
univ in r.univ -- total
univ in univ.r -- onto
}
}
run show for 4
assert ReformulateNonEmptinessOK {
all r: univ->univ |
some r iff (some x, y: univ | x->y in r)
}
check ReformulateNonEmptinessOK
|
clients/ada-server/generated/src/server/-skeletons.adb | shinesolutions/cloudmanager-api-clients | 3 | 13840 | -- 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.
--
-- The version of the OpenAPI document: 1.0.0
-- Contact: <EMAIL>
--
-- NOTE: This package is auto generated by OpenAPI-Generator 4.3.1-SNAPSHOT.
-- https://openapi-generator.tech
-- Do not edit the class manually.
with Swagger.Streams;
with Swagger.Servers.Operation;
package body .Skeletons is
package body Skeleton is
package API_Get_Branches is
new Swagger.Servers.Operation (Handler => Get_Branches,
Method => Swagger.Servers.GET,
URI => URI_Prefix & "/api/program/{programId}/repository/{repositoryId}/branches");
-- List Branches
procedure Get_Branches
(Req : in out Swagger.Servers.Request'Class;
Reply : in out Swagger.Servers.Response'Class;
Stream : in out Swagger.Servers.Output_Stream'Class;
Context : in out Swagger.Servers.Context_Type) is
Impl : Implementation_Type;
Program_Id : Swagger.UString;
Repository_Id : Swagger.UString;
X_Gw_Ims_Org_Id : Swagger.UString;
Authorization : Swagger.UString;
X_Api_Key : Swagger.UString;
Result : .Models.BranchList_Type;
begin
Swagger.Servers.Get_Path_Parameter (Req, 2, Program_Id);
Swagger.Servers.Get_Path_Parameter (Req, 2, Repository_Id);
Impl.Get_Branches
(Program_Id,
Repository_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key, Result, Context);
if Context.Get_Status = 200 then
Stream.Start_Document;
.Models.Serialize (Stream, "", Result);
Stream.End_Document;
end if;
end Get_Branches;
package API_Delete_Environment is
new Swagger.Servers.Operation (Handler => Delete_Environment,
Method => Swagger.Servers.DELETE,
URI => URI_Prefix & "/api/program/{programId}/environment/{environmentId}");
-- DeleteEnvironment
procedure Delete_Environment
(Req : in out Swagger.Servers.Request'Class;
Reply : in out Swagger.Servers.Response'Class;
Stream : in out Swagger.Servers.Output_Stream'Class;
Context : in out Swagger.Servers.Context_Type) is
Impl : Implementation_Type;
Program_Id : Swagger.UString;
Environment_Id : Swagger.UString;
X_Gw_Ims_Org_Id : Swagger.UString;
Authorization : Swagger.UString;
X_Api_Key : Swagger.UString;
Result : .Models.Environment_Type;
begin
Swagger.Servers.Get_Path_Parameter (Req, 2, Program_Id);
Swagger.Servers.Get_Path_Parameter (Req, 2, Environment_Id);
Impl.Delete_Environment
(Program_Id,
Environment_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key, Result, Context);
if Context.Get_Status = 200 then
Stream.Start_Document;
.Models.Serialize (Stream, "", Result);
Stream.End_Document;
end if;
end Delete_Environment;
package API_Download_Logs is
new Swagger.Servers.Operation (Handler => Download_Logs,
Method => Swagger.Servers.GET,
URI => URI_Prefix & "/api/program/{programId}/environment/{environmentId}/logs/download");
-- Download Logs
procedure Download_Logs
(Req : in out Swagger.Servers.Request'Class;
Reply : in out Swagger.Servers.Response'Class;
Stream : in out Swagger.Servers.Output_Stream'Class;
Context : in out Swagger.Servers.Context_Type) is
Impl : Implementation_Type;
Program_Id : Swagger.UString;
Environment_Id : Swagger.UString;
Service : Swagger.UString;
Name : Swagger.UString;
Date : Swagger.UString;
X_Gw_Ims_Org_Id : Swagger.UString;
Authorization : Swagger.UString;
X_Api_Key : Swagger.UString;
P_Accept : Swagger.Nullable_UString;
begin
Swagger.Servers.Get_Query_Parameter (Req, "service", Service);
Swagger.Servers.Get_Query_Parameter (Req, "name", Name);
Swagger.Servers.Get_Query_Parameter (Req, "date", Date);
Swagger.Servers.Get_Path_Parameter (Req, 2, Program_Id);
Swagger.Servers.Get_Path_Parameter (Req, 2, Environment_Id);
Impl.Download_Logs
(Program_Id,
Environment_Id,
Service,
Name,
Date,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key,
P_Accept, Context);
end Download_Logs;
package API_Get_Environment is
new Swagger.Servers.Operation (Handler => Get_Environment,
Method => Swagger.Servers.GET,
URI => URI_Prefix & "/api/program/{programId}/environment/{environmentId}");
-- Get Environment
procedure Get_Environment
(Req : in out Swagger.Servers.Request'Class;
Reply : in out Swagger.Servers.Response'Class;
Stream : in out Swagger.Servers.Output_Stream'Class;
Context : in out Swagger.Servers.Context_Type) is
Impl : Implementation_Type;
Program_Id : Swagger.UString;
Environment_Id : Swagger.UString;
X_Gw_Ims_Org_Id : Swagger.UString;
Authorization : Swagger.UString;
X_Api_Key : Swagger.UString;
Result : .Models.Environment_Type;
begin
Swagger.Servers.Get_Path_Parameter (Req, 2, Program_Id);
Swagger.Servers.Get_Path_Parameter (Req, 2, Environment_Id);
Impl.Get_Environment
(Program_Id,
Environment_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key, Result, Context);
if Context.Get_Status = 200 then
Stream.Start_Document;
.Models.Serialize (Stream, "", Result);
Stream.End_Document;
end if;
end Get_Environment;
package API_Get_Environment_Logs is
new Swagger.Servers.Operation (Handler => Get_Environment_Logs,
Method => Swagger.Servers.GET,
URI => URI_Prefix & "/api/program/{programId}/environment/{environmentId}/logs");
-- Get Environment Logs
procedure Get_Environment_Logs
(Req : in out Swagger.Servers.Request'Class;
Reply : in out Swagger.Servers.Response'Class;
Stream : in out Swagger.Servers.Output_Stream'Class;
Context : in out Swagger.Servers.Context_Type) is
Impl : Implementation_Type;
Program_Id : Swagger.UString;
Environment_Id : Swagger.UString;
Days : Integer;
X_Gw_Ims_Org_Id : Swagger.UString;
Authorization : Swagger.UString;
X_Api_Key : Swagger.UString;
Service : Swagger.UString_Vectors.Vector;
Name : Swagger.UString_Vectors.Vector;
Result : .Models.EnvironmentLogs_Type;
begin
Swagger.Servers.Get_Query_Parameter (Req, "service", Service);
Swagger.Servers.Get_Query_Parameter (Req, "name", Name);
Swagger.Servers.Get_Query_Parameter (Req, "days", Days);
Swagger.Servers.Get_Path_Parameter (Req, 2, Program_Id);
Swagger.Servers.Get_Path_Parameter (Req, 2, Environment_Id);
Impl.Get_Environment_Logs
(Program_Id,
Environment_Id,
Days,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key,
Service,
Name, Result, Context);
if Context.Get_Status = 200 then
Stream.Start_Document;
.Models.Serialize (Stream, "", Result);
Stream.End_Document;
end if;
end Get_Environment_Logs;
package API_Get_Environments is
new Swagger.Servers.Operation (Handler => Get_Environments,
Method => Swagger.Servers.GET,
URI => URI_Prefix & "/api/program/{programId}/environments");
-- List Environments
procedure Get_Environments
(Req : in out Swagger.Servers.Request'Class;
Reply : in out Swagger.Servers.Response'Class;
Stream : in out Swagger.Servers.Output_Stream'Class;
Context : in out Swagger.Servers.Context_Type) is
Impl : Implementation_Type;
Program_Id : Swagger.UString;
X_Gw_Ims_Org_Id : Swagger.UString;
Authorization : Swagger.UString;
X_Api_Key : Swagger.UString;
P_Type : Swagger.Nullable_UString;
Result : .Models.EnvironmentList_Type;
begin
Swagger.Servers.Get_Query_Parameter (Req, "type", P_Type);
Swagger.Servers.Get_Path_Parameter (Req, 1, Program_Id);
Impl.Get_Environments
(Program_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key,
P_Type, Result, Context);
if Context.Get_Status = 200 then
Stream.Start_Document;
.Models.Serialize (Stream, "", Result);
Stream.End_Document;
end if;
end Get_Environments;
package API_Advance_Pipeline_Execution is
new Swagger.Servers.Operation (Handler => Advance_Pipeline_Execution,
Method => Swagger.Servers.PUT,
URI => URI_Prefix & "/api/program/{programId}/pipeline/{pipelineId}/execution/{executionId}/phase/{phaseId}/step/{stepId}/advance");
-- Advance
procedure Advance_Pipeline_Execution
(Req : in out Swagger.Servers.Request'Class;
Reply : in out Swagger.Servers.Response'Class;
Stream : in out Swagger.Servers.Output_Stream'Class;
Context : in out Swagger.Servers.Context_Type) is
Input : Swagger.Value_Type;
Impl : Implementation_Type;
Program_Id : Swagger.UString;
Pipeline_Id : Swagger.UString;
Execution_Id : Swagger.UString;
Phase_Id : Swagger.UString;
Step_Id : Swagger.UString;
X_Gw_Ims_Org_Id : Swagger.UString;
Authorization : Swagger.UString;
X_Api_Key : Swagger.UString;
Content_Type : Swagger.UString;
P_Body : Swagger.Object;
begin
Swagger.Servers.Get_Path_Parameter (Req, 5, Program_Id);
Swagger.Servers.Get_Path_Parameter (Req, 5, Pipeline_Id);
Swagger.Servers.Get_Path_Parameter (Req, 5, Execution_Id);
Swagger.Servers.Get_Path_Parameter (Req, 5, Phase_Id);
Swagger.Servers.Get_Path_Parameter (Req, 5, Step_Id);
Swagger.Servers.Read (Req, Input);
.Models.Deserialize (Input, "body", P_Body);
Impl.Advance_Pipeline_Execution
(Program_Id,
Pipeline_Id,
Execution_Id,
Phase_Id,
Step_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key,
Content_Type,
P_Body, Context);
end Advance_Pipeline_Execution;
package API_Cancel_Pipeline_Execution_Step is
new Swagger.Servers.Operation (Handler => Cancel_Pipeline_Execution_Step,
Method => Swagger.Servers.PUT,
URI => URI_Prefix & "/api/program/{programId}/pipeline/{pipelineId}/execution/{executionId}/phase/{phaseId}/step/{stepId}/cancel");
-- Cancel
procedure Cancel_Pipeline_Execution_Step
(Req : in out Swagger.Servers.Request'Class;
Reply : in out Swagger.Servers.Response'Class;
Stream : in out Swagger.Servers.Output_Stream'Class;
Context : in out Swagger.Servers.Context_Type) is
Input : Swagger.Value_Type;
Impl : Implementation_Type;
Program_Id : Swagger.UString;
Pipeline_Id : Swagger.UString;
Execution_Id : Swagger.UString;
Phase_Id : Swagger.UString;
Step_Id : Swagger.UString;
X_Gw_Ims_Org_Id : Swagger.UString;
Authorization : Swagger.UString;
X_Api_Key : Swagger.UString;
Content_Type : Swagger.UString;
P_Body : Swagger.Object;
begin
Swagger.Servers.Get_Path_Parameter (Req, 5, Program_Id);
Swagger.Servers.Get_Path_Parameter (Req, 5, Pipeline_Id);
Swagger.Servers.Get_Path_Parameter (Req, 5, Execution_Id);
Swagger.Servers.Get_Path_Parameter (Req, 5, Phase_Id);
Swagger.Servers.Get_Path_Parameter (Req, 5, Step_Id);
Swagger.Servers.Read (Req, Input);
.Models.Deserialize (Input, "body", P_Body);
Impl.Cancel_Pipeline_Execution_Step
(Program_Id,
Pipeline_Id,
Execution_Id,
Phase_Id,
Step_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key,
Content_Type,
P_Body, Context);
end Cancel_Pipeline_Execution_Step;
package API_Get_Current_Execution is
new Swagger.Servers.Operation (Handler => Get_Current_Execution,
Method => Swagger.Servers.GET,
URI => URI_Prefix & "/api/program/{programId}/pipeline/{pipelineId}/execution");
-- Get current pipeline execution
procedure Get_Current_Execution
(Req : in out Swagger.Servers.Request'Class;
Reply : in out Swagger.Servers.Response'Class;
Stream : in out Swagger.Servers.Output_Stream'Class;
Context : in out Swagger.Servers.Context_Type) is
Impl : Implementation_Type;
Program_Id : Swagger.UString;
Pipeline_Id : Swagger.UString;
X_Gw_Ims_Org_Id : Swagger.UString;
Authorization : Swagger.UString;
X_Api_Key : Swagger.UString;
Result : .Models.PipelineExecution_Type;
begin
Swagger.Servers.Get_Path_Parameter (Req, 2, Program_Id);
Swagger.Servers.Get_Path_Parameter (Req, 2, Pipeline_Id);
Impl.Get_Current_Execution
(Program_Id,
Pipeline_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key, Result, Context);
if Context.Get_Status = 200 then
Stream.Start_Document;
.Models.Serialize (Stream, "", Result);
Stream.End_Document;
end if;
end Get_Current_Execution;
package API_Get_Execution is
new Swagger.Servers.Operation (Handler => Get_Execution,
Method => Swagger.Servers.GET,
URI => URI_Prefix & "/api/program/{programId}/pipeline/{pipelineId}/execution/{executionId}");
-- Get pipeline execution
procedure Get_Execution
(Req : in out Swagger.Servers.Request'Class;
Reply : in out Swagger.Servers.Response'Class;
Stream : in out Swagger.Servers.Output_Stream'Class;
Context : in out Swagger.Servers.Context_Type) is
Impl : Implementation_Type;
Program_Id : Swagger.UString;
Pipeline_Id : Swagger.UString;
Execution_Id : Swagger.UString;
X_Gw_Ims_Org_Id : Swagger.UString;
Authorization : Swagger.UString;
X_Api_Key : Swagger.UString;
Result : .Models.PipelineExecution_Type;
begin
Swagger.Servers.Get_Path_Parameter (Req, 3, Program_Id);
Swagger.Servers.Get_Path_Parameter (Req, 3, Pipeline_Id);
Swagger.Servers.Get_Path_Parameter (Req, 3, Execution_Id);
Impl.Get_Execution
(Program_Id,
Pipeline_Id,
Execution_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key, Result, Context);
if Context.Get_Status = 200 then
Stream.Start_Document;
.Models.Serialize (Stream, "", Result);
Stream.End_Document;
end if;
end Get_Execution;
package API_Get_Executions is
new Swagger.Servers.Operation (Handler => Get_Executions,
Method => Swagger.Servers.GET,
URI => URI_Prefix & "/api/program/{programId}/pipeline/{pipelineId}/executions");
-- List Executions
procedure Get_Executions
(Req : in out Swagger.Servers.Request'Class;
Reply : in out Swagger.Servers.Response'Class;
Stream : in out Swagger.Servers.Output_Stream'Class;
Context : in out Swagger.Servers.Context_Type) is
Impl : Implementation_Type;
Program_Id : Swagger.UString;
Pipeline_Id : Swagger.UString;
X_Gw_Ims_Org_Id : Swagger.UString;
Authorization : Swagger.UString;
X_Api_Key : Swagger.UString;
Start : Swagger.Nullable_UString;
Limit : Swagger.Nullable_Integer;
Result : .Models.PipelineExecutionListRepresentation_Type;
begin
Swagger.Servers.Get_Query_Parameter (Req, "start", Start);
Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit);
Swagger.Servers.Get_Path_Parameter (Req, 2, Program_Id);
Swagger.Servers.Get_Path_Parameter (Req, 2, Pipeline_Id);
Impl.Get_Executions
(Program_Id,
Pipeline_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key,
Start,
Limit, Result, Context);
if Context.Get_Status = 200 then
Stream.Start_Document;
.Models.Serialize (Stream, "", Result);
Stream.End_Document;
end if;
end Get_Executions;
package API_Get_Step_Logs is
new Swagger.Servers.Operation (Handler => Get_Step_Logs,
Method => Swagger.Servers.GET,
URI => URI_Prefix & "/api/program/{programId}/pipeline/{pipelineId}/execution/{executionId}/phase/{phaseId}/step/{stepId}/logs");
-- Get logs
procedure Get_Step_Logs
(Req : in out Swagger.Servers.Request'Class;
Reply : in out Swagger.Servers.Response'Class;
Stream : in out Swagger.Servers.Output_Stream'Class;
Context : in out Swagger.Servers.Context_Type) is
Impl : Implementation_Type;
Program_Id : Swagger.UString;
Pipeline_Id : Swagger.UString;
Execution_Id : Swagger.UString;
Phase_Id : Swagger.UString;
Step_Id : Swagger.UString;
X_Gw_Ims_Org_Id : Swagger.UString;
Authorization : Swagger.UString;
X_Api_Key : Swagger.UString;
File : Swagger.Nullable_UString;
P_Accept : Swagger.Nullable_UString;
begin
Swagger.Servers.Get_Query_Parameter (Req, "file", File);
Swagger.Servers.Get_Path_Parameter (Req, 5, Program_Id);
Swagger.Servers.Get_Path_Parameter (Req, 5, Pipeline_Id);
Swagger.Servers.Get_Path_Parameter (Req, 5, Execution_Id);
Swagger.Servers.Get_Path_Parameter (Req, 5, Phase_Id);
Swagger.Servers.Get_Path_Parameter (Req, 5, Step_Id);
Impl.Get_Step_Logs
(Program_Id,
Pipeline_Id,
Execution_Id,
Phase_Id,
Step_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key,
File,
P_Accept, Context);
end Get_Step_Logs;
package API_Start_Pipeline is
new Swagger.Servers.Operation (Handler => Start_Pipeline,
Method => Swagger.Servers.PUT,
URI => URI_Prefix & "/api/program/{programId}/pipeline/{pipelineId}/execution");
-- Start the pipeline
procedure Start_Pipeline
(Req : in out Swagger.Servers.Request'Class;
Reply : in out Swagger.Servers.Response'Class;
Stream : in out Swagger.Servers.Output_Stream'Class;
Context : in out Swagger.Servers.Context_Type) is
Impl : Implementation_Type;
Program_Id : Swagger.UString;
Pipeline_Id : Swagger.UString;
X_Gw_Ims_Org_Id : Swagger.UString;
Authorization : Swagger.UString;
X_Api_Key : Swagger.UString;
Content_Type : Swagger.UString;
begin
Swagger.Servers.Get_Path_Parameter (Req, 2, Program_Id);
Swagger.Servers.Get_Path_Parameter (Req, 2, Pipeline_Id);
Impl.Start_Pipeline
(Program_Id,
Pipeline_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key,
Content_Type, Context);
end Start_Pipeline;
package API_Step_Metric is
new Swagger.Servers.Operation (Handler => Step_Metric,
Method => Swagger.Servers.GET,
URI => URI_Prefix & "/api/program/{programId}/pipeline/{pipelineId}/execution/{executionId}/phase/{phaseId}/step/{stepId}/metrics");
-- Get step metrics
procedure Step_Metric
(Req : in out Swagger.Servers.Request'Class;
Reply : in out Swagger.Servers.Response'Class;
Stream : in out Swagger.Servers.Output_Stream'Class;
Context : in out Swagger.Servers.Context_Type) is
Impl : Implementation_Type;
Program_Id : Swagger.UString;
Pipeline_Id : Swagger.UString;
Execution_Id : Swagger.UString;
Phase_Id : Swagger.UString;
Step_Id : Swagger.UString;
X_Gw_Ims_Org_Id : Swagger.UString;
Authorization : Swagger.UString;
X_Api_Key : Swagger.UString;
Result : .Models.PipelineStepMetrics_Type;
begin
Swagger.Servers.Get_Path_Parameter (Req, 5, Program_Id);
Swagger.Servers.Get_Path_Parameter (Req, 5, Pipeline_Id);
Swagger.Servers.Get_Path_Parameter (Req, 5, Execution_Id);
Swagger.Servers.Get_Path_Parameter (Req, 5, Phase_Id);
Swagger.Servers.Get_Path_Parameter (Req, 5, Step_Id);
Impl.Step_Metric
(Program_Id,
Pipeline_Id,
Execution_Id,
Phase_Id,
Step_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key, Result, Context);
if Context.Get_Status = 200 then
Stream.Start_Document;
.Models.Serialize (Stream, "", Result);
Stream.End_Document;
end if;
end Step_Metric;
package API_Step_State is
new Swagger.Servers.Operation (Handler => Step_State,
Method => Swagger.Servers.GET,
URI => URI_Prefix & "/api/program/{programId}/pipeline/{pipelineId}/execution/{executionId}/phase/{phaseId}/step/{stepId}");
-- Get step state
procedure Step_State
(Req : in out Swagger.Servers.Request'Class;
Reply : in out Swagger.Servers.Response'Class;
Stream : in out Swagger.Servers.Output_Stream'Class;
Context : in out Swagger.Servers.Context_Type) is
Impl : Implementation_Type;
Program_Id : Swagger.UString;
Pipeline_Id : Swagger.UString;
Execution_Id : Swagger.UString;
Phase_Id : Swagger.UString;
Step_Id : Swagger.UString;
X_Gw_Ims_Org_Id : Swagger.UString;
Authorization : Swagger.UString;
X_Api_Key : Swagger.UString;
Result : .Models.PipelineExecutionStepState_Type;
begin
Swagger.Servers.Get_Path_Parameter (Req, 5, Program_Id);
Swagger.Servers.Get_Path_Parameter (Req, 5, Pipeline_Id);
Swagger.Servers.Get_Path_Parameter (Req, 5, Execution_Id);
Swagger.Servers.Get_Path_Parameter (Req, 5, Phase_Id);
Swagger.Servers.Get_Path_Parameter (Req, 5, Step_Id);
Impl.Step_State
(Program_Id,
Pipeline_Id,
Execution_Id,
Phase_Id,
Step_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key, Result, Context);
if Context.Get_Status = 200 then
Stream.Start_Document;
.Models.Serialize (Stream, "", Result);
Stream.End_Document;
end if;
end Step_State;
package API_Delete_Pipeline is
new Swagger.Servers.Operation (Handler => Delete_Pipeline,
Method => Swagger.Servers.DELETE,
URI => URI_Prefix & "/api/program/{programId}/pipeline/{pipelineId}");
-- Delete a Pipeline
procedure Delete_Pipeline
(Req : in out Swagger.Servers.Request'Class;
Reply : in out Swagger.Servers.Response'Class;
Stream : in out Swagger.Servers.Output_Stream'Class;
Context : in out Swagger.Servers.Context_Type) is
Impl : Implementation_Type;
Program_Id : Swagger.UString;
Pipeline_Id : Swagger.UString;
X_Gw_Ims_Org_Id : Swagger.UString;
Authorization : Swagger.UString;
X_Api_Key : Swagger.UString;
begin
Swagger.Servers.Get_Path_Parameter (Req, 2, Program_Id);
Swagger.Servers.Get_Path_Parameter (Req, 2, Pipeline_Id);
Impl.Delete_Pipeline
(Program_Id,
Pipeline_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key, Context);
end Delete_Pipeline;
package API_Get_Pipeline is
new Swagger.Servers.Operation (Handler => Get_Pipeline,
Method => Swagger.Servers.GET,
URI => URI_Prefix & "/api/program/{programId}/pipeline/{pipelineId}");
-- Get Pipeline
procedure Get_Pipeline
(Req : in out Swagger.Servers.Request'Class;
Reply : in out Swagger.Servers.Response'Class;
Stream : in out Swagger.Servers.Output_Stream'Class;
Context : in out Swagger.Servers.Context_Type) is
Impl : Implementation_Type;
Program_Id : Swagger.UString;
Pipeline_Id : Swagger.UString;
X_Gw_Ims_Org_Id : Swagger.UString;
Authorization : Swagger.UString;
X_Api_Key : Swagger.UString;
Result : .Models.Pipeline_Type;
begin
Swagger.Servers.Get_Path_Parameter (Req, 2, Program_Id);
Swagger.Servers.Get_Path_Parameter (Req, 2, Pipeline_Id);
Impl.Get_Pipeline
(Program_Id,
Pipeline_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key, Result, Context);
if Context.Get_Status = 200 then
Stream.Start_Document;
.Models.Serialize (Stream, "", Result);
Stream.End_Document;
end if;
end Get_Pipeline;
package API_Get_Pipelines is
new Swagger.Servers.Operation (Handler => Get_Pipelines,
Method => Swagger.Servers.GET,
URI => URI_Prefix & "/api/program/{programId}/pipelines");
-- List Pipelines
procedure Get_Pipelines
(Req : in out Swagger.Servers.Request'Class;
Reply : in out Swagger.Servers.Response'Class;
Stream : in out Swagger.Servers.Output_Stream'Class;
Context : in out Swagger.Servers.Context_Type) is
Impl : Implementation_Type;
Program_Id : Swagger.UString;
X_Gw_Ims_Org_Id : Swagger.UString;
Authorization : Swagger.UString;
X_Api_Key : Swagger.UString;
Result : .Models.PipelineList_Type;
begin
Swagger.Servers.Get_Path_Parameter (Req, 1, Program_Id);
Impl.Get_Pipelines
(Program_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key, Result, Context);
if Context.Get_Status = 200 then
Stream.Start_Document;
.Models.Serialize (Stream, "", Result);
Stream.End_Document;
end if;
end Get_Pipelines;
package API_Patch_Pipeline is
new Swagger.Servers.Operation (Handler => Patch_Pipeline,
Method => Swagger.Servers.PATCH,
URI => URI_Prefix & "/api/program/{programId}/pipeline/{pipelineId}");
-- Patches Pipeline
procedure Patch_Pipeline
(Req : in out Swagger.Servers.Request'Class;
Reply : in out Swagger.Servers.Response'Class;
Stream : in out Swagger.Servers.Output_Stream'Class;
Context : in out Swagger.Servers.Context_Type) is
Input : Swagger.Value_Type;
Impl : Implementation_Type;
Program_Id : Swagger.UString;
Pipeline_Id : Swagger.UString;
X_Gw_Ims_Org_Id : Swagger.UString;
Authorization : Swagger.UString;
X_Api_Key : Swagger.UString;
Content_Type : Swagger.UString;
P_Body : Pipeline_Type;
Result : .Models.Pipeline_Type;
begin
Swagger.Servers.Get_Path_Parameter (Req, 2, Program_Id);
Swagger.Servers.Get_Path_Parameter (Req, 2, Pipeline_Id);
Swagger.Servers.Read (Req, Input);
.Models.Deserialize (Input, "body", P_Body);
Impl.Patch_Pipeline
(Program_Id,
Pipeline_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key,
Content_Type,
P_Body, Result, Context);
if Context.Get_Status = 200 then
Stream.Start_Document;
.Models.Serialize (Stream, "", Result);
Stream.End_Document;
end if;
end Patch_Pipeline;
package API_Delete_Program is
new Swagger.Servers.Operation (Handler => Delete_Program,
Method => Swagger.Servers.DELETE,
URI => URI_Prefix & "/api/program/{programId}");
-- Delete Program
procedure Delete_Program
(Req : in out Swagger.Servers.Request'Class;
Reply : in out Swagger.Servers.Response'Class;
Stream : in out Swagger.Servers.Output_Stream'Class;
Context : in out Swagger.Servers.Context_Type) is
Impl : Implementation_Type;
Program_Id : Swagger.UString;
X_Gw_Ims_Org_Id : Swagger.UString;
Authorization : Swagger.UString;
X_Api_Key : Swagger.UString;
Result : .Models.Program_Type;
begin
Swagger.Servers.Get_Path_Parameter (Req, 1, Program_Id);
Impl.Delete_Program
(Program_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key, Result, Context);
if Context.Get_Status = 200 then
Stream.Start_Document;
.Models.Serialize (Stream, "", Result);
Stream.End_Document;
end if;
end Delete_Program;
package API_Get_Program is
new Swagger.Servers.Operation (Handler => Get_Program,
Method => Swagger.Servers.GET,
URI => URI_Prefix & "/api/program/{programId}");
-- Get Program
procedure Get_Program
(Req : in out Swagger.Servers.Request'Class;
Reply : in out Swagger.Servers.Response'Class;
Stream : in out Swagger.Servers.Output_Stream'Class;
Context : in out Swagger.Servers.Context_Type) is
Impl : Implementation_Type;
Program_Id : Swagger.UString;
X_Gw_Ims_Org_Id : Swagger.UString;
Authorization : Swagger.UString;
X_Api_Key : Swagger.UString;
Result : .Models.Program_Type;
begin
Swagger.Servers.Get_Path_Parameter (Req, 1, Program_Id);
Impl.Get_Program
(Program_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key, Result, Context);
if Context.Get_Status = 200 then
Stream.Start_Document;
.Models.Serialize (Stream, "", Result);
Stream.End_Document;
end if;
end Get_Program;
package API_Get_Programs is
new Swagger.Servers.Operation (Handler => Get_Programs,
Method => Swagger.Servers.GET,
URI => URI_Prefix & "/api/programs");
-- Lists Programs
procedure Get_Programs
(Req : in out Swagger.Servers.Request'Class;
Reply : in out Swagger.Servers.Response'Class;
Stream : in out Swagger.Servers.Output_Stream'Class;
Context : in out Swagger.Servers.Context_Type) is
Impl : Implementation_Type;
X_Gw_Ims_Org_Id : Swagger.UString;
Authorization : Swagger.UString;
X_Api_Key : Swagger.UString;
Result : .Models.ProgramList_Type;
begin
Impl.Get_Programs
(X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key, Result, Context);
if Context.Get_Status = 200 then
Stream.Start_Document;
.Models.Serialize (Stream, "", Result);
Stream.End_Document;
end if;
end Get_Programs;
package API_Get_Repositories is
new Swagger.Servers.Operation (Handler => Get_Repositories,
Method => Swagger.Servers.GET,
URI => URI_Prefix & "/api/program/{programId}/repositories");
-- Lists Repositories
procedure Get_Repositories
(Req : in out Swagger.Servers.Request'Class;
Reply : in out Swagger.Servers.Response'Class;
Stream : in out Swagger.Servers.Output_Stream'Class;
Context : in out Swagger.Servers.Context_Type) is
Impl : Implementation_Type;
Program_Id : Swagger.UString;
X_Gw_Ims_Org_Id : Swagger.UString;
Authorization : Swagger.UString;
X_Api_Key : Swagger.UString;
Result : .Models.RepositoryList_Type;
begin
Swagger.Servers.Get_Path_Parameter (Req, 1, Program_Id);
Impl.Get_Repositories
(Program_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key, Result, Context);
if Context.Get_Status = 200 then
Stream.Start_Document;
.Models.Serialize (Stream, "", Result);
Stream.End_Document;
end if;
end Get_Repositories;
package API_Get_Repository is
new Swagger.Servers.Operation (Handler => Get_Repository,
Method => Swagger.Servers.GET,
URI => URI_Prefix & "/api/program/{programId}/repository/{repositoryId}");
-- Get Repository
procedure Get_Repository
(Req : in out Swagger.Servers.Request'Class;
Reply : in out Swagger.Servers.Response'Class;
Stream : in out Swagger.Servers.Output_Stream'Class;
Context : in out Swagger.Servers.Context_Type) is
Impl : Implementation_Type;
Program_Id : Swagger.UString;
Repository_Id : Swagger.UString;
X_Gw_Ims_Org_Id : Swagger.UString;
Authorization : Swagger.UString;
X_Api_Key : Swagger.UString;
Result : .Models.Repository_Type;
begin
Swagger.Servers.Get_Path_Parameter (Req, 2, Program_Id);
Swagger.Servers.Get_Path_Parameter (Req, 2, Repository_Id);
Impl.Get_Repository
(Program_Id,
Repository_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key, Result, Context);
if Context.Get_Status = 200 then
Stream.Start_Document;
.Models.Serialize (Stream, "", Result);
Stream.End_Document;
end if;
end Get_Repository;
package API_Get_Environment_Variables is
new Swagger.Servers.Operation (Handler => Get_Environment_Variables,
Method => Swagger.Servers.GET,
URI => URI_Prefix & "/api/program/{programId}/environment/{environmentId}/variables");
-- List User Environment Variables
procedure Get_Environment_Variables
(Req : in out Swagger.Servers.Request'Class;
Reply : in out Swagger.Servers.Response'Class;
Stream : in out Swagger.Servers.Output_Stream'Class;
Context : in out Swagger.Servers.Context_Type) is
Impl : Implementation_Type;
Program_Id : Swagger.UString;
Environment_Id : Swagger.UString;
X_Gw_Ims_Org_Id : Swagger.UString;
Authorization : Swagger.UString;
X_Api_Key : Swagger.UString;
Result : .Models.VariableList_Type;
begin
Swagger.Servers.Get_Path_Parameter (Req, 2, Program_Id);
Swagger.Servers.Get_Path_Parameter (Req, 2, Environment_Id);
Impl.Get_Environment_Variables
(Program_Id,
Environment_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key, Result, Context);
if Context.Get_Status = 200 then
Stream.Start_Document;
.Models.Serialize (Stream, "", Result);
Stream.End_Document;
end if;
end Get_Environment_Variables;
package API_Patch_Environment_Variables is
new Swagger.Servers.Operation (Handler => Patch_Environment_Variables,
Method => Swagger.Servers.PATCH,
URI => URI_Prefix & "/api/program/{programId}/environment/{environmentId}/variables");
-- Patch User Environment Variables
procedure Patch_Environment_Variables
(Req : in out Swagger.Servers.Request'Class;
Reply : in out Swagger.Servers.Response'Class;
Stream : in out Swagger.Servers.Output_Stream'Class;
Context : in out Swagger.Servers.Context_Type) is
Input : Swagger.Value_Type;
Impl : Implementation_Type;
Program_Id : Swagger.UString;
Environment_Id : Swagger.UString;
X_Gw_Ims_Org_Id : Swagger.UString;
Authorization : Swagger.UString;
X_Api_Key : Swagger.UString;
Content_Type : Swagger.UString;
P_Body : .Models.Variable_Type_Vectors.Vector;
Result : .Models.VariableList_Type;
begin
Swagger.Servers.Get_Path_Parameter (Req, 2, Program_Id);
Swagger.Servers.Get_Path_Parameter (Req, 2, Environment_Id);
Swagger.Servers.Read (Req, Input);
.Models.Deserialize (Input, "body", P_Body);
Impl.Patch_Environment_Variables
(Program_Id,
Environment_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key,
Content_Type,
P_Body, Result, Context);
if Context.Get_Status = 200 then
Stream.Start_Document;
.Models.Serialize (Stream, "", Result);
Stream.End_Document;
end if;
end Patch_Environment_Variables;
procedure Register (Server : in out Swagger.Servers.Application_Type'Class) is
begin
Swagger.Servers.Register (Server, API_Get_Branches.Definition);
Swagger.Servers.Register (Server, API_Delete_Environment.Definition);
Swagger.Servers.Register (Server, API_Download_Logs.Definition);
Swagger.Servers.Register (Server, API_Get_Environment.Definition);
Swagger.Servers.Register (Server, API_Get_Environment_Logs.Definition);
Swagger.Servers.Register (Server, API_Get_Environments.Definition);
Swagger.Servers.Register (Server, API_Advance_Pipeline_Execution.Definition);
Swagger.Servers.Register (Server, API_Cancel_Pipeline_Execution_Step.Definition);
Swagger.Servers.Register (Server, API_Get_Current_Execution.Definition);
Swagger.Servers.Register (Server, API_Get_Execution.Definition);
Swagger.Servers.Register (Server, API_Get_Executions.Definition);
Swagger.Servers.Register (Server, API_Get_Step_Logs.Definition);
Swagger.Servers.Register (Server, API_Start_Pipeline.Definition);
Swagger.Servers.Register (Server, API_Step_Metric.Definition);
Swagger.Servers.Register (Server, API_Step_State.Definition);
Swagger.Servers.Register (Server, API_Delete_Pipeline.Definition);
Swagger.Servers.Register (Server, API_Get_Pipeline.Definition);
Swagger.Servers.Register (Server, API_Get_Pipelines.Definition);
Swagger.Servers.Register (Server, API_Patch_Pipeline.Definition);
Swagger.Servers.Register (Server, API_Delete_Program.Definition);
Swagger.Servers.Register (Server, API_Get_Program.Definition);
Swagger.Servers.Register (Server, API_Get_Programs.Definition);
Swagger.Servers.Register (Server, API_Get_Repositories.Definition);
Swagger.Servers.Register (Server, API_Get_Repository.Definition);
Swagger.Servers.Register (Server, API_Get_Environment_Variables.Definition);
Swagger.Servers.Register (Server, API_Patch_Environment_Variables.Definition);
end Register;
end Skeleton;
package body Shared_Instance is
-- List Branches
procedure Get_Branches
(Req : in out Swagger.Servers.Request'Class;
Reply : in out Swagger.Servers.Response'Class;
Stream : in out Swagger.Servers.Output_Stream'Class;
Context : in out Swagger.Servers.Context_Type) is
Program_Id : Swagger.UString;
Repository_Id : Swagger.UString;
X_Gw_Ims_Org_Id : Swagger.UString;
Authorization : Swagger.UString;
X_Api_Key : Swagger.UString;
Result : .Models.BranchList_Type;
begin
Swagger.Servers.Get_Path_Parameter (Req, 2, Program_Id);
Swagger.Servers.Get_Path_Parameter (Req, 2, Repository_Id);
Server.Get_Branches
(Program_Id,
Repository_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key, Result, Context);
if Context.Get_Status = 200 then
Stream.Start_Document;
.Models.Serialize (Stream, "", Result);
Stream.End_Document;
end if;
end Get_Branches;
package API_Get_Branches is
new Swagger.Servers.Operation (Handler => Get_Branches,
Method => Swagger.Servers.GET,
URI => URI_Prefix & "/api/program/{programId}/repository/{repositoryId}/branches");
-- DeleteEnvironment
procedure Delete_Environment
(Req : in out Swagger.Servers.Request'Class;
Reply : in out Swagger.Servers.Response'Class;
Stream : in out Swagger.Servers.Output_Stream'Class;
Context : in out Swagger.Servers.Context_Type) is
Program_Id : Swagger.UString;
Environment_Id : Swagger.UString;
X_Gw_Ims_Org_Id : Swagger.UString;
Authorization : Swagger.UString;
X_Api_Key : Swagger.UString;
Result : .Models.Environment_Type;
begin
Swagger.Servers.Get_Path_Parameter (Req, 2, Program_Id);
Swagger.Servers.Get_Path_Parameter (Req, 2, Environment_Id);
Server.Delete_Environment
(Program_Id,
Environment_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key, Result, Context);
if Context.Get_Status = 200 then
Stream.Start_Document;
.Models.Serialize (Stream, "", Result);
Stream.End_Document;
end if;
end Delete_Environment;
package API_Delete_Environment is
new Swagger.Servers.Operation (Handler => Delete_Environment,
Method => Swagger.Servers.DELETE,
URI => URI_Prefix & "/api/program/{programId}/environment/{environmentId}");
-- Download Logs
procedure Download_Logs
(Req : in out Swagger.Servers.Request'Class;
Reply : in out Swagger.Servers.Response'Class;
Stream : in out Swagger.Servers.Output_Stream'Class;
Context : in out Swagger.Servers.Context_Type) is
Program_Id : Swagger.UString;
Environment_Id : Swagger.UString;
Service : Swagger.UString;
Name : Swagger.UString;
Date : Swagger.UString;
X_Gw_Ims_Org_Id : Swagger.UString;
Authorization : Swagger.UString;
X_Api_Key : Swagger.UString;
P_Accept : Swagger.Nullable_UString;
begin
Swagger.Servers.Get_Query_Parameter (Req, "service", Service);
Swagger.Servers.Get_Query_Parameter (Req, "name", Name);
Swagger.Servers.Get_Query_Parameter (Req, "date", Date);
Swagger.Servers.Get_Path_Parameter (Req, 2, Program_Id);
Swagger.Servers.Get_Path_Parameter (Req, 2, Environment_Id);
Server.Download_Logs
(Program_Id,
Environment_Id,
Service,
Name,
Date,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key,
P_Accept, Context);
end Download_Logs;
package API_Download_Logs is
new Swagger.Servers.Operation (Handler => Download_Logs,
Method => Swagger.Servers.GET,
URI => URI_Prefix & "/api/program/{programId}/environment/{environmentId}/logs/download");
-- Get Environment
procedure Get_Environment
(Req : in out Swagger.Servers.Request'Class;
Reply : in out Swagger.Servers.Response'Class;
Stream : in out Swagger.Servers.Output_Stream'Class;
Context : in out Swagger.Servers.Context_Type) is
Program_Id : Swagger.UString;
Environment_Id : Swagger.UString;
X_Gw_Ims_Org_Id : Swagger.UString;
Authorization : Swagger.UString;
X_Api_Key : Swagger.UString;
Result : .Models.Environment_Type;
begin
Swagger.Servers.Get_Path_Parameter (Req, 2, Program_Id);
Swagger.Servers.Get_Path_Parameter (Req, 2, Environment_Id);
Server.Get_Environment
(Program_Id,
Environment_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key, Result, Context);
if Context.Get_Status = 200 then
Stream.Start_Document;
.Models.Serialize (Stream, "", Result);
Stream.End_Document;
end if;
end Get_Environment;
package API_Get_Environment is
new Swagger.Servers.Operation (Handler => Get_Environment,
Method => Swagger.Servers.GET,
URI => URI_Prefix & "/api/program/{programId}/environment/{environmentId}");
-- Get Environment Logs
procedure Get_Environment_Logs
(Req : in out Swagger.Servers.Request'Class;
Reply : in out Swagger.Servers.Response'Class;
Stream : in out Swagger.Servers.Output_Stream'Class;
Context : in out Swagger.Servers.Context_Type) is
Program_Id : Swagger.UString;
Environment_Id : Swagger.UString;
Days : Integer;
X_Gw_Ims_Org_Id : Swagger.UString;
Authorization : Swagger.UString;
X_Api_Key : Swagger.UString;
Service : Swagger.UString_Vectors.Vector;
Name : Swagger.UString_Vectors.Vector;
Result : .Models.EnvironmentLogs_Type;
begin
Swagger.Servers.Get_Query_Parameter (Req, "service", Service);
Swagger.Servers.Get_Query_Parameter (Req, "name", Name);
Swagger.Servers.Get_Query_Parameter (Req, "days", Days);
Swagger.Servers.Get_Path_Parameter (Req, 2, Program_Id);
Swagger.Servers.Get_Path_Parameter (Req, 2, Environment_Id);
Server.Get_Environment_Logs
(Program_Id,
Environment_Id,
Days,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key,
Service,
Name, Result, Context);
if Context.Get_Status = 200 then
Stream.Start_Document;
.Models.Serialize (Stream, "", Result);
Stream.End_Document;
end if;
end Get_Environment_Logs;
package API_Get_Environment_Logs is
new Swagger.Servers.Operation (Handler => Get_Environment_Logs,
Method => Swagger.Servers.GET,
URI => URI_Prefix & "/api/program/{programId}/environment/{environmentId}/logs");
-- List Environments
procedure Get_Environments
(Req : in out Swagger.Servers.Request'Class;
Reply : in out Swagger.Servers.Response'Class;
Stream : in out Swagger.Servers.Output_Stream'Class;
Context : in out Swagger.Servers.Context_Type) is
Program_Id : Swagger.UString;
X_Gw_Ims_Org_Id : Swagger.UString;
Authorization : Swagger.UString;
X_Api_Key : Swagger.UString;
P_Type : Swagger.Nullable_UString;
Result : .Models.EnvironmentList_Type;
begin
Swagger.Servers.Get_Query_Parameter (Req, "type", P_Type);
Swagger.Servers.Get_Path_Parameter (Req, 1, Program_Id);
Server.Get_Environments
(Program_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key,
P_Type, Result, Context);
if Context.Get_Status = 200 then
Stream.Start_Document;
.Models.Serialize (Stream, "", Result);
Stream.End_Document;
end if;
end Get_Environments;
package API_Get_Environments is
new Swagger.Servers.Operation (Handler => Get_Environments,
Method => Swagger.Servers.GET,
URI => URI_Prefix & "/api/program/{programId}/environments");
-- Advance
procedure Advance_Pipeline_Execution
(Req : in out Swagger.Servers.Request'Class;
Reply : in out Swagger.Servers.Response'Class;
Stream : in out Swagger.Servers.Output_Stream'Class;
Context : in out Swagger.Servers.Context_Type) is
Input : Swagger.Value_Type;
Program_Id : Swagger.UString;
Pipeline_Id : Swagger.UString;
Execution_Id : Swagger.UString;
Phase_Id : Swagger.UString;
Step_Id : Swagger.UString;
X_Gw_Ims_Org_Id : Swagger.UString;
Authorization : Swagger.UString;
X_Api_Key : Swagger.UString;
Content_Type : Swagger.UString;
P_Body : Swagger.Object;
begin
Swagger.Servers.Get_Path_Parameter (Req, 5, Program_Id);
Swagger.Servers.Get_Path_Parameter (Req, 5, Pipeline_Id);
Swagger.Servers.Get_Path_Parameter (Req, 5, Execution_Id);
Swagger.Servers.Get_Path_Parameter (Req, 5, Phase_Id);
Swagger.Servers.Get_Path_Parameter (Req, 5, Step_Id);
Swagger.Servers.Read (Req, Input);
.Models.Deserialize (Input, "body", P_Body);
Server.Advance_Pipeline_Execution
(Program_Id,
Pipeline_Id,
Execution_Id,
Phase_Id,
Step_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key,
Content_Type,
P_Body, Context);
end Advance_Pipeline_Execution;
package API_Advance_Pipeline_Execution is
new Swagger.Servers.Operation (Handler => Advance_Pipeline_Execution,
Method => Swagger.Servers.PUT,
URI => URI_Prefix & "/api/program/{programId}/pipeline/{pipelineId}/execution/{executionId}/phase/{phaseId}/step/{stepId}/advance");
-- Cancel
procedure Cancel_Pipeline_Execution_Step
(Req : in out Swagger.Servers.Request'Class;
Reply : in out Swagger.Servers.Response'Class;
Stream : in out Swagger.Servers.Output_Stream'Class;
Context : in out Swagger.Servers.Context_Type) is
Input : Swagger.Value_Type;
Program_Id : Swagger.UString;
Pipeline_Id : Swagger.UString;
Execution_Id : Swagger.UString;
Phase_Id : Swagger.UString;
Step_Id : Swagger.UString;
X_Gw_Ims_Org_Id : Swagger.UString;
Authorization : Swagger.UString;
X_Api_Key : Swagger.UString;
Content_Type : Swagger.UString;
P_Body : Swagger.Object;
begin
Swagger.Servers.Get_Path_Parameter (Req, 5, Program_Id);
Swagger.Servers.Get_Path_Parameter (Req, 5, Pipeline_Id);
Swagger.Servers.Get_Path_Parameter (Req, 5, Execution_Id);
Swagger.Servers.Get_Path_Parameter (Req, 5, Phase_Id);
Swagger.Servers.Get_Path_Parameter (Req, 5, Step_Id);
Swagger.Servers.Read (Req, Input);
.Models.Deserialize (Input, "body", P_Body);
Server.Cancel_Pipeline_Execution_Step
(Program_Id,
Pipeline_Id,
Execution_Id,
Phase_Id,
Step_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key,
Content_Type,
P_Body, Context);
end Cancel_Pipeline_Execution_Step;
package API_Cancel_Pipeline_Execution_Step is
new Swagger.Servers.Operation (Handler => Cancel_Pipeline_Execution_Step,
Method => Swagger.Servers.PUT,
URI => URI_Prefix & "/api/program/{programId}/pipeline/{pipelineId}/execution/{executionId}/phase/{phaseId}/step/{stepId}/cancel");
-- Get current pipeline execution
procedure Get_Current_Execution
(Req : in out Swagger.Servers.Request'Class;
Reply : in out Swagger.Servers.Response'Class;
Stream : in out Swagger.Servers.Output_Stream'Class;
Context : in out Swagger.Servers.Context_Type) is
Program_Id : Swagger.UString;
Pipeline_Id : Swagger.UString;
X_Gw_Ims_Org_Id : Swagger.UString;
Authorization : Swagger.UString;
X_Api_Key : Swagger.UString;
Result : .Models.PipelineExecution_Type;
begin
Swagger.Servers.Get_Path_Parameter (Req, 2, Program_Id);
Swagger.Servers.Get_Path_Parameter (Req, 2, Pipeline_Id);
Server.Get_Current_Execution
(Program_Id,
Pipeline_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key, Result, Context);
if Context.Get_Status = 200 then
Stream.Start_Document;
.Models.Serialize (Stream, "", Result);
Stream.End_Document;
end if;
end Get_Current_Execution;
package API_Get_Current_Execution is
new Swagger.Servers.Operation (Handler => Get_Current_Execution,
Method => Swagger.Servers.GET,
URI => URI_Prefix & "/api/program/{programId}/pipeline/{pipelineId}/execution");
-- Get pipeline execution
procedure Get_Execution
(Req : in out Swagger.Servers.Request'Class;
Reply : in out Swagger.Servers.Response'Class;
Stream : in out Swagger.Servers.Output_Stream'Class;
Context : in out Swagger.Servers.Context_Type) is
Program_Id : Swagger.UString;
Pipeline_Id : Swagger.UString;
Execution_Id : Swagger.UString;
X_Gw_Ims_Org_Id : Swagger.UString;
Authorization : Swagger.UString;
X_Api_Key : Swagger.UString;
Result : .Models.PipelineExecution_Type;
begin
Swagger.Servers.Get_Path_Parameter (Req, 3, Program_Id);
Swagger.Servers.Get_Path_Parameter (Req, 3, Pipeline_Id);
Swagger.Servers.Get_Path_Parameter (Req, 3, Execution_Id);
Server.Get_Execution
(Program_Id,
Pipeline_Id,
Execution_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key, Result, Context);
if Context.Get_Status = 200 then
Stream.Start_Document;
.Models.Serialize (Stream, "", Result);
Stream.End_Document;
end if;
end Get_Execution;
package API_Get_Execution is
new Swagger.Servers.Operation (Handler => Get_Execution,
Method => Swagger.Servers.GET,
URI => URI_Prefix & "/api/program/{programId}/pipeline/{pipelineId}/execution/{executionId}");
-- List Executions
procedure Get_Executions
(Req : in out Swagger.Servers.Request'Class;
Reply : in out Swagger.Servers.Response'Class;
Stream : in out Swagger.Servers.Output_Stream'Class;
Context : in out Swagger.Servers.Context_Type) is
Program_Id : Swagger.UString;
Pipeline_Id : Swagger.UString;
X_Gw_Ims_Org_Id : Swagger.UString;
Authorization : Swagger.UString;
X_Api_Key : Swagger.UString;
Start : Swagger.Nullable_UString;
Limit : Swagger.Nullable_Integer;
Result : .Models.PipelineExecutionListRepresentation_Type;
begin
Swagger.Servers.Get_Query_Parameter (Req, "start", Start);
Swagger.Servers.Get_Query_Parameter (Req, "limit", Limit);
Swagger.Servers.Get_Path_Parameter (Req, 2, Program_Id);
Swagger.Servers.Get_Path_Parameter (Req, 2, Pipeline_Id);
Server.Get_Executions
(Program_Id,
Pipeline_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key,
Start,
Limit, Result, Context);
if Context.Get_Status = 200 then
Stream.Start_Document;
.Models.Serialize (Stream, "", Result);
Stream.End_Document;
end if;
end Get_Executions;
package API_Get_Executions is
new Swagger.Servers.Operation (Handler => Get_Executions,
Method => Swagger.Servers.GET,
URI => URI_Prefix & "/api/program/{programId}/pipeline/{pipelineId}/executions");
-- Get logs
procedure Get_Step_Logs
(Req : in out Swagger.Servers.Request'Class;
Reply : in out Swagger.Servers.Response'Class;
Stream : in out Swagger.Servers.Output_Stream'Class;
Context : in out Swagger.Servers.Context_Type) is
Program_Id : Swagger.UString;
Pipeline_Id : Swagger.UString;
Execution_Id : Swagger.UString;
Phase_Id : Swagger.UString;
Step_Id : Swagger.UString;
X_Gw_Ims_Org_Id : Swagger.UString;
Authorization : Swagger.UString;
X_Api_Key : Swagger.UString;
File : Swagger.Nullable_UString;
P_Accept : Swagger.Nullable_UString;
begin
Swagger.Servers.Get_Query_Parameter (Req, "file", File);
Swagger.Servers.Get_Path_Parameter (Req, 5, Program_Id);
Swagger.Servers.Get_Path_Parameter (Req, 5, Pipeline_Id);
Swagger.Servers.Get_Path_Parameter (Req, 5, Execution_Id);
Swagger.Servers.Get_Path_Parameter (Req, 5, Phase_Id);
Swagger.Servers.Get_Path_Parameter (Req, 5, Step_Id);
Server.Get_Step_Logs
(Program_Id,
Pipeline_Id,
Execution_Id,
Phase_Id,
Step_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key,
File,
P_Accept, Context);
end Get_Step_Logs;
package API_Get_Step_Logs is
new Swagger.Servers.Operation (Handler => Get_Step_Logs,
Method => Swagger.Servers.GET,
URI => URI_Prefix & "/api/program/{programId}/pipeline/{pipelineId}/execution/{executionId}/phase/{phaseId}/step/{stepId}/logs");
-- Start the pipeline
procedure Start_Pipeline
(Req : in out Swagger.Servers.Request'Class;
Reply : in out Swagger.Servers.Response'Class;
Stream : in out Swagger.Servers.Output_Stream'Class;
Context : in out Swagger.Servers.Context_Type) is
Program_Id : Swagger.UString;
Pipeline_Id : Swagger.UString;
X_Gw_Ims_Org_Id : Swagger.UString;
Authorization : Swagger.UString;
X_Api_Key : Swagger.UString;
Content_Type : Swagger.UString;
begin
Swagger.Servers.Get_Path_Parameter (Req, 2, Program_Id);
Swagger.Servers.Get_Path_Parameter (Req, 2, Pipeline_Id);
Server.Start_Pipeline
(Program_Id,
Pipeline_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key,
Content_Type, Context);
end Start_Pipeline;
package API_Start_Pipeline is
new Swagger.Servers.Operation (Handler => Start_Pipeline,
Method => Swagger.Servers.PUT,
URI => URI_Prefix & "/api/program/{programId}/pipeline/{pipelineId}/execution");
-- Get step metrics
procedure Step_Metric
(Req : in out Swagger.Servers.Request'Class;
Reply : in out Swagger.Servers.Response'Class;
Stream : in out Swagger.Servers.Output_Stream'Class;
Context : in out Swagger.Servers.Context_Type) is
Program_Id : Swagger.UString;
Pipeline_Id : Swagger.UString;
Execution_Id : Swagger.UString;
Phase_Id : Swagger.UString;
Step_Id : Swagger.UString;
X_Gw_Ims_Org_Id : Swagger.UString;
Authorization : Swagger.UString;
X_Api_Key : Swagger.UString;
Result : .Models.PipelineStepMetrics_Type;
begin
Swagger.Servers.Get_Path_Parameter (Req, 5, Program_Id);
Swagger.Servers.Get_Path_Parameter (Req, 5, Pipeline_Id);
Swagger.Servers.Get_Path_Parameter (Req, 5, Execution_Id);
Swagger.Servers.Get_Path_Parameter (Req, 5, Phase_Id);
Swagger.Servers.Get_Path_Parameter (Req, 5, Step_Id);
Server.Step_Metric
(Program_Id,
Pipeline_Id,
Execution_Id,
Phase_Id,
Step_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key, Result, Context);
if Context.Get_Status = 200 then
Stream.Start_Document;
.Models.Serialize (Stream, "", Result);
Stream.End_Document;
end if;
end Step_Metric;
package API_Step_Metric is
new Swagger.Servers.Operation (Handler => Step_Metric,
Method => Swagger.Servers.GET,
URI => URI_Prefix & "/api/program/{programId}/pipeline/{pipelineId}/execution/{executionId}/phase/{phaseId}/step/{stepId}/metrics");
-- Get step state
procedure Step_State
(Req : in out Swagger.Servers.Request'Class;
Reply : in out Swagger.Servers.Response'Class;
Stream : in out Swagger.Servers.Output_Stream'Class;
Context : in out Swagger.Servers.Context_Type) is
Program_Id : Swagger.UString;
Pipeline_Id : Swagger.UString;
Execution_Id : Swagger.UString;
Phase_Id : Swagger.UString;
Step_Id : Swagger.UString;
X_Gw_Ims_Org_Id : Swagger.UString;
Authorization : Swagger.UString;
X_Api_Key : Swagger.UString;
Result : .Models.PipelineExecutionStepState_Type;
begin
Swagger.Servers.Get_Path_Parameter (Req, 5, Program_Id);
Swagger.Servers.Get_Path_Parameter (Req, 5, Pipeline_Id);
Swagger.Servers.Get_Path_Parameter (Req, 5, Execution_Id);
Swagger.Servers.Get_Path_Parameter (Req, 5, Phase_Id);
Swagger.Servers.Get_Path_Parameter (Req, 5, Step_Id);
Server.Step_State
(Program_Id,
Pipeline_Id,
Execution_Id,
Phase_Id,
Step_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key, Result, Context);
if Context.Get_Status = 200 then
Stream.Start_Document;
.Models.Serialize (Stream, "", Result);
Stream.End_Document;
end if;
end Step_State;
package API_Step_State is
new Swagger.Servers.Operation (Handler => Step_State,
Method => Swagger.Servers.GET,
URI => URI_Prefix & "/api/program/{programId}/pipeline/{pipelineId}/execution/{executionId}/phase/{phaseId}/step/{stepId}");
-- Delete a Pipeline
procedure Delete_Pipeline
(Req : in out Swagger.Servers.Request'Class;
Reply : in out Swagger.Servers.Response'Class;
Stream : in out Swagger.Servers.Output_Stream'Class;
Context : in out Swagger.Servers.Context_Type) is
Program_Id : Swagger.UString;
Pipeline_Id : Swagger.UString;
X_Gw_Ims_Org_Id : Swagger.UString;
Authorization : Swagger.UString;
X_Api_Key : Swagger.UString;
begin
Swagger.Servers.Get_Path_Parameter (Req, 2, Program_Id);
Swagger.Servers.Get_Path_Parameter (Req, 2, Pipeline_Id);
Server.Delete_Pipeline
(Program_Id,
Pipeline_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key, Context);
end Delete_Pipeline;
package API_Delete_Pipeline is
new Swagger.Servers.Operation (Handler => Delete_Pipeline,
Method => Swagger.Servers.DELETE,
URI => URI_Prefix & "/api/program/{programId}/pipeline/{pipelineId}");
-- Get Pipeline
procedure Get_Pipeline
(Req : in out Swagger.Servers.Request'Class;
Reply : in out Swagger.Servers.Response'Class;
Stream : in out Swagger.Servers.Output_Stream'Class;
Context : in out Swagger.Servers.Context_Type) is
Program_Id : Swagger.UString;
Pipeline_Id : Swagger.UString;
X_Gw_Ims_Org_Id : Swagger.UString;
Authorization : Swagger.UString;
X_Api_Key : Swagger.UString;
Result : .Models.Pipeline_Type;
begin
Swagger.Servers.Get_Path_Parameter (Req, 2, Program_Id);
Swagger.Servers.Get_Path_Parameter (Req, 2, Pipeline_Id);
Server.Get_Pipeline
(Program_Id,
Pipeline_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key, Result, Context);
if Context.Get_Status = 200 then
Stream.Start_Document;
.Models.Serialize (Stream, "", Result);
Stream.End_Document;
end if;
end Get_Pipeline;
package API_Get_Pipeline is
new Swagger.Servers.Operation (Handler => Get_Pipeline,
Method => Swagger.Servers.GET,
URI => URI_Prefix & "/api/program/{programId}/pipeline/{pipelineId}");
-- List Pipelines
procedure Get_Pipelines
(Req : in out Swagger.Servers.Request'Class;
Reply : in out Swagger.Servers.Response'Class;
Stream : in out Swagger.Servers.Output_Stream'Class;
Context : in out Swagger.Servers.Context_Type) is
Program_Id : Swagger.UString;
X_Gw_Ims_Org_Id : Swagger.UString;
Authorization : Swagger.UString;
X_Api_Key : Swagger.UString;
Result : .Models.PipelineList_Type;
begin
Swagger.Servers.Get_Path_Parameter (Req, 1, Program_Id);
Server.Get_Pipelines
(Program_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key, Result, Context);
if Context.Get_Status = 200 then
Stream.Start_Document;
.Models.Serialize (Stream, "", Result);
Stream.End_Document;
end if;
end Get_Pipelines;
package API_Get_Pipelines is
new Swagger.Servers.Operation (Handler => Get_Pipelines,
Method => Swagger.Servers.GET,
URI => URI_Prefix & "/api/program/{programId}/pipelines");
-- Patches Pipeline
procedure Patch_Pipeline
(Req : in out Swagger.Servers.Request'Class;
Reply : in out Swagger.Servers.Response'Class;
Stream : in out Swagger.Servers.Output_Stream'Class;
Context : in out Swagger.Servers.Context_Type) is
Input : Swagger.Value_Type;
Program_Id : Swagger.UString;
Pipeline_Id : Swagger.UString;
X_Gw_Ims_Org_Id : Swagger.UString;
Authorization : Swagger.UString;
X_Api_Key : Swagger.UString;
Content_Type : Swagger.UString;
P_Body : Pipeline_Type;
Result : .Models.Pipeline_Type;
begin
Swagger.Servers.Get_Path_Parameter (Req, 2, Program_Id);
Swagger.Servers.Get_Path_Parameter (Req, 2, Pipeline_Id);
Swagger.Servers.Read (Req, Input);
.Models.Deserialize (Input, "body", P_Body);
Server.Patch_Pipeline
(Program_Id,
Pipeline_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key,
Content_Type,
P_Body, Result, Context);
if Context.Get_Status = 200 then
Stream.Start_Document;
.Models.Serialize (Stream, "", Result);
Stream.End_Document;
end if;
end Patch_Pipeline;
package API_Patch_Pipeline is
new Swagger.Servers.Operation (Handler => Patch_Pipeline,
Method => Swagger.Servers.PATCH,
URI => URI_Prefix & "/api/program/{programId}/pipeline/{pipelineId}");
-- Delete Program
procedure Delete_Program
(Req : in out Swagger.Servers.Request'Class;
Reply : in out Swagger.Servers.Response'Class;
Stream : in out Swagger.Servers.Output_Stream'Class;
Context : in out Swagger.Servers.Context_Type) is
Program_Id : Swagger.UString;
X_Gw_Ims_Org_Id : Swagger.UString;
Authorization : Swagger.UString;
X_Api_Key : Swagger.UString;
Result : .Models.Program_Type;
begin
Swagger.Servers.Get_Path_Parameter (Req, 1, Program_Id);
Server.Delete_Program
(Program_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key, Result, Context);
if Context.Get_Status = 200 then
Stream.Start_Document;
.Models.Serialize (Stream, "", Result);
Stream.End_Document;
end if;
end Delete_Program;
package API_Delete_Program is
new Swagger.Servers.Operation (Handler => Delete_Program,
Method => Swagger.Servers.DELETE,
URI => URI_Prefix & "/api/program/{programId}");
-- Get Program
procedure Get_Program
(Req : in out Swagger.Servers.Request'Class;
Reply : in out Swagger.Servers.Response'Class;
Stream : in out Swagger.Servers.Output_Stream'Class;
Context : in out Swagger.Servers.Context_Type) is
Program_Id : Swagger.UString;
X_Gw_Ims_Org_Id : Swagger.UString;
Authorization : Swagger.UString;
X_Api_Key : Swagger.UString;
Result : .Models.Program_Type;
begin
Swagger.Servers.Get_Path_Parameter (Req, 1, Program_Id);
Server.Get_Program
(Program_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key, Result, Context);
if Context.Get_Status = 200 then
Stream.Start_Document;
.Models.Serialize (Stream, "", Result);
Stream.End_Document;
end if;
end Get_Program;
package API_Get_Program is
new Swagger.Servers.Operation (Handler => Get_Program,
Method => Swagger.Servers.GET,
URI => URI_Prefix & "/api/program/{programId}");
-- Lists Programs
procedure Get_Programs
(Req : in out Swagger.Servers.Request'Class;
Reply : in out Swagger.Servers.Response'Class;
Stream : in out Swagger.Servers.Output_Stream'Class;
Context : in out Swagger.Servers.Context_Type) is
X_Gw_Ims_Org_Id : Swagger.UString;
Authorization : Swagger.UString;
X_Api_Key : Swagger.UString;
Result : .Models.ProgramList_Type;
begin
Server.Get_Programs
(X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key, Result, Context);
if Context.Get_Status = 200 then
Stream.Start_Document;
.Models.Serialize (Stream, "", Result);
Stream.End_Document;
end if;
end Get_Programs;
package API_Get_Programs is
new Swagger.Servers.Operation (Handler => Get_Programs,
Method => Swagger.Servers.GET,
URI => URI_Prefix & "/api/programs");
-- Lists Repositories
procedure Get_Repositories
(Req : in out Swagger.Servers.Request'Class;
Reply : in out Swagger.Servers.Response'Class;
Stream : in out Swagger.Servers.Output_Stream'Class;
Context : in out Swagger.Servers.Context_Type) is
Program_Id : Swagger.UString;
X_Gw_Ims_Org_Id : Swagger.UString;
Authorization : Swagger.UString;
X_Api_Key : Swagger.UString;
Result : .Models.RepositoryList_Type;
begin
Swagger.Servers.Get_Path_Parameter (Req, 1, Program_Id);
Server.Get_Repositories
(Program_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key, Result, Context);
if Context.Get_Status = 200 then
Stream.Start_Document;
.Models.Serialize (Stream, "", Result);
Stream.End_Document;
end if;
end Get_Repositories;
package API_Get_Repositories is
new Swagger.Servers.Operation (Handler => Get_Repositories,
Method => Swagger.Servers.GET,
URI => URI_Prefix & "/api/program/{programId}/repositories");
-- Get Repository
procedure Get_Repository
(Req : in out Swagger.Servers.Request'Class;
Reply : in out Swagger.Servers.Response'Class;
Stream : in out Swagger.Servers.Output_Stream'Class;
Context : in out Swagger.Servers.Context_Type) is
Program_Id : Swagger.UString;
Repository_Id : Swagger.UString;
X_Gw_Ims_Org_Id : Swagger.UString;
Authorization : Swagger.UString;
X_Api_Key : Swagger.UString;
Result : .Models.Repository_Type;
begin
Swagger.Servers.Get_Path_Parameter (Req, 2, Program_Id);
Swagger.Servers.Get_Path_Parameter (Req, 2, Repository_Id);
Server.Get_Repository
(Program_Id,
Repository_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key, Result, Context);
if Context.Get_Status = 200 then
Stream.Start_Document;
.Models.Serialize (Stream, "", Result);
Stream.End_Document;
end if;
end Get_Repository;
package API_Get_Repository is
new Swagger.Servers.Operation (Handler => Get_Repository,
Method => Swagger.Servers.GET,
URI => URI_Prefix & "/api/program/{programId}/repository/{repositoryId}");
-- List User Environment Variables
procedure Get_Environment_Variables
(Req : in out Swagger.Servers.Request'Class;
Reply : in out Swagger.Servers.Response'Class;
Stream : in out Swagger.Servers.Output_Stream'Class;
Context : in out Swagger.Servers.Context_Type) is
Program_Id : Swagger.UString;
Environment_Id : Swagger.UString;
X_Gw_Ims_Org_Id : Swagger.UString;
Authorization : Swagger.UString;
X_Api_Key : Swagger.UString;
Result : .Models.VariableList_Type;
begin
Swagger.Servers.Get_Path_Parameter (Req, 2, Program_Id);
Swagger.Servers.Get_Path_Parameter (Req, 2, Environment_Id);
Server.Get_Environment_Variables
(Program_Id,
Environment_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key, Result, Context);
if Context.Get_Status = 200 then
Stream.Start_Document;
.Models.Serialize (Stream, "", Result);
Stream.End_Document;
end if;
end Get_Environment_Variables;
package API_Get_Environment_Variables is
new Swagger.Servers.Operation (Handler => Get_Environment_Variables,
Method => Swagger.Servers.GET,
URI => URI_Prefix & "/api/program/{programId}/environment/{environmentId}/variables");
-- Patch User Environment Variables
procedure Patch_Environment_Variables
(Req : in out Swagger.Servers.Request'Class;
Reply : in out Swagger.Servers.Response'Class;
Stream : in out Swagger.Servers.Output_Stream'Class;
Context : in out Swagger.Servers.Context_Type) is
Input : Swagger.Value_Type;
Program_Id : Swagger.UString;
Environment_Id : Swagger.UString;
X_Gw_Ims_Org_Id : Swagger.UString;
Authorization : Swagger.UString;
X_Api_Key : Swagger.UString;
Content_Type : Swagger.UString;
P_Body : .Models.Variable_Type_Vectors.Vector;
Result : .Models.VariableList_Type;
begin
Swagger.Servers.Get_Path_Parameter (Req, 2, Program_Id);
Swagger.Servers.Get_Path_Parameter (Req, 2, Environment_Id);
Swagger.Servers.Read (Req, Input);
.Models.Deserialize (Input, "body", P_Body);
Server.Patch_Environment_Variables
(Program_Id,
Environment_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key,
Content_Type,
P_Body, Result, Context);
if Context.Get_Status = 200 then
Stream.Start_Document;
.Models.Serialize (Stream, "", Result);
Stream.End_Document;
end if;
end Patch_Environment_Variables;
package API_Patch_Environment_Variables is
new Swagger.Servers.Operation (Handler => Patch_Environment_Variables,
Method => Swagger.Servers.PATCH,
URI => URI_Prefix & "/api/program/{programId}/environment/{environmentId}/variables");
procedure Register (Server : in out Swagger.Servers.Application_Type'Class) is
begin
Swagger.Servers.Register (Server, API_Get_Branches.Definition);
Swagger.Servers.Register (Server, API_Delete_Environment.Definition);
Swagger.Servers.Register (Server, API_Download_Logs.Definition);
Swagger.Servers.Register (Server, API_Get_Environment.Definition);
Swagger.Servers.Register (Server, API_Get_Environment_Logs.Definition);
Swagger.Servers.Register (Server, API_Get_Environments.Definition);
Swagger.Servers.Register (Server, API_Advance_Pipeline_Execution.Definition);
Swagger.Servers.Register (Server, API_Cancel_Pipeline_Execution_Step.Definition);
Swagger.Servers.Register (Server, API_Get_Current_Execution.Definition);
Swagger.Servers.Register (Server, API_Get_Execution.Definition);
Swagger.Servers.Register (Server, API_Get_Executions.Definition);
Swagger.Servers.Register (Server, API_Get_Step_Logs.Definition);
Swagger.Servers.Register (Server, API_Start_Pipeline.Definition);
Swagger.Servers.Register (Server, API_Step_Metric.Definition);
Swagger.Servers.Register (Server, API_Step_State.Definition);
Swagger.Servers.Register (Server, API_Delete_Pipeline.Definition);
Swagger.Servers.Register (Server, API_Get_Pipeline.Definition);
Swagger.Servers.Register (Server, API_Get_Pipelines.Definition);
Swagger.Servers.Register (Server, API_Patch_Pipeline.Definition);
Swagger.Servers.Register (Server, API_Delete_Program.Definition);
Swagger.Servers.Register (Server, API_Get_Program.Definition);
Swagger.Servers.Register (Server, API_Get_Programs.Definition);
Swagger.Servers.Register (Server, API_Get_Repositories.Definition);
Swagger.Servers.Register (Server, API_Get_Repository.Definition);
Swagger.Servers.Register (Server, API_Get_Environment_Variables.Definition);
Swagger.Servers.Register (Server, API_Patch_Environment_Variables.Definition);
end Register;
protected body Server is
-- List Branches
procedure Get_Branches
(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
Impl.Get_Branches
(Program_Id,
Repository_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key,
Result,
Context);
end Get_Branches;
-- DeleteEnvironment
procedure Delete_Environment
(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
Impl.Delete_Environment
(Program_Id,
Environment_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key,
Result,
Context);
end Delete_Environment;
-- Download Logs
procedure Download_Logs
(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
Impl.Download_Logs
(Program_Id,
Environment_Id,
Service,
Name,
Date,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key,
P_Accept,
Context);
end Download_Logs;
-- Get Environment
procedure Get_Environment
(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
Impl.Get_Environment
(Program_Id,
Environment_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key,
Result,
Context);
end Get_Environment;
-- Get Environment Logs
procedure Get_Environment_Logs
(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
Impl.Get_Environment_Logs
(Program_Id,
Environment_Id,
Days,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key,
Service,
Name,
Result,
Context);
end Get_Environment_Logs;
-- List Environments
procedure Get_Environments
(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
Impl.Get_Environments
(Program_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key,
P_Type,
Result,
Context);
end Get_Environments;
-- Advance
procedure Advance_Pipeline_Execution
(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
Impl.Advance_Pipeline_Execution
(Program_Id,
Pipeline_Id,
Execution_Id,
Phase_Id,
Step_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key,
Content_Type,
P_Body,
Context);
end Advance_Pipeline_Execution;
-- Cancel
procedure Cancel_Pipeline_Execution_Step
(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
Impl.Cancel_Pipeline_Execution_Step
(Program_Id,
Pipeline_Id,
Execution_Id,
Phase_Id,
Step_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key,
Content_Type,
P_Body,
Context);
end Cancel_Pipeline_Execution_Step;
-- Get current pipeline execution
procedure Get_Current_Execution
(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
Impl.Get_Current_Execution
(Program_Id,
Pipeline_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key,
Result,
Context);
end Get_Current_Execution;
-- Get pipeline execution
procedure Get_Execution
(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
Impl.Get_Execution
(Program_Id,
Pipeline_Id,
Execution_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key,
Result,
Context);
end Get_Execution;
-- List Executions
procedure Get_Executions
(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
Impl.Get_Executions
(Program_Id,
Pipeline_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key,
Start,
Limit,
Result,
Context);
end Get_Executions;
-- Get logs
procedure Get_Step_Logs
(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
Impl.Get_Step_Logs
(Program_Id,
Pipeline_Id,
Execution_Id,
Phase_Id,
Step_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key,
File,
P_Accept,
Context);
end Get_Step_Logs;
-- Start the pipeline
procedure Start_Pipeline
(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
Impl.Start_Pipeline
(Program_Id,
Pipeline_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key,
Content_Type,
Context);
end Start_Pipeline;
-- Get step metrics
procedure Step_Metric
(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
Impl.Step_Metric
(Program_Id,
Pipeline_Id,
Execution_Id,
Phase_Id,
Step_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key,
Result,
Context);
end Step_Metric;
-- Get step state
procedure Step_State
(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
Impl.Step_State
(Program_Id,
Pipeline_Id,
Execution_Id,
Phase_Id,
Step_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key,
Result,
Context);
end Step_State;
-- Delete a Pipeline
procedure Delete_Pipeline
(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
Impl.Delete_Pipeline
(Program_Id,
Pipeline_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key,
Context);
end Delete_Pipeline;
-- Get Pipeline
procedure Get_Pipeline
(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
Impl.Get_Pipeline
(Program_Id,
Pipeline_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key,
Result,
Context);
end Get_Pipeline;
-- List Pipelines
procedure Get_Pipelines
(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
Impl.Get_Pipelines
(Program_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key,
Result,
Context);
end Get_Pipelines;
-- Patches Pipeline
procedure Patch_Pipeline
(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
Impl.Patch_Pipeline
(Program_Id,
Pipeline_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key,
Content_Type,
P_Body,
Result,
Context);
end Patch_Pipeline;
-- Delete Program
procedure Delete_Program
(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
Impl.Delete_Program
(Program_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key,
Result,
Context);
end Delete_Program;
-- Get Program
procedure Get_Program
(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
Impl.Get_Program
(Program_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key,
Result,
Context);
end Get_Program;
-- Lists Programs
procedure Get_Programs
(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
Impl.Get_Programs
(X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key,
Result,
Context);
end Get_Programs;
-- Lists Repositories
procedure Get_Repositories
(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
Impl.Get_Repositories
(Program_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key,
Result,
Context);
end Get_Repositories;
-- Get Repository
procedure Get_Repository
(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
Impl.Get_Repository
(Program_Id,
Repository_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key,
Result,
Context);
end Get_Repository;
-- List User Environment Variables
procedure Get_Environment_Variables
(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
Impl.Get_Environment_Variables
(Program_Id,
Environment_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key,
Result,
Context);
end Get_Environment_Variables;
-- Patch User Environment Variables
procedure Patch_Environment_Variables
(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
Impl.Patch_Environment_Variables
(Program_Id,
Environment_Id,
X_Gw_Ims_Org_Id,
Authorization,
X_Api_Key,
Content_Type,
P_Body,
Result,
Context);
end Patch_Environment_Variables;
end Server;
end Shared_Instance;
end .Skeletons;
|
oeis/250/A250613.asm | neoneye/loda-programs | 11 | 162779 | ; A250613: Number of (n+1)X(1+1) 0..2 arrays with nondecreasing maximum of every two consecutive values in every row and column
; Submitted by <NAME>
; 81,484,2704,13456,64009,290521,1283689,5541316,23541904,98724096,410022001,1689785449,6922406401,28223328004,114636416400,464224195600,1875379608025,7561592527225,30441493099161,122399217842724,491650975625616,1973263620930624,7914639023562049,31728491043754761,127140505428634929,509295714470381476,2039558690138291344,8165927162263518736,32688612412594986409,130835067677107324441,523601228920598756041,2095249584497205127684,8383732242442227216016,33543777375027368100864,134203746958658148766225
add $0,3
lpb $0
sub $0,1
add $1,1
mul $1,2
mov $5,$4
mov $4,$2
add $2,1
add $5,$2
mov $2,$3
add $4,$1
add $5,$4
mov $3,$5
lpe
pow $3,2
mov $0,$3
div $0,9
|
libsrc/_DEVELOPMENT/stdio/c/sccz80/fopen_callee.asm | meesokim/z88dk | 0 | 176694 | <gh_stars>0
; FILE *fopen(const char *filename, const char *mode)
SECTION code_stdio
PUBLIC fopen_callee
EXTERN asm_fopen
fopen_callee:
pop hl
pop de
ex (sp),hl
jp asm_fopen
|
data/jpred4/jp_batch_1613899824__zJBvGNA/jp_batch_1613899824__zJBvGNA.als | jonriege/predict-protein-structure | 0 | 3877 | <gh_stars>0
SILENT_MODE
BLOCK_FILE jp_batch_1613899824__zJBvGNA.concise.blc
MAX_NSEQ 668
MAX_INPUT_LEN 670
OUTPUT_FILE jp_batch_1613899824__zJBvGNA.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 124 657 4
Ccol_CHARS H ALL 5
Ccol_CHARS P ALL 8
SURROUND_CHARS LIV ALL
#
# Replace known structure types with whitespace
SUB_CHARS 1 658 124 667 H SPACE
SUB_CHARS 1 658 124 667 E SPACE
SUB_CHARS 1 658 124 667 - SPACE
STRAND 45 661 47
COLOUR_TEXT_REGION 45 661 47 661 51
STRAND 72 661 74
COLOUR_TEXT_REGION 72 661 74 661 51
STRAND 80 661 86
COLOUR_TEXT_REGION 80 661 86 661 51
STRAND 96 661 101
COLOUR_TEXT_REGION 96 661 101 661 51
STRAND 105 661 110
COLOUR_TEXT_REGION 105 661 110 661 51
STRAND 117 661 120
COLOUR_TEXT_REGION 117 661 120 661 51
HELIX 4 661 12
COLOUR_TEXT_REGION 4 661 12 661 50
HELIX 25 661 34
COLOUR_TEXT_REGION 25 661 34 661 50
HELIX 51 661 58
COLOUR_TEXT_REGION 51 661 58 661 50
STRAND 45 666 47
COLOUR_TEXT_REGION 45 666 47 666 51
STRAND 73 666 74
COLOUR_TEXT_REGION 73 666 74 666 51
STRAND 81 666 86
COLOUR_TEXT_REGION 81 666 86 666 51
STRAND 96 666 102
COLOUR_TEXT_REGION 96 666 102 666 51
STRAND 105 666 110
COLOUR_TEXT_REGION 105 666 110 666 51
STRAND 117 666 120
COLOUR_TEXT_REGION 117 666 120 666 51
HELIX 4 666 12
COLOUR_TEXT_REGION 4 666 12 666 50
HELIX 26 666 34
COLOUR_TEXT_REGION 26 666 34 666 50
HELIX 51 666 58
COLOUR_TEXT_REGION 51 666 58 666 50
STRAND 46 667 47
COLOUR_TEXT_REGION 46 667 47 667 51
STRAND 64 667 65
COLOUR_TEXT_REGION 64 667 65 667 51
STRAND 71 667 75
COLOUR_TEXT_REGION 71 667 75 667 51
STRAND 79 667 86
COLOUR_TEXT_REGION 79 667 86 667 51
STRAND 97 667 101
COLOUR_TEXT_REGION 97 667 101 667 51
STRAND 105 667 110
COLOUR_TEXT_REGION 105 667 110 667 51
STRAND 115 667 119
COLOUR_TEXT_REGION 115 667 119 667 51
HELIX 4 667 12
COLOUR_TEXT_REGION 4 667 12 667 50
HELIX 23 667 34
COLOUR_TEXT_REGION 23 667 34 667 50
HELIX 52 667 57
COLOUR_TEXT_REGION 52 667 57 667 50
|
programs/oeis/059/A059018.asm | karttu/loda | 0 | 172779 | ; A059018: Write 10*n in base 4; a(n) = sum of digits mod 4.
; 0,0,2,2,0,1,2,0,2,2,0,0,2,0,1,2,0,0,2,2,1,2,3,0,2,2,2,2,0,1,2,3,2,2,0,0,2,3,0,2,0,0,2,2,0,2,3,0,2,2,0,0,0,1,2,3,1,1,0,0,2,3,0,1,0,0,2,2,0,1,2,0,2,2,0,0,2,1,2,3,1,1,3,3,2,3,0,1,3,3,2,2,0,1,2,3,2,2,0,0
mul $0,10
lpb $0,1
add $1,$0
div $0,4
lpe
lpb $1,1
mod $1,4
lpe
|
testsuite/league/TN-104/test_104.adb | svn2github/matreshka | 24 | 7139 | <filename>testsuite/league/TN-104/test_104.adb
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Localization, Internationalization, Globalization for Ada --
-- --
-- Testsuite Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011, <NAME> <<EMAIL>> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE 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 --
-- HOLDER 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. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
-- This test checks length of returned data. Initial bug was that longer
-- stream was passed to decoder this results longer return string.
------------------------------------------------------------------------------
with League.Stream_Element_Vectors;
with League.Strings;
with League.Text_Codecs;
procedure Test_104 is
use type League.Strings.Universal_String;
Source : constant League.Stream_Element_Vectors.Stream_Element_Vector
:= League.Stream_Element_Vectors.To_Stream_Element_Vector
((16#23#, 16#61#, 16#64#, 16#61#));
Codec : constant League.Text_Codecs.Text_Codec
:= League.Text_Codecs.Codec
(League.Strings.To_Universal_String ("windows-1251"));
Expected : constant League.Strings.Universal_String
:= League.Strings.To_Universal_String ("#ada");
Result : constant League.Strings.Universal_String
:= Codec.Decode (Source);
begin
if Result /= Expected then
raise Program_Error;
end if;
end Test_104;
|
ChannelIO/Source/Frameworks/ANTLR/TextBlockLexer.g4 | konifar/channel-plugin-ios | 12 | 3500 | <gh_stars>10-100
lexer grammar TextBlockLexer;
LT: '<' -> pushMode(TAG);
VAR_BEG: '${' -> pushMode(VAR);
ESCAPED: Escaped;
EMOJI: ':' [-+_0-9a-zA-Z]+ ':';
CHAR: [0-9a-zA-Z\u0080-\uFFFF]+;
WS: Ws+;
ANY: .;
// Tag
mode TAG;
GT: '>' -> popMode;
SLASH: '/';
EQUALS: '=';
TAG_NAME: [a-zA-Z]+;
STR_BEG: '"' -> pushMode(STR);
TAG_WS: Ws+ -> skip;
mode STR;
STR_END: '"' -> popMode;
STR_ESCAPED: Escaped;
STR_VAR_BEG: '${' -> pushMode(VAR);
STR_CHAR: [0-9a-zA-Z\u0080-\uFFFF]+;
STR_WS: Ws+;
STR_ANY: .;
mode VAR;
VAR_END: '}' -> popMode;
VAR_ESCAPED: Escaped;
VAR_NAME: [0-9a-zA-Z\-_\\.]+;
VAR_BAR: '|';
VAR_UNI: [\u0080-\uFFFF]+;
VAR_WS: Ws+;
VAR_ANY: .;
fragment Ws: [ \t\r\n];
// & < > " $
fragment Escaped: '&' [a-zA-Z]+ ';';
|
oeis/226/A226561.asm | neoneye/loda-programs | 11 | 96243 | ; A226561: a(n) = Sum_{d|n} d^n * phi(d), where phi(n) is the Euler totient function A000010(n).
; Submitted by <NAME>
; 1,5,55,529,12501,94835,4941259,67240193,2324562301,40039063525,2853116706111,35668789979107,3634501279107037,66676110291801575,3503151245145885315,147575078498173255681,13235844190181388226833,236079349222711695887225,35611553801885644604231623,838861200000383668750866629,70111044223983065461993903501,3414279587669689442364082563355,459370295996654064755810724032475,10669886532808560752413698369876419,1776356839400250465869903564453125001,73873436063285850048783491361664946285
add $0,1
mov $2,$0
lpb $0
mov $3,$2
gcd $3,$0
sub $0,1
mov $4,$2
div $4,$3
mov $3,$4
pow $3,$2
add $1,$3
lpe
mov $0,$1
|
test/interaction/Issue889.agda | shlevy/agda | 1,989 | 3763 | <reponame>shlevy/agda
-- Andreas, 2013-09-17 catches a bug in constraint solving
-- with meta-variables applied to underapplied record constructors
-- {-# OPTIONS --show-implicit -v tc.meta.assign:50 -v tc.conv.elim:30 #-}
module Issue889 where
record Monad (M : Set → Set) : Set₁ where
field
return : ∀ {A} → A → M A
_>>=_ : ∀ {A} {B : M A → Set} (m : M A) →
((x : A) → M (B (return x))) → M (B m)
record Σ (A : Set) (B : A → Set) : Set where
constructor _,_
field
proj₁ : A
proj₂ : B proj₁
_×_ : (A B : Set) → Set
A × B = Σ A λ _ → B
State : Set → Set → Set
State S X = S → X × S
-- Here is the underapplied record constructor
-- (made underapplied by eta-contraction, resp.).
state-return : ∀ {S X} → X → State S X
state-return x = _,_ x -- λ s → x , s
-- When giving the @_>>=_@ function to the record goal we get:
--
-- An internal error has occurred. Please report this as a bug.
-- Location of the error: src/full/Agda/TypeChecking/Conversion.hs:524
state-monad : ∀ {S} → Monad (State S)
state-monad {S} = record { return = state-return; _>>=_ = {!_>>=_!} }
where
postulate
_>>=_ : ∀ {A} {B : State S A → Set} (m : State S A) →
((x : A) → State S (B (state-return x))) → State S (B m)
-- Bug arises when checking
-- _B (state-return x) = B (state-return x)
-- _B (_,_ x) = B (_,_ x)
-- then Agda does something special for record constructors
-- [Miller unification in the presence of records]
-- (now only done for FULLY APPLIED record constructors!)
-- and produces some garbage solution for _B.
------------------------------------------------------------------------
-- Note that if we define the product type using data instead of
-- record then it works:
data _×′_ (A B : Set) : Set where
_,_ : A → B → A ×′ B
State′ : Set → Set → Set
State′ S X = S → X ×′ S
state-return′ : ∀ {S X} → X → State′ S X
state-return′ x = λ s → x , s
state-monad′ : ∀ {S} → Monad (State′ S)
state-monad′ {S} = record { return = state-return′; _>>=_ = _>>=_ }
where
postulate
_>>=_ : ∀ {A} {B : State′ S A → Set} (m : State′ S A) →
((x : A) → State′ S (B (state-return′ x))) → State′ S (B m)
|
src/interface/yaml-events-store.ads | persan/AdaYaml | 32 | 24170 | -- part of AdaYaml, (c) 2017 <NAME>
-- released under the terms of the MIT license, see the file "copying.txt"
private with Ada.Containers.Hashed_Maps;
package Yaml.Events.Store is
type Instance is limited new Refcount_Base with private;
type Instance_Access is access all Instance;
type Reference is tagged private;
type Optional_Reference is tagged private;
type Accessor (Data : not null access Instance) is limited null record with
Implicit_Dereference => Data;
type Anchor_Cursor is private;
type Element_Cursor is private;
function New_Store return Reference;
function Value (Object : Reference) return Accessor;
Null_Reference : constant Optional_Reference;
function Value (Object : Optional_Reference) return Accessor with
Pre => Object /= Null_Reference;
function Optional (Object : Reference'Class) return Optional_Reference;
function Required (Object : Optional_Reference'Class) return Reference;
procedure Memorize (Object : in out Instance; Item : Event);
procedure Force_Memorize (Object : in out Instance; Item : Event;
Position : out Element_Cursor);
function Find (Object : Instance; Alias : Text.Reference)
return Anchor_Cursor;
function Exists_In_Output (Position : Anchor_Cursor) return Boolean;
procedure Set_Exists_In_Output (Object : in out Instance;
Position : Anchor_Cursor);
procedure Advance (Position : in out Element_Cursor);
procedure Advance_At_Same_Level (Object : Instance;
Position : in out Element_Cursor);
No_Anchor : constant Anchor_Cursor;
No_Element : constant Element_Cursor;
procedure Clear (Object : in out Instance);
procedure Copy (Source : in Instance; Target : in out Instance);
type Stream_Instance is limited new Refcount_Base with private;
type Stream_Instance_Access is access all Stream_Instance;
type Stream_Reference is tagged private;
type Optional_Stream_Reference is tagged private;
type Stream_Accessor (Data : not null access Stream_Instance) is limited
null record with Implicit_Dereference => Data;
function Value (Object : Stream_Reference) return Stream_Accessor;
function Next (Object : in out Stream_Instance) return Event;
function Exists (Object : Optional_Stream_Reference) return Boolean;
function Value (Object : Optional_Stream_Reference) return Stream_Accessor
with Pre => Object.Exists;
function Optional (Object : Stream_Reference'Class)
return Optional_Stream_Reference with
Post => Optional'Result.Exists;
procedure Clear (Object : in out Optional_Stream_Reference) with
Post => not Object.Exists;
function First (Object : Instance; Position : Anchor_Cursor) return Event;
function Element (Object : Instance;
Position : Element_Cursor) return Event;
function Retrieve (Object : Reference'Class;
Position : Anchor_Cursor) return Stream_Reference
with Pre => Position /= No_Anchor;
function Retrieve (Object : Reference'Class;
Position : Element_Cursor) return Stream_Reference
with Pre => Position /= No_Element;
function To_Element_Cursor (Position : Anchor_Cursor) return Element_Cursor;
private
type Anchor_Info is record
Position : Positive;
Has_Been_Output : Boolean;
end record;
package Anchor_To_Index is new Ada.Containers.Hashed_Maps
(Text.Reference, Anchor_Info, Text.Hash, Text."=");
type Anchor_Cursor is new Anchor_To_Index.Cursor;
type Element_Cursor is new Natural;
subtype Depth_Type is Integer with Static_Predicate =>
Depth_Type = Integer'First or Depth_Type >= 0;
After_Annotation_End : constant Depth_Type := Integer'First;
type Instance is limited new Event_Holder with record
Anchor_Map : Anchor_To_Index.Map;
Stream_Count : Natural := 0;
Depth : Depth_Type := 0;
end record;
type Reference is new Ada.Finalization.Controlled with record
Data : not null access Instance;
end record;
overriding procedure Adjust (Object : in out Reference);
overriding procedure Finalize (Object : in out Reference);
type Optional_Reference is new Ada.Finalization.Controlled with record
Data : access Instance;
end record;
overriding procedure Adjust (Object : in out Optional_Reference);
overriding procedure Finalize (Object : in out Optional_Reference);
Null_Reference : constant Optional_Reference :=
(Ada.Finalization.Controlled with Data => null);
No_Anchor : constant Anchor_Cursor :=
Anchor_Cursor (Anchor_To_Index.No_Element);
No_Element : constant Element_Cursor := 0;
type Stream_Instance is limited new Refcount_Base with record
Object : Reference;
Depth : Natural;
Current : Positive;
end record;
overriding procedure Finalize (Object : in out Stream_Instance);
type Stream_Reference is new Ada.Finalization.Controlled with record
Data : not null access Stream_Instance;
end record;
overriding procedure Adjust (Object : in out Stream_Reference);
overriding procedure Finalize (Object : in out Stream_Reference);
type Optional_Stream_Reference is new Ada.Finalization.Controlled with record
Data : access Stream_Instance;
end record;
overriding procedure Adjust (Object : in out Optional_Stream_Reference);
overriding procedure Finalize (Object : in out Optional_Stream_Reference);
end Yaml.Events.Store;
|
libsrc/target/micro8085/drv/uart_txbuf.asm | UnivEngineer/z88dk | 4 | 179352 | ;-------------------------------------------------------------------------
; Native terminal i/o functionality for micro8085_cilb
; Functions below assumes support for INTEL 8085 "undocumented" opcodes
SECTION code_clib
EXTERN puartd
EXTERN puartc
PUBLIC _uart_txput
;-------------------------------------------------------------------------
; extern void uart_txput(uint8 *pData, uint16 len);
_uart_txput:
ld de,sp+2 ;get arguments from stack
ld hl,(de) ;last pushed is length
ld b,h ;copy to bc
ld c,l ;as loop counter
inc de ;get to first
inc de ;argument position
ld hl,(de) ;first pushed is ptr
txbuf1: dec bc ;pre decr to use k flag
jp k,txbuf3 ;k true when done
txbuf2: in a,(puartc) ;uart status reg
and 01H ;tx data ready bit
jp z,txbuf2 ;wait for ready
ld a,(hl) ;get next char in buf
out (puartd),a ;uart data reg
inc hl ;bump pointer
jp txbuf1
txbuf3: ret
|
src/basic_math_functions_h.ads | JeremyGrosser/arm_cmsis_dsp | 0 | 27052 | pragma Ada_2012;
pragma Style_Checks (Off);
pragma Warnings ("U");
with Interfaces.C; use Interfaces.C;
with arm_math_types_h;
with sys_ustdint_h;
package basic_math_functions_h is
procedure arm_mult_q7
(pSrcA : access arm_math_types_h.q7_t;
pSrcB : access arm_math_types_h.q7_t;
pDst : access arm_math_types_h.q7_t;
blockSize : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:53
with Import => True,
Convention => C,
External_Name => "arm_mult_q7";
procedure arm_mult_q15
(pSrcA : access arm_math_types_h.q15_t;
pSrcB : access arm_math_types_h.q15_t;
pDst : access arm_math_types_h.q15_t;
blockSize : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:67
with Import => True,
Convention => C,
External_Name => "arm_mult_q15";
procedure arm_mult_q31
(pSrcA : access arm_math_types_h.q31_t;
pSrcB : access arm_math_types_h.q31_t;
pDst : access arm_math_types_h.q31_t;
blockSize : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:81
with Import => True,
Convention => C,
External_Name => "arm_mult_q31";
procedure arm_mult_f32
(pSrcA : access arm_math_types_h.float32_t;
pSrcB : access arm_math_types_h.float32_t;
pDst : access arm_math_types_h.float32_t;
blockSize : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:95
with Import => True,
Convention => C,
External_Name => "arm_mult_f32";
procedure arm_mult_f64
(pSrcA : access arm_math_types_h.float64_t;
pSrcB : access arm_math_types_h.float64_t;
pDst : access arm_math_types_h.float64_t;
blockSize : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:110
with Import => True,
Convention => C,
External_Name => "arm_mult_f64";
procedure arm_add_f32
(pSrcA : access arm_math_types_h.float32_t;
pSrcB : access arm_math_types_h.float32_t;
pDst : access arm_math_types_h.float32_t;
blockSize : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:125
with Import => True,
Convention => C,
External_Name => "arm_add_f32";
procedure arm_add_f64
(pSrcA : access arm_math_types_h.float64_t;
pSrcB : access arm_math_types_h.float64_t;
pDst : access arm_math_types_h.float64_t;
blockSize : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:140
with Import => True,
Convention => C,
External_Name => "arm_add_f64";
procedure arm_add_q7
(pSrcA : access arm_math_types_h.q7_t;
pSrcB : access arm_math_types_h.q7_t;
pDst : access arm_math_types_h.q7_t;
blockSize : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:155
with Import => True,
Convention => C,
External_Name => "arm_add_q7";
procedure arm_add_q15
(pSrcA : access arm_math_types_h.q15_t;
pSrcB : access arm_math_types_h.q15_t;
pDst : access arm_math_types_h.q15_t;
blockSize : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:169
with Import => True,
Convention => C,
External_Name => "arm_add_q15";
procedure arm_add_q31
(pSrcA : access arm_math_types_h.q31_t;
pSrcB : access arm_math_types_h.q31_t;
pDst : access arm_math_types_h.q31_t;
blockSize : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:183
with Import => True,
Convention => C,
External_Name => "arm_add_q31";
procedure arm_sub_f32
(pSrcA : access arm_math_types_h.float32_t;
pSrcB : access arm_math_types_h.float32_t;
pDst : access arm_math_types_h.float32_t;
blockSize : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:197
with Import => True,
Convention => C,
External_Name => "arm_sub_f32";
procedure arm_sub_f64
(pSrcA : access arm_math_types_h.float64_t;
pSrcB : access arm_math_types_h.float64_t;
pDst : access arm_math_types_h.float64_t;
blockSize : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:212
with Import => True,
Convention => C,
External_Name => "arm_sub_f64";
procedure arm_sub_q7
(pSrcA : access arm_math_types_h.q7_t;
pSrcB : access arm_math_types_h.q7_t;
pDst : access arm_math_types_h.q7_t;
blockSize : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:227
with Import => True,
Convention => C,
External_Name => "arm_sub_q7";
procedure arm_sub_q15
(pSrcA : access arm_math_types_h.q15_t;
pSrcB : access arm_math_types_h.q15_t;
pDst : access arm_math_types_h.q15_t;
blockSize : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:241
with Import => True,
Convention => C,
External_Name => "arm_sub_q15";
procedure arm_sub_q31
(pSrcA : access arm_math_types_h.q31_t;
pSrcB : access arm_math_types_h.q31_t;
pDst : access arm_math_types_h.q31_t;
blockSize : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:255
with Import => True,
Convention => C,
External_Name => "arm_sub_q31";
procedure arm_scale_f32
(pSrc : access arm_math_types_h.float32_t;
scale : arm_math_types_h.float32_t;
pDst : access arm_math_types_h.float32_t;
blockSize : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:269
with Import => True,
Convention => C,
External_Name => "arm_scale_f32";
procedure arm_scale_f64
(pSrc : access arm_math_types_h.float64_t;
scale : arm_math_types_h.float64_t;
pDst : access arm_math_types_h.float64_t;
blockSize : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:284
with Import => True,
Convention => C,
External_Name => "arm_scale_f64";
procedure arm_scale_q7
(pSrc : access arm_math_types_h.q7_t;
scaleFract : arm_math_types_h.q7_t;
shift : sys_ustdint_h.int8_t;
pDst : access arm_math_types_h.q7_t;
blockSize : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:300
with Import => True,
Convention => C,
External_Name => "arm_scale_q7";
procedure arm_scale_q15
(pSrc : access arm_math_types_h.q15_t;
scaleFract : arm_math_types_h.q15_t;
shift : sys_ustdint_h.int8_t;
pDst : access arm_math_types_h.q15_t;
blockSize : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:316
with Import => True,
Convention => C,
External_Name => "arm_scale_q15";
procedure arm_scale_q31
(pSrc : access arm_math_types_h.q31_t;
scaleFract : arm_math_types_h.q31_t;
shift : sys_ustdint_h.int8_t;
pDst : access arm_math_types_h.q31_t;
blockSize : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:332
with Import => True,
Convention => C,
External_Name => "arm_scale_q31";
procedure arm_abs_q7
(pSrc : access arm_math_types_h.q7_t;
pDst : access arm_math_types_h.q7_t;
blockSize : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:346
with Import => True,
Convention => C,
External_Name => "arm_abs_q7";
procedure arm_abs_f32
(pSrc : access arm_math_types_h.float32_t;
pDst : access arm_math_types_h.float32_t;
blockSize : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:358
with Import => True,
Convention => C,
External_Name => "arm_abs_f32";
procedure arm_abs_f64
(pSrc : access arm_math_types_h.float64_t;
pDst : access arm_math_types_h.float64_t;
blockSize : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:371
with Import => True,
Convention => C,
External_Name => "arm_abs_f64";
procedure arm_abs_q15
(pSrc : access arm_math_types_h.q15_t;
pDst : access arm_math_types_h.q15_t;
blockSize : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:384
with Import => True,
Convention => C,
External_Name => "arm_abs_q15";
procedure arm_abs_q31
(pSrc : access arm_math_types_h.q31_t;
pDst : access arm_math_types_h.q31_t;
blockSize : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:396
with Import => True,
Convention => C,
External_Name => "arm_abs_q31";
procedure arm_dot_prod_f32
(pSrcA : access arm_math_types_h.float32_t;
pSrcB : access arm_math_types_h.float32_t;
blockSize : sys_ustdint_h.uint32_t;
result : access arm_math_types_h.float32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:409
with Import => True,
Convention => C,
External_Name => "arm_dot_prod_f32";
procedure arm_dot_prod_f64
(pSrcA : access arm_math_types_h.float64_t;
pSrcB : access arm_math_types_h.float64_t;
blockSize : sys_ustdint_h.uint32_t;
result : access arm_math_types_h.float64_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:424
with Import => True,
Convention => C,
External_Name => "arm_dot_prod_f64";
procedure arm_dot_prod_q7
(pSrcA : access arm_math_types_h.q7_t;
pSrcB : access arm_math_types_h.q7_t;
blockSize : sys_ustdint_h.uint32_t;
result : access arm_math_types_h.q31_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:439
with Import => True,
Convention => C,
External_Name => "arm_dot_prod_q7";
procedure arm_dot_prod_q15
(pSrcA : access arm_math_types_h.q15_t;
pSrcB : access arm_math_types_h.q15_t;
blockSize : sys_ustdint_h.uint32_t;
result : access arm_math_types_h.q63_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:453
with Import => True,
Convention => C,
External_Name => "arm_dot_prod_q15";
procedure arm_dot_prod_q31
(pSrcA : access arm_math_types_h.q31_t;
pSrcB : access arm_math_types_h.q31_t;
blockSize : sys_ustdint_h.uint32_t;
result : access arm_math_types_h.q63_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:467
with Import => True,
Convention => C,
External_Name => "arm_dot_prod_q31";
procedure arm_shift_q7
(pSrc : access arm_math_types_h.q7_t;
shiftBits : sys_ustdint_h.int8_t;
pDst : access arm_math_types_h.q7_t;
blockSize : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:481
with Import => True,
Convention => C,
External_Name => "arm_shift_q7";
procedure arm_shift_q15
(pSrc : access arm_math_types_h.q15_t;
shiftBits : sys_ustdint_h.int8_t;
pDst : access arm_math_types_h.q15_t;
blockSize : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:495
with Import => True,
Convention => C,
External_Name => "arm_shift_q15";
procedure arm_shift_q31
(pSrc : access arm_math_types_h.q31_t;
shiftBits : sys_ustdint_h.int8_t;
pDst : access arm_math_types_h.q31_t;
blockSize : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:509
with Import => True,
Convention => C,
External_Name => "arm_shift_q31";
procedure arm_offset_f64
(pSrc : access arm_math_types_h.float64_t;
offset : arm_math_types_h.float64_t;
pDst : access arm_math_types_h.float64_t;
blockSize : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:523
with Import => True,
Convention => C,
External_Name => "arm_offset_f64";
procedure arm_offset_f32
(pSrc : access arm_math_types_h.float32_t;
offset : arm_math_types_h.float32_t;
pDst : access arm_math_types_h.float32_t;
blockSize : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:538
with Import => True,
Convention => C,
External_Name => "arm_offset_f32";
procedure arm_offset_q7
(pSrc : access arm_math_types_h.q7_t;
offset : arm_math_types_h.q7_t;
pDst : access arm_math_types_h.q7_t;
blockSize : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:553
with Import => True,
Convention => C,
External_Name => "arm_offset_q7";
procedure arm_offset_q15
(pSrc : access arm_math_types_h.q15_t;
offset : arm_math_types_h.q15_t;
pDst : access arm_math_types_h.q15_t;
blockSize : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:567
with Import => True,
Convention => C,
External_Name => "arm_offset_q15";
procedure arm_offset_q31
(pSrc : access arm_math_types_h.q31_t;
offset : arm_math_types_h.q31_t;
pDst : access arm_math_types_h.q31_t;
blockSize : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:581
with Import => True,
Convention => C,
External_Name => "arm_offset_q31";
procedure arm_negate_f32
(pSrc : access arm_math_types_h.float32_t;
pDst : access arm_math_types_h.float32_t;
blockSize : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:594
with Import => True,
Convention => C,
External_Name => "arm_negate_f32";
procedure arm_negate_f64
(pSrc : access arm_math_types_h.float64_t;
pDst : access arm_math_types_h.float64_t;
blockSize : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:607
with Import => True,
Convention => C,
External_Name => "arm_negate_f64";
procedure arm_negate_q7
(pSrc : access arm_math_types_h.q7_t;
pDst : access arm_math_types_h.q7_t;
blockSize : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:620
with Import => True,
Convention => C,
External_Name => "arm_negate_q7";
procedure arm_negate_q15
(pSrc : access arm_math_types_h.q15_t;
pDst : access arm_math_types_h.q15_t;
blockSize : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:632
with Import => True,
Convention => C,
External_Name => "arm_negate_q15";
procedure arm_negate_q31
(pSrc : access arm_math_types_h.q31_t;
pDst : access arm_math_types_h.q31_t;
blockSize : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:644
with Import => True,
Convention => C,
External_Name => "arm_negate_q31";
procedure arm_and_u16
(pSrcA : access sys_ustdint_h.uint16_t;
pSrcB : access sys_ustdint_h.uint16_t;
pDst : access sys_ustdint_h.uint16_t;
blockSize : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:657
with Import => True,
Convention => C,
External_Name => "arm_and_u16";
procedure arm_and_u32
(pSrcA : access sys_ustdint_h.uint32_t;
pSrcB : access sys_ustdint_h.uint32_t;
pDst : access sys_ustdint_h.uint32_t;
blockSize : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:671
with Import => True,
Convention => C,
External_Name => "arm_and_u32";
procedure arm_and_u8
(pSrcA : access sys_ustdint_h.uint8_t;
pSrcB : access sys_ustdint_h.uint8_t;
pDst : access sys_ustdint_h.uint8_t;
blockSize : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:685
with Import => True,
Convention => C,
External_Name => "arm_and_u8";
procedure arm_or_u16
(pSrcA : access sys_ustdint_h.uint16_t;
pSrcB : access sys_ustdint_h.uint16_t;
pDst : access sys_ustdint_h.uint16_t;
blockSize : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:699
with Import => True,
Convention => C,
External_Name => "arm_or_u16";
procedure arm_or_u32
(pSrcA : access sys_ustdint_h.uint32_t;
pSrcB : access sys_ustdint_h.uint32_t;
pDst : access sys_ustdint_h.uint32_t;
blockSize : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:713
with Import => True,
Convention => C,
External_Name => "arm_or_u32";
procedure arm_or_u8
(pSrcA : access sys_ustdint_h.uint8_t;
pSrcB : access sys_ustdint_h.uint8_t;
pDst : access sys_ustdint_h.uint8_t;
blockSize : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:727
with Import => True,
Convention => C,
External_Name => "arm_or_u8";
procedure arm_not_u16
(pSrc : access sys_ustdint_h.uint16_t;
pDst : access sys_ustdint_h.uint16_t;
blockSize : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:740
with Import => True,
Convention => C,
External_Name => "arm_not_u16";
procedure arm_not_u32
(pSrc : access sys_ustdint_h.uint32_t;
pDst : access sys_ustdint_h.uint32_t;
blockSize : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:752
with Import => True,
Convention => C,
External_Name => "arm_not_u32";
procedure arm_not_u8
(pSrc : access sys_ustdint_h.uint8_t;
pDst : access sys_ustdint_h.uint8_t;
blockSize : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:764
with Import => True,
Convention => C,
External_Name => "arm_not_u8";
procedure arm_xor_u16
(pSrcA : access sys_ustdint_h.uint16_t;
pSrcB : access sys_ustdint_h.uint16_t;
pDst : access sys_ustdint_h.uint16_t;
blockSize : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:777
with Import => True,
Convention => C,
External_Name => "arm_xor_u16";
procedure arm_xor_u32
(pSrcA : access sys_ustdint_h.uint32_t;
pSrcB : access sys_ustdint_h.uint32_t;
pDst : access sys_ustdint_h.uint32_t;
blockSize : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:791
with Import => True,
Convention => C,
External_Name => "arm_xor_u32";
procedure arm_xor_u8
(pSrcA : access sys_ustdint_h.uint8_t;
pSrcB : access sys_ustdint_h.uint8_t;
pDst : access sys_ustdint_h.uint8_t;
blockSize : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:805
with Import => True,
Convention => C,
External_Name => "arm_xor_u8";
procedure arm_clip_f32
(pSrc : access arm_math_types_h.float32_t;
pDst : access arm_math_types_h.float32_t;
low : arm_math_types_h.float32_t;
high : arm_math_types_h.float32_t;
numSamples : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:821
with Import => True,
Convention => C,
External_Name => "arm_clip_f32";
procedure arm_clip_q31
(pSrc : access arm_math_types_h.q31_t;
pDst : access arm_math_types_h.q31_t;
low : arm_math_types_h.q31_t;
high : arm_math_types_h.q31_t;
numSamples : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:837
with Import => True,
Convention => C,
External_Name => "arm_clip_q31";
procedure arm_clip_q15
(pSrc : access arm_math_types_h.q15_t;
pDst : access arm_math_types_h.q15_t;
low : arm_math_types_h.q15_t;
high : arm_math_types_h.q15_t;
numSamples : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:853
with Import => True,
Convention => C,
External_Name => "arm_clip_q15";
procedure arm_clip_q7
(pSrc : access arm_math_types_h.q7_t;
pDst : access arm_math_types_h.q7_t;
low : arm_math_types_h.q7_t;
high : arm_math_types_h.q7_t;
numSamples : sys_ustdint_h.uint32_t) -- ../CMSIS_5/CMSIS/DSP/Include/dsp/basic_math_functions.h:869
with Import => True,
Convention => C,
External_Name => "arm_clip_q7";
end basic_math_functions_h;
|
gfx/pokemon/magikarp/anim.asm | Dev727/ancientplatinum | 28 | 28994 | <gh_stars>10-100
frame 0, 12
setrepeat 3
frame 1, 09
frame 2, 07
dorepeat 2
endanim
|
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0xca.log_17_711.asm | ljhsiun2/medusa | 9 | 96536 | .global s_prepare_buffers
s_prepare_buffers:
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r12
push %r15
push %rbp
push %rcx
push %rdi
push %rsi
// REPMOV
lea addresses_D+0x8429, %rsi
mov $0x6fd, %rdi
nop
sub $53925, %rbp
mov $122, %rcx
rep movsw
nop
nop
nop
nop
nop
inc %rsi
// Faulty Load
lea addresses_WC+0x50b5, %rcx
nop
nop
dec %r12
mov (%rcx), %si
lea oracles, %rcx
and $0xff, %rsi
shlq $12, %rsi
mov (%rcx,%rsi,1), %rsi
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %r15
pop %r12
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_WC'}, 'OP': 'LOAD'}
{'src': {'congruent': 1, 'same': False, 'type': 'addresses_D'}, 'OP': 'REPM', 'dst': {'congruent': 3, 'same': False, 'type': 'addresses_P'}}
[Faulty Load]
{'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 2, 'NT': False, 'type': 'addresses_WC'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'00': 17}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
|
Data/Binary/Tests/Addition.agda | oisdk/agda-binary | 1 | 15174 | <reponame>oisdk/agda-binary
{-# OPTIONS --without-K --safe #-}
module Data.Binary.Tests.Addition where
import Data.Binary.Operations.Addition as 𝔹
open import Data.Binary.Tests.Helpers
open import Relation.Binary.PropositionalEquality
import Data.Nat as ℕ
_ : 𝔹._+_ ≡⌈ 60 ⌉₂≡ ℕ._+_
_ = refl
|
alloy4fun_models/trashltl/models/14/BAymGgHYXnBk4NENn.als | Kaixi26/org.alloytools.alloy | 0 | 2850 | open main
pred idBAymGgHYXnBk4NENn_prop15 {
all f : File | eventually f in Trash
}
pred __repair { idBAymGgHYXnBk4NENn_prop15 }
check __repair { idBAymGgHYXnBk4NENn_prop15 <=> prop15o } |
src/JEWL/jewl-simple_windows.ads | leomlr/sudoku_ada-jewl | 0 | 6425 | ------------------------------------------------------------------------------
-- --
-- J E W L . S I M P L E _ W I N D O W S --
-- --
-- A predefined instantiation of JEWL.Windows for type Character. --
-- --
-- Copyright (C) <NAME> 2000. Contact address: <EMAIL> --
-- This software is released under the terms of the GNU General Public --
-- License and is intended primarily for educational use. Please contact --
-- the author to report bugs, suggestions and modifications. --
-- --
------------------------------------------------------------------------------
-- $Id: jewl-simple_windows.ads 1.7 2007/01/08 17:00:00 JE Exp $
------------------------------------------------------------------------------
--
-- $Log: jewl-simple_windows.ads $
-- Revision 1.7 2007/01/08 17:00:00 JE
-- * Fixed linker options in JEWL.Win32_Interface to accommodate changes to GNAT
-- GPL 2006 compiler (thanks to <NAME> for this)
-- * Added delay in message loop to avoid the appearance of hogging 100% of CPU
-- time
--
-- Revision 1.6 2001/11/02 16:00:00 JE
-- * Fixed canvas bug when saving an empty canvas
-- * Restore with no prior save now acts as erase
-- * Removed redundant variable declaration in Image function
--
-- Revision 1.5 2001/08/22 15:00:00 JE
-- * Minor bugfix to Get_Text for combo boxes
-- * Minor changes to documentation (including new example involving dialogs)
--
-- Revision 1.4 2001/01/25 09:00:00 je
-- Changes visible to the user:
--
-- * Added support for drawing bitmaps on canvases (Draw_Image operations
-- and new type Image_Type)
-- * Added Play_Sound
-- * Added several new operations on all windows: Get_Origin, Get_Width,
-- Get_Height, Set_Origin, Set_Size and Focus
-- * Added several functions giving screen and window dimensions: Screen_Width,
-- Screen_Height, Frame_Width, Frame_Height, Dialog_Width, Dialog_Height and
-- Menu_Height
-- * Canvases can now handle keyboard events: new constructor and Key_Code added
-- * Added procedure Play_Sound
-- * Operations "+" and "-" added for Point_Type
-- * Pens can now be zero pixels wide
-- * The absolute origin of a frame can now have be specified when the frame
-- is created
-- * Added new File_Dialog operations Add_Filter and Set_Directory
-- * Added Get_Line renames to JEWL.IO for compatibility with Ada.Text_IO
-- * Added all the Get(File,Item) operations mentioned in documentation but
-- unaccountably missing :-(
-- * Documentation updated to reflect the above changes
-- * HTML versions of public package specifications added with links from
-- main documentation pages
--
-- Other internal changes:
--
-- * Canvas fonts, pens etc. now use JEWL.Reference_Counted_Type rather than
-- reinventing this particular wheel, as do images
-- * Various minor code formatting changes: some code reordered for clarity,
-- some comments added or amended,
-- * Changes introduced in 1.2 to support GNAT 3.10 have been reversed, since
-- GNAT 3.10 still couldn't compile this code correctly... ;-(
--
-- Outstanding issues:
--
-- * Optimisation breaks the code (workaround: don't optimise)
--
-- Revision 1.3 2000/07/07 12:00:00 je
-- * JEWL.Simple_Windows added; JEWL.IO modified to use JEWL.Simple_Windows.
-- * JEWL.IO bug fix: Put_Line to file wrote newline to standard output
-- instead of to the file (thanks to <NAME> for pointing this out).
-- * Panels fixed so that mouse clicks are passed on correctly to subwindows.
-- * Memos fixed so that tabs are handled properly.
-- * Password feature added to editboxes.
-- * Minor typos fixed in comments within the package sources.
-- * Documentation corrected and updated following comments from <NAME>
-- and <NAME>.
--
------------------------------------------------------------------------------
with JEWL.Windows;
package JEWL.Simple_Windows is new JEWL.Windows (Command_Type => Character);
|
src/SlimShader.Tests/Shaders/Sdk/Direct3D11/SimpleBezier11/SimpleBezier11_VS.asm | tgjones/slimshader | 125 | 23388 | <filename>src/SlimShader.Tests/Shaders/Sdk/Direct3D11/SimpleBezier11/SimpleBezier11_VS.asm<gh_stars>100-1000
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.20714
//
//
///
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION 0 xyz 0 NONE float xyz
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION 0 xyz 0 NONE float xyz
//
vs_4_0
dcl_input v0.xyz
dcl_output o0.xyz
mov o0.xyz, v0.xyzx
ret
// Approximately 2 instruction slots used
|
libsrc/_DEVELOPMENT/math/integer/l_mulu_16_8x8.asm | Frodevan/z88dk | 1 | 170381 |
INCLUDE "config_private.inc"
SECTION code_clib
SECTION code_math
PUBLIC l_mulu_16_8x8
; compute: hl = l * e
; alters : af, bc, de, hl
IF __CPU_Z180__ && ((__CLIB_OPT_IMATH = 0) || (__CLIB_OPT_IMATH = 100))
l_mulu_16_8x8:
ld h,e
mlt hl
ret
ELSE
IF __CPU_Z80N__ && ((__CLIB_OPT_IMATH = 0) || (__CLIB_OPT_IMATH = 100))
l_mulu_16_8x8:
ld d,l
mul de
ex de,hl
ret
ELSE
IF __IO_LUT_MODULE_AVAILABLE
EXTERN l_lut_mulu_16_8x8
defc l_mulu_16_8x8 = l_lut_mulu_16_8x8
ELSE
IF __CLIB_OPT_IMATH <= 50
EXTERN l_small_mul_16_16x8
l_mulu_16_8x8:
ld d,0
jp l_small_mul_16_16x8
ENDIF
IF __CLIB_OPT_IMATH > 50
EXTERN l_fast_mulu_16_8x8
defc l_mulu_16_8x8 = l_fast_mulu_16_8x8
ENDIF
ENDIF
ENDIF
ENDIF
|
src/sys/http/aws/aws-client-ext.adb | My-Colaborations/ada-util | 0 | 9711 | ------------------------------------------------------------------------------
-- Ada Web Server --
-- --
-- Copyright (C) 2005-2018, 2020, AdaCore --
-- --
-- This library is free software; you can redistribute it and/or modify --
-- it under terms of the GNU General Public License as published by the --
-- Free Software Foundation; either version 3, or (at your option) any --
-- later version. This library 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. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are --
-- granted additional permissions described in the GCC Runtime Library --
-- Exception, version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- this unit does not by itself 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 Public License. --
------------------------------------------------------------------------------
pragma Ada_2012;
with AWS.Messages;
with AWS.Net.Buffered;
with AWS.Translator;
with AWS.Client.HTTP_Utils;
package body AWS.Client.Ext is
procedure Do_Options
(Connection : in out HTTP_Connection;
Result : out Response.Data;
URI : String := No_Data;
Headers : Header_List := Empty_Header_List) is
begin
Send_Request
(Connection, OPTIONS, Result, URI, No_Content, Headers);
end Do_Options;
function Do_Options
(URL : String;
User : String := No_Data;
Pwd : String := No_Data;
Proxy : String := No_Data;
Proxy_User : String := No_Data;
Proxy_Pwd : String := No_Data;
Timeouts : Timeouts_Values := No_Timeout;
Headers : Header_List := Empty_Header_List;
User_Agent : String := Default.User_Agent) return Response.Data
is
Connection : HTTP_Connection;
Result : Response.Data;
begin
Create (Connection,
URL, User, Pwd, Proxy, Proxy_User, Proxy_Pwd,
Persistent => False,
Timeouts => Timeouts,
User_Agent => User_Agent);
Do_Options (Connection, Result, Headers => Headers);
Close (Connection);
return Result;
exception
when others =>
Close (Connection);
raise;
end Do_Options;
procedure Do_Patch
(Connection : in out HTTP_Connection;
Result : out Response.Data;
URI : String := No_Data;
Data : String;
Headers : Header_List := Empty_Header_List) is
begin
Send_Request
(Connection, PATCH, Result, URI, Translator.To_Stream_Element_Array (Data), Headers);
end Do_Patch;
function Do_Patch
(URL : String;
Data : String;
User : String := No_Data;
Pwd : String := No_Data;
Proxy : String := No_Data;
Proxy_User : String := No_Data;
Proxy_Pwd : String := No_Data;
Timeouts : Timeouts_Values := No_Timeout;
Headers : Header_List := Empty_Header_List;
User_Agent : String := Default.User_Agent) return Response.Data
is
Connection : HTTP_Connection;
Result : Response.Data;
begin
Create (Connection,
URL, User, Pwd, Proxy, Proxy_User, Proxy_Pwd,
Persistent => False,
Timeouts => Timeouts,
User_Agent => User_Agent);
Do_Patch (Connection, Result, Data => Data, Headers => Headers);
Close (Connection);
return Result;
exception
when others =>
Close (Connection);
raise;
end Do_Patch;
function Do_Delete
(URL : String;
Data : String;
User : String := No_Data;
Pwd : String := No_Data;
Proxy : String := No_Data;
Proxy_User : String := No_Data;
Proxy_Pwd : String := No_Data;
Timeouts : Timeouts_Values := No_Timeout;
Headers : Header_List := Empty_Header_List;
User_Agent : String := Default.User_Agent) return Response.Data
is
Connection : HTTP_Connection;
Result : Response.Data;
begin
Create (Connection,
URL, User, Pwd, Proxy, Proxy_User, Proxy_Pwd,
Persistent => False,
Timeouts => Timeouts,
User_Agent => User_Agent);
Do_Delete (Connection, Result, Data, Headers => Headers);
Close (Connection);
return Result;
exception
when others =>
Close (Connection);
raise;
end Do_Delete;
procedure Do_Delete
(Connection : in out HTTP_Connection;
Result : out Response.Data;
Data : String;
URI : String := No_Data;
Headers : Header_List := Empty_Header_List) is
begin
Send_Request
(Connection, DELETE, Result, URI, Translator.To_Stream_Element_Array (Data), Headers);
end Do_Delete;
------------------
-- Send_Request --
------------------
procedure Send_Request
(Connection : in out HTTP_Connection;
Kind : Method_Kind;
Result : out Response.Data;
URI : String;
Data : Stream_Element_Array := No_Content;
Headers : Header_List := Empty_Header_List)
is
use Ada.Real_Time;
Stamp : constant Time := Clock;
Try_Count : Natural := Connection.Retry;
Auth_Attempts : Auth_Attempts_Count := (others => 2);
Auth_Is_Over : Boolean;
begin
Retry : loop
begin
HTTP_Utils.Open_Send_Common_Header
(Connection, Method_Kind'Image (Kind), URI, Headers);
-- If there is some data to send
if Data'Length > 0 then
HTTP_Utils.Send_Header
(Connection.Socket.all,
Messages.Content_Length (Data'Length));
Net.Buffered.New_Line (Connection.Socket.all);
-- Send message body
Net.Buffered.Write (Connection.Socket.all, Data);
else
Net.Buffered.New_Line (Connection.Socket.all);
end if;
HTTP_Utils.Get_Response
(Connection, Result,
Get_Body => Kind /= HEAD and then not Connection.Streaming);
HTTP_Utils.Decrement_Authentication_Attempt
(Connection, Auth_Attempts, Auth_Is_Over);
if Auth_Is_Over then
return;
elsif Kind /= HEAD and then Connection.Streaming then
HTTP_Utils.Read_Body (Connection, Result, Store => False);
end if;
exception
when E : Net.Socket_Error | HTTP_Utils.Connection_Error =>
Error_Processing
(Connection, Try_Count, Result,
Method_Kind'Image (Kind), E, Stamp);
exit Retry when not Response.Is_Empty (Result);
end;
end loop Retry;
end Send_Request;
end AWS.Client.Ext;
|
Appl/GeoDraw/Document/documentConvert.asm | steakknife/pcgeos | 504 | 82675 | COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GeoWorks 1992 -- All Rights Reserved
PROJECT: PC GEOS
MODULE: Document
FILE: documentConvert.asm
AUTHOR: <NAME>, September 2, 1992
REVISION HISTORY:
Name Date Description
---- ---- -----------
jon 2 sept 1992 initial revision
DESCRIPTION:
$Id: documentConvert.asm,v 1.1 97/04/04 15:51:48 newdeal Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
UseLib Internal/convert.def
idata segment
if not DBCS_PCGEOS
convertLibDir char CONVERT_LIB_DIR
convertLibPath char CONVERT_LIB_PATH
endif
idata ends
DrawConvertFrom1XTo20Code segment resource
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DrawDocumentUpdateEarlierIncompatibleDocument
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Description: DrawDocument method for MSG_GEN_DOCUMENT_UPDATE_EARLIER_INCOMPATIBLE_DOCUMENT
Called by: MSG_GEN_DOCUMENT_UPDATE_EARLIER_INCOMPATIBLE_DOCUMENT
Pass: *ds:si = DrawDocument object
ds:di = DrawDocument instance
Return: carry set if error
ax - non-zero to change protocol
Destroyed: nothing
Comments:
Revision History:
Name Date Description
---- ------------ -----------
?user ?date Initial version.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
DrawDocumentUpdateEarlierIncompatibleDocument method dynamic DrawDocumentClass,
MSG_GEN_DOCUMENT_UPDATE_EARLIER_INCOMPATIBLE_DOCUMENT
.enter
if DBCS_PCGEOS
stc ;don't load library under DBCS
else
;
; Load the conversion library
;
push ds, si
segmov ds, ss
mov bx, CONVERT_LIB_DISK_HANDLE
mov dx, offset convertLibDir
call FileSetCurrentPath
mov si, offset convertLibPath
mov ax, CONVERT_PROTO_MAJOR
mov bx, CONVERT_PROTO_MINOR
call GeodeUseLibrary
pop ds, si
jc done
push bx ;save library handle
;
; Call our conversion routine
;
mov ax, enum ConvertDrawDocument
call ProcGetLibraryEntry
mov cx, offset DrawGrObjBodyObjTemp
call ProcCallFixedOrMovable
pop bx
pushf
call GeodeFreeLibrary
popf
jc done
;
; Update various controllers regarding the current document
;
call DrawDocumentSetGrObjBodyBounds
call DrawDocumentUpdatePageSizeControl
mov ax, TRUE
clc
done:
endif
.leave
ret
DrawDocumentUpdateEarlierIncompatibleDocument endm
DrawConvertFrom1XTo20Code ends
|
Transynther/x86/_processed/AVXALIGN/_st_/i3-7100_9_0xca_notsx.log_21829_364.asm | ljhsiun2/medusa | 9 | 23366 | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r12
push %r13
push %r8
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_WC_ht+0x6cc, %rsi
lea addresses_D_ht+0x1dfea, %rdi
nop
nop
nop
cmp %r10, %r10
mov $40, %rcx
rep movsl
nop
nop
nop
nop
add %r10, %r10
lea addresses_D_ht+0x556c, %rcx
nop
nop
nop
nop
nop
dec %r8
mov $0x6162636465666768, %r13
movq %r13, %xmm4
movups %xmm4, (%rcx)
nop
nop
xor %r10, %r10
lea addresses_UC_ht+0x1a3ec, %rsi
lea addresses_D_ht+0x1962d, %rdi
nop
nop
nop
nop
and %r12, %r12
mov $70, %rcx
rep movsw
sub $3282, %r13
lea addresses_A_ht+0x8578, %rsi
lea addresses_UC_ht+0x10cec, %rdi
nop
nop
xor %rbx, %rbx
mov $24, %rcx
rep movsb
nop
nop
nop
nop
nop
xor $45752, %rcx
lea addresses_WC_ht+0x178ec, %r8
nop
nop
nop
dec %r10
mov (%r8), %esi
sub $13512, %rdi
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %r8
pop %r13
pop %r12
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r12
push %r13
push %r8
push %r9
push %rax
push %rdi
// Store
lea addresses_WC+0xa56c, %r10
nop
nop
nop
and %r8, %r8
mov $0x5152535455565758, %rax
movq %rax, %xmm4
movups %xmm4, (%r10)
nop
nop
nop
nop
add $59889, %r10
// Store
mov $0x96c, %rdi
nop
nop
nop
nop
xor $24732, %r13
movw $0x5152, (%rdi)
nop
nop
nop
dec %rax
// Load
lea addresses_WC+0x18eec, %r13
nop
inc %r8
movb (%r13), %r10b
cmp $51457, %rax
// Store
lea addresses_RW+0x16cbc, %r12
add $42882, %r9
movl $0x51525354, (%r12)
nop
and %r12, %r12
// Store
lea addresses_D+0x3bac, %r13
nop
nop
nop
nop
nop
sub %r12, %r12
mov $0x5152535455565758, %r8
movq %r8, %xmm5
vmovups %ymm5, (%r13)
nop
cmp $35532, %rax
// Store
lea addresses_normal+0x92cc, %rdi
nop
nop
nop
sub %r10, %r10
movl $0x51525354, (%rdi)
nop
nop
cmp $32996, %r12
// Faulty Load
lea addresses_RW+0x1a56c, %rax
nop
nop
nop
nop
dec %r10
mov (%rax), %r9
lea oracles, %rdi
and $0xff, %r9
shlq $12, %r9
mov (%rdi,%r9,1), %r9
pop %rdi
pop %rax
pop %r9
pop %r8
pop %r13
pop %r12
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_RW', 'size': 2, 'AVXalign': False}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 10, 'NT': False, 'type': 'addresses_WC', 'size': 16, 'AVXalign': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 10, 'NT': False, 'type': 'addresses_P', 'size': 2, 'AVXalign': False}}
{'src': {'same': False, 'congruent': 7, 'NT': False, 'type': 'addresses_WC', 'size': 1, 'AVXalign': False}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 4, 'NT': False, 'type': 'addresses_RW', 'size': 4, 'AVXalign': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 4, 'NT': False, 'type': 'addresses_D', 'size': 32, 'AVXalign': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 5, 'NT': False, 'type': 'addresses_normal', 'size': 4, 'AVXalign': False}}
[Faulty Load]
{'src': {'same': True, 'congruent': 0, 'NT': True, 'type': 'addresses_RW', 'size': 8, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_WC_ht', 'congruent': 4, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 0, 'same': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 11, 'NT': False, 'type': 'addresses_D_ht', 'size': 16, 'AVXalign': False}}
{'src': {'type': 'addresses_UC_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 0, 'same': False}}
{'src': {'type': 'addresses_A_ht', 'congruent': 2, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 7, 'same': False}}
{'src': {'same': False, 'congruent': 7, 'NT': False, 'type': 'addresses_WC_ht', 'size': 4, 'AVXalign': False}, 'OP': 'LOAD'}
{'32': 21829}
32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
*/
|
test/bitwidth-within-default.asm | kspalaiologos/asmbf | 67 | 179536 | <filename>test/bitwidth-within-default.asm
org 60000
&f
mov r1, *f
|
Test/Cases/6.Go.g4 | studentmain/SempredTranslation | 0 | 6680 | <reponame>studentmain/SempredTranslation
grammar g;
L: 'L' {p.L(1, 2.3, 'a', "\u86E4", nil, true, false)};
p: L; |
src/lab-code/spark_depends/diff.adb | hannesb0/rtpl18 | 0 | 23249 | procedure Diff (X, Y : in Natural; Z : out Natural) with
SPARK_Mode,
Depends => (Z => (X, Y))
is
begin
Z := X + X;
end Diff;
|
Transynther/x86/_processed/AVXALIGN/_zr_/i7-7700_9_0x48.log_21829_345.asm | ljhsiun2/medusa | 9 | 23033 | .global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r12
push %r13
push %r14
push %rax
push %rcx
push %rdi
push %rsi
lea addresses_A_ht+0x11ffb, %r12
nop
nop
xor %rsi, %rsi
movw $0x6162, (%r12)
nop
nop
nop
sub %rax, %rax
lea addresses_normal_ht+0x987b, %r13
nop
nop
sub %r11, %r11
mov $0x6162636465666768, %rcx
movq %rcx, %xmm4
movups %xmm4, (%r13)
nop
xor %rcx, %rcx
lea addresses_WT_ht+0x533b, %r13
nop
cmp %rcx, %rcx
mov $0x6162636465666768, %r11
movq %r11, (%r13)
nop
nop
nop
nop
nop
sub %rax, %rax
lea addresses_UC_ht+0x1e8c5, %r12
sub %r14, %r14
movl $0x61626364, (%r12)
nop
xor %r11, %r11
lea addresses_WT_ht+0x1efbb, %rsi
lea addresses_A_ht+0x1707b, %rdi
clflush (%rdi)
nop
nop
nop
sub $49980, %r12
mov $80, %rcx
rep movsw
add %rax, %rax
lea addresses_normal_ht+0x29f7, %rax
nop
nop
nop
and $47816, %r13
movups (%rax), %xmm0
vpextrq $0, %xmm0, %r11
nop
nop
nop
nop
nop
inc %r12
lea addresses_D_ht+0x15688, %rcx
clflush (%rcx)
nop
cmp %rsi, %rsi
movups (%rcx), %xmm2
vpextrq $0, %xmm2, %r12
nop
nop
nop
nop
nop
inc %r12
lea addresses_WC_ht+0x1116f, %rsi
nop
sub %rdi, %rdi
mov (%rsi), %r14
cmp $47653, %r11
lea addresses_WC_ht+0x37bb, %rsi
lea addresses_WC_ht+0x103fb, %rdi
clflush (%rdi)
nop
add %r11, %r11
mov $53, %rcx
rep movsq
nop
nop
nop
nop
sub $24059, %r11
lea addresses_normal_ht+0x64df, %rsi
lea addresses_UC_ht+0x707b, %rdi
nop
nop
nop
cmp $30233, %r12
mov $65, %rcx
rep movsl
nop
add $33833, %r14
lea addresses_WC_ht+0x1bcbb, %rdi
nop
nop
nop
and %rax, %rax
mov (%rdi), %r14
nop
nop
nop
add %r13, %r13
lea addresses_UC_ht+0xd07b, %rax
nop
nop
nop
nop
and %rcx, %rcx
movb (%rax), %r13b
nop
nop
and $36984, %r14
lea addresses_UC_ht+0xb55b, %r13
nop
nop
dec %r14
mov (%r13), %rcx
nop
nop
nop
cmp %r13, %r13
lea addresses_WT_ht+0x1b193, %rsi
nop
nop
nop
nop
dec %r12
movw $0x6162, (%rsi)
cmp %r13, %r13
pop %rsi
pop %rdi
pop %rcx
pop %rax
pop %r14
pop %r13
pop %r12
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r12
push %r14
push %r15
push %r8
push %rcx
push %rdi
// Store
lea addresses_UC+0x12ae3, %r15
nop
nop
nop
nop
nop
sub %r10, %r10
movl $0x51525354, (%r15)
nop
nop
nop
nop
nop
sub %r15, %r15
// Store
lea addresses_A+0xb7fb, %r8
nop
nop
dec %r14
movw $0x5152, (%r8)
nop
nop
nop
nop
nop
add %rdi, %rdi
// Store
lea addresses_A+0x14ca0, %rcx
nop
nop
nop
dec %r15
movb $0x51, (%rcx)
nop
xor %rdi, %rdi
// Faulty Load
lea addresses_US+0xb07b, %r10
nop
xor %r12, %r12
movb (%r10), %cl
lea oracles, %r12
and $0xff, %rcx
shlq $12, %rcx
mov (%r12,%rcx,1), %rcx
pop %rdi
pop %rcx
pop %r8
pop %r15
pop %r14
pop %r12
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_US', 'AVXalign': False, 'congruent': 0, 'size': 4, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'AVXalign': False, 'congruent': 1, 'size': 4, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A', 'AVXalign': False, 'congruent': 4, 'size': 2, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A', 'AVXalign': True, 'congruent': 0, 'size': 1, 'same': False, 'NT': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_US', 'AVXalign': False, 'congruent': 0, 'size': 1, 'same': True, 'NT': True}}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 7, 'size': 2, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 9, 'size': 16, 'same': True, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 5, 'size': 8, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 0, 'size': 4, 'same': False, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 11, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 0, 'size': 16, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 0, 'size': 16, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 1, 'size': 8, 'same': False, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 4, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 6, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 5, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 6, 'size': 8, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'AVXalign': True, 'congruent': 11, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'AVXalign': True, 'congruent': 2, 'size': 8, 'same': True, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': True, 'congruent': 3, 'size': 2, 'same': True, '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
*/
|
source/amf/ocl/amf-internals-tables-ocl_metamodel-objects.adb | svn2github/matreshka | 24 | 9243 | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2012-2013, <NAME> <<EMAIL>> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE 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 --
-- HOLDER 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. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
-- This file is generated, don't edit it.
------------------------------------------------------------------------------
with AMF.Internals.Extents;
with AMF.Internals.Tables.CMOF_Constructors;
with AMF.Internals.Tables.CMOF_Element_Table;
with AMF.Internals.Tables.OCL_String_Data_00;
package body AMF.Internals.Tables.OCL_Metamodel.Objects is
----------------
-- Initialize --
----------------
procedure Initialize is
Extent : constant AMF.Internals.AMF_Extent
:= AMF.Internals.Extents.Allocate_Extent
(AMF.Internals.Tables.OCL_String_Data_00.MS_0047'Access);
begin
Base := AMF.Internals.Tables.CMOF_Element_Table.Last;
Initialize_1 (Extent);
Initialize_2 (Extent);
Initialize_3 (Extent);
Initialize_4 (Extent);
Initialize_5 (Extent);
Initialize_6 (Extent);
Initialize_7 (Extent);
Initialize_8 (Extent);
Initialize_9 (Extent);
Initialize_10 (Extent);
Initialize_11 (Extent);
Initialize_12 (Extent);
Initialize_13 (Extent);
Initialize_14 (Extent);
Initialize_15 (Extent);
Initialize_16 (Extent);
Initialize_17 (Extent);
Initialize_18 (Extent);
Initialize_19 (Extent);
Initialize_20 (Extent);
Initialize_21 (Extent);
Initialize_22 (Extent);
Initialize_23 (Extent);
Initialize_24 (Extent);
Initialize_25 (Extent);
Initialize_26 (Extent);
Initialize_27 (Extent);
Initialize_28 (Extent);
Initialize_29 (Extent);
Initialize_30 (Extent);
Initialize_31 (Extent);
Initialize_32 (Extent);
Initialize_33 (Extent);
Initialize_34 (Extent);
Initialize_35 (Extent);
Initialize_36 (Extent);
Initialize_37 (Extent);
Initialize_38 (Extent);
Initialize_39 (Extent);
Initialize_40 (Extent);
Initialize_41 (Extent);
Initialize_42 (Extent);
Initialize_43 (Extent);
Initialize_44 (Extent);
Initialize_45 (Extent);
Initialize_46 (Extent);
Initialize_47 (Extent);
Initialize_48 (Extent);
Initialize_49 (Extent);
Initialize_50 (Extent);
Initialize_51 (Extent);
Initialize_52 (Extent);
Initialize_53 (Extent);
Initialize_54 (Extent);
Initialize_55 (Extent);
Initialize_56 (Extent);
Initialize_57 (Extent);
Initialize_58 (Extent);
Initialize_59 (Extent);
Initialize_60 (Extent);
Initialize_61 (Extent);
Initialize_62 (Extent);
Initialize_63 (Extent);
Initialize_64 (Extent);
Initialize_65 (Extent);
Initialize_66 (Extent);
Initialize_67 (Extent);
Initialize_68 (Extent);
Initialize_69 (Extent);
Initialize_70 (Extent);
Initialize_71 (Extent);
Initialize_72 (Extent);
Initialize_73 (Extent);
Initialize_74 (Extent);
Initialize_75 (Extent);
Initialize_76 (Extent);
Initialize_77 (Extent);
Initialize_78 (Extent);
Initialize_79 (Extent);
Initialize_80 (Extent);
Initialize_81 (Extent);
Initialize_82 (Extent);
Initialize_83 (Extent);
Initialize_84 (Extent);
Initialize_85 (Extent);
Initialize_86 (Extent);
Initialize_87 (Extent);
Initialize_88 (Extent);
Initialize_89 (Extent);
Initialize_90 (Extent);
Initialize_91 (Extent);
Initialize_92 (Extent);
Initialize_93 (Extent);
Initialize_94 (Extent);
Initialize_95 (Extent);
Initialize_96 (Extent);
Initialize_97 (Extent);
Initialize_98 (Extent);
Initialize_99 (Extent);
Initialize_100 (Extent);
Initialize_101 (Extent);
Initialize_102 (Extent);
Initialize_103 (Extent);
Initialize_104 (Extent);
Initialize_105 (Extent);
Initialize_106 (Extent);
Initialize_107 (Extent);
Initialize_108 (Extent);
Initialize_109 (Extent);
Initialize_110 (Extent);
Initialize_111 (Extent);
Initialize_112 (Extent);
Initialize_113 (Extent);
Initialize_114 (Extent);
Initialize_115 (Extent);
Initialize_116 (Extent);
Initialize_117 (Extent);
Initialize_118 (Extent);
Initialize_119 (Extent);
Initialize_120 (Extent);
Initialize_121 (Extent);
Initialize_122 (Extent);
Initialize_123 (Extent);
Initialize_124 (Extent);
Initialize_125 (Extent);
Initialize_126 (Extent);
Initialize_127 (Extent);
Initialize_128 (Extent);
Initialize_129 (Extent);
Initialize_130 (Extent);
Initialize_131 (Extent);
Initialize_132 (Extent);
Initialize_133 (Extent);
Initialize_134 (Extent);
Initialize_135 (Extent);
Initialize_136 (Extent);
Initialize_137 (Extent);
Initialize_138 (Extent);
Initialize_139 (Extent);
Initialize_140 (Extent);
Initialize_141 (Extent);
Initialize_142 (Extent);
Initialize_143 (Extent);
Initialize_144 (Extent);
Initialize_145 (Extent);
Initialize_146 (Extent);
Initialize_147 (Extent);
Initialize_148 (Extent);
Initialize_149 (Extent);
Initialize_150 (Extent);
Initialize_151 (Extent);
Initialize_152 (Extent);
Initialize_153 (Extent);
Initialize_154 (Extent);
Initialize_155 (Extent);
Initialize_156 (Extent);
Initialize_157 (Extent);
Initialize_158 (Extent);
Initialize_159 (Extent);
Initialize_160 (Extent);
Initialize_161 (Extent);
Initialize_162 (Extent);
Initialize_163 (Extent);
Initialize_164 (Extent);
Initialize_165 (Extent);
Initialize_166 (Extent);
Initialize_167 (Extent);
Initialize_168 (Extent);
Initialize_169 (Extent);
Initialize_170 (Extent);
Initialize_171 (Extent);
Initialize_172 (Extent);
Initialize_173 (Extent);
Initialize_174 (Extent);
Initialize_175 (Extent);
Initialize_176 (Extent);
Initialize_177 (Extent);
Initialize_178 (Extent);
end Initialize;
------------------
-- Initialize_1 --
------------------
procedure Initialize_1 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Class;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_1;
------------------
-- Initialize_2 --
------------------
procedure Initialize_2 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Class;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_2;
------------------
-- Initialize_3 --
------------------
procedure Initialize_3 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Class;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_3;
------------------
-- Initialize_4 --
------------------
procedure Initialize_4 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Class;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_4;
------------------
-- Initialize_5 --
------------------
procedure Initialize_5 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Class;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_5;
------------------
-- Initialize_6 --
------------------
procedure Initialize_6 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Class;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_6;
------------------
-- Initialize_7 --
------------------
procedure Initialize_7 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Class;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_7;
------------------
-- Initialize_8 --
------------------
procedure Initialize_8 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Class;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_8;
------------------
-- Initialize_9 --
------------------
procedure Initialize_9 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Class;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_9;
-------------------
-- Initialize_10 --
-------------------
procedure Initialize_10 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Class;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_10;
-------------------
-- Initialize_11 --
-------------------
procedure Initialize_11 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Class;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_11;
-------------------
-- Initialize_12 --
-------------------
procedure Initialize_12 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Class;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_12;
-------------------
-- Initialize_13 --
-------------------
procedure Initialize_13 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Class;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_13;
-------------------
-- Initialize_14 --
-------------------
procedure Initialize_14 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Class;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_14;
-------------------
-- Initialize_15 --
-------------------
procedure Initialize_15 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Class;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_15;
-------------------
-- Initialize_16 --
-------------------
procedure Initialize_16 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Class;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_16;
-------------------
-- Initialize_17 --
-------------------
procedure Initialize_17 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Class;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_17;
-------------------
-- Initialize_18 --
-------------------
procedure Initialize_18 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Class;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_18;
-------------------
-- Initialize_19 --
-------------------
procedure Initialize_19 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Class;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_19;
-------------------
-- Initialize_20 --
-------------------
procedure Initialize_20 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Class;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_20;
-------------------
-- Initialize_21 --
-------------------
procedure Initialize_21 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Class;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_21;
-------------------
-- Initialize_22 --
-------------------
procedure Initialize_22 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Class;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_22;
-------------------
-- Initialize_23 --
-------------------
procedure Initialize_23 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Class;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_23;
-------------------
-- Initialize_24 --
-------------------
procedure Initialize_24 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Class;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_24;
-------------------
-- Initialize_25 --
-------------------
procedure Initialize_25 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Class;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_25;
-------------------
-- Initialize_26 --
-------------------
procedure Initialize_26 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Class;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_26;
-------------------
-- Initialize_27 --
-------------------
procedure Initialize_27 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Class;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_27;
-------------------
-- Initialize_28 --
-------------------
procedure Initialize_28 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Class;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_28;
-------------------
-- Initialize_29 --
-------------------
procedure Initialize_29 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Class;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_29;
-------------------
-- Initialize_30 --
-------------------
procedure Initialize_30 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Class;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_30;
-------------------
-- Initialize_31 --
-------------------
procedure Initialize_31 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Class;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_31;
-------------------
-- Initialize_32 --
-------------------
procedure Initialize_32 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Class;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_32;
-------------------
-- Initialize_33 --
-------------------
procedure Initialize_33 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Class;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_33;
-------------------
-- Initialize_34 --
-------------------
procedure Initialize_34 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Class;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_34;
-------------------
-- Initialize_35 --
-------------------
procedure Initialize_35 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Class;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_35;
-------------------
-- Initialize_36 --
-------------------
procedure Initialize_36 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Class;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_36;
-------------------
-- Initialize_37 --
-------------------
procedure Initialize_37 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Class;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_37;
-------------------
-- Initialize_38 --
-------------------
procedure Initialize_38 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Class;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_38;
-------------------
-- Initialize_39 --
-------------------
procedure Initialize_39 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Class;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_39;
-------------------
-- Initialize_40 --
-------------------
procedure Initialize_40 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Class;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_40;
-------------------
-- Initialize_41 --
-------------------
procedure Initialize_41 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Class;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_41;
-------------------
-- Initialize_42 --
-------------------
procedure Initialize_42 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Class;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_42;
-------------------
-- Initialize_43 --
-------------------
procedure Initialize_43 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Class;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_43;
-------------------
-- Initialize_44 --
-------------------
procedure Initialize_44 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Class;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_44;
-------------------
-- Initialize_45 --
-------------------
procedure Initialize_45 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Class;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_45;
-------------------
-- Initialize_46 --
-------------------
procedure Initialize_46 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Class;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_46;
-------------------
-- Initialize_47 --
-------------------
procedure Initialize_47 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Class;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_47;
-------------------
-- Initialize_48 --
-------------------
procedure Initialize_48 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_48;
-------------------
-- Initialize_49 --
-------------------
procedure Initialize_49 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_49;
-------------------
-- Initialize_50 --
-------------------
procedure Initialize_50 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_50;
-------------------
-- Initialize_51 --
-------------------
procedure Initialize_51 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_51;
-------------------
-- Initialize_52 --
-------------------
procedure Initialize_52 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_52;
-------------------
-- Initialize_53 --
-------------------
procedure Initialize_53 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_53;
-------------------
-- Initialize_54 --
-------------------
procedure Initialize_54 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_54;
-------------------
-- Initialize_55 --
-------------------
procedure Initialize_55 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_55;
-------------------
-- Initialize_56 --
-------------------
procedure Initialize_56 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_56;
-------------------
-- Initialize_57 --
-------------------
procedure Initialize_57 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_57;
-------------------
-- Initialize_58 --
-------------------
procedure Initialize_58 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_58;
-------------------
-- Initialize_59 --
-------------------
procedure Initialize_59 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_59;
-------------------
-- Initialize_60 --
-------------------
procedure Initialize_60 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_60;
-------------------
-- Initialize_61 --
-------------------
procedure Initialize_61 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_61;
-------------------
-- Initialize_62 --
-------------------
procedure Initialize_62 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_62;
-------------------
-- Initialize_63 --
-------------------
procedure Initialize_63 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_63;
-------------------
-- Initialize_64 --
-------------------
procedure Initialize_64 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_64;
-------------------
-- Initialize_65 --
-------------------
procedure Initialize_65 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_65;
-------------------
-- Initialize_66 --
-------------------
procedure Initialize_66 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_66;
-------------------
-- Initialize_67 --
-------------------
procedure Initialize_67 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_67;
-------------------
-- Initialize_68 --
-------------------
procedure Initialize_68 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_68;
-------------------
-- Initialize_69 --
-------------------
procedure Initialize_69 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_69;
-------------------
-- Initialize_70 --
-------------------
procedure Initialize_70 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_70;
-------------------
-- Initialize_71 --
-------------------
procedure Initialize_71 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_71;
-------------------
-- Initialize_72 --
-------------------
procedure Initialize_72 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_72;
-------------------
-- Initialize_73 --
-------------------
procedure Initialize_73 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_73;
-------------------
-- Initialize_74 --
-------------------
procedure Initialize_74 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_74;
-------------------
-- Initialize_75 --
-------------------
procedure Initialize_75 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_75;
-------------------
-- Initialize_76 --
-------------------
procedure Initialize_76 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_76;
-------------------
-- Initialize_77 --
-------------------
procedure Initialize_77 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_77;
-------------------
-- Initialize_78 --
-------------------
procedure Initialize_78 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_78;
-------------------
-- Initialize_79 --
-------------------
procedure Initialize_79 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_79;
-------------------
-- Initialize_80 --
-------------------
procedure Initialize_80 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_80;
-------------------
-- Initialize_81 --
-------------------
procedure Initialize_81 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_81;
-------------------
-- Initialize_82 --
-------------------
procedure Initialize_82 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_82;
-------------------
-- Initialize_83 --
-------------------
procedure Initialize_83 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_83;
-------------------
-- Initialize_84 --
-------------------
procedure Initialize_84 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_84;
-------------------
-- Initialize_85 --
-------------------
procedure Initialize_85 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_85;
-------------------
-- Initialize_86 --
-------------------
procedure Initialize_86 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_86;
-------------------
-- Initialize_87 --
-------------------
procedure Initialize_87 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_87;
-------------------
-- Initialize_88 --
-------------------
procedure Initialize_88 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_88;
-------------------
-- Initialize_89 --
-------------------
procedure Initialize_89 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_89;
-------------------
-- Initialize_90 --
-------------------
procedure Initialize_90 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_90;
-------------------
-- Initialize_91 --
-------------------
procedure Initialize_91 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_91;
-------------------
-- Initialize_92 --
-------------------
procedure Initialize_92 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_92;
-------------------
-- Initialize_93 --
-------------------
procedure Initialize_93 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_93;
-------------------
-- Initialize_94 --
-------------------
procedure Initialize_94 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Association;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_94;
-------------------
-- Initialize_95 --
-------------------
procedure Initialize_95 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Association;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_95;
-------------------
-- Initialize_96 --
-------------------
procedure Initialize_96 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Association;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_96;
-------------------
-- Initialize_97 --
-------------------
procedure Initialize_97 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Association;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_97;
-------------------
-- Initialize_98 --
-------------------
procedure Initialize_98 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Association;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_98;
-------------------
-- Initialize_99 --
-------------------
procedure Initialize_99 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Association;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_99;
--------------------
-- Initialize_100 --
--------------------
procedure Initialize_100 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Association;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_100;
--------------------
-- Initialize_101 --
--------------------
procedure Initialize_101 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Association;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_101;
--------------------
-- Initialize_102 --
--------------------
procedure Initialize_102 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Association;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_102;
--------------------
-- Initialize_103 --
--------------------
procedure Initialize_103 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Association;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_103;
--------------------
-- Initialize_104 --
--------------------
procedure Initialize_104 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Association;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_104;
--------------------
-- Initialize_105 --
--------------------
procedure Initialize_105 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Association;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_105;
--------------------
-- Initialize_106 --
--------------------
procedure Initialize_106 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Association;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_106;
--------------------
-- Initialize_107 --
--------------------
procedure Initialize_107 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Association;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_107;
--------------------
-- Initialize_108 --
--------------------
procedure Initialize_108 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Association;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_108;
--------------------
-- Initialize_109 --
--------------------
procedure Initialize_109 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Association;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_109;
--------------------
-- Initialize_110 --
--------------------
procedure Initialize_110 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Association;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_110;
--------------------
-- Initialize_111 --
--------------------
procedure Initialize_111 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Association;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_111;
--------------------
-- Initialize_112 --
--------------------
procedure Initialize_112 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Association;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_112;
--------------------
-- Initialize_113 --
--------------------
procedure Initialize_113 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Association;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_113;
--------------------
-- Initialize_114 --
--------------------
procedure Initialize_114 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Association;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_114;
--------------------
-- Initialize_115 --
--------------------
procedure Initialize_115 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Association;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_115;
--------------------
-- Initialize_116 --
--------------------
procedure Initialize_116 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Association;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_116;
--------------------
-- Initialize_117 --
--------------------
procedure Initialize_117 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Association;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_117;
--------------------
-- Initialize_118 --
--------------------
procedure Initialize_118 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Association;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_118;
--------------------
-- Initialize_119 --
--------------------
procedure Initialize_119 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Association;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_119;
--------------------
-- Initialize_120 --
--------------------
procedure Initialize_120 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Association;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_120;
--------------------
-- Initialize_121 --
--------------------
procedure Initialize_121 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Association;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_121;
--------------------
-- Initialize_122 --
--------------------
procedure Initialize_122 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Association;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_122;
--------------------
-- Initialize_123 --
--------------------
procedure Initialize_123 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Association;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_123;
--------------------
-- Initialize_124 --
--------------------
procedure Initialize_124 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Association;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_124;
--------------------
-- Initialize_125 --
--------------------
procedure Initialize_125 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Association;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_125;
--------------------
-- Initialize_126 --
--------------------
procedure Initialize_126 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Association;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_126;
--------------------
-- Initialize_127 --
--------------------
procedure Initialize_127 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Association;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_127;
--------------------
-- Initialize_128 --
--------------------
procedure Initialize_128 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Association;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_128;
--------------------
-- Initialize_129 --
--------------------
procedure Initialize_129 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Association;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_129;
--------------------
-- Initialize_130 --
--------------------
procedure Initialize_130 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Association;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_130;
--------------------
-- Initialize_131 --
--------------------
procedure Initialize_131 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Association;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_131;
--------------------
-- Initialize_132 --
--------------------
procedure Initialize_132 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Association;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_132;
--------------------
-- Initialize_133 --
--------------------
procedure Initialize_133 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Package;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_133;
--------------------
-- Initialize_134 --
--------------------
procedure Initialize_134 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_134;
--------------------
-- Initialize_135 --
--------------------
procedure Initialize_135 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Enumeration;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_135;
--------------------
-- Initialize_136 --
--------------------
procedure Initialize_136 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Enumeration_Literal;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_136;
--------------------
-- Initialize_137 --
--------------------
procedure Initialize_137 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Enumeration_Literal;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_137;
--------------------
-- Initialize_138 --
--------------------
procedure Initialize_138 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Enumeration_Literal;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_138;
--------------------
-- Initialize_139 --
--------------------
procedure Initialize_139 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Enumeration_Literal;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_139;
--------------------
-- Initialize_140 --
--------------------
procedure Initialize_140 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Enumeration_Literal;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_140;
--------------------
-- Initialize_141 --
--------------------
procedure Initialize_141 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_141;
--------------------
-- Initialize_142 --
--------------------
procedure Initialize_142 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_142;
--------------------
-- Initialize_143 --
--------------------
procedure Initialize_143 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_143;
--------------------
-- Initialize_144 --
--------------------
procedure Initialize_144 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_144;
--------------------
-- Initialize_145 --
--------------------
procedure Initialize_145 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_145;
--------------------
-- Initialize_146 --
--------------------
procedure Initialize_146 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_146;
--------------------
-- Initialize_147 --
--------------------
procedure Initialize_147 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_147;
--------------------
-- Initialize_148 --
--------------------
procedure Initialize_148 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_148;
--------------------
-- Initialize_149 --
--------------------
procedure Initialize_149 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_149;
--------------------
-- Initialize_150 --
--------------------
procedure Initialize_150 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_150;
--------------------
-- Initialize_151 --
--------------------
procedure Initialize_151 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_151;
--------------------
-- Initialize_152 --
--------------------
procedure Initialize_152 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_152;
--------------------
-- Initialize_153 --
--------------------
procedure Initialize_153 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_153;
--------------------
-- Initialize_154 --
--------------------
procedure Initialize_154 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_154;
--------------------
-- Initialize_155 --
--------------------
procedure Initialize_155 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_155;
--------------------
-- Initialize_156 --
--------------------
procedure Initialize_156 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_156;
--------------------
-- Initialize_157 --
--------------------
procedure Initialize_157 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_157;
--------------------
-- Initialize_158 --
--------------------
procedure Initialize_158 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_158;
--------------------
-- Initialize_159 --
--------------------
procedure Initialize_159 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_159;
--------------------
-- Initialize_160 --
--------------------
procedure Initialize_160 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_160;
--------------------
-- Initialize_161 --
--------------------
procedure Initialize_161 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_161;
--------------------
-- Initialize_162 --
--------------------
procedure Initialize_162 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_162;
--------------------
-- Initialize_163 --
--------------------
procedure Initialize_163 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_163;
--------------------
-- Initialize_164 --
--------------------
procedure Initialize_164 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_164;
--------------------
-- Initialize_165 --
--------------------
procedure Initialize_165 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_165;
--------------------
-- Initialize_166 --
--------------------
procedure Initialize_166 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_166;
--------------------
-- Initialize_167 --
--------------------
procedure Initialize_167 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_167;
--------------------
-- Initialize_168 --
--------------------
procedure Initialize_168 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_168;
--------------------
-- Initialize_169 --
--------------------
procedure Initialize_169 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_169;
--------------------
-- Initialize_170 --
--------------------
procedure Initialize_170 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_170;
--------------------
-- Initialize_171 --
--------------------
procedure Initialize_171 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_171;
--------------------
-- Initialize_172 --
--------------------
procedure Initialize_172 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_172;
--------------------
-- Initialize_173 --
--------------------
procedure Initialize_173 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_173;
--------------------
-- Initialize_174 --
--------------------
procedure Initialize_174 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_174;
--------------------
-- Initialize_175 --
--------------------
procedure Initialize_175 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_175;
--------------------
-- Initialize_176 --
--------------------
procedure Initialize_176 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_176;
--------------------
-- Initialize_177 --
--------------------
procedure Initialize_177 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_177;
--------------------
-- Initialize_178 --
--------------------
procedure Initialize_178 (Extent : AMF.Internals.AMF_Extent) is
Aux : AMF.Internals.CMOF_Element;
begin
Aux := AMF.Internals.Tables.CMOF_Constructors.Create_CMOF_Property;
AMF.Internals.Extents.Internal_Append (Extent, Aux);
end Initialize_178;
end AMF.Internals.Tables.OCL_Metamodel.Objects;
|
libtool/src/gmp-6.1.2/mpn/sparc64/ultrasparct3/addmul_1.asm | kroggen/aergo | 1,602 | 88014 | <filename>libtool/src/gmp-6.1.2/mpn/sparc64/ultrasparct3/addmul_1.asm
dnl SPARC v9 mpn_addmul_1 for T3/T4/T5.
dnl Contributed to the GNU project by <NAME> and <NAME>.
dnl Copyright 2013 Free Software Foundation, Inc.
dnl This file is part of the GNU MP Library.
dnl
dnl The GNU MP Library is free software; you can redistribute it and/or modify
dnl it under the terms of either:
dnl
dnl * the GNU Lesser General Public License as published by the Free
dnl Software Foundation; either version 3 of the License, or (at your
dnl option) any later version.
dnl
dnl or
dnl
dnl * the GNU General Public License as published by the Free Software
dnl Foundation; either version 2 of the License, or (at your option) any
dnl later version.
dnl
dnl or both in parallel, as here.
dnl
dnl The GNU MP Library is distributed in the hope that it will be useful, but
dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
dnl for more details.
dnl
dnl You should have received copies of the GNU General Public License and the
dnl GNU Lesser General Public License along with the GNU MP Library. If not,
dnl see https://www.gnu.org/licenses/.
include(`../config.m4')
C cycles/limb
C UltraSPARC T3: 26
C UltraSPARC T4: 4.5
C INPUT PARAMETERS
define(`rp', `%i0')
define(`up', `%i1')
define(`n', `%i2')
define(`v0', `%i3')
define(`u0', `%l0')
define(`u1', `%l1')
define(`u2', `%l2')
define(`u3', `%l3')
define(`r0', `%l4')
define(`r1', `%l5')
define(`r2', `%l6')
define(`r3', `%l7')
ASM_START()
REGISTER(%g2,#scratch)
REGISTER(%g3,#scratch)
PROLOGUE(mpn_addmul_1)
save %sp, -176, %sp
ldx [up+0], %g1
and n, 3, %g3
brz %g3, L(b0)
addcc %g0, %g0, %g5 C clear carry limb, flag
cmp %g3, 2
bcs %xcc, L(b01)
nop
be %xcc, L(b10)
ldx [up+8], %g5
L(b11): ldx [up+16], u3
mulx %g1, v0, %o2
umulxhi(%g1, v0, %o3)
ldx [rp+0], r1
mulx %g5, v0, %o4
ldx [rp+8], r2
umulxhi(%g5, v0, %o5)
ldx [rp+16], r3
mulx u3, v0, %g4
umulxhi(u3, v0, %g5)
addcc %o3, %o4, %o4
addxccc(%o5, %g4, %g4)
addxc( %g0, %g5, %g5)
addcc r1, %o2, r1
stx r1, [rp+0]
addxccc(r2, %o4, r2)
stx r2, [rp+8]
addxccc(r3, %g4, r3)
stx r3, [rp+16]
add n, -3, n
add up, 24, up
brz n, L(xit)
add rp, 24, rp
b L(com)
nop
L(b10): mulx %g1, v0, %o4
ldx [rp+0], r2
umulxhi(%g1, v0, %o5)
ldx [rp+8], r3
mulx %g5, v0, %g4
umulxhi(%g5, v0, %g5)
addcc %o5, %g4, %g4
addxc( %g0, %g5, %g5)
addcc r2, %o4, r2
stx r2, [rp+0]
addxccc(r3, %g4, r3)
stx r3, [rp+8]
add n, -2, n
add up, 16, up
brz n, L(xit)
add rp, 16, rp
b L(com)
nop
L(b01): ldx [rp+0], r3
mulx %g1, v0, %g4
umulxhi(%g1, v0, %g5)
addcc r3, %g4, r3
stx r3, [rp+0]
add n, -1, n
add up, 8, up
brz n, L(xit)
add rp, 8, rp
L(com): ldx [up+0], %g1
L(b0): ldx [up+8], u1
ldx [up+16], u2
ldx [up+24], u3
mulx %g1, v0, %o0
umulxhi(%g1, v0, %o1)
b L(lo0)
nop
ALIGN(16)
L(top): ldx [up+0], u0
addxc( %g0, %g5, %g5) C propagate carry into carry limb
ldx [up+8], u1
addcc r0, %o0, r0
ldx [up+16], u2
addxccc(r1, %o2, r1)
ldx [up+24], u3
addxccc(r2, %o4, r2)
stx r0, [rp-32]
addxccc(r3, %g4, r3)
stx r1, [rp-24]
mulx u0, v0, %o0
stx r2, [rp-16]
umulxhi(u0, v0, %o1)
stx r3, [rp-8]
L(lo0): mulx u1, v0, %o2
ldx [rp+0], r0
umulxhi(u1, v0, %o3)
ldx [rp+8], r1
mulx u2, v0, %o4
ldx [rp+16], r2
umulxhi(u2, v0, %o5)
ldx [rp+24], r3
mulx u3, v0, %g4
addxccc(%g5, %o0, %o0)
umulxhi(u3, v0, %g5)
add up, 32, up
addxccc(%o1, %o2, %o2)
add rp, 32, rp
addxccc(%o3, %o4, %o4)
add n, -4, n
addxccc(%o5, %g4, %g4)
brgz n, L(top)
nop
addxc( %g0, %g5, %g5)
addcc r0, %o0, r0
stx r0, [rp-32]
addxccc(r1, %o2, r1)
stx r1, [rp-24]
addxccc(r2, %o4, r2)
stx r2, [rp-16]
addxccc(r3, %g4, r3)
stx r3, [rp-8]
L(xit): addxc( %g0, %g5, %i0)
ret
restore
EPILOGUE()
|
oeis/313/A313869.asm | neoneye/loda-programs | 11 | 102880 | <gh_stars>10-100
; A313869: Coordination sequence Gal.6.206.5 where G.u.t.v denotes the coordination sequence for a vertex of type v in tiling number t in the Galebach list of u-uniform tilings.
; Submitted by <NAME>(s3)
; 1,5,10,16,21,26,30,35,40,46,51,56,61,66,72,77,82,86,91,96,102,107,112,117,122,128,133,138,142,147,152,158,163,168,173,178,184,189,194,198,203,208,214,219,224,229,234,240,245,250
mov $1,$0
mul $0,13
add $0,5
div $0,11
mul $1,43
sub $1,6
div $1,11
add $1,1
add $0,$1
|
SystemsProgramming/p12.asm | aaiijmrtt/JUCSE | 6 | 9042 | %include "util.mac"
extern buffer, array, inprompt, newline, arraysize, inpromptsize, newlinesize, outprompt, outpromptsize, inputarray, printarray
section .bss
index: resb 4
section .text
global _start
_start:
call inputarray
write inprompt, inpromptsize
write newline, newlinesize
call printarray
write newline, newlinesize
mov bh, [arraysize]
call select
write outprompt, outpromptsize
write newline, newlinesize
call printarray
write newline, newlinesize
exit
select:
pusha
mov ecx, 0
mov cl, [arraysize]
dec ecx
mov edx, 0
outer:
push cx
mov al, [array + edx]
mov ebx, 0
mov [index], ebx
inc ebx
inner:
mov ah, [array + edx + ebx]
cmp al, ah
jb continue
mov [index], ebx
mov al, ah
continue:
inc ebx
loop inner
mov ebx, [index]
mov al, [array + edx]
mov ah, [array + edx + ebx]
mov [array + edx], ah
mov [array + edx + ebx], al
call printarray
write newline, newlinesize
pop cx
inc edx
loop outer
popa
ret
|
maps/OlivineGym.asm | Karkino/KarkCrystal16 | 0 | 92080 | <reponame>Karkino/KarkCrystal16
object_const_def ; object_event constants
const OLIVINEGYM_JASMINE
const OLIVINEGYM_GYM_GUY
OlivineGym_MapScripts:
db 0 ; scene scripts
db 0 ; callbacks
OlivineGymJasmineScript:
faceplayer
opentext
checkevent EVENT_BEAT_JASMINE
iftrue .FightDone
writetext Jasmine_SteelTypeIntro
waitbutton
closetext
winlosstext Jasmine_BetterTrainer, 0
loadtrainer JASMINE, JASMINE1
startbattle
reloadmapafterbattle
setevent EVENT_BEAT_JASMINE
opentext
writetext Text_ReceivedMineralBadge
playsound SFX_GET_BADGE
waitsfx
setflag ENGINE_MINERALBADGE
readvar VAR_BADGES
scall OlivineGymActivateRockets
.FightDone:
checkevent EVENT_GOT_TM23_IRON_TAIL
iftrue .GotIronTail
writetext Jasmine_BadgeSpeech
buttonsound
verbosegiveitem TM_IRON_HEAD
iffalse .NoRoomForIronTail
setevent EVENT_GOT_TM23_IRON_TAIL
writetext Jasmine_IronTailSpeech
waitbutton
closetext
end
.GotIronTail:
writetext Jasmine_GoodLuck
waitbutton
.NoRoomForIronTail:
closetext
end
OlivineGymActivateRockets:
ifequal 7, .RadioTowerRockets
ifequal 6, .GoldenrodRockets
end
.GoldenrodRockets:
jumpstd goldenrodrockets
.RadioTowerRockets:
jumpstd radiotowerrockets
OlivineGymGuyScript:
faceplayer
checkevent EVENT_BEAT_JASMINE
iftrue .OlivineGymGuyWinScript
checkevent EVENT_JASMINE_RETURNED_TO_GYM
iffalse .OlivineGymGuyPreScript
opentext
writetext OlivineGymGuyText
waitbutton
closetext
end
.OlivineGymGuyWinScript:
opentext
writetext OlivineGymGuyWinText
waitbutton
closetext
end
.OlivineGymGuyPreScript:
opentext
writetext OlivineGymGuyPreText
waitbutton
closetext
end
OlivineGymStatue:
checkflag ENGINE_MINERALBADGE
iftrue .Beaten
jumpstd gymstatue1
.Beaten:
gettrainername STRING_BUFFER_4, JASMINE, JASMINE1
jumpstd gymstatue2
Jasmine_SteelTypeIntro:
text "…Thank you for"
line "your help at the"
cont "LIGHTHOUSE…"
para "But this is dif-"
line "ferent. Please"
para "allow me to intro-"
line "duce myself."
para "I am JASMINE, a"
line "GYM LEADER. I use"
cont "the steel-type."
para "…Do you know about"
line "the steel-type?"
para "It's a type that"
line "was only recently"
cont "discovered."
para "…Um… May I begin?"
done
Jasmine_BetterTrainer:
text "…You are a better"
line "trainer than me,"
para "in both skill and"
line "kindness."
para "In accordance with"
line "LEAGUE rules, I"
para "confer upon you"
line "this BADGE."
done
Text_ReceivedMineralBadge:
text "<PLAYER> received"
line "MINERALBADGE."
done
Jasmine_BadgeSpeech:
text "MINERALBADGE"
line "raises #MON's"
cont "DEFENSE."
para "…Um… Please take"
line "this too…"
done
Text_ReceivedTM09:
text "<PLAYER> received"
line "TM09."
done
Jasmine_IronTailSpeech:
text "…You could use"
line "that TM to teach"
cont "IRON TAIL."
done
Jasmine_GoodLuck:
text "Um… I don't know"
line "how to say this,"
cont "but good luck…"
done
OlivineGymGuyText:
text "JASMINE uses the"
line "newly discovered"
cont "steel-type."
para "I don't know very"
line "much about it."
done
OlivineGymGuyWinText:
text "That was awesome."
para "The steel-type,"
line "huh?"
para "That was a close"
line "encounter of an"
cont "unknown kind!"
done
OlivineGymGuyPreText:
text "JASMINE, the GYM"
line "LEADER, is at the"
cont "LIGHTHOUSE."
para "She's been tending"
line "to a sick #MON."
para "A strong trainer"
line "has to be compas-"
cont "sionate."
done
OlivineGym_MapEvents:
db 0, 0 ; filler
db 2 ; warp events
warp_event 4, 15, OLIVINE_CITY, 2
warp_event 5, 15, OLIVINE_CITY, 2
db 0 ; coord events
db 2 ; bg events
bg_event 3, 13, BGEVENT_READ, OlivineGymStatue
bg_event 6, 13, BGEVENT_READ, OlivineGymStatue
db 2 ; object events
object_event 5, 3, SPRITE_JASMINE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, OlivineGymJasmineScript, EVENT_OLIVINE_GYM_JASMINE
object_event 7, 13, SPRITE_GYM_GUY, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, OlivineGymGuyScript, -1
|
LabFinal_CPU2/Common/F2837xD_DBGIER.asm | BSpwr/BS-Equalizer | 0 | 20196 | ;//###########################################################################
;//
;// FILE: F2837xD_DBGIER.asm
;//
;// TITLE: Set the DBGIER register
;//
;// DESCRIPTION:
;//
;// Function to set the DBGIER register (for realtime emulation).
;// Function Prototype: void SetDBGIER(Uint16)
;// Usage: SetDBGIER(value);
;// Input Parameters: Uint16 value = value to put in DBGIER register.
;// Return Value: none
;//
;//###########################################################################
;// $TI Release: F2837xD Support Library v3.10.00.00 $
;// $Release Date: Tue May 26 17:13:46 IST 2020 $
;// $Copyright:
;// Copyright (C) 2013-2020 Texas Instruments Incorporated - http://www.ti.com/
;//
;// 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 Texas Instruments Incorporated 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.
;// $
;//###########################################################################
.global _SetDBGIER
.text
_SetDBGIER:
MOV *SP++,AL
POP DBGIER
LRETR
;//
;// End of file
;//
|
programs/oeis/160/A160428.asm | neoneye/loda | 22 | 99137 | ; A160428: Number of ON cells at n-th stage of three-dimensional version of the cellular automaton A160410, using cubes.
; 0,8,64,120,512,568,960,1352,4096,4152,4544,4936,7680,8072,10816,13560,32768,32824,33216,33608,36352,36744,39488,42232,61440,61832,64576,67320,86528,89272,108480,127688,262144
lpb $0
sub $0,1
mov $2,$0
max $2,0
seq $2,161343 ; a(n) = 7^A000120(n).
add $1,$2
lpe
mul $1,8
mov $0,$1
|
gtkada_backend/example/rpm_widget.ads | Fabien-Chouteau/Giza | 7 | 10774 | with Giza.Widgets.Frame; use Giza.Widgets.Frame;
with Giza.Graphics; use Giza.Graphics;
with Giza.Events; use Giza.Events;
package RPM_Widget is
subtype RPM_Range is Natural range 0 .. 9999;
type RPM is new Gframe with private;
overriding
procedure Draw (This : in out RPM;
Ctx : in out Context'Class;
Force : Boolean := True);
overriding
function On_Event
(This : in out RPM;
Evt : Event_Not_Null_Ref) return Boolean;
procedure Set_RPM (This : in out RPM; Val : RPM_Range);
function Get_RPM (This : RPM) return RPM_Range;
private
type RPM is new Gframe with record
Value : RPM_Range := 0;
end record;
end RPM_Widget;
|
hello_world.asm | bellcorreia/machine-code | 1 | 165117 | ;
; Source code written by <NAME>
;
%define SYS_exit 60
%define SYS_write 1
%define STDOUT 1
global _start
section .text
_start:
mov rdx, 12
mov rsi, hello_world
mov rdi, STDOUT
mov rax, SYS_write
syscall
xor rdi, rdi
mov rax, SYS_exit
syscall
section .data
hello_world: db "Hello World", 10
|
alloy4fun_models/trashltl/models/4/g59yQxfy48FxcmEXE.als | Kaixi26/org.alloytools.alloy | 0 | 3825 | <reponame>Kaixi26/org.alloytools.alloy
open main
pred idg59yQxfy48FxcmEXE_prop5 {
all f : File | always eventually f not in File
}
pred __repair { idg59yQxfy48FxcmEXE_prop5 }
check __repair { idg59yQxfy48FxcmEXE_prop5 <=> prop5o } |
4_CountNumberInAnArrayOfData.asm | furkanisitan/ExampleProgramsFor8085Microprocessor | 0 | 98437 | <gh_stars>0
LXI H, 0200H ; HL ye 0200H verisini yükle
MVI A, 0FFH ; A ya FFH(255) verisini yükle
LXI B, 0064H ; B => 0, C => 100
LOOP: CMP M ; M ile A yı karşılaştır.
JNZ NO ; Z biti sıfır değilse atla
INR B ; B yi 1 arttır
NO: INX H ; M yi 1 arttır
DCR C ; C yi bir azalt
JNZ LOOP ; Z biti sıfır değilse atla
MOV A, B ; Sonucu A ya aktar
HLT
; 0200H dan başlayarak ileri doğru 100 adres boyunca
; kaç adet 255 verisi olduğunu sayar ve sonucu
; A ya yazar |
Transynther/x86/_processed/US/_ht_zr_/i3-7100_9_0xca_notsx.log_21829_1793.asm | ljhsiun2/medusa | 9 | 176890 | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r12
push %r8
push %r9
push %rax
push %rdi
lea addresses_normal_ht+0x184ba, %r8
nop
nop
and %r12, %r12
movups (%r8), %xmm6
vpextrq $1, %xmm6, %rdi
nop
sub %r10, %r10
lea addresses_WT_ht+0x2c34, %rax
nop
nop
nop
nop
add %r8, %r8
movups (%rax), %xmm4
vpextrq $0, %xmm4, %r9
nop
nop
nop
nop
add $44722, %rdi
pop %rdi
pop %rax
pop %r9
pop %r8
pop %r12
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r9
push %rax
push %rbp
push %rbx
push %rdx
push %rsi
// Store
lea addresses_US+0x187b4, %r12
clflush (%r12)
nop
nop
nop
nop
dec %rax
movw $0x5152, (%r12)
nop
cmp %rdx, %rdx
// Faulty Load
lea addresses_US+0x19eb4, %rbp
nop
sub $61089, %rbx
movups (%rbp), %xmm2
vpextrq $1, %xmm2, %rax
lea oracles, %rsi
and $0xff, %rax
shlq $12, %rax
mov (%rsi,%rax,1), %rax
pop %rsi
pop %rdx
pop %rbx
pop %rbp
pop %rax
pop %r9
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_US', 'size': 4, 'AVXalign': False}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 7, 'NT': False, 'type': 'addresses_US', 'size': 2, 'AVXalign': False}}
[Faulty Load]
{'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_US', 'size': 16, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'same': False, 'congruent': 1, 'NT': False, 'type': 'addresses_normal_ht', 'size': 16, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'same': False, 'congruent': 3, 'NT': False, 'type': 'addresses_WT_ht', 'size': 16, 'AVXalign': False}, 'OP': 'LOAD'}
{'44': 2954, '00': 17195, '49': 1680}
44 00 00 00 00 00 00 00 00 00 00 00 00 00 44 00 00 44 00 00 00 44 44 00 49 00 00 00 00 44 00 49 00 00 00 49 00 00 00 00 49 00 00 44 00 00 49 00 00 49 00 00 00 00 00 44 00 44 00 44 00 44 00 00 00 00 49 00 00 49 00 44 00 00 00 44 00 49 00 00 49 00 00 00 00 00 49 00 00 00 00 00 49 00 00 00 44 49 00 44 00 49 00 00 00 00 49 49 00 00 00 44 00 00 00 49 00 00 00 00 00 00 00 00 00 00 00 00 00 44 00 00 44 00 00 44 44 44 00 00 00 00 44 00 00 00 00 00 44 00 00 00 44 00 00 00 00 00 00 00 00 00 49 00 00 00 49 00 00 00 00 00 49 00 49 00 00 00 44 44 00 00 00 44 49 00 00 00 00 00 00 00 00 00 00 00 00 00 44 00 00 44 49 44 00 00 44 44 00 44 00 00 00 49 00 00 00 00 49 00 00 00 00 44 00 00 00 00 00 00 00 00 00 00 00 44 00 00 49 00 00 00 00 00 49 00 00 00 00 00 00 00 44 00 00 49 00 00 00 49 00 00 00 44 00 00 49 00 44 00 49 00 44 00 00 44 00 00 00 44 00 00 00 44 49 00 00 49 00 44 00 00 00 00 44 00 00 00 00 00 00 00 00 00 44 00 44 00 44 44 00 44 00 00 00 00 00 00 44 00 49 00 00 00 00 00 44 44 00 00 00 00 00 00 00 00 49 00 44 00 00 00 00 00 44 00 44 00 00 00 00 00 44 00 00 00 00 00 00 44 00 00 00 00 00 00 00 00 49 00 00 44 00 00 00 00 00 00 00 49 00 00 00 49 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 44 00 44 00 00 44 00 00 00 00 00 00 00 44 00 49 00 00 44 00 00 00 00 00 44 44 44 00 44 00 00 00 00 00 00 00 44 00 00 00 00 00 00 44 00 44 00 44 00 00 00 44 00 00 00 00 00 44 00 00 00 00 44 00 44 00 00 44 00 00 00 00 00 49 00 00 44 00 49 00 44 00 00 44 00 00 00 00 44 00 00 00 00 00 00 00 00 44 00 00 00 00 44 00 49 00 00 49 00 00 00 00 00 49 00 00 00 00 44 00 49 00 00 00 00 00 00 00 00 44 00 44 00 00 00 00 00 49 00 00 00 44 00 00 00 44 00 00 44 00 00 00 00 00 49 44 00 49 00 00 00 49 00 00 00 44 00 44 00 00 00 00 00 00 00 00 00 44 00 00 00 00 44 00 44 00 00 49 00 49 00 00 00 00 49 00 00 00 00 49 49 00 00 00 00 00 00 00 00 00 00 44 00 49 00 00 44 00 00 00 00 00 00 00 00 00 00 49 00 49 00 00 00 00 00 00 00 49 00 00 00 44 00 00 00 00 44 00 00 00 00 44 00 44 00 00 00 00 44 00 00 00 00 00 00 00 00 00 49 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 49 00 00 00 00 00 00 00 44 00 00 00 49 00 00 00 00 00 00 49 00 49 00 49 44 00 00 00 00 00 49 00 00 00 00 49 44 00 00 00 44 00 00 00 00 00 00 00 00 44 00 00 00 00 00 00 00 00 00 00 00 49 00 00 00 00 00 00 00 00 00 00 00 00 00 44 00 00 00 00 00 44 00 00 00 00 44 44 00 00 00 00 44 44 00 00 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 44 00 00 00 00 00 00 00 00 44 00 49 00 00 00 00 49 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 44 00 00 00 00 00 00 44 00 44 49 00 00 00 00 00 00 00 00 49 00 00 49 00 00 00 44 00 44 00 00 44 00 44 00 44 44 00 00 00 00 00 00 00 00 44 44 00 00 49 00 00 00 00 00 00 00 00 44 00 00 00 00 00 00 00 00 44 00 00 00 49 00 44 00 00 44 00 00 00 00 00 44 00 00 00 00 00 00 00 00 00 00 00 44 44 00 00 00 00 00 00 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 44 00 44 00 00 00 49 00 00 00 00 00 49 00 00 00 00 49 00 00 00 00 00 00 00 00 44 44 00 00 00 44 00 00 00 00 49 44 00 00 00 00 00 00 00 00 44 00
*/
|
SOURCE/base/Kernel/Native/arm/Crt/memcpy.asm | pmache/singularityrdk | 3 | 5542 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Microsoft Research Singularity
;;;
;;; Copyright (c) Microsoft Corporation. All rights reserved.
;;;
;;; This file contains ARM-specific assembly code.
;;;
;**********************************************************************
; void *
; memcpy( void *dest, const void *src, size_t count );
; The memcpy function copies count bytes of src to dest.
; If the source and destination overlap, this function does
; not ensure that the original source bytes in the overlapping
; region are copied before being overwritten. Use memmove to
; handle overlapping regions.
;
;**********************************************************************
OPT 2 ; disable listing
INCLUDE kxarm.inc
OPT 1 ; reenable listing
dest RN R0
source RN R1
count RN R2
temp1 RN R3
temp2 RN R4
temp3 RN R5
temp4 RN R12
IF Thumbing
THUMBAREA
ENDIF
NESTED_ENTRY memcpy
ROUT
IF Thumbing
; Switch from Thumb mode to ARM mode
DCW 0x4778 ; bx pc
DCW 0x46C0 ; nop
ENDIF
;//Save registers onto the stack
STMDB sp!, {dest,temp2,temp3,lr} ; save registers
PROLOG_END
; Use a threshold to determine which code to use:
;
; if destination & source are naturally aligned, then
; threshold = 512
; else
; threshold = 128
;
; if copy size > threshold, then
; use memcpybigblk
; else
; use .NET code
ORR temp1, dest, source
TST temp1, #3
MOVEQ temp1, #512
MOVNE temp1, #128
CMP count, temp1
BHI UNDO_PROLOG ; revert and continue to memcpybigblk
; NOTE: UNDO_PROLOG just restores SP, so do NOT modify anything other
; than r3 (temp1) and r12 (temp4) before this point
;**********************************************************************
; Copy from head to tail to avoid source overwrite because the source
; destination the source
;**********************************************************************
HEAD_TO_TAIL
;if LT 8 bytes store them and exit
CMP count, #8 ; 2-3 cycles
BLT BYTEMOVE4
;Check alignment of parameters
ANDS temp1, dest, #3 ; 2-3 cycles
BEQ SRCALIGN
; destination is at least 1 byte misaligned
; Read and write (4 - alignment) bytes to align destination.
RSB temp1, temp1, #4 ; 9 cycles
LDRB temp2, [source], #1
CMP temp1, #2
STRB temp2, [dest], #1
LDRGEB temp3, [source], #1 ; >= 2 == at least 2 bytes
LDRGTB temp2, [source], #1 ; > 2 == 3 bytes unaligned
SUB count, count, temp1
STRGEB temp3, [dest], #1
STRGTB temp2, [dest], #1
SRCALIGN ; 3 - 7 cycles
TST source, #1 ; save alignment of src
BNE UNALIGNED ; src 3 byte unaligned.
TST source, #2
BNE HWORDMOVE ; src and dst are hword aligned
;
;word aligned source and destination, move blocks of 32 bytes
;until we have less than 32 bytes left, then divide moves in
;half down to less than 4, where we will move the last 3 or less
;bytes
;
WORDMOVE
SUBS count, count, #32 ; 2-3 cycles
BLT BLK16
BLK32 ; 20 cycles/32 bytes
LDMIA source!, {temp1,temp2,temp3,lr}
STMIA dest!, {temp1,temp2,temp3,lr}
LDMIA source!, {temp1,temp2,temp3,lr}
SUBS count, count, #32
STMIA dest!, {temp1,temp2,temp3,lr}
BGE BLK32
BLK16 ; 11-4 cycles/16 bytes
ADDS count, count, #16
LDMGEIA source!, {temp1, temp2, temp3, lr}
STMGEIA dest!, {temp1, temp2, temp3, lr}
BEQ WORD_BYTES_EXIT
SUBGTS count, count, #16
BLK8 ; 6 cycles/8 bytes
ADDS count, count, #8
LDMGEIA source!, {temp1, temp2}
SUBGE count, count, #8
STMGEIA dest!, {temp1, temp2}
BLK4
ADDS count, count, #4 ; 6-9 cycles/4 bytes
LDRGE temp1, [source], #4
STRGE temp1, [dest], #4
WORD_BYTES
ADDLTS count, count, #4
BEQ WORD_BYTES_EXIT ; On zero, Return to caller
LDR temp1, [source], #4 ; 10 cycles/1-3 bytes
CMP count, #2
STRGEH temp1, [dest], #2
STRLTB temp1, [dest], #1
MOVGT temp1, temp1, LSR #16
STRGTB temp1, [dest], #1
WORD_BYTES_EXIT
IF Interworking :LOR: Thumbing
LDMIA sp!, {dest, temp2, temp3, lr}
BX lr
ELSE
LDMIA sp!, {dest, temp2, temp3, pc}
ENDIF
;
; half word align source and destination
;
HWORDMOVE ; 2-3 cycles
LDRH temp1, [source], #2
SUBS count, count, #32
BLT HWORD8_TST
HWORD32 ; 35 cycles/32 bytes
LDMIA source!, {temp2,temp3,temp4,lr}
ORR temp1, temp1, temp2, LSL #16
MOV temp2, temp2, LSR #16
ORR temp2, temp2, temp3, LSL #16
MOV temp3, temp3, LSR #16
ORR temp3, temp3, temp4, LSL #16
MOV temp4, temp4, LSR #16
ORR temp4, temp4, lr, LSL #16
STMIA dest!, {temp1,temp2,temp3,temp4} ; Store bytes 1-16
MOV temp1, lr, LSR #16
LDMIA source!, {temp2,temp3,temp4,lr}
ORR temp1, temp1, temp2, LSL #16
MOV temp2, temp2, LSR #16
ORR temp2, temp2, temp3, LSL #16
MOV temp3, temp3, LSR #16
ORR temp3, temp3, temp4, LSL #16
MOV temp4, temp4, LSR #16
ORR temp4, temp4, lr, LSL #16
STMIA dest!, {temp1,temp2,temp3,temp4} ; Store bytes 17-32
SUBS count, count, #32
MOV temp1, lr, LSR #16
BGE HWORD32
HWORD8_TST
ADDS count, count, #24
BLT HWORD4
HWORD8 ; 11 cycles/8 bytes
LDMIA source!, {temp2,temp3}
ORR temp1, temp1, temp2, LSL #16
MOV temp2, temp2, LSR #16
ORR temp2, temp2, temp3, LSL #16
STMIA dest!, {temp1, temp2}
SUBS count, count, #8
MOV temp1, temp3, LSR #16
BGE HWORD8
HWORD4 ; 3-7 cycles/4 bytes
ADDS count, count, #4
BLT HWORD_BYTES
LDR temp2, [source], #4
ORR temp1, temp1, temp2, LSL #16
STR temp1, [dest], #4
MOV temp1, temp2, LSR #16
HWORD_BYTES ; 5-11 cycles/1-3 bytes
ADDLTS count, count, #4
BEQ HWORD_BYTES_EXIT ; On zero, Return to caller
CMP count, #2
STRLTB temp1, [dest], #1
LDRGTB temp2, [source], #1
STRGEH temp1, [dest], #2
STRGTB temp2, [dest], #1
HWORD_BYTES_EXIT
IF Interworking :LOR: Thumbing
LDMIA sp!, {dest, temp2, temp3, lr}
BX lr
ELSE
LDMIA sp!, {dest, temp2, temp3, pc}
ENDIF
;
; Unaligned Moves
;
UNALIGNED
TST source, #2
BEQ UNALIGNED1
UNALIGNED3 ; 3-4 cycles
LDRB temp1, [source], #1
SUBS count, count, #32
BLT OFFTHREE8_TST
OFFTHREE32 ; 35 cycles/32 bytes
LDMIA source!, {temp2,temp3,temp4,lr}
ORR temp1, temp1, temp2, LSL #8
MOV temp2, temp2, LSR #24
ORR temp2, temp2, temp3, LSL #8
MOV temp3, temp3, LSR #24
ORR temp3, temp3, temp4, LSL #8
MOV temp4, temp4, LSR #24
ORR temp4, temp4, lr, LSL #8
STMIA dest!, {temp1,temp2,temp3,temp4} ; Store bytes 1-16
MOV temp1, lr, LSR #24
LDMIA source!, {temp2,temp3,temp4,lr}
ORR temp1, temp1, temp2, LSL #8
MOV temp2, temp2, LSR #24
ORR temp2, temp2, temp3, LSL #8
MOV temp3, temp3, LSR #24
ORR temp3, temp3, temp4, LSL #8
MOV temp4, temp4, LSR #24
ORR temp4, temp4, lr, LSL #8
STMIA dest!, {temp1,temp2,temp3,temp4} ; Store bytes 17-32
SUBS count, count, #32
MOV temp1, lr, LSR #24
BGE OFFTHREE32
OFFTHREE8_TST
ADDS count, count, #24
BLT OFFTHREE4
OFFTHREE8 ; 11 cycles/8 bytes
LDMIA source!, {temp2,temp3}
ORR temp1, temp1, temp2, LSL #8
MOV temp2, temp2, LSR #24
ORR temp2, temp2, temp3, LSL #8
STMIA dest!, {temp1, temp2}
SUBS count, count, #8
MOV temp1, temp3, LSR #24
BGE OFFTHREE8
OFFTHREE4 ; 3-7 cycles/4 bytes
ADDS count, count, #4
BLT OFFTHREE_BYTES
LDR temp2, [source], #4
ORR temp1, temp1, temp2, LSL #8
STR temp1, [dest], #4
MOV temp1, temp2, LSR #24
OFFTHREE_BYTES ; 5-12 cycles/ 1-3 bytes
ADDLTS count, count, #4
BEQ OFFTHREE_EXIT ; On zero, Return to caller
CMP count, #2
LDRGEH temp2, [source], #2
STRB temp1, [dest], #1
STRGEB temp2, [dest], #1
MOVGT temp2, temp2, LSR #8
STRGTB temp2, [dest], #1
OFFTHREE_EXIT
IF Interworking :LOR: Thumbing
LDMIA sp!, {dest, temp2, temp3, lr}
BX lr
ELSE
LDMIA sp!, {dest, temp2, temp3, pc} ; On zero, Return to caller
ENDIF
;
; Source is one byte from word alignment.
; Read a byte & half word then multiple words and a byte. Then
; shift and ORR them into consecutive words for STM writes
UNALIGNED1 ; 5-6 cycles
LDRB temp1, [source], #1
LDRH temp2, [source], #2
SUBS count, count, #32
ORR temp1, temp1, temp2, LSL #8
BLT OFFONE8_TST
OFFONE32 ; 35 cycles/32 bytes
LDMIA source!, {temp2, temp3, temp4, lr}
ORR temp1, temp1, temp2, LSL #24
MOV temp2, temp2, LSR #8
ORR temp2, temp2, temp3, LSL #24
MOV temp3, temp3, LSR #8
ORR temp3, temp3, temp4, LSL #24
MOV temp4, temp4, LSR #8
ORR temp4, temp4, lr, LSL #24
STMIA dest!, {temp1,temp2,temp3,temp4} ; Store bytes 1-16
MOV temp1, lr, LSR #8
LDMIA source!, {temp2,temp3,temp4,lr}
ORR temp1, temp1, temp2, LSL #24
MOV temp2, temp2, LSR #8
ORR temp2, temp2, temp3, LSL #24
MOV temp3, temp3, LSR #8
ORR temp3, temp3, temp4, LSL #24
MOV temp4, temp4, LSR #8
ORR temp4, temp4, lr, LSL #24
STMIA dest!, {temp1,temp2,temp3,temp4} ; Store bytes 17-32
SUBS count, count, #32
MOV temp1, lr, LSR #8
BGE OFFONE32
OFFONE8_TST
ADDS count, count, #24
BLT OFFONE4
OFFONE8 ; 11 cycles/8 bytes
LDMIA source!, {temp2,temp3}
ORR temp1, temp1, temp2, LSL #24
MOV temp2, temp2, LSR #8
ORR temp2, temp2, temp3, LSL #24
STMIA dest!, {temp1,temp2}
SUBS count, count, #8
MOV temp1, temp3, LSR #8
BGE OFFONE8
OFFONE4 ; 3-9 cycles/4 bytes
ADDS count, count, #4
BLT OFFONE_BYTES
LDR temp2, [source], #4
ORR temp1, temp1, temp2, LSL #24
STR temp1, [dest], #4
BEQ OFFONE_EXIT
MOV temp1, temp2, LSR #8
OFFONE_BYTES ; 11 cycles/1-3 bytes
ADDLTS count, count, #4
BEQ OFFONE_EXIT
CMP count, #2
STRLTB temp1, [dest], #1
STRGEH temp1, [dest], #2
MOVGT temp1, temp1, LSR #16
STRGTB temp1, [dest], #1
OFFONE_EXIT
IF Interworking :LOR: Thumbing
LDMIA sp!, {dest, temp2, temp3, lr}
BX lr
ELSE
LDMIA sp!, {dest, temp2, temp3, pc} ; Return to caller
ENDIF
BYTEMOVE4 ; 12 cycles/4 bytes
CMP count, #4
BLT MMOVEXIT
LDRB temp1, [source], #1
SUB count, count, #4
LDRB temp2, [source], #1
LDRB temp3, [source], #1
LDRB lr, [source], #1
STRB temp1, [dest], #1
STRB temp2, [dest], #1
STRB temp3, [dest], #1
STRB lr, [dest], #1
MMOVEXIT ; 2-5 cycles
CMP count, #0
IF Interworking :LOR: Thumbing
LDMEQIA sp!, {dest, temp2, temp3, lr}
BXEQ lr
ELSE
LDMEQIA sp!, {dest, temp2, temp3, pc} ; On zero, Return to caller
ENDIF
;
; Store last 3 or so bytes and exit
;
BYTEMOVE ; 4-7 cycles/1 byte
LDRB temp1, [source], #1
CMP count, #2
STRB temp1, [dest], #1
BLT BYTEMOVE_EXIT
LDRGEB temp2, [source], #1 ; 8 cycles/1-2 bytes
LDRGTB temp3, [source], #1
STRGEB temp2, [dest], #1
STRGTB temp3, [dest], #1
BYTEMOVE_EXIT
IF Interworking :LOR: Thumbing
LDMIA sp!, {dest, temp2, temp3, lr}
BX lr
ELSE
LDMIA sp!, {dest, temp2, temp3, pc} ; Return to caller
ENDIF
; THIS IS NOT A RETURN
; The following reverts the stack to its state at the point of entry
; of memcpy. It then falls through to memcpybigblk to perform the
; large copy
UNDO_PROLOG
ADD sp, sp, #0x10
;
; FALLTHRU
;
ENTRY_END memcpy
NESTED_ENTRY memcpybigblk
ROUT
;//Save registers onto the stack
;//R3 should be OK to destroy. If not, we stack it off too.
stmfd sp!, {r0,r4-r11, lr}
PROLOG_END
prefetch_setup
;//Prefetch the source.
;//Have to align source register with word boundary first
mov r5, r1
and r5, r5, #~0x3
;//The PLD instruction just happens to be a Never Execute on ARM V4,
;//so we can in-line the PLD instruction and still maintain V4 compatibility
;// 0x0000000c: f5d5f000 .... PLD [r5,#0]
;// 0x00000010: f5d5f020 ... PLD [r5,#0x20]
;// 0x00000014: f5d5f040 @... PLD [r5,#0x40]
DCD 0xf5d5f000
DCD 0xf5d5f020
DCD 0xf5d5f040
;//If there are 4 or less bytes to copy, we just jump to the end
;//and do a straight byte copy.
cmp r2, #4
bls finish
;//Align the destination to a word boundary.
rsb r4, r0, #0 ;//Figure out how many bytes
ands r4, r4, #0x2 ;//See if we need to do 2 copies
ldrneb r5, [r1], #1 ;//Read the two bytes
ldrneb r6, [r1], #1
subne r2, r2, #2 ;//Decrement count by 2
strneb r5, [r0], #1 ;//Now store the two bytes
strneb r6, [r0], #1 ;//Have to do two seperate byte stores
;//because of possible address misalignment
ands r4, r0, #0x1 ;//See if we need to do 1 copy
ldrneb r5, [r1], #1 ;//Load the single byte
subne r2, r2, #1 ;//Decrement count by 1
strneb r5, [r0], #1 ;//Store the single byte
;//We need to choose which memcpy we use based
;//on how the source is now aligned. If the destination and source
;//are both aligned, then we fall through to the aligned copy
;//Check the byte alignment of the source
;//We do it in reverse order just because. If most memcopies are
;//expected to be off by a certain #, that should be placed first.
and r3, r1, #3
cmp r3, #3 ;//If both bits are set, go do case 3, off by 3 bytes
beq memcpyoffby3 ;//Goto case 3
cmp r3, #2 ;//Check for case 2, off by 2 bytes
beq memcpyoffby2 ;//Goto case 2
cmp r3, #1 ;//Check for case 1, off by 1 byte
beq memcpyoffby1 ;//Goto case 1
;//The source and destination are word aligned. We get an easy job.
memcpyoffby0
;//Now we need to align the destination to a cache line boundary
;//We need to figure out how many words are needed to align it.
;//If the number of words to align it are less than the number of words
;//we're asked to copy, just copy the required number of words.
and r4, r0, #0x1C ;//Grab the low bits of the destination
rsb r4, r4, #32 ;//Negate them and
;//add 32 to the low bits(this is
;//how many we need to move to get aligned)
and r5, r2, #0x1C ;//Check only the number of words from count
cmp r4, r2 ;//Compare low bits to align against the words from count
movhi r4, r5 ;//If words to align is greater than the count, then
;//use the words from count instead
cmp r4, #0
beq offby0mainloop
;//r4 now contains the number of times we need to do a word load/store
;//So we need to sortof back-calculate how many of the word load/stores to
;//skip in memcpyoffby0cachelinealignload/store
rsb r3, r4, #32
and r3, r3, #0x1C
;//r3 now contains the number of *instructions* to skip over.
;//Deduct words from size
sub r2, r2, r4
;//Because the & 0x1C corresponds to words, we don't have to shift anything
;//when we jump into load table
;//Using two jump tables is faster because it gives the processor a chance to load
;//data before we try to store it out.
adr r12, offby0cachelinealignload
add pc, r12, r3
offby0cachelinealignload ;//Need to have up to 8 words (1 cache line)
ldr r4, [r1], #4 ;//Could also do load/store pairs, and shift
ldr r5, [r1], #4 ;//r3 left 1 bit to calculate jump address
ldr r6, [r1], #4
ldr r7, [r1], #4
ldr r8, [r1], #4
ldr r9, [r1], #4
ldr r10,[r1], #4
ldr r11,[r1], #4
;//Now jump into the store table
adr r12, offby0cachelinealignstore
add pc, r12, r3
offby0cachelinealignstore
str r4, [r0], #4
str r5, [r0], #4
str r6, [r0], #4
str r7, [r0], #4
str r8, [r0], #4
str r9, [r0], #4
str r10,[r0], #4
str r11,[r0], #4
;//We are now cache line aligned.
;//We loop around doing prefetches and copies based on how far ahead we want to look
offby0mainloop
cmp r2, #(32*3 + 32) ;//Only keep looking ahead by 4 cache lines
bmi offby0endofmainloop
;//Preload the data
;// 0x000000f4: f5d1f060 `... PLD [r1,#0x60]
;// 0x000000f8: f5d1f080 .... PLD [r1,#0x80]
DCD 0xf5d1f060
DCD 0xf5d1f080
;//Here is the main loop that handles pipelining the loads
ldmia r1!, {r4-r11}
stmia r0!, {r4-r11}
ldmia r1!, {r4-r11}
stmia r0!, {r4-r11}
sub r2, r2, #64 ;//Take 64 bytes off of count
b offby0mainloop
offby0endofmainloop
;//If we still have more than 32*4 words to move, do one more preload
cmp r2, #32*4
bls offby0nopreload
;// 0x0000011c: f5d1f080 .... PLD [r1,#0x80]
DCD 0xf5d1f080
offby0nopreload
;//Now we finish up the copy without any preloads. The data should have already
;//been loaded into the caches
;//Copy 32 bytes at a time
offby0finishcachelines
cmp r2, #32
bmi offby0endoffinishcachelines
ldmia r1!, {r4-r11}
stmia r0!, {r4-r11}
sub r2, r2, #32 ;//Take 32 bytes off of count
b offby0finishcachelines
offby0endoffinishcachelines
;//Now we need to finish off any partial cache lines that may be left. We do a similar
;//algorithm to the cachelinealign loop above.
ands r3, r2, #0x1C ;//Get number of words left
beq finish ;//If words left==0, then branch to finish
sub r2, r2, r3 ;//Subtract words left from count
rsb r3, r3, #32 ;//Get 32-number of words left
adr r12, offby0finishload ;//That's the instructions to skip
add pc, r12, r3
offby0finishload ;//Need to have up to 8 words (1 cache line)
ldr r4, [r1], #4 ;//Could also do load/store pairs, and shift
ldr r5, [r1], #4 ;//r3 left 1 bit to calculate jump address
ldr r6, [r1], #4
ldr r7, [r1], #4
ldr r8, [r1], #4
ldr r9, [r1], #4
ldr r10,[r1], #4
ldr r11,[r1], #4
;//Now jump into the store table
adr r12, offby0finishstore
add pc, r12, r3
offby0finishstore
str r4, [r0], #4
str r5, [r0], #4
str r6, [r0], #4
str r7, [r0], #4
str r8, [r0], #4
str r9, [r0], #4
str r10,[r0], #4
str r11,[r0], #4
;//Copy the last 4 bytes, if necessary
rsb r2, r2, #4 ;//Find how many bytes to copy (0, 1,2,3, or 4)
adr r12, finishloadby0
add pc, r12, r2, LSL #2 ;//Need to shift r2 left by 2 bits to jump instructions
finishloadby0
ldrb r3, [r1], #1
ldrb r4, [r1], #1
ldrb r5, [r1], #1
ldrb r6, [r1], #1
adr r12, finishstoreby0
add pc, r12, r2, LSL #2
finishstoreby0
strb r3, [r0], #1
strb r4, [r0], #1
strb r5, [r0], #1
strb r6, [r0], #1
;//Return to calling function
IF Interworking :LOR: Thumbing
ldmfd sp!, {r0,r4-r11, lr}
bx lr
ELSE
ldmfd sp!, {r0,r4-r11, pc}
ENDIF
;//The source and destination are not aligned. We're going to have
;//to load and shift data from a temporary buffer. Stuff needs to be
;//shifted to the right by 8 bits to align properly
memcpyoffby1
;//First we need to word align the source
and r3, r1, #~0x3
;//Load the first value into the holding buffer (lr)
ldr lr, [r3], #4
mov lr, lr, LSR #8
;//Now we need to align the destination to a cache line boundary
;//We need to figure out how many words are needed to align it.
;//If the number of words to align it are less than the number of words
;//we're asked to copy, just copy the required number of words.
and r4, r0, #0x1C ;//Grab the low bits of the destination
rsb r4, r4, #32 ;//Negate them
;//Add 32 to the low bits(this is
;//how many we need to move to get aligned)
and r5, r2, #0x1C ;//Check only the number of words from count
cmp r4, r2 ;//Compare low bits to align against the words from count
movhi r4, r5 ;//If words to align is greater than the count, then
;//use the words from count instead
cmp r4, #0
beq offby1mainloop
;//r4 now contains the number of times we need to do a word load/store
;//So we need to sortof back-calculate how many of the word load/stores to
;//skip in memcpyoffby1cachelinealignload
rsb r6, r4, #32
and r6, r6, #0x1C
;//r3 now contains the number of *words* to skip over.
;//Deduct words from size
sub r2, r2, r4
;//Because the & 0x1C corresponds to words, we DO need to shift this time around
;//when we jump into load table
adr r12, offby1cachelinealignload
add pc, r12, r6, LSL #2 ;//Allows 4 instructions per byteblit
;//Because there is no convenient way to split the load/store into multiples of 2
;//unless we keep them together, for misaligned data we leave them together.
offby1cachelinealignload ;//Need to have up to 8 words (1 cache line)
ldr r4, [r3], #4
orr r12,lr, r4, LSL #24
str r12,[r0], #4
mov lr, r4, LSR #8
ldr r4, [r3], #4
orr r12,lr, r4, LSL #24
str r12,[r0], #4
mov lr, r4, LSR #8
ldr r4, [r3], #4
orr r12,lr, r4, LSL #24
str r12,[r0], #4
mov lr, r4, LSR #8
ldr r4, [r3], #4
orr r12,lr, r4, LSL #24
str r12,[r0], #4
mov lr, r4, LSR #8
ldr r4, [r3], #4
orr r12,lr, r4, LSL #24
str r12,[r0], #4
mov lr, r4, LSR #8
ldr r4, [r3], #4
orr r12,lr, r4, LSL #24
str r12,[r0], #4
mov lr, r4, LSR #8
ldr r4, [r3], #4
orr r12,lr, r4, LSL #24
str r12,[r0], #4
mov lr, r4, LSR #8
ldr r4, [r3], #4
orr r12,lr, r4, LSL #24
str r12,[r0], #4
mov lr, r4, LSR #8
;//We are now cache line aligned.
;//We loop around doing prefetches and copies based on how far ahead we want to look
offby1mainloop
cmp r2, #(32*4 + 32) ;//Only keep looking ahead by 4 cache lines
bmi offby1endofmainloop
;//Preload
;// 0x00000264: f5d3f060 `... PLD [r3,#0x60]
;// 0x00000268: f5d3f080 .... PLD [r3,#0x80]
DCD 0xf5d3f060
DCD 0xf5d3f080
;//Here is the main loop that handles pipelining the loads for off by 1
ldmia r3!, {r4, r5, r6, r7, r8, r9, r10, r11}
orr r1,lr, r4, LSL #24
mov lr, r4, LSR #8
orr r4, lr, r5, LSL #24
mov lr, r5, LSR #8
orr r5, lr, r6, LSL #24
mov lr, r6, LSR #8
orr r6, lr, r7, LSL #24
mov lr, r7, LSR #8
orr r7, lr, r8, LSL #24
mov lr, r8, LSR #8
orr r8, lr, r9, LSL #24
mov lr, r9, LSR #8
orr r9, lr, r10, LSL #24
mov lr, r10, LSR #8
orr r10, lr, r11, LSL #24
mov lr, r11, LSR #8
stmia r0!, {r1, r4, r5, r6, r7, r8, r9, r10}
ldmia r3!, {r4, r5, r6, r7, r8, r9, r10, r11}
orr r1,lr, r4, LSL #24
mov lr, r4, LSR #8
orr r4, lr, r5, LSL #24
mov lr, r5, LSR #8
orr r5, lr, r6, LSL #24
mov lr, r6, LSR #8
orr r6, lr, r7, LSL #24
mov lr, r7, LSR #8
orr r7, lr, r8, LSL #24
mov lr, r8, LSR #8
orr r8, lr, r9, LSL #24
mov lr, r9, LSR #8
orr r9, lr, r10, LSL #24
mov lr, r10, LSR #8
orr r10, lr, r11, LSL #24
mov lr, r11, LSR #8
stmia r0!, {r1, r4, r5, r6, r7, r8, r9, r10}
sub r2, r2, #64 ;//Take 64 bytes off of count
b offby1mainloop
offby1endofmainloop
;//If we still have more than 32*4 words to move, do one more preload
cmp r2, #32*4
bls offby1nopreload
;// 0x00000338: f5d3f080 .... PLD [r3,#0x80]
DCD 0xf5d3f080
offby1nopreload
;//Now we finish up the copy without any preloads. The data should have alread
;//been loaded into the caches
;//Copy 32 bytes at a time
offby1finishcachelines
cmp r2, #32
bmi offby1endoffinishcachelines
ldmia r3!, {r4, r5, r6, r7, r8, r9, r10, r11}
orr r1,lr, r4, LSL #24
mov lr, r4, LSR #8
orr r4, lr, r5, LSL #24
mov lr, r5, LSR #8
orr r5, lr, r6, LSL #24
mov lr, r6, LSR #8
orr r6, lr, r7, LSL #24
mov lr, r7, LSR #8
orr r7, lr, r8, LSL #24
mov lr, r8, LSR #8
orr r8, lr, r9, LSL #24
mov lr, r9, LSR #8
orr r9, lr, r10, LSL #24
mov lr, r10, LSR #8
orr r10, lr, r11, LSL #24
mov lr, r11, LSR #8
stmia r0!, {r1, r4, r5, r6, r7, r8, r9, r10}
sub r2, r2, #32 ;//Take 32 bytes off of count
b offby1finishcachelines
offby1endoffinishcachelines
;//Now we need to finish off any partial cache lines that may be left. We do a similar
;//algorithm to the cachelinealign loop above.
ands r6, r2, #0x1C ;//Get number of words left
subeq r1, r3, #3 ;//Realign source on exact byte if need to branch
beq finish ;//If words left==0, then branch to finish
sub r2, r2, r6 ;//Subtract words left from count
rsb r6, r6, #32 ;//Get 32-number of words left
adr r12, offby1finishload ;//That's the copies to skip
add pc, r12, r6, LSL #2 ;//..but need to multiply by 4 to get instructions
offby1finishload ;//Need to have up to 8 words (1 cache line)
ldr r4, [r3], #4
orr r12,lr, r4, LSL #24
str r12,[r0], #4
mov lr, r4, LSR #8
ldr r4, [r3], #4
orr r12,lr, r4, LSL #24
str r12,[r0], #4
mov lr, r4, LSR #8
ldr r4, [r3], #4
orr r12,lr, r4, LSL #24
str r12,[r0], #4
mov lr, r4, LSR #8
ldr r4, [r3], #4
orr r12,lr, r4, LSL #24
str r12,[r0], #4
mov lr, r4, LSR #8
ldr r4, [r3], #4
orr r12,lr, r4, LSL #24
str r12,[r0], #4
mov lr, r4, LSR #8
ldr r4, [r3], #4
orr r12,lr, r4, LSL #24
str r12,[r0], #4
mov lr, r4, LSR #8
ldr r4, [r3], #4
orr r12,lr, r4, LSL #24
str r12,[r0], #4
mov lr, r4, LSR #8
ldr r4, [r3], #4
orr r12,lr, r4, LSL #24
str r12,[r0], #4
mov lr, r4, LSR #8
sub r1, r3, #3 ;//Realign source on exact byte
;//Copy the last 4 bytes, if necessary
rsb r2, r2, #4 ;//Find how many bytes to copy (1,2,3, or 4)
adr r12, finishloadby1
add pc, r12, r2, LSL #2 ;//Need to shift r2 left by 2 bits to jump instructions
finishloadby1
ldrb r3, [r1], #1
ldrb r4, [r1], #1
ldrb r5, [r1], #1
ldrb r6, [r1], #1
adr r12, finishstoreby1
add pc, r12, r2, LSL #2
finishstoreby1
strb r3, [r0], #1
strb r4, [r0], #1
strb r5, [r0], #1
strb r6, [r0], #1
;//Return to calling function
IF Interworking :LOR: Thumbing
ldmfd sp!, {r0,r4-r11, lr}
bx lr
ELSE
ldmfd sp!, {r0,r4-r11, pc}
ENDIF
;//The source and destination are not aligned. We're going to have to load
;//and shift data from a temporary buffer. Stuff needs to be shifted to the
;//right by 16 bits to align properly
memcpyoffby2
;//First we need to word align the source
and r3, r1, #~0x3
;//Load the first value into the holding buffer (lr)
ldr lr, [r3], #4
mov lr, lr, LSR #16
;//Now we need to align the destination to a cache line boundary
;//We need to figure out how many words are needed to align it.
;//If the number of words to align it are less than the number of words
;//we're asked to copy, just copy the required number of words.
and r4, r0, #0x1C ;//Grab the low bits of the destination
rsb r4, r4, #32 ;//Negate them
;//Add 32 to the low bits(this is
;//how many we need to move to get aligned)
and r5, r2, #0x1C ;//Check only the number of words from count
cmp r4, r2 ;//Compare low bits to align against the words from count
movhi r4, r5 ;//If words to align is greater than the count, then
;//use the words from count instead
cmp r4, #0
beq offby2mainloop
;//r4 now contains the number of times we need to do a word load/store
;//So we need to sortof back-calculate how many of the word load/stores to
;//skip in memcpyoffby2cachelinealignload
rsb r6, r4, #32
and r6, r6, #0x1C
;//r3 now contains the number of *words* to skip over.
;//Deduct words from size
sub r2, r2, r4
;//Because the & 0x1C corresponds to words, we DO need to shift this time around
;//when we jump into load table
adr r12, offby2cachelinealignload
add pc, r12, r6, LSL #2 ;//Allows 4 instructions per byteblit
;//Because there is no convenient way to split the load/store into multiples of 2
;//unless we keep them together, for misaligned data we leave them together.
offby2cachelinealignload ;//Need to have up to 8 words (1 cache line)
ldr r4, [r3], #4
orr r12,lr, r4, LSL #16
str r12,[r0], #4
mov lr, r4, LSR #16
ldr r4, [r3], #4
orr r12,lr, r4, LSL #16
str r12,[r0], #4
mov lr, r4, LSR #16
ldr r4, [r3], #4
orr r12,lr, r4, LSL #16
str r12,[r0], #4
mov lr, r4, LSR #16
ldr r4, [r3], #4
orr r12,lr, r4, LSL #16
str r12,[r0], #4
mov lr, r4, LSR #16
ldr r4, [r3], #4
orr r12,lr, r4, LSL #16
str r12,[r0], #4
mov lr, r4, LSR #16
ldr r4, [r3], #4
orr r12,lr, r4, LSL #16
str r12,[r0], #4
mov lr, r4, LSR #16
ldr r4, [r3], #4
orr r12,lr, r4, LSL #16
str r12,[r0], #4
mov lr, r4, LSR #16
ldr r4, [r3], #4
orr r12,lr, r4, LSL #16
str r12,[r0], #4
mov lr, r4, LSR #16
;//So in theory we should now be cache line aligned.
;//We loop around doing prefetches and copies based on how far ahead we want to look
offby2mainloop
cmp r2, #(32*4 + 32) ;//Only keep looking ahead by 4 cache lines
bmi offby2endofmainloop
;//Preload
;// 0x00000514: f5d3f060 `... PLD [r3,#0x60]
;// 0x00000518: f5d3f080 .... PLD [r3,#0x80]
DCD 0xf5d3f060
DCD 0xf5d3f080
;//Here is the main loop that handles pipelining the loads for off by 2
ldmia r3!, {r4, r5, r6, r7, r8, r9, r10, r11}
orr r1,lr, r4, LSL #16
mov lr, r4, LSR #16
orr r4, lr, r5, LSL #16
mov lr, r5, LSR #16
orr r5, lr, r6, LSL #16
mov lr, r6, LSR #16
orr r6, lr, r7, LSL #16
mov lr, r7, LSR #16
orr r7, lr, r8, LSL #16
mov lr, r8, LSR #16
orr r8, lr, r9, LSL #16
mov lr, r9, LSR #16
orr r9, lr, r10, LSL #16
mov lr, r10, LSR #16
orr r10, lr, r11, LSL #16
mov lr, r11, LSR #16
stmia r0!, {r1, r4, r5, r6, r7, r8, r9, r10}
ldmia r3!, {r4, r5, r6, r7, r8, r9, r10, r11}
orr r1,lr, r4, LSL #16
mov lr, r4, LSR #16
orr r4, lr, r5, LSL #16
mov lr, r5, LSR #16
orr r5, lr, r6, LSL #16
mov lr, r6, LSR #16
orr r6, lr, r7, LSL #16
mov lr, r7, LSR #16
orr r7, lr, r8, LSL #16
mov lr, r8, LSR #16
orr r8, lr, r9, LSL #16
mov lr, r9, LSR #16
orr r9, lr, r10, LSL #16
mov lr, r10, LSR #16
orr r10, lr, r11, LSL #16
mov lr, r11, LSR #16
stmia r0!, {r1, r4, r5, r6, r7, r8, r9, r10}
sub r2, r2, #64 ;//Take 64 bytes off of count
b offby2mainloop
offby2endofmainloop
;//If we still have more than 32*4 words to move, do one more preload
cmp r2, #32*4
bls offby2nopreload
;// 0x000005e8: f5d3f080 .... PLD [r3,#0x80]
DCD 0xf5d3f080
offby2nopreload
;//Now we finish up the copy without any preloads. The data should have already
;//been loaded into the caches
;//Copy 32 bytes at a time
offby2finishcachelines
cmp r2, #32
bmi offby2endoffinishcachelines
ldmia r3!, {r4, r5, r6, r7, r8, r9, r10, r11}
orr r1,lr, r4, LSL #16
mov lr, r4, LSR #16
orr r4, lr, r5, LSL #16
mov lr, r5, LSR #16
orr r5, lr, r6, LSL #16
mov lr, r6, LSR #16
orr r6, lr, r7, LSL #16
mov lr, r7, LSR #16
orr r7, lr, r8, LSL #16
mov lr, r8, LSR #16
orr r8, lr, r9, LSL #16
mov lr, r9, LSR #16
orr r9, lr, r10, LSL #16
mov lr, r10, LSR #16
orr r10, lr, r11, LSL #16
mov lr, r11, LSR #16
stmia r0!, {r1, r4, r5, r6, r7, r8, r9, r10}
sub r2, r2, #32 ;//Take 32 bytes off of count
b offby2finishcachelines
offby2endoffinishcachelines
;//Now we need to finish off any partial cache lines that may be left. We do a similar
;//algorithm to the cachelinealign loop above.
ands r6, r2, #0x1C ;//Get number of words left
subeq r1, r3, #2 ;//Realign source on exact byte if need to branch
beq finish ;//If words left==0, then branch to finish
sub r2, r2, r6 ;//Subtract words left from count
rsb r6, r6, #32 ;//Get 32-number of words left
adr r12, offby2finishload ;//That's the copies to skip
add pc, r12, r6, LSL #2 ;//..but need to multiply by 4 to get instructions
offby2finishload ;//Need to have up to 8 words (1 cache line)
ldr r4, [r3], #4
orr r12,lr, r4, LSL #16
str r12,[r0], #4
mov lr, r4, LSR #16
ldr r4, [r3], #4
orr r12,lr, r4, LSL #16
str r12,[r0], #4
mov lr, r4, LSR #16
ldr r4, [r3], #4
orr r12,lr, r4, LSL #16
str r12,[r0], #4
mov lr, r4, LSR #16
ldr r4, [r3], #4
orr r12,lr, r4, LSL #16
str r12,[r0], #4
mov lr, r4, LSR #16
ldr r4, [r3], #4
orr r12,lr, r4, LSL #16
str r12,[r0], #4
mov lr, r4, LSR #16
ldr r4, [r3], #4
orr r12,lr, r4, LSL #16
str r12,[r0], #4
mov lr, r4, LSR #16
ldr r4, [r3], #4
orr r12,lr, r4, LSL #16
str r12,[r0], #4
mov lr, r4, LSR #16
ldr r4, [r3], #4
orr r12,lr, r4, LSL #16
str r12,[r0], #4
mov lr, r4, LSR #16
sub r1, r3, #2 ;//Realign source on exact byte
;//Copy the last 4 bytes, if necessary
rsb r2, r2, #4 ;//Find how many bytes to copy (1,2,3, or 4)
adr r12, finishloadby2
add pc, r12, r2, LSL #2 ;//Need to shift r2 left by 2 bits to jump instructions
finishloadby2
ldrb r3, [r1], #1
ldrb r4, [r1], #1
ldrb r5, [r1], #1
ldrb r6, [r1], #1
adr r12, finishstoreby2
add pc, r12, r2, LSL #2
finishstoreby2
strb r3, [r0], #1
strb r4, [r0], #1
strb r5, [r0], #1
strb r6, [r0], #1
;//Return to calling function
IF Interworking :LOR: Thumbing
ldmfd sp!, {r0,r4-r11, lr}
bx lr
ELSE
ldmfd sp!, {r0,r4-r11, pc}
ENDIF
;//The source and destination are not aligned. We're going to have to load
;//and shift data from a temporary buffer. Stuff needs to be shifted to the
;//right by 24 bits to align properly
memcpyoffby3
;//First we need to word align the source
and r3, r1, #~0x3
;//Load the first value into the holding buffer (lr)
ldr lr, [r3], #4
mov lr, lr, LSR #24
;//Now we need to align the destination to a cache line boundary
;//We need to figure out how many words are needed to align it.
;//If the number of words to align it are less than the number of words
;//we're asked to copy, just copy the required number of words.
and r4, r0, #0x1C ;//Grab the low bits of the destination
rsb r4, r4, #32 ;//Negate them
;//Add 32 to the low bits(this is
;//how many we need to move to get aligned)
and r5, r2, #0x1C ;//Check only the number of words from count
cmp r4, r2 ;//Compare low bits to align against the words from count
movhi r4, r5 ;//If words to align is greater than the count, then
;//use the words from count instead
cmp r4, #0
beq offby3mainloop
;//r4 now contains the number of times we need to do a word load/store
;//So we need to sortof back-calculate how many of the word load/stores to
;//skip in memcpyoffby3cachelinealignload
rsb r6, r4, #32
and r6, r6, #0x1C
;//r3 now contains the number of *words* to skip over.
;//Deduct words from size
sub r2, r2, r4
;//Because the & 0x1C corresponds to words, we DO need to shift this time around
;//when we jump into load table
adr r12, offby3cachelinealignload
add pc, r12, r6, LSL #2 ;//Allows 4 instructions per byteblit
;//Because there is no convenient way to split the load/store into multiples of 2
;//unless we keep them together, for misaligned data we leave them together.
offby3cachelinealignload ;//Need to have up to 8 words (1 cache line)
ldr r4, [r3], #4
orr r12,lr, r4, LSL #8
str r12,[r0], #4
mov lr, r4, LSR #24
ldr r4, [r3], #4
orr r12,lr, r4, LSL #8
str r12,[r0], #4
mov lr, r4, LSR #24
ldr r4, [r3], #4
orr r12,lr, r4, LSL #8
str r12,[r0], #4
mov lr, r4, LSR #24
ldr r4, [r3], #4
orr r12,lr, r4, LSL #8
str r12,[r0], #4
mov lr, r4, LSR #24
ldr r4, [r3], #4
orr r12,lr, r4, LSL #8
str r12,[r0], #4
mov lr, r4, LSR #24
ldr r4, [r3], #4
orr r12,lr, r4, LSL #8
str r12,[r0], #4
mov lr, r4, LSR #24
ldr r4, [r3], #4
orr r12,lr, r4, LSL #8
str r12,[r0], #4
mov lr, r4, LSR #24
ldr r4, [r3], #4
orr r12,lr, r4, LSL #8
str r12,[r0], #4
mov lr, r4, LSR #24
;//So in theory we should now be cache line aligned.
;//We loop around doing prefetches and copies based on how far ahead we want to look
offby3mainloop
cmp r2, #(32*4 + 32) ;//Only keep looking ahead by 4 cache lines
bmi offby3endofmainloop
;//Preload
;// 0x000007c4: f5d3f060 `... PLD [r3,#0x60]
;// 0x000007c8: f5d3f080 .... PLD [r3,#0x80]
DCD 0xf5d3f060
DCD 0xf5d3f080
;//Here is the main loop that handles pipelining the loads for off by 1
ldmia r3!, {r4, r5, r6, r7, r8, r9, r10, r11}
orr r1,lr, r4, LSL #8
mov lr, r4, LSR #24
orr r4, lr, r5, LSL #8
mov lr, r5, LSR #24
orr r5, lr, r6, LSL #8
mov lr, r6, LSR #24
orr r6, lr, r7, LSL #8
mov lr, r7, LSR #24
orr r7, lr, r8, LSL #8
mov lr, r8, LSR #24
orr r8, lr, r9, LSL #8
mov lr, r9, LSR #24
orr r9, lr, r10, LSL #8
mov lr, r10, LSR #24
orr r10, lr, r11, LSL #8
mov lr, r11, LSR #24
stmia r0!, {r1, r4, r5, r6, r7, r8, r9, r10}
ldmia r3!, {r4, r5, r6, r7, r8, r9, r10, r11}
orr r1,lr, r4, LSL #8
mov lr, r4, LSR #24
orr r4, lr, r5, LSL #8
mov lr, r5, LSR #24
orr r5, lr, r6, LSL #8
mov lr, r6, LSR #24
orr r6, lr, r7, LSL #8
mov lr, r7, LSR #24
orr r7, lr, r8, LSL #8
mov lr, r8, LSR #24
orr r8, lr, r9, LSL #8
mov lr, r9, LSR #24
orr r9, lr, r10, LSL #8
mov lr, r10, LSR #24
orr r10, lr, r11, LSL #8
mov lr, r11, LSR #24
stmia r0!, {r1, r4, r5, r6, r7, r8, r9, r10}
sub r2, r2, #64 ;//Take 64 bytes off of count
b offby3mainloop
offby3endofmainloop
;//If we still have more than 32*4 words to move, do one more preload
cmp r2, #32*4
bls offby3nopreload
;// 0x00000898: f5d3f080 .... PLD [r3,#0x80]
DCD 0xf5d3f080
offby3nopreload
;//Now we finish up the copy without any preloads. The data should have alread
;//been loaded into the caches
;//Copy 32 bytes at a time
offby3finishcachelines
cmp r2, #32
bmi offby3endoffinishcachelines
ldmia r3!, {r4, r5, r6, r7, r8, r9, r10, r11}
orr r1,lr, r4, LSL #8
mov lr, r4, LSR #24
orr r4, lr, r5, LSL #8
mov lr, r5, LSR #24
orr r5, lr, r6, LSL #8
mov lr, r6, LSR #24
orr r6, lr, r7, LSL #8
mov lr, r7, LSR #24
orr r7, lr, r8, LSL #8
mov lr, r8, LSR #24
orr r8, lr, r9, LSL #8
mov lr, r9, LSR #24
orr r9, lr, r10, LSL #8
mov lr, r10, LSR #24
orr r10, lr, r11, LSL #8
mov lr, r11, LSR #24
stmia r0!, {r1, r4, r5, r6, r7, r8, r9, r10}
sub r2, r2, #32 ;//Take 32 bytes off of count
b offby3finishcachelines
offby3endoffinishcachelines
;//Now we need to finish off any partial cache lines that may be left. We do a similar
;//algorithm to the cachelinealign loop above.
ands r6, r2, #0x1C ;//Get number of words left
subeq r1, r3, #1 ;//Realign source on exact byte if need to branch
beq finish ;//If words left==0, then branch to finish
sub r2, r2, r6 ;//Subtract words left from count
rsb r6, r6, #32 ;//Get 32-number of words left
adr r12, offby3finishload ;//That's the copies to skip
add pc, r12, r6, LSL #2 ;//..but need to multiply by 4 to get instructions
offby3finishload ;//Need to have up to 8 words (1 cache line)
ldr r4, [r3], #4
orr r12,lr, r4, LSL #8
str r12,[r0], #4
mov lr, r4, LSR #24
ldr r4, [r3], #4
orr r12,lr, r4, LSL #8
str r12,[r0], #4
mov lr, r4, LSR #24
ldr r4, [r3], #4
orr r12,lr, r4, LSL #8
str r12,[r0], #4
mov lr, r4, LSR #24
ldr r4, [r3], #4
orr r12,lr, r4, LSL #8
str r12,[r0], #4
mov lr, r4, LSR #24
ldr r4, [r3], #4
orr r12,lr, r4, LSL #8
str r12,[r0], #4
mov lr, r4, LSR #24
ldr r4, [r3], #4
orr r12,lr, r4, LSL #8
str r12,[r0], #4
mov lr, r4, LSR #24
ldr r4, [r3], #4
orr r12,lr, r4, LSL #8
str r12,[r0], #4
mov lr, r4, LSR #24
ldr r4, [r3], #4
orr r12,lr, r4, LSL #8
str r12,[r0], #4
mov lr, r4, LSR #24
sub r1, r3, #1 ;//Realign source on exact byte
;// b finish ;//Not needed, just fall through
;//Copy the last 4 bytes, if necessary
finish ;//This finish also used in < 4 bytes case
rsb r2, r2, #4 ;//Find how many bytes to copy (1,2,3, or 4)
adr r12, finishloadby3
add pc, r12, r2, LSL #2 ;//Need to shift r2 left by 2 bits to jump instructions
finishloadby3
ldrb r3, [r1], #1
ldrb r4, [r1], #1
ldrb r5, [r1], #1
ldrb r6, [r1], #1
adr r12, finishstoreby3
add pc, r12, r2, LSL #2
finishstoreby3
strb r3, [r0], #1
strb r4, [r0], #1
strb r5, [r0], #1
strb r6, [r0], #1
;//Return to calling function
IF Interworking :LOR: Thumbing
ldmfd sp!, {r0,r4-r11, lr}
bx lr
ELSE
ldmfd sp!, {r0,r4-r11, pc}
ENDIF
ENTRY_END memcpybigblk
END
|
programs/oeis/102/A102039.asm | jmorken/loda | 1 | 17164 | ; A102039: a(n) = a(n-1) + last digit of a(n-1), starting at 1.
; 1,2,4,8,16,22,24,28,36,42,44,48,56,62,64,68,76,82,84,88,96,102,104,108,116,122,124,128,136,142,144,148,156,162,164,168,176,182,184,188,196,202,204,208,216,222,224,228,236,242,244,248,256,262,264,268,276,282,284,288,296,302,304,308,316,322,324,328,336,342,344,348,356,362,364,368,376,382,384,388,396,402,404,408,416,422,424,428,436,442,444,448,456,462,464,468,476,482,484,488,496,502,504,508,516,522,524,528,536,542,544,548,556,562,564,568,576,582,584,588,596,602,604,608,616,622,624,628,636,642,644,648,656,662,664,668,676,682,684,688,696,702,704,708,716,722,724,728,736,742,744,748,756,762,764,768,776,782,784,788,796,802,804,808,816,822,824,828,836,842,844,848,856,862,864,868,876,882,884,888,896,902,904,908,916,922,924,928,936,942,944,948,956,962,964,968,976,982,984,988,996,1002,1004,1008,1016,1022,1024,1028,1036,1042,1044,1048,1056,1062,1064,1068,1076,1082,1084,1088,1096,1102,1104,1108,1116,1122,1124,1128,1136,1142,1144,1148,1156,1162,1164,1168,1176,1182,1184,1188,1196,1202,1204,1208,1216,1222,1224,1228,1236,1242
mov $2,$0
add $2,1
mov $5,$0
lpb $2
mov $0,$5
sub $2,1
sub $0,$2
sub $0,1
cal $0,267317 ; a(n) = final digit of 2^n-1.
add $0,1
mov $4,$0
mul $0,2
mul $4,2
add $0,$4
cmp $6,0
add $3,$6
div $3,$3
add $3,1
mul $3,2
sub $3,2
mul $3,$0
sub $3,8
div $3,8
add $3,1
add $1,$3
lpe
|
oeis/344/A344496.asm | neoneye/loda-programs | 11 | 14747 | ; A344496: a(0)=0; for n > 0, a(n) = a(n-1)*n + n if n is odd, (a(n-1) + n)*n otherwise.
; Submitted by <NAME>
; 0,1,6,21,100,505,3066,21469,171816,1546353,15463630,170099941,2041199436,26535592681,371498297730,5572474465965,89159591455696,1515713054746849,27282834985443606,518373864723428533,10367477294468571060,217717023183839992281,4789774510044479830666
mov $3,$0
mov $5,$0
lpb $3
mov $0,$5
sub $3,1
sub $0,$3
add $2,1
add $4,$2
mod $2,2
mul $2,$0
mul $4,$0
lpe
mov $0,$4
|
libsrc/enterprise/set_exos_variable.asm | andydansby/z88dk-mk2 | 1 | 9956 | <gh_stars>1-10
;
; Enterprise 64/128 specific routines
; by <NAME>, 2011
;
; set_exos_variable(unsigned char variable, unsigned char value);
;
;
; $Id: set_exos_variable.asm,v 1.2 2011/03/15 14:34:08 stefano Exp $
;
XLIB set_exos_variable
LIB set_exos_variable_callee
XREF ASMDISP_SET_EXOS_VARIABLE_CALLEE
set_exos_variable:
pop bc
pop de
pop hl
push hl
push de
push bc
jp set_exos_variable_callee + ASMDISP_SET_EXOS_VARIABLE_CALLEE
|
awa/src/awa-events-queues.adb | fuzzysloth/ada-awa | 0 | 25754 | -----------------------------------------------------------------------
-- awa-events-queues -- AWA Event Queues
-- Copyright (C) 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.
-----------------------------------------------------------------------
with Ada.Unchecked_Deallocation;
with Util.Serialize.Mappers;
with AWA.Events.Queues.Fifos;
with AWA.Events.Queues.Persistents;
package body AWA.Events.Queues is
-- ------------------------------
-- Queue the event.
-- ------------------------------
procedure Enqueue (Into : in Queue_Ref;
Event : in AWA.Events.Module_Event'Class) is
Q : constant Queue_Info_Access := Into.Value;
begin
if Q = null or else Q.Queue = null then
return;
end if;
Q.Queue.Enqueue (Event);
end Enqueue;
-- ------------------------------
-- Dequeue an event and process it with the <b>Process</b> procedure.
-- ------------------------------
procedure Dequeue (From : in Queue_Ref;
Process : access procedure (Event : in Module_Event'Class)) is
Q : constant Queue_Info_Access := From.Value;
begin
if Q = null or else Q.Queue = null then
return;
end if;
Q.Queue.Dequeue (Process);
end Dequeue;
-- ------------------------------
-- Returns true if the reference does not contain any element.
-- ------------------------------
function Is_Null (Queue : in Queue_Ref'Class) return Boolean is
Q : constant Queue_Info_Access := Queue.Value;
begin
return Q = null or else Q.Queue = null;
end Is_Null;
-- ------------------------------
-- Returns the queue name.
-- ------------------------------
function Get_Name (Queue : in Queue_Ref'Class) return String is
Q : constant Queue_Info_Access := Queue.Value;
begin
if Q = null then
return "";
else
return Q.Name;
end if;
end Get_Name;
-- ------------------------------
-- Get the model queue reference object.
-- Returns a null object if the queue is not persistent.
-- ------------------------------
function Get_Queue (Queue : in Queue_Ref'Class) return AWA.Events.Models.Queue_Ref is
Q : constant Queue_Info_Access := Queue.Value;
begin
if Q = null or else Q.Queue = null then
return AWA.Events.Models.Null_Queue;
else
return Q.Queue.Get_Queue;
end if;
end Get_Queue;
FIFO_QUEUE_TYPE : constant String := "fifo";
PERSISTENT_QUEUE_TYPE : constant String := "persist";
-- ------------------------------
-- Create the event queue identified by the name <b>Name</b>. The queue factory
-- identified by <b>Kind</b> is called to create the event queue instance.
-- Returns a reference to the queue.
-- ------------------------------
function Create_Queue (Name : in String;
Kind : in String;
Props : in EL.Beans.Param_Vectors.Vector;
Context : in EL.Contexts.ELContext'Class)
return Queue_Ref is
Result : Queue_Ref;
Q : constant Queue_Info_Access := new Queue_Info '(Util.Refs.Ref_Entity with
Length => Name'Length,
Name => Name,
others => <>);
begin
Queue_Refs.Ref (Result) := Queue_Refs.Create (Q);
if Kind = FIFO_QUEUE_TYPE then
Q.Queue := AWA.Events.Queues.Fifos.Create_Queue (Name, Props, Context);
elsif Kind = PERSISTENT_QUEUE_TYPE then
Q.Queue := AWA.Events.Queues.Persistents.Create_Queue (Name, Props, Context);
else
raise Util.Serialize.Mappers.Field_Error with "Invalid queue type: " & Kind;
end if;
return Result;
end Create_Queue;
function Null_Queue return Queue_Ref is
Result : Queue_Ref;
begin
return Result;
end Null_Queue;
-- ------------------------------
-- Finalize the referenced object. This is called before the object is freed.
-- ------------------------------
overriding
procedure Finalize (Object : in out Queue_Info) is
procedure Free is
new Ada.Unchecked_Deallocation (Object => Queue'Class,
Name => Queue_Access);
begin
if Object.Queue /= null then
Object.Queue.Finalize;
Free (Object.Queue);
end if;
end Finalize;
end AWA.Events.Queues;
|
alloy4fun_models/trashltl/models/7/ETXLZf2j57A9NBx88.als | Kaixi26/org.alloytools.alloy | 0 | 456 | open main
pred idETXLZf2j57A9NBx88_prop8 {
all f1,f2:File | f1->f2 in link implies eventually f1 in Trash
}
pred __repair { idETXLZf2j57A9NBx88_prop8 }
check __repair { idETXLZf2j57A9NBx88_prop8 <=> prop8o } |
oeis/042/A042762.asm | neoneye/loda-programs | 11 | 246349 | ; A042762: Numerators of continued fraction convergents to sqrt(912).
; Submitted by <NAME>
; 30,151,9090,45601,2745150,13771351,829026210,4158902401,250363170270,1255974753751,75608848395330,379300216730401,22833621852219390,114547409477827351,6895678190521860450,34592938362087129601,2082471979915749636510,10446952837940835312151,628899642256365868365570,3154945164119770177140001,189925609489442576496765630,952782992611332652660968151,57356905166169401736154854690,287737308823458341333435241601,17321595434573669881742269350750,86895714481691807750044781995351
add $0,1
mov $3,1
lpb $0
sub $0,1
add $2,$3
mov $3,$1
mov $1,$2
dif $2,12
mul $2,60
lpe
add $2,$3
add $3,$2
mov $0,$3
div $0,2
|
libsrc/spectrum/zxmmc/mmc_fastpage.asm | meesokim/z88dk | 0 | 97902 | <filename>libsrc/spectrum/zxmmc/mmc_fastpage.asm<gh_stars>0
;
; ZX Spectrum ZXMMC specific routines
; code by <NAME>
; ported to z88dk by <NAME> - Feb 2010
;
; $Id: mmc_fastpage.asm,v 1.3 2015/01/19 01:33:11 pauloscustodio Exp $
;
;-----------------------------------------------------------------------------------------
; Page in the requested ZXMMC bank
;-----------------------------------------------------------------------------------------
;
PUBLIC mmc_fastpage
INCLUDE "zxmmc.def"
mmc_fastpage:
di
ld a,l
out (FASTPAGE),a
ret
|
p2-2/prog2.asm | gregschmit/ece469 | 0 | 29250 | config_L 1001101;
init_L 00111000;
run_L;
Init_addr 01010101;
st_M_L;
run_L;
run_L;
add_addr 10011011
st_M_L;
halt;
|
ucb-logo/UCBLogo.g4 | augustand/grammars-v4 | 0 | 3561 | <reponame>augustand/grammars-v4
/*
* The MIT License (MIT)
*
* Copyright (c) 2014 by <NAME>
*
* 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.
*
* Project : logo-parser; an ANTLR4 grammar for UCB Logo
* https://github.com/bkiers/logo-parser
* Developed by : <NAME>, <EMAIL>
*/
grammar UCBLogo;
@parser::header {
import java.util.Map;
import java.util.HashMap;
}
@parser::members {
// A Map keeping track of all procedure (and macro) names and the amount
// of parameters each procedure expects.
// Taken from: http://www.cs.berkeley.edu/~bh/usermanual
final Map<String, Integer> procedures = new HashMap<String, Integer>(){{
put("word", 2);
put("list", 2);
put("sentence", 2);
put("se", 2);
put("fput", 2);
put("lput", 2);
put("array", 1);
put("mdarray", 1);
put("listtoarray", 1);
put("arraytolist", 1);
put("combine", 2);
put("reverse", 1);
put("gensym", 0);
put("first", 1);
put("firsts", 1);
put("last", 1);
put("butfirst", 1);
put("bf", 1);
put("butfirsts", 1);
put("bfs", 1);
put("butlast", 1);
put("bl", 1);
put("item", 2);
put("mditem", 2);
put("pick", 1);
put("remove", 2);
put("remdup", 1);
put("quoted", 1);
put("setitem", 3);
put("mdsetitem", 3);
put(".setfirst", 2);
put(".setbf", 2);
put(".setitem", 3);
put("push", 2);
put("pop", 1);
put("queue", 2);
put("dequeue", 1);
put("wordp", 1);
put("word?", 1);
put("listp", 1);
put("list?", 1);
put("arrayp", 1);
put("array?", 1);
put("emptyp", 1);
put("empty?", 1);
put("equalp", 2);
put("equal?", 2);
put("notequalp", 2);
put("notequal?", 2);
put("beforep", 2);
put("before?", 2);
put(".eq", 2);
put("memberp", 2);
put("member?", 2);
put("substringp", 2);
put("substring?", 2);
put("numberp", 1);
put("number?", 1);
put("vbarredp", 1);
put("vbarred?", 1);
put("backslashedp", 1);
put("backslashed?", 1);
put("count", 1);
put("ascii", 1);
put("rawascii", 1);
put("char", 1);
put("member", 2);
put("lowercase", 1);
put("uppercase", 1);
put("standout", 1);
put("parse", 1);
put("runparse", 1);
put("print", 1);
put("pr", 1);
put("type", 1);
put("show", 1);
put("readlist", 0);
put("rl", 0);
put("readword", 0);
put("rw", 0);
put("readrawline", 0);
put("readchar", 0);
put("rc", 0);
put("readchars", 1);
put("rcs", 1);
put("shell", 1);
put("setprefix", 1);
put("prefix", 0);
put("openread", 1);
put("openwrite", 1);
put("openappend", 1);
put("openupdate", 1);
put("close", 1);
put("allopen", 0);
put("closeall", 0);
put("erasefile", 1);
put("erf", 1);
put("dribble", 1);
put("nodribble", 0);
put("setread", 1);
put("setwrite", 1);
put("reader", 0);
put("writer", 0);
put("setreadpos", 1);
put("setwritepos", 1);
put("readpos", 0);
put("writepos", 0);
put("eofp", 0);
put("eof?", 0);
put("filep", 1);
put("file?", 1);
put("keyp", 0);
put("key?", 0);
put("cleartext", 0);
put("ct", 0);
put("setcursor", 1);
put("cursor", 0);
put("setmargins", 1);
put("settextcolor", 2);
put("settc", 2);
put("increasefont", 0);
put("decreasefont", 0);
put("settextsize", 1);
put("textsize", 0);
put("setfont", 1);
put("font", 0);
put("sum", 2);
put("difference", 2);
put("minus", 1);
put("product", 2);
put("quotient", 2);
put("remainder", 2);
put("modulo", 2);
put("int", 1);
put("round", 1);
put("sqrt", 1);
put("power", 2);
put("exp", 1);
put("log10", 1);
put("ln", 1);
put("sin", 1);
put("radsin", 1);
put("cos", 1);
put("radcos", 1);
put("arctan", 1);
put("radarctan", 1);
put("iseq", 2);
put("rseq", 3);
put("lessp", 2);
put("less?", 2);
put("greaterp", 2);
put("greater?", 2);
put("lessequalp", 2);
put("lessequal?", 2);
put("greaterequalp", 2);
put("greaterequal?", 2);
put("random", 1);
put("rerandom", 0);
put("form", 3);
put("bitand", 2);
put("bitor", 2);
put("bitxor", 2);
put("bitnot", 1);
put("ashift", 2);
put("lshift", 2);
put("and", 2);
put("or", 2);
put("not", 1);
put("forward", 1);
put("fd", 1);
put("back", 1);
put("bk", 1);
put("left", 1);
put("lt", 1);
put("right", 1);
put("rt", 1);
put("setpos", 1);
put("setxy", 2);
put("setx", 1);
put("sety", 1);
put("setheading", 1);
put("seth", 1);
put("home", 0);
put("arc", 2);
put("pos", 0);
put("xcor", 0);
put("ycor", 0);
put("heading", 0);
put("towards", 1);
put("scrunch", 0);
put("showturtle", 0);
put("st", 0);
put("hideturtle", 0);
put("ht", 0);
put("clean", 0);
put("clearscreen", 0);
put("cs", 0);
put("wrap", 0);
put("window", 0);
put("fence", 0);
put("fill", 0);
put("filled", 2);
put("label", 1);
put("setlabelheight", 1);
put("textscreen", 0);
put("ts", 0);
put("fullscreen", 0);
put("fs", 0);
put("splitscreen", 0);
put("ss", 0);
put("setscrunch", 2);
put("refresh", 0);
put("norefresh", 0);
put("shownp", 0);
put("shown?", 0);
put("screenmode", 0);
put("turtlemode", 0);
put("labelsize", 0);
put("pendown", 0);
put("pd", 0);
put("penup", 0);
put("pu", 0);
put("penpaint", 0);
put("ppt", 0);
put("penerase", 0);
put("pe", 0);
put("penreverse", 0);
put("px", 0);
put("setpencolor", 1);
put("setpc", 1);
put("setpalette", 2);
put("setpensize", 1);
put("setpenpattern", 1);
put("setpen", 1);
put("setbackground", 1);
put("setbg", 1);
put("pendownp", 0);
put("pendown?", 0);
put("penmode", 0);
put("pencolor", 0);
put("pc", 0);
put("palette", 1);
put("pensize", 0);
put("penpattern", 0);
put("pen", 0);
put("background", 0);
put("bg", 0);
put("savepict", 1);
put("loadpict", 1);
put("epspict", 1);
put("mousepos", 0);
put("clickpos", 0);
put("buttonp", 0);
put("button?", 0);
put("button", 0);
put("define", 2);
put("text", 1);
put("fulltext", 1);
put("copydef", 2);
put("make", 2);
put("name", 2);
put("local", 1);
put("localmake", 2);
put("thing", 1);
put(":quoted.varname", 0);
put("global", 1);
put("pprop", 3);
put("gprop", 2);
put("remprop", 2);
put("plist", 1);
put("procedurep", 1);
put("procedure?", 1);
put("primitivep", 1);
put("primitive?", 1);
put("definedp", 1);
put("defined?", 1);
put("namep", 1);
put("name?", 1);
put("plistp", 1);
put("plist?", 1);
put("contents", 0);
put("buried", 0);
put("traced", 0);
put("stepped", 0);
put("procedures", 0);
put("primitives", 0);
put("names", 0);
put("plists", 0);
put("namelist", 1);
put("pllist", 1);
put("arity", 1);
put("nodes", 0);
put("printout", 1);
put("po", 1);
put("poall", 0);
put("pops", 0);
put("pons", 0);
put("popls", 0);
put("pon", 1);
put("popl", 1);
put("pot", 1);
put("pots", 0);
put("erase", 1);
put("er", 1);
put("erall", 0);
put("erps", 0);
put("erns", 0);
put("erpls", 0);
put("ern", 1);
put("erpl", 1);
put("bury", 1);
put("buryall", 0);
put("buryname", 1);
put("unbury", 1);
put("unburyall", 0);
put("unburyname", 1);
put("buriedp", 1);
put("buried?", 1);
put("trace", 1);
put("untrace", 1);
put("tracedp", 1);
put("traced?", 1);
put("step", 1);
put("unstep", 1);
put("steppedp", 1);
put("stepped?", 1);
put("edit", 1);
put("ed", 1);
put("editfile", 1);
put("edall", 0);
put("edps", 0);
put("edns", 0);
put("edpls", 0);
put("edn", 1);
put("edpl", 1);
put("save", 1);
put("savel", 2);
put("load", 1);
put("cslsload", 1);
put("help", 1);
put("seteditor", 1);
put("setlibloc", 1);
put("sethelploc", 1);
put("setcslsloc", 1);
put("settemploc", 1);
put("gc", 0);
put(".setsegmentsize", 1);
put("run", 1);
put("runresult", 1);
put("repeat", 2);
put("forever", 1);
put("repcount", 0);
put("if", 2);
put("ifelse", 3);
put("test", 1);
put("iftrue", 1);
put("ift", 1);
put("iffalse", 1);
put("iff", 1);
put("stop", 0);
put("output", 1);
put("op", 1);
put("catch", 2);
put("throw", 1);
put("error", 0);
put("pause", 0);
put("continue", 1);
put("co", 1);
put("wait", 1);
put("bye", 0);
put(".maybeoutput", 1);
put("goto", 1);
put("tag", 1);
put("ignore", 1);
put("`", 1);
put("for", 2);
put("do.while", 2);
put("while", 2);
put("do.until", 2);
put("until", 2);
put("case", 2);
put("cond", 1);
put("apply", 2);
put("invoke", 2);
put("foreach", 2);
put("map", 2);
put("map.se", 2);
put("filter", 2);
put("find", 2);
put("reduce", 2);
put("crossmap", 2);
put("cascade", 3);
put("cascade.2", 5);
put("transfer", 3);
put(".defmacro", 2);
put("macrop", 1);
put("macro?", 1);
put("macroexpand", 1);
}};
// A flag keeping track if the parser already looked ahead to resolve user
// defined procedures that will be stored in the 'procedures' map.
private boolean discoveredAllProcedures = false;
/**
* Creates a new instance of a {@code UCBLogoParser} where
* any user defined procedures will be resolved in an intial
* parse.
*
* @param source
* the UCB Logo source to parse.
*/
public UCBLogoParser(String source) {
this(new ANTLRInputStream(source));
}
/**
* Creates a new instance of a {@code UCBLogoParser} where
* any user defined procedures will be resolved in an initial
* parse.
*
* @param input
* the inout stream containing the UCB Logo source
* to parse.
*/
public UCBLogoParser(ANTLRInputStream input) {
this(new CommonTokenStream(new UCBLogoLexer(input)));
// Create a lexer and parser that will resolve user defined procedures.
UCBLogoLexer lexer = new UCBLogoLexer(input);
UCBLogoParser parser = new UCBLogoParser(new CommonTokenStream(lexer));
ParseTreeWalker.DEFAULT.walk(new UCBLogoBaseListener(){
@Override
public void enterProcedure_def(@NotNull UCBLogoParser.Procedure_defContext ctx) {
// Yes, we found a procedure: save it in the procedures-map.
procedures.put(ctx.NAME().getText(), ctx.variables.amount);
}
@Override
public void enterMacro_def(@NotNull UCBLogoParser.Macro_defContext ctx) {
// Yes, we found a macro: save it in the procedures-map.
procedures.put(ctx.NAME().getText(), ctx.variables.amount);
}
}, parser.parse());
// Reset the input stream after having resolved the user defined procedures.
input.reset();
this.discoveredAllProcedures = true;
}
/**
* Returns the amount of parameters the procedure expects. Note
* that this method will only be called after {@link #procedureNameAhead()}
* already returned {@code true}.
*
* @param procedureName
* the name of the procedure.
*
* @return the amount of parameters the procedure expects.
*/
private int amountParams(String procedureName) {
return procedures.get(procedureName.toLowerCase());
}
/**
* Returns {@code true} iff the next token in the stream is of type
* {@code NAME} and contains the text defined in {@code name}.
*
* @param name
* the text the next token should contain.
*
* @returns {@code true} iff the next token in the stream is of type
* {@code NAME} and contains the text defined in {@code name}.
*/
private boolean nameAhead(String name) {
Token token = _input.LT(1);
return token.getType() == NAME && token.getText().equalsIgnoreCase(name);
}
/**
* Returns {@code true} iff the next token in the inout stream is of
* type {@code NAME} and is present in the {@code procedures}.
*
* @returns {@code true} iff the next token in the inout stream is of
* type {@code NAME} and is present in the {@code procedures}.
*/
private boolean procedureNameAhead() {
Token token = _input.LT(1);
return token.getType() == NAME && procedures.containsKey(token.getText().toLowerCase());
}
}
@lexer::members {
// Counters that keep track of how deep the lexer is currently in a list
// or array. Depending on this value, a "FOO" is either tokenized as a NAME
// (when not inside a list or array) or else as a WORD (when inside a list
// or array).
private int listDepth = 0;
private int arrayDepth = 0;
}
parse
: instruction* EOF
;
instruction
: procedure_def #procedureDefInstruction
| macro_def #macroDefInstruction
| procedure_call_extra_input #procedureCallExtraInputInstruction
| procedure_call #procedureCallInstruction
;
procedure_def
: TO NAME variables body_def
{
procedures.put($NAME.getText(), $variables.amount);
}
;
macro_def
: MACRO NAME variables body_def
{
procedures.put($NAME.getText(), $variables.amount);
}
;
variables returns [int amount]
: {$amount = 0;} ( VARIABLE {$amount++;} )*
;
body_def
: {discoveredAllProcedures}? body_instruction* END
| ~END* END
;
body_instruction
: procedure_call_extra_input
| procedure_call
;
procedure_call_extra_input
: '(' {procedureNameAhead()}? NAME expression* ')'
;
procedure_call
: {procedureNameAhead()}? NAME expressions[$NAME.getText(), amountParams($NAME.getText())]
;
expressions[String name, int total]
locals[int n = 0] // a counter to keep track of how many expressions we've parsed
: (
{$n < $total}? // check if we've parsed enough expressions
expression
{$n++;} // increments the amount of expressions we've parsed
)*
{
// Make sure there are enough inputs parsed for 'name'.
if ($total > $n) {
throw new RuntimeException("not enough inputs to " + name);
}
}
;
expression
: '-' expression #unaryMinusExpression
| procedure_call_extra_input #procedureCallExtraInput
| procedure_call #procedureCallExpression
| '(' expression ')' #parensExpression
| array #arrayExpression
| list #listExpression
| WORD #wordExpression
| QUOTED_WORD #quotedWordExpression
| NUMBER #numberExpression
| VARIABLE #variableExpression
| NAME #nameExpression
| expression '*' expression #multiplyExpression
| expression '/' expression #divideExpression
| expression '+' expression #additionExpression
| expression '-' expression #subtractionExpression
| expression '<' expression #lessThanExpression
| expression '>' expression #greaterThanExpression
| expression '<=' expression #lessThanEqualsExpression
| expression '>=' expression #greaterThanEqualsExpression
| expression '=' expression #equalsExpression
| expression '<>' expression #notEqualsExpressionExpression
;
array
: '{' ( ~( '{' | '}' ) | array )* '}'
;
list
: '[' ( ~( '[' | ']' ) | list )* ']'
;
TO : T O;
END : E N D;
MACRO : '.' M A C R O;
WORD
: {listDepth > 0}? ~[ \t\r\n\[\];] ( ~[ \t\r\n\];~] | LINE_CONTINUATION | '\\' ( [ \t\[\]();~] | LINE_BREAK ) )*
| {arrayDepth > 0}? ~[ \t\r\n{};] ( ~[ \t\r\n};~] | LINE_CONTINUATION | '\\' ( [ \t{}();~] | LINE_BREAK ) )*
;
SKIP_
: ( COMMENT | LINE_BREAK | SPACES | LINE_CONTINUATION ) -> skip
;
OPEN_ARRAY
: '{' {arrayDepth++;}
;
CLOSE_ARRAY
: '}' {arrayDepth--;}
;
OPEN_LIST
: '[' {listDepth++;}
;
CLOSE_LIST
: ']' {listDepth--;}
;
MINUS : '-';
PLUS : '+';
MULT : '*';
DIV : '/';
LT : '<';
GT : '>';
EQ : '=';
LT_EQ : '<=';
GT_EQ : '>=';
NOT_EQ : '<>';
QUOTED_WORD
: '"' ( ~[ \t\r\n\[\]();~] | LINE_CONTINUATION | '\\' ( [ \t\[\]();~] | LINE_BREAK ) )*
;
NUMBER
: [0-9]+ ( '.' [0-9]+ )?
;
VARIABLE
: ':' NAME
;
NAME
: ~[-+*/=<> \t\r\n\[\]()":{}] ( ~[-+*/=<> \t\r\n\[\](){}] | LINE_CONTINUATION | '\\' [-+*/=<> \t\r\n\[\]();~{}] )*
;
ANY
: . {System.err.println("unexpected char: " + getText());}
;
fragment COMMENT
: ';' ~[\r\n~]*
;
fragment LINE_CONTINUATION
: COMMENT? '~' SPACES? LINE_BREAK
;
fragment LINE_BREAK
: '\r'? '\n'
| '\r'
;
fragment SPACES
: [ \t]+
;
fragment SPACE_CHARS
: [ \t\r\n]+
;
fragment A : [Aa];
fragment B : [Bb];
fragment C : [Cc];
fragment D : [Dd];
fragment E : [Ee];
fragment F : [Ff];
fragment G : [Gg];
fragment H : [Hh];
fragment I : [Ii];
fragment J : [Jj];
fragment K : [Kk];
fragment L : [Ll];
fragment M : [Mm];
fragment N : [Nn];
fragment O : [Oo];
fragment P : [Pp];
fragment Q : [Qq];
fragment R : [Rr];
fragment S : [Ss];
fragment T : [Tt];
fragment U : [Uu];
fragment V : [Vv];
fragment W : [Ww];
fragment X : [Xx];
fragment Y : [Yy];
fragment Z : [Zz];
|
oeis/109/A109165.asm | neoneye/loda-programs | 11 | 86713 | ; A109165: a(n) = 5*a(n-2) - 2*a(n-4), n >= 4; a(n) = (1/6)*(-1)^n + 4/3)*2^n - 1/2.
; Submitted by <NAME>
; 1,2,5,10,23,46,105,210,479,958,2185,4370,9967,19934,45465,90930,207391,414782,946025,1892050,4315343,8630686,19684665,39369330,89792639,179585278,409593865,819187730,1868384047,3736768094,8522732505
mov $1,1
mov $2,1
lpb $0
sub $0,2
mul $2,2
add $1,$2
add $2,$1
lpe
lpb $0
bin $0,3
mul $2,2
lpe
mov $0,$2
|
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_458.asm | ljhsiun2/medusa | 9 | 7740 | .global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r13
push %r8
push %rax
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_D_ht+0x1314f, %rcx
nop
nop
nop
nop
cmp $19301, %r11
movb $0x61, (%rcx)
nop
nop
nop
inc %rdi
lea addresses_UC_ht+0xca51, %r11
nop
nop
nop
nop
nop
xor $12290, %rax
vmovups (%r11), %ymm0
vextracti128 $0, %ymm0, %xmm0
vpextrq $1, %xmm0, %rdx
nop
nop
nop
nop
sub %rdx, %rdx
lea addresses_UC_ht+0x1666f, %rsi
lea addresses_D_ht+0x1dc4f, %rdi
nop
nop
nop
nop
nop
cmp $48202, %r13
mov $51, %rcx
rep movsb
nop
inc %r13
lea addresses_UC_ht+0x1e64f, %rax
sub $739, %r8
movups (%rax), %xmm1
vpextrq $0, %xmm1, %rcx
xor %r13, %r13
lea addresses_UC_ht+0x1812d, %rsi
lea addresses_UC_ht+0x14f4f, %rdi
nop
nop
nop
nop
xor $1116, %rdx
mov $26, %rcx
rep movsw
nop
nop
nop
nop
dec %r8
lea addresses_UC_ht+0x153c9, %rcx
cmp %rsi, %rsi
mov $0x6162636465666768, %rdi
movq %rdi, (%rcx)
inc %rcx
lea addresses_A_ht+0xd54f, %rsi
nop
xor %rdx, %rdx
movb (%rsi), %cl
nop
nop
nop
nop
nop
xor %rsi, %rsi
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rax
pop %r8
pop %r13
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r15
push %r8
push %rbp
push %rdi
push %rdx
push %rsi
// Store
lea addresses_WT+0xbd23, %rsi
nop
nop
xor $34915, %rdx
mov $0x5152535455565758, %rbp
movq %rbp, (%rsi)
nop
dec %rdx
// Store
lea addresses_UC+0x15f4f, %rdi
nop
nop
add $50776, %r12
mov $0x5152535455565758, %r15
movq %r15, (%rdi)
nop
nop
nop
add %rsi, %rsi
// Faulty Load
lea addresses_WT+0x1c24f, %r12
nop
and $28369, %rdx
vmovups (%r12), %ymm2
vextracti128 $0, %ymm2, %xmm2
vpextrq $0, %xmm2, %rbp
lea oracles, %r12
and $0xff, %rbp
shlq $12, %rbp
mov (%r12,%rbp,1), %rbp
pop %rsi
pop %rdx
pop %rdi
pop %rbp
pop %r8
pop %r15
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_WT', 'same': True, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_WT', 'same': False, 'size': 8, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_UC', 'same': False, 'size': 8, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
[Faulty Load]
{'src': {'type': 'addresses_WT', 'same': True, 'size': 32, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'dst': {'type': 'addresses_D_ht', 'same': False, 'size': 1, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_UC_ht', 'same': True, 'size': 32, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_UC_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 3, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 16, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_UC_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 8, 'same': False}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_UC_ht', 'same': False, 'size': 8, 'congruent': 1, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'}
{'src': {'type': 'addresses_A_ht', 'same': False, 'size': 1, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'39': 21829}
39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39
*/
|
source/adam-a_pragma.ads | charlie5/aIDE | 3 | 609 | with
AdaM.Entity,
Ada.Containers.Vectors,
Ada.Streams;
package AdaM.a_Pragma
is
type Item is new Entity.item with private;
-- View
--
type View is access all Item'Class;
procedure View_write (Stream : not null access Ada.Streams.Root_Stream_Type'Class;
Self : in View);
procedure View_read (Stream : not null access Ada.Streams.Root_Stream_Type'Class;
Self : out View);
for View'write use View_write;
for View'read use View_read;
-- Vector
--
package Vectors is new ada.Containers.Vectors (Positive, View);
subtype Vector is Vectors.Vector;
-- Forge
--
function new_Pragma (Name : in String := "") return a_Pragma.view;
procedure free (Self : in out a_Pragma.view);
procedure destruct (Self : in out a_Pragma.item);
-- Attributes
--
overriding
function Id (Self : access Item) return AdaM.Id;
overriding
function Name (Self : in Item) return Identifier;
procedure Name_is (Self : in out Item; Now : in String);
procedure add_Argument (Self : in out Item; Now : in String);
function Arguments (Self : in Item) return text_Lines;
overriding
function to_Source (Self : in Item) return text_Vectors.Vector;
type Kind is (all_calls_remote,
assert,
assertion_policy,
asynchronous,
atomic,
atomic_components,
attach_handler,
convention,
cpu,
default_storage_pool,
detect_blocking,
discard_names,
dispatching_domain,
elaborate,
elaborate_all,
elaborate_body,
export,
import,
independent,
independent_components,
inline,
inspection_point,
interrupt_handler,
interrupt_priority,
linker_options,
list,
locking_policy,
no_return,
normalize_scalars,
optimize,
pack,
page,
partition_elaboration_policy,
preelaborable_initialization,
preelaborate,
priority,
priority_specific_dispatching,
profile,
pure,
queuing_policy,
relative_deadline,
remote_call_interface,
remote_types,
restrictions,
reviewable,
shared_passive,
storage_size,
suppress,
task_dispatching_policy,
unchecked_union,
unsuppress,
volatile,
volatile_components,
assertion_policy_2);
private
type Item is new Entity.item with
record
Name : Text;
Arguments : text_Lines;
end record;
end AdaM.a_Pragma;
|
oeis/174/A174026.asm | neoneye/loda-programs | 11 | 83994 | ; A174026: Convolved with its aerated variant = (1, 2, 3,...)
; Submitted by <NAME>
; 1,2,1,0,2,4,2,0,1,2,1,0,0,0,0,0,2,4,2,0,4,8,4,0,2,4,2,0,0,0,0,0,1,2,1,0,2,4,2,0,1,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,4,2,0,4,8,4,0,2,4,2,0,0,0,0,0,4,8,4,0,8,16,8,0,4,8,4,0,0,0,0,0,2,4
mov $3,1
lpb $0
mov $2,$0
div $0,4
pow $2,3
add $2,1
mod $2,4
mul $2,$3
mov $3,$2
lpe
mov $0,$3
|
oeis/293/A293553.asm | neoneye/loda-programs | 11 | 22819 | ; A293553: a(n) is the integer k that minimizes |k/Fibonacci(n) - 1/4|.
; 0,0,0,0,1,1,2,3,5,8,14,22,36,58,94,152,247,399,646,1045,1691,2736,4428,7164,11592,18756,30348,49104,79453,128557,208010,336567,544577,881144,1425722,2306866,3732588,6039454,9772042,15811496,25583539,41395035,66978574,108373609,175352183,283725792,459077976,742803768,1201881744,1944685512,3146567256,5091252768,8237820025,13329072793,21566892818,34895965611,56462858429,91358824040,147821682470,239180506510,387002188980,626182695490,1013184884470,1639367579960,2652552464431,4291920044391
seq $0,45 ; Fibonacci numbers: F(n) = F(n-1) + F(n-2) with F(0) = 0 and F(1) = 1.
add $0,1
div $0,4
|
test/Succeed/Issue1087.agda | shlevy/agda | 1,989 | 7004 | -- Andreas, 2014-04-12, Order of declaration mattered in the presence
-- of meta variables involving sizes
-- {-# OPTIONS -v tc.meta:10 -v tc.meta.assign:10 #-}
-- Error persists without option sized-types
{-# OPTIONS --sized-types #-}
module _ where
open import Common.Size
-- different error if we do not use the built-ins (Size vs Size<)
module Works where
mutual
data Colist' i : Set where
inn : (xs : Colist i) → Colist' i
record Colist i : Set where
coinductive
field out : ∀ {j : Size< i} → Colist' j
module Fails where
mutual
record Colist i : Set where
coinductive
field out : ∀ {j : Size< i} → Colist' j
data Colist' i : Set where
inn : (xs : Colist i) → Colist' i
-- Error: Issue1087.agda:21,45-46
-- Cannot instantiate the metavariable _20 to solution (Size< i) since
-- it contains the variable i which is not in scope of the
-- metavariable or irrelevant in the metavariable but relevant in the
-- solution
-- when checking that the expression j has type _20
-- Works now.
|
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c3/c38107b.ada | best08618/asylo | 7 | 11225 | <filename>gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c3/c38107b.ada
-- C38107B.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:
-- IF A DISCRIMINANT CONSTRAINT IS APPLIED TO AN ACCESS TYPE WHICH
-- DESIGNATES AN INCOMPLETE TYPE WHICH WAS DECLARED IN THE VISIBLE
-- OR PRIVATE PART OF A PACKAGE SPECIFICATION, OR IN A DECLARATIVE
-- PART, CONSTRAINT_ERROR IS RAISED IF ONE OF THE
-- DISCRIMINANT'S VALUES DOES NOT BELONG TO THE CORRESPONDING
-- DISCRIMINANT'S SUBTYPE.
-- HISTORY:
-- DHH 08/05/88 CREATED ORIGINAL TEST.
WITH REPORT; USE REPORT;
PROCEDURE C38107B IS
BEGIN
TEST("C38107B", "IF A DISCRIMINANT CONSTRAINT IS APPLIED TO AN " &
"ACCESS TYPE WHICH DESIGNATES AN INCOMPLETE " &
"TYPE WHICH WAS DECLARED IN THE VISIBLE OR " &
"PRIVATE PART OF A PACKAGE SPECIFICATION, OR IN " &
"A DECLARATIVE PART, CONSTRAINT_ERROR IS " &
"RAISED IF ONE OF THE DISCRIMINANT'S VALUES " &
"DOES NOT BELONG TO THE CORRESPONDING " &
"DISCRIMINANT'S SUBTYPE");
------------------------------ VISIBLE ------------------------------
BEGIN
DECLARE
PACKAGE PACK IS
SUBTYPE SMALLER IS INTEGER RANGE 1 .. 5;
TYPE INCOMPLETE(A : SMALLER);
TYPE ACC_INC IS ACCESS INCOMPLETE;
SUBTYPE SUB_ACC IS ACC_INC(IDENT_INT(6));
TYPE INCOMPLETE(A : SMALLER) IS
RECORD
T : INTEGER := A;
END RECORD;
END PACK;
PACKAGE BODY PACK IS
BEGIN
FAILED("CONSTRAINT_ERROR NOT RAISED - VISIBLE");
DECLARE
Z : SUB_ACC := NEW INCOMPLETE(IDENT_INT(6));
BEGIN
IF IDENT_INT(Z.T) = IDENT_INT(6) THEN
COMMENT("THIS LINE SHOULD NOT PRINT");
END IF;
END;
EXCEPTION
WHEN CONSTRAINT_ERROR =>
FAILED("CONSTRAINT_ERROR RAISED LATE " &
"- VISIBLE");
WHEN OTHERS =>
FAILED("UNEXPECTED EXCEPTION RAISED " &
"LATE - VISIBLE");
END PACK;
BEGIN
NULL;
END;
EXCEPTION
WHEN CONSTRAINT_ERROR =>
NULL;
WHEN OTHERS =>
FAILED("UNEXPECTED EXCEPTION RAISED " &
"- VISIBLE");
END;
------------------------------ PRIVATE ------------------------------
BEGIN
DECLARE
PACKAGE PACK2 IS
SUBTYPE SMALLER IS INTEGER RANGE 1 .. 5;
TYPE PRIV IS PRIVATE;
PRIVATE
TYPE PRIV IS
RECORD
V : INTEGER;
END RECORD;
TYPE INCOMPLETE(A : SMALLER);
TYPE ACC_INC IS ACCESS INCOMPLETE;
SUBTYPE SUB_ACC IS ACC_INC(IDENT_INT(0));
TYPE INCOMPLETE(A : SMALLER) IS
RECORD
T : INTEGER := A;
U : PRIV := (V => A ** IDENT_INT(2));
END RECORD;
END PACK2;
PACKAGE BODY PACK2 IS
BEGIN
FAILED("CONSTRAINT_ERROR NOT RAISED - PRIVATE");
DECLARE
Z : SUB_ACC := NEW INCOMPLETE(IDENT_INT(0));
BEGIN
IF IDENT_INT(Z.T) = IDENT_INT(0) THEN
COMMENT("THIS LINE SHOULD NOT PRINT");
END IF;
END;
EXCEPTION
WHEN CONSTRAINT_ERROR =>
FAILED("CONSTRAINT_ERROR RAISED TOO LATE " &
"- PRIVATE");
WHEN OTHERS =>
FAILED("UNEXPECTED EXCEPTION RAISED LATE" &
"- PRIVATE");
END PACK2;
BEGIN
NULL;
END;
EXCEPTION
WHEN CONSTRAINT_ERROR =>
NULL;
WHEN OTHERS =>
FAILED("UNEXPECTED EXCEPTION RAISED " &
"- PRIVATE");
END;
-------------------------- DECLARATIVE PART --------------------------
BEGIN
DECLARE
SUBTYPE SMALLER IS INTEGER RANGE 1 .. 5;
TYPE INCOMPLETE(A : SMALLER);
TYPE ACC_INC IS ACCESS INCOMPLETE;
SUBTYPE SUB_ACC IS ACC_INC(IDENT_INT(6));
TYPE INCOMPLETE(A : SMALLER) IS
RECORD
T : INTEGER := INTEGER'(A);
END RECORD;
BEGIN
FAILED("CONSTRAINT_ERROR NOT RAISED - BLOCK " &
"STATEMENT");
DECLARE
Z : SUB_ACC := NEW INCOMPLETE(IDENT_INT(6));
BEGIN
IF IDENT_INT(Z.T) = IDENT_INT(6) THEN
COMMENT("THIS LINE SHOULD NOT PRINT");
END IF;
END;
EXCEPTION
WHEN CONSTRAINT_ERROR =>
FAILED("CONSTRAINT_ERROR RAISED TOO LATE " &
"- BLOCK STATEMENT");
WHEN OTHERS =>
FAILED("UNEXPECTED EXCEPTION RAISED LATE" &
"- BLOCK STATEMENT");
END;
EXCEPTION
WHEN CONSTRAINT_ERROR =>
NULL;
WHEN OTHERS =>
FAILED("UNEXPECTED EXCEPTION RAISED " &
"- BLOCK STATEMENT");
END;
RESULT;
END C38107B;
|
src/Colist.agda | Zalastax/thesis | 1 | 13085 | <reponame>Zalastax/thesis
module Colist where
open import Size using (Size ; Size<_)
data Colist (i : Size) {a} (A : Set a) : Set a
record ∞Colist (i : Size) {a} (A : Set a) : Set a where
coinductive
constructor delay_
field force : ∀ {j : Size< i} → Colist j A
data Colist (i : Size) {a} (A : Set a) where
[] : Colist i A
_∷_ : (x : A) (xs : ∞Colist i A) → Colist i A
|
samples/auth_demo.adb | Letractively/ada-security | 0 | 961 | -----------------------------------------------------------------------
-- auth_cb -- Authentication callback examples
-- Copyright (C) 2013 <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.
-----------------------------------------------------------------------
with Util.Properties;
with Util.Log.Loggers;
with Util.Http.Clients.Web;
with AWS.Config;
with AWS.Config.Set;
with AWS.Server;
with AWS.Services.Dispatchers.URI;
with AWS.Services.Page_Server;
with AWS.Services.Web_Block.Registry;
with AWS.Net.SSL;
with Auth_CB;
procedure Auth_Demo is
Log : Util.Log.Loggers.Logger := Util.Log.Loggers.Create ("Auth_Demo");
Dispatcher : AWS.Services.Dispatchers.URI.Handler;
WS : AWS.Server.HTTP;
Config : AWS.Config.Object;
begin
if not AWS.Net.SSL.Is_Supported then
Log.Error ("SSL is not supported by AWS.");
Log.Error ("SSL is required for the OpenID connector to connect to OpenID providers.");
Log.Error ("Please, rebuild AWS with SSL support.");
return;
end if;
-- Get the authentication provider configuration. We use the Util.Properties and some
-- java like property file. Other configuration implementation are possible.
Auth_CB.Config.Load_Properties ("samples.properties");
Util.Log.Loggers.Initialize (Util.Properties.Manager (Auth_CB.Config));
-- Setup the HTTP client implementation to use AWS.
Util.Http.Clients.Web.Register;
-- Setup AWS dispatchers.
AWS.Services.Dispatchers.URI.Register (Dispatcher, "/atlas/auth/auth",
Auth_CB.Get_Authorization'Access,
Prefix => True);
AWS.Services.Dispatchers.URI.Register (Dispatcher, "/verify",
Auth_CB.Verify_Authorization'Access);
AWS.Services.Dispatchers.URI.Register (Dispatcher, "/atlas",
AWS.Services.Page_Server.Callback'Access,
Prefix => True);
AWS.Services.Dispatchers.URI.Register (Dispatcher, "/success",
Auth_CB.User_Info'Access);
AWS.Services.Web_Block.Registry.Register ("success", "samples/web/success.thtml", null);
-- Configure AWS.
Config := AWS.Config.Get_Current;
AWS.Config.Set.Session (Config, True);
AWS.Config.Set.Session_Name (Config, "AUTH_DEMO");
AWS.Config.Set.Reuse_Address (Config, True);
AWS.Config.Set.WWW_Root (Config, "samples/web");
AWS.Server.Start (WS, Dispatcher => Dispatcher, Config => Config);
Log.Info ("Connect you browser to: http://localhost:8080/atlas/login.html");
Log.Info ("Press 'q' key to stop the server.");
AWS.Server.Wait (AWS.Server.Q_Key_Pressed);
Log.Info ("Shutting down server...");
AWS.Server.Shutdown (WS);
end Auth_Demo;
|
ffight/lcs/weapon/56.asm | zengfr/arcade_game_romhacking_sourcecode_top_secret_data | 6 | 162724 | <filename>ffight/lcs/weapon/56.asm
copyright zengfr site:http://github.com/zengfr/romhack
0039FA movem.l D0-D3, -(A6)
0039FE movem.l D0-D3, -(A6)
009ACA dbra D5, $9ac8
03C690 move.w #$68, ($56,A1) [weapon+54]
03C696 move.b #$8, ($36,A1) [weapon+56]
057C5E move.w #$48, ($56,A6) [weapon+54]
057C64 tst.b ($2e,A6) [weapon+56]
057CE8 move.w #$58, ($56,A6) [weapon+54]
057CEE tst.b ($2e,A6) [weapon+56]
058C84 move.w (A0)+, ($56,A6) [weapon+54]
058C88 rts [weapon+56]
058E4C move.w #$48, ($56,A6) [weapon+54]
058E52 movea.l #$59076, A1 [weapon+56]
058EA2 move.w #$48, ($56,A6) [weapon+54]
058EA8 rts [weapon+56]
copyright zengfr site:http://github.com/zengfr/romhack
|
arch/ARM/Nordic/drivers/nrf_common/nrf-radio.adb | rocher/Ada_Drivers_Library | 192 | 23945 | ------------------------------------------------------------------------------
-- --
-- Copyright (C) 2016-2020, AdaCore --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- 1. Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- 2. Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- 3. Neither the name of the 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 --
-- HOLDER 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 NRF_SVD.RADIO; use NRF_SVD.RADIO;
with System.Storage_Elements; use System.Storage_Elements;
package body nRF.Radio is
------------------------------------
-- Setup_For_Bluetooth_Low_Energy --
------------------------------------
procedure Setup_For_Bluetooth_Low_Energy is
begin
Set_Mode (BLE_1MBIT);
Configure_Packet (S0_Field_Size_In_Byte => 1,
S1_Field_Size_In_Bit => 0,
Length_Field_Size_In_Bit => 8,
Max_Packet_Length_In_Byte => 1 + 1 + 37,
Static_Packet_Length_In_Byte => 0,
On_Air_Endianness => Little_Endian);
Configure_CRC (Enable => True,
Length => 3,
Skip_Address => True,
Polynomial => 16#00_065B#,
Initial_Value => 16#55_5555#);
Configure_Whitening (True);
end Setup_For_Bluetooth_Low_Energy;
-----------
-- State --
-----------
function State return Radio_State is
begin
-- return Radio_State'Enum_Val (RADIO_Periph.STATE.STATE'Enum_Rep);
case RADIO_Periph.STATE.STATE is
when Disabled => return Disabled;
when Rxru => return Rx_Ramp_Up;
when Rxidle => return Rx_Idle;
when Rx => return Rx_State;
when Rxdisable => return Rx_Disabled;
when Txru => return Tx_Ramp_Up;
when Txidle => return Tx_Idle;
when Tx => return Tx_State;
when Txdisable => return Tx_Disabled;
end case;
end State;
---------------------
-- Enable_Shortcut --
---------------------
procedure Enable_Shortcut (Short : Shortcut) is
begin
case Short is
when Ready_To_Start =>
RADIO_Periph.SHORTS.READY_START := Enabled;
when End_To_Disable =>
RADIO_Periph.SHORTS.END_DISABLE := Enabled;
when Disabled_To_TXen =>
RADIO_Periph.SHORTS.DISABLED_TXEN := Enabled;
when Disabled_To_RXen =>
RADIO_Periph.SHORTS.DISABLED_RXEN := Enabled;
when Address_To_RSSIstart =>
RADIO_Periph.SHORTS.ADDRESS_RSSISTART := Enabled;
when End_To_Start =>
RADIO_Periph.SHORTS.END_START := Enabled;
when Address_To_BCstart =>
RADIO_Periph.SHORTS.ADDRESS_BCSTART := Enabled;
end case;
end Enable_Shortcut;
----------------------
-- Disable_Shortcut --
----------------------
procedure Disable_Shortcut (Short : Shortcut) is
begin
case Short is
when Ready_To_Start =>
RADIO_Periph.SHORTS.READY_START := Disabled;
when End_To_Disable =>
RADIO_Periph.SHORTS.END_DISABLE := Disabled;
when Disabled_To_TXen =>
RADIO_Periph.SHORTS.DISABLED_TXEN := Disabled;
when Disabled_To_RXen =>
RADIO_Periph.SHORTS.DISABLED_RXEN := Disabled;
when Address_To_RSSIstart =>
RADIO_Periph.SHORTS.ADDRESS_RSSISTART := Disabled;
when End_To_Start =>
RADIO_Periph.SHORTS.END_START := Disabled;
when Address_To_BCstart =>
RADIO_Periph.SHORTS.ADDRESS_BCSTART := Disabled;
end case;
end Disable_Shortcut;
----------------
-- Set_Packet --
----------------
procedure Set_Packet
(Address : System.Address)
is
begin
RADIO_Periph.PACKETPTR := UInt32 (To_Integer (Address));
end Set_Packet;
-------------------
-- Set_Frequency --
-------------------
procedure Set_Frequency (F : Radio_Frequency_MHz) is
begin
RADIO_Periph.FREQUENCY.FREQUENCY :=
UInt7 (F - Radio_Frequency_MHz'First);
end Set_Frequency;
---------------
-- Set_Power --
---------------
procedure Set_Power (P : Radio_Power) is
begin
RADIO_Periph.TXPOWER.TXPOWER :=
TXPOWER_TXPOWER_Field'Enum_Val (P'Enum_Rep);
end Set_Power;
--------------
-- Set_Mode --
--------------
procedure Set_Mode (Mode : Radio_Mode) is
begin
RADIO_Periph.MODE.MODE := (case Mode is
when Nordic_1MBIT => Nrf_1Mbit,
when Nordic_2MBIT => Nrf_2Mbit,
when Nordic_250KBIT => Nrf_250Kbit,
when BLE_1MBIT => Ble_1Mbit);
end Set_Mode;
-------------------------
-- Set_Logic_Addresses --
-------------------------
procedure Set_Logic_Addresses
(Base0, Base1 : HAL.UInt32;
Base_Length_In_Byte : Base_Address_Lenght;
AP0, AP1, AP2, AP3, AP4, AP5, AP6, AP7 : HAL.UInt8)
is
begin
RADIO_Periph.BASE0 := Base0;
RADIO_Periph.BASE1 := Base1;
RADIO_Periph.PCNF1.BALEN := UInt3 (Base_Length_In_Byte);
RADIO_Periph.PREFIX0.Arr := (AP0, AP1, AP2, AP3);
RADIO_Periph.PREFIX1.Arr := (AP4, AP5, AP6, AP7);
end Set_Logic_Addresses;
-----------------------------
-- Translate_Logic_Address --
-----------------------------
procedure Translate_Logic_Address (Logic_Addr : Radio_Logic_Address;
Base : out HAL.UInt32;
Prefix : out HAL.UInt8)
is
begin
case Logic_Addr is
when 0 =>
Base := RADIO_Periph.BASE0;
when 1 .. 7 =>
Base := RADIO_Periph.BASE1;
end case;
case Logic_Addr is
when 0 .. 3 =>
Prefix := RADIO_Periph.PREFIX0.Arr (Integer (Logic_Addr));
when 4 .. 7 =>
Prefix := RADIO_Periph.PREFIX1.Arr (Integer (Logic_Addr));
end case;
end Translate_Logic_Address;
--------------------
-- Set_TX_Address --
--------------------
procedure Set_TX_Address (Logic_Addr : Radio_Logic_Address) is
begin
RADIO_Periph.TXADDRESS.TXADDRESS := UInt3 (Logic_Addr);
end Set_TX_Address;
--------------------------
-- Get_RX_Match_Address --
--------------------------
function RX_Match_Address return Radio_Logic_Address is
begin
return Radio_Logic_Address (RADIO_Periph.RXMATCH.RXMATCH);
end RX_Match_Address;
----------------------
-- Set_RX_Addresses --
----------------------
procedure Set_RX_Addresses (Enable_Mask : Logic_Address_Mask) is
begin
for Index in Enable_Mask'Range loop
RADIO_Periph.RXADDRESSES.ADDR.Arr (Integer (Index)) :=
(if Enable_Mask (Index) then Enabled else Disabled);
end loop;
end Set_RX_Addresses;
-------------------
-- Configure_CRC --
-------------------
procedure Configure_CRC (Enable : Boolean;
Length : UInt2;
Skip_Address : Boolean;
Polynomial : UInt24;
Initial_Value : UInt24)
is
begin
if Enable then
case Length is
when 0 =>
RADIO_Periph.CRCCNF.LEN := Disabled;
when 1 =>
RADIO_Periph.CRCCNF.LEN := One;
when 2 =>
RADIO_Periph.CRCCNF.LEN := Two;
when 3 =>
RADIO_Periph.CRCCNF.LEN := Three;
end case;
else
RADIO_Periph.CRCCNF.LEN := Disabled;
end if;
RADIO_Periph.CRCCNF.SKIPADDR := (if Skip_Address then Skip else Include);
RADIO_Periph.CRCPOLY.CRCPOLY := Polynomial;
RADIO_Periph.CRCINIT.CRCINIT := Initial_Value;
end Configure_CRC;
---------------
-- CRC_Error --
---------------
function CRC_Error return Boolean is
begin
return RADIO_Periph.CRCSTATUS.CRCSTATUS = Crcerror;
end CRC_Error;
-------------------------
-- Configure_Whitening --
-------------------------
procedure Configure_Whitening (Enable : Boolean;
Initial_Value : UInt6 := 0)
is
begin
RADIO_Periph.PCNF1.WHITEEN := (if Enable then Enabled else Disabled);
RADIO_Periph.DATAWHITEIV.DATAWHITEIV :=
2#0100_0000# or UInt7 (Initial_Value);
end Configure_Whitening;
----------------------
-- Configure_Packet --
----------------------
procedure Configure_Packet
(S0_Field_Size_In_Byte : Bit;
S1_Field_Size_In_Bit : UInt4;
Length_Field_Size_In_Bit : UInt4;
Max_Packet_Length_In_Byte : Packet_Len;
Static_Packet_Length_In_Byte : Packet_Len;
On_Air_Endianness : Length_Field_Endianness)
is
begin
RADIO_Periph.PCNF0.LFLEN := Length_Field_Size_In_Bit;
RADIO_Periph.PCNF0.S0LEN := S0_Field_Size_In_Byte = 1;
RADIO_Periph.PCNF0.S1LEN := S1_Field_Size_In_Bit;
RADIO_Periph.PCNF1.MAXLEN := Max_Packet_Length_In_Byte;
RADIO_Periph.PCNF1.STATLEN := Static_Packet_Length_In_Byte;
RADIO_Periph.PCNF1.ENDIAN := (if On_Air_Endianness = Little_Endian then
Little
else
Big);
end Configure_Packet;
end nRF.Radio;
|
Transynther/x86/_processed/US/_zr_/i7-7700_9_0x48.log_21829_284.asm | ljhsiun2/medusa | 9 | 133 | .global s_prepare_buffers
s_prepare_buffers:
push %r13
push %r15
push %r9
push %rax
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_UC_ht+0xf95a, %rsi
lea addresses_D_ht+0x1e972, %rdi
nop
nop
nop
nop
nop
inc %r15
mov $80, %rcx
rep movsw
and %rax, %rax
lea addresses_D_ht+0x1cffa, %rdx
clflush (%rdx)
nop
nop
nop
xor %r15, %r15
mov (%rdx), %edi
nop
nop
nop
nop
mfence
lea addresses_D_ht+0x185a, %rsi
lea addresses_WT_ht+0xf25a, %rdi
clflush (%rsi)
nop
nop
nop
nop
nop
cmp %r9, %r9
mov $33, %rcx
rep movsb
nop
xor $54666, %rdx
lea addresses_D_ht+0x1229a, %rsi
lea addresses_A_ht+0x1345a, %rdi
nop
nop
sub %r13, %r13
mov $89, %rcx
rep movsl
nop
nop
nop
nop
nop
sub %rdx, %rdx
lea addresses_WC_ht+0x1ce5a, %rdi
nop
nop
nop
nop
cmp $61915, %rsi
movw $0x6162, (%rdi)
nop
nop
nop
and $58596, %rdx
lea addresses_A_ht+0xffb, %rsi
lea addresses_UC_ht+0x1b05a, %rdi
and $19266, %r15
mov $93, %rcx
rep movsl
nop
nop
nop
nop
and $34069, %rdx
lea addresses_WC_ht+0x14a4, %rsi
lea addresses_D_ht+0x13766, %rdi
xor %r13, %r13
mov $102, %rcx
rep movsq
nop
nop
sub %r9, %r9
lea addresses_normal_ht+0xddd2, %rsi
lea addresses_D_ht+0x9dfa, %rdi
nop
nop
xor %r13, %r13
mov $43, %rcx
rep movsb
cmp %rsi, %rsi
lea addresses_WC_ht+0xc25a, %rsi
lea addresses_A_ht+0x1bdda, %rdi
nop
nop
nop
nop
nop
sub $10227, %rax
mov $12, %rcx
rep movsw
nop
cmp %rsi, %rsi
lea addresses_A_ht+0x10f5a, %rsi
lea addresses_WC_ht+0x1d576, %rdi
nop
nop
xor %rax, %rax
mov $102, %rcx
rep movsw
nop
nop
add $55113, %rcx
lea addresses_A_ht+0xebba, %rcx
clflush (%rcx)
nop
nop
nop
nop
nop
inc %rdi
mov $0x6162636465666768, %rdx
movq %rdx, %xmm6
movups %xmm6, (%rcx)
nop
nop
cmp $62348, %r15
lea addresses_WC_ht+0x1995a, %rsi
lea addresses_WT_ht+0x205a, %rdi
clflush (%rsi)
clflush (%rdi)
nop
nop
nop
nop
and $52373, %rax
mov $63, %rcx
rep movsw
nop
add $6330, %rsi
lea addresses_WC_ht+0x1e51a, %r9
clflush (%r9)
nop
add %rdx, %rdx
and $0xffffffffffffffc0, %r9
movntdqa (%r9), %xmm4
vpextrq $0, %xmm4, %r13
nop
xor $65289, %r13
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rax
pop %r9
pop %r15
pop %r13
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r13
push %r14
push %rax
push %rsi
// Faulty Load
lea addresses_US+0x105a, %rsi
clflush (%rsi)
nop
nop
nop
nop
nop
dec %r11
mov (%rsi), %r13d
lea oracles, %rsi
and $0xff, %r13
shlq $12, %r13
mov (%rsi,%r13,1), %r13
pop %rsi
pop %rax
pop %r14
pop %r13
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_US', 'AVXalign': False, 'congruent': 0, 'size': 16, 'same': False, 'NT': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_US', 'AVXalign': False, 'congruent': 0, 'size': 4, 'same': True, 'NT': False}}
<gen_prepare_buffer>
{'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 3, 'same': True}}
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 5, 'size': 4, 'same': False, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 8, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 10, 'same': True}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 8, 'size': 2, 'same': False, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 11, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 2, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 5, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 5, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 0, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 5, 'size': 16, 'same': True, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 10, 'same': True}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 6, 'size': 16, 'same': False, 'NT': True}}
{'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
*/
|
code/8/tt.asm | GeekHades1/AssemblyCode | 1 | 177025 | <filename>code/8/tt.asm
assume cs:code
;7C 47 05
code segment
mov dx, 5H
mov ax, 477cH
mov bx, 2258
div bx
mov ax, 4c00H
int 21H
code ends
end
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.