michael@0: // This is a workaround for bug 465088, that the qcms assembly doesn't michael@0: // quite match the non-assembly output. michael@0: michael@0: function check_qcms_has_assembly() michael@0: { michael@0: // We have assembly code on x86 and x86_64 architectures. michael@0: // Unfortunately, detecting that is a little complicated. michael@0: michael@0: if (navigator.platform == "MacIntel") { michael@0: return true; michael@0: } michael@0: michael@0: if (navigator.platform.indexOf("Win") == 0 || navigator.platform == "OS/2") { michael@0: // Assume all Windows and OS/2 is x86 or x86_64. We don't michael@0: // expose any way for Web content to check. michael@0: return true; michael@0: } michael@0: michael@0: // On most Unix-like platforms, navigator.platform is basically michael@0: // |uname -sm|. michael@0: if (navigator.platform.match(/(i[3456]86|x86_64|amd64|i86)/)) { michael@0: return true; michael@0: } michael@0: michael@0: return false; michael@0: } michael@0: michael@0: var qcms_has_assembly = check_qcms_has_assembly();