-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstructions.html
90 lines (59 loc) · 2.78 KB
/
instructions.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<!DOCTYPE html>
<html lang="en">
<head>
<title>CMa Instruction Set</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.11.1/bootstrap-table.min.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.11.1/bootstrap-table.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-modal/2.2.6/js/bootstrap-modalmanager.min.js"></script>
<style>
</style>
</head>
<body>
<div class="container" >
<h1>CMa Instruction Set</h1>
<table class="table" id='InstructionTable' style="margin-top: 0; margin-bottom: 0; padding-top: 0; padding-bottom:0;">
<thead>
<th>Instruction</th><th>Semantics</th>
</thead>
<tbody>
</tbody>
</table>
</div>
<script src="js/vm.js"></script>
<script src="js/instr_arithmetic.js"></script>
<script src="js/instr_comparison.js"></script>
<script src="js/instr_controlflow.js"></script>
<script src="js/instr_io.js"></script>
<script src="js/instr_loadstore.js"></script>
<script src="js/instr_heap.js"></script>
<script src="js/instr_stack.js"></script>
<script type="text/javascript">
function loadTable(){
var instructionNames = Object.keys(InstructionDefinition);
instructionNames.sort();
for(var i=0;i<instructionNames.length; i++ ){
var name = instructionNames[i];
var def = InstructionDefinition[name];
if( def ) {
var row = '<tr data-toggle="collapse" data-target="#' + def.name + 'Details" class="accordion-toggle" style="border-bottom-style:hidden;" >'
+ '<td><b>' + def.displayName + '</b></td>'
+ '<td style="font-family:monospace;">' + def.semantics + '</td></tr>';
$('#InstructionTable').append(row);
var hiddenRow = '<tr style="border-top-style:hidden; "><td colspan="2" class="hiddenRow">'
+ '<div class="accordion-body collapse" id="' + def.name + 'Details">'
+ '<p>' + def.description + '</p>\n'
+ '<pre>' + def.impl + '</pre></div></td></tr>';
$('#InstructionTable').append(hiddenRow);
}
}
}
$( document ).ready(function() {
loadTable();
});
</script>
</body>
</html>