TempleOSTS_130707.ISO
This commit is contained in:
1 parent
17b71f1a2d
commit
1343005a29
617 files changed
+14399
-25130
No files matched your search
@@ -52,8 +52,6 @@ $WW,1$$FG,5$$TX+CX,"64-Bit Assembly Quiz"$$FG$
|
||||
|
||||
14) On a fresh CPU with an empty TLB, how many memory accesses (page tables) does it take to access one virtual address?
|
||||
|
||||
15) Is there an instruction to PUSH or POP all registers?
|
||||
|
||||
----
|
||||
|
||||
TempleOS identity-maps everything, all the time, so the usual convention of upper memory being for kernel does not apply. It uses physical addresses, basically. It puts all code in the lowest 2-Gig memory range so that it can use the CALL REL32 instruction, the fastest. It never changes privilege levels or messes with page tables, once it is up-and-running.
|
||||
@@ -89,6 +87,3 @@ ANSWERS:
|
||||
13) 64-bit mode has 4K or 2Meg page size.
|
||||
|
||||
14) For one access, there are 3-4 levels of page tables plus the location itself.
|
||||
|
||||
15) There is no instruction to PUSH or POP all registers.
|
||||
|
||||
@@ -17,7 +17,7 @@ See $LK-A,"::/TempleOS/Demo/SubIntAccess.CPP"$ for how
|
||||
to access upper or lower 32-bits.
|
||||
|
||||
For a complete lst of nonstandard compiler
|
||||
features, see $LK-A,"::/TempleOS/Doc/Differences.TXT"$.
|
||||
features, see $LK-A,"::/TempleOS/Doc/HolyC.TXT"$.
|
||||
|
||||
*/
|
||||
|
||||
@@ -73,7 +73,7 @@ public U64i union I64
|
||||
penalty.
|
||||
|
||||
For a complete lst of nonstandard compiler
|
||||
features, see $LK-A,"::/TempleOS/Doc/Differences.TXT"$.
|
||||
features, see $LK-A,"::/TempleOS/Doc/HolyC.TXT"$.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
@@ -121,8 +121,8 @@ U0 Main()
|
||||
}
|
||||
end=GetTimeStamp;
|
||||
test_time=end-start;
|
||||
"Fixed Point Sum :%X\n",sum;
|
||||
"$$FG,RED$$Fixed Point Cycles :%10.5f$$FG$$\n",
|
||||
"Fixed-Point Sum :%X\n",sum;
|
||||
"$$FG,RED$$Fixed-Point Cycles :%10.5f$$FG$$\n",
|
||||
ToF64(test_time)/SAMPLE_SIZE;
|
||||
|
||||
//Measure fixed point arithmetic
|
||||
@@ -130,8 +130,8 @@ U0 Main()
|
||||
sum=AsmFixedPt;
|
||||
end=GetTimeStamp;
|
||||
test_time=end-start;
|
||||
"Asm Fixed Point Sum :%X\n",sum;
|
||||
"$$FG,RED$$Asm Fixed Point Cycles:%10.5f$$FG$$\n",
|
||||
"Asm Fixed-Point Sum :%X\n",sum;
|
||||
"$$FG,RED$$Asm Fixed-Point Cycles:%10.5f$$FG$$\n",
|
||||
ToF64(test_time)/SAMPLE_SIZE;
|
||||
|
||||
//Measure float arithmetic
|
||||
@@ -150,15 +150,28 @@ Main;
|
||||
|
||||
/* Program Output$HL,0$$WW+H,1$$FD,1$
|
||||
|
||||
Machine 1:
|
||||
8 Cores 2.660GHz
|
||||
$FG,4$Overhead Cycles : 2.00814$FG$
|
||||
Float Sum :FFFFE1D361BEED68
|
||||
$FG,4$Float Cycles : 10.16076$FG$
|
||||
Fixed Point Sum :FFFFE1D361729914
|
||||
$FG,4$Fixed Point Cycles : 5.29392$FG$
|
||||
Asm Fixed Point Sum :FFFFE1D361729914
|
||||
$FG,4$Asm Fixed Point Cycles: 4.20464$FG$
|
||||
Fixed-Point Sum :FFFFE1D361729914
|
||||
$FG,4$Fixed-Point Cycles : 5.29392$FG$
|
||||
Asm Fixed-Point Sum :FFFFE1D361729914
|
||||
$FG,4$Asm Fixed-Point Cycles: 4.20464$FG$
|
||||
Asm Float Sum :FFFFE1D361BEED56
|
||||
$FG,4$Asm Float Cycles : 3.04635$FG$
|
||||
|
||||
Machine 2:
|
||||
8 Cores 3.395GHz
|
||||
$FG,4$Overhead Cycles : 4.87040$FG$
|
||||
Float Sum :D20A01DB177
|
||||
$FG,4$Float Cycles : 10.11558$FG$
|
||||
Fixed-Point Sum :D209FD18CC7
|
||||
$FG,4$Fixed-Point Cycles : 4.50618$FG$
|
||||
Asm Fixed-Point Sum :D209FD18CC7
|
||||
$FG,4$Asm Fixed-Point Cycles: 3.02426$FG$
|
||||
Asm Float Sum :D20A01DB17B
|
||||
$FG,4$Asm Float Cycles : 3.21070$FG$
|
||||
|
||||
$HL,1$*/
|
||||
@@ -1,4 +1,4 @@
|
||||
//This is the software interrupt num
|
||||
//This is the software interrupt num
|
||||
//we will use. See $LK,"Software Int's","MN:I_WAKE"$ for
|
||||
//picking a num. Nums are subject to change.
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ I64 Lex(U8 **_src,I64 *num)
|
||||
*_src=src;
|
||||
return TK_EOF;
|
||||
case CH_SPACE:
|
||||
case CH_CARRIAGE_RETURN:
|
||||
case '\r':
|
||||
case '\n':
|
||||
src++;
|
||||
break;
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
U0 PageTableDemo1()
|
||||
{
|
||||
I64 *pte=MemPtAtPageTableEntry(VGA_GRAPHIC_MEM_BASE),p0,p1;
|
||||
I64 *pte=MemPageTable(VGA_GRAPHIC_MEM_BASE),p0,p1;
|
||||
"Page table entries for VGA screen memory\n";
|
||||
DocD(pte);
|
||||
PressAKey;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
I64 *addr=VGA_GRAPHIC_MEM_BASE,
|
||||
*pte_addr=MemPtAtPageTableEntry(addr),
|
||||
*pte_addr=MemPageTable(addr),
|
||||
err_code=0,
|
||||
*reported_fault_addr;
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@ U0 TimeIns()
|
||||
CHeapCtrl *hc;
|
||||
Bool old_preempt;
|
||||
|
||||
"$$FG,RED$$Now, this demo seems broken, perhaps,\n"
|
||||
"because I run in a virtual machine.$$FG$$\n\n";
|
||||
CPURep;
|
||||
|
||||
shared_blks=1;
|
||||
@@ -34,7 +36,7 @@ U0 TimeIns()
|
||||
"Uncached Cycles: %10,d\n",end-start;
|
||||
|
||||
"$$FG,GREEN$$The difference is even greater\n"
|
||||
"because the loop overhead was not subtracted.\n\n";
|
||||
"because the loop overhead was not subtracted.$$FG$$\n\n";
|
||||
Free(cached_I64);
|
||||
Free(uncached_I64);
|
||||
MemBlks2MegFree(bp,shared_blks);
|
||||
|
||||
Reference in new issue
Block a user