qcms-asm-check.js (831B)
1 // This is a workaround for bug 465088, that the qcms assembly doesn't 2 // quite match the non-assembly output. 3 4 function check_qcms_has_assembly() 5 { 6 // We have assembly code on x86 and x86_64 architectures. 7 // Unfortunately, detecting that is a little complicated. 8 9 if (navigator.platform == "MacIntel") { 10 return true; 11 } 12 13 if (navigator.platform.indexOf("Win") == 0 || navigator.platform == "OS/2") { 14 // Assume all Windows and OS/2 is x86 or x86_64. We don't 15 // expose any way for Web content to check. 16 return true; 17 } 18 19 // On most Unix-like platforms, navigator.platform is basically 20 // |uname -sm|. 21 if (navigator.platform.match(/(i[3456]86|x86_64|amd64|i86)/)) { 22 return true; 23 } 24 25 return false; 26 } 27 28 var qcms_has_assembly = check_qcms_has_assembly();