qfloat16: suppress the tables if FP16 is supported by the CPU
If QtCore is being compiled to a system with FP16 support, then all applications are too and, therefore, we don't need the tables. Saves 12k of read-only data. Change-Id: I46363e5b8944459e8c48fffd158bb53d906df297 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
This commit is contained in:
parent
eb25acc05b
commit
9649c41ed9
@ -79,6 +79,7 @@ qint32 main(qint32 argc, char **argv)
|
||||
fid.write("#include <QtCore/qfloat16.h>\n\n");
|
||||
|
||||
fid.write("QT_BEGIN_NAMESPACE\n\n");
|
||||
fid.write("#if !defined(__F16C__) && !defined(__ARM_FP16_FORMAT_IEEE)\n\n");
|
||||
|
||||
fid.write("const quint32 qfloat16::mantissatable[2048] = {\n");
|
||||
fid.write("0,\n");
|
||||
@ -155,6 +156,7 @@ qint32 main(qint32 argc, char **argv)
|
||||
|
||||
fid.write("};\n\n");
|
||||
|
||||
fid.write("#endif // !__F16C__ && !__ARM_FP16_FORMAT_IEEE\n\n");
|
||||
fid.write("QT_END_NAMESPACE\n");
|
||||
fid.close();
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user