atag.hh (8229:78bf55f23338) atag.hh (8884:fd92c46655ad)
1/*
2 * Copyright (c) 2010 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 142 unchanged lines hidden (view full) ---

151 // Add one for null terminator
152 int len = s.length() + 1;
153
154 // 2 + ceiling(len/4)
155 _size = 2 + ((len + 3) >> 2);
156
157 delete[] storage;
158 storage = new uint32_t[size()];
1/*
2 * Copyright (c) 2010 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 142 unchanged lines hidden (view full) ---

151 // Add one for null terminator
152 int len = s.length() + 1;
153
154 // 2 + ceiling(len/4)
155 _size = 2 + ((len + 3) >> 2);
156
157 delete[] storage;
158 storage = new uint32_t[size()];
159
159 // Initialize the last byte of memory here beacuse it might be slightly
160 // longer than needed and mis-speculation of the NULL in the O3 CPU can
161 // change stats ever so slightly when that happens.
162 storage[size() - 1] = 0;
160 strcpy((char*)&storage[2] , s.c_str());
161 }
162 AtagCmdline()
163 : AtagHeader(Size)
164 {}
165};
166
167class AtagNone : public AtagHeader

--- 116 unchanged lines hidden ---
163 strcpy((char*)&storage[2] , s.c_str());
164 }
165 AtagCmdline()
166 : AtagHeader(Size)
167 {}
168};
169
170class AtagNone : public AtagHeader

--- 116 unchanged lines hidden ---