mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2025-01-13 21:36:16 +00:00
fixed waveform bug; added VL_DIVS_III
This commit is contained in:
parent
f7ade09225
commit
d16f87b990
@ -69,7 +69,8 @@ export class WaveformView {
|
||||
itemHeight: rowHeight,
|
||||
totalRows: this.meta.length,
|
||||
generatorFn: (row : number) => {
|
||||
var s = this.meta[row].label;
|
||||
var metarow = this.meta[row]; // TODO: why null?
|
||||
var s = metarow != null ? metarow.label : "";
|
||||
var linediv = document.createElement("div");
|
||||
var canvas = document.createElement("canvas");
|
||||
canvas.width = width - 12;
|
||||
|
@ -100,8 +100,17 @@ export function VL_DIV_III(lbits,lhs,rhs) {
|
||||
export function VL_MODDIV_III(lbits,lhs,rhs) {
|
||||
return (((rhs)==0)?0:(lhs)%(rhs)); }
|
||||
|
||||
export function VL_DIVS_III(lbits,lhs,rhs) {
|
||||
var lhs_signed = VL_EXTENDS_II(32, lbits, lhs);
|
||||
var rhs_signed = VL_EXTENDS_II(32, lbits, rhs);
|
||||
return (((rhs_signed)==0)?0:(lhs_signed)/(rhs_signed));
|
||||
}
|
||||
|
||||
export function VL_MODDIVS_III(lbits,lhs,rhs) {
|
||||
return (((rhs)==0)?0:(lhs)%(rhs)); }
|
||||
var lhs_signed = VL_EXTENDS_II(32, lbits, lhs);
|
||||
var rhs_signed = VL_EXTENDS_II(32, lbits, rhs);
|
||||
return (((rhs_signed)==0)?0:(lhs_signed)%(rhs_signed));
|
||||
}
|
||||
|
||||
export function VL_REDXOR_32(r) {
|
||||
r=(r^(r>>1)); r=(r^(r>>2)); r=(r^(r>>4)); r=(r^(r>>8)); r=(r^(r>>16));
|
||||
|
Loading…
x
Reference in New Issue
Block a user